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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +193 -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/api/authentication_api.rb +220 -0
- data/lib/pescheck/api/checks_api.rb +144 -0
- data/lib/pescheck/api/divisions_api.rb +365 -0
- data/lib/pescheck/api/o_auth_api.rb +202 -0
- data/lib/pescheck/api/profiles_api.rb +432 -0
- data/lib/pescheck/api/screenings_api.rb +288 -0
- data/lib/pescheck/api/webhooks_api.rb +278 -0
- data/lib/pescheck/api_client.rb +441 -0
- data/lib/pescheck/api_error.rb +58 -0
- data/lib/pescheck/api_model_base.rb +88 -0
- data/lib/pescheck/configuration.rb +429 -0
- data/lib/pescheck/models/custom_token_obtain_pair.rb +191 -0
- data/lib/pescheck/models/division_read_only.rb +469 -0
- data/lib/pescheck/models/division_write.rb +436 -0
- data/lib/pescheck/models/jwt_generation.rb +213 -0
- data/lib/pescheck/models/jwt_response.rb +285 -0
- data/lib/pescheck/models/o_auth_application.rb +265 -0
- data/lib/pescheck/models/o_auth_application_response.rb +379 -0
- data/lib/pescheck/models/paginated_division_read_only_list.rb +216 -0
- data/lib/pescheck/models/paginated_v2_profile_list_item_list.rb +216 -0
- data/lib/pescheck/models/paginated_v2_screening_list_item_list.rb +216 -0
- data/lib/pescheck/models/patched_division_write.rb +360 -0
- data/lib/pescheck/models/patched_v2_profile_partial_update.rb +176 -0
- data/lib/pescheck/models/token_refresh.rb +173 -0
- data/lib/pescheck/models/v2_candidate.rb +390 -0
- data/lib/pescheck/models/v2_check_field.rb +246 -0
- data/lib/pescheck/models/v2_check_info.rb +438 -0
- data/lib/pescheck/models/v2_document.rb +308 -0
- data/lib/pescheck/models/v2_document_content.rb +175 -0
- data/lib/pescheck/models/v2_money.rb +210 -0
- data/lib/pescheck/models/v2_profile_check.rb +201 -0
- data/lib/pescheck/models/v2_profile_check_entry.rb +349 -0
- data/lib/pescheck/models/v2_profile_create.rb +212 -0
- data/lib/pescheck/models/v2_profile_detail.rb +401 -0
- data/lib/pescheck/models/v2_profile_list_item.rb +291 -0
- data/lib/pescheck/models/v2_profile_update.rb +213 -0
- data/lib/pescheck/models/v2_profile_update_check.rb +210 -0
- data/lib/pescheck/models/v2_screening_check.rb +221 -0
- data/lib/pescheck/models/v2_screening_check_entry.rb +376 -0
- data/lib/pescheck/models/v2_screening_check_list_item.rb +242 -0
- data/lib/pescheck/models/v2_screening_create.rb +201 -0
- data/lib/pescheck/models/v2_screening_detail.rb +348 -0
- data/lib/pescheck/models/v2_screening_detail_profile.rb +156 -0
- data/lib/pescheck/models/v2_screening_list_item.rb +330 -0
- data/lib/pescheck/models/verify_webhook.rb +166 -0
- data/lib/pescheck/models/webhook.rb +265 -0
- data/lib/pescheck/models/webhook_response.rb +353 -0
- data/lib/pescheck/version.rb +15 -0
- data/lib/pescheck.rb +83 -0
- data/pescheck.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 +302 -0
|
@@ -0,0 +1,360 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Pescheck
|
|
17
|
+
class PatchedDivisionWrite < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
attr_accessor :city
|
|
23
|
+
|
|
24
|
+
attr_accessor :address
|
|
25
|
+
|
|
26
|
+
attr_accessor :postal
|
|
27
|
+
|
|
28
|
+
attr_accessor :phone
|
|
29
|
+
|
|
30
|
+
attr_accessor :contact_name
|
|
31
|
+
|
|
32
|
+
attr_accessor :contact_email
|
|
33
|
+
|
|
34
|
+
attr_accessor :invoice_email
|
|
35
|
+
|
|
36
|
+
attr_accessor :use_parent_on_email
|
|
37
|
+
|
|
38
|
+
attr_accessor :use_parent_on_billing
|
|
39
|
+
|
|
40
|
+
attr_accessor :use_parent_on_report
|
|
41
|
+
|
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
|
+
def self.attribute_map
|
|
44
|
+
{
|
|
45
|
+
:'id' => :'id',
|
|
46
|
+
:'name' => :'name',
|
|
47
|
+
:'city' => :'city',
|
|
48
|
+
:'address' => :'address',
|
|
49
|
+
:'postal' => :'postal',
|
|
50
|
+
:'phone' => :'phone',
|
|
51
|
+
:'contact_name' => :'contact_name',
|
|
52
|
+
:'contact_email' => :'contact_email',
|
|
53
|
+
:'invoice_email' => :'invoice_email',
|
|
54
|
+
:'use_parent_on_email' => :'use_parent_on_email',
|
|
55
|
+
:'use_parent_on_billing' => :'use_parent_on_billing',
|
|
56
|
+
:'use_parent_on_report' => :'use_parent_on_report'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns attribute mapping this model knows about
|
|
61
|
+
def self.acceptable_attribute_map
|
|
62
|
+
attribute_map
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Returns all the JSON keys this model knows about
|
|
66
|
+
def self.acceptable_attributes
|
|
67
|
+
acceptable_attribute_map.values
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Attribute type mapping.
|
|
71
|
+
def self.openapi_types
|
|
72
|
+
{
|
|
73
|
+
:'id' => :'String',
|
|
74
|
+
:'name' => :'String',
|
|
75
|
+
:'city' => :'String',
|
|
76
|
+
:'address' => :'String',
|
|
77
|
+
:'postal' => :'String',
|
|
78
|
+
:'phone' => :'String',
|
|
79
|
+
:'contact_name' => :'String',
|
|
80
|
+
:'contact_email' => :'String',
|
|
81
|
+
:'invoice_email' => :'String',
|
|
82
|
+
:'use_parent_on_email' => :'Boolean',
|
|
83
|
+
:'use_parent_on_billing' => :'Boolean',
|
|
84
|
+
:'use_parent_on_report' => :'Boolean'
|
|
85
|
+
}
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# List of attributes with nullable: true
|
|
89
|
+
def self.openapi_nullable
|
|
90
|
+
Set.new([
|
|
91
|
+
])
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Initializes the object
|
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
96
|
+
def initialize(attributes = {})
|
|
97
|
+
if (!attributes.is_a?(Hash))
|
|
98
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pescheck::PatchedDivisionWrite` initialize method"
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
102
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
103
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
104
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
105
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pescheck::PatchedDivisionWrite`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
106
|
+
end
|
|
107
|
+
h[k.to_sym] = v
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'id')
|
|
111
|
+
self.id = attributes[:'id']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'name')
|
|
115
|
+
self.name = attributes[:'name']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'city')
|
|
119
|
+
self.city = attributes[:'city']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'address')
|
|
123
|
+
self.address = attributes[:'address']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'postal')
|
|
127
|
+
self.postal = attributes[:'postal']
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'phone')
|
|
131
|
+
self.phone = attributes[:'phone']
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'contact_name')
|
|
135
|
+
self.contact_name = attributes[:'contact_name']
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'contact_email')
|
|
139
|
+
self.contact_email = attributes[:'contact_email']
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'invoice_email')
|
|
143
|
+
self.invoice_email = attributes[:'invoice_email']
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'use_parent_on_email')
|
|
147
|
+
self.use_parent_on_email = attributes[:'use_parent_on_email']
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.key?(:'use_parent_on_billing')
|
|
151
|
+
self.use_parent_on_billing = attributes[:'use_parent_on_billing']
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'use_parent_on_report')
|
|
155
|
+
self.use_parent_on_report = attributes[:'use_parent_on_report']
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
160
|
+
# @return Array for valid properties with the reasons
|
|
161
|
+
def list_invalid_properties
|
|
162
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
163
|
+
invalid_properties = Array.new
|
|
164
|
+
if !@name.nil? && @name.to_s.length > 255
|
|
165
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if !@city.nil? && @city.to_s.length > 255
|
|
169
|
+
invalid_properties.push('invalid value for "city", the character length must be smaller than or equal to 255.')
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if !@address.nil? && @address.to_s.length > 255
|
|
173
|
+
invalid_properties.push('invalid value for "address", the character length must be smaller than or equal to 255.')
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if !@postal.nil? && @postal.to_s.length > 20
|
|
177
|
+
invalid_properties.push('invalid value for "postal", the character length must be smaller than or equal to 20.')
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if !@phone.nil? && @phone.to_s.length > 20
|
|
181
|
+
invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 20.')
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if !@contact_name.nil? && @contact_name.to_s.length > 255
|
|
185
|
+
invalid_properties.push('invalid value for "contact_name", the character length must be smaller than or equal to 255.')
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
invalid_properties
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Check to see if the all the properties in the model are valid
|
|
192
|
+
# @return true if the model is valid
|
|
193
|
+
def valid?
|
|
194
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
195
|
+
return false if !@name.nil? && @name.to_s.length > 255
|
|
196
|
+
return false if !@city.nil? && @city.to_s.length > 255
|
|
197
|
+
return false if !@address.nil? && @address.to_s.length > 255
|
|
198
|
+
return false if !@postal.nil? && @postal.to_s.length > 20
|
|
199
|
+
return false if !@phone.nil? && @phone.to_s.length > 20
|
|
200
|
+
return false if !@contact_name.nil? && @contact_name.to_s.length > 255
|
|
201
|
+
true
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Custom attribute writer method with validation
|
|
205
|
+
# @param [Object] name Value to be assigned
|
|
206
|
+
def name=(name)
|
|
207
|
+
if name.nil?
|
|
208
|
+
fail ArgumentError, 'name cannot be nil'
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if name.to_s.length > 255
|
|
212
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
@name = name
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Custom attribute writer method with validation
|
|
219
|
+
# @param [Object] city Value to be assigned
|
|
220
|
+
def city=(city)
|
|
221
|
+
if city.nil?
|
|
222
|
+
fail ArgumentError, 'city cannot be nil'
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if city.to_s.length > 255
|
|
226
|
+
fail ArgumentError, 'invalid value for "city", the character length must be smaller than or equal to 255.'
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
@city = city
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Custom attribute writer method with validation
|
|
233
|
+
# @param [Object] address Value to be assigned
|
|
234
|
+
def address=(address)
|
|
235
|
+
if address.nil?
|
|
236
|
+
fail ArgumentError, 'address cannot be nil'
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if address.to_s.length > 255
|
|
240
|
+
fail ArgumentError, 'invalid value for "address", the character length must be smaller than or equal to 255.'
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
@address = address
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Custom attribute writer method with validation
|
|
247
|
+
# @param [Object] postal Value to be assigned
|
|
248
|
+
def postal=(postal)
|
|
249
|
+
if postal.nil?
|
|
250
|
+
fail ArgumentError, 'postal cannot be nil'
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
if postal.to_s.length > 20
|
|
254
|
+
fail ArgumentError, 'invalid value for "postal", the character length must be smaller than or equal to 20.'
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
@postal = postal
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Custom attribute writer method with validation
|
|
261
|
+
# @param [Object] phone Value to be assigned
|
|
262
|
+
def phone=(phone)
|
|
263
|
+
if phone.nil?
|
|
264
|
+
fail ArgumentError, 'phone cannot be nil'
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if phone.to_s.length > 20
|
|
268
|
+
fail ArgumentError, 'invalid value for "phone", the character length must be smaller than or equal to 20.'
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
@phone = phone
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# Custom attribute writer method with validation
|
|
275
|
+
# @param [Object] contact_name Value to be assigned
|
|
276
|
+
def contact_name=(contact_name)
|
|
277
|
+
if contact_name.nil?
|
|
278
|
+
fail ArgumentError, 'contact_name cannot be nil'
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
if contact_name.to_s.length > 255
|
|
282
|
+
fail ArgumentError, 'invalid value for "contact_name", the character length must be smaller than or equal to 255.'
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
@contact_name = contact_name
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Checks equality by comparing each attribute.
|
|
289
|
+
# @param [Object] Object to be compared
|
|
290
|
+
def ==(o)
|
|
291
|
+
return true if self.equal?(o)
|
|
292
|
+
self.class == o.class &&
|
|
293
|
+
id == o.id &&
|
|
294
|
+
name == o.name &&
|
|
295
|
+
city == o.city &&
|
|
296
|
+
address == o.address &&
|
|
297
|
+
postal == o.postal &&
|
|
298
|
+
phone == o.phone &&
|
|
299
|
+
contact_name == o.contact_name &&
|
|
300
|
+
contact_email == o.contact_email &&
|
|
301
|
+
invoice_email == o.invoice_email &&
|
|
302
|
+
use_parent_on_email == o.use_parent_on_email &&
|
|
303
|
+
use_parent_on_billing == o.use_parent_on_billing &&
|
|
304
|
+
use_parent_on_report == o.use_parent_on_report
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# @see the `==` method
|
|
308
|
+
# @param [Object] Object to be compared
|
|
309
|
+
def eql?(o)
|
|
310
|
+
self == o
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Calculates hash code according to all attributes.
|
|
314
|
+
# @return [Integer] Hash code
|
|
315
|
+
def hash
|
|
316
|
+
[id, name, city, address, postal, phone, contact_name, contact_email, invoice_email, use_parent_on_email, use_parent_on_billing, use_parent_on_report].hash
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Builds the object from hash
|
|
320
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
321
|
+
# @return [Object] Returns the model itself
|
|
322
|
+
def self.build_from_hash(attributes)
|
|
323
|
+
return nil unless attributes.is_a?(Hash)
|
|
324
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
325
|
+
transformed_hash = {}
|
|
326
|
+
openapi_types.each_pair do |key, type|
|
|
327
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
328
|
+
transformed_hash["#{key}"] = nil
|
|
329
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
330
|
+
# check to ensure the input is an array given that the attribute
|
|
331
|
+
# is documented as an array but the input is not
|
|
332
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
333
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
334
|
+
end
|
|
335
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
336
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
new(transformed_hash)
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
# Returns the object in the form of hash
|
|
343
|
+
# @return [Hash] Returns the object in the form of hash
|
|
344
|
+
def to_hash
|
|
345
|
+
hash = {}
|
|
346
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
347
|
+
value = self.send(attr)
|
|
348
|
+
if value.nil?
|
|
349
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
350
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
hash[param] = _to_hash(value)
|
|
354
|
+
end
|
|
355
|
+
hash
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
end
|
|
@@ -0,0 +1,176 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Pescheck
|
|
17
|
+
# PATCH body. Only name and description are editable. Sending `checks` is explicitly rejected - use PUT to replace the full check list.
|
|
18
|
+
class PatchedV2ProfilePartialUpdate < ApiModelBase
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
attr_accessor :description
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'name' => :'name',
|
|
27
|
+
:'description' => :'description'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'name' => :'String',
|
|
45
|
+
:'description' => :'String'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pescheck::PatchedV2ProfilePartialUpdate` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pescheck::PatchedV2ProfilePartialUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'name')
|
|
72
|
+
self.name = attributes[:'name']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'description')
|
|
76
|
+
self.description = attributes[:'description']
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
81
|
+
# @return Array for valid properties with the reasons
|
|
82
|
+
def list_invalid_properties
|
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
84
|
+
invalid_properties = Array.new
|
|
85
|
+
if !@name.nil? && @name.to_s.length > 255
|
|
86
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
invalid_properties
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Check to see if the all the properties in the model are valid
|
|
93
|
+
# @return true if the model is valid
|
|
94
|
+
def valid?
|
|
95
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
96
|
+
return false if !@name.nil? && @name.to_s.length > 255
|
|
97
|
+
true
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Custom attribute writer method with validation
|
|
101
|
+
# @param [Object] name Value to be assigned
|
|
102
|
+
def name=(name)
|
|
103
|
+
if name.nil?
|
|
104
|
+
fail ArgumentError, 'name cannot be nil'
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if name.to_s.length > 255
|
|
108
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
@name = name
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Checks equality by comparing each attribute.
|
|
115
|
+
# @param [Object] Object to be compared
|
|
116
|
+
def ==(o)
|
|
117
|
+
return true if self.equal?(o)
|
|
118
|
+
self.class == o.class &&
|
|
119
|
+
name == o.name &&
|
|
120
|
+
description == o.description
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# @see the `==` method
|
|
124
|
+
# @param [Object] Object to be compared
|
|
125
|
+
def eql?(o)
|
|
126
|
+
self == o
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Calculates hash code according to all attributes.
|
|
130
|
+
# @return [Integer] Hash code
|
|
131
|
+
def hash
|
|
132
|
+
[name, description].hash
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Builds the object from hash
|
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
137
|
+
# @return [Object] Returns the model itself
|
|
138
|
+
def self.build_from_hash(attributes)
|
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
|
140
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
141
|
+
transformed_hash = {}
|
|
142
|
+
openapi_types.each_pair do |key, type|
|
|
143
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = nil
|
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
146
|
+
# check to ensure the input is an array given that the attribute
|
|
147
|
+
# is documented as an array but the input is not
|
|
148
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
149
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
150
|
+
end
|
|
151
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
new(transformed_hash)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Returns the object in the form of hash
|
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
|
160
|
+
def to_hash
|
|
161
|
+
hash = {}
|
|
162
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
163
|
+
value = self.send(attr)
|
|
164
|
+
if value.nil?
|
|
165
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
166
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
hash[param] = _to_hash(value)
|
|
170
|
+
end
|
|
171
|
+
hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
end
|
|
@@ -0,0 +1,173 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Pescheck
|
|
17
|
+
class TokenRefresh < ApiModelBase
|
|
18
|
+
attr_accessor :access
|
|
19
|
+
|
|
20
|
+
attr_accessor :refresh
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'access' => :'access',
|
|
26
|
+
:'refresh' => :'refresh'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'access' => :'String',
|
|
44
|
+
:'refresh' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pescheck::TokenRefresh` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pescheck::TokenRefresh`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'access')
|
|
71
|
+
self.access = attributes[:'access']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'refresh')
|
|
75
|
+
self.refresh = attributes[:'refresh']
|
|
76
|
+
else
|
|
77
|
+
self.refresh = nil
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
|
+
# @return Array for valid properties with the reasons
|
|
83
|
+
def list_invalid_properties
|
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
85
|
+
invalid_properties = Array.new
|
|
86
|
+
if @refresh.nil?
|
|
87
|
+
invalid_properties.push('invalid value for "refresh", refresh cannot be nil.')
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
invalid_properties
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Check to see if the all the properties in the model are valid
|
|
94
|
+
# @return true if the model is valid
|
|
95
|
+
def valid?
|
|
96
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
97
|
+
return false if @refresh.nil?
|
|
98
|
+
true
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Custom attribute writer method with validation
|
|
102
|
+
# @param [Object] refresh Value to be assigned
|
|
103
|
+
def refresh=(refresh)
|
|
104
|
+
if refresh.nil?
|
|
105
|
+
fail ArgumentError, 'refresh cannot be nil'
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
@refresh = refresh
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Checks equality by comparing each attribute.
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def ==(o)
|
|
114
|
+
return true if self.equal?(o)
|
|
115
|
+
self.class == o.class &&
|
|
116
|
+
access == o.access &&
|
|
117
|
+
refresh == o.refresh
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# @see the `==` method
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def eql?(o)
|
|
123
|
+
self == o
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Calculates hash code according to all attributes.
|
|
127
|
+
# @return [Integer] Hash code
|
|
128
|
+
def hash
|
|
129
|
+
[access, refresh].hash
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Builds the object from hash
|
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
134
|
+
# @return [Object] Returns the model itself
|
|
135
|
+
def self.build_from_hash(attributes)
|
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
|
137
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
138
|
+
transformed_hash = {}
|
|
139
|
+
openapi_types.each_pair do |key, type|
|
|
140
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = nil
|
|
142
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
143
|
+
# check to ensure the input is an array given that the attribute
|
|
144
|
+
# is documented as an array but the input is not
|
|
145
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
146
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
147
|
+
end
|
|
148
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
149
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
new(transformed_hash)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Returns the object in the form of hash
|
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
|
157
|
+
def to_hash
|
|
158
|
+
hash = {}
|
|
159
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
160
|
+
value = self.send(attr)
|
|
161
|
+
if value.nil?
|
|
162
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
163
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
hash[param] = _to_hash(value)
|
|
167
|
+
end
|
|
168
|
+
hash
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
end
|