Google Shopping Merchant Accounts V1 Client - Class CarrierRate (1.0.0)

Reference documentation and code samples for the Google Shopping Merchant Accounts V1 Client class CarrierRate.

A list of carrier rates that can be referred to by main_table or single_value .

Supported carrier services are defined in https://support.google.com/merchants/answer/12577710?ref_topic=12570808&sjid=10662598224319463032-NC#zippy=%2Cdelivery-cost-rate-type%2Ccarrier-rate-au-de-uk-and-us-only .

Generated from protobuf message google.shopping.merchant.accounts.v1.CarrierRate

Namespace

Google \ Shopping \ Merchant \ Accounts \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ name
string

Required. Name of the carrier rate. Must be unique per rate group.

↳ carrier
string

Required. Carrier service, such as "UPS" or "Fedex" .

↳ carrier_service
string

Required. Carrier service, such as "ground" or "2 days" .

↳ origin_postal_code
string

Required. Shipping origin for this carrier rate.

↳ percentage_adjustment
string

Optional. Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases the rate by 3%.

↳ flat_adjustment
Google\Shopping\Type\Price

Optional. Additive shipping rate modifier. Can be negative. For example { "amount_micros": 1, "currency_code" : "USD" } adds $1 to the rate, { "amount_micros": -3, "currency_code" : "USD" } removes $3 from the rate.

getName

Required. Name of the carrier rate. Must be unique per rate group.

Returns
Type
Description
string

hasName

clearName

setName

Required. Name of the carrier rate. Must be unique per rate group.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getCarrier

Required. Carrier service, such as "UPS" or "Fedex" .

Returns
Type
Description
string

hasCarrier

clearCarrier

setCarrier

Required. Carrier service, such as "UPS" or "Fedex" .

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getCarrierService

Required. Carrier service, such as "ground" or "2 days" .

Returns
Type
Description
string

hasCarrierService

clearCarrierService

setCarrierService

Required. Carrier service, such as "ground" or "2 days" .

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getOriginPostalCode

Required. Shipping origin for this carrier rate.

Returns
Type
Description
string

hasOriginPostalCode

clearOriginPostalCode

setOriginPostalCode

Required. Shipping origin for this carrier rate.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getPercentageAdjustment

Optional. Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases the rate by 3%.

Returns
Type
Description
string

hasPercentageAdjustment

clearPercentageAdjustment

setPercentageAdjustment

Optional. Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases the rate by 3%.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getFlatAdjustment

Optional. Additive shipping rate modifier. Can be negative. For example { "amount_micros": 1, "currency_code" : "USD" } adds $1 to the rate, { "amount_micros": -3, "currency_code" : "USD" } removes $3 from the rate.

Returns
Type
Description

hasFlatAdjustment

clearFlatAdjustment

setFlatAdjustment

Optional. Additive shipping rate modifier. Can be negative. For example { "amount_micros": 1, "currency_code" : "USD" } adds $1 to the rate, { "amount_micros": -3, "currency_code" : "USD" } removes $3 from the rate.

Parameter
Name
Description
Returns
Type
Description
$this
Create a Mobile Website
View Site in Mobile | Classic
Share by: