Class: OnlinePayments::SDK::Domain::ContactDetails
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::ContactDetails
- Defined in:
- lib/onlinepayments/sdk/domain/contact_details.rb
Instance Attribute Summary collapse
-
#email_address ⇒ String
The current value of email_address.
-
#fax_number ⇒ String
The current value of fax_number.
-
#mobile_phone_number ⇒ String
The current value of mobile_phone_number.
-
#phone_number ⇒ String
The current value of phone_number.
-
#work_phone_number ⇒ String
The current value of work_phone_number.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#email_address ⇒ String
Returns 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_number ⇒ String
Returns 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_number ⇒ String
Returns 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_number ⇒ String
Returns 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_number ⇒ String
Returns 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_h ⇒ 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 |