# Google Shopping Merchant Accounts V1beta Client - Class TaxRule (1.4.1)

1.4.1 (latest) 1.4.0 1.3.1 1.2.2 1.1.0 1.0.0 0.10.0 0.9.1 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.3 0.2.0 0.1.0

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

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 message `google.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. |
| `↳ post_code_range` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1beta.TaxRule.TaxPostalCodeRange` 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. |
| `↳ effective_time_period` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Interval.html` 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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1beta.TaxRule.TaxPostalCodeRange|null` |   |

### hasPostCodeRange

### setPostCodeRange

The range of postal codes in which this rule is applicable.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/shopping-merchant-accounts/latest/V1beta.TaxRule.TaxPostalCodeRange` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUseGoogleRate

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Interval.html|null` |   |

### hasEffectiveTimePeriod

### clearEffectiveTimePeriod

### setEffectiveTimePeriod

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Interval.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLocation

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### getRateCalculation

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |