Google Shopping Css V1 Client - Class ProductWeight (0.2.0)

Reference documentation and code samples for the Google Shopping Css V1 Client class ProductWeight.

The weight of the product.

Generated from protobuf message google.shopping.css.v1.ProductWeight

Namespace

Google \ Shopping \ Css \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
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: * "g" * "kg" * "oz" * "lb"

getValue

Required. The weight represented as a number. The weight can have a maximum precision of four decimal places.

Returns
TypeDescription
float

setValue

Required. The weight represented as a number. The weight can have a maximum precision of four decimal places.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getUnit

Required. The weight unit.

Acceptable values are:

  • "g"
  • "kg"
  • "oz"
  • "lb"
Returns
TypeDescription
string

setUnit

Required. The weight unit.

Acceptable values are:

  • "g"
  • "kg"
  • "oz"
  • "lb"
Parameter
NameDescription
var string
Returns
TypeDescription
$this