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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#descriptorString

Returns the current value of descriptor.

Returns:

  • (String)

    the current value of descriptor



17
18
19
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 17

def descriptor
  @descriptor
end

#merchant_commentString

Returns the current value of merchant_comment.

Returns:

  • (String)

    the current value of merchant_comment



17
18
19
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 17

def merchant_comment
  @merchant_comment
end

#merchant_parametersString

Returns the current value of merchant_parameters.

Returns:

  • (String)

    the current value of merchant_parameters



17
18
19
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 17

def merchant_parameters
  @merchant_parameters
end

#merchant_reconciliation_referenceString

Returns the current value of merchant_reconciliation_reference.

Returns:

  • (String)

    the current value of merchant_reconciliation_reference



17
18
19
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 17

def merchant_reconciliation_reference
  @merchant_reconciliation_reference
end

#merchant_referenceString

Returns the current value of merchant_reference.

Returns:

  • (String)

    the current value of merchant_reference



17
18
19
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 17

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



17
18
19
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 17

def operation_group_reference
  @operation_group_reference
end

#soft_descriptorString

Returns the current value of soft_descriptor.

Returns:

  • (String)

    the current value of soft_descriptor



17
18
19
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 17

def soft_descriptor
  @soft_descriptor
end

#structured_creditor_referenceString

Returns the current value of structured_creditor_reference.

Returns:

  • (String)

    the current value of structured_creditor_reference



17
18
19
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 17

def structured_creditor_reference
  @structured_creditor_reference
end

Instance Method Details

#from_hash(hash) ⇒ Object



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 49

def from_hash(hash)
  super
  if hash.has_key? 'descriptor'
    @descriptor = hash['descriptor']
  end
  if hash.has_key? 'merchantComment'
    @merchant_comment = hash['merchantComment']
  end
  if hash.has_key? 'merchantParameters'
    @merchant_parameters = hash['merchantParameters']
  end
  if hash.has_key? 'merchantReconciliationReference'
    @merchant_reconciliation_reference = hash['merchantReconciliationReference']
  end
  if hash.has_key? 'merchantReference'
    @merchant_reference = hash['merchantReference']
  end
  if hash.has_key? 'operationGroupReference'
    @operation_group_reference = hash['operationGroupReference']
  end
  if hash.has_key? 'softDescriptor'
    @soft_descriptor = hash['softDescriptor']
  end
  if hash.has_key? 'structuredCreditorReference'
    @structured_creditor_reference = hash['structuredCreditorReference']
  end
end

#to_hHash

Returns:

  • (Hash)


36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/onlinepayments/sdk/domain/order_references.rb', line 36

def to_h
  hash = super
  hash['descriptor'] = @descriptor unless @descriptor.nil?
  hash['merchantComment'] = @merchant_comment unless @merchant_comment.nil?
  hash['merchantParameters'] = @merchant_parameters unless @merchant_parameters.nil?
  hash['merchantReconciliationReference'] = @merchant_reconciliation_reference unless @merchant_reconciliation_reference.nil?
  hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil?
  hash['operationGroupReference'] = @operation_group_reference unless @operation_group_reference.nil?
  hash['softDescriptor'] = @soft_descriptor unless @soft_descriptor.nil?
  hash['structuredCreditorReference'] = @structured_creditor_reference unless @structured_creditor_reference.nil?
  hash
end