Reference documentation and code samples for the Google Shopping Merchant Products V1beta Client class Tax.
The Tax of the product.
Generated from protobuf messagegoogle.shopping.merchant.products.v1beta.Tax
Namespace
Google \ Shopping \ Merchant \ Products \ V1beta
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ rate
float
The percentage of tax rate that applies to the item price.
↳ country
string
The country within which the item is taxed, specified as aCLDR territory code.
↳ region
string
The geographic region to which the tax rate applies.
↳ tax_ship
bool
Set to true if tax is charged on shipping.
↳ location_id
int|string
The numeric ID of a location that the tax rate applies to as defined in theAdWords API.
↳ postal_code
string
The postal code range that the tax rate applies to, represented by a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP codes or two ZIP code prefixes of equal length. Examples: 94114, 94, 94002-95460, 94-95*.
getRate
The percentage of tax rate that applies to the item price.
Returns
Type
Description
float
setRate
The percentage of tax rate that applies to the item price.
Parameter
Name
Description
var
float
Returns
Type
Description
$this
getCountry
The country within which the item is taxed, specified as aCLDR
territory
code.
Returns
Type
Description
string
setCountry
The country within which the item is taxed, specified as aCLDR
territory
code.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getRegion
The geographic region to which the tax rate applies.
Returns
Type
Description
string
setRegion
The geographic region to which the tax rate applies.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getTaxShip
Set to true if tax is charged on shipping.
Returns
Type
Description
bool
setTaxShip
Set to true if tax is charged on shipping.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getLocationId
The numeric ID of a location that the tax rate applies to as defined in
theAdWords
API.
Returns
Type
Description
int|string
setLocationId
The numeric ID of a location that the tax rate applies to as defined in
theAdWords
API.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getPostalCode
The postal code range that the tax rate applies to, represented by
a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP
codes or two ZIP code prefixes of equal length.
Examples: 94114, 94, 94002-95460, 94-95*.
Returns
Type
Description
string
setPostalCode
The postal code range that the tax rate applies to, represented by
a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP
codes or two ZIP code prefixes of equal length.
[[["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 Products V1beta Client - Class Tax (1.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0 (latest)](/php/docs/reference/shopping-merchant-products/latest/V1beta.Tax)\n- [0.7.0](/php/docs/reference/shopping-merchant-products/0.7.0/V1beta.Tax)\n- [0.6.1](/php/docs/reference/shopping-merchant-products/0.6.1/V1beta.Tax)\n- [0.5.0](/php/docs/reference/shopping-merchant-products/0.5.0/V1beta.Tax)\n- [0.4.0](/php/docs/reference/shopping-merchant-products/0.4.0/V1beta.Tax)\n- [0.3.0](/php/docs/reference/shopping-merchant-products/0.3.0/V1beta.Tax)\n- [0.2.1](/php/docs/reference/shopping-merchant-products/0.2.1/V1beta.Tax)\n- [0.1.1](/php/docs/reference/shopping-merchant-products/0.1.1/V1beta.Tax) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Google Shopping Merchant Products V1beta Client class Tax.\n\nThe Tax of the product.\n\nGenerated from protobuf message `google.shopping.merchant.products.v1beta.Tax`\n\nNamespace\n---------\n\nGoogle \\\\ Shopping \\\\ Merchant \\\\ Products \\\\ V1beta\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getRate\n\nThe percentage of tax rate that applies to the item price.\n\n### setRate\n\nThe percentage of tax rate that applies to the item price.\n\n### getCountry\n\nThe country within which the item is taxed, specified as a [CLDR\nterritory\ncode](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml).\n\n### setCountry\n\nThe country within which the item is taxed, specified as a [CLDR\nterritory\ncode](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml).\n\n### getRegion\n\nThe geographic region to which the tax rate applies.\n\n### setRegion\n\nThe geographic region to which the tax rate applies.\n\n### getTaxShip\n\nSet to true if tax is charged on shipping.\n\n### setTaxShip\n\nSet to true if tax is charged on shipping.\n\n### getLocationId\n\nThe numeric ID of a location that the tax rate applies to as defined in\nthe [AdWords\nAPI](https://developers.google.com/adwords/api/docs/appendix/geotargeting).\n\n### setLocationId\n\nThe numeric ID of a location that the tax rate applies to as defined in\nthe [AdWords\nAPI](https://developers.google.com/adwords/api/docs/appendix/geotargeting).\n\n### getPostalCode\n\nThe postal code range that the tax rate applies to, represented by\na ZIP code, a ZIP code prefix using \\* wildcard, a range between two ZIP\ncodes or two ZIP code prefixes of equal length.\n\nExamples: 94114, 94*, 94002-95460, 94*-95\\*.\n\n### setPostalCode\n\nThe postal code range that the tax rate applies to, represented by\na ZIP code, a ZIP code prefix using \\* wildcard, a range between two ZIP\ncodes or two ZIP code prefixes of equal length.\n\nExamples: 94114, 94*, 94002-95460, 94*-95\\*."]]