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