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.



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

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



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

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