Generated from protobuf messagegoogle.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%.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Shopping Merchant Accounts V1 Client - Class CarrierRate (1.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0 (latest)](/php/docs/reference/shopping-merchant-accounts/latest/V1.CarrierRate)\n- [0.10.0](/php/docs/reference/shopping-merchant-accounts/0.10.0/V1.CarrierRate)\n- [0.9.1](/php/docs/reference/shopping-merchant-accounts/0.9.1/V1.CarrierRate)\n- [0.8.0](/php/docs/reference/shopping-merchant-accounts/0.8.0/V1.CarrierRate)\n- [0.7.0](/php/docs/reference/shopping-merchant-accounts/0.7.0/V1.CarrierRate)\n- [0.6.0](/php/docs/reference/shopping-merchant-accounts/0.6.0/V1.CarrierRate)\n- [0.5.0](/php/docs/reference/shopping-merchant-accounts/0.5.0/V1.CarrierRate)\n- [0.4.0](/php/docs/reference/shopping-merchant-accounts/0.4.0/V1.CarrierRate)\n- [0.3.3](/php/docs/reference/shopping-merchant-accounts/0.3.3/V1.CarrierRate)\n- [0.2.0](/php/docs/reference/shopping-merchant-accounts/0.2.0/V1.CarrierRate)\n- [0.1.0](/php/docs/reference/shopping-merchant-accounts/0.1.0/V1.CarrierRate) \nReference documentation and code samples for the Google Shopping Merchant Accounts V1 Client class CarrierRate.\n\nA list of carrier rates that can be referred to by\n`main_table` or `single_value`.\n\nSupported carrier services are defined in\n[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](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).\n\nGenerated from protobuf message `google.shopping.merchant.accounts.v1.CarrierRate`\n\nNamespace\n---------\n\nGoogle \\\\ Shopping \\\\ Merchant \\\\ Accounts \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nRequired. Name of the carrier rate. Must be unique per rate group.\n\n### hasName\n\n### clearName\n\n### setName\n\nRequired. Name of the carrier rate. Must be unique per rate group.\n\n### getCarrier\n\nRequired. Carrier service, such as `\"UPS\"` or `\"Fedex\"`.\n\n### hasCarrier\n\n### clearCarrier\n\n### setCarrier\n\nRequired. Carrier service, such as `\"UPS\"` or `\"Fedex\"`.\n\n### getCarrierService\n\nRequired. Carrier service, such as `\"ground\"` or `\"2 days\"`.\n\n### hasCarrierService\n\n### clearCarrierService\n\n### setCarrierService\n\nRequired. Carrier service, such as `\"ground\"` or `\"2 days\"`.\n\n### getOriginPostalCode\n\nRequired. Shipping origin for this carrier rate.\n\n### hasOriginPostalCode\n\n### clearOriginPostalCode\n\n### setOriginPostalCode\n\nRequired. Shipping origin for this carrier rate.\n\n### getPercentageAdjustment\n\nOptional. Multiplicative shipping rate modifier as a number in decimal\nnotation. Can be negative. For example `\"5.4\"` increases the rate by 5.4%,\n`\"-3\"` decreases the rate by 3%.\n\n### hasPercentageAdjustment\n\n### clearPercentageAdjustment\n\n### setPercentageAdjustment\n\nOptional. Multiplicative shipping rate modifier as a number in decimal\nnotation. Can be negative. For example `\"5.4\"` increases the rate by 5.4%,\n`\"-3\"` decreases the rate by 3%.\n\n### getFlatAdjustment\n\nOptional. Additive shipping rate modifier. Can be negative. For example\n`{ \"amount_micros\": 1, \"currency_code\" : \"USD\" }` adds $1 to the rate,\n`{ \"amount_micros\": -3, \"currency_code\" : \"USD\" }` removes $3 from the\nrate.\n\n### hasFlatAdjustment\n\n### clearFlatAdjustment\n\n### setFlatAdjustment\n\nOptional. Additive shipping rate modifier. Can be negative. For example\n`{ \"amount_micros\": 1, \"currency_code\" : \"USD\" }` adds $1 to the rate,\n`{ \"amount_micros\": -3, \"currency_code\" : \"USD\" }` removes $3 from the\nrate."]]