-
Notifications
You must be signed in to change notification settings - Fork 7
Customer API #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Customer API #285
Conversation
ad0b67d to
865f9e4
Compare
865f9e4 to
12b366e
Compare
| val entitlements: List<Entitlement>, | ||
| /** Internally set to `true` on first ever load of CustomerInfo. */ | ||
| @SerialName("isBlank") | ||
| internal val isBlank: Boolean = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed this to isPlaceholder to be more accurate, with an updated comment:
/// Indicates whether this is a placeholder CustomerInfo that hasn't been populated with real data yet.
///truemeans this is the initial placeholder state before data has been loaded.
///falsemeans real data has been loaded (even if that data is empty).
| @SerialName("type") | ||
| val type: Type = Type.SERVICE_LEVEL, | ||
| /** | ||
| *Added on device after retrieving from server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should relate to all the variables below this point, not just isActive
| * | ||
| * If one or more lifetime products unlock this entitlement, the `latestProductId` will always be the product identifier of the first lifetime product. | ||
| * | ||
| * This is `null` if there aren't any transactions that unlock this entitlement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "or if it was manually granted from Superwall."
| /** | ||
| * Indicates whether the last subscription transaction associated with this entitlement will auto renew. | ||
| * | ||
| * This is `null` if there aren't any transactions that unlock this entitlement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" or if it was manually granted from Superwall."
| * The state of the last subscription transaction associated with the | ||
| * entitlement. | ||
| * | ||
| * This is `null` if there aren't any transactions that unlock this entitlement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" or if it was manually granted from Superwall."
superwall/src/main/java/com/superwall/sdk/models/entitlements/Entitlement.kt
Outdated
Show resolved
Hide resolved
| * Indicates whether the last subscription transaction associated with this | ||
| * entitlement was revoked. | ||
| * | ||
| * This is `null` if there aren't any transactions that unlock this entitlement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or if it was manually granted from Superwall.
12b366e to
8a50ea6
Compare
| * Indicates whether the last subscription transaction associated with this | ||
| * entitlement is in a billing grace period state. | ||
| * | ||
| * This is `null` if there aren't any transactions that unlock this entitlement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or if it was manually granted from Superwall.
| @Serializable | ||
| data class WebEntitlements( | ||
| @SerialName("entitlements") | ||
| val entitlements: List<Entitlement>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the EntitlementsResponse equiv? If so we only need the customerInfo now, not these entitlements
| @SerialName("codes") | ||
| val codes: List<RedemptionResult>, | ||
| @SerialName("entitlements") | ||
| val entitlements: List<Entitlement>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need these now
|
|
||
| // StoreProductType interface implementations | ||
| override val productType: String | ||
| get() = "stripe" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't figure out how this is used, just leaving a comment to double check that this shouldn't be in caps
| .let { | ||
| if (factory.makeSuperwallOptions().enableExperimentalDeviceVariables) { | ||
| it.plus(latestExperimentalDeviceProperties()) | ||
| } else { | ||
| it | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep experimental device properties for those that are using them
| override val key: String | ||
| get() = "store.latestCustomerInfo" | ||
| override val directory: SearchPathDirectory | ||
| get() = SearchPathDirectory.APP_SPECIFIC_DOCUMENTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a user specific document, not app specific
| override val key: String | ||
| get() = "store.latestDeviceCustomerInfo" | ||
| override val directory: SearchPathDirectory | ||
| get() = SearchPathDirectory.APP_SPECIFIC_DOCUMENTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's user specific not app specific
…ensure it merges with web
e60040c to
bafe1b4
Compare
Changes in this pull request
Checklist
CHANGELOG.mdfor any breaking changes, enhancements, or bug fixes.ktlintin the main directory and fixed any issues.