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.
Files changed (143) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +182 -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-client/api/authentication_api.rb +220 -0
  50. data/lib/pescheck-client/api/checks_api.rb +144 -0
  51. data/lib/pescheck-client/api/divisions_api.rb +365 -0
  52. data/lib/pescheck-client/api/o_auth_api.rb +202 -0
  53. data/lib/pescheck-client/api/profiles_api.rb +432 -0
  54. data/lib/pescheck-client/api/screenings_api.rb +288 -0
  55. data/lib/pescheck-client/api/webhooks_api.rb +278 -0
  56. data/lib/pescheck-client/api_client.rb +441 -0
  57. data/lib/pescheck-client/api_error.rb +58 -0
  58. data/lib/pescheck-client/api_model_base.rb +88 -0
  59. data/lib/pescheck-client/configuration.rb +429 -0
  60. data/lib/pescheck-client/models/custom_token_obtain_pair.rb +191 -0
  61. data/lib/pescheck-client/models/division_read_only.rb +469 -0
  62. data/lib/pescheck-client/models/division_write.rb +436 -0
  63. data/lib/pescheck-client/models/jwt_generation.rb +213 -0
  64. data/lib/pescheck-client/models/jwt_response.rb +285 -0
  65. data/lib/pescheck-client/models/o_auth_application.rb +265 -0
  66. data/lib/pescheck-client/models/o_auth_application_response.rb +379 -0
  67. data/lib/pescheck-client/models/paginated_division_read_only_list.rb +216 -0
  68. data/lib/pescheck-client/models/paginated_v2_profile_list_item_list.rb +216 -0
  69. data/lib/pescheck-client/models/paginated_v2_screening_list_item_list.rb +216 -0
  70. data/lib/pescheck-client/models/patched_division_write.rb +360 -0
  71. data/lib/pescheck-client/models/patched_v2_profile_partial_update.rb +176 -0
  72. data/lib/pescheck-client/models/token_refresh.rb +173 -0
  73. data/lib/pescheck-client/models/v2_candidate.rb +390 -0
  74. data/lib/pescheck-client/models/v2_check_field.rb +246 -0
  75. data/lib/pescheck-client/models/v2_check_info.rb +438 -0
  76. data/lib/pescheck-client/models/v2_document.rb +308 -0
  77. data/lib/pescheck-client/models/v2_document_content.rb +175 -0
  78. data/lib/pescheck-client/models/v2_money.rb +210 -0
  79. data/lib/pescheck-client/models/v2_profile_check.rb +201 -0
  80. data/lib/pescheck-client/models/v2_profile_check_entry.rb +349 -0
  81. data/lib/pescheck-client/models/v2_profile_create.rb +212 -0
  82. data/lib/pescheck-client/models/v2_profile_detail.rb +401 -0
  83. data/lib/pescheck-client/models/v2_profile_list_item.rb +291 -0
  84. data/lib/pescheck-client/models/v2_profile_update.rb +213 -0
  85. data/lib/pescheck-client/models/v2_profile_update_check.rb +210 -0
  86. data/lib/pescheck-client/models/v2_screening_check.rb +221 -0
  87. data/lib/pescheck-client/models/v2_screening_check_entry.rb +376 -0
  88. data/lib/pescheck-client/models/v2_screening_check_list_item.rb +242 -0
  89. data/lib/pescheck-client/models/v2_screening_create.rb +201 -0
  90. data/lib/pescheck-client/models/v2_screening_detail.rb +348 -0
  91. data/lib/pescheck-client/models/v2_screening_detail_profile.rb +156 -0
  92. data/lib/pescheck-client/models/v2_screening_list_item.rb +330 -0
  93. data/lib/pescheck-client/models/verify_webhook.rb +166 -0
  94. data/lib/pescheck-client/models/webhook.rb +265 -0
  95. data/lib/pescheck-client/models/webhook_response.rb +353 -0
  96. data/lib/pescheck-client/version.rb +15 -0
  97. data/lib/pescheck-client.rb +83 -0
  98. data/pescheck-client.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 +299 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0acfad783a9e449311a76af2f805827306ee976b150848280d28860e96c962b5
4
+ data.tar.gz: cc683af13a7e16784dae9b5e959983b886541897c7a14c23e45f722f5eb3b87f
5
+ SHA512:
6
+ metadata.gz: dfe66b1212ab7b16935ee23d24e847dc355f1049e9865ea96a69741c35ba5bd8786065f3cae724d9e982f3b39dd2230db2f2ace41457e26d46e92d1cf98953b1
7
+ data.tar.gz: 3f12acc189a599ae737c319ab9b2f8a71756a02f15de8cbcc58719ba6918c13f11ef69783eb6e276d991172ce6e03730e291dec20bb5e4a0201c1c2d74ac0fc2
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/README.md ADDED
@@ -0,0 +1,182 @@
1
+ # pescheck-client
2
+
3
+ Pescheck - the Ruby gem for the Pescheck API
4
+
5
+ Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.
6
+
7
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
+
9
+ - API version: 2.0.0
10
+ - Package version: 0.0.5
11
+ - Generator version: 7.23.0
12
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
13
+
14
+ ## Installation
15
+
16
+ ### Build a gem
17
+
18
+ To build the Ruby code into a gem:
19
+
20
+ ```shell
21
+ gem build pescheck-client.gemspec
22
+ ```
23
+
24
+ Then either install the gem locally:
25
+
26
+ ```shell
27
+ gem install ./pescheck-client-0.0.5.gem
28
+ ```
29
+
30
+ (for development, run `gem install --dev ./pescheck-client-0.0.5.gem` to install the development dependencies)
31
+
32
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
+
34
+ Finally add this to the Gemfile:
35
+
36
+ gem 'pescheck-client', '~> 0.0.5'
37
+
38
+ ### Install from Git
39
+
40
+ If the Ruby gem is hosted at a git repository: https://github.com/pescheckit/pescheck-clients, then add the following in the Gemfile:
41
+
42
+ gem 'pescheck-client', :git => 'https://github.com/pescheckit/pescheck-clients.git'
43
+
44
+ ### Include the Ruby code directly
45
+
46
+ Include the Ruby code directly using `-I` as follows:
47
+
48
+ ```shell
49
+ ruby -Ilib script.rb
50
+ ```
51
+
52
+ ## Getting Started
53
+
54
+ Please follow the [installation](#installation) procedure and then run the following code:
55
+
56
+ ```ruby
57
+ # Load the gem
58
+ require 'pescheck-client'
59
+
60
+ # Setup authorization
61
+ Pescheck.configure do |config|
62
+ # Configure OAuth2 access token for authorization: oauth2
63
+ config.access_token = 'YOUR ACCESS TOKEN'
64
+ # Configure a proc to get access tokens in lieu of the static access_token configuration
65
+ config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' }
66
+ # Configure faraday connection
67
+ config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
68
+ end
69
+
70
+ api_instance = Pescheck::AuthenticationApi.new
71
+ jwt_generation = Pescheck::JWTGeneration.new({email: 'email_example', password: 'password_example'}) # JWTGeneration |
72
+
73
+ begin
74
+ result = api_instance.generate_jwt_token2(jwt_generation)
75
+ p result
76
+ rescue Pescheck::ApiError => e
77
+ puts "Exception when calling AuthenticationApi->generate_jwt_token2: #{e}"
78
+ end
79
+
80
+ ```
81
+
82
+ ## Documentation for API Endpoints
83
+
84
+ All URIs are relative to *https://api.pescheck.io*
85
+
86
+ Class | Method | HTTP request | Description
87
+ ------------ | ------------- | ------------- | -------------
88
+ *Pescheck::AuthenticationApi* | [**generate_jwt_token2**](docs/AuthenticationApi.md#generate_jwt_token2) | **POST** /api/v2/jwt/generate/ |
89
+ *Pescheck::AuthenticationApi* | [**jwt_create**](docs/AuthenticationApi.md#jwt_create) | **POST** /api/jwt/ |
90
+ *Pescheck::AuthenticationApi* | [**jwt_refresh_create**](docs/AuthenticationApi.md#jwt_refresh_create) | **POST** /api/jwt/refresh/ |
91
+ *Pescheck::ChecksApi* | [**v2_checks_list**](docs/ChecksApi.md#v2_checks_list) | **GET** /api/v2/checks/ |
92
+ *Pescheck::ChecksApi* | [**v2_checks_retrieve**](docs/ChecksApi.md#v2_checks_retrieve) | **GET** /api/v2/checks/{check_type}/ |
93
+ *Pescheck::DivisionsApi* | [**v2_organisations_divisions_create**](docs/DivisionsApi.md#v2_organisations_divisions_create) | **POST** /api/v2/organisations/divisions/ |
94
+ *Pescheck::DivisionsApi* | [**v2_organisations_divisions_list**](docs/DivisionsApi.md#v2_organisations_divisions_list) | **GET** /api/v2/organisations/divisions/ |
95
+ *Pescheck::DivisionsApi* | [**v2_organisations_divisions_partial_update**](docs/DivisionsApi.md#v2_organisations_divisions_partial_update) | **PATCH** /api/v2/organisations/divisions/{id}/ |
96
+ *Pescheck::DivisionsApi* | [**v2_organisations_divisions_retrieve**](docs/DivisionsApi.md#v2_organisations_divisions_retrieve) | **GET** /api/v2/organisations/divisions/{id}/ |
97
+ *Pescheck::DivisionsApi* | [**v2_organisations_divisions_update**](docs/DivisionsApi.md#v2_organisations_divisions_update) | **PUT** /api/v2/organisations/divisions/{id}/ |
98
+ *Pescheck::OAuthApi* | [**create_o_auth_application2**](docs/OAuthApi.md#create_o_auth_application2) | **POST** /api/v2/oauth/applications/ |
99
+ *Pescheck::OAuthApi* | [**delete_o_auth_application2**](docs/OAuthApi.md#delete_o_auth_application2) | **DELETE** /api/v2/oauth/applications/{application_id}/ |
100
+ *Pescheck::OAuthApi* | [**list_o_auth_applications2**](docs/OAuthApi.md#list_o_auth_applications2) | **GET** /api/v2/oauth/applications/list/ |
101
+ *Pescheck::ProfilesApi* | [**v2_profiles_create**](docs/ProfilesApi.md#v2_profiles_create) | **POST** /api/v2/profiles/ |
102
+ *Pescheck::ProfilesApi* | [**v2_profiles_destroy**](docs/ProfilesApi.md#v2_profiles_destroy) | **DELETE** /api/v2/profiles/{id}/ |
103
+ *Pescheck::ProfilesApi* | [**v2_profiles_list**](docs/ProfilesApi.md#v2_profiles_list) | **GET** /api/v2/profiles/ |
104
+ *Pescheck::ProfilesApi* | [**v2_profiles_partial_update**](docs/ProfilesApi.md#v2_profiles_partial_update) | **PATCH** /api/v2/profiles/{id}/ |
105
+ *Pescheck::ProfilesApi* | [**v2_profiles_retrieve**](docs/ProfilesApi.md#v2_profiles_retrieve) | **GET** /api/v2/profiles/{id}/ |
106
+ *Pescheck::ProfilesApi* | [**v2_profiles_update**](docs/ProfilesApi.md#v2_profiles_update) | **PUT** /api/v2/profiles/{id}/ |
107
+ *Pescheck::ScreeningsApi* | [**v2_screenings_create**](docs/ScreeningsApi.md#v2_screenings_create) | **POST** /api/v2/screenings/ |
108
+ *Pescheck::ScreeningsApi* | [**v2_screenings_documents_list**](docs/ScreeningsApi.md#v2_screenings_documents_list) | **GET** /api/v2/screenings/{id}/documents/ | Retrieve screening documents
109
+ *Pescheck::ScreeningsApi* | [**v2_screenings_list**](docs/ScreeningsApi.md#v2_screenings_list) | **GET** /api/v2/screenings/ |
110
+ *Pescheck::ScreeningsApi* | [**v2_screenings_retrieve**](docs/ScreeningsApi.md#v2_screenings_retrieve) | **GET** /api/v2/screenings/{id}/ |
111
+ *Pescheck::WebhooksApi* | [**create_webhook2**](docs/WebhooksApi.md#create_webhook2) | **POST** /api/v2/webhooks/ |
112
+ *Pescheck::WebhooksApi* | [**delete_webhook2**](docs/WebhooksApi.md#delete_webhook2) | **DELETE** /api/v2/webhooks/{webhook_id}/ |
113
+ *Pescheck::WebhooksApi* | [**list_webhooks2**](docs/WebhooksApi.md#list_webhooks2) | **GET** /api/v2/webhooks/list/ |
114
+ *Pescheck::WebhooksApi* | [**verify_webhook2**](docs/WebhooksApi.md#verify_webhook2) | **POST** /api/v2/webhooks/{webhook_id}/verify/ |
115
+
116
+
117
+ ## Documentation for Models
118
+
119
+ - [Pescheck::CustomTokenObtainPair](docs/CustomTokenObtainPair.md)
120
+ - [Pescheck::DivisionReadOnly](docs/DivisionReadOnly.md)
121
+ - [Pescheck::DivisionWrite](docs/DivisionWrite.md)
122
+ - [Pescheck::JWTGeneration](docs/JWTGeneration.md)
123
+ - [Pescheck::JWTResponse](docs/JWTResponse.md)
124
+ - [Pescheck::OAuthApplication](docs/OAuthApplication.md)
125
+ - [Pescheck::OAuthApplicationResponse](docs/OAuthApplicationResponse.md)
126
+ - [Pescheck::PaginatedDivisionReadOnlyList](docs/PaginatedDivisionReadOnlyList.md)
127
+ - [Pescheck::PaginatedV2ProfileListItemList](docs/PaginatedV2ProfileListItemList.md)
128
+ - [Pescheck::PaginatedV2ScreeningListItemList](docs/PaginatedV2ScreeningListItemList.md)
129
+ - [Pescheck::PatchedDivisionWrite](docs/PatchedDivisionWrite.md)
130
+ - [Pescheck::PatchedV2ProfilePartialUpdate](docs/PatchedV2ProfilePartialUpdate.md)
131
+ - [Pescheck::TokenRefresh](docs/TokenRefresh.md)
132
+ - [Pescheck::V2Candidate](docs/V2Candidate.md)
133
+ - [Pescheck::V2CheckField](docs/V2CheckField.md)
134
+ - [Pescheck::V2CheckInfo](docs/V2CheckInfo.md)
135
+ - [Pescheck::V2Document](docs/V2Document.md)
136
+ - [Pescheck::V2DocumentContent](docs/V2DocumentContent.md)
137
+ - [Pescheck::V2Money](docs/V2Money.md)
138
+ - [Pescheck::V2ProfileCheck](docs/V2ProfileCheck.md)
139
+ - [Pescheck::V2ProfileCheckEntry](docs/V2ProfileCheckEntry.md)
140
+ - [Pescheck::V2ProfileCreate](docs/V2ProfileCreate.md)
141
+ - [Pescheck::V2ProfileDetail](docs/V2ProfileDetail.md)
142
+ - [Pescheck::V2ProfileListItem](docs/V2ProfileListItem.md)
143
+ - [Pescheck::V2ProfileUpdate](docs/V2ProfileUpdate.md)
144
+ - [Pescheck::V2ProfileUpdateCheck](docs/V2ProfileUpdateCheck.md)
145
+ - [Pescheck::V2ScreeningCheck](docs/V2ScreeningCheck.md)
146
+ - [Pescheck::V2ScreeningCheckEntry](docs/V2ScreeningCheckEntry.md)
147
+ - [Pescheck::V2ScreeningCheckListItem](docs/V2ScreeningCheckListItem.md)
148
+ - [Pescheck::V2ScreeningCreate](docs/V2ScreeningCreate.md)
149
+ - [Pescheck::V2ScreeningDetail](docs/V2ScreeningDetail.md)
150
+ - [Pescheck::V2ScreeningDetailProfile](docs/V2ScreeningDetailProfile.md)
151
+ - [Pescheck::V2ScreeningListItem](docs/V2ScreeningListItem.md)
152
+ - [Pescheck::VerifyWebhook](docs/VerifyWebhook.md)
153
+ - [Pescheck::Webhook](docs/Webhook.md)
154
+ - [Pescheck::WebhookResponse](docs/WebhookResponse.md)
155
+
156
+
157
+ ## Documentation for Authorization
158
+
159
+
160
+ Authentication schemes defined for the API:
161
+ ### cookieAuth
162
+
163
+
164
+ - **Type**: API key
165
+ - **API key parameter name**: __Secure-sessionid
166
+ - **Location**:
167
+
168
+ ### jwtAuth
169
+
170
+ - **Type**: Bearer authentication (JWT)
171
+
172
+ ### oauth2
173
+
174
+
175
+ - **Type**: OAuth
176
+ - **Flow**: application
177
+ - **Authorization URL**:
178
+ - **Scopes**:
179
+ - read:api: read groups
180
+ - create:api: create groups
181
+ - update:api: update groups
182
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
@@ -0,0 +1,217 @@
1
+ # Pescheck::AuthenticationApi
2
+
3
+ All URIs are relative to *https://api.pescheck.io*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**generate_jwt_token2**](AuthenticationApi.md#generate_jwt_token2) | **POST** /api/v2/jwt/generate/ | |
8
+ | [**jwt_create**](AuthenticationApi.md#jwt_create) | **POST** /api/jwt/ | |
9
+ | [**jwt_refresh_create**](AuthenticationApi.md#jwt_refresh_create) | **POST** /api/jwt/refresh/ | |
10
+
11
+
12
+ ## generate_jwt_token2
13
+
14
+ > <JWTResponse> generate_jwt_token2(jwt_generation)
15
+
16
+
17
+
18
+ Log in with email + password. Returns a JWT pair scoped to the organization or division specified by organisation_id/division_id (defaults to your current org). For a plain login, use POST /api/jwt/.
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::AuthenticationApi.new
32
+ jwt_generation = Pescheck::JWTGeneration.new({email: 'email_example', password: 'password_example'}) # JWTGeneration |
33
+
34
+ begin
35
+
36
+ result = api_instance.generate_jwt_token2(jwt_generation)
37
+ p result
38
+ rescue Pescheck::ApiError => e
39
+ puts "Error when calling AuthenticationApi->generate_jwt_token2: #{e}"
40
+ end
41
+ ```
42
+
43
+ #### Using the generate_jwt_token2_with_http_info variant
44
+
45
+ This returns an Array which contains the response data, status code and headers.
46
+
47
+ > <Array(<JWTResponse>, Integer, Hash)> generate_jwt_token2_with_http_info(jwt_generation)
48
+
49
+ ```ruby
50
+ begin
51
+
52
+ data, status_code, headers = api_instance.generate_jwt_token2_with_http_info(jwt_generation)
53
+ p status_code # => 2xx
54
+ p headers # => { ... }
55
+ p data # => <JWTResponse>
56
+ rescue Pescheck::ApiError => e
57
+ puts "Error when calling AuthenticationApi->generate_jwt_token2_with_http_info: #{e}"
58
+ end
59
+ ```
60
+
61
+ ### Parameters
62
+
63
+ | Name | Type | Description | Notes |
64
+ | ---- | ---- | ----------- | ----- |
65
+ | **jwt_generation** | [**JWTGeneration**](JWTGeneration.md) | | |
66
+
67
+ ### Return type
68
+
69
+ [**JWTResponse**](JWTResponse.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
+ ## jwt_create
82
+
83
+ > <CustomTokenObtainPair> jwt_create(custom_token_obtain_pair)
84
+
85
+
86
+
87
+ Log in with email + password. Returns a JWT pair scoped to your current organization (last viewed, or first available). For a token scoped to a specific org or division, use POST /api/v2/jwt/generate/.
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::AuthenticationApi.new
101
+ custom_token_obtain_pair = Pescheck::CustomTokenObtainPair.new({email: 'email_example', password: 'password_example'}) # CustomTokenObtainPair |
102
+
103
+ begin
104
+
105
+ result = api_instance.jwt_create(custom_token_obtain_pair)
106
+ p result
107
+ rescue Pescheck::ApiError => e
108
+ puts "Error when calling AuthenticationApi->jwt_create: #{e}"
109
+ end
110
+ ```
111
+
112
+ #### Using the jwt_create_with_http_info variant
113
+
114
+ This returns an Array which contains the response data, status code and headers.
115
+
116
+ > <Array(<CustomTokenObtainPair>, Integer, Hash)> jwt_create_with_http_info(custom_token_obtain_pair)
117
+
118
+ ```ruby
119
+ begin
120
+
121
+ data, status_code, headers = api_instance.jwt_create_with_http_info(custom_token_obtain_pair)
122
+ p status_code # => 2xx
123
+ p headers # => { ... }
124
+ p data # => <CustomTokenObtainPair>
125
+ rescue Pescheck::ApiError => e
126
+ puts "Error when calling AuthenticationApi->jwt_create_with_http_info: #{e}"
127
+ end
128
+ ```
129
+
130
+ ### Parameters
131
+
132
+ | Name | Type | Description | Notes |
133
+ | ---- | ---- | ----------- | ----- |
134
+ | **custom_token_obtain_pair** | [**CustomTokenObtainPair**](CustomTokenObtainPair.md) | | |
135
+
136
+ ### Return type
137
+
138
+ [**CustomTokenObtainPair**](CustomTokenObtainPair.md)
139
+
140
+ ### Authorization
141
+
142
+ [oauth2](../README.md#oauth2)
143
+
144
+ ### HTTP request headers
145
+
146
+ - **Content-Type**: application/json, multipart/form-data
147
+ - **Accept**: application/json
148
+
149
+
150
+ ## jwt_refresh_create
151
+
152
+ > <TokenRefresh> jwt_refresh_create(token_refresh)
153
+
154
+
155
+
156
+ Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid.
157
+
158
+ ### Examples
159
+
160
+ ```ruby
161
+ require 'time'
162
+ require 'pescheck-client'
163
+ # setup authorization
164
+ Pescheck.configure do |config|
165
+ # Configure OAuth2 access token for authorization: oauth2
166
+ config.access_token = 'YOUR ACCESS TOKEN'
167
+ end
168
+
169
+ api_instance = Pescheck::AuthenticationApi.new
170
+ token_refresh = Pescheck::TokenRefresh.new({refresh: 'refresh_example'}) # TokenRefresh |
171
+
172
+ begin
173
+
174
+ result = api_instance.jwt_refresh_create(token_refresh)
175
+ p result
176
+ rescue Pescheck::ApiError => e
177
+ puts "Error when calling AuthenticationApi->jwt_refresh_create: #{e}"
178
+ end
179
+ ```
180
+
181
+ #### Using the jwt_refresh_create_with_http_info variant
182
+
183
+ This returns an Array which contains the response data, status code and headers.
184
+
185
+ > <Array(<TokenRefresh>, Integer, Hash)> jwt_refresh_create_with_http_info(token_refresh)
186
+
187
+ ```ruby
188
+ begin
189
+
190
+ data, status_code, headers = api_instance.jwt_refresh_create_with_http_info(token_refresh)
191
+ p status_code # => 2xx
192
+ p headers # => { ... }
193
+ p data # => <TokenRefresh>
194
+ rescue Pescheck::ApiError => e
195
+ puts "Error when calling AuthenticationApi->jwt_refresh_create_with_http_info: #{e}"
196
+ end
197
+ ```
198
+
199
+ ### Parameters
200
+
201
+ | Name | Type | Description | Notes |
202
+ | ---- | ---- | ----------- | ----- |
203
+ | **token_refresh** | [**TokenRefresh**](TokenRefresh.md) | | |
204
+
205
+ ### Return type
206
+
207
+ [**TokenRefresh**](TokenRefresh.md)
208
+
209
+ ### Authorization
210
+
211
+ [oauth2](../README.md#oauth2)
212
+
213
+ ### HTTP request headers
214
+
215
+ - **Content-Type**: application/json, multipart/form-data
216
+ - **Accept**: application/json
217
+
data/docs/ChecksApi.md ADDED
@@ -0,0 +1,147 @@
1
+ # Pescheck::ChecksApi
2
+
3
+ All URIs are relative to *https://api.pescheck.io*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**v2_checks_list**](ChecksApi.md#v2_checks_list) | **GET** /api/v2/checks/ | |
8
+ | [**v2_checks_retrieve**](ChecksApi.md#v2_checks_retrieve) | **GET** /api/v2/checks/{check_type}/ | |
9
+
10
+
11
+ ## v2_checks_list
12
+
13
+ > <Array<V2CheckInfo>> v2_checks_list(opts)
14
+
15
+
16
+
17
+ List the check types this API supports. The list is bounded metadata about the available check types (not a paginated collection), so the response is a flat array.
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'pescheck-client'
24
+ # setup authorization
25
+ Pescheck.configure do |config|
26
+ # Configure OAuth2 access token for authorization: oauth2
27
+ config.access_token = 'YOUR ACCESS TOKEN'
28
+ end
29
+
30
+ api_instance = Pescheck::ChecksApi.new
31
+ opts = {
32
+ check_type: 'check_type_example' # String | Restrict the list to a single check type.
33
+ }
34
+
35
+ begin
36
+
37
+ result = api_instance.v2_checks_list(opts)
38
+ p result
39
+ rescue Pescheck::ApiError => e
40
+ puts "Error when calling ChecksApi->v2_checks_list: #{e}"
41
+ end
42
+ ```
43
+
44
+ #### Using the v2_checks_list_with_http_info variant
45
+
46
+ This returns an Array which contains the response data, status code and headers.
47
+
48
+ > <Array(<Array<V2CheckInfo>>, Integer, Hash)> v2_checks_list_with_http_info(opts)
49
+
50
+ ```ruby
51
+ begin
52
+
53
+ data, status_code, headers = api_instance.v2_checks_list_with_http_info(opts)
54
+ p status_code # => 2xx
55
+ p headers # => { ... }
56
+ p data # => <Array<V2CheckInfo>>
57
+ rescue Pescheck::ApiError => e
58
+ puts "Error when calling ChecksApi->v2_checks_list_with_http_info: #{e}"
59
+ end
60
+ ```
61
+
62
+ ### Parameters
63
+
64
+ | Name | Type | Description | Notes |
65
+ | ---- | ---- | ----------- | ----- |
66
+ | **check_type** | **String** | Restrict the list to a single check type. | [optional] |
67
+
68
+ ### Return type
69
+
70
+ [**Array&lt;V2CheckInfo&gt;**](V2CheckInfo.md)
71
+
72
+ ### Authorization
73
+
74
+ [oauth2](../README.md#oauth2)
75
+
76
+ ### HTTP request headers
77
+
78
+ - **Content-Type**: Not defined
79
+ - **Accept**: application/json
80
+
81
+
82
+ ## v2_checks_retrieve
83
+
84
+ > <V2CheckInfo> v2_checks_retrieve(check_type)
85
+
86
+
87
+
88
+ ### Examples
89
+
90
+ ```ruby
91
+ require 'time'
92
+ require 'pescheck-client'
93
+ # setup authorization
94
+ Pescheck.configure do |config|
95
+ # Configure OAuth2 access token for authorization: oauth2
96
+ config.access_token = 'YOUR ACCESS TOKEN'
97
+ end
98
+
99
+ api_instance = Pescheck::ChecksApi.new
100
+ check_type = 'check_type_example' # String |
101
+
102
+ begin
103
+
104
+ result = api_instance.v2_checks_retrieve(check_type)
105
+ p result
106
+ rescue Pescheck::ApiError => e
107
+ puts "Error when calling ChecksApi->v2_checks_retrieve: #{e}"
108
+ end
109
+ ```
110
+
111
+ #### Using the v2_checks_retrieve_with_http_info variant
112
+
113
+ This returns an Array which contains the response data, status code and headers.
114
+
115
+ > <Array(<V2CheckInfo>, Integer, Hash)> v2_checks_retrieve_with_http_info(check_type)
116
+
117
+ ```ruby
118
+ begin
119
+
120
+ data, status_code, headers = api_instance.v2_checks_retrieve_with_http_info(check_type)
121
+ p status_code # => 2xx
122
+ p headers # => { ... }
123
+ p data # => <V2CheckInfo>
124
+ rescue Pescheck::ApiError => e
125
+ puts "Error when calling ChecksApi->v2_checks_retrieve_with_http_info: #{e}"
126
+ end
127
+ ```
128
+
129
+ ### Parameters
130
+
131
+ | Name | Type | Description | Notes |
132
+ | ---- | ---- | ----------- | ----- |
133
+ | **check_type** | **String** | | |
134
+
135
+ ### Return type
136
+
137
+ [**V2CheckInfo**](V2CheckInfo.md)
138
+
139
+ ### Authorization
140
+
141
+ [oauth2](../README.md#oauth2)
142
+
143
+ ### HTTP request headers
144
+
145
+ - **Content-Type**: Not defined
146
+ - **Accept**: application/json
147
+
@@ -0,0 +1,20 @@
1
+ # Pescheck::CustomTokenObtainPair
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **email** | **String** | | |
8
+ | **password** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'pescheck-client'
14
+
15
+ instance = Pescheck::CustomTokenObtainPair.new(
16
+ email: null,
17
+ password: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,46 @@
1
+ # Pescheck::DivisionReadOnly
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [readonly] |
8
+ | **name** | **String** | | [optional] |
9
+ | **parent** | **String** | | [readonly] |
10
+ | **created_at** | **Time** | | [readonly] |
11
+ | **updated_at** | **Time** | | [readonly] |
12
+ | **city** | **String** | | [optional] |
13
+ | **address** | **String** | | [optional] |
14
+ | **postal** | **String** | | [optional] |
15
+ | **phone** | **String** | | [optional] |
16
+ | **contact_name** | **String** | | [optional] |
17
+ | **contact_email** | **String** | | [optional] |
18
+ | **invoice_email** | **String** | | [optional] |
19
+ | **use_parent_on_email** | **Boolean** | | [optional] |
20
+ | **use_parent_on_billing** | **Boolean** | | [optional] |
21
+ | **use_parent_on_report** | **Boolean** | | [optional] |
22
+
23
+ ## Example
24
+
25
+ ```ruby
26
+ require 'pescheck-client'
27
+
28
+ instance = Pescheck::DivisionReadOnly.new(
29
+ id: null,
30
+ name: null,
31
+ parent: null,
32
+ created_at: null,
33
+ updated_at: null,
34
+ city: null,
35
+ address: null,
36
+ postal: null,
37
+ phone: null,
38
+ contact_name: null,
39
+ contact_email: null,
40
+ invoice_email: null,
41
+ use_parent_on_email: null,
42
+ use_parent_on_billing: null,
43
+ use_parent_on_report: null
44
+ )
45
+ ```
46
+
@@ -0,0 +1,40 @@
1
+ # Pescheck::DivisionWrite
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional][readonly] |
8
+ | **name** | **String** | | |
9
+ | **city** | **String** | | |
10
+ | **address** | **String** | | |
11
+ | **postal** | **String** | | |
12
+ | **phone** | **String** | | |
13
+ | **contact_name** | **String** | | |
14
+ | **contact_email** | **String** | | |
15
+ | **invoice_email** | **String** | | |
16
+ | **use_parent_on_email** | **Boolean** | | [optional] |
17
+ | **use_parent_on_billing** | **Boolean** | | [optional] |
18
+ | **use_parent_on_report** | **Boolean** | | [optional] |
19
+
20
+ ## Example
21
+
22
+ ```ruby
23
+ require 'pescheck-client'
24
+
25
+ instance = Pescheck::DivisionWrite.new(
26
+ id: null,
27
+ name: null,
28
+ city: null,
29
+ address: null,
30
+ postal: null,
31
+ phone: null,
32
+ contact_name: null,
33
+ contact_email: null,
34
+ invoice_email: null,
35
+ use_parent_on_email: null,
36
+ use_parent_on_billing: null,
37
+ use_parent_on_report: null
38
+ )
39
+ ```
40
+