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

Overview

The sale event object to associate the commission with.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(amount: nil, currency: 'usd', event_name: 'Purchase', payment_processor: Models::Operations::RequestBodyPaymentProcessor::CUSTOM, metadata: nil, invoice_id: nil) ⇒ Sale

Returns a new instance of Sale.



31
32
33
34
35
36
37
38
# File 'lib/open_api_sdk/models/operations/sale.rb', line 31

def initialize(amount: nil, currency: 'usd', event_name: 'Purchase', payment_processor: Models::Operations::RequestBodyPaymentProcessor::CUSTOM, metadata: nil, invoice_id: nil)
  @amount = amount
  @currency = currency
  @event_name = event_name
  @payment_processor = payment_processor
  @metadata = 
  @invoice_id = invoice_id
end

Instance Method Details

#==(other) ⇒ Object



41
42
43
44
45
46
47
48
49
50
# File 'lib/open_api_sdk/models/operations/sale.rb', line 41

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