Reference documentation and code samples for the Google Shopping Common Protos Client class Weight.
The weight represented as the value in string and the unit.
Generated from protobuf message google.shopping.type.Weight
Namespace
Google \ Shopping \ TypeMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ amount_micros |
int|string
Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value. |
↳ unit |
int
Required. The weight unit. Acceptable values are: kg and lb |
getAmountMicros
Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros).
This field can also be set as infinity by setting to -1. This field only support -1 and positive value.
Returns | |
---|---|
Type | Description |
int|string |
hasAmountMicros
clearAmountMicros
setAmountMicros
Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros).
This field can also be set as infinity by setting to -1. This field only support -1 and positive value.
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getUnit
Required. The weight unit.
Acceptable values are: kg and lb
Returns | |
---|---|
Type | Description |
int |
setUnit
Required. The weight unit.
Acceptable values are: kg and lb
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |