Class: OnlinePayments::SDK::Domain::SessionDetails
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::SessionDetails
- Defined in:
- lib/onlinepayments/sdk/domain/session_details.rb
Instance Attribute Summary collapse
-
#id ⇒ String
The current value of id.
-
#type ⇒ String
The current value of type.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#id ⇒ String
Returns the current value of id.
11 12 13 |
# File 'lib/onlinepayments/sdk/domain/session_details.rb', line 11 def id @id end |
#type ⇒ String
Returns the current value of type.
11 12 13 |
# File 'lib/onlinepayments/sdk/domain/session_details.rb', line 11 def type @type end |
Instance Method Details
#from_hash(hash) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/onlinepayments/sdk/domain/session_details.rb', line 25 def from_hash(hash) super if hash.has_key? 'id' @id = hash['id'] end if hash.has_key? 'type' @type = hash['type'] end end |
#to_h ⇒ Hash
18 19 20 21 22 23 |
# File 'lib/onlinepayments/sdk/domain/session_details.rb', line 18 def to_h hash = super hash['id'] = @id unless @id.nil? hash['type'] = @type unless @type.nil? hash end |