Essential Kit
Loading...
Searching...
No Matches
BuyProductOptionssealed

Represents options for purchasing a IBillingProduct. More...

Classes

class  Builder
 Builder class for BuyProductOptions. More...
 

Properties

static BuyProductOptions Default = new BuyProductOptions() [get]
 Gets the default BuyProductOptions instance.
 
string Tag = null [get]
 Gets or sets a custom tag to be passed along with the purchase request.
 
int Quantity = 1 [get]
 Gets or sets the quantity to be purchased.
 
BillingProductOfferRedeemDetails OfferRedeemDetails = null [get]
 Gets or sets the offer redeem details for the product offer.
 
IBillingProduct ProductToModify [get]
 Gets the product to upgrade or downgrade from.
 

Detailed Description

This class provides a fluent API for setting up options for a purchase request.

The following code demonstrates how to create an instance of BuyProductOptions with offer redeem details:

var offerRedeemDetails = new BillingProductOfferRedeemDetails.Builder()
.SetIosPlatformProperties("offerId", "keyId", "nonce(uuid)", "signature", 123456)
.SetAndroidPlatformProperties("offerId")
.Build();
var options = new BuyProductOptions.Builder()
.SetTag("your-uuid-v4-tag")
.SetOfferRedeemDetails(offerRedeemDetails)
.Build();
Represents a builder class for BillingProductOfferRedeemDetails.
Definition BillingProductOfferRedeemDetails.cs:125
Builder SetIosPlatformProperties(string offerId, string keyId, string nonce, string signature, long timestamp)
Sets the iOS platform properties for the BillingProductOfferRedeemDetails being built.
Definition BillingProductOfferRedeemDetails.cs:144
Represents details of a product offer to be redeemed.
Definition BillingProductOfferRedeemDetails.cs:18
Builder class for BuyProductOptions.
Definition BuyProductOptions.cs:85
BuyProductOptions Build()
Creates the BuyProductOptions instance.
Definition BuyProductOptions.cs:164
Builder SetTag(string tag)
Sets a custom tag to be passed along with the purchase request.
Definition BuyProductOptions.cs:104
Builder SetOfferRedeemDetails(BillingProductOfferRedeemDetails offerRedeemDetails)
Sets the offer redeem details for the product offer.
Definition BuyProductOptions.cs:136
Builder SetQuantity(int quantity)
Sets the quantity to be purchased.
Definition BuyProductOptions.cs:124
Represents options for purchasing a IBillingProduct.
Definition BuyProductOptions.cs:28

Property Documentation

◆ Default

BuyProductOptions Default = new BuyProductOptions()
staticget

Default options have quantity set to 1 and no custom tag associated.

Referenced by BillingServices.BuyProduct().

◆ Tag

string Tag = null
get

The custom tag associated with the purchase request. Default value is null.

Attention
The tag should be a valid UUID v4 formatted string.
Remarks
This can be used as a filter to identify the purchase requests related to a specific user.

◆ Quantity

int Quantity = 1
get

The quantity to be purchased. Default value is 1.

Must be greater than 0.

Referenced by BuyProductOptions.Builder.Build().

◆ OfferRedeemDetails

BillingProductOfferRedeemDetails OfferRedeemDetails = null
get

The offer redeem details for the product offer. Default value is null.

Use this property to provide the details necessary for redeeming a product offer.

◆ ProductToModify

IBillingProduct ProductToModify
get

The product to upgrade or downgrade from. Default value is null.