Class: WhatsAppCloudApi::Types::GraphPaging

Inherits:
Object
  • Object
show all
Defined in:
lib/whatsapp_cloud_api/types.rb

Overview

Paging structures

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cursorsObject (readonly)

Returns the value of attribute cursors.



104
105
106
# File 'lib/whatsapp_cloud_api/types.rb', line 104

def cursors
  @cursors
end

#next_pageObject (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_pageObject (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

#afterObject



116
117
118
# File 'lib/whatsapp_cloud_api/types.rb', line 116

def after
  cursors['after']
end

#beforeObject



112
113
114
# File 'lib/whatsapp_cloud_api/types.rb', line 112

def before
  cursors['before']
end