Google Shopping Common Protos Client - Class Price (0.2.0)

Reference documentation and code samples for the Google Shopping Common Protos Client class Price.

The price represented as a number and currency.

Generated from protobuf message google.shopping.type.Price

Namespace

Google \ Shopping \ Type

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ amount_micros int|string

The price represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 USD = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value.

↳ currency_code string

The currency of the price using three-letter acronyms according to ISO 4217.

getAmountMicros

The price represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 USD = 1000000 micros).

This field can also be set as infinity by setting to -1. This field only support -1 and positive value.

Returns
TypeDescription
int|string

hasAmountMicros

clearAmountMicros

setAmountMicros

The price represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 USD = 1000000 micros).

This field can also be set as infinity by setting to -1. This field only support -1 and positive value.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getCurrencyCode

The currency of the price using three-letter acronyms according to ISO 4217.

Returns
TypeDescription
string

hasCurrencyCode

clearCurrencyCode

setCurrencyCode

The currency of the price using three-letter acronyms according to ISO 4217.

Parameter
NameDescription
var string
Returns
TypeDescription
$this