# firebase::gma::AdValue


`#include <types.h>`

The monetary value earned from an ad.

## Summary

| ### Constructors and Destructors ||
|---|---|
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1a789e06266ee31e321d3a8f54956577c5(const char *currency_code, https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1a7301e2b32526050dc930f6d5bde08eb3 precision_type, int64_t value_micros)` Constructor. ||

| ### Public types ||
|---|---|
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1a7301e2b32526050dc930f6d5bde08eb3{ https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1a7301e2b32526050dc930f6d5bde08eb3a8679de42c2ea6f9e7a4cd6cfa620b36d = 0, https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1a7301e2b32526050dc930f6d5bde08eb3ae2f618e55fec703f67dd951f752981db, https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1a7301e2b32526050dc930f6d5bde08eb3a40b071491590e2bdd32f46d84366e2ca = 2, https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1a7301e2b32526050dc930f6d5bde08eb3ab45bb6e6588b185181b5c53dc41db2fc = 3 }` | enumAllowed constants for [precision_type()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1aebe0538d85150d7b9dfb4d63dd0f861a). |

| ### Public functions ||
|---|---|
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1a68b9bf19da42414f2211a2d5ceea9c32() const ` | `const std::string &` The value's ISO 4217 currency code. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1aebe0538d85150d7b9dfb4d63dd0f861a() const ` | `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1a7301e2b32526050dc930f6d5bde08eb3` The precision of the reported ad value. |
| `https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1ab8a25dbfbc2ffa5be036ce7636337b60() const ` | `int64_t` The ad's value in micro-units, where 1,000,000 micro-units equal one unit of the currency. |

## Public types

### PrecisionType

```c++
 PrecisionType
```
Allowed constants for [precision_type()](https://developers.google.com/admob/cpp/reference/class/firebase/gma/ad-value#classfirebase_1_1gma_1_1_ad_value_1aebe0538d85150d7b9dfb4d63dd0f861a).

| Properties ||
|---|---|
| `kAdValuePrecisionEstimated` | An ad value estimated from aggregated data. |
| `kAdValuePrecisionPrecise` | The precise value paid for this ad. |
| `kAdValuePrecisionPublisherProvided` | A publisher-provided ad value, such as manual CPMs in a mediation group. |
| `kAdValuePrecisionUnknown` | An ad value with unknown precision. |

## Public functions

### AdValue

```c++
 AdValue(
  const char *currency_code,
  PrecisionType precision_type,
  int64_t value_micros
)
```
Constructor.

### currency_code

```c++
const std::string & currency_code() const 
```
The value's ISO 4217 currency code.

### precision_type

```c++
PrecisionType precision_type() const 
```
The precision of the reported ad value.

### value_micros

```c++
int64_t value_micros() const 
```
The ad's value in micro-units, where 1,000,000 micro-units equal one unit of the currency.