Class: OnlinePayments::SDK::Domain::MandateContactDetails

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#email_addressString

Returns the current value of email_address.

Returns:

  • (String)

    the current value of email_address



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

def email_address
  @email_address
end

#phone_numberString

Returns the current value of phone_number.

Returns:

  • (String)

    the current value of phone_number



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

def phone_number
  @phone_number
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

def from_hash(hash)
  super
  if hash.has_key? 'emailAddress'
    @email_address = hash['emailAddress']
  end
  if hash.has_key? 'phoneNumber'
    @phone_number = hash['phoneNumber']
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['emailAddress'] = @email_address unless @email_address.nil?
  hash['phoneNumber'] = @phone_number unless @phone_number.nil?
  hash
end