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,220 @@
1
+ =begin
2
+ #Pescheck API
3
+
4
+ #API for Pescheck ## Authentication This API supports three authentication methods: 1. **OAuth2** (recommended for API clients) - Use client credentials flow 2. **JWT Bearer** (for user-based access) - Obtain tokens via /api/jwt/ endpoint 3. **Cookie** (for browser-based access) - Session authentication via web login ## Quick Start for API Clients 1. Select your environment from the servers dropdown 2. Use OAuth2 with client credentials flow 3. Scopes are automatically included: read:api, create:api, update:api
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Pescheck
16
+ class AuthenticationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # 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/.
23
+ # @param jwt_generation [JWTGeneration]
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [JWTResponse]
26
+ def generate_jwt_token2(jwt_generation, opts = {})
27
+ data, _status_code, _headers = generate_jwt_token2_with_http_info(jwt_generation, opts)
28
+ data
29
+ end
30
+
31
+ # 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/.
32
+ # @param jwt_generation [JWTGeneration]
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(JWTResponse, Integer, Hash)>] JWTResponse data, response status code and response headers
35
+ def generate_jwt_token2_with_http_info(jwt_generation, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: AuthenticationApi.generate_jwt_token2 ...'
38
+ end
39
+ # verify the required parameter 'jwt_generation' is set
40
+ if @api_client.config.client_side_validation && jwt_generation.nil?
41
+ fail ArgumentError, "Missing the required parameter 'jwt_generation' when calling AuthenticationApi.generate_jwt_token2"
42
+ end
43
+ # resource path
44
+ local_var_path = '/api/v2/jwt/generate/'
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
53
+ # HTTP header 'Content-Type'
54
+ content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
55
+ if !content_type.nil?
56
+ header_params['Content-Type'] = content_type
57
+ end
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(jwt_generation)
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type] || 'JWTResponse'
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['oauth2']
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"AuthenticationApi.generate_jwt_token2",
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: AuthenticationApi#generate_jwt_token2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # 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/.
89
+ # @param custom_token_obtain_pair [CustomTokenObtainPair]
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [CustomTokenObtainPair]
92
+ def jwt_create(custom_token_obtain_pair, opts = {})
93
+ data, _status_code, _headers = jwt_create_with_http_info(custom_token_obtain_pair, opts)
94
+ data
95
+ end
96
+
97
+ # 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/.
98
+ # @param custom_token_obtain_pair [CustomTokenObtainPair]
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(CustomTokenObtainPair, Integer, Hash)>] CustomTokenObtainPair data, response status code and response headers
101
+ def jwt_create_with_http_info(custom_token_obtain_pair, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: AuthenticationApi.jwt_create ...'
104
+ end
105
+ # verify the required parameter 'custom_token_obtain_pair' is set
106
+ if @api_client.config.client_side_validation && custom_token_obtain_pair.nil?
107
+ fail ArgumentError, "Missing the required parameter 'custom_token_obtain_pair' when calling AuthenticationApi.jwt_create"
108
+ end
109
+ # resource path
110
+ local_var_path = '/api/jwt/'
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
119
+ # HTTP header 'Content-Type'
120
+ content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
121
+ if !content_type.nil?
122
+ header_params['Content-Type'] = content_type
123
+ end
124
+
125
+ # form parameters
126
+ form_params = opts[:form_params] || {}
127
+
128
+ # http body (model)
129
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(custom_token_obtain_pair)
130
+
131
+ # return_type
132
+ return_type = opts[:debug_return_type] || 'CustomTokenObtainPair'
133
+
134
+ # auth_names
135
+ auth_names = opts[:debug_auth_names] || ['oauth2']
136
+
137
+ new_options = opts.merge(
138
+ :operation => :"AuthenticationApi.jwt_create",
139
+ :header_params => header_params,
140
+ :query_params => query_params,
141
+ :form_params => form_params,
142
+ :body => post_body,
143
+ :auth_names => auth_names,
144
+ :return_type => return_type
145
+ )
146
+
147
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug "API called: AuthenticationApi#jwt_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
150
+ end
151
+ return data, status_code, headers
152
+ end
153
+
154
+ # Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid.
155
+ # @param token_refresh [TokenRefresh]
156
+ # @param [Hash] opts the optional parameters
157
+ # @return [TokenRefresh]
158
+ def jwt_refresh_create(token_refresh, opts = {})
159
+ data, _status_code, _headers = jwt_refresh_create_with_http_info(token_refresh, opts)
160
+ data
161
+ end
162
+
163
+ # Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid.
164
+ # @param token_refresh [TokenRefresh]
165
+ # @param [Hash] opts the optional parameters
166
+ # @return [Array<(TokenRefresh, Integer, Hash)>] TokenRefresh data, response status code and response headers
167
+ def jwt_refresh_create_with_http_info(token_refresh, opts = {})
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug 'Calling API: AuthenticationApi.jwt_refresh_create ...'
170
+ end
171
+ # verify the required parameter 'token_refresh' is set
172
+ if @api_client.config.client_side_validation && token_refresh.nil?
173
+ fail ArgumentError, "Missing the required parameter 'token_refresh' when calling AuthenticationApi.jwt_refresh_create"
174
+ end
175
+ # resource path
176
+ local_var_path = '/api/jwt/refresh/'
177
+
178
+ # query parameters
179
+ query_params = opts[:query_params] || {}
180
+
181
+ # header parameters
182
+ header_params = opts[:header_params] || {}
183
+ # HTTP header 'Accept' (if needed)
184
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
185
+ # HTTP header 'Content-Type'
186
+ content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
187
+ if !content_type.nil?
188
+ header_params['Content-Type'] = content_type
189
+ end
190
+
191
+ # form parameters
192
+ form_params = opts[:form_params] || {}
193
+
194
+ # http body (model)
195
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(token_refresh)
196
+
197
+ # return_type
198
+ return_type = opts[:debug_return_type] || 'TokenRefresh'
199
+
200
+ # auth_names
201
+ auth_names = opts[:debug_auth_names] || ['oauth2']
202
+
203
+ new_options = opts.merge(
204
+ :operation => :"AuthenticationApi.jwt_refresh_create",
205
+ :header_params => header_params,
206
+ :query_params => query_params,
207
+ :form_params => form_params,
208
+ :body => post_body,
209
+ :auth_names => auth_names,
210
+ :return_type => return_type
211
+ )
212
+
213
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
214
+ if @api_client.config.debugging
215
+ @api_client.config.logger.debug "API called: AuthenticationApi#jwt_refresh_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
216
+ end
217
+ return data, status_code, headers
218
+ end
219
+ end
220
+ end
@@ -0,0 +1,144 @@
1
+ =begin
2
+ #Pescheck API
3
+
4
+ #API for Pescheck ## Authentication This API supports three authentication methods: 1. **OAuth2** (recommended for API clients) - Use client credentials flow 2. **JWT Bearer** (for user-based access) - Obtain tokens via /api/jwt/ endpoint 3. **Cookie** (for browser-based access) - Session authentication via web login ## Quick Start for API Clients 1. Select your environment from the servers dropdown 2. Use OAuth2 with client credentials flow 3. Scopes are automatically included: read:api, create:api, update:api
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Pescheck
16
+ class ChecksApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # 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.
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [String] :check_type Restrict the list to a single check type.
25
+ # @return [Array<V2CheckInfo>]
26
+ def v2_checks_list(opts = {})
27
+ data, _status_code, _headers = v2_checks_list_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # 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.
32
+ # @param [Hash] opts the optional parameters
33
+ # @option opts [String] :check_type Restrict the list to a single check type.
34
+ # @return [Array<(Array<V2CheckInfo>, Integer, Hash)>] Array<V2CheckInfo> data, response status code and response headers
35
+ def v2_checks_list_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: ChecksApi.v2_checks_list ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/api/v2/checks/'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+ query_params[:'check_type'] = opts[:'check_type'] if !opts[:'check_type'].nil?
45
+
46
+ # header parameters
47
+ header_params = opts[:header_params] || {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
50
+
51
+ # form parameters
52
+ form_params = opts[:form_params] || {}
53
+
54
+ # http body (model)
55
+ post_body = opts[:debug_body]
56
+
57
+ # return_type
58
+ return_type = opts[:debug_return_type] || 'Array<V2CheckInfo>'
59
+
60
+ # auth_names
61
+ auth_names = opts[:debug_auth_names] || ['oauth2']
62
+
63
+ new_options = opts.merge(
64
+ :operation => :"ChecksApi.v2_checks_list",
65
+ :header_params => header_params,
66
+ :query_params => query_params,
67
+ :form_params => form_params,
68
+ :body => post_body,
69
+ :auth_names => auth_names,
70
+ :return_type => return_type
71
+ )
72
+
73
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
74
+ if @api_client.config.debugging
75
+ @api_client.config.logger.debug "API called: ChecksApi#v2_checks_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
76
+ end
77
+ return data, status_code, headers
78
+ end
79
+
80
+ # @param check_type [String]
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [V2CheckInfo]
83
+ def v2_checks_retrieve(check_type, opts = {})
84
+ data, _status_code, _headers = v2_checks_retrieve_with_http_info(check_type, opts)
85
+ data
86
+ end
87
+
88
+ # @param check_type [String]
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [Array<(V2CheckInfo, Integer, Hash)>] V2CheckInfo data, response status code and response headers
91
+ def v2_checks_retrieve_with_http_info(check_type, opts = {})
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug 'Calling API: ChecksApi.v2_checks_retrieve ...'
94
+ end
95
+ # verify the required parameter 'check_type' is set
96
+ if @api_client.config.client_side_validation && check_type.nil?
97
+ fail ArgumentError, "Missing the required parameter 'check_type' when calling ChecksApi.v2_checks_retrieve"
98
+ end
99
+ pattern = Regexp.new(/^[a-z0-9]+$/)
100
+ if @api_client.config.client_side_validation && check_type !~ pattern
101
+ fail ArgumentError, "invalid value for 'check_type' when calling ChecksApi.v2_checks_retrieve, must conform to the pattern #{pattern}."
102
+ end
103
+
104
+ # resource path
105
+ local_var_path = '/api/v2/checks/{check_type}/'.sub('{check_type}', CGI.escape(check_type.to_s))
106
+
107
+ # query parameters
108
+ query_params = opts[:query_params] || {}
109
+
110
+ # header parameters
111
+ header_params = opts[:header_params] || {}
112
+ # HTTP header 'Accept' (if needed)
113
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
114
+
115
+ # form parameters
116
+ form_params = opts[:form_params] || {}
117
+
118
+ # http body (model)
119
+ post_body = opts[:debug_body]
120
+
121
+ # return_type
122
+ return_type = opts[:debug_return_type] || 'V2CheckInfo'
123
+
124
+ # auth_names
125
+ auth_names = opts[:debug_auth_names] || ['oauth2']
126
+
127
+ new_options = opts.merge(
128
+ :operation => :"ChecksApi.v2_checks_retrieve",
129
+ :header_params => header_params,
130
+ :query_params => query_params,
131
+ :form_params => form_params,
132
+ :body => post_body,
133
+ :auth_names => auth_names,
134
+ :return_type => return_type
135
+ )
136
+
137
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug "API called: ChecksApi#v2_checks_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
+ end
141
+ return data, status_code, headers
142
+ end
143
+ end
144
+ end