Class: OnlinePayments::SDK::Domain::PaymentProduct5001SpecificOutput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#account_numberString

Returns the current value of account_number.

Returns:

  • (String)

    the current value of account_number



14
15
16
# File 'lib/onlinepayments/sdk/domain/payment_product5001_specific_output.rb', line 14

def 
  @account_number
end

#authorisation_codeString

Returns the current value of authorisation_code.

Returns:

  • (String)

    the current value of authorisation_code



14
15
16
# File 'lib/onlinepayments/sdk/domain/payment_product5001_specific_output.rb', line 14

def authorisation_code
  @authorisation_code
end

#liabilityString

Returns the current value of liability.

Returns:

  • (String)

    the current value of liability



14
15
16
# File 'lib/onlinepayments/sdk/domain/payment_product5001_specific_output.rb', line 14

def liability
  @liability
end

#mobile_phone_numberString

Returns the current value of mobile_phone_number.

Returns:

  • (String)

    the current value of mobile_phone_number



14
15
16
# File 'lib/onlinepayments/sdk/domain/payment_product5001_specific_output.rb', line 14

def mobile_phone_number
  @mobile_phone_number
end

#operation_codeString

Returns the current value of operation_code.

Returns:

  • (String)

    the current value of operation_code



14
15
16
# File 'lib/onlinepayments/sdk/domain/payment_product5001_specific_output.rb', line 14

def operation_code
  @operation_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/onlinepayments/sdk/domain/payment_product5001_specific_output.rb', line 37

def from_hash(hash)
  super
  if hash.has_key? 'accountNumber'
    @account_number = hash['accountNumber']
  end
  if hash.has_key? 'authorisationCode'
    @authorisation_code = hash['authorisationCode']
  end
  if hash.has_key? 'liability'
    @liability = hash['liability']
  end
  if hash.has_key? 'mobilePhoneNumber'
    @mobile_phone_number = hash['mobilePhoneNumber']
  end
  if hash.has_key? 'operationCode'
    @operation_code = hash['operationCode']
  end
end

#to_hHash

Returns:

  • (Hash)


27
28
29
30
31
32
33
34
35
# File 'lib/onlinepayments/sdk/domain/payment_product5001_specific_output.rb', line 27

def to_h
  hash = super
  hash['accountNumber'] = @account_number unless @account_number.nil?
  hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
  hash['liability'] = @liability unless @liability.nil?
  hash['mobilePhoneNumber'] = @mobile_phone_number unless @mobile_phone_number.nil?
  hash['operationCode'] = @operation_code unless @operation_code.nil?
  hash
end