Class: Ingenico::Connect::SDK::Domain::Token::CustomerTokenWithContactDetails
- Inherits:
-
CustomerToken
- Object
- Ingenico::Connect::SDK::DataObject
- Definitions::CustomerBase
- CustomerToken
- Ingenico::Connect::SDK::Domain::Token::CustomerTokenWithContactDetails
- Defined in:
- lib/ingenico/connect/sdk/domain/token/customer_token_with_contact_details.rb
Instance Attribute Summary collapse
-
#contact_details ⇒ Ingenico::Connect::SDK::Domain::Token::ContactDetailsToken
The current value of contact_details.
Attributes inherited from CustomerToken
#billing_address, #personal_information
Attributes inherited from Definitions::CustomerBase
#company_information, #merchant_customer_id, #vat_number
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#contact_details ⇒ Ingenico::Connect::SDK::Domain::Token::ContactDetailsToken
Returns the current value of contact_details.
13 14 15 |
# File 'lib/ingenico/connect/sdk/domain/token/customer_token_with_contact_details.rb', line 13 def contact_details @contact_details end |
Instance Method Details
#from_hash(hash) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/ingenico/connect/sdk/domain/token/customer_token_with_contact_details.rb', line 24 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 = Ingenico::Connect::SDK::Domain::Token::ContactDetailsToken.new_from_hash(hash['contactDetails']) end end |
#to_h ⇒ Hash
18 19 20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/token/customer_token_with_contact_details.rb', line 18 def to_h hash = super hash['contactDetails'] = @contact_details.to_h unless @contact_details.nil? hash end |