Class: OnlinePayments::SDK::Domain::PersonalInformationToken
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::PersonalInformationToken
- Defined in:
- lib/onlinepayments/sdk/domain/personal_information_token.rb
Instance Attribute Summary collapse
-
#name ⇒ OnlinePayments::SDK::Domain::PersonalNameToken
The current value of name.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#name ⇒ OnlinePayments::SDK::Domain::PersonalNameToken
Returns the current value of name.
11 12 13 |
# File 'lib/onlinepayments/sdk/domain/personal_information_token.rb', line 11 def name @name end |
Instance Method Details
#from_hash(hash) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/onlinepayments/sdk/domain/personal_information_token.rb', line 21 def from_hash(hash) super if hash.key? 'name' raise TypeError, "value '%s' is not a Hash" % [hash['name']] unless hash['name'].is_a? Hash @name = OnlinePayments::SDK::Domain::PersonalNameToken.new_from_hash(hash['name']) end end |
#to_h ⇒ Hash
15 16 17 18 19 |
# File 'lib/onlinepayments/sdk/domain/personal_information_token.rb', line 15 def to_h hash = super hash['name'] = @name.to_h if @name hash end |