BillingFlowParams.ProductDetailsParams.Builder
public
static
class
BillingFlowParams.ProductDetailsParams.Builder
extends Object
java.lang.Object | |
↳ | com.android.billingclient.api.BillingFlowParams.ProductDetailsParams.Builder |
Helps to construct a BillingFlowParams.ProductDetailsParams
.
Summary
Public methods | |
---|---|
BillingFlowParams.ProductDetailsParams
|
build()
Construct a |
BillingFlowParams.ProductDetailsParams.Builder
|
setOfferToken(String offerToken)
Specifies the identifier of the offer to initiate purchase with. |
BillingFlowParams.ProductDetailsParams.Builder
|
setProductDetails(ProductDetails productDetails)
Specifies the details of item to be purchased, fetched via |
Inherited methods | |
---|---|
Public methods
build
public BillingFlowParams.ProductDetailsParams build ()
Construct a BillingFlowParams.ProductDetailsParams
.
Returns | |
---|---|
BillingFlowParams.ProductDetailsParams |
setOfferToken
public BillingFlowParams.ProductDetailsParams.Builder setOfferToken (String offerToken)
Specifies the identifier of the offer to initiate purchase with.
A subscriptions product may be associated with multiple offers. To identify offers a
user is eligible for, call BillingClient.queryProductDetailsAsync(QueryProductDetailsParams, ProductDetailsResponseListener)
, which returns
all eligible offers and as part of ProductDetails.SubscriptionOfferDetails.getOfferToken()
. Use this
method to specify which offer the user would like to purchase. Calling this method is not
needed for One-time products.
Parameters | |
---|---|
offerToken |
String |
Returns | |
---|---|
BillingFlowParams.ProductDetailsParams.Builder |
setProductDetails
public BillingFlowParams.ProductDetailsParams.Builder setProductDetails (ProductDetails productDetails)
Specifies the details of item to be purchased, fetched via BillingClient.queryProductDetailsAsync(QueryProductDetailsParams, ProductDetailsResponseListener)
.
Parameters | |
---|---|
productDetails |
ProductDetails |
Returns | |
---|---|
BillingFlowParams.ProductDetailsParams.Builder |