Class: Worldline::Connect::SDK::V1::Domain::CustomerTokenWithContactDetails
- Inherits:
-
CustomerToken
- Object
- Domain::DataObject
- CustomerBase
- CustomerToken
- Worldline::Connect::SDK::V1::Domain::CustomerTokenWithContactDetails
- Defined in:
- lib/worldline/connect/sdk/v1/domain/customer_token_with_contact_details.rb
Instance Attribute Summary collapse
-
#contact_details ⇒ Worldline::Connect::SDK::V1::Domain::ContactDetailsToken
The current value of contact_details.
Attributes inherited from CustomerToken
#billing_address, #personal_information
Attributes inherited from CustomerBase
#company_information, #merchant_customer_id, #vat_number
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#contact_details ⇒ Worldline::Connect::SDK::V1::Domain::ContactDetailsToken
Returns the current value of contact_details.
14 15 16 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_token_with_contact_details.rb', line 14 def contact_details @contact_details end |
Instance Method Details
#from_hash(hash) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_token_with_contact_details.rb', line 25 def from_hash(hash) super if hash.has_key? 'contactDetails' raise TypeError, "value '%s' is not a Hash" % [hash['contactDetails']] unless hash['contactDetails'].is_a? Hash @contact_details = Worldline::Connect::SDK::V1::Domain::ContactDetailsToken.new_from_hash(hash['contactDetails']) end end |
#to_h ⇒ Hash
19 20 21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/customer_token_with_contact_details.rb', line 19 def to_h hash = super hash['contactDetails'] = @contact_details.to_h unless @contact_details.nil? hash end |