Class: Google::Apis::MerchantapiAccountsV1beta::TaxRule

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

Overview

Primary type convension percent micro : 100% = 1 000 000 and 1% = 10 000 cannot be negative. Information about tax nexus and related parameters applicable to orders delivered to the area covered by a single tax admin. Nexus is created when a merchant is doing business in an area administered by tax admin (only US states are supported for nexus configuration). If merchant has nexus in a US state, merchant needs to pay tax to all tax authorities associated with the shipping destination. Next Id : 8

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TaxRule

Returns a new instance of TaxRule.



2651
2652
2653
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2651

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

Instance Attribute Details

#effective_time_periodGoogle::Apis::MerchantapiAccountsV1beta::Interval

Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. Corresponds to the JSON property effectiveTimePeriod



2613
2614
2615
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2613

def effective_time_period
  @effective_time_period
end

#location_idFixnum

The admin_id or criteria_id of the region in which this rule is applicable. Corresponds to the JSON property locationId

Returns:

  • (Fixnum)


2618
2619
2620
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2618

def location_id
  @location_id
end

#post_code_rangeGoogle::Apis::MerchantapiAccountsV1beta::TaxPostalCodeRange

A range of postal codes that defines the area. Corresponds to the JSON property postCodeRange



2623
2624
2625
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2623

def post_code_range
  @post_code_range
end

#region_codeString

Region code in which this rule is applicable Corresponds to the JSON property regionCode

Returns:

  • (String)


2628
2629
2630
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2628

def region_code
  @region_code
end

#self_specified_rate_microsFixnum

A fixed rate specified in micros, where 100% = 1_000_000. Suitable for origin- based states. Corresponds to the JSON property selfSpecifiedRateMicros

Returns:

  • (Fixnum)


2634
2635
2636
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2634

def self_specified_rate_micros
  @self_specified_rate_micros
end

#shipping_taxedBoolean Also known as: shipping_taxed?

If set, shipping charge is taxed (at the same rate as product) when delivering to this admin's area. Can only be set on US states without category. Corresponds to the JSON property shippingTaxed

Returns:

  • (Boolean)


2640
2641
2642
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2640

def shipping_taxed
  @shipping_taxed
end

#use_google_rateBoolean Also known as: use_google_rate?

Rate that depends on delivery location: if merchant has a nexus in corresponding US state, rates from authorities with jurisdiction over delivery area are added up. Corresponds to the JSON property useGoogleRate

Returns:

  • (Boolean)


2648
2649
2650
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2648

def use_google_rate
  @use_google_rate
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2656
2657
2658
2659
2660
2661
2662
2663
2664
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 2656

def update!(**args)
  @effective_time_period = args[:effective_time_period] if args.key?(:effective_time_period)
  @location_id = args[:location_id] if args.key?(:location_id)
  @post_code_range = args[:post_code_range] if args.key?(:post_code_range)
  @region_code = args[:region_code] if args.key?(:region_code)
  @self_specified_rate_micros = args[:self_specified_rate_micros] if args.key?(:self_specified_rate_micros)
  @shipping_taxed = args[:shipping_taxed] if args.key?(:shipping_taxed)
  @use_google_rate = args[:use_google_rate] if args.key?(:use_google_rate)
end