Class AN_BillingFlowParams.Builder
Helps to construct AN_BillingFlowParams that are used to initiate a purchase flow.
Inheritance
Inherited Members
Namespace: SA.Android.Vending.BillingClient
Assembly: cs.temp.dll.dll
Syntax
public class Builder
Methods
Build()
Returns AN_BillingFlowParams reference to initiate a purchase flow.
Declaration
public AN_BillingFlowParams Build()
Returns
Type | Description |
---|---|
AN_BillingFlowParams | AN_BillingFlowParams reference to initiate a purchase flow. |
SetAccountId(String)
Declaration
public void SetAccountId(string accountId)
Parameters
Type | Name | Description |
---|---|---|
System.String | accountId |
SetDeveloperId(String)
Declaration
public void SetDeveloperId(string developerId)
Parameters
Type | Name | Description |
---|---|---|
System.String | developerId |
SetObfuscatedAccountId(String)
Specify an optional obfuscated string that is uniquely associated with the user's account in your app.
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:
- To buy in-app item
- To create a new subscription
- To replace an old subscription
Declaration
public void SetObfuscatedAccountId(string accountId)
Parameters
Type | Name | Description |
---|---|---|
System.String | accountId | Account id |
SetObfuscatedProfileId(String)
Specifies an optional obfuscated string that is uniquely associated with the user's profile in your app.
Some applications allow users to have multiple profiles within a single account. Use this method to send the user's profile identifier to Google. Setting this field requests the user's obfuscated account id to be pass via SetObfuscatedAccountId(String)
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 this field to store any Personally Identifiable Information (PII) such as emails in cleartext. Attempting to store PII in this field will result in purchases being blocked. Google Play recommends that you use either encryption or a one-way hash to generate an obfuscated identifier to send to Google Play.
You can also retrieve this identifier via the AN_Purchase object.
This identifier is limited to 64 characters.
Optional:
- To buy in-app item
- To create a new subscription
- To replace an old subscription
Declaration
public void SetObfuscatedProfileId(string obfuscatedProfileId)
Parameters
Type | Name | Description |
---|---|---|
System.String | obfuscatedProfileId | Obfuscated ProfileId. |
SetOldSku(String, String)
Specifies the SKU and purchase token that the user is upgrading or downgrading from. This will disambiguate situations where multiple accounts on the device own the same SKU.
Mandatory:
- To replace an old subscription
Declaration
public void SetOldSku(string oldSku, string purchaseToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldSku | Old Sku. |
System.String | purchaseToken | Purchase Token. |
SetReplaceSkusProrationMode(AN_BillingFlowParams.ProrationMode)
Specifies the mode of proration during subscription upgrade/downgrade. This value will only be effective if oldSkus is set.
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:
- To buy in-app item
- To create a new subscription
- To replace an old subscription
Declaration
public void SetReplaceSkusProrationMode(AN_BillingFlowParams.ProrationMode replaceSkusProrationMode)
Parameters
Type | Name | Description |
---|---|---|
AN_BillingFlowParams.ProrationMode | replaceSkusProrationMode | Proration Mode. |
SetSkuDetails(AN_SkuDetails)
Specify the AN_SkuDetails SkuDetails of the item being purchase.
Mandatory:
- To buy in-app item
- To create a new subscription
- To replace an old subscription
Declaration
public void SetSkuDetails(AN_SkuDetails skuDetails)
Parameters
Type | Name | Description |
---|---|---|
AN_SkuDetails | skuDetails | Sku Details. |
SetVrPurchaseFlow(Boolean)
Specify an optional flag indicating whether you wish to launch a VR purchase flow.
Optional:
- To buy in-app item
- To create a new subscription
- To replace an old subscription
Declaration
public void SetVrPurchaseFlow(bool isVrPurchaseFlow)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isVrPurchaseFlow | isVrPurchaseFlow. |