AMARevenueInfo class
The class contains immutable information about the revenue from in-app purchases.
Use the AMAMutableRevenueInfo class to change information about revenue.
The instance of the AMARevenueInfo
class should be sent to the AppMetrica server using the reportRevenue method of the AMAAppMetrica class.
Instance methods
Initializes the instance of the |
|
-initWithPriceDecimal:currency:quantity:productID:transactionID:receiptData:payload: |
Initializes the instance of the |
Properties
Currency code of the purchase in ISO 4217 format. |
|
Additional information to be passed about the purchase. |
|
The price that is set using the NSDecimalNumber instance. It can be negative, e.g. for refunds. |
|
ID of the product purchased. The value can contain up to 200 characters. |
|
Quantity of products purchased. |
|
Details about the in-app purchase order from App Store. |
|
Details about the in-app purchase order from App Store. |
Method descriptions
-initWithPriceDecimal:currency:
- (instancetype)initWithPriceDecimal:(NSDecimalNumber *)priceDecimal currency:(NSString *)currency
Initializes the instance of the AMARevenueInfo
class for sending information about purchases.
Parameters:
|
The price that is set using the NSDecimalNumber instance. It can be negative, e.g. for refunds. |
|
Currency code of the purchase in ISO 4217 format. The value should contain 3 Latin letters in uppercase. Example: Note If the value is not in the ISO 4217 format, the purchase is ignored. |
Returns:
The AMARevenueInfo
class instance.
‑initWithPriceDecimal:currency:quantity:productID:transactionID:receiptData:payload:
- (instancetype)initWithPriceDecimal:(NSDecimalNumber *)priceDecimal
currency:(NSString *)currency
quantity:(NSUInteger)quantity
productID:(NSString *)productID
transactionID:(NSString *)transactionID
receiptData:(NSData *)receiptData
payload:(NSDictionary *)payload
Initializes the instance of the AMARevenueInfo
class for sending information about purchases.
Parameters:
|
The price that is set using the NSDecimalNumber instance. It can be negative, e.g. for refunds. |
|
Currency code of the purchase in ISO 4217 format. The value should contain 3 Latin letters in uppercase. Example: Note If the value is not in the ISO 4217 format, the purchase is ignored. |
|
Quantity of products purchased. |
|
ID of the product purchased. The value can contain up to 200 characters. |
|
Details about the in-app purchase order from App Store. |
|
Details about the in-app purchase order from App Store. |
|
Additional information to be passed about the purchase. |
Returns:
The AMARevenueInfo
class instance.
Property descriptions
currency
(nonatomic, copy, readonly) NSString *currency
Currency code of the purchase in ISO 4217 format.
payload
(nonatomic, copy, readonly) NSDictionary *payload
Additional information to be passed about the purchase.
priceDecimal
(nonatomic, assign, readonly) NSDecimalNumber *priceDecimal
The price that is set using the NSDecimalNumber instance. It can be negative, e.g. for refunds.
productID
(nonatomic, copy, readonly) NSString *productID
ID of the product purchased. The value can contain up to 200 characters.
quantity
(nonatomic, assign, readonly) NSUInteger quantity
Quantity of products purchased.
receiptData
(nonatomic, copy, readonly) NSData *receiptData
Details about the in-app purchase order from App Store.
transactionID
(nonatomic, copy, reaоdonly) NSString *transactionID
Details about the in-app purchase order from App Store.