Class: OpenApiSDK::Models::Shared::Sale

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

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(amount:, currency:, payment_processor:, invoice_id: nil) ⇒ Sale

Returns a new instance of Sale.



27
28
29
30
31
32
# File 'lib/open_api_sdk/models/shared/sale.rb', line 27

def initialize(amount:, currency:, payment_processor:, invoice_id: nil)
  @amount = amount
  @currency = currency
  @payment_processor = payment_processor
  @invoice_id = invoice_id
end

Instance Method Details

#==(other) ⇒ Object



35
36
37
38
39
40
41
42
# File 'lib/open_api_sdk/models/shared/sale.rb', line 35

def ==(other)
  return false unless other.is_a? self.class
  return false unless @amount == other.amount
  return false unless @currency == other.currency
  return false unless @payment_processor == other.payment_processor
  return false unless @invoice_id == other.invoice_id
  true
end