Class: KintsugiSDK::Models::Shared::TaxItemBuilder
- Inherits:
-
Object
- Object
- KintsugiSDK::Models::Shared::TaxItemBuilder
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/kintsugi_sdk/models/shared/taxitembuilder.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(rate:, amount:, name:, organization_id:, converted_amount: nil, currency: nil, destination_currency: nil, external_id: nil, type: nil, jurisdiction_type: nil, jurisdiction_name: nil, rule_id: '0000') ⇒ TaxItemBuilder
constructor
A new instance of TaxItemBuilder.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(rate:, amount:, name:, organization_id:, converted_amount: nil, currency: nil, destination_currency: nil, external_id: nil, type: nil, jurisdiction_type: nil, jurisdiction_name: nil, rule_id: '0000') ⇒ TaxItemBuilder
Returns a new instance of TaxItemBuilder.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/kintsugi_sdk/models/shared/taxitembuilder.rb', line 42 def initialize(rate:, amount:, name:, organization_id:, converted_amount: nil, currency: nil, destination_currency: nil, external_id: nil, type: nil, jurisdiction_type: nil, jurisdiction_name: nil, rule_id: '0000') @rate = rate @amount = amount @name = name @organization_id = organization_id @converted_amount = converted_amount @currency = currency @destination_currency = destination_currency @external_id = external_id @type = type @jurisdiction_type = jurisdiction_type @jurisdiction_name = jurisdiction_name @rule_id = rule_id end |
Instance Method Details
#==(other) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/kintsugi_sdk/models/shared/taxitembuilder.rb', line 58 def ==(other) return false unless other.is_a? self.class return false unless @rate == other.rate return false unless @amount == other.amount return false unless @name == other.name return false unless @organization_id == other.organization_id return false unless @converted_amount == other.converted_amount return false unless @currency == other.currency return false unless @destination_currency == other.destination_currency return false unless @external_id == other.external_id return false unless @type == other.type return false unless @jurisdiction_type == other.jurisdiction_type return false unless @jurisdiction_name == other.jurisdiction_name return false unless @rule_id == other.rule_id true end |