YMMMutableRevenueInfo class

The mutable version of the YMMRevenueInfo class with information about purchases.

The instance of the YMMRevenueInfo class should be sent to the AppMetrica server using the reportRevenue method of the YMMYandexMetrica class.

Properties

payload

Additional information to be passed about the purchase. For instance, it can be used for categorizing your products.

productID

ID of the product purchased. The value can contain up to 200 characters.

quantity

Quantity of products purchased.

receiptData

Details about the in-app purchase order from App Store.

transactionID

Information about the in-app purchase order from App Store.

Property descriptions

payload

var payload: [NSObject : AnyObject]!

Additional information to be passed about the purchase. For instance, it can be used for categorizing your products.

It should contain the NSDictionary object that can be converted to valid JSON. The maximum size of the value is 30 KB.

productID

var productID: String!

ID of the product purchased. The value can contain up to 200 characters.

quantity

var quantity: UInt

Quantity of products purchased.

It is used in the following formula:
Revenue = quantity * price.
Note. The value cannot be negative. If the value is equal to 0, the purchase is ignored.

receiptData

var receiptData: NSData!

Details about the in-app purchase order from App Store.

This value should be passed along with transactionID to verify the transaction. Example:
var receiptURL: NSURL? = Bundle.main.appStoreReceiptURL
revenueInfo.receiptData = NSData(contentsOf: receiptURL!)
For more information, see Apple documentation.
Note. It is necessary to get information about the purchase before calling SKPaymentQueue.default().finishTransaction(transaction).

transactionID

var transactionID: String!

Information about the in-app purchase order from App Store.

Must contain the transactionIdentifier value from the SKPaymentTransaction class. For more information, see Apple documentation.

This value should be passed along with receiptData to verify the transaction.