Reference documentation and code samples for the Google Shopping Merchant Accounts V1beta Client class TaxRule.
Primary type convension
percent micro : 100% = 1 000 000 and 1% = 10 000
cannot be negative.
Information about tax nexus and related parameters applicable to orders
delivered to the area covered by a single tax admin. Nexus is created when a
merchant is doing business in an area administered by tax admin (only US
states are supported for nexus configuration). If merchant has nexus in a US
state, merchant needs to pay tax to all tax authorities associated with
the shipping destination.
Next Id : 8
Generated from protobuf messagegoogle.shopping.merchant.accounts.v1beta.TaxRule
Namespace
Google \ Shopping \ Merchant \ Accounts \ V1beta
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ location_id
int|string
The admin_id or criteria_id of the region in which this rule is applicable.
The range of postal codes in which this rule is applicable.
↳ use_google_rate
bool
Rate that depends on delivery location: if merchant has a nexus in corresponding US state, rates from authorities with jurisdiction over delivery area are added up.
↳ self_specified_rate_micros
int|string
A fixed rate specified in micros, where 100% = 1_000_000. Suitable for origin-based states.
↳ region_code
string
Region code in which this rule is applicable
↳ shipping_taxed
bool
If set, shipping charge is taxed (at the same rate as product) when delivering to this admin's area. Can only be set on US states without category.
Required. Time period when this rule is effective. If the duration is missing from effective_time listed, then it is open ended to the future. The start of this time period is inclusive, and the end is exclusive.
getLocationId
The admin_id or criteria_id of the region in which this rule is
applicable.
Returns
Type
Description
int|string
hasLocationId
setLocationId
The admin_id or criteria_id of the region in which this rule is
applicable.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getPostCodeRange
The range of postal codes in which this rule is applicable.
Rate that depends on delivery location: if merchant has a nexus in
corresponding US state, rates from authorities with jurisdiction over
delivery area are added up.
Returns
Type
Description
bool
hasUseGoogleRate
setUseGoogleRate
Rate that depends on delivery location: if merchant has a nexus in
corresponding US state, rates from authorities with jurisdiction over
delivery area are added up.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getSelfSpecifiedRateMicros
A fixed rate specified in micros, where 100% = 1_000_000.
Suitable for origin-based states.
Returns
Type
Description
int|string
hasSelfSpecifiedRateMicros
setSelfSpecifiedRateMicros
A fixed rate specified in micros, where 100% = 1_000_000.
Suitable for origin-based states.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getRegionCode
Region code in which this rule is applicable
Returns
Type
Description
string
setRegionCode
Region code in which this rule is applicable
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getShippingTaxed
If set, shipping charge is taxed (at the same rate as product) when
delivering to this admin's area.
Can only be set on US states without category.
Returns
Type
Description
bool
setShippingTaxed
If set, shipping charge is taxed (at the same rate as product) when
delivering to this admin's area.
Can only be set on US states without category.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getEffectiveTimePeriod
Required. Time period when this rule is effective. If the duration is
missing from effective_time listed, then it is open ended to the future.
The start of this time period is inclusive, and the end is exclusive.
[[["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 V1beta Client - Class TaxRule (1.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0 (latest)](/php/docs/reference/shopping-merchant-accounts/latest/V1beta.TaxRule)\n- [0.10.0](/php/docs/reference/shopping-merchant-accounts/0.10.0/V1beta.TaxRule)\n- [0.9.1](/php/docs/reference/shopping-merchant-accounts/0.9.1/V1beta.TaxRule)\n- [0.8.0](/php/docs/reference/shopping-merchant-accounts/0.8.0/V1beta.TaxRule)\n- [0.7.0](/php/docs/reference/shopping-merchant-accounts/0.7.0/V1beta.TaxRule)\n- [0.6.0](/php/docs/reference/shopping-merchant-accounts/0.6.0/V1beta.TaxRule)\n- [0.5.0](/php/docs/reference/shopping-merchant-accounts/0.5.0/V1beta.TaxRule)\n- [0.4.0](/php/docs/reference/shopping-merchant-accounts/0.4.0/V1beta.TaxRule)\n- [0.3.3](/php/docs/reference/shopping-merchant-accounts/0.3.3/V1beta.TaxRule)\n- [0.2.0](/php/docs/reference/shopping-merchant-accounts/0.2.0/V1beta.TaxRule)\n- [0.1.0](/php/docs/reference/shopping-merchant-accounts/0.1.0/V1beta.TaxRule) \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 Accounts V1beta Client class TaxRule.\n\nPrimary type convension\npercent micro : 100% = 1 000 000 and 1% = 10 000\ncannot be negative.\n\nInformation about tax nexus and related parameters applicable to orders\ndelivered to the area covered by a single tax admin. Nexus is created when a\nmerchant is doing business in an area administered by tax admin (only US\nstates are supported for nexus configuration). If merchant has nexus in a US\nstate, merchant needs to pay tax to all tax authorities associated with\nthe shipping destination.\nNext Id : 8\n\nGenerated from protobuf message `google.shopping.merchant.accounts.v1beta.TaxRule`\n\nNamespace\n---------\n\nGoogle \\\\ Shopping \\\\ Merchant \\\\ Accounts \\\\ V1beta\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getLocationId\n\nThe admin_id or criteria_id of the region in which this rule is\napplicable.\n\n### hasLocationId\n\n### setLocationId\n\nThe admin_id or criteria_id of the region in which this rule is\napplicable.\n\n### getPostCodeRange\n\nThe range of postal codes in which this rule is applicable.\n\n### hasPostCodeRange\n\n### setPostCodeRange\n\nThe range of postal codes in which this rule is applicable.\n\n### getUseGoogleRate\n\nRate that depends on delivery location: if merchant has a nexus in\ncorresponding US state, rates from authorities with jurisdiction over\ndelivery area are added up.\n\n### hasUseGoogleRate\n\n### setUseGoogleRate\n\nRate that depends on delivery location: if merchant has a nexus in\ncorresponding US state, rates from authorities with jurisdiction over\ndelivery area are added up.\n\n### getSelfSpecifiedRateMicros\n\nA fixed rate specified in micros, where 100% = 1_000_000.\n\nSuitable for origin-based states.\n\n### hasSelfSpecifiedRateMicros\n\n### setSelfSpecifiedRateMicros\n\nA fixed rate specified in micros, where 100% = 1_000_000.\n\nSuitable for origin-based states.\n\n### getRegionCode\n\nRegion code in which this rule is applicable\n\n### setRegionCode\n\nRegion code in which this rule is applicable\n\n### getShippingTaxed\n\nIf set, shipping charge is taxed (at the same rate as product) when\ndelivering to this admin's area.\n\nCan only be set on US states without category.\n\n### setShippingTaxed\n\nIf set, shipping charge is taxed (at the same rate as product) when\ndelivering to this admin's area.\n\nCan only be set on US states without category.\n\n### getEffectiveTimePeriod\n\nRequired. Time period when this rule is effective. If the duration is\nmissing from effective_time listed, then it is open ended to the future.\n\nThe start of this time period is inclusive, and the end is exclusive.\n\n### hasEffectiveTimePeriod\n\n### clearEffectiveTimePeriod\n\n### setEffectiveTimePeriod\n\nRequired. Time period when this rule is effective. If the duration is\nmissing from effective_time listed, then it is open ended to the future.\n\nThe start of this time period is inclusive, and the end is exclusive.\n\n### getLocation\n\n### getRateCalculation"]]