YMMAdRevenueInfo class

The class contains immutable information about advertising revenue (Ad Revenue).

Use the YMMMutableAdRevenueInfo class to change information about revenue.

The YMMAdRevenueInfo instance should be passed to the AppMetrica server using the reportAdRevenue method of the YMMYandexMetrica class.

Instance methods

init(adRevenue:currency:)

Initializes the instance of the YMMAdRevenueInfo class for sending information about advertising revenue.

init(adRevenue:currency:)

Initializes the instance of the YMMAdRevenueInfo class for sending information about advertising revenue.

Properties

adRevenue

The amount of money received from advertising revenue. Can't be negative.

currency

The currency in which adRevenue is represented. Must be in ISO-4217 format.

adType

Ad type. See the possible values in YMMAdType.

adNetwork

Yandex Advertising Network. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

adUnitID

Ad block ID. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

adUnitName

Ad block name. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

adPlacementID

Ad display location ID. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

adPlacementName

Ad display location name. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

precision

Accuracy. For example: “publisher_defined”, “estimated”. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

payload

Accuracy. For example: “publisher_defined”, “estimated”. Arbitrary payload: Additional information presented as key-value pairs. The maximum size is 30 KB. If the value exceeds this limit, it will be truncated by AppMetrica.

adRevenue

The amount of money received from advertising revenue. Can't be negative.

currency

The currency in which adRevenue is represented. Must be in ISO-4217 format.

adType

Ad type. See the possible values in YMMAdType.

adNetwork

Yandex Advertising Network. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

adUnitID

Ad block ID. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

adUnitName

Ad block name. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

adPlacementID

Ad display location ID. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

adPlacementName

Ad display location name. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

precision

Accuracy. For example: “publisher_defined”, “estimated”. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

payload

Accuracy. For example: “publisher_defined”, “estimated”. Arbitrary payload: Additional information presented as key-value pairs. The maximum size is 30 KB. If the value exceeds this limit, it will be truncated by AppMetrica.

Method descriptions

init(adRevenue:currency:)

init(adRevenue: NSDecimalNumber, currency: String)

Initializes the instance of the YMMAdRevenueInfo class for sending information about advertising revenue.

Parameters:
adRevenue

The amount of money received from advertising revenue. Can't be negative.

currency

The currency in which adRevenue is represented. Must be in ISO-4217 format.

adRevenue

The amount of money received from advertising revenue. Can't be negative.

currency

The currency in which adRevenue is represented. Must be in ISO-4217 format.

Returns:

The YMMAdRevenueInfo class instance.

Property descriptions

adRevenue

var adRevenue: NSDecimalNumber { get }

The amount of money received from advertising revenue. Can't be negative.

currency

var currency: String { get }

The currency in which adRevenue is represented. Must be in ISO-4217 format.

adType

var adType: YMMAdType { get }

Ad type. See possible values in YMMAAdType.

adNetwork

var adNetwork: String { get }

Yandex Advertising Network. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

adUnitID

var adUnitID: String { get }

Ad block ID. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

adUnitName

var adUnitName: String { get }

Ad block name. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

adPlacementID

var adPlacementID: String { get }

Ad display location ID. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

adPlacementName

var adPlacementName: String { get }

Ad display location name. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

precision

var precision: String { get }

Accuracy. For example: “publisher_defined”, “estimated”. The maximum length is 100 characters. If the value exceeds this limit, it will be truncated by AppMetrica.

payload

var payload: [String: String]? { get }

Accuracy. For example: “publisher_defined”, “estimated”. Arbitrary payload: Additional information presented as key-value pairs. The maximum size is 30 KB. If the value exceeds this limit, it will be truncated by AppMetrica.