Skip to content

Commit

Permalink
Temporarily reverts "Remove expect/actual from enums without extra pr…
Browse files Browse the repository at this point in the history
…operties (#137)" (#141)

Revert "Remove expect/actual from enums without extra properties (#137)"

This reverts commit 1fb4e8d.
  • Loading branch information
JayShortway authored Aug 9, 2024
1 parent 1fb4e8d commit 0b5629f
Show file tree
Hide file tree
Showing 37 changed files with 251 additions and 284 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.revenuecat.purchases.kmp.apitester

import com.revenuecat.purchases.kmp.EntitlementInfo
import com.revenuecat.purchases.kmp.OwnershipType
import com.revenuecat.purchases.kmp.PeriodType
import com.revenuecat.purchases.kmp.Store
import com.revenuecat.purchases.kmp.VerificationResult
import com.revenuecat.purchases.kmp.billingIssueDetectedAtMillis
import com.revenuecat.purchases.kmp.datetime.billingIssueDetectedAtInstant
Expand All @@ -14,8 +17,11 @@ import com.revenuecat.purchases.kmp.isActive
import com.revenuecat.purchases.kmp.isSandbox
import com.revenuecat.purchases.kmp.latestPurchaseDateMillis
import com.revenuecat.purchases.kmp.originalPurchaseDateMillis
import com.revenuecat.purchases.kmp.ownershipType
import com.revenuecat.purchases.kmp.periodType
import com.revenuecat.purchases.kmp.productIdentifier
import com.revenuecat.purchases.kmp.productPlanIdentifier
import com.revenuecat.purchases.kmp.store
import com.revenuecat.purchases.kmp.unsubscribeDetectedAtMillis
import com.revenuecat.purchases.kmp.verification
import com.revenuecat.purchases.kmp.willRenew
Expand All @@ -28,25 +34,22 @@ private class EntitlementInfoAPI {
val identifier: String = identifier
val active: Boolean = isActive
val willRenew: Boolean = willRenew
// FIXME re-enable in SDK-3530
// val periodType: PeriodType = periodType
val periodType: PeriodType = periodType
val latestPurchaseDate: Long? = latestPurchaseDateMillis
val latestPurchaseInstant: Instant? = latestPurchaseInstant
val originalPurchaseDate: Long? = originalPurchaseDateMillis
val originalPurchaseInstant: Instant? = originalPurchaseInstant
val expirationDate: Long? = expirationDateMillis
val expirationInstant: Instant? = expirationInstant
// FIXME re-enable in SDK-3530
// val store: Store = store
val store: Store = store
val productIdentifier: String = productIdentifier
val productPlanIdentifier: String? = productPlanIdentifier
val sandbox: Boolean = isSandbox
val unsubscribeDetectedAt: Long? = unsubscribeDetectedAtMillis
val unsubscribeDetectedAtInstant: Instant? = unsubscribeDetectedAtInstant
val billingIssueDetectedAt: Long? = billingIssueDetectedAtMillis
val billingIssueDetectedAtInstant: Instant? = billingIssueDetectedAtInstant
// FIXME re-enable in SDK-3530
// val ownershipType: OwnershipType = ownershipType
val ownershipType: OwnershipType = ownershipType
val verification: VerificationResult = verification
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.revenuecat.purchases.kmp.apitester

import com.revenuecat.purchases.kmp.CacheFetchPolicy

@Suppress("unused")
private class CacheFetchPolicyAPI {

fun check(fetchPolicy: CacheFetchPolicy) {
when (fetchPolicy) {
CacheFetchPolicy.CACHE_ONLY,
CacheFetchPolicy.FETCH_CURRENT,
CacheFetchPolicy.CACHED_OR_FETCHED,
CacheFetchPolicy.NOT_STALE_CACHED_OR_CURRENT,
-> {
}
}.exhaustive
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.revenuecat.purchases.kmp.apitester

import com.revenuecat.purchases.kmp.OwnershipType

@Suppress("unused")
private class OwnershipTypeAPI {
fun check(type: OwnershipType) {
when (type) {
OwnershipType.PURCHASED,
OwnershipType.FAMILY_SHARED,
OwnershipType.UNKNOWN,
-> {
}
}.exhaustive
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.revenuecat.purchases.kmp.apitester

import com.revenuecat.purchases.kmp.PeriodType

@Suppress("unused")
private class PeriodTypeAPI {
fun check(type: PeriodType) {
when (type) {
PeriodType.NORMAL,
PeriodType.INTRO,
PeriodType.TRIAL,
-> {
}
}.exhaustive
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.revenuecat.purchases.kmp.apitester

import com.revenuecat.purchases.kmp.PurchasesAreCompletedBy

@Suppress("unused")
private class PurchasesAreCompletedByAPI {
fun check(mode: PurchasesAreCompletedBy) {
when (mode) {
PurchasesAreCompletedBy.REVENUECAT,
PurchasesAreCompletedBy.MY_APP,
-> {
}
}.exhaustive
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.revenuecat.purchases.kmp.apitester

import com.revenuecat.purchases.kmp.Store

@Suppress("unused")
private class StoreAPI {
fun check(store: Store) {
when (store) {
Store.APP_STORE,
Store.MAC_APP_STORE,
Store.PLAY_STORE,
Store.STRIPE,
Store.PROMOTIONAL,
Store.UNKNOWN_STORE,
Store.AMAZON,
Store.RC_BILLING,
Store.EXTERNAL,
-> {
}
}.exhaustive
}
}
Loading

0 comments on commit 0b5629f

Please sign in to comment.