Class: OnlinePayments::SDK::Domain::ContactDetails

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#email_addressString

Returns the current value of email_address.

Returns:

  • (String)

    the current value of email_address



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

def email_address
  @email_address
end

#fax_numberString

Returns the current value of fax_number.

Returns:

  • (String)

    the current value of fax_number



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

def fax_number
  @fax_number
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/contact_details.rb', line 14

def mobile_phone_number
  @mobile_phone_number
end

#phone_numberString

Returns the current value of phone_number.

Returns:

  • (String)

    the current value of phone_number



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

def phone_number
  @phone_number
end

#work_phone_numberString

Returns the current value of work_phone_number.

Returns:

  • (String)

    the current value of work_phone_number



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

def work_phone_number
  @work_phone_number
end

Instance Method Details

#from_hash(hash) ⇒ Object



32
33
34
35
36
37
38
39
# File 'lib/onlinepayments/sdk/domain/contact_details.rb', line 32

def from_hash(hash)
  super
  @email_address = hash['emailAddress'] if hash.key? 'emailAddress'
  @fax_number = hash['faxNumber'] if hash.key? 'faxNumber'
  @mobile_phone_number = hash['mobilePhoneNumber'] if hash.key? 'mobilePhoneNumber'
  @phone_number = hash['phoneNumber'] if hash.key? 'phoneNumber'
  @work_phone_number = hash['workPhoneNumber'] if hash.key? 'workPhoneNumber'
end

#to_hHash

Returns:

  • (Hash)


22
23
24
25
26
27
28
29
30
# File 'lib/onlinepayments/sdk/domain/contact_details.rb', line 22

def to_h
  hash = super
  hash['emailAddress'] = @email_address unless @email_address.nil?
  hash['faxNumber'] = @fax_number unless @fax_number.nil?
  hash['mobilePhoneNumber'] = @mobile_phone_number unless @mobile_phone_number.nil?
  hash['phoneNumber'] = @phone_number unless @phone_number.nil?
  hash['workPhoneNumber'] = @work_phone_number unless @work_phone_number.nil?
  hash
end