Class: Google::Apis::MerchantapiProductsV1beta::Tax
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiProductsV1beta::Tax
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/merchantapi_products_v1beta/classes.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb
Overview
The Tax of the product.
Instance Attribute Summary collapse
-
#country ⇒ String
The country within which the item is taxed, specified as a CLDR territory code.
-
#location_id ⇒ Fixnum
The numeric ID of a location that the tax rate applies to as defined in the AdWords 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.
-
#rate ⇒ Float
The percentage of tax rate that applies to the item price.
-
#region ⇒ String
The geographic region to which the tax rate applies.
-
#tax_ship ⇒ Boolean
(also: #tax_ship?)
Set to true if tax is charged on shipping.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Tax
constructor
A new instance of Tax.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Tax
Returns a new instance of Tax.
1850 1851 1852 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1850 def initialize(**args) update!(**args) end |
Instance Attribute Details
#country ⇒ String
The country within which the item is taxed, specified as a CLDR territory
code.
Corresponds to the JSON property country
1818 1819 1820 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1818 def country @country end |
#location_id ⇒ Fixnum
The numeric ID of a location that the tax rate applies to as defined in the
AdWords API.
Corresponds to the JSON property locationId
1825 1826 1827 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1825 def location_id @location_id end |
#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*.
Corresponds to the JSON property postalCode
1832 1833 1834 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1832 def postal_code @postal_code end |
#rate ⇒ Float
The percentage of tax rate that applies to the item price.
Corresponds to the JSON property rate
1837 1838 1839 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1837 def rate @rate end |
#region ⇒ String
The geographic region to which the tax rate applies.
Corresponds to the JSON property region
1842 1843 1844 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1842 def region @region end |
#tax_ship ⇒ Boolean Also known as: tax_ship?
Set to true if tax is charged on shipping.
Corresponds to the JSON property taxShip
1847 1848 1849 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1847 def tax_ship @tax_ship end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1855 1856 1857 1858 1859 1860 1861 1862 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1855 def update!(**args) @country = args[:country] if args.key?(:country) @location_id = args[:location_id] if args.key?(:location_id) @postal_code = args[:postal_code] if args.key?(:postal_code) @rate = args[:rate] if args.key?(:rate) @region = args[:region] if args.key?(:region) @tax_ship = args[:tax_ship] if args.key?(:tax_ship) end |