Class: Google::Apis::MerchantapiProductsV1beta::Tax

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Tax

Returns a new instance of Tax.



2125
2126
2127
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2125

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#countryString

The country within which the item is taxed, specified as a CLDR territory code. Corresponds to the JSON property country

Returns:

  • (String)


2093
2094
2095
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2093

def country
  @country
end

#location_idFixnum

The numeric ID of a location that the tax rate applies to as defined in the AdWords API. Corresponds to the JSON property locationId

Returns:

  • (Fixnum)


2100
2101
2102
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2100

def location_id
  @location_id
end

#postal_codeString

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

Returns:

  • (String)


2107
2108
2109
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2107

def postal_code
  @postal_code
end

#rateFloat

The percentage of tax rate that applies to the item price. Corresponds to the JSON property rate

Returns:

  • (Float)


2112
2113
2114
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2112

def rate
  @rate
end

#regionString

The geographic region to which the tax rate applies. Corresponds to the JSON property region

Returns:

  • (String)


2117
2118
2119
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2117

def region
  @region
end

#tax_shipBoolean Also known as: tax_ship?

Set to true if tax is charged on shipping. Corresponds to the JSON property taxShip

Returns:

  • (Boolean)


2122
2123
2124
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2122

def tax_ship
  @tax_ship
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2130
2131
2132
2133
2134
2135
2136
2137
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 2130

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