Package com.yandex.metrica
Class Revenue.Builder
java.lang.Object
com.yandex.metrica.Revenue.Builder
- Enclosing class:
- Revenue
public static class Revenue.Builder
extends java.lang.Object
Builder class for
Revenue objects.-
Method Summary
Modifier and Type Method Description Revenuebuild()Creates theRevenueinstance.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 Details
-
withQuantity
Sets the quantity of products purchased.It is an optional value.
- Parameters:
quantity- Quantity of products purchased- Returns:
- The same
Revenue.Builderobject - See Also:
Revenue.quantity
-
withProductID
Sets the custom ID of the product purchased.It is an optional value.
- Parameters:
productID- ID of the product- Returns:
- The
Revenue.Builderobject - See Also:
Revenue.productID
-
withPayload
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.Builderobject - See Also:
Revenue.payload
-
withReceipt
Sets the receipt information about the purchase.Used only for in-app purchases.
- Parameters:
receipt- Purchase receipt data- Returns:
- The same
Revenue.Builderobject - See Also:
Revenue.receipt,Revenue.Receipt
-
build
Creates theRevenueinstance.- Returns:
- The
Revenueobject
-