Package io.appmetrica.analytics
Class Revenue.Builder
java.lang.Object
io.appmetrica.analytics.Revenue.Builder
- Enclosing class:
- Revenue
Builder class for
Revenue
objects.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates theRevenue
instance.withPayload
(String payload) Sets additional information about the purchase.withProductID
(String productID) Sets the custom ID of the product purchased.withQuantity
(Integer quantity) Sets the quantity of products purchased.withReceipt
(Revenue.Receipt receipt) Sets the receipt information about the purchase.
-
Method Details
-
withQuantity
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:
-
withProductID
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:
-
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.Builder
object - See Also:
-
withReceipt
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:
-
build
Creates theRevenue
instance.- Returns:
- The
Revenue
object
-