Class: OnlinePayments::SDK::Domain::OperationPaymentReferences

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/operation_payment_references.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#merchant_referenceString

Returns the current value of merchant_reference.

Returns:

  • (String)

    the current value of merchant_reference



11
12
13
# File 'lib/onlinepayments/sdk/domain/operation_payment_references.rb', line 11

def merchant_reference
  @merchant_reference
end

#operation_group_referenceString

Returns the current value of operation_group_reference.

Returns:

  • (String)

    the current value of operation_group_reference



11
12
13
# File 'lib/onlinepayments/sdk/domain/operation_payment_references.rb', line 11

def operation_group_reference
  @operation_group_reference
end

Instance Method Details

#from_hash(hash) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/onlinepayments/sdk/domain/operation_payment_references.rb', line 25

def from_hash(hash)
  super
  if hash.has_key? 'merchantReference'
    @merchant_reference = hash['merchantReference']
  end
  if hash.has_key? 'operationGroupReference'
    @operation_group_reference = hash['operationGroupReference']
  end
end

#to_hHash

Returns:

  • (Hash)


18
19
20
21
22
23
# File 'lib/onlinepayments/sdk/domain/operation_payment_references.rb', line 18

def to_h
  hash = super
  hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil?
  hash['operationGroupReference'] = @operation_group_reference unless @operation_group_reference.nil?
  hash
end