Skip to content

Commit

Permalink
made things internal instead of removing them
Browse files Browse the repository at this point in the history
  • Loading branch information
aboedo committed Jul 21, 2023
1 parent da4ab4d commit 1ba8f7d
Showing 1 changed file with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ open class PurchasesConfiguration(builder: Builder) {
val context: Context
val apiKey: String
val appUserID: String
val observerMode: Boolean
internal val observerMode: Boolean
val service: ExecutorService?
internal val store: Store
internal val diagnosticsEnabled: Boolean
val dangerousSettings: DangerousSettings
internal val verificationMode: EntitlementVerificationMode

init {
this.context = builder.context
Expand All @@ -22,6 +23,7 @@ open class PurchasesConfiguration(builder: Builder) {
this.service = builder.service
this.store = builder.store
this.diagnosticsEnabled = builder.diagnosticsEnabled
this.verificationMode = builder.verificationMode
this.dangerousSettings = builder.dangerousSettings
}

Expand All @@ -42,13 +44,33 @@ open class PurchasesConfiguration(builder: Builder) {
@set:JvmSynthetic @get:JvmSynthetic
internal var diagnosticsEnabled: Boolean = false

@set:JvmSynthetic @get:JvmSynthetic
internal var verificationMode: EntitlementVerificationMode = EntitlementVerificationMode.default

@set:JvmSynthetic @get:JvmSynthetic
internal var dangerousSettings: DangerousSettings = DangerousSettings(customEntitlementComputation = true)

fun service(service: ExecutorService) = apply {
this.service = service
}

/**
* Sets the [EntitlementVerificationMode] to perform signature verification of requests to the
* RevenueCat backend.
*
* When changing from [EntitlementVerificationMode.DISABLED] to other modes, the SDK will clear the
* CustomerInfo cache.
* This means users will need to connect to the internet to get their entitlements back.
*
* The result of the verification can be obtained from [EntitlementInfos.verification] or
* [EntitlementInfo.verification].
*
* Default mode is disabled. Please see https://rev.cat/trusted-entitlements for more info.
*/
internal fun entitlementVerificationMode(verificationMode: EntitlementVerificationMode) = apply {
this.verificationMode = verificationMode
}

/**
* Only use a Dangerous Setting if suggested by RevenueCat support team.
*/
Expand Down

0 comments on commit 1ba8f7d

Please sign in to comment.