Google Shopping Merchant Products V1 Client - Class CarrierShipping (1.2.0)

Reference documentation and code samples for the Google Shopping Merchant Products V1 Client class CarrierShipping.

Carrier-based shipping configuration. Allows for setting shipping speed or shipping cost based on a carrier's provided info.

Generated from protobuf message google.shopping.merchant.products.v1.ProductAttributes.CarrierShipping

Namespace

Google \ Shopping \ Merchant \ Products \ V1 \ ProductAttributes

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ country string

The CLDR territory code of the country to which an item will ship.

↳ region string

The geographic region to which a shipping rate applies. See region for more information.

↳ postal_code string

The postal code range that the shipping rate applies to, represented by a postal code (eg. 94043), a postal code prefix followed by a * wildcard (eg. 94*), a range between two postal codes (eg. 94043-98033) or two postal code prefixes of equal length (eg. 94*-98*).

↳ origin_postal_code string

The source location postal code from which this offer ships. Represented only by a full-length postal code.

↳ flat_price Google\Shopping\Type\Price

Fixed shipping price, represented as a number with currency. Cannot be set together with carrierPrice or its adjustments (carrierPriceFlatAdjustment, carrierPricePercentageAdjustment).

↳ carrier_price int

Selected carrier to calculate the shipping price from. Select a carrier from the available carriers list, for example AUSTRALIA_POST_REGULAR. Price will be calculated by this selected carrier, the location expressed in originPostalCode, along with the user location to determine the accurate shipping price. Carrier is represented by a carrier service name or a carrier service ID. Cannot be set together with flatPrice.

↳ carrier_price_flat_adjustment Google\Shopping\Type\Price

A flat adjustment on the carrier price. Can be either positive or negative. Cannot be zero. Requires carrier_price to be present. Cannot be set together with flatPrice and carrierPricePercentageAdjustment.

↳ carrier_price_percentage_adjustment float

A percentual adjustment on the carrier price. Can be either positive or negative. Cannot be zero. Requires carrier_price to be present. Cannot be set together with flatPrice and carrierPriceFlatAdjustment.

↳ min_handling_time int|string

Minimum handling time (inclusive) between when the order is received and shipped in business days. 0 means that the order is shipped on the same day as it is received if it happens before the cut-off time. minHandlingTime can only be set if maxHandlingTime is also set.

↳ max_handling_time int|string

Maximum handling time (inclusive) between when the order is received and shipped in business days. 0 means that the order is shipped on the same day as it is received if it happens before the cut-off time. Both maxHandlingTime and fixedMaxTransitTime or carrierTransitTime are required if providing shipping speeds.

↳ fixed_min_transit_time int|string

Minimum transit time (inclusive) between when the order has shipped and when it is delivered in business days. 0 means that the order is delivered on the same day as it ships. fixedMinTransitTime can only be set if fixedMaxTransitTime is set. Cannot be set if carrierTransitTime is present.

↳ fixed_max_transit_time int|string

Maximum transit time (inclusive) between when the order has shipped and when it is delivered in business days. 0 means that the order is delivered on the same day as it ships. Needs to be provided together with maxHandlingTime. Cannot be set if carrierTransitTime is present.

↳ carrier_transit_time int

Selected carrier to calculate the shipping speed from. Select a carrier from the available carriers list, for example AUSTRALIA_POST_REGULAR. Speed will be calculated by this selected carrier, the location expressed in originPostalCode, along with the user location to determine the accurate delivery speed. Carrier is represented by a carrier service name or a carrier service ID. Cannot be set together with fixedMaxTransitTime or fixedMinTransitTime.

getCountry

The CLDR territory code of the country to which an item will ship.

Returns
Type Description
string

hasCountry

clearCountry

setCountry

The CLDR territory code of the country to which an item will ship.

Parameter
Name Description
var string
Returns
Type Description
$this

getRegion

The geographic region to which a shipping rate applies.

See region for more information.

Returns
Type Description
string

hasRegion

clearRegion

setRegion

The geographic region to which a shipping rate applies.

See region for more information.

Parameter
Name Description
var string
Returns
Type Description
$this

getPostalCode

The postal code range that the shipping rate applies to, represented by a postal code (eg. 94043), a postal code prefix followed by a * wildcard (eg. 94*), a range between two postal codes (eg.

94043-98033) or two postal code prefixes of equal length (eg. 94*-98*).

Returns
Type Description
string

hasPostalCode

clearPostalCode

setPostalCode

The postal code range that the shipping rate applies to, represented by a postal code (eg. 94043), a postal code prefix followed by a * wildcard (eg. 94*), a range between two postal codes (eg.

94043-98033) or two postal code prefixes of equal length (eg. 94*-98*).

Parameter
Name Description
var string
Returns
Type Description
$this

getOriginPostalCode

The source location postal code from which this offer ships. Represented only by a full-length postal code.

Returns
Type Description
string

hasOriginPostalCode

clearOriginPostalCode

setOriginPostalCode

The source location postal code from which this offer ships. Represented only by a full-length postal code.

Parameter
Name Description
var string
Returns
Type Description
$this

getFlatPrice

Fixed shipping price, represented as a number with currency. Cannot be set together with carrierPrice or its adjustments (carrierPriceFlatAdjustment, carrierPricePercentageAdjustment).

Returns
Type Description
Google\Shopping\Type\Price|null

hasFlatPrice

clearFlatPrice

setFlatPrice

Fixed shipping price, represented as a number with currency. Cannot be set together with carrierPrice or its adjustments (carrierPriceFlatAdjustment, carrierPricePercentageAdjustment).

Parameter
Name Description
var Google\Shopping\Type\Price
Returns
Type Description
$this

getCarrierPrice

Selected carrier to calculate the shipping price from. Select a carrier from the available carriers list, for example AUSTRALIA_POST_REGULAR. Price will be calculated by this selected carrier, the location expressed in originPostalCode, along with the user location to determine the accurate shipping price.

Carrier is represented by a carrier service name or a carrier service ID. Cannot be set together with flatPrice.

Returns
Type Description
int

hasCarrierPrice

clearCarrierPrice

setCarrierPrice

Selected carrier to calculate the shipping price from. Select a carrier from the available carriers list, for example AUSTRALIA_POST_REGULAR. Price will be calculated by this selected carrier, the location expressed in originPostalCode, along with the user location to determine the accurate shipping price.

Carrier is represented by a carrier service name or a carrier service ID. Cannot be set together with flatPrice.

Parameter
Name Description
var int
Returns
Type Description
$this

getCarrierPriceFlatAdjustment

A flat adjustment on the carrier price. Can be either positive or negative. Cannot be zero. Requires carrier_price to be present. Cannot be set together with flatPrice and carrierPricePercentageAdjustment.

Returns
Type Description
Google\Shopping\Type\Price|null

hasCarrierPriceFlatAdjustment

clearCarrierPriceFlatAdjustment

setCarrierPriceFlatAdjustment

A flat adjustment on the carrier price. Can be either positive or negative. Cannot be zero. Requires carrier_price to be present. Cannot be set together with flatPrice and carrierPricePercentageAdjustment.

Parameter
Name Description
var Google\Shopping\Type\Price
Returns
Type Description
$this

getCarrierPricePercentageAdjustment

A percentual adjustment on the carrier price. Can be either positive or negative. Cannot be zero. Requires carrier_price to be present. Cannot be set together with flatPrice and carrierPriceFlatAdjustment.

Returns
Type Description
float

hasCarrierPricePercentageAdjustment

clearCarrierPricePercentageAdjustment

setCarrierPricePercentageAdjustment

A percentual adjustment on the carrier price. Can be either positive or negative. Cannot be zero. Requires carrier_price to be present. Cannot be set together with flatPrice and carrierPriceFlatAdjustment.

Parameter
Name Description
var float
Returns
Type Description
$this

getMinHandlingTime

Minimum handling time (inclusive) between when the order is received and shipped in business days. 0 means that the order is shipped on the same day as it is received if it happens before the cut-off time.

minHandlingTime can only be set if maxHandlingTime is also set.

Returns
Type Description
int|string

hasMinHandlingTime

clearMinHandlingTime

setMinHandlingTime

Minimum handling time (inclusive) between when the order is received and shipped in business days. 0 means that the order is shipped on the same day as it is received if it happens before the cut-off time.

minHandlingTime can only be set if maxHandlingTime is also set.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getMaxHandlingTime

Maximum handling time (inclusive) between when the order is received and shipped in business days. 0 means that the order is shipped on the same day as it is received if it happens before the cut-off time. Both maxHandlingTime and fixedMaxTransitTime or carrierTransitTime are required if providing shipping speeds.

Returns
Type Description
int|string

hasMaxHandlingTime

clearMaxHandlingTime

setMaxHandlingTime

Maximum handling time (inclusive) between when the order is received and shipped in business days. 0 means that the order is shipped on the same day as it is received if it happens before the cut-off time. Both maxHandlingTime and fixedMaxTransitTime or carrierTransitTime are required if providing shipping speeds.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getFixedMinTransitTime

Minimum transit time (inclusive) between when the order has shipped and when it is delivered in business days. 0 means that the order is delivered on the same day as it ships.

fixedMinTransitTime can only be set if fixedMaxTransitTime is set. Cannot be set if carrierTransitTime is present.

Returns
Type Description
int|string

hasFixedMinTransitTime

clearFixedMinTransitTime

setFixedMinTransitTime

Minimum transit time (inclusive) between when the order has shipped and when it is delivered in business days. 0 means that the order is delivered on the same day as it ships.

fixedMinTransitTime can only be set if fixedMaxTransitTime is set. Cannot be set if carrierTransitTime is present.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getFixedMaxTransitTime

Maximum transit time (inclusive) between when the order has shipped and when it is delivered in business days. 0 means that the order is delivered on the same day as it ships. Needs to be provided together with maxHandlingTime.

Cannot be set if carrierTransitTime is present.

Returns
Type Description
int|string

hasFixedMaxTransitTime

clearFixedMaxTransitTime

setFixedMaxTransitTime

Maximum transit time (inclusive) between when the order has shipped and when it is delivered in business days. 0 means that the order is delivered on the same day as it ships. Needs to be provided together with maxHandlingTime.

Cannot be set if carrierTransitTime is present.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getCarrierTransitTime

Selected carrier to calculate the shipping speed from. Select a carrier from the available carriers list, for example AUSTRALIA_POST_REGULAR. Speed will be calculated by this selected carrier, the location expressed in originPostalCode, along with the user location to determine the accurate delivery speed.

Carrier is represented by a carrier service name or a carrier service ID. Cannot be set together with fixedMaxTransitTime or fixedMinTransitTime.

Returns
Type Description
int

hasCarrierTransitTime

clearCarrierTransitTime

setCarrierTransitTime

Selected carrier to calculate the shipping speed from. Select a carrier from the available carriers list, for example AUSTRALIA_POST_REGULAR. Speed will be calculated by this selected carrier, the location expressed in originPostalCode, along with the user location to determine the accurate delivery speed.

Carrier is represented by a carrier service name or a carrier service ID. Cannot be set together with fixedMaxTransitTime or fixedMinTransitTime.

Parameter
Name Description
var int
Returns
Type Description
$this