Class: StackOne::Models::Operations::HrisListDepartmentGroupsResponse

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/stack_one/models/operations/hris_list_department_groups_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(content_type:, headers:, status_code:, raw_response:, hris_departments_paginated: nil) ⇒ HrisListDepartmentGroupsResponse

Returns a new instance of HrisListDepartmentGroupsResponse.



29
30
31
32
33
34
35
# File 'lib/stack_one/models/operations/hris_list_department_groups_response.rb', line 29

def initialize(content_type:, headers:, status_code:, raw_response:, hris_departments_paginated: nil)
  @content_type = content_type
  @headers = headers
  @status_code = status_code
  @raw_response = raw_response
  @hris_departments_paginated = hris_departments_paginated
end

Instance Attribute Details

#next_pageObject

Returns the value of attribute next_page.



15
16
17
# File 'lib/stack_one/models/operations/hris_list_department_groups_response.rb', line 15

def next_page
  @next_page
end

Instance Method Details

#==(other) ⇒ Object



38
39
40
41
42
43
44
45
46
# File 'lib/stack_one/models/operations/hris_list_department_groups_response.rb', line 38

def ==(other)
  return false unless other.is_a? self.class
  return false unless @content_type == other.content_type
  return false unless @headers == other.headers
  return false unless @status_code == other.status_code
  return false unless @raw_response == other.raw_response
  return false unless @hris_departments_paginated == other.hris_departments_paginated
  true
end

#eachObject



48
49
50
51
52
53
54
55
56
# File 'lib/stack_one/models/operations/hris_list_department_groups_response.rb', line 48

def each
  page = self
  loop do
    yield page
    next_page = page.next_page.call if page.next_page
    break if next_page.nil?
    page = T.must(next_page)
  end
end