Reference documentation and code samples for the Google Shopping Merchant Accounts V1 Client class ShippingSettings.
The Merchant Center account'sshipping
settings. TheShippingSettingsresource lets you retrieve and update the shipping
settings of your advanced account and all its associated sub-accounts.
Generated from protobuf messagegoogle.shopping.merchant.accounts.v1.ShippingSettings
Namespace
Google \ Shopping \ Merchant \ Accounts \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Identifier. The resource name of the shipping settings. Format:accounts/{account}/shippingSettings. For example,accounts/123456/shippingSettings.
Optional. A list of warehouses which can be referred to inservices.
↳ etag
string
Required. This field helps avoid async issues. It ensures that the shipping setting data doesn't change between thegetcall and theinsertcall. The user should follow these steps: 1. Set the etag field as an empty string for the initial shipping setting creation. 2. After the initial creation, call thegetmethod to obtain an etag and the current shipping setting data before callinginsert. 3. Modify the shipping setting information. 4. Call theinsertmethod with the shipping setting information and the etag obtained in step 2. 5. If the shipping setting data changes between step 2 and step 4, the insert request will fail because the etag changes every time the shipping setting data changes. In this case, the user should repeat steps 2-4 with the new etag.
getName
Identifier. The resource name of the shipping settings.
Format:accounts/{account}/shippingSettings. For example,accounts/123456/shippingSettings.
Returns
Type
Description
string
setName
Identifier. The resource name of the shipping settings.
Format:accounts/{account}/shippingSettings. For example,accounts/123456/shippingSettings.
Required. This field helps avoid async issues. It ensures that the shipping
setting
data doesn't change between thegetcall and theinsertcall. The user
should follow these steps:
Set the etag field as an empty string for the initial shipping setting
creation.
After the initial creation, call thegetmethod to obtain an etag and
the current shipping setting data before callinginsert.
Modify the shipping setting information.
Call theinsertmethod with the shipping setting information
and the etag obtained in step 2.
If the shipping setting data changes between step 2 and step 4, the
insert request will fail because the etag changes every time the shipping
setting data changes. In this case, the user should repeat steps 2-4 with
the new etag.
Returns
Type
Description
string
setEtag
Required. This field helps avoid async issues. It ensures that the shipping
setting
data doesn't change between thegetcall and theinsertcall. The user
should follow these steps:
Set the etag field as an empty string for the initial shipping setting
creation.
After the initial creation, call thegetmethod to obtain an etag and
the current shipping setting data before callinginsert.
Modify the shipping setting information.
Call theinsertmethod with the shipping setting information
and the etag obtained in step 2.
If the shipping setting data changes between step 2 and step 4, the
insert request will fail because the etag changes every time the shipping
setting data changes. In this case, the user should repeat steps 2-4 with
the new etag.
[[["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 ShippingSettings (1.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0 (latest)](/php/docs/reference/shopping-merchant-accounts/latest/V1.ShippingSettings)\n- [0.10.0](/php/docs/reference/shopping-merchant-accounts/0.10.0/V1.ShippingSettings)\n- [0.9.1](/php/docs/reference/shopping-merchant-accounts/0.9.1/V1.ShippingSettings)\n- [0.8.0](/php/docs/reference/shopping-merchant-accounts/0.8.0/V1.ShippingSettings)\n- [0.7.0](/php/docs/reference/shopping-merchant-accounts/0.7.0/V1.ShippingSettings)\n- [0.6.0](/php/docs/reference/shopping-merchant-accounts/0.6.0/V1.ShippingSettings)\n- [0.5.0](/php/docs/reference/shopping-merchant-accounts/0.5.0/V1.ShippingSettings)\n- [0.4.0](/php/docs/reference/shopping-merchant-accounts/0.4.0/V1.ShippingSettings)\n- [0.3.3](/php/docs/reference/shopping-merchant-accounts/0.3.3/V1.ShippingSettings)\n- [0.2.0](/php/docs/reference/shopping-merchant-accounts/0.2.0/V1.ShippingSettings)\n- [0.1.0](/php/docs/reference/shopping-merchant-accounts/0.1.0/V1.ShippingSettings) \nReference documentation and code samples for the Google Shopping Merchant Accounts V1 Client class ShippingSettings.\n\nThe Merchant Center account's [shipping\nsettings](https://support.google.com/merchants/answer/6069284). The\n`ShippingSettings` resource lets you retrieve and update the shipping\nsettings of your advanced account and all its associated sub-accounts.\n\nGenerated from protobuf message `google.shopping.merchant.accounts.v1.ShippingSettings`\n\nNamespace\n---------\n\nGoogle \\\\ Shopping \\\\ Merchant \\\\ Accounts \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nIdentifier. The resource name of the shipping settings.\n\nFormat: `accounts/{account}/shippingSettings`. For example,\n`accounts/123456/shippingSettings`.\n\n### setName\n\nIdentifier. The resource name of the shipping settings.\n\nFormat: `accounts/{account}/shippingSettings`. For example,\n`accounts/123456/shippingSettings`.\n\n### getServices\n\nOptional. The target account's list of services.\n\n### setServices\n\nOptional. The target account's list of services.\n\n### getWarehouses\n\nOptional. A list of warehouses which can be referred to in `services`.\n\n### setWarehouses\n\nOptional. A list of warehouses which can be referred to in `services`.\n\n### getEtag\n\nRequired. This field helps avoid async issues. It ensures that the shipping\nsetting\ndata doesn't change between the `get` call and the `insert` call. The user\nshould follow these steps:\n\n1. Set the etag field as an empty string for the initial shipping setting\n creation.\n\n2. After the initial creation, call the `get` method to obtain an etag and\n the current shipping setting data before calling `insert`.\n\n3. Modify the shipping setting information.\n4. Call the `insert` method with the shipping setting information and the etag obtained in step 2.\n5. If the shipping setting data changes between step 2 and step 4, the insert request will fail because the etag changes every time the shipping setting data changes. In this case, the user should repeat steps 2-4 with the new etag.\n\n### setEtag\n\nRequired. This field helps avoid async issues. It ensures that the shipping\nsetting\ndata doesn't change between the `get` call and the `insert` call. The user\nshould follow these steps:\n\n1. Set the etag field as an empty string for the initial shipping setting\n creation.\n\n2. After the initial creation, call the `get` method to obtain an etag and\n the current shipping setting data before calling `insert`.\n\n3. Modify the shipping setting information.\n4. Call the `insert` method with the shipping setting information and the etag obtained in step 2.\n5. If the shipping setting data changes between step 2 and step 4, the insert request will fail because the etag changes every time the shipping setting data changes. In this case, the user should repeat steps 2-4 with the new etag."]]