Class: KintsugiSDK::Models::Shared::TaxItemEstimate

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/kintsugi_sdk/models/shared/taxitemestimate.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(name:, exempt_reason: nil, rule: nil, rate: '0.0', amount: '0.0', exempt: false) ⇒ TaxItemEstimate

Returns a new instance of TaxItemEstimate.



30
31
32
33
34
35
36
37
# File 'lib/kintsugi_sdk/models/shared/taxitemestimate.rb', line 30

def initialize(name:, exempt_reason: nil, rule: nil, rate: '0.0', amount: '0.0', exempt: false)
  @name = name
  @exempt_reason = exempt_reason
  @rule = rule
  @rate = rate
  @amount = amount
  @exempt = exempt
end

Instance Method Details

#==(other) ⇒ Object



40
41
42
43
44
45
46
47
48
49
# File 'lib/kintsugi_sdk/models/shared/taxitemestimate.rb', line 40

def ==(other)
  return false unless other.is_a? self.class
  return false unless @name == other.name
  return false unless @exempt_reason == other.exempt_reason
  return false unless @rule == other.rule
  return false unless @rate == other.rate
  return false unless @amount == other.amount
  return false unless @exempt == other.exempt
  true
end