Reference documentation and code samples for the Google Shopping Merchant Accounts V1 Client class TermsOfService.
TheTermsOfServicemessage represents a specific version of the terms of
service that merchants must accept to access certain features or services.
For more information, seeTerms of
Service.
This message is important for the onboarding process, ensuring that merchants
agree to the necessary legal agreements for using the service. Merchants can
retrieve the latest terms of service for a givenkindandregionthroughRetrieveLatestTermsOfService, and accept them as required throughAcceptTermsOfService.
Generated from protobuf messagegoogle.shopping.merchant.accounts.v1.TermsOfService
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 terms of service version. Format:termsOfService/{version}
↳ region_code
string
Region code as defined byCLDR. This is either a country where the ToS applies specifically to that country or001when the sameTermsOfServicecan be signed in any country. However note that when signing a ToS that applies globally we still expect that a specific country is provided (this should be merchant business country or program country of participation).
↳ kind
int
The Kind this terms of service version applies to.
↳ file_uri
string
URI for terms of service file that needs to be displayed to signing users.
↳ external
bool
Whether this terms of service version is external. External terms of service versions can only be agreed through external processes and not directly by the merchant through UI or API.
getName
Identifier. The resource name of the terms of service version.
Format:termsOfService/{version}
Returns
Type
Description
string
setName
Identifier. The resource name of the terms of service version.
Format:termsOfService/{version}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getRegionCode
Region code as defined byCLDR. This is either
a country where the ToS applies specifically to that country or001when
the sameTermsOfServicecan be signed in any country. However note that
when signing a ToS that applies globally we still expect that a specific
country is provided (this should be merchant business country or program
country of participation).
Returns
Type
Description
string
setRegionCode
Region code as defined byCLDR. This is either
a country where the ToS applies specifically to that country or001when
the sameTermsOfServicecan be signed in any country. However note that
when signing a ToS that applies globally we still expect that a specific
country is provided (this should be merchant business country or program
country of participation).
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getKind
The Kind this terms of service version applies to.
Returns
Type
Description
int
setKind
The Kind this terms of service version applies to.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getFileUri
URI for terms of service file that needs to be displayed to signing users.
Returns
Type
Description
string
hasFileUri
clearFileUri
setFileUri
URI for terms of service file that needs to be displayed to signing users.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getExternal
Whether this terms of service version is external. External terms of
service versions can only be agreed through external processes and not
directly by the merchant through UI or API.
Returns
Type
Description
bool
setExternal
Whether this terms of service version is external. External terms of
service versions can only be agreed through external processes and not
directly by the merchant through UI or API.
[[["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 TermsOfService (1.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0 (latest)](/php/docs/reference/shopping-merchant-accounts/latest/V1.TermsOfService)\n- [0.10.0](/php/docs/reference/shopping-merchant-accounts/0.10.0/V1.TermsOfService)\n- [0.9.1](/php/docs/reference/shopping-merchant-accounts/0.9.1/V1.TermsOfService)\n- [0.8.0](/php/docs/reference/shopping-merchant-accounts/0.8.0/V1.TermsOfService)\n- [0.7.0](/php/docs/reference/shopping-merchant-accounts/0.7.0/V1.TermsOfService)\n- [0.6.0](/php/docs/reference/shopping-merchant-accounts/0.6.0/V1.TermsOfService)\n- [0.5.0](/php/docs/reference/shopping-merchant-accounts/0.5.0/V1.TermsOfService)\n- [0.4.0](/php/docs/reference/shopping-merchant-accounts/0.4.0/V1.TermsOfService)\n- [0.3.3](/php/docs/reference/shopping-merchant-accounts/0.3.3/V1.TermsOfService)\n- [0.2.0](/php/docs/reference/shopping-merchant-accounts/0.2.0/V1.TermsOfService)\n- [0.1.0](/php/docs/reference/shopping-merchant-accounts/0.1.0/V1.TermsOfService) \nReference documentation and code samples for the Google Shopping Merchant Accounts V1 Client class TermsOfService.\n\nThe `TermsOfService` message represents a specific version of the terms of\nservice that merchants must accept to access certain features or services.\n\nFor more information, see [Terms of\nService](https://support.google.com/merchants/answer/160173).\nThis message is important for the onboarding process, ensuring that merchants\nagree to the necessary legal agreements for using the service. Merchants can\nretrieve the latest terms of service for a given `kind` and `region` through\n`RetrieveLatestTermsOfService`, and accept them as required through\n`AcceptTermsOfService`.\n\nGenerated from protobuf message `google.shopping.merchant.accounts.v1.TermsOfService`\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 terms of service version.\n\nFormat: `termsOfService/{version}`\n\n### setName\n\nIdentifier. The resource name of the terms of service version.\n\nFormat: `termsOfService/{version}`\n\n### getRegionCode\n\nRegion code as defined by [CLDR](https://cldr.unicode.org/). This is either\na country where the ToS applies specifically to that country or `001` when\nthe same `TermsOfService` can be signed in any country. However note that\nwhen signing a ToS that applies globally we still expect that a specific\ncountry is provided (this should be merchant business country or program\ncountry of participation).\n\n### setRegionCode\n\nRegion code as defined by [CLDR](https://cldr.unicode.org/). This is either\na country where the ToS applies specifically to that country or `001` when\nthe same `TermsOfService` can be signed in any country. However note that\nwhen signing a ToS that applies globally we still expect that a specific\ncountry is provided (this should be merchant business country or program\ncountry of participation).\n\n### getKind\n\nThe Kind this terms of service version applies to.\n\n### setKind\n\nThe Kind this terms of service version applies to.\n\n### getFileUri\n\nURI for terms of service file that needs to be displayed to signing users.\n\n### hasFileUri\n\n### clearFileUri\n\n### setFileUri\n\nURI for terms of service file that needs to be displayed to signing users.\n\n### getExternal\n\nWhether this terms of service version is external. External terms of\nservice versions can only be agreed through external processes and not\ndirectly by the merchant through UI or API.\n\n### setExternal\n\nWhether this terms of service version is external. External terms of\nservice versions can only be agreed through external processes and not\ndirectly by the merchant through UI or API."]]