Reference documentation and code samples for the Google Shopping Merchant Products V1 Client class ProductWeight.
The weight of the product.
Generated from protobuf message google.shopping.merchant.products.v1.ProductWeight
Namespace
Google \ Shopping \ Merchant \ Products \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ value |
float
Required. The weight represented as a number. The weight can have a maximum precision of four decimal places. |
↳ unit |
string
Required. The weight unit. Acceptable values are: * * " |
getValue
Required. The weight represented as a number. The weight can have a maximum precision of four decimal places.
| Returns | |
|---|---|
| Type | Description |
float |
|
setValue
Required. The weight represented as a number. The weight can have a maximum precision of four decimal places.
| Parameter | |
|---|---|
| Name | Description |
var |
float
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUnit
Required. The weight unit.
Acceptable values are:
- "
g" - "
kg" - "
oz" - "
lb"
| Returns | |
|---|---|
| Type | Description |
string |
|
setUnit
Required. The weight unit.
Acceptable values are:
- "
g" - "
kg" - "
oz" - "
lb"
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|