Class: Worldline::Connect::SDK::V1::Domain::PayoutReferences

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/payout_references.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#invoice_numberString

Returns the current value of invoice_number.

Returns:

  • (String)

    the current value of invoice_number



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

def invoice_number
  @invoice_number
end

#merchant_order_idInteger

Returns the current value of merchant_order_id.

Returns:

  • (Integer)

    the current value of merchant_order_id



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

def merchant_order_id
  @merchant_order_id
end

#merchant_referenceString

Returns the current value of merchant_reference.

Returns:

  • (String)

    the current value of merchant_reference



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

def merchant_reference
  @merchant_reference
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

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_hHash

Returns:

  • (Hash)


24
25
26
27
28
29
30
# File 'lib/worldline/connect/sdk/v1/domain/payout_references.rb', line 24

def to_h
  hash = super
  hash['invoiceNumber'] = @invoice_number unless @invoice_number.nil?
  hash['merchantOrderId'] = @merchant_order_id unless @merchant_order_id.nil?
  hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil?
  hash
end