Class: OnlinePayments::SDK::Domain::MandatePersonalNameResponse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#first_nameString

Returns the current value of first_name.

Returns:

  • (String)

    the current value of first_name



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

def first_name
  @first_name
end

#surnameString

Returns the current value of surname.

Returns:

  • (String)

    the current value of surname



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

def surname
  @surname
end

Instance Method Details

#from_hash(hash) ⇒ Object



23
24
25
26
27
# File 'lib/onlinepayments/sdk/domain/mandate_personal_name_response.rb', line 23

def from_hash(hash)
  super
  @first_name = hash['firstName'] if hash.key? 'firstName'
  @surname = hash['surname'] if hash.key? 'surname'
end

#to_hHash

Returns:

  • (Hash)


16
17
18
19
20
21
# File 'lib/onlinepayments/sdk/domain/mandate_personal_name_response.rb', line 16

def to_h
  hash = super
  hash['firstName'] = @first_name unless @first_name.nil?
  hash['surname'] = @surname unless @surname.nil?
  hash
end