Class: Google::Apis::ContentV2::AccountTaxTaxRule

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

Overview

Tax calculation rule to apply in a state or province (USA only).

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) ⇒ AccountTaxTaxRule

Returns a new instance of AccountTaxTaxRule



474
475
476
# File 'generated/google/apis/content_v2/classes.rb', line 474

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

Instance Attribute Details

#countryString

Country code in which tax is applicable. Corresponds to the JSON property country

Returns:

  • (String)


448
449
450
# File 'generated/google/apis/content_v2/classes.rb', line 448

def country
  @country
end

#location_idFixnum

State (or province) is which the tax is applicable, described by its location id (also called criteria id). Corresponds to the JSON property locationId

Returns:

  • (Fixnum)


454
455
456
# File 'generated/google/apis/content_v2/classes.rb', line 454

def location_id
  @location_id
end

#rate_percentString

Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative. Corresponds to the JSON property ratePercent

Returns:

  • (String)


460
461
462
# File 'generated/google/apis/content_v2/classes.rb', line 460

def rate_percent
  @rate_percent
end

#shipping_taxedBoolean Also known as: shipping_taxed?

If true, shipping charges are also taxed. Corresponds to the JSON property shippingTaxed

Returns:

  • (Boolean)


465
466
467
# File 'generated/google/apis/content_v2/classes.rb', line 465

def shipping_taxed
  @shipping_taxed
end

#use_global_rateBoolean Also known as: use_global_rate?

Whether the tax rate is taken from a global tax table or specified explicitly. Corresponds to the JSON property useGlobalRate

Returns:

  • (Boolean)


471
472
473
# File 'generated/google/apis/content_v2/classes.rb', line 471

def use_global_rate
  @use_global_rate
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



479
480
481
482
483
484
485
# File 'generated/google/apis/content_v2/classes.rb', line 479

def update!(**args)
  @country = args[:country] if args.key?(:country)
  @location_id = args[:location_id] if args.key?(:location_id)
  @rate_percent = args[:rate_percent] if args.key?(:rate_percent)
  @shipping_taxed = args[:shipping_taxed] if args.key?(:shipping_taxed)
  @use_global_rate = args[:use_global_rate] if args.key?(:use_global_rate)
end