Class: KintsugiSDK::Models::Shared::TransactionItemBuilder

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(organization_id:, date:, external_product_id:, external_id: nil, description: nil, product: nil, product_id: nil, product_name: nil, product_description: nil, original_currency: nil, destination_currency: nil, converted_amount: nil, converted_taxable_amount: nil, converted_tax_amount_imported: nil, converted_tax_amount_calculated: nil, converted_total_discount: nil, converted_subtotal: nil, tax_exemption: nil, tax_items: nil, discount_builder: nil, quantity: 1.0, amount: 0.00, tax_amount_imported: 0.00, tax_rate_imported: 0.00, tax_amount_calculated: 0.00, tax_rate_calculated: 0.00, taxable_amount: 0.00, exempt: false) ⇒ TransactionItemBuilder

Returns a new instance of TransactionItemBuilder.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/kintsugi_sdk/models/shared/transactionitembuilder.rb', line 74

def initialize(organization_id:, date:, external_product_id:, external_id: nil, description: nil, product: nil, product_id: nil, product_name: nil, product_description: nil, original_currency: nil, destination_currency: nil, converted_amount: nil, converted_taxable_amount: nil, converted_tax_amount_imported: nil, converted_tax_amount_calculated: nil, converted_total_discount: nil, converted_subtotal: nil, tax_exemption: nil, tax_items: nil, discount_builder: nil, quantity: 1.0, amount: 0.00, tax_amount_imported: 0.00, tax_rate_imported: 0.00, tax_amount_calculated: 0.00, tax_rate_calculated: 0.00, taxable_amount: 0.00, exempt: false)
  @organization_id = organization_id
  @date = date
  @external_product_id = external_product_id
  @external_id = external_id
  @description = description
  @product = product
  @product_id = product_id
  @product_name = product_name
  @product_description = product_description
  @original_currency = original_currency
  @destination_currency = destination_currency
  @converted_amount = converted_amount
  @converted_taxable_amount = converted_taxable_amount
  @converted_tax_amount_imported = converted_tax_amount_imported
  @converted_tax_amount_calculated = converted_tax_amount_calculated
  @converted_total_discount = converted_total_discount
  @converted_subtotal = converted_subtotal
  @tax_exemption = tax_exemption
  @tax_items = tax_items
  @discount_builder = discount_builder
  @quantity = quantity
  @amount = amount
  @tax_amount_imported = tax_amount_imported
  @tax_rate_imported = tax_rate_imported
  @tax_amount_calculated = tax_amount_calculated
  @tax_rate_calculated = tax_rate_calculated
  @taxable_amount = taxable_amount
  @exempt = exempt
end

Instance Method Details

#==(other) ⇒ Object



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/kintsugi_sdk/models/shared/transactionitembuilder.rb', line 106

def ==(other)
  return false unless other.is_a? self.class
  return false unless @organization_id == other.organization_id
  return false unless @date == other.date
  return false unless @external_product_id == other.external_product_id
  return false unless @external_id == other.external_id
  return false unless @description == other.description
  return false unless @product == other.product
  return false unless @product_id == other.product_id
  return false unless @product_name == other.product_name
  return false unless @product_description == other.product_description
  return false unless @original_currency == other.original_currency
  return false unless @destination_currency == other.destination_currency
  return false unless @converted_amount == other.converted_amount
  return false unless @converted_taxable_amount == other.converted_taxable_amount
  return false unless @converted_tax_amount_imported == other.converted_tax_amount_imported
  return false unless @converted_tax_amount_calculated == other.converted_tax_amount_calculated
  return false unless @converted_total_discount == other.converted_total_discount
  return false unless @converted_subtotal == other.converted_subtotal
  return false unless @tax_exemption == other.tax_exemption
  return false unless @tax_items == other.tax_items
  return false unless @discount_builder == other.discount_builder
  return false unless @quantity == other.quantity
  return false unless @amount == other.amount
  return false unless @tax_amount_imported == other.tax_amount_imported
  return false unless @tax_rate_imported == other.tax_rate_imported
  return false unless @tax_amount_calculated == other.tax_amount_calculated
  return false unless @tax_rate_calculated == other.tax_rate_calculated
  return false unless @taxable_amount == other.taxable_amount
  return false unless @exempt == other.exempt
  true
end