Enclosing class:
Revenue


public static class Revenue.Builder
extends java.lang.Object
Builder class for Revenue objects.

Method Summary

All Methods
Instance Methods
Concrete Methods
Modifier and TypeMethod and Description
Revenuebuild()
Creates the Revenue instance.
Revenue.BuilderwithPayload(java.lang.String payload)
Sets additional information about the purchase.
Revenue.BuilderwithProductID(java.lang.String productID)
Sets the custom ID of the product purchased.
Revenue.BuilderwithQuantity(java.lang.Integer quantity)
Sets the quantity of products purchased.
Revenue.BuilderwithReceipt(Revenue.Receipt receipt)
Sets the receipt information about the purchase.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

withQuantity

@NonNull
public Revenue.Builder withQuantity(@Nullable
                                             java.lang.Integer quantity)
Sets the quantity of products purchased.

It is an optional value.

Parameters:
quantity - Quantity of products purchased
Returns:
The same Revenue.Builder object
See Also:
Revenue.quantity

withProductID

@NonNull
public Revenue.Builder withProductID(@Nullable
                                              java.lang.String productID)
Sets the custom ID of the product purchased.

It is an optional value.

Parameters:
productID - ID of the product
Returns:
The Revenue.Builder object
See Also:
Revenue.productID

withPayload

@NonNull
public Revenue.Builder withPayload(@Nullable
                                            java.lang.String payload)
Sets additional information about the purchase.
Parameters:
payload - Additional info to be passed about the purchase. It should contain the valid JSON string
Returns:
The same Revenue.Builder object
See Also:
Revenue.payload

withReceipt

@NonNull
public Revenue.Builder withReceipt(@Nullable
                                            Revenue.Receipt receipt)
Sets the receipt information about the purchase.

Used only for in-app purchases.

Parameters:
receipt - Purchase receipt data
Returns:
The same Revenue.Builder object
See Also:
Revenue.receipt, Revenue.Receipt

build

@NonNull
public Revenue build()
Creates the Revenue instance.
Returns:
The Revenue object