Skip to content

Commit

Permalink
Moves CustomerInfo to the models package (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
JayShortway authored Sep 13, 2024
1 parent e660c69 commit 0df65a6
Show file tree
Hide file tree
Showing 45 changed files with 367 additions and 306 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

package com.revenuecat.purchases.kmp.apitester

import com.revenuecat.purchases.kmp.CustomerInfo
import com.revenuecat.purchases.kmp.EntitlementInfos
import com.revenuecat.purchases.kmp.datetime.allExpirationInstants
import com.revenuecat.purchases.kmp.datetime.allPurchaseInstants
import com.revenuecat.purchases.kmp.datetime.firstSeenInstant
import com.revenuecat.purchases.kmp.datetime.latestExpirationInstant
import com.revenuecat.purchases.kmp.datetime.originalPurchaseInstant
import com.revenuecat.purchases.kmp.datetime.requestInstant
import com.revenuecat.purchases.kmp.models.CustomerInfo
import com.revenuecat.purchases.kmp.models.EntitlementInfos
import com.revenuecat.purchases.kmp.models.Transaction
import kotlinx.datetime.Instant

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.revenuecat.purchases.kmp.apitester

import com.revenuecat.purchases.kmp.EntitlementInfo
import com.revenuecat.purchases.kmp.datetime.billingIssueDetectedAtInstant
import com.revenuecat.purchases.kmp.datetime.expirationInstant
import com.revenuecat.purchases.kmp.datetime.latestPurchaseInstant
import com.revenuecat.purchases.kmp.datetime.originalPurchaseInstant
import com.revenuecat.purchases.kmp.datetime.unsubscribeDetectedAtInstant
import com.revenuecat.purchases.kmp.models.EntitlementInfo
import kotlinx.datetime.Instant

@Suppress("unused", "UNUSED_VARIABLE")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.revenuecat.purchases.kmp.apitester

import com.revenuecat.purchases.kmp.EntitlementInfo
import com.revenuecat.purchases.kmp.EntitlementInfos
import com.revenuecat.purchases.kmp.models.EntitlementInfo
import com.revenuecat.purchases.kmp.models.EntitlementInfos

@Suppress("unused", "UNUSED_VARIABLE")
private class EntitlementInfosAPI {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.revenuecat.purchases.kmp.apitester

import com.revenuecat.purchases.kmp.OwnershipType
import com.revenuecat.purchases.kmp.models.OwnershipType

@Suppress("unused")
private class OwnershipTypeAPI {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.revenuecat.purchases.kmp.apitester

import com.revenuecat.purchases.kmp.CustomerInfo
import com.revenuecat.purchases.kmp.Package
import com.revenuecat.purchases.kmp.PurchasesError
import com.revenuecat.purchases.kmp.models.CustomerInfo
import com.revenuecat.purchases.kmp.models.StoreTransaction
import com.revenuecat.purchases.kmp.ui.revenuecatui.PaywallListener

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

import com.revenuecat.purchases.kmp.PeriodType
import com.revenuecat.purchases.kmp.models.PeriodType

@Suppress("unused")
private class PeriodTypeAPI {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.revenuecat.purchases.kmp.apitester

import arrow.core.Either
import com.revenuecat.purchases.kmp.CustomerInfo
import com.revenuecat.purchases.kmp.DangerousSettings
import com.revenuecat.purchases.kmp.LogHandler
import com.revenuecat.purchases.kmp.LogLevel
Expand All @@ -12,7 +11,6 @@ import com.revenuecat.purchases.kmp.PurchasesAreCompletedBy
import com.revenuecat.purchases.kmp.PurchasesConfiguration
import com.revenuecat.purchases.kmp.PurchasesDelegate
import com.revenuecat.purchases.kmp.PurchasesError
import com.revenuecat.purchases.kmp.Store
import com.revenuecat.purchases.kmp.configure
import com.revenuecat.purchases.kmp.either.FailedPurchase
import com.revenuecat.purchases.kmp.either.awaitGetProductsEither
Expand All @@ -23,8 +21,10 @@ import com.revenuecat.purchases.kmp.ktx.awaitGetProducts
import com.revenuecat.purchases.kmp.ktx.awaitOfferings
import com.revenuecat.purchases.kmp.ktx.awaitPurchase
import com.revenuecat.purchases.kmp.models.BillingFeature
import com.revenuecat.purchases.kmp.models.CustomerInfo
import com.revenuecat.purchases.kmp.models.EntitlementVerificationMode
import com.revenuecat.purchases.kmp.models.GoogleReplacementMode
import com.revenuecat.purchases.kmp.models.Store
import com.revenuecat.purchases.kmp.models.StoreKitVersion
import com.revenuecat.purchases.kmp.models.StoreProduct
import com.revenuecat.purchases.kmp.models.StoreTransaction
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.revenuecat.purchases.kmp.apitester

import com.revenuecat.purchases.kmp.Store
import com.revenuecat.purchases.kmp.models.Store

@Suppress("unused")
private class StoreAPI {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import arrow.core.Either
import com.revenuecat.purchases.kmp.CustomerInfo
import com.revenuecat.purchases.kmp.Offering
import com.revenuecat.purchases.kmp.Offerings
import com.revenuecat.purchases.kmp.Purchases
Expand All @@ -40,6 +39,7 @@ import com.revenuecat.purchases.kmp.PurchasesDelegate
import com.revenuecat.purchases.kmp.PurchasesError
import com.revenuecat.purchases.kmp.either.awaitOfferingsEither
import com.revenuecat.purchases.kmp.ktx.awaitCustomerInfo
import com.revenuecat.purchases.kmp.models.CustomerInfo
import com.revenuecat.purchases.kmp.models.StoreProduct
import com.revenuecat.purchases.kmp.models.StoreTransaction
import com.revenuecat.purchases.kmp.sample.components.CustomerInfoSection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import com.revenuecat.purchases.kmp.CustomerInfo
import com.revenuecat.purchases.kmp.datetime.allExpirationInstants
import com.revenuecat.purchases.kmp.datetime.allPurchaseInstants
import com.revenuecat.purchases.kmp.datetime.firstSeenInstant
import com.revenuecat.purchases.kmp.datetime.latestExpirationInstant
import com.revenuecat.purchases.kmp.datetime.originalPurchaseInstant
import com.revenuecat.purchases.kmp.datetime.requestInstant
import com.revenuecat.purchases.kmp.models.CustomerInfo
import com.revenuecat.purchases.kmp.sample.AsyncState
import com.revenuecat.purchases.kmp.sample.DefaultSpacingVertical

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.revenuecat.purchases.kmp.EntitlementInfo
import com.revenuecat.purchases.kmp.EntitlementInfos
import com.revenuecat.purchases.kmp.datetime.billingIssueDetectedAtInstant
import com.revenuecat.purchases.kmp.datetime.expirationInstant
import com.revenuecat.purchases.kmp.datetime.latestPurchaseInstant
import com.revenuecat.purchases.kmp.datetime.originalPurchaseInstant
import com.revenuecat.purchases.kmp.datetime.unsubscribeDetectedAtInstant
import com.revenuecat.purchases.kmp.models.EntitlementInfo
import com.revenuecat.purchases.kmp.models.EntitlementInfos
import com.revenuecat.purchases.kmp.sample.DefaultPaddingHorizontal
import com.revenuecat.purchases.kmp.sample.DefaultSpacingVertical

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package com.revenuecat.purchases.kmp.sample

import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import com.revenuecat.purchases.kmp.CustomerInfo
import com.revenuecat.purchases.kmp.Package
import com.revenuecat.purchases.kmp.PurchasesError
import com.revenuecat.purchases.kmp.models.CustomerInfo
import com.revenuecat.purchases.kmp.models.StoreTransaction
import com.revenuecat.purchases.kmp.ui.revenuecatui.PaywallListener

Expand Down
20 changes: 10 additions & 10 deletions core/api/core.api
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public final class com/revenuecat/purchases/kmp/Purchases {
public static final fun getProxyURL ()Ljava/lang/String;
public static final fun getSharedInstance ()Lcom/revenuecat/purchases/kmp/Purchases;
public static final fun getSimulatesAskToBuyInSandbox ()Z
public final fun getStore ()Lcom/revenuecat/purchases/kmp/Store;
public final fun getStore ()Lcom/revenuecat/purchases/kmp/models/Store;
public final fun invalidateCustomerInfoCache ()V
public final fun isAnonymous ()Z
public static final fun isConfigured ()Z
Expand Down Expand Up @@ -87,15 +87,15 @@ public final class com/revenuecat/purchases/kmp/Purchases$Companion {
}

public final class com/revenuecat/purchases/kmp/PurchasesConfiguration {
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy;Ljava/lang/String;Lcom/revenuecat/purchases/kmp/models/StoreKitVersion;ZLcom/revenuecat/purchases/kmp/Store;ZLcom/revenuecat/purchases/kmp/DangerousSettings;Lcom/revenuecat/purchases/kmp/models/EntitlementVerificationMode;Ljava/lang/Boolean;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy;Ljava/lang/String;Lcom/revenuecat/purchases/kmp/models/StoreKitVersion;ZLcom/revenuecat/purchases/kmp/models/Store;ZLcom/revenuecat/purchases/kmp/DangerousSettings;Lcom/revenuecat/purchases/kmp/models/EntitlementVerificationMode;Ljava/lang/Boolean;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getApiKey ()Ljava/lang/String;
public final fun getAppUserId ()Ljava/lang/String;
public final fun getDangerousSettings ()Lcom/revenuecat/purchases/kmp/DangerousSettings;
public final fun getDiagnosticsEnabled ()Z
public final fun getPendingTransactionsForPrepaidPlansEnabled ()Ljava/lang/Boolean;
public final fun getPurchasesAreCompletedBy ()Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy;
public final fun getShowInAppMessagesAutomatically ()Z
public final fun getStore ()Lcom/revenuecat/purchases/kmp/Store;
public final fun getStore ()Lcom/revenuecat/purchases/kmp/models/Store;
public final fun getStoreKitVersion ()Lcom/revenuecat/purchases/kmp/models/StoreKitVersion;
public final fun getUserDefaultsSuiteName ()Ljava/lang/String;
public final fun getVerificationMode ()Lcom/revenuecat/purchases/kmp/models/EntitlementVerificationMode;
Expand All @@ -116,7 +116,7 @@ public final class com/revenuecat/purchases/kmp/PurchasesConfiguration$Builder {
public final fun getPendingTransactionsForPrepaidPlansEnabled ()Ljava/lang/Boolean;
public final fun getPurchasesAreCompletedBy ()Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy;
public final fun getShowInAppMessagesAutomatically ()Z
public final fun getStore ()Lcom/revenuecat/purchases/kmp/Store;
public final fun getStore ()Lcom/revenuecat/purchases/kmp/models/Store;
public final fun getStoreKitVersion ()Lcom/revenuecat/purchases/kmp/models/StoreKitVersion;
public final fun getUserDefaultsSuiteName ()Ljava/lang/String;
public final fun getVerificationMode ()Lcom/revenuecat/purchases/kmp/models/EntitlementVerificationMode;
Expand All @@ -129,12 +129,12 @@ public final class com/revenuecat/purchases/kmp/PurchasesConfiguration$Builder {
public final synthetic fun setPendingTransactionsForPrepaidPlansEnabled (Ljava/lang/Boolean;)V
public final synthetic fun setPurchasesAreCompletedBy (Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy;)V
public final synthetic fun setShowInAppMessagesAutomatically (Z)V
public final synthetic fun setStore (Lcom/revenuecat/purchases/kmp/Store;)V
public final synthetic fun setStore (Lcom/revenuecat/purchases/kmp/models/Store;)V
public final synthetic fun setStoreKitVersion (Lcom/revenuecat/purchases/kmp/models/StoreKitVersion;)V
public final synthetic fun setUserDefaultsSuiteName (Ljava/lang/String;)V
public final synthetic fun setVerificationMode (Lcom/revenuecat/purchases/kmp/models/EntitlementVerificationMode;)V
public final fun showInAppMessagesAutomatically (Z)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder;
public final fun store (Lcom/revenuecat/purchases/kmp/Store;)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder;
public final fun store (Lcom/revenuecat/purchases/kmp/models/Store;)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder;
public final fun storeKitVersion (Lcom/revenuecat/purchases/kmp/models/StoreKitVersion;)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder;
public final fun userDefaultsSuiteName (Ljava/lang/String;)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder;
public final fun verificationMode (Lcom/revenuecat/purchases/kmp/models/EntitlementVerificationMode;)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder;
Expand Down Expand Up @@ -173,14 +173,14 @@ public final class com/revenuecat/purchases/kmp/ktx/CoroutinesKt {
}

public final class com/revenuecat/purchases/kmp/ktx/SuccessfulLogin {
public fun <init> (Lcom/revenuecat/purchases/kmp/CustomerInfo;Z)V
public fun <init> (Lcom/revenuecat/purchases/kmp/models/CustomerInfo;Z)V
public final fun getCreated ()Z
public final fun getCustomerInfo ()Lcom/revenuecat/purchases/kmp/CustomerInfo;
public final fun getCustomerInfo ()Lcom/revenuecat/purchases/kmp/models/CustomerInfo;
}

public final class com/revenuecat/purchases/kmp/ktx/SuccessfulPurchase {
public fun <init> (Lcom/revenuecat/purchases/kmp/models/StoreTransaction;Lcom/revenuecat/purchases/kmp/CustomerInfo;)V
public final fun getCustomerInfo ()Lcom/revenuecat/purchases/kmp/CustomerInfo;
public fun <init> (Lcom/revenuecat/purchases/kmp/models/StoreTransaction;Lcom/revenuecat/purchases/kmp/models/CustomerInfo;)V
public final fun getCustomerInfo ()Lcom/revenuecat/purchases/kmp/models/CustomerInfo;
public final fun getStoreTransaction ()Lcom/revenuecat/purchases/kmp/models/StoreTransaction;
}

Loading

0 comments on commit 0df65a6

Please sign in to comment.