public static class BillingFlowParams.Builder extends Object
BillingFlowParams that are used to initiate a purchase flow.| Modifier and Type | Method and Description |
|---|---|
BillingFlowParams.Builder |
addOldSku(String oldSku)
Deprecated.
|
BillingFlowParams |
build()
Returns
BillingFlowParams reference to initiate a purchase flow. |
BillingFlowParams.Builder |
setAccountId(String accountId)
Specify an optional obfuscated string that is uniquely associated with the user's account in
your app.
|
BillingFlowParams.Builder |
setOldSku(String oldSku)
Specify the SKU that the user is upgrading or downgrading from.
|
BillingFlowParams.Builder |
setOldSkus(ArrayList<String> oldSkus)
Deprecated.
Use
setOldSku(java.lang.String) instead. |
BillingFlowParams.Builder |
setReplaceSkusProrationMode(int replaceSkusProrationMode)
Specifies the mode of proration during subscription upgrade/downgrade.
|
BillingFlowParams.Builder |
setSku(String sku)
Deprecated.
Use
setSkuDetails(SkuDetails) instead |
BillingFlowParams.Builder |
setSkuDetails(SkuDetails skuDetails)
Specify the SkuDetails
SkuDetails of the item being purchase. |
BillingFlowParams.Builder |
setType(String type)
Deprecated.
Use
setSkuDetails(SkuDetails) instead |
BillingFlowParams.Builder |
setVrPurchaseFlow(boolean isVrPurchaseFlow)
Specify an optional flag indicating whether you wish to launch a VR purchase flow.
|
@Deprecated public BillingFlowParams.Builder setSku(String sku)
setSkuDetails(SkuDetails) instead@Deprecated public BillingFlowParams.Builder setType(String type)
setSkuDetails(SkuDetails) insteadBillingClient.SkuType of the item being purchased.public BillingFlowParams.Builder setSkuDetails(SkuDetails skuDetails)
SkuDetails of the item being purchase.
Mandatory:
@Deprecated public BillingFlowParams.Builder setOldSkus(ArrayList<String> oldSkus)
setOldSku(java.lang.String) instead.Mandatory:
public BillingFlowParams.Builder setOldSku(String oldSku)
Mandatory:
@Deprecated public BillingFlowParams.Builder addOldSku(String oldSku)
Mandatory:
public BillingFlowParams.Builder setReplaceSkusProrationMode(int replaceSkusProrationMode)
If you set this to NO_PRORATION, the user does not receive credit or charge, and the recurrence date does not change.
If you set this to PRORATE_BY_TIME, Google Play swaps out the old SKUs and credits the user with the unused value of their subscription time on a pro-rated basis. Google Play applies this credit to the new subscription, and does not begin billing the user for the new subscription until after the credit is used up.
If you set this to PRORATE_BY_PRICE, Google Play swaps out the old SKUs and keeps the recurrence date not changed. User will be charged for the price differences to cover the time till next recurrence date.
Optional:
public BillingFlowParams.Builder setAccountId(String accountId)
If you pass this value, Google Play can use it to detect irregular activity, such as many devices making purchases on the same account in a short period of time. Do not use the developer ID or the user's Google ID for this field. In addition, this field should not contain the user's ID in cleartext. We recommend that you use a one-way hash to generate a string from the user's ID and store the hashed string in this field.
Optional:
public BillingFlowParams.Builder setVrPurchaseFlow(boolean isVrPurchaseFlow)
Optional:
public BillingFlowParams build()
BillingFlowParams reference to initiate a purchase flow.