data class BillingFlowParams(val obfuscatedAccountId: String? = null, val obfuscatedProfileId: String? = null, val isOfferPersonalized: Boolean = false, val productDetailsParamsList: List<BillingFlowParams.ProductDetailsParams> = emptyList(), val subscriptionUpdateParams: BillingFlowParams.SubscriptionUpdateParams? = null, val skuDetails: SkuDetails? = null)
BillingFlowParams
(
obfuscatedAccountId
, obfuscatedProfileId
, isOfferPersonalized
, productDetailsParamsList
, subscriptionUpdateParams
, skuDetails
)
|
Signature
constructor(obfuscatedAccountId: String? = null, obfuscatedProfileId: String? = null, isOfferPersonalized: Boolean = false, productDetailsParamsList: List<BillingFlowParams.ProductDetailsParams> = emptyList(), subscriptionUpdateParams: BillingFlowParams.SubscriptionUpdateParams? = null, skuDetails: SkuDetails? = null) Parameters
obfuscatedAccountId:
String?
obfuscatedProfileId:
String?
isOfferPersonalized:
Boolean
productDetailsParamsList:
List
subscriptionUpdateParams:
BillingFlowParams.SubscriptionUpdateParams?
skuDetails:
SkuDetails? Returns |
isOfferPersonalized
: Boolean
[Get] |
Signature
val isOfferPersonalized: Boolean = false |
obfuscatedAccountId
: String?
[Get] |
Signature
val obfuscatedAccountId: String? = null |
obfuscatedProfileId
: String?
[Get] |
Signature
val obfuscatedProfileId: String? = null |
productDetailsParamsList
: List
[Get] |
Signature
val productDetailsParamsList: List<BillingFlowParams.ProductDetailsParams> |
skuDetails
: SkuDetails?
[Get] DeprecatedUse [ProductDetailsParams] instead |
Signature
val skuDetails: SkuDetails? = null |
subscriptionUpdateParams
: BillingFlowParams.SubscriptionUpdateParams?
[Get] |
Signature
val subscriptionUpdateParams: BillingFlowParams.SubscriptionUpdateParams? = null |
EXTRA_PARAM_KEY_ACCOUNT_ID
: String
[Get] |
Signature
const val EXTRA_PARAM_KEY_ACCOUNT_ID: String |
newBuilder
()
|
Signature
fun newBuilder(): BillingFlowParams.Builder Returns
BillingFlowParams.Builder
|
class Builder
build
()
|
Returns BillingFlowParams reference to initiate a purchase flow.
Signature
fun build(): BillingFlowParams Returns |
setIsOfferPersonalized
(
isOfferPersonalized
)
|
Specifies whether the offer is personalized to the buyer.
Signature
fun setIsOfferPersonalized(isOfferPersonalized: Boolean): BillingFlowParams.Builder Parameters
isOfferPersonalized:
Boolean
Returns
BillingFlowParams.Builder
|
setObfuscatedAccountId
(
obfuscatedAccountId
)
|
Specifies an optional obfuscated string that is uniquely associated with the user's account in your app.
Signature
fun setObfuscatedAccountId(obfuscatedAccountId: String): BillingFlowParams.Builder Parameters
obfuscatedAccountId:
String
Returns
BillingFlowParams.Builder
|
setObfuscatedProfileId
(
obfuscatedProfileId
)
|
Specifies an optional obfuscated string that is uniquely associated with the user's profile in your app.
Signature
fun setObfuscatedProfileId(obfuscatedProfileId: String): BillingFlowParams.Builder Parameters
obfuscatedProfileId:
String
Returns
BillingFlowParams.Builder
|
setProductDetailsParamsList
(
productDetailsParamsList
)
|
Specifies the BillingFlowParams.ProductDetailsParams of the items being purchased.
Signature
fun setProductDetailsParamsList(productDetailsParamsList: List<BillingFlowParams.ProductDetailsParams>): BillingFlowParams.Builder Parameters
productDetailsParamsList:
List
Returns
BillingFlowParams.Builder
|
setSkuDetails
(
skuDetails
)
DeprecatedUse [setProductDetailsParamsList] instead. |
Signature
fun setSkuDetails(skuDetails: SkuDetails?): BillingFlowParams.Builder Parameters
skuDetails:
SkuDetails? Returns
BillingFlowParams.Builder
|
setSubscriptionUpdateParams
(
subscriptionUpdateParams
)
|
Params used to upgrade or downgrade a subscription.
Signature
fun setSubscriptionUpdateParams(subscriptionUpdateParams: BillingFlowParams.SubscriptionUpdateParams): BillingFlowParams.Builder Parameters
subscriptionUpdateParams:
BillingFlowParams.SubscriptionUpdateParams
Returns
BillingFlowParams.Builder
|
newBuilder
()
|
Signature
fun newBuilder(): BillingFlowParams.ProductDetailsParams.Builder Returns
BillingFlowParams.ProductDetailsParams.Builder
|
class Builder
build
()
|
Signature
fun build(): BillingFlowParams.ProductDetailsParams Returns
BillingFlowParams.ProductDetailsParams
|
setOfferToken
(
offerToken
)
|
Specifies the identifier of the offer to initiate purchase with. Do not call this method for One-time products.
A subscriptions product may be associated with multiple offers. To identify offers a user is eligible for, call BillingClient.queryProductDetailsAsync, which returns all eligible offers and as part of SubscriptionOfferDetails#getOfferToken. Use this method to specify which offer the user would like to purchase. This method should not be called for One-time products.
Signature
fun setOfferToken(offerToken: String): BillingFlowParams.ProductDetailsParams.Builder Parameters
offerToken:
String
Returns
BillingFlowParams.ProductDetailsParams.Builder
|
setProductDetails
(
productDetails
)
|
Specifies the details of item to be purchased, fetched via BillingClient.queryProductDetailsAsync.
Signature
fun setProductDetails(productDetails: ProductDetails): BillingFlowParams.ProductDetailsParams.Builder Parameters
productDetails:
ProductDetails Returns
BillingFlowParams.ProductDetailsParams.Builder
|
data class ProductDetailsParams(val productDetails: ProductDetails, val offerToken: String? = null)
ProductDetailsParams
(
productDetails
, offerToken
)
|
Signature
constructor(productDetails: ProductDetails, offerToken: String? = null) Parameters
productDetails:
ProductDetails
offerToken:
String?
Returns
BillingFlowParams.ProductDetailsParams
|
offerToken
: String?
[Get] |
Signature
val offerToken: String? = null |
productDetails
: ProductDetails
[Get] |
Signature
val productDetails: ProductDetails |
newBuilder
()
|
Constructs a new BillingFlowParams.SubscriptionUpdateParams.Builder instance.
Signature
fun newBuilder(): BillingFlowParams.SubscriptionUpdateParams.Builder Returns
BillingFlowParams.SubscriptionUpdateParams.Builder
|
class Builder
build
()
|
Signature
fun build(): BillingFlowParams.SubscriptionUpdateParams Returns
BillingFlowParams.SubscriptionUpdateParams
|
setOldPurchaseToken
(
purchaseToken
)
|
Specifies the purchase token that the user is upgrading or downgrading from.
Signature
fun setOldPurchaseToken(purchaseToken: String): BillingFlowParams.SubscriptionUpdateParams.Builder Parameters
purchaseToken:
String
Returns
BillingFlowParams.SubscriptionUpdateParams.Builder
|
setOldSkuPurchaseToken
(
skuPurchaseToken
)
DeprecatedThis is a deprecated API that was removed in Play Billing Library version 6.0.0. Use [setOldPurchaseToken] instead. |
This deprecated API will call set the old purchase token via BillingFlowParams.SubscriptionUpdateParams.Builder.setOldPurchaseToken.
Signature
fun setOldSkuPurchaseToken(skuPurchaseToken: String): BillingFlowParams.SubscriptionUpdateParams.Builder Parameters
skuPurchaseToken:
String
Returns
BillingFlowParams.SubscriptionUpdateParams.Builder
|
setOriginalExternalTransactionId
(
externalTransactionId
)
|
If the originating transaction for the subscription that the user is upgrading or downgrading from was processed via alternative billing, specifies the external transaction id of the originating subscription.
Signature
fun setOriginalExternalTransactionId(externalTransactionId: String): BillingFlowParams.SubscriptionUpdateParams.Builder Parameters
externalTransactionId:
String
Returns
BillingFlowParams.SubscriptionUpdateParams.Builder
|
setReplaceProrationMode
(
prorationMode
)
DeprecatedThis is a deprecated API that was removed in Play Billing Library version 6.0.0. Use [setSubscriptionReplacementMode] instead. |
This deprecated API will set the equivalent BillingFlowParams.SubscriptionUpdateParams.ReplacementMode via BillingFlowParams.SubscriptionUpdateParams.Builder.setSubscriptionReplacementMode. If the proration mode is not supported, it will default to BillingFlowParams.SubscriptionUpdateParams.ReplacementMode.Companion.UNKNOWN_REPLACEMENT_MODE.
Signature
fun setReplaceProrationMode(prorationMode: Int): BillingFlowParams.SubscriptionUpdateParams.Builder Parameters
prorationMode:
Int
Returns
BillingFlowParams.SubscriptionUpdateParams.Builder
|
setReplaceSkusProrationMode
(
prorationMode
)
DeprecatedThis is a deprecated API that was removed in Play Billing Library version 6.0.0. Use [setSubscriptionReplacementMode] instead. |
This deprecated API will set the equivalent BillingFlowParams.SubscriptionUpdateParams.ReplacementMode via BillingFlowParams.SubscriptionUpdateParams.Builder.setSubscriptionReplacementMode. If the proration mode is not supported, it will default to BillingFlowParams.SubscriptionUpdateParams.ReplacementMode.Companion.UNKNOWN_REPLACEMENT_MODE.
Signature
fun setReplaceSkusProrationMode(prorationMode: Int): BillingFlowParams.SubscriptionUpdateParams.Builder Parameters
prorationMode:
Int
Returns
BillingFlowParams.SubscriptionUpdateParams.Builder
|
setSubscriptionReplacementMode
(
subscriptionReplacementMode
)
|
Specifies the ReplacementMode for replacement.
Signature
fun setSubscriptionReplacementMode(subscriptionReplacementMode: Int): BillingFlowParams.SubscriptionUpdateParams.Builder Parameters
subscriptionReplacementMode:
Int
Returns
BillingFlowParams.SubscriptionUpdateParams.Builder
|
annotation class ReplacementMode
ReplacementMode
()
|
Signature
constructor() Returns
BillingFlowParams.SubscriptionUpdateParams.ReplacementMode
|
CHARGE_FULL_PRICE
: Int
[Get] |
The new plan takes effect immediately, and the user is charged full price of new plan and is given a full billing cycle of subscription, plus remaining prorated time from the old plan.
Signature
const val CHARGE_FULL_PRICE: Int = 5 |
CHARGE_PRORATED_PRICE
: Int
[Get] |
The new plan takes effect immediately, and the billing cycle remains the same.
Signature
const val CHARGE_PRORATED_PRICE: Int = 2 |
DEFERRED
: Int
[Get] |
The new purchase takes effect immediately, the new plan will take effect when the old item expires.
Signature
const val DEFERRED: Int = 6 |
UNKNOWN_REPLACEMENT_MODE
: Int
[Get] |
Signature
const val UNKNOWN_REPLACEMENT_MODE: Int = 0 |
WITH_TIME_PRORATION
: Int
[Get] |
Signature
const val WITH_TIME_PRORATION: Int = 1 |
WITHOUT_PRORATION
: Int
[Get] |
The new plan takes effect immediately, and the new price will be charged on next recurrence time.
Signature
const val WITHOUT_PRORATION: Int = 3 |
class SubscriptionUpdateParams(oldPurchaseToken: String? = null, externalTransactionId: String? = null, subscriptionReplacementMode: Int? = null)
SubscriptionUpdateParams
(
oldPurchaseToken
, externalTransactionId
, subscriptionReplacementMode
)
|
Signature
constructor(oldPurchaseToken: String? = null, externalTransactionId: String? = null, subscriptionReplacementMode: Int? = null) Parameters
oldPurchaseToken:
String?
externalTransactionId:
String?
subscriptionReplacementMode:
Int?
Returns
BillingFlowParams.SubscriptionUpdateParams
|
annotation class ProrationMode
ProrationMode
()
|
Signature
constructor() Returns
BillingFlowParams.ProrationMode
|
DEFERRED
: Int
[Get] |
Replacement takes effect when the old plan expires, and the new price will be charged at the same time.
Signature
const val DEFERRED: Int = 4 |
IMMEDIATE_AND_CHARGE_FULL_PRICE
: Int
[Get] |
Replacement takes effect immediately, and the user is charged full price of new plan and is given a full billing cycle of subscription, plus remaining prorated time from the old plan.
Signature
const val IMMEDIATE_AND_CHARGE_FULL_PRICE: Int = 5 |
IMMEDIATE_AND_CHARGE_PRORATED_PRICE
: Int
[Get] |
Replacement takes effect immediately, and the billing cycle remains the same.
Signature
const val IMMEDIATE_AND_CHARGE_PRORATED_PRICE: Int = 2 |
IMMEDIATE_WITH_TIME_PRORATION
: Int
[Get] |
Replacement takes effect immediately, and the remaining time will be prorated and credited to the user.
Signature
const val IMMEDIATE_WITH_TIME_PRORATION: Int = 1 |
IMMEDIATE_WITHOUT_PRORATION
: Int
[Get] |
Replacement takes effect immediately, and the new price will be charged on next recurrence time.
Signature
const val IMMEDIATE_WITHOUT_PRORATION: Int = 3 |
UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY
: Int
[Get] |
Signature
const val UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY: Int = 0 |