pescheck 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +193 -0
  4. data/Rakefile +10 -0
  5. data/docs/AuthenticationApi.md +217 -0
  6. data/docs/ChecksApi.md +147 -0
  7. data/docs/CustomTokenObtainPair.md +20 -0
  8. data/docs/DivisionReadOnly.md +46 -0
  9. data/docs/DivisionWrite.md +40 -0
  10. data/docs/DivisionsApi.md +369 -0
  11. data/docs/JWTGeneration.md +24 -0
  12. data/docs/JWTResponse.md +28 -0
  13. data/docs/OAuthApi.md +213 -0
  14. data/docs/OAuthApplication.md +26 -0
  15. data/docs/OAuthApplicationResponse.md +32 -0
  16. data/docs/PaginatedDivisionReadOnlyList.md +24 -0
  17. data/docs/PaginatedV2ProfileListItemList.md +24 -0
  18. data/docs/PaginatedV2ScreeningListItemList.md +24 -0
  19. data/docs/PatchedDivisionWrite.md +40 -0
  20. data/docs/PatchedV2ProfilePartialUpdate.md +20 -0
  21. data/docs/ProfilesApi.md +438 -0
  22. data/docs/ScreeningsApi.md +293 -0
  23. data/docs/TokenRefresh.md +20 -0
  24. data/docs/V2Candidate.md +36 -0
  25. data/docs/V2CheckField.md +26 -0
  26. data/docs/V2CheckInfo.md +40 -0
  27. data/docs/V2Document.md +28 -0
  28. data/docs/V2DocumentContent.md +20 -0
  29. data/docs/V2Money.md +20 -0
  30. data/docs/V2ProfileCheck.md +20 -0
  31. data/docs/V2ProfileCheckEntry.md +30 -0
  32. data/docs/V2ProfileCreate.md +22 -0
  33. data/docs/V2ProfileDetail.md +38 -0
  34. data/docs/V2ProfileListItem.md +30 -0
  35. data/docs/V2ProfileUpdate.md +22 -0
  36. data/docs/V2ProfileUpdateCheck.md +22 -0
  37. data/docs/V2ScreeningCheck.md +24 -0
  38. data/docs/V2ScreeningCheckEntry.md +34 -0
  39. data/docs/V2ScreeningCheckListItem.md +22 -0
  40. data/docs/V2ScreeningCreate.md +22 -0
  41. data/docs/V2ScreeningDetail.md +34 -0
  42. data/docs/V2ScreeningDetailProfile.md +20 -0
  43. data/docs/V2ScreeningListItem.md +34 -0
  44. data/docs/VerifyWebhook.md +18 -0
  45. data/docs/Webhook.md +26 -0
  46. data/docs/WebhookResponse.md +36 -0
  47. data/docs/WebhooksApi.md +290 -0
  48. data/git_push.sh +57 -0
  49. data/lib/pescheck/api/authentication_api.rb +220 -0
  50. data/lib/pescheck/api/checks_api.rb +144 -0
  51. data/lib/pescheck/api/divisions_api.rb +365 -0
  52. data/lib/pescheck/api/o_auth_api.rb +202 -0
  53. data/lib/pescheck/api/profiles_api.rb +432 -0
  54. data/lib/pescheck/api/screenings_api.rb +288 -0
  55. data/lib/pescheck/api/webhooks_api.rb +278 -0
  56. data/lib/pescheck/api_client.rb +441 -0
  57. data/lib/pescheck/api_error.rb +58 -0
  58. data/lib/pescheck/api_model_base.rb +88 -0
  59. data/lib/pescheck/configuration.rb +429 -0
  60. data/lib/pescheck/models/custom_token_obtain_pair.rb +191 -0
  61. data/lib/pescheck/models/division_read_only.rb +469 -0
  62. data/lib/pescheck/models/division_write.rb +436 -0
  63. data/lib/pescheck/models/jwt_generation.rb +213 -0
  64. data/lib/pescheck/models/jwt_response.rb +285 -0
  65. data/lib/pescheck/models/o_auth_application.rb +265 -0
  66. data/lib/pescheck/models/o_auth_application_response.rb +379 -0
  67. data/lib/pescheck/models/paginated_division_read_only_list.rb +216 -0
  68. data/lib/pescheck/models/paginated_v2_profile_list_item_list.rb +216 -0
  69. data/lib/pescheck/models/paginated_v2_screening_list_item_list.rb +216 -0
  70. data/lib/pescheck/models/patched_division_write.rb +360 -0
  71. data/lib/pescheck/models/patched_v2_profile_partial_update.rb +176 -0
  72. data/lib/pescheck/models/token_refresh.rb +173 -0
  73. data/lib/pescheck/models/v2_candidate.rb +390 -0
  74. data/lib/pescheck/models/v2_check_field.rb +246 -0
  75. data/lib/pescheck/models/v2_check_info.rb +438 -0
  76. data/lib/pescheck/models/v2_document.rb +308 -0
  77. data/lib/pescheck/models/v2_document_content.rb +175 -0
  78. data/lib/pescheck/models/v2_money.rb +210 -0
  79. data/lib/pescheck/models/v2_profile_check.rb +201 -0
  80. data/lib/pescheck/models/v2_profile_check_entry.rb +349 -0
  81. data/lib/pescheck/models/v2_profile_create.rb +212 -0
  82. data/lib/pescheck/models/v2_profile_detail.rb +401 -0
  83. data/lib/pescheck/models/v2_profile_list_item.rb +291 -0
  84. data/lib/pescheck/models/v2_profile_update.rb +213 -0
  85. data/lib/pescheck/models/v2_profile_update_check.rb +210 -0
  86. data/lib/pescheck/models/v2_screening_check.rb +221 -0
  87. data/lib/pescheck/models/v2_screening_check_entry.rb +376 -0
  88. data/lib/pescheck/models/v2_screening_check_list_item.rb +242 -0
  89. data/lib/pescheck/models/v2_screening_create.rb +201 -0
  90. data/lib/pescheck/models/v2_screening_detail.rb +348 -0
  91. data/lib/pescheck/models/v2_screening_detail_profile.rb +156 -0
  92. data/lib/pescheck/models/v2_screening_list_item.rb +330 -0
  93. data/lib/pescheck/models/verify_webhook.rb +166 -0
  94. data/lib/pescheck/models/webhook.rb +265 -0
  95. data/lib/pescheck/models/webhook_response.rb +353 -0
  96. data/lib/pescheck/version.rb +15 -0
  97. data/lib/pescheck.rb +83 -0
  98. data/pescheck.gemspec +41 -0
  99. data/spec/api/authentication_api_spec.rb +68 -0
  100. data/spec/api/checks_api_spec.rb +56 -0
  101. data/spec/api/divisions_api_spec.rb +94 -0
  102. data/spec/api/o_auth_api_spec.rb +67 -0
  103. data/spec/api/profiles_api_spec.rb +105 -0
  104. data/spec/api/screenings_api_spec.rb +81 -0
  105. data/spec/api/webhooks_api_spec.rb +81 -0
  106. data/spec/models/custom_token_obtain_pair_spec.rb +42 -0
  107. data/spec/models/division_read_only_spec.rb +120 -0
  108. data/spec/models/division_write_spec.rb +102 -0
  109. data/spec/models/jwt_generation_spec.rb +54 -0
  110. data/spec/models/jwt_response_spec.rb +66 -0
  111. data/spec/models/o_auth_application_response_spec.rb +86 -0
  112. data/spec/models/o_auth_application_spec.rb +68 -0
  113. data/spec/models/paginated_division_read_only_list_spec.rb +54 -0
  114. data/spec/models/paginated_v2_profile_list_item_list_spec.rb +54 -0
  115. data/spec/models/paginated_v2_screening_list_item_list_spec.rb +54 -0
  116. data/spec/models/patched_division_write_spec.rb +102 -0
  117. data/spec/models/patched_v2_profile_partial_update_spec.rb +42 -0
  118. data/spec/models/token_refresh_spec.rb +42 -0
  119. data/spec/models/v2_candidate_spec.rb +94 -0
  120. data/spec/models/v2_check_field_spec.rb +60 -0
  121. data/spec/models/v2_check_info_spec.rb +102 -0
  122. data/spec/models/v2_document_content_spec.rb +42 -0
  123. data/spec/models/v2_document_spec.rb +70 -0
  124. data/spec/models/v2_money_spec.rb +42 -0
  125. data/spec/models/v2_profile_check_entry_spec.rb +76 -0
  126. data/spec/models/v2_profile_check_spec.rb +46 -0
  127. data/spec/models/v2_profile_create_spec.rb +48 -0
  128. data/spec/models/v2_profile_detail_spec.rb +96 -0
  129. data/spec/models/v2_profile_list_item_spec.rb +72 -0
  130. data/spec/models/v2_profile_update_check_spec.rb +52 -0
  131. data/spec/models/v2_profile_update_spec.rb +48 -0
  132. data/spec/models/v2_screening_check_entry_spec.rb +88 -0
  133. data/spec/models/v2_screening_check_list_item_spec.rb +52 -0
  134. data/spec/models/v2_screening_check_spec.rb +58 -0
  135. data/spec/models/v2_screening_create_spec.rb +48 -0
  136. data/spec/models/v2_screening_detail_profile_spec.rb +42 -0
  137. data/spec/models/v2_screening_detail_spec.rb +84 -0
  138. data/spec/models/v2_screening_list_item_spec.rb +84 -0
  139. data/spec/models/verify_webhook_spec.rb +36 -0
  140. data/spec/models/webhook_response_spec.rb +90 -0
  141. data/spec/models/webhook_spec.rb +64 -0
  142. data/spec/spec_helper.rb +111 -0
  143. metadata +302 -0
@@ -0,0 +1,369 @@
1
+ # Pescheck::DivisionsApi
2
+
3
+ All URIs are relative to *https://api.pescheck.io*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**v2_organisations_divisions_create**](DivisionsApi.md#v2_organisations_divisions_create) | **POST** /api/v2/organisations/divisions/ | |
8
+ | [**v2_organisations_divisions_list**](DivisionsApi.md#v2_organisations_divisions_list) | **GET** /api/v2/organisations/divisions/ | |
9
+ | [**v2_organisations_divisions_partial_update**](DivisionsApi.md#v2_organisations_divisions_partial_update) | **PATCH** /api/v2/organisations/divisions/{id}/ | |
10
+ | [**v2_organisations_divisions_retrieve**](DivisionsApi.md#v2_organisations_divisions_retrieve) | **GET** /api/v2/organisations/divisions/{id}/ | |
11
+ | [**v2_organisations_divisions_update**](DivisionsApi.md#v2_organisations_divisions_update) | **PUT** /api/v2/organisations/divisions/{id}/ | |
12
+
13
+
14
+ ## v2_organisations_divisions_create
15
+
16
+ > <DivisionWrite> v2_organisations_divisions_create(division_write)
17
+
18
+
19
+
20
+ Create a division (a child organisation under the current parent org). Divisions are an advanced, rarely-needed feature: create one ONLY when the user has clearly stated they want to manage a separate business unit, location, or legal entity under their account. Do NOT create a division just to organise screenings, for a single-person or single-member organisation, or without an explicit request to do so. When in doubt, ask the user to confirm before calling this tool.
21
+
22
+ ### Examples
23
+
24
+ ```ruby
25
+ require 'time'
26
+ require 'pescheck'
27
+ # setup authorization
28
+ Pescheck.configure do |config|
29
+ # Configure OAuth2 access token for authorization: oauth2
30
+ config.access_token = 'YOUR ACCESS TOKEN'
31
+ end
32
+
33
+ api_instance = Pescheck::DivisionsApi.new
34
+ division_write = Pescheck::DivisionWrite.new({name: 'name_example', city: 'city_example', address: 'address_example', postal: 'postal_example', phone: 'phone_example', contact_name: 'contact_name_example', contact_email: 'contact_email_example', invoice_email: 'invoice_email_example'}) # DivisionWrite |
35
+
36
+ begin
37
+
38
+ result = api_instance.v2_organisations_divisions_create(division_write)
39
+ p result
40
+ rescue Pescheck::ApiError => e
41
+ puts "Error when calling DivisionsApi->v2_organisations_divisions_create: #{e}"
42
+ end
43
+ ```
44
+
45
+ #### Using the v2_organisations_divisions_create_with_http_info variant
46
+
47
+ This returns an Array which contains the response data, status code and headers.
48
+
49
+ > <Array(<DivisionWrite>, Integer, Hash)> v2_organisations_divisions_create_with_http_info(division_write)
50
+
51
+ ```ruby
52
+ begin
53
+
54
+ data, status_code, headers = api_instance.v2_organisations_divisions_create_with_http_info(division_write)
55
+ p status_code # => 2xx
56
+ p headers # => { ... }
57
+ p data # => <DivisionWrite>
58
+ rescue Pescheck::ApiError => e
59
+ puts "Error when calling DivisionsApi->v2_organisations_divisions_create_with_http_info: #{e}"
60
+ end
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+ | Name | Type | Description | Notes |
66
+ | ---- | ---- | ----------- | ----- |
67
+ | **division_write** | [**DivisionWrite**](DivisionWrite.md) | | |
68
+
69
+ ### Return type
70
+
71
+ [**DivisionWrite**](DivisionWrite.md)
72
+
73
+ ### Authorization
74
+
75
+ [oauth2](../README.md#oauth2)
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: application/json, multipart/form-data
80
+ - **Accept**: application/json
81
+
82
+
83
+ ## v2_organisations_divisions_list
84
+
85
+ > <PaginatedDivisionReadOnlyList> v2_organisations_divisions_list(opts)
86
+
87
+
88
+
89
+ List method that handles both paginated and unpaginated responses and enforces the max_total_records limit (500).
90
+
91
+ ### Examples
92
+
93
+ ```ruby
94
+ require 'time'
95
+ require 'pescheck'
96
+ # setup authorization
97
+ Pescheck.configure do |config|
98
+ # Configure OAuth2 access token for authorization: oauth2
99
+ config.access_token = 'YOUR ACCESS TOKEN'
100
+ end
101
+
102
+ api_instance = Pescheck::DivisionsApi.new
103
+ opts = {
104
+ page: 1, # Integer | A page number within the paginated result set.
105
+ page_size: 50, # Integer | Number of results to return per page.
106
+ paginate: true # Boolean | Enable/disable pagination. When false, max 500 records returned.
107
+ }
108
+
109
+ begin
110
+
111
+ result = api_instance.v2_organisations_divisions_list(opts)
112
+ p result
113
+ rescue Pescheck::ApiError => e
114
+ puts "Error when calling DivisionsApi->v2_organisations_divisions_list: #{e}"
115
+ end
116
+ ```
117
+
118
+ #### Using the v2_organisations_divisions_list_with_http_info variant
119
+
120
+ This returns an Array which contains the response data, status code and headers.
121
+
122
+ > <Array(<PaginatedDivisionReadOnlyList>, Integer, Hash)> v2_organisations_divisions_list_with_http_info(opts)
123
+
124
+ ```ruby
125
+ begin
126
+
127
+ data, status_code, headers = api_instance.v2_organisations_divisions_list_with_http_info(opts)
128
+ p status_code # => 2xx
129
+ p headers # => { ... }
130
+ p data # => <PaginatedDivisionReadOnlyList>
131
+ rescue Pescheck::ApiError => e
132
+ puts "Error when calling DivisionsApi->v2_organisations_divisions_list_with_http_info: #{e}"
133
+ end
134
+ ```
135
+
136
+ ### Parameters
137
+
138
+ | Name | Type | Description | Notes |
139
+ | ---- | ---- | ----------- | ----- |
140
+ | **page** | **Integer** | A page number within the paginated result set. | [optional][default to 1] |
141
+ | **page_size** | **Integer** | Number of results to return per page. | [optional][default to 50] |
142
+ | **paginate** | **Boolean** | Enable/disable pagination. When false, max 500 records returned. | [optional][default to true] |
143
+
144
+ ### Return type
145
+
146
+ [**PaginatedDivisionReadOnlyList**](PaginatedDivisionReadOnlyList.md)
147
+
148
+ ### Authorization
149
+
150
+ [oauth2](../README.md#oauth2)
151
+
152
+ ### HTTP request headers
153
+
154
+ - **Content-Type**: Not defined
155
+ - **Accept**: application/json
156
+
157
+
158
+ ## v2_organisations_divisions_partial_update
159
+
160
+ > <DivisionWrite> v2_organisations_divisions_partial_update(id, opts)
161
+
162
+
163
+
164
+ A division is a child organisation under a parent org, used only when a customer needs to manage genuinely separate business units, locations, or legal entities under one account. The vast majority of organisations operate as a single entity and need no divisions. Only top-level (parent) organisations can have divisions.
165
+
166
+ ### Examples
167
+
168
+ ```ruby
169
+ require 'time'
170
+ require 'pescheck'
171
+ # setup authorization
172
+ Pescheck.configure do |config|
173
+ # Configure OAuth2 access token for authorization: oauth2
174
+ config.access_token = 'YOUR ACCESS TOKEN'
175
+ end
176
+
177
+ api_instance = Pescheck::DivisionsApi.new
178
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | A UUID string identifying this organisation.
179
+ opts = {
180
+ patched_division_write: Pescheck::PatchedDivisionWrite.new # PatchedDivisionWrite |
181
+ }
182
+
183
+ begin
184
+
185
+ result = api_instance.v2_organisations_divisions_partial_update(id, opts)
186
+ p result
187
+ rescue Pescheck::ApiError => e
188
+ puts "Error when calling DivisionsApi->v2_organisations_divisions_partial_update: #{e}"
189
+ end
190
+ ```
191
+
192
+ #### Using the v2_organisations_divisions_partial_update_with_http_info variant
193
+
194
+ This returns an Array which contains the response data, status code and headers.
195
+
196
+ > <Array(<DivisionWrite>, Integer, Hash)> v2_organisations_divisions_partial_update_with_http_info(id, opts)
197
+
198
+ ```ruby
199
+ begin
200
+
201
+ data, status_code, headers = api_instance.v2_organisations_divisions_partial_update_with_http_info(id, opts)
202
+ p status_code # => 2xx
203
+ p headers # => { ... }
204
+ p data # => <DivisionWrite>
205
+ rescue Pescheck::ApiError => e
206
+ puts "Error when calling DivisionsApi->v2_organisations_divisions_partial_update_with_http_info: #{e}"
207
+ end
208
+ ```
209
+
210
+ ### Parameters
211
+
212
+ | Name | Type | Description | Notes |
213
+ | ---- | ---- | ----------- | ----- |
214
+ | **id** | **String** | A UUID string identifying this organisation. | |
215
+ | **patched_division_write** | [**PatchedDivisionWrite**](PatchedDivisionWrite.md) | | [optional] |
216
+
217
+ ### Return type
218
+
219
+ [**DivisionWrite**](DivisionWrite.md)
220
+
221
+ ### Authorization
222
+
223
+ [oauth2](../README.md#oauth2)
224
+
225
+ ### HTTP request headers
226
+
227
+ - **Content-Type**: application/json, multipart/form-data
228
+ - **Accept**: application/json
229
+
230
+
231
+ ## v2_organisations_divisions_retrieve
232
+
233
+ > <DivisionReadOnly> v2_organisations_divisions_retrieve(id)
234
+
235
+
236
+
237
+ A division is a child organisation under a parent org, used only when a customer needs to manage genuinely separate business units, locations, or legal entities under one account. The vast majority of organisations operate as a single entity and need no divisions. Only top-level (parent) organisations can have divisions.
238
+
239
+ ### Examples
240
+
241
+ ```ruby
242
+ require 'time'
243
+ require 'pescheck'
244
+ # setup authorization
245
+ Pescheck.configure do |config|
246
+ # Configure OAuth2 access token for authorization: oauth2
247
+ config.access_token = 'YOUR ACCESS TOKEN'
248
+ end
249
+
250
+ api_instance = Pescheck::DivisionsApi.new
251
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | A UUID string identifying this organisation.
252
+
253
+ begin
254
+
255
+ result = api_instance.v2_organisations_divisions_retrieve(id)
256
+ p result
257
+ rescue Pescheck::ApiError => e
258
+ puts "Error when calling DivisionsApi->v2_organisations_divisions_retrieve: #{e}"
259
+ end
260
+ ```
261
+
262
+ #### Using the v2_organisations_divisions_retrieve_with_http_info variant
263
+
264
+ This returns an Array which contains the response data, status code and headers.
265
+
266
+ > <Array(<DivisionReadOnly>, Integer, Hash)> v2_organisations_divisions_retrieve_with_http_info(id)
267
+
268
+ ```ruby
269
+ begin
270
+
271
+ data, status_code, headers = api_instance.v2_organisations_divisions_retrieve_with_http_info(id)
272
+ p status_code # => 2xx
273
+ p headers # => { ... }
274
+ p data # => <DivisionReadOnly>
275
+ rescue Pescheck::ApiError => e
276
+ puts "Error when calling DivisionsApi->v2_organisations_divisions_retrieve_with_http_info: #{e}"
277
+ end
278
+ ```
279
+
280
+ ### Parameters
281
+
282
+ | Name | Type | Description | Notes |
283
+ | ---- | ---- | ----------- | ----- |
284
+ | **id** | **String** | A UUID string identifying this organisation. | |
285
+
286
+ ### Return type
287
+
288
+ [**DivisionReadOnly**](DivisionReadOnly.md)
289
+
290
+ ### Authorization
291
+
292
+ [oauth2](../README.md#oauth2)
293
+
294
+ ### HTTP request headers
295
+
296
+ - **Content-Type**: Not defined
297
+ - **Accept**: application/json
298
+
299
+
300
+ ## v2_organisations_divisions_update
301
+
302
+ > <DivisionWrite> v2_organisations_divisions_update(id, division_write)
303
+
304
+
305
+
306
+ Update an existing division's contact, billing, and address details. Override also triggers a webhook on successful PUT and PATCH requests.
307
+
308
+ ### Examples
309
+
310
+ ```ruby
311
+ require 'time'
312
+ require 'pescheck'
313
+ # setup authorization
314
+ Pescheck.configure do |config|
315
+ # Configure OAuth2 access token for authorization: oauth2
316
+ config.access_token = 'YOUR ACCESS TOKEN'
317
+ end
318
+
319
+ api_instance = Pescheck::DivisionsApi.new
320
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | A UUID string identifying this organisation.
321
+ division_write = Pescheck::DivisionWrite.new({name: 'name_example', city: 'city_example', address: 'address_example', postal: 'postal_example', phone: 'phone_example', contact_name: 'contact_name_example', contact_email: 'contact_email_example', invoice_email: 'invoice_email_example'}) # DivisionWrite |
322
+
323
+ begin
324
+
325
+ result = api_instance.v2_organisations_divisions_update(id, division_write)
326
+ p result
327
+ rescue Pescheck::ApiError => e
328
+ puts "Error when calling DivisionsApi->v2_organisations_divisions_update: #{e}"
329
+ end
330
+ ```
331
+
332
+ #### Using the v2_organisations_divisions_update_with_http_info variant
333
+
334
+ This returns an Array which contains the response data, status code and headers.
335
+
336
+ > <Array(<DivisionWrite>, Integer, Hash)> v2_organisations_divisions_update_with_http_info(id, division_write)
337
+
338
+ ```ruby
339
+ begin
340
+
341
+ data, status_code, headers = api_instance.v2_organisations_divisions_update_with_http_info(id, division_write)
342
+ p status_code # => 2xx
343
+ p headers # => { ... }
344
+ p data # => <DivisionWrite>
345
+ rescue Pescheck::ApiError => e
346
+ puts "Error when calling DivisionsApi->v2_organisations_divisions_update_with_http_info: #{e}"
347
+ end
348
+ ```
349
+
350
+ ### Parameters
351
+
352
+ | Name | Type | Description | Notes |
353
+ | ---- | ---- | ----------- | ----- |
354
+ | **id** | **String** | A UUID string identifying this organisation. | |
355
+ | **division_write** | [**DivisionWrite**](DivisionWrite.md) | | |
356
+
357
+ ### Return type
358
+
359
+ [**DivisionWrite**](DivisionWrite.md)
360
+
361
+ ### Authorization
362
+
363
+ [oauth2](../README.md#oauth2)
364
+
365
+ ### HTTP request headers
366
+
367
+ - **Content-Type**: application/json, multipart/form-data
368
+ - **Accept**: application/json
369
+
@@ -0,0 +1,24 @@
1
+ # Pescheck::JWTGeneration
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **email** | **String** | Email address of the API user | |
8
+ | **password** | **String** | Password for the API user | |
9
+ | **organisation_id** | **String** | Organization ID to generate token for | [optional] |
10
+ | **division_id** | **String** | Division ID to generate token for (optional) | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'pescheck'
16
+
17
+ instance = Pescheck::JWTGeneration.new(
18
+ email: null,
19
+ password: null,
20
+ organisation_id: null,
21
+ division_id: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,28 @@
1
+ # Pescheck::JWTResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **access_token** | **String** | JWT access token | |
8
+ | **refresh_token** | **String** | JWT refresh token | |
9
+ | **token_type** | **String** | | [optional][default to &#39;Bearer&#39;] |
10
+ | **expires_in** | **Integer** | Access token expiration in seconds | |
11
+ | **organisation** | **String** | Organization name | |
12
+ | **organisation_id** | **String** | Organization ID | |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'pescheck'
18
+
19
+ instance = Pescheck::JWTResponse.new(
20
+ access_token: null,
21
+ refresh_token: null,
22
+ token_type: null,
23
+ expires_in: null,
24
+ organisation: null,
25
+ organisation_id: null
26
+ )
27
+ ```
28
+
data/docs/OAuthApi.md ADDED
@@ -0,0 +1,213 @@
1
+ # Pescheck::OAuthApi
2
+
3
+ All URIs are relative to *https://api.pescheck.io*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_o_auth_application2**](OAuthApi.md#create_o_auth_application2) | **POST** /api/v2/oauth/applications/ | |
8
+ | [**delete_o_auth_application2**](OAuthApi.md#delete_o_auth_application2) | **DELETE** /api/v2/oauth/applications/{application_id}/ | |
9
+ | [**list_o_auth_applications2**](OAuthApi.md#list_o_auth_applications2) | **GET** /api/v2/oauth/applications/list/ | |
10
+
11
+
12
+ ## create_o_auth_application2
13
+
14
+ > <OAuthApplicationResponse> create_o_auth_application2(o_auth_application)
15
+
16
+
17
+
18
+ Create OAuth application for API access
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'pescheck'
25
+ # setup authorization
26
+ Pescheck.configure do |config|
27
+ # Configure OAuth2 access token for authorization: oauth2
28
+ config.access_token = 'YOUR ACCESS TOKEN'
29
+ end
30
+
31
+ api_instance = Pescheck::OAuthApi.new
32
+ o_auth_application = Pescheck::OAuthApplication.new({name: 'name_example'}) # OAuthApplication |
33
+
34
+ begin
35
+
36
+ result = api_instance.create_o_auth_application2(o_auth_application)
37
+ p result
38
+ rescue Pescheck::ApiError => e
39
+ puts "Error when calling OAuthApi->create_o_auth_application2: #{e}"
40
+ end
41
+ ```
42
+
43
+ #### Using the create_o_auth_application2_with_http_info variant
44
+
45
+ This returns an Array which contains the response data, status code and headers.
46
+
47
+ > <Array(<OAuthApplicationResponse>, Integer, Hash)> create_o_auth_application2_with_http_info(o_auth_application)
48
+
49
+ ```ruby
50
+ begin
51
+
52
+ data, status_code, headers = api_instance.create_o_auth_application2_with_http_info(o_auth_application)
53
+ p status_code # => 2xx
54
+ p headers # => { ... }
55
+ p data # => <OAuthApplicationResponse>
56
+ rescue Pescheck::ApiError => e
57
+ puts "Error when calling OAuthApi->create_o_auth_application2_with_http_info: #{e}"
58
+ end
59
+ ```
60
+
61
+ ### Parameters
62
+
63
+ | Name | Type | Description | Notes |
64
+ | ---- | ---- | ----------- | ----- |
65
+ | **o_auth_application** | [**OAuthApplication**](OAuthApplication.md) | | |
66
+
67
+ ### Return type
68
+
69
+ [**OAuthApplicationResponse**](OAuthApplicationResponse.md)
70
+
71
+ ### Authorization
72
+
73
+ [oauth2](../README.md#oauth2)
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: application/json, multipart/form-data
78
+ - **Accept**: application/json
79
+
80
+
81
+ ## delete_o_auth_application2
82
+
83
+ > delete_o_auth_application2(application_id)
84
+
85
+
86
+
87
+ Delete an OAuth application
88
+
89
+ ### Examples
90
+
91
+ ```ruby
92
+ require 'time'
93
+ require 'pescheck'
94
+ # setup authorization
95
+ Pescheck.configure do |config|
96
+ # Configure OAuth2 access token for authorization: oauth2
97
+ config.access_token = 'YOUR ACCESS TOKEN'
98
+ end
99
+
100
+ api_instance = Pescheck::OAuthApi.new
101
+ application_id = 'application_id_example' # String | Application ID to delete
102
+
103
+ begin
104
+
105
+ api_instance.delete_o_auth_application2(application_id)
106
+ rescue Pescheck::ApiError => e
107
+ puts "Error when calling OAuthApi->delete_o_auth_application2: #{e}"
108
+ end
109
+ ```
110
+
111
+ #### Using the delete_o_auth_application2_with_http_info variant
112
+
113
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
114
+
115
+ > <Array(nil, Integer, Hash)> delete_o_auth_application2_with_http_info(application_id)
116
+
117
+ ```ruby
118
+ begin
119
+
120
+ data, status_code, headers = api_instance.delete_o_auth_application2_with_http_info(application_id)
121
+ p status_code # => 2xx
122
+ p headers # => { ... }
123
+ p data # => nil
124
+ rescue Pescheck::ApiError => e
125
+ puts "Error when calling OAuthApi->delete_o_auth_application2_with_http_info: #{e}"
126
+ end
127
+ ```
128
+
129
+ ### Parameters
130
+
131
+ | Name | Type | Description | Notes |
132
+ | ---- | ---- | ----------- | ----- |
133
+ | **application_id** | **String** | Application ID to delete | |
134
+
135
+ ### Return type
136
+
137
+ nil (empty response body)
138
+
139
+ ### Authorization
140
+
141
+ [oauth2](../README.md#oauth2)
142
+
143
+ ### HTTP request headers
144
+
145
+ - **Content-Type**: Not defined
146
+ - **Accept**: Not defined
147
+
148
+
149
+ ## list_o_auth_applications2
150
+
151
+ > <Array<OAuthApplicationResponse>> list_o_auth_applications2
152
+
153
+
154
+
155
+ List OAuth applications for the organization
156
+
157
+ ### Examples
158
+
159
+ ```ruby
160
+ require 'time'
161
+ require 'pescheck'
162
+ # setup authorization
163
+ Pescheck.configure do |config|
164
+ # Configure OAuth2 access token for authorization: oauth2
165
+ config.access_token = 'YOUR ACCESS TOKEN'
166
+ end
167
+
168
+ api_instance = Pescheck::OAuthApi.new
169
+
170
+ begin
171
+
172
+ result = api_instance.list_o_auth_applications2
173
+ p result
174
+ rescue Pescheck::ApiError => e
175
+ puts "Error when calling OAuthApi->list_o_auth_applications2: #{e}"
176
+ end
177
+ ```
178
+
179
+ #### Using the list_o_auth_applications2_with_http_info variant
180
+
181
+ This returns an Array which contains the response data, status code and headers.
182
+
183
+ > <Array(<Array<OAuthApplicationResponse>>, Integer, Hash)> list_o_auth_applications2_with_http_info
184
+
185
+ ```ruby
186
+ begin
187
+
188
+ data, status_code, headers = api_instance.list_o_auth_applications2_with_http_info
189
+ p status_code # => 2xx
190
+ p headers # => { ... }
191
+ p data # => <Array<OAuthApplicationResponse>>
192
+ rescue Pescheck::ApiError => e
193
+ puts "Error when calling OAuthApi->list_o_auth_applications2_with_http_info: #{e}"
194
+ end
195
+ ```
196
+
197
+ ### Parameters
198
+
199
+ This endpoint does not need any parameter.
200
+
201
+ ### Return type
202
+
203
+ [**Array&lt;OAuthApplicationResponse&gt;**](OAuthApplicationResponse.md)
204
+
205
+ ### Authorization
206
+
207
+ [oauth2](../README.md#oauth2)
208
+
209
+ ### HTTP request headers
210
+
211
+ - **Content-Type**: Not defined
212
+ - **Accept**: application/json
213
+
@@ -0,0 +1,26 @@
1
+ # Pescheck::OAuthApplication
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Name for the OAuth application | |
8
+ | **client_type** | **String** | Client type (confidential recommended for server-to-server) * &#x60;confidential&#x60; - Confidential * &#x60;public&#x60; - Public | [optional][default to &#39;confidential&#39;] |
9
+ | **authorization_grant_type** | **String** | Grant type (client_credentials for API access) * &#x60;authorization-code&#x60; - Authorization code * &#x60;implicit&#x60; - Implicit * &#x60;password&#x60; - Resource owner password-based * &#x60;client-credentials&#x60; - Client credentials * &#x60;openid-hybrid&#x60; - OpenID connect hybrid | [optional][default to &#39;client-credentials&#39;] |
10
+ | **redirect_uris** | **String** | Space-separated redirect URIs (optional for client_credentials) | [optional] |
11
+ | **division_id** | **String** | Division ID to create application for (optional) | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'pescheck'
17
+
18
+ instance = Pescheck::OAuthApplication.new(
19
+ name: null,
20
+ client_type: null,
21
+ authorization_grant_type: null,
22
+ redirect_uris: null,
23
+ division_id: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,32 @@
1
+ # Pescheck::OAuthApplicationResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [readonly] |
8
+ | **name** | **String** | | [optional] |
9
+ | **client_id** | **String** | | [optional] |
10
+ | **client_secret** | **String** | | [readonly] |
11
+ | **client_type** | **String** | * &#x60;confidential&#x60; - Confidential * &#x60;public&#x60; - Public | |
12
+ | **authorization_grant_type** | **String** | * &#x60;authorization-code&#x60; - Authorization code * &#x60;implicit&#x60; - Implicit * &#x60;password&#x60; - Resource owner password-based * &#x60;client-credentials&#x60; - Client credentials * &#x60;openid-hybrid&#x60; - OpenID connect hybrid | |
13
+ | **created** | **Time** | | [readonly] |
14
+ | **updated** | **Time** | | [readonly] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'pescheck'
20
+
21
+ instance = Pescheck::OAuthApplicationResponse.new(
22
+ id: null,
23
+ name: null,
24
+ client_id: null,
25
+ client_secret: null,
26
+ client_type: null,
27
+ authorization_grant_type: null,
28
+ created: null,
29
+ updated: null
30
+ )
31
+ ```
32
+