Class: Google::Apis::ContentV2::ProductTax

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/content_v2/classes.rb,
generated/google/apis/content_v2/representations.rb,
generated/google/apis/content_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ProductTax

Returns a new instance of ProductTax



5197
5198
5199
# File 'generated/google/apis/content_v2/classes.rb', line 5197

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)


5166
5167
5168
# File 'generated/google/apis/content_v2/classes.rb', line 5166

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)


5172
5173
5174
# File 'generated/google/apis/content_v2/classes.rb', line 5172

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)


5179
5180
5181
# File 'generated/google/apis/content_v2/classes.rb', line 5179

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)


5184
5185
5186
# File 'generated/google/apis/content_v2/classes.rb', line 5184

def rate
  @rate
end

#regionString

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

Returns:

  • (String)


5189
5190
5191
# File 'generated/google/apis/content_v2/classes.rb', line 5189

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)


5194
5195
5196
# File 'generated/google/apis/content_v2/classes.rb', line 5194

def tax_ship
  @tax_ship
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5202
5203
5204
5205
5206
5207
5208
5209
# File 'generated/google/apis/content_v2/classes.rb', line 5202

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