cloudbilling  v1
Public Member Functions | Static Public Member Functions | List of all members
google_cloudbilling_api::Money Class Reference

#include <money.h>

Inheritance diagram for google_cloudbilling_api::Money:

Public Member Functions

 Money (const Json::Value &storage)
 
 Money (Json::Value *storage)
 
virtual ~Money ()
 
const StringPiece GetTypeName () const
 
bool has_currency_code () const
 
void clear_currency_code ()
 
const StringPiece get_currency_code () const
 
void set_currency_code (const StringPiece &value)
 
bool has_nanos () const
 
void clear_nanos ()
 
int32 get_nanos () const
 
void set_nanos (int32 value)
 
bool has_units () const
 
void clear_units ()
 
int64 get_units () const
 
void set_units (int64 value)
 

Static Public Member Functions

static MoneyNew ()
 

Detailed Description

Represents an amount of money with its currency type.

Constructor & Destructor Documentation

◆ Money() [1/2]

google_cloudbilling_api::Money::Money ( const Json::Value &  storage)
explicit

Standard constructor for an immutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ Money() [2/2]

google_cloudbilling_api::Money::Money ( Json::Value *  storage)
explicit

Standard constructor for a mutable data object instance.

Parameters
[in]storageThe underlying data storage for this instance.

◆ ~Money()

google_cloudbilling_api::Money::~Money ( )
virtual

Standard destructor.

Member Function Documentation

◆ clear_currency_code()

void google_cloudbilling_api::Money::clear_currency_code ( )
inline

Clears the 'currencyCode' attribute.

◆ clear_nanos()

void google_cloudbilling_api::Money::clear_nanos ( )
inline

Clears the 'nanos' attribute.

◆ clear_units()

void google_cloudbilling_api::Money::clear_units ( )
inline

Clears the 'units' attribute.

◆ get_currency_code()

const StringPiece google_cloudbilling_api::Money::get_currency_code ( ) const
inline

Get the value of the 'currencyCode' attribute.

◆ get_nanos()

int32 google_cloudbilling_api::Money::get_nanos ( ) const
inline

Get the value of the 'nanos' attribute.

◆ get_units()

int64 google_cloudbilling_api::Money::get_units ( ) const
inline

Get the value of the 'units' attribute.

◆ GetTypeName()

const StringPiece google_cloudbilling_api::Money::GetTypeName ( ) const
inline

Returns a string denoting the type of this data object.

Returns
google_cloudbilling_api::Money

◆ has_currency_code()

bool google_cloudbilling_api::Money::has_currency_code ( ) const
inline

Determine if the 'currencyCode' attribute was set.

Returns
true if the 'currencyCode' attribute was set.

◆ has_nanos()

bool google_cloudbilling_api::Money::has_nanos ( ) const
inline

Determine if the 'nanos' attribute was set.

Returns
true if the 'nanos' attribute was set.

◆ has_units()

bool google_cloudbilling_api::Money::has_units ( ) const
inline

Determine if the 'units' attribute was set.

Returns
true if the 'units' attribute was set.

◆ New()

Money * google_cloudbilling_api::Money::New ( )
static

Creates a new default instance.

Returns
Ownership is passed back to the caller.

◆ set_currency_code()

void google_cloudbilling_api::Money::set_currency_code ( const StringPiece &  value)
inline

Change the 'currencyCode' attribute.

The 3-letter currency code defined in ISO 4217.

Parameters
[in]valueThe new value.

◆ set_nanos()

void google_cloudbilling_api::Money::set_nanos ( int32  value)
inline

Change the 'nanos' attribute.

Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If units is positive, nanos must be positive or zero. If units is zero, nanos can be positive, zero, or negative. If units is negative, nanos must be negative or zero. For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

Parameters
[in]valueThe new value.

◆ set_units()

void google_cloudbilling_api::Money::set_units ( int64  value)
inline

Change the 'units' attribute.

The whole units of the amount. For example if currencyCode is "USD", then 1 unit is one US dollar.

Parameters
[in]valueThe new value.

The documentation for this class was generated from the following files: