Class: WhatsAppCloudApi::Types::GraphPaging
- Inherits:
-
Object
- Object
- WhatsAppCloudApi::Types::GraphPaging
- Defined in:
- lib/whatsapp_cloud_api/types.rb
Overview
Paging structures
Instance Attribute Summary collapse
-
#cursors ⇒ Object
readonly
Returns the value of attribute cursors.
-
#next_page ⇒ Object
readonly
Returns the value of attribute next_page.
-
#previous_page ⇒ Object
readonly
Returns the value of attribute previous_page.
Instance Method Summary collapse
- #after ⇒ Object
- #before ⇒ Object
-
#initialize(data) ⇒ GraphPaging
constructor
A new instance of GraphPaging.
Constructor Details
#initialize(data) ⇒ GraphPaging
Returns a new instance of GraphPaging.
106 107 108 109 110 |
# File 'lib/whatsapp_cloud_api/types.rb', line 106 def initialize(data) @cursors = data['cursors'] || {} @next_page = data['next'] @previous_page = data['previous'] end |
Instance Attribute Details
#cursors ⇒ Object (readonly)
Returns the value of attribute cursors.
104 105 106 |
# File 'lib/whatsapp_cloud_api/types.rb', line 104 def cursors @cursors end |
#next_page ⇒ Object (readonly)
Returns the value of attribute next_page.
104 105 106 |
# File 'lib/whatsapp_cloud_api/types.rb', line 104 def next_page @next_page end |
#previous_page ⇒ Object (readonly)
Returns the value of attribute previous_page.
104 105 106 |
# File 'lib/whatsapp_cloud_api/types.rb', line 104 def previous_page @previous_page end |
Instance Method Details
#after ⇒ Object
116 117 118 |
# File 'lib/whatsapp_cloud_api/types.rb', line 116 def after cursors['after'] end |
#before ⇒ Object
112 113 114 |
# File 'lib/whatsapp_cloud_api/types.rb', line 112 def before cursors['before'] end |