Class: OnlinePayments::SDK::Domain::OrderReferences

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/order_references.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#descriptorString

Returns the current value of descriptor.

Returns:

  • (String)

    the current value of descriptor



12
13
14
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 12

def descriptor
  @descriptor
end

#merchant_parametersString

Returns the current value of merchant_parameters.

Returns:

  • (String)

    the current value of merchant_parameters



12
13
14
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 12

def merchant_parameters
  @merchant_parameters
end

#merchant_referenceString

Returns the current value of merchant_reference.

Returns:

  • (String)

    the current value of merchant_reference



12
13
14
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 12

def merchant_reference
  @merchant_reference
end

Instance Method Details

#from_hash(hash) ⇒ Object



26
27
28
29
30
31
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 26

def from_hash(hash)
  super
  @descriptor = hash['descriptor'] if hash.key? 'descriptor'
  @merchant_parameters = hash['merchantParameters'] if hash.key? 'merchantParameters'
  @merchant_reference = hash['merchantReference'] if hash.key? 'merchantReference'
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['descriptor'] = @descriptor unless @descriptor.nil?
  hash['merchantParameters'] = @merchant_parameters unless @merchant_parameters.nil?
  hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil?
  hash
end