Stay organized with collections
Save and categorize content based on your preferences.
firebase::
gma::
AdValue
#include <types.h>
The monetary value earned from an ad.
Summary
Constructors and Destructors
AdValue
(const char *currency_code, PrecisionType
precision_type, int64_t value_micros)
Constructor.
const std::string &
The value's ISO 4217 currency code.
The precision of the reported ad value.
int64_t
The ad's value in micro-units, where 1,000,000 micro-units equal one unit of the currency.
Public types
PrecisionType
PrecisionType
Allowed constants for precision_type()
.
An ad value estimated from aggregated data.
The precise value paid for this ad.
A publisher-provided ad value, such as manual CPMs in a mediation group.
An ad value with unknown precision.
Public functions
AdValue
AdValue
(
const
char
*
currency_code
,
PrecisionType
precision_type
,
int64_t
value_micros
)
currency_code
const
std
::
string
&
currency_code
()
const
The value's ISO 4217 currency code.
precision_type
PrecisionType
precision_type
()
const
The precision of the reported ad value.
value_micros
int64_t
value_micros
()
const
The ad's value in micro-units, where 1,000,000 micro-units equal one unit of the currency.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],["The `firebase::gma::AdValue` class represents the monetary value of an ad. It can be constructed using a currency code, precision type, and value in micro-units. Key functions include retrieving the currency code (`currency_code()`), the precision of the ad value (`precision_type()`), and the value itself in micro-units (`value_micros()`). `PrecisionType` enum defines levels of precision: unknown, estimated, publisher-provided, or precise, indicating how the ad value was determined.\n"]]