affixapi 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +19 -0
  4. data/README.md +374 -0
  5. data/Rakefile +10 -0
  6. data/affixapi.gemspec +38 -0
  7. data/docs/AddressNoNonNullRequest.md +26 -0
  8. data/docs/AddressResponse.md +26 -0
  9. data/docs/Class20230301Api.md +1401 -0
  10. data/docs/ClientRequest.md +24 -0
  11. data/docs/ClientResponse.md +26 -0
  12. data/docs/CompanyResponse.md +28 -0
  13. data/docs/CoreApi.md +69 -0
  14. data/docs/CreateEmployeeRequest.md +68 -0
  15. data/docs/CreateEmployeeRequestBankAccount.md +26 -0
  16. data/docs/CreateEmployeeRequestManager.md +26 -0
  17. data/docs/CurrencyRequest.md +15 -0
  18. data/docs/CurrencyResponse.md +15 -0
  19. data/docs/DeveloperApi.md +777 -0
  20. data/docs/DisconnectResponse.md +18 -0
  21. data/docs/EmployeeResponse.md +74 -0
  22. data/docs/EmploymentNoNullEnumRequest.md +30 -0
  23. data/docs/EmploymentResponse.md +30 -0
  24. data/docs/GroupNoNullEnumRequest.md +24 -0
  25. data/docs/GroupResponse.md +24 -0
  26. data/docs/IdAndMessageResponse.md +20 -0
  27. data/docs/IdentityResponse.md +22 -0
  28. data/docs/InlineResponse400.md +20 -0
  29. data/docs/InlineResponse401.md +22 -0
  30. data/docs/InlineResponse409.md +22 -0
  31. data/docs/IntrospectResponse.md +24 -0
  32. data/docs/LocationNoNonNullRequest.md +26 -0
  33. data/docs/LocationResponse.md +26 -0
  34. data/docs/ManagementApi.md +420 -0
  35. data/docs/MessageResponse.md +18 -0
  36. data/docs/ModeRequest.md +15 -0
  37. data/docs/ModeResponse.md +15 -0
  38. data/docs/OfficialApi.md +631 -0
  39. data/docs/PayrunResponse.md +30 -0
  40. data/docs/PayslipResponse.md +44 -0
  41. data/docs/PayslipResponseContributions.md +20 -0
  42. data/docs/PayslipResponseDeductions.md +20 -0
  43. data/docs/PayslipResponseEarnings.md +22 -0
  44. data/docs/PayslipResponseTaxes.md +22 -0
  45. data/docs/ProviderRequest.md +15 -0
  46. data/docs/ProviderResponse.md +15 -0
  47. data/docs/ScopesRequest.md +15 -0
  48. data/docs/ScopesResponse.md +15 -0
  49. data/docs/TimeOffBalanceResponse.md +32 -0
  50. data/docs/TimeOffEntryResponse.md +40 -0
  51. data/docs/TimesheetResponse.md +32 -0
  52. data/docs/TokenRequest.md +26 -0
  53. data/docs/TokenResponse.md +26 -0
  54. data/git_push.sh +58 -0
  55. data/lib/openapi_client/api/class20230301_api.rb +1198 -0
  56. data/lib/openapi_client/api/core_api.rb +79 -0
  57. data/lib/openapi_client/api/developer_api.rb +677 -0
  58. data/lib/openapi_client/api/management_api.rb +380 -0
  59. data/lib/openapi_client/api/official_api.rb +543 -0
  60. data/lib/openapi_client/api_client.rb +390 -0
  61. data/lib/openapi_client/api_error.rb +57 -0
  62. data/lib/openapi_client/configuration.rb +288 -0
  63. data/lib/openapi_client/models/address_no_non_null_request.rb +295 -0
  64. data/lib/openapi_client/models/address_response.rb +295 -0
  65. data/lib/openapi_client/models/client_request.rb +269 -0
  66. data/lib/openapi_client/models/client_response.rb +284 -0
  67. data/lib/openapi_client/models/company_response.rb +279 -0
  68. data/lib/openapi_client/models/create_employee_request.rb +568 -0
  69. data/lib/openapi_client/models/create_employee_request_bank_account.rb +259 -0
  70. data/lib/openapi_client/models/create_employee_request_manager.rb +263 -0
  71. data/lib/openapi_client/models/currency_request.rb +38 -0
  72. data/lib/openapi_client/models/currency_response.rb +38 -0
  73. data/lib/openapi_client/models/disconnect_response.rb +258 -0
  74. data/lib/openapi_client/models/employee_response.rb +608 -0
  75. data/lib/openapi_client/models/employment_no_null_enum_request.rb +329 -0
  76. data/lib/openapi_client/models/employment_response.rb +329 -0
  77. data/lib/openapi_client/models/group_no_null_enum_request.rb +283 -0
  78. data/lib/openapi_client/models/group_response.rb +283 -0
  79. data/lib/openapi_client/models/id_and_message_response.rb +239 -0
  80. data/lib/openapi_client/models/identity_response.rb +250 -0
  81. data/lib/openapi_client/models/inline_response400.rb +227 -0
  82. data/lib/openapi_client/models/inline_response401.rb +299 -0
  83. data/lib/openapi_client/models/inline_response409.rb +278 -0
  84. data/lib/openapi_client/models/introspect_response.rb +269 -0
  85. data/lib/openapi_client/models/location_no_non_null_request.rb +263 -0
  86. data/lib/openapi_client/models/location_response.rb +263 -0
  87. data/lib/openapi_client/models/message_response.rb +223 -0
  88. data/lib/openapi_client/models/mode_request.rb +37 -0
  89. data/lib/openapi_client/models/mode_response.rb +37 -0
  90. data/lib/openapi_client/models/payrun_response.rb +342 -0
  91. data/lib/openapi_client/models/payslip_response.rb +448 -0
  92. data/lib/openapi_client/models/payslip_response_contributions.rb +238 -0
  93. data/lib/openapi_client/models/payslip_response_deductions.rb +238 -0
  94. data/lib/openapi_client/models/payslip_response_earnings.rb +250 -0
  95. data/lib/openapi_client/models/payslip_response_taxes.rb +248 -0
  96. data/lib/openapi_client/models/provider_request.rb +70 -0
  97. data/lib/openapi_client/models/provider_response.rb +70 -0
  98. data/lib/openapi_client/models/scopes_request.rb +55 -0
  99. data/lib/openapi_client/models/scopes_response.rb +55 -0
  100. data/lib/openapi_client/models/time_off_balance_response.rb +342 -0
  101. data/lib/openapi_client/models/time_off_entry_response.rb +408 -0
  102. data/lib/openapi_client/models/timesheet_response.rb +318 -0
  103. data/lib/openapi_client/models/token_request.rb +318 -0
  104. data/lib/openapi_client/models/token_response.rb +318 -0
  105. data/lib/openapi_client/version.rb +15 -0
  106. data/lib/openapi_client.rb +86 -0
  107. data/openapi_client-0.0.1.gem +0 -0
  108. data/pkg/affixapi-0.0.1.gem +0 -0
  109. data/spec/api/class20230301_api_spec.rb +260 -0
  110. data/spec/api/core_api_spec.rb +46 -0
  111. data/spec/api/developer_api_spec.rb +160 -0
  112. data/spec/api/management_api_spec.rb +103 -0
  113. data/spec/api/official_api_spec.rb +135 -0
  114. data/spec/api_client_spec.rb +226 -0
  115. data/spec/configuration_spec.rb +42 -0
  116. data/spec/models/address_no_non_null_request_spec.rb +62 -0
  117. data/spec/models/address_response_spec.rb +62 -0
  118. data/spec/models/client_request_spec.rb +52 -0
  119. data/spec/models/client_response_spec.rb +58 -0
  120. data/spec/models/company_response_spec.rb +64 -0
  121. data/spec/models/create_employee_request_bank_account_spec.rb +58 -0
  122. data/spec/models/create_employee_request_manager_spec.rb +58 -0
  123. data/spec/models/create_employee_request_spec.rb +204 -0
  124. data/spec/models/currency_request_spec.rb +28 -0
  125. data/spec/models/currency_response_spec.rb +28 -0
  126. data/spec/models/disconnect_response_spec.rb +38 -0
  127. data/spec/models/employee_response_spec.rb +222 -0
  128. data/spec/models/employment_no_null_enum_request_spec.rb +78 -0
  129. data/spec/models/employment_response_spec.rb +78 -0
  130. data/spec/models/group_no_null_enum_request_spec.rb +56 -0
  131. data/spec/models/group_response_spec.rb +56 -0
  132. data/spec/models/id_and_message_response_spec.rb +40 -0
  133. data/spec/models/identity_response_spec.rb +46 -0
  134. data/spec/models/inline_response400_spec.rb +40 -0
  135. data/spec/models/inline_response401_spec.rb +54 -0
  136. data/spec/models/inline_response409_spec.rb +50 -0
  137. data/spec/models/introspect_response_spec.rb +52 -0
  138. data/spec/models/location_no_non_null_request_spec.rb +58 -0
  139. data/spec/models/location_response_spec.rb +58 -0
  140. data/spec/models/message_response_spec.rb +34 -0
  141. data/spec/models/mode_request_spec.rb +28 -0
  142. data/spec/models/mode_response_spec.rb +28 -0
  143. data/spec/models/payrun_response_spec.rb +78 -0
  144. data/spec/models/payslip_response_contributions_spec.rb +40 -0
  145. data/spec/models/payslip_response_deductions_spec.rb +40 -0
  146. data/spec/models/payslip_response_earnings_spec.rb +46 -0
  147. data/spec/models/payslip_response_spec.rb +116 -0
  148. data/spec/models/payslip_response_taxes_spec.rb +46 -0
  149. data/spec/models/provider_request_spec.rb +28 -0
  150. data/spec/models/provider_response_spec.rb +28 -0
  151. data/spec/models/scopes_request_spec.rb +28 -0
  152. data/spec/models/scopes_response_spec.rb +28 -0
  153. data/spec/models/time_off_balance_response_spec.rb +80 -0
  154. data/spec/models/time_off_entry_response_spec.rb +108 -0
  155. data/spec/models/timesheet_response_spec.rb +76 -0
  156. data/spec/models/token_request_spec.rb +62 -0
  157. data/spec/models/token_response_spec.rb +62 -0
  158. data/spec/spec_helper.rb +111 -0
  159. metadata +349 -0
@@ -0,0 +1,543 @@
1
+ =begin
2
+ #Affix API
3
+
4
+ #The affixapi.com API documentation. # Introduction Affix API is an OAuth 2.1 application that allows developers to access customer data, without developers needing to manage or maintain integrations; or collect login credentials or API keys from users for these third party systems. # OAuth 2.1 Affix API follows the [OAuth 2.1 spec](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-08). As an OAuth application, Affix API handles not only both the collection of sensitive user credentials or API keys, but also builds and maintains the integrations with the providers, so you don't have to. # How to obtain an access token in order to get started, you must: - register a `client_id` - direct your user to the sign in flow (`https://connect.affixapi.com` [with the appropriate query parameters](https://github.com/affixapi/starter-kit/tree/master/connect)) - capture `authorization_code` we will send to your redirect URI after the sign in flow is complete and exchange that `authorization_code` for a Bearer token # Sandbox keys (developer mode) ### dev ``` eyJhbGciOiJFUzI1NiIsImtpZCI6Ims5RmxwSFR1YklmZWNsUU5QRVZzeFcxazFZZ0Zfbk1BWllOSGVuOFQxdGciLCJ0eXAiOiJKV1MifQ.eyJwcm92aWRlciI6InNhbmRib3giLCJzY29wZXMiOlsiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL2NvbXBhbnkiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWUiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvZW1wbG95ZWVzIiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL2lkZW50aXR5IiwiLzIwMjMtMDMtMDEvZGV2ZWxvcGVyL3BheXJ1bnMiLCIvMjAyMy0wMy0wMS9kZXZlbG9wZXIvcGF5cnVucy86cGF5cnVuX2lkIiwiLzIwMjM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4MywiaXNzIjoicHVibGljYXBpLWludGVybWVkaWF0ZS5wcm9kLmVuZ2luZWVyaW5nLmFmZml4YXBpLmNvbSIsInN1YiI6ImRldmVsb3BlciIsImF1ZCI6IjA4QkIwODFFLUQ5QUI0RDE0LThERjk5MjMzLTY2NjE1Q0U5In0.2zdpFAmiyYiYk6MOcbXNUwwR4M1Fextnaac340x54AidiWXCyw-u9KeavbqfYF6q8a9kcDLrxhJ8Wc_3tIzuVw' \\ 'https://api.affixapi.com/2023-03-01/developer/employees' ``` # Webhooks An exciting feature for HR/Payroll modes are webhooks. If enabled, your `webhook_uri` is set on your `client_id` for the respective environment: `dev | prod` Webhooks are configured to make live requests to the underlying integration 1x/hr, and if a difference is detected since the last request, we will send a request to your `webhook_uri` with this shape: ``` { added: <api.v20230301.Employees>[ <api.v20230301.Employee>{ ..., date_of_birth: '2010-08-06', display_full_name: 'Daija Rogahn', employee_number: '57993', employment_status: 'pending', employment_type: 'other', employments: [ { currency: 'eur', effective_date: '2022-02-25', employment_type: 'other', job_title: 'Dynamic Implementation Manager', pay_frequency: 'semimonthly', pay_period: 'YEAR', pay_rate: 96000, }, ], first_name: 'Daija', ... } ], removed: [], updated: [ <api.v20230301.Employee>{ ..., date_of_birth: '2009-11-09', display_full_name: 'Lourdes Stiedemann', employee_number: '63189', employment_status: 'leave', employment_type: 'full_time', employments: [ { currency: 'gbp', effective_date: '2023-01-16', employment_type: 'full_time', job_title: 'Forward Brand Planner', pay_frequency: 'semimonthly', pay_period: 'YEAR', pay_rate: 86000, }, ], first_name: 'Lourdes', } ] } ``` the following headers will be sent with webhook requests: ``` x-affix-api-signature: ab8474e609db95d5df3adc39ea3add7a7544bd215c5c520a30a650ae93a2fba7 x-affix-api-origin: webhooks-employees-webhook user-agent: affixapi.com ``` Before trusting the payload, you should sign the payload and verify the signature matches the signature sent by the `affixapi.com` service. This secures that the data sent to your `webhook_uri` is from the `affixapi.com` server. The signature is created by combining the signing secret (your `client_secret`) with the body of the request sent using a standard HMAC-SHA256 keyed hash. The signature can be created via: - create an `HMAC` with your `client_secret` - update the `HMAC` with the payload - get the hex digest -> this is the signature Sample `typescript` code that follows this recipe: ``` import { createHmac } from 'crypto'; export const computeSignature = ({ str, signingSecret, }: { signingSecret: string; str: string; }): string => { const hmac = createHmac('sha256', signingSecret); hmac.update(str); const signature = hmac.digest('hex'); return signature; }; ``` ## Rate limits Open endpoints (not gated by an API key) (applied at endpoint level): - 15 requests every 1 minute (by IP address) - 25 requests every 5 minutes (by IP address) Gated endpoints (require an API key) (applied at endpoint level): - 40 requests every 1 minute (by IP address) - 40 requests every 5 minutes (by `client_id`) Things to keep in mind: - Open endpoints (not gated by an API key) will likely be called by your users, not you, so rate limits generally would not apply to you. - As a developer, rate limits are applied at the endpoint granularity. - For example, say the rate limits below are 10 requests per minute by ip. from that same ip, within 1 minute, you get: - 10 requests per minute on `/orders`, - another 10 requests per minute on `/items`, - and another 10 requests per minute on `/identity`, - for a total of 30 requests per minute.
5
+
6
+ The version of the OpenAPI document: 2023-03-01
7
+ Contact: developers@affixapi.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module OpenapiClient
16
+ class OfficialApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Company
23
+ # Retrieve company information
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [Array<CompanyResponse>]
26
+ def official_companies20230301(opts = {})
27
+ data, _status_code, _headers = official_companies20230301_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Company
32
+ # Retrieve company information
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(Array<CompanyResponse>, Integer, Hash)>] Array<CompanyResponse> data, response status code and response headers
35
+ def official_companies20230301_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: OfficialApi.official_companies20230301 ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/2023-03-01/official/company'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'Array<CompanyResponse>'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || ['access-token']
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"OfficialApi.official_companies20230301",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: OfficialApi#official_companies20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+
79
+ # Create Employee
80
+ # Creates a new Employee
81
+ # @param create_employee_request [CreateEmployeeRequest]
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [EmployeeResponse]
84
+ def official_create_employee20230301(create_employee_request, opts = {})
85
+ data, _status_code, _headers = official_create_employee20230301_with_http_info(create_employee_request, opts)
86
+ data
87
+ end
88
+
89
+ # Create Employee
90
+ # Creates a new Employee
91
+ # @param create_employee_request [CreateEmployeeRequest]
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [Array<(EmployeeResponse, Integer, Hash)>] EmployeeResponse data, response status code and response headers
94
+ def official_create_employee20230301_with_http_info(create_employee_request, opts = {})
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug 'Calling API: OfficialApi.official_create_employee20230301 ...'
97
+ end
98
+ # verify the required parameter 'create_employee_request' is set
99
+ if @api_client.config.client_side_validation && create_employee_request.nil?
100
+ fail ArgumentError, "Missing the required parameter 'create_employee_request' when calling OfficialApi.official_create_employee20230301"
101
+ end
102
+ # resource path
103
+ local_var_path = '/2023-03-01/official/employee'
104
+
105
+ # query parameters
106
+ query_params = opts[:query_params] || {}
107
+
108
+ # header parameters
109
+ header_params = opts[:header_params] || {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
112
+ # HTTP header 'Content-Type'
113
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
114
+
115
+ # form parameters
116
+ form_params = opts[:form_params] || {}
117
+
118
+ # http body (model)
119
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_employee_request)
120
+
121
+ # return_type
122
+ return_type = opts[:debug_return_type] || 'EmployeeResponse'
123
+
124
+ # auth_names
125
+ auth_names = opts[:debug_auth_names] || ['access-token']
126
+
127
+ new_options = opts.merge(
128
+ :operation => :"OfficialApi.official_create_employee20230301",
129
+ :header_params => header_params,
130
+ :query_params => query_params,
131
+ :form_params => form_params,
132
+ :body => post_body,
133
+ :auth_names => auth_names,
134
+ :return_type => return_type
135
+ )
136
+
137
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug "API called: OfficialApi#official_create_employee20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
+ end
141
+ return data, status_code, headers
142
+ end
143
+
144
+ # Employees
145
+ # List the individuals (employees, contractors, accountants, and others) listed in the HRIS/Payroll software
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [Array<EmployeeResponse>]
148
+ def official_employees20230301(opts = {})
149
+ data, _status_code, _headers = official_employees20230301_with_http_info(opts)
150
+ data
151
+ end
152
+
153
+ # Employees
154
+ # List the individuals (employees, contractors, accountants, and others) listed in the HRIS/Payroll software
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [Array<(Array<EmployeeResponse>, Integer, Hash)>] Array<EmployeeResponse> data, response status code and response headers
157
+ def official_employees20230301_with_http_info(opts = {})
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug 'Calling API: OfficialApi.official_employees20230301 ...'
160
+ end
161
+ # resource path
162
+ local_var_path = '/2023-03-01/official/employees'
163
+
164
+ # query parameters
165
+ query_params = opts[:query_params] || {}
166
+
167
+ # header parameters
168
+ header_params = opts[:header_params] || {}
169
+ # HTTP header 'Accept' (if needed)
170
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
171
+
172
+ # form parameters
173
+ form_params = opts[:form_params] || {}
174
+
175
+ # http body (model)
176
+ post_body = opts[:debug_body]
177
+
178
+ # return_type
179
+ return_type = opts[:debug_return_type] || 'Array<EmployeeResponse>'
180
+
181
+ # auth_names
182
+ auth_names = opts[:debug_auth_names] || ['access-token']
183
+
184
+ new_options = opts.merge(
185
+ :operation => :"OfficialApi.official_employees20230301",
186
+ :header_params => header_params,
187
+ :query_params => query_params,
188
+ :form_params => form_params,
189
+ :body => post_body,
190
+ :auth_names => auth_names,
191
+ :return_type => return_type
192
+ )
193
+
194
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug "API called: OfficialApi#official_employees20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
+ end
198
+ return data, status_code, headers
199
+ end
200
+
201
+ # Groups
202
+ # The Group object is used to represent any subset of employees, such as PayGroup, Team, or Department. Employees can be in multiple Groups.
203
+ # @param [Hash] opts the optional parameters
204
+ # @return [Array<GroupResponse>]
205
+ def official_groups20230301(opts = {})
206
+ data, _status_code, _headers = official_groups20230301_with_http_info(opts)
207
+ data
208
+ end
209
+
210
+ # Groups
211
+ # The Group object is used to represent any subset of employees, such as PayGroup, Team, or Department. Employees can be in multiple Groups.
212
+ # @param [Hash] opts the optional parameters
213
+ # @return [Array<(Array<GroupResponse>, Integer, Hash)>] Array<GroupResponse> data, response status code and response headers
214
+ def official_groups20230301_with_http_info(opts = {})
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug 'Calling API: OfficialApi.official_groups20230301 ...'
217
+ end
218
+ # resource path
219
+ local_var_path = '/2023-03-01/official/groups'
220
+
221
+ # query parameters
222
+ query_params = opts[:query_params] || {}
223
+
224
+ # header parameters
225
+ header_params = opts[:header_params] || {}
226
+ # HTTP header 'Accept' (if needed)
227
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
228
+
229
+ # form parameters
230
+ form_params = opts[:form_params] || {}
231
+
232
+ # http body (model)
233
+ post_body = opts[:debug_body]
234
+
235
+ # return_type
236
+ return_type = opts[:debug_return_type] || 'Array<GroupResponse>'
237
+
238
+ # auth_names
239
+ auth_names = opts[:debug_auth_names] || ['access-token']
240
+
241
+ new_options = opts.merge(
242
+ :operation => :"OfficialApi.official_groups20230301",
243
+ :header_params => header_params,
244
+ :query_params => query_params,
245
+ :form_params => form_params,
246
+ :body => post_body,
247
+ :auth_names => auth_names,
248
+ :return_type => return_type
249
+ )
250
+
251
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
252
+ if @api_client.config.debugging
253
+ @api_client.config.logger.debug "API called: OfficialApi#official_groups20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
254
+ end
255
+ return data, status_code, headers
256
+ end
257
+
258
+ # Time off balances
259
+ # Retrieve all time off balances.
260
+ # @param [Hash] opts the optional parameters
261
+ # @return [Array<TimeOffBalanceResponse>]
262
+ def official_time_off_balances20230301(opts = {})
263
+ data, _status_code, _headers = official_time_off_balances20230301_with_http_info(opts)
264
+ data
265
+ end
266
+
267
+ # Time off balances
268
+ # Retrieve all time off balances.
269
+ # @param [Hash] opts the optional parameters
270
+ # @return [Array<(Array<TimeOffBalanceResponse>, Integer, Hash)>] Array<TimeOffBalanceResponse> data, response status code and response headers
271
+ def official_time_off_balances20230301_with_http_info(opts = {})
272
+ if @api_client.config.debugging
273
+ @api_client.config.logger.debug 'Calling API: OfficialApi.official_time_off_balances20230301 ...'
274
+ end
275
+ # resource path
276
+ local_var_path = '/2023-03-01/official/time-off-balances'
277
+
278
+ # query parameters
279
+ query_params = opts[:query_params] || {}
280
+
281
+ # header parameters
282
+ header_params = opts[:header_params] || {}
283
+ # HTTP header 'Accept' (if needed)
284
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
285
+
286
+ # form parameters
287
+ form_params = opts[:form_params] || {}
288
+
289
+ # http body (model)
290
+ post_body = opts[:debug_body]
291
+
292
+ # return_type
293
+ return_type = opts[:debug_return_type] || 'Array<TimeOffBalanceResponse>'
294
+
295
+ # auth_names
296
+ auth_names = opts[:debug_auth_names] || ['access-token']
297
+
298
+ new_options = opts.merge(
299
+ :operation => :"OfficialApi.official_time_off_balances20230301",
300
+ :header_params => header_params,
301
+ :query_params => query_params,
302
+ :form_params => form_params,
303
+ :body => post_body,
304
+ :auth_names => auth_names,
305
+ :return_type => return_type
306
+ )
307
+
308
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
309
+ if @api_client.config.debugging
310
+ @api_client.config.logger.debug "API called: OfficialApi#official_time_off_balances20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
311
+ end
312
+ return data, status_code, headers
313
+ end
314
+
315
+ # Time off entries
316
+ # Retrieve time off / absence entries
317
+ # @param [Hash] opts the optional parameters
318
+ # @return [Array<TimeOffEntryResponse>]
319
+ def official_time_off_entries20230301(opts = {})
320
+ data, _status_code, _headers = official_time_off_entries20230301_with_http_info(opts)
321
+ data
322
+ end
323
+
324
+ # Time off entries
325
+ # Retrieve time off / absence entries
326
+ # @param [Hash] opts the optional parameters
327
+ # @return [Array<(Array<TimeOffEntryResponse>, Integer, Hash)>] Array<TimeOffEntryResponse> data, response status code and response headers
328
+ def official_time_off_entries20230301_with_http_info(opts = {})
329
+ if @api_client.config.debugging
330
+ @api_client.config.logger.debug 'Calling API: OfficialApi.official_time_off_entries20230301 ...'
331
+ end
332
+ # resource path
333
+ local_var_path = '/2023-03-01/official/time-off-entries'
334
+
335
+ # query parameters
336
+ query_params = opts[:query_params] || {}
337
+
338
+ # header parameters
339
+ header_params = opts[:header_params] || {}
340
+ # HTTP header 'Accept' (if needed)
341
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
342
+
343
+ # form parameters
344
+ form_params = opts[:form_params] || {}
345
+
346
+ # http body (model)
347
+ post_body = opts[:debug_body]
348
+
349
+ # return_type
350
+ return_type = opts[:debug_return_type] || 'Array<TimeOffEntryResponse>'
351
+
352
+ # auth_names
353
+ auth_names = opts[:debug_auth_names] || ['access-token']
354
+
355
+ new_options = opts.merge(
356
+ :operation => :"OfficialApi.official_time_off_entries20230301",
357
+ :header_params => header_params,
358
+ :query_params => query_params,
359
+ :form_params => form_params,
360
+ :body => post_body,
361
+ :auth_names => auth_names,
362
+ :return_type => return_type
363
+ )
364
+
365
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
366
+ if @api_client.config.debugging
367
+ @api_client.config.logger.debug "API called: OfficialApi#official_time_off_entries20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
368
+ end
369
+ return data, status_code, headers
370
+ end
371
+
372
+ # Timesheets
373
+ # Retrieve Timesheets
374
+ # @param [Hash] opts the optional parameters
375
+ # @return [Array<TimesheetResponse>]
376
+ def official_timesheets20230301(opts = {})
377
+ data, _status_code, _headers = official_timesheets20230301_with_http_info(opts)
378
+ data
379
+ end
380
+
381
+ # Timesheets
382
+ # Retrieve Timesheets
383
+ # @param [Hash] opts the optional parameters
384
+ # @return [Array<(Array<TimesheetResponse>, Integer, Hash)>] Array<TimesheetResponse> data, response status code and response headers
385
+ def official_timesheets20230301_with_http_info(opts = {})
386
+ if @api_client.config.debugging
387
+ @api_client.config.logger.debug 'Calling API: OfficialApi.official_timesheets20230301 ...'
388
+ end
389
+ # resource path
390
+ local_var_path = '/2023-03-01/official/timesheets'
391
+
392
+ # query parameters
393
+ query_params = opts[:query_params] || {}
394
+
395
+ # header parameters
396
+ header_params = opts[:header_params] || {}
397
+ # HTTP header 'Accept' (if needed)
398
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
399
+
400
+ # form parameters
401
+ form_params = opts[:form_params] || {}
402
+
403
+ # http body (model)
404
+ post_body = opts[:debug_body]
405
+
406
+ # return_type
407
+ return_type = opts[:debug_return_type] || 'Array<TimesheetResponse>'
408
+
409
+ # auth_names
410
+ auth_names = opts[:debug_auth_names] || ['access-token']
411
+
412
+ new_options = opts.merge(
413
+ :operation => :"OfficialApi.official_timesheets20230301",
414
+ :header_params => header_params,
415
+ :query_params => query_params,
416
+ :form_params => form_params,
417
+ :body => post_body,
418
+ :auth_names => auth_names,
419
+ :return_type => return_type
420
+ )
421
+
422
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
423
+ if @api_client.config.debugging
424
+ @api_client.config.logger.debug "API called: OfficialApi#official_timesheets20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
425
+ end
426
+ return data, status_code, headers
427
+ end
428
+
429
+ # Work locations
430
+ # The Location object is used to represent an address that can be associated with an employee
431
+ # @param [Hash] opts the optional parameters
432
+ # @return [Array<LocationResponse>]
433
+ def official_work_locations20230301(opts = {})
434
+ data, _status_code, _headers = official_work_locations20230301_with_http_info(opts)
435
+ data
436
+ end
437
+
438
+ # Work locations
439
+ # The Location object is used to represent an address that can be associated with an employee
440
+ # @param [Hash] opts the optional parameters
441
+ # @return [Array<(Array<LocationResponse>, Integer, Hash)>] Array<LocationResponse> data, response status code and response headers
442
+ def official_work_locations20230301_with_http_info(opts = {})
443
+ if @api_client.config.debugging
444
+ @api_client.config.logger.debug 'Calling API: OfficialApi.official_work_locations20230301 ...'
445
+ end
446
+ # resource path
447
+ local_var_path = '/2023-03-01/official/work-locations'
448
+
449
+ # query parameters
450
+ query_params = opts[:query_params] || {}
451
+
452
+ # header parameters
453
+ header_params = opts[:header_params] || {}
454
+ # HTTP header 'Accept' (if needed)
455
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
456
+
457
+ # form parameters
458
+ form_params = opts[:form_params] || {}
459
+
460
+ # http body (model)
461
+ post_body = opts[:debug_body]
462
+
463
+ # return_type
464
+ return_type = opts[:debug_return_type] || 'Array<LocationResponse>'
465
+
466
+ # auth_names
467
+ auth_names = opts[:debug_auth_names] || ['access-token']
468
+
469
+ new_options = opts.merge(
470
+ :operation => :"OfficialApi.official_work_locations20230301",
471
+ :header_params => header_params,
472
+ :query_params => query_params,
473
+ :form_params => form_params,
474
+ :body => post_body,
475
+ :auth_names => auth_names,
476
+ :return_type => return_type
477
+ )
478
+
479
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
480
+ if @api_client.config.debugging
481
+ @api_client.config.logger.debug "API called: OfficialApi#official_work_locations20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
482
+ end
483
+ return data, status_code, headers
484
+ end
485
+
486
+ # Identity
487
+ # List information of the user for the respective account
488
+ # @param [Hash] opts the optional parameters
489
+ # @return [IdentityResponse]
490
+ def officialdentity20230301(opts = {})
491
+ data, _status_code, _headers = officialdentity20230301_with_http_info(opts)
492
+ data
493
+ end
494
+
495
+ # Identity
496
+ # List information of the user for the respective account
497
+ # @param [Hash] opts the optional parameters
498
+ # @return [Array<(IdentityResponse, Integer, Hash)>] IdentityResponse data, response status code and response headers
499
+ def officialdentity20230301_with_http_info(opts = {})
500
+ if @api_client.config.debugging
501
+ @api_client.config.logger.debug 'Calling API: OfficialApi.officialdentity20230301 ...'
502
+ end
503
+ # resource path
504
+ local_var_path = '/2023-03-01/official/identity'
505
+
506
+ # query parameters
507
+ query_params = opts[:query_params] || {}
508
+
509
+ # header parameters
510
+ header_params = opts[:header_params] || {}
511
+ # HTTP header 'Accept' (if needed)
512
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
513
+
514
+ # form parameters
515
+ form_params = opts[:form_params] || {}
516
+
517
+ # http body (model)
518
+ post_body = opts[:debug_body]
519
+
520
+ # return_type
521
+ return_type = opts[:debug_return_type] || 'IdentityResponse'
522
+
523
+ # auth_names
524
+ auth_names = opts[:debug_auth_names] || ['access-token']
525
+
526
+ new_options = opts.merge(
527
+ :operation => :"OfficialApi.officialdentity20230301",
528
+ :header_params => header_params,
529
+ :query_params => query_params,
530
+ :form_params => form_params,
531
+ :body => post_body,
532
+ :auth_names => auth_names,
533
+ :return_type => return_type
534
+ )
535
+
536
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
537
+ if @api_client.config.debugging
538
+ @api_client.config.logger.debug "API called: OfficialApi#officialdentity20230301\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
539
+ end
540
+ return data, status_code, headers
541
+ end
542
+ end
543
+ end