Reference documentation and code samples for the Google Shopping Merchant Products V1 Client class Warranty.
The warranty of the vehicle.
Generated from protobuf message google.shopping.merchant.products.v1.ProductAttributes.Warranty
Namespace
Google \ Shopping \ Merchant \ Products \ V1 \ ProductAttributesMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ duration |
int|string
The warranty duration in units. Default is in months, can be overridden by the |
↳ mileage |
Mileage
The warranty mileage (only applies to vehicles). |
↳ duration_unit |
int
The unit for the warranty duration. Assumed to be |
getDuration
The warranty duration in units. Default is in months, can be overridden
by the duration_unit field.
| Returns | |
|---|---|
| Type | Description |
int|string |
|
setDuration
The warranty duration in units. Default is in months, can be overridden
by the duration_unit field.
| Parameter | |
|---|---|
| Name | Description |
var |
int|string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMileage
The warranty mileage (only applies to vehicles).
| Returns | |
|---|---|
| Type | Description |
Mileage|null |
|
hasMileage
clearMileage
setMileage
The warranty mileage (only applies to vehicles).
| Parameter | |
|---|---|
| Name | Description |
var |
Mileage
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDurationUnit
The unit for the warranty duration. Assumed to be MONTH if
equal to WARRANTY_DURATION_UNIT_UNSPECIFIED.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type WarrantyDurationUnit. |
setDurationUnit
The unit for the warranty duration. Assumed to be MONTH if
equal to WARRANTY_DURATION_UNIT_UNSPECIFIED.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type WarrantyDurationUnit. |
| Returns | |
|---|---|
| Type | Description |
$this |
|