Class: TheCompaniesAPI::Generated::Models::PaginationMeta
- Inherits:
-
Object
- Object
- TheCompaniesAPI::Generated::Models::PaginationMeta
- Defined in:
- lib/thecompaniesapi/generated/models/pagination_meta.rb
Overview
Metadata about a paginated or billed response.
Instance Attribute Summary collapse
-
#cost ⇒ Float
Cost.
-
#credits ⇒ Float
Credits.
-
#current_page ⇒ Float
CurrentPage.
-
#first_page ⇒ Float
FirstPage.
-
#free_request ⇒ Boolean
FreeRequest.
-
#last_page ⇒ Float
LastPage.
-
#max_scroll_results_reached ⇒ Boolean
MaxScrollResultsReached.
-
#per_page ⇒ Float
PerPage.
-
#total ⇒ Float
Total.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ PaginationMeta
constructor
Initialize a new PaginationMeta.
-
#to_hash ⇒ Hash
(also: #to_h)
Convert to hash.
Constructor Details
#initialize(data = {}) ⇒ PaginationMeta
Initialize a new PaginationMeta
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/thecompaniesapi/generated/models/pagination_meta.rb', line 42 def initialize(data = {}) @cost = data['cost'] @credits = data['credits'] @current_page = data['currentPage'] @first_page = data['firstPage'] @free_request = data['freeRequest'] @last_page = data['lastPage'] @max_scroll_results_reached = data['maxScrollResultsReached'] @per_page = data['perPage'] @total = data['total'] end |
Instance Attribute Details
#cost ⇒ Float
Returns cost.
12 13 14 |
# File 'lib/thecompaniesapi/generated/models/pagination_meta.rb', line 12 def cost @cost end |
#credits ⇒ Float
Returns credits.
15 16 17 |
# File 'lib/thecompaniesapi/generated/models/pagination_meta.rb', line 15 def credits @credits end |
#current_page ⇒ Float
Returns currentPage.
18 19 20 |
# File 'lib/thecompaniesapi/generated/models/pagination_meta.rb', line 18 def current_page @current_page end |
#first_page ⇒ Float
Returns firstPage.
21 22 23 |
# File 'lib/thecompaniesapi/generated/models/pagination_meta.rb', line 21 def first_page @first_page end |
#free_request ⇒ Boolean
Returns freeRequest.
24 25 26 |
# File 'lib/thecompaniesapi/generated/models/pagination_meta.rb', line 24 def free_request @free_request end |
#last_page ⇒ Float
Returns lastPage.
27 28 29 |
# File 'lib/thecompaniesapi/generated/models/pagination_meta.rb', line 27 def last_page @last_page end |
#max_scroll_results_reached ⇒ Boolean
Returns maxScrollResultsReached.
30 31 32 |
# File 'lib/thecompaniesapi/generated/models/pagination_meta.rb', line 30 def max_scroll_results_reached @max_scroll_results_reached end |
#per_page ⇒ Float
Returns perPage.
33 34 35 |
# File 'lib/thecompaniesapi/generated/models/pagination_meta.rb', line 33 def per_page @per_page end |
#total ⇒ Float
Returns total.
36 37 38 |
# File 'lib/thecompaniesapi/generated/models/pagination_meta.rb', line 36 def total @total end |
Instance Method Details
#to_hash ⇒ Hash Also known as: to_h
Convert to hash
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/thecompaniesapi/generated/models/pagination_meta.rb', line 58 def to_hash { 'cost' => @cost, 'credits' => @credits, 'currentPage' => @current_page, 'firstPage' => @first_page, 'freeRequest' => @free_request, 'lastPage' => @last_page, 'maxScrollResultsReached' => @max_scroll_results_reached, 'perPage' => @per_page, 'total' => @total, } end |