Class: KintsugiSDK::Models::Shared::TransactionItemEstimateBase

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(date:, amount:, external_id: nil, description: nil, external_product_id: nil, product_name: nil, product_description: nil, product_source: nil, product_subcategory: nil, product_category: nil, quantity: 1.0, exempt: false) ⇒ TransactionItemEstimateBase

Returns a new instance of TransactionItemEstimateBase.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/kintsugi_sdk/models/shared/transactionitemestimatebase.rb', line 43

def initialize(date:, amount:, external_id: nil, description: nil, external_product_id: nil, product_name: nil, product_description: nil, product_source: nil, product_subcategory: nil, product_category: nil, quantity: 1.0, exempt: false)
  @date = date
  @amount = amount
  @external_id = external_id
  @description = description
  @external_product_id = external_product_id
  @product_name = product_name
  @product_description = product_description
  @product_source = product_source
  @product_subcategory = product_subcategory
  @product_category = product_category
  @quantity = quantity
  @exempt = exempt
end

Instance Method Details

#==(other) ⇒ Object



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/kintsugi_sdk/models/shared/transactionitemestimatebase.rb', line 59

def ==(other)
  return false unless other.is_a? self.class
  return false unless @date == other.date
  return false unless @amount == other.amount
  return false unless @external_id == other.external_id
  return false unless @description == other.description
  return false unless @external_product_id == other.external_product_id
  return false unless @product_name == other.product_name
  return false unless @product_description == other.product_description
  return false unless @product_source == other.product_source
  return false unless @product_subcategory == other.product_subcategory
  return false unless @product_category == other.product_category
  return false unless @quantity == other.quantity
  return false unless @exempt == other.exempt
  true
end