pescheck-client 0.0.5
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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +182 -0
- data/Rakefile +10 -0
- data/docs/AuthenticationApi.md +217 -0
- data/docs/ChecksApi.md +147 -0
- data/docs/CustomTokenObtainPair.md +20 -0
- data/docs/DivisionReadOnly.md +46 -0
- data/docs/DivisionWrite.md +40 -0
- data/docs/DivisionsApi.md +369 -0
- data/docs/JWTGeneration.md +24 -0
- data/docs/JWTResponse.md +28 -0
- data/docs/OAuthApi.md +213 -0
- data/docs/OAuthApplication.md +26 -0
- data/docs/OAuthApplicationResponse.md +32 -0
- data/docs/PaginatedDivisionReadOnlyList.md +24 -0
- data/docs/PaginatedV2ProfileListItemList.md +24 -0
- data/docs/PaginatedV2ScreeningListItemList.md +24 -0
- data/docs/PatchedDivisionWrite.md +40 -0
- data/docs/PatchedV2ProfilePartialUpdate.md +20 -0
- data/docs/ProfilesApi.md +438 -0
- data/docs/ScreeningsApi.md +293 -0
- data/docs/TokenRefresh.md +20 -0
- data/docs/V2Candidate.md +36 -0
- data/docs/V2CheckField.md +26 -0
- data/docs/V2CheckInfo.md +40 -0
- data/docs/V2Document.md +28 -0
- data/docs/V2DocumentContent.md +20 -0
- data/docs/V2Money.md +20 -0
- data/docs/V2ProfileCheck.md +20 -0
- data/docs/V2ProfileCheckEntry.md +30 -0
- data/docs/V2ProfileCreate.md +22 -0
- data/docs/V2ProfileDetail.md +38 -0
- data/docs/V2ProfileListItem.md +30 -0
- data/docs/V2ProfileUpdate.md +22 -0
- data/docs/V2ProfileUpdateCheck.md +22 -0
- data/docs/V2ScreeningCheck.md +24 -0
- data/docs/V2ScreeningCheckEntry.md +34 -0
- data/docs/V2ScreeningCheckListItem.md +22 -0
- data/docs/V2ScreeningCreate.md +22 -0
- data/docs/V2ScreeningDetail.md +34 -0
- data/docs/V2ScreeningDetailProfile.md +20 -0
- data/docs/V2ScreeningListItem.md +34 -0
- data/docs/VerifyWebhook.md +18 -0
- data/docs/Webhook.md +26 -0
- data/docs/WebhookResponse.md +36 -0
- data/docs/WebhooksApi.md +290 -0
- data/git_push.sh +57 -0
- data/lib/pescheck-client/api/authentication_api.rb +220 -0
- data/lib/pescheck-client/api/checks_api.rb +144 -0
- data/lib/pescheck-client/api/divisions_api.rb +365 -0
- data/lib/pescheck-client/api/o_auth_api.rb +202 -0
- data/lib/pescheck-client/api/profiles_api.rb +432 -0
- data/lib/pescheck-client/api/screenings_api.rb +288 -0
- data/lib/pescheck-client/api/webhooks_api.rb +278 -0
- data/lib/pescheck-client/api_client.rb +441 -0
- data/lib/pescheck-client/api_error.rb +58 -0
- data/lib/pescheck-client/api_model_base.rb +88 -0
- data/lib/pescheck-client/configuration.rb +429 -0
- data/lib/pescheck-client/models/custom_token_obtain_pair.rb +191 -0
- data/lib/pescheck-client/models/division_read_only.rb +469 -0
- data/lib/pescheck-client/models/division_write.rb +436 -0
- data/lib/pescheck-client/models/jwt_generation.rb +213 -0
- data/lib/pescheck-client/models/jwt_response.rb +285 -0
- data/lib/pescheck-client/models/o_auth_application.rb +265 -0
- data/lib/pescheck-client/models/o_auth_application_response.rb +379 -0
- data/lib/pescheck-client/models/paginated_division_read_only_list.rb +216 -0
- data/lib/pescheck-client/models/paginated_v2_profile_list_item_list.rb +216 -0
- data/lib/pescheck-client/models/paginated_v2_screening_list_item_list.rb +216 -0
- data/lib/pescheck-client/models/patched_division_write.rb +360 -0
- data/lib/pescheck-client/models/patched_v2_profile_partial_update.rb +176 -0
- data/lib/pescheck-client/models/token_refresh.rb +173 -0
- data/lib/pescheck-client/models/v2_candidate.rb +390 -0
- data/lib/pescheck-client/models/v2_check_field.rb +246 -0
- data/lib/pescheck-client/models/v2_check_info.rb +438 -0
- data/lib/pescheck-client/models/v2_document.rb +308 -0
- data/lib/pescheck-client/models/v2_document_content.rb +175 -0
- data/lib/pescheck-client/models/v2_money.rb +210 -0
- data/lib/pescheck-client/models/v2_profile_check.rb +201 -0
- data/lib/pescheck-client/models/v2_profile_check_entry.rb +349 -0
- data/lib/pescheck-client/models/v2_profile_create.rb +212 -0
- data/lib/pescheck-client/models/v2_profile_detail.rb +401 -0
- data/lib/pescheck-client/models/v2_profile_list_item.rb +291 -0
- data/lib/pescheck-client/models/v2_profile_update.rb +213 -0
- data/lib/pescheck-client/models/v2_profile_update_check.rb +210 -0
- data/lib/pescheck-client/models/v2_screening_check.rb +221 -0
- data/lib/pescheck-client/models/v2_screening_check_entry.rb +376 -0
- data/lib/pescheck-client/models/v2_screening_check_list_item.rb +242 -0
- data/lib/pescheck-client/models/v2_screening_create.rb +201 -0
- data/lib/pescheck-client/models/v2_screening_detail.rb +348 -0
- data/lib/pescheck-client/models/v2_screening_detail_profile.rb +156 -0
- data/lib/pescheck-client/models/v2_screening_list_item.rb +330 -0
- data/lib/pescheck-client/models/verify_webhook.rb +166 -0
- data/lib/pescheck-client/models/webhook.rb +265 -0
- data/lib/pescheck-client/models/webhook_response.rb +353 -0
- data/lib/pescheck-client/version.rb +15 -0
- data/lib/pescheck-client.rb +83 -0
- data/pescheck-client.gemspec +41 -0
- data/spec/api/authentication_api_spec.rb +68 -0
- data/spec/api/checks_api_spec.rb +56 -0
- data/spec/api/divisions_api_spec.rb +94 -0
- data/spec/api/o_auth_api_spec.rb +67 -0
- data/spec/api/profiles_api_spec.rb +105 -0
- data/spec/api/screenings_api_spec.rb +81 -0
- data/spec/api/webhooks_api_spec.rb +81 -0
- data/spec/models/custom_token_obtain_pair_spec.rb +42 -0
- data/spec/models/division_read_only_spec.rb +120 -0
- data/spec/models/division_write_spec.rb +102 -0
- data/spec/models/jwt_generation_spec.rb +54 -0
- data/spec/models/jwt_response_spec.rb +66 -0
- data/spec/models/o_auth_application_response_spec.rb +86 -0
- data/spec/models/o_auth_application_spec.rb +68 -0
- data/spec/models/paginated_division_read_only_list_spec.rb +54 -0
- data/spec/models/paginated_v2_profile_list_item_list_spec.rb +54 -0
- data/spec/models/paginated_v2_screening_list_item_list_spec.rb +54 -0
- data/spec/models/patched_division_write_spec.rb +102 -0
- data/spec/models/patched_v2_profile_partial_update_spec.rb +42 -0
- data/spec/models/token_refresh_spec.rb +42 -0
- data/spec/models/v2_candidate_spec.rb +94 -0
- data/spec/models/v2_check_field_spec.rb +60 -0
- data/spec/models/v2_check_info_spec.rb +102 -0
- data/spec/models/v2_document_content_spec.rb +42 -0
- data/spec/models/v2_document_spec.rb +70 -0
- data/spec/models/v2_money_spec.rb +42 -0
- data/spec/models/v2_profile_check_entry_spec.rb +76 -0
- data/spec/models/v2_profile_check_spec.rb +46 -0
- data/spec/models/v2_profile_create_spec.rb +48 -0
- data/spec/models/v2_profile_detail_spec.rb +96 -0
- data/spec/models/v2_profile_list_item_spec.rb +72 -0
- data/spec/models/v2_profile_update_check_spec.rb +52 -0
- data/spec/models/v2_profile_update_spec.rb +48 -0
- data/spec/models/v2_screening_check_entry_spec.rb +88 -0
- data/spec/models/v2_screening_check_list_item_spec.rb +52 -0
- data/spec/models/v2_screening_check_spec.rb +58 -0
- data/spec/models/v2_screening_create_spec.rb +48 -0
- data/spec/models/v2_screening_detail_profile_spec.rb +42 -0
- data/spec/models/v2_screening_detail_spec.rb +84 -0
- data/spec/models/v2_screening_list_item_spec.rb +84 -0
- data/spec/models/verify_webhook_spec.rb +36 -0
- data/spec/models/webhook_response_spec.rb +90 -0
- data/spec/models/webhook_spec.rb +64 -0
- data/spec/spec_helper.rb +111 -0
- metadata +299 -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-client'
|
|
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-client'
|
|
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-client'
|
|
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-client'
|
|
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-client'
|
|
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-client'
|
|
16
|
+
|
|
17
|
+
instance = Pescheck::JWTGeneration.new(
|
|
18
|
+
email: null,
|
|
19
|
+
password: null,
|
|
20
|
+
organisation_id: null,
|
|
21
|
+
division_id: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
data/docs/JWTResponse.md
ADDED
|
@@ -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 'Bearer'] |
|
|
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-client'
|
|
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-client'
|
|
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-client'
|
|
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-client'
|
|
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<OAuthApplicationResponse>**](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) * `confidential` - Confidential * `public` - Public | [optional][default to 'confidential'] |
|
|
9
|
+
| **authorization_grant_type** | **String** | Grant type (client_credentials for API access) * `authorization-code` - Authorization code * `implicit` - Implicit * `password` - Resource owner password-based * `client-credentials` - Client credentials * `openid-hybrid` - OpenID connect hybrid | [optional][default to 'client-credentials'] |
|
|
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-client'
|
|
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** | * `confidential` - Confidential * `public` - Public | |
|
|
12
|
+
| **authorization_grant_type** | **String** | * `authorization-code` - Authorization code * `implicit` - Implicit * `password` - Resource owner password-based * `client-credentials` - Client credentials * `openid-hybrid` - OpenID connect hybrid | |
|
|
13
|
+
| **created** | **Time** | | [readonly] |
|
|
14
|
+
| **updated** | **Time** | | [readonly] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'pescheck-client'
|
|
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
|
+
|