Class: Google::Apis::ContentV2_1::ProductTax

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ProductTax

Returns a new instance of ProductTax.



11238
11239
11240
# File 'lib/google/apis/content_v2_1/classes.rb', line 11238

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)


11207
11208
11209
# File 'lib/google/apis/content_v2_1/classes.rb', line 11207

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)


11213
11214
11215
# File 'lib/google/apis/content_v2_1/classes.rb', line 11213

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)


11220
11221
11222
# File 'lib/google/apis/content_v2_1/classes.rb', line 11220

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)


11225
11226
11227
# File 'lib/google/apis/content_v2_1/classes.rb', line 11225

def rate
  @rate
end

#regionString

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

Returns:

  • (String)


11230
11231
11232
# File 'lib/google/apis/content_v2_1/classes.rb', line 11230

def region
  @region
end

#tax_shipBoolean Also known as: tax_ship?

Should be set to true if tax is charged on shipping. Corresponds to the JSON property taxShip

Returns:

  • (Boolean)


11235
11236
11237
# File 'lib/google/apis/content_v2_1/classes.rb', line 11235

def tax_ship
  @tax_ship
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11243
11244
11245
11246
11247
11248
11249
11250
# File 'lib/google/apis/content_v2_1/classes.rb', line 11243

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