com.yandex.metrica
Class Revenue.Builder
java.lang.Object
com.yandex.metrica.Revenue.Builder
Method Summary
Modifier and Type | Method and Description |
---|---|
Revenue | build()
Creates the
Revenue instance. |
Revenue.Builder | withPayload(java.lang.String payload)
Sets additional information about the purchase.
|
Revenue.Builder | withProductID(java.lang.String productID)
Sets the custom ID of the product purchased.
|
Revenue.Builder | withQuantity(java.lang.Integer quantity)
Sets the quantity of products purchased.
|
Revenue.Builder | withReceipt(Revenue.Receipt receipt)
Sets the receipt information about the purchase.
|
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