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 \ V1Methods
__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 |
↳ carrier_service |
string
Required. Carrier service, such as |
↳ 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 |
↳ flat_adjustment |
Google\Shopping\Type\Price
Optional. Additive shipping rate modifier. Can be negative. For example |
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 |
Google\Shopping\Type\Price|null |
|
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 |
var |
Google\Shopping\Type\Price
|
| Returns | |
|---|---|
| Type | Description |
$this |
|