Class: FastpixApiSDK::Models::Components::Pagination

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/fastpix_api_sdk/models/components/pagination.rb

Overview

Pagination organizes content into pages for better readability and navigation.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(total_records: nil, current_offset: nil, offset_count: nil) ⇒ Pagination

Returns a new instance of Pagination.



24
25
26
27
28
# File 'lib/fastpix_api_sdk/models/components/pagination.rb', line 24

def initialize(total_records: nil, current_offset: nil, offset_count: nil)
  @total_records = total_records
  @current_offset = current_offset
  @offset_count = offset_count
end

Instance Method Details

#==(other) ⇒ Object



31
32
33
34
35
36
37
# File 'lib/fastpix_api_sdk/models/components/pagination.rb', line 31

def ==(other)
  return false unless other.is_a? self.class
  return false unless @total_records == other.total_records
  return false unless @current_offset == other.current_offset
  return false unless @offset_count == other.offset_count
  true
end