Class: OpenApiSDK::Models::Operations::Sale

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/open_api_sdk/models/operations/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, metadata: nil) ⇒ Sale

Returns a new instance of Sale.



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

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

Instance Method Details

#==(other) ⇒ Object



36
37
38
39
40
41
42
43
44
# File 'lib/open_api_sdk/models/operations/sale.rb', line 36

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
  return false unless @metadata == other.
  true
end