Class: Ingenico::Connect::SDK::Domain::Payout::PayoutReferences

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/payout/payout_references.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#invoice_numberObject

String



15
16
17
# File 'lib/ingenico/connect/sdk/domain/payout/payout_references.rb', line 15

def invoice_number
  @invoice_number
end

#merchant_order_idObject

Integer



18
19
20
# File 'lib/ingenico/connect/sdk/domain/payout/payout_references.rb', line 18

def merchant_order_id
  @merchant_order_id
end

#merchant_referenceObject

String



21
22
23
# File 'lib/ingenico/connect/sdk/domain/payout/payout_references.rb', line 21

def merchant_reference
  @merchant_reference
end

Instance Method Details

#from_hash(hash) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/ingenico/connect/sdk/domain/payout/payout_references.rb', line 31

def from_hash(hash)
  super
  if hash.has_key?('invoiceNumber')
    @invoice_number = hash['invoiceNumber']
  end
  if hash.has_key?('merchantOrderId')
    @merchant_order_id = hash['merchantOrderId']
  end
  if hash.has_key?('merchantReference')
    @merchant_reference = hash['merchantReference']
  end
end

#to_hObject



23
24
25
26
27
28
29
# File 'lib/ingenico/connect/sdk/domain/payout/payout_references.rb', line 23

def to_h
  hash = super
  add_to_hash(hash, 'invoiceNumber', @invoice_number)
  add_to_hash(hash, 'merchantOrderId', @merchant_order_id)
  add_to_hash(hash, 'merchantReference', @merchant_reference)
  hash
end