pescheck-client 0.4.2 → 0.4.3

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 (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/docs/AuthenticationApi.md +2 -2
  4. data/docs/CustomTokenObtainPair.md +2 -0
  5. data/docs/V2Document.md +1 -1
  6. data/docs/V2ProfileCheck.md +1 -1
  7. data/docs/V2ProfileCheckEntry.md +1 -1
  8. data/docs/V2ProfileUpdateCheck.md +1 -1
  9. data/docs/V2ScreeningCheck.md +1 -1
  10. data/docs/V2ScreeningCheckEntry.md +1 -1
  11. data/docs/V2ScreeningCheckListItem.md +1 -1
  12. data/docs/V2ScreeningCreate.md +3 -1
  13. data/docs/V2ScreeningDetail.md +2 -0
  14. data/docs/V2ScreeningNote.md +24 -0
  15. data/docs/V2ScreeningNoteInput.md +22 -0
  16. data/lib/pescheck-client/api/authentication_api.rb +4 -4
  17. data/lib/pescheck-client/api/profiles_api.rb +1 -1
  18. data/lib/pescheck-client/models/custom_token_obtain_pair.rb +12 -2
  19. data/lib/pescheck-client/models/v2_document.rb +3 -3
  20. data/lib/pescheck-client/models/v2_profile_check.rb +3 -3
  21. data/lib/pescheck-client/models/v2_profile_check_entry.rb +3 -3
  22. data/lib/pescheck-client/models/v2_profile_update_check.rb +3 -3
  23. data/lib/pescheck-client/models/v2_screening_check.rb +3 -3
  24. data/lib/pescheck-client/models/v2_screening_check_entry.rb +3 -3
  25. data/lib/pescheck-client/models/v2_screening_check_list_item.rb +3 -3
  26. data/lib/pescheck-client/models/v2_screening_create.rb +15 -4
  27. data/lib/pescheck-client/models/v2_screening_detail.rb +29 -1
  28. data/lib/pescheck-client/models/v2_screening_note.rb +229 -0
  29. data/lib/pescheck-client/models/v2_screening_note_input.rb +220 -0
  30. data/lib/pescheck-client/version.rb +1 -1
  31. data/lib/pescheck-client.rb +2 -0
  32. data/spec/models/v2_screening_note_input_spec.rb +52 -0
  33. data/spec/models/v2_screening_note_spec.rb +54 -0
  34. metadata +10 -2
@@ -21,12 +21,15 @@ module Pescheck
21
21
 
22
22
  attr_accessor :checks
23
23
 
24
+ attr_accessor :screening_notes
25
+
24
26
  # Attribute mapping from ruby-style variable name to JSON key.
25
27
  def self.attribute_map
26
28
  {
27
29
  :'profile_id' => :'profile_id',
28
30
  :'candidate' => :'candidate',
29
- :'checks' => :'checks'
31
+ :'checks' => :'checks',
32
+ :'screening_notes' => :'screening_notes'
30
33
  }
31
34
  end
32
35
 
@@ -45,7 +48,8 @@ module Pescheck
45
48
  {
46
49
  :'profile_id' => :'String',
47
50
  :'candidate' => :'V2Candidate',
48
- :'checks' => :'Array<V2ScreeningCheck>'
51
+ :'checks' => :'Array<V2ScreeningCheck>',
52
+ :'screening_notes' => :'Array<V2ScreeningNoteInput>'
49
53
  }
50
54
  end
51
55
 
@@ -88,6 +92,12 @@ module Pescheck
88
92
  self.checks = value
89
93
  end
90
94
  end
95
+
96
+ if attributes.key?(:'screening_notes')
97
+ if (value = attributes[:'screening_notes']).is_a?(Array)
98
+ self.screening_notes = value
99
+ end
100
+ end
91
101
  end
92
102
 
93
103
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -142,7 +152,8 @@ module Pescheck
142
152
  self.class == o.class &&
143
153
  profile_id == o.profile_id &&
144
154
  candidate == o.candidate &&
145
- checks == o.checks
155
+ checks == o.checks &&
156
+ screening_notes == o.screening_notes
146
157
  end
147
158
 
148
159
  # @see the `==` method
@@ -154,7 +165,7 @@ module Pescheck
154
165
  # Calculates hash code according to all attributes.
155
166
  # @return [Integer] Hash code
156
167
  def hash
157
- [profile_id, candidate, checks].hash
168
+ [profile_id, candidate, checks, screening_notes].hash
158
169
  end
159
170
 
160
171
  # Builds the object from hash
@@ -25,6 +25,8 @@ module Pescheck
25
25
 
26
26
  attr_accessor :checks
27
27
 
28
+ attr_accessor :screening_notes
29
+
28
30
  # Public wizard URL for the candidate. Null when no check needs candidate input.
29
31
  attr_accessor :candidate_wizard_url
30
32
 
@@ -43,6 +45,7 @@ module Pescheck
43
45
  :'profile' => :'profile',
44
46
  :'candidate' => :'candidate',
45
47
  :'checks' => :'checks',
48
+ :'screening_notes' => :'screening_notes',
46
49
  :'candidate_wizard_url' => :'candidate_wizard_url',
47
50
  :'dashboard_url' => :'dashboard_url',
48
51
  :'created_at' => :'created_at',
@@ -68,6 +71,7 @@ module Pescheck
68
71
  :'profile' => :'V2ScreeningDetailProfile',
69
72
  :'candidate' => :'V2Candidate',
70
73
  :'checks' => :'Array<V2ScreeningCheckEntry>',
74
+ :'screening_notes' => :'Array<V2ScreeningNote>',
71
75
  :'candidate_wizard_url' => :'String',
72
76
  :'dashboard_url' => :'String',
73
77
  :'created_at' => :'Time',
@@ -131,6 +135,14 @@ module Pescheck
131
135
  self.checks = nil
132
136
  end
133
137
 
138
+ if attributes.key?(:'screening_notes')
139
+ if (value = attributes[:'screening_notes']).is_a?(Array)
140
+ self.screening_notes = value
141
+ end
142
+ else
143
+ self.screening_notes = nil
144
+ end
145
+
134
146
  if attributes.key?(:'candidate_wizard_url')
135
147
  self.candidate_wizard_url = attributes[:'candidate_wizard_url']
136
148
  else
@@ -177,6 +189,10 @@ module Pescheck
177
189
  invalid_properties.push('invalid value for "checks", checks cannot be nil.')
178
190
  end
179
191
 
192
+ if @screening_notes.nil?
193
+ invalid_properties.push('invalid value for "screening_notes", screening_notes cannot be nil.')
194
+ end
195
+
180
196
  if @dashboard_url.nil?
181
197
  invalid_properties.push('invalid value for "dashboard_url", dashboard_url cannot be nil.')
182
198
  end
@@ -200,6 +216,7 @@ module Pescheck
200
216
  return false if @status.nil?
201
217
  return false if @candidate.nil?
202
218
  return false if @checks.nil?
219
+ return false if @screening_notes.nil?
203
220
  return false if @dashboard_url.nil?
204
221
  return false if @created_at.nil?
205
222
  return false if @updated_at.nil?
@@ -246,6 +263,16 @@ module Pescheck
246
263
  @checks = checks
247
264
  end
248
265
 
266
+ # Custom attribute writer method with validation
267
+ # @param [Object] screening_notes Value to be assigned
268
+ def screening_notes=(screening_notes)
269
+ if screening_notes.nil?
270
+ fail ArgumentError, 'screening_notes cannot be nil'
271
+ end
272
+
273
+ @screening_notes = screening_notes
274
+ end
275
+
249
276
  # Custom attribute writer method with validation
250
277
  # @param [Object] dashboard_url Value to be assigned
251
278
  def dashboard_url=(dashboard_url)
@@ -286,6 +313,7 @@ module Pescheck
286
313
  profile == o.profile &&
287
314
  candidate == o.candidate &&
288
315
  checks == o.checks &&
316
+ screening_notes == o.screening_notes &&
289
317
  candidate_wizard_url == o.candidate_wizard_url &&
290
318
  dashboard_url == o.dashboard_url &&
291
319
  created_at == o.created_at &&
@@ -301,7 +329,7 @@ module Pescheck
301
329
  # Calculates hash code according to all attributes.
302
330
  # @return [Integer] Hash code
303
331
  def hash
304
- [id, status, profile, candidate, checks, candidate_wizard_url, dashboard_url, created_at, updated_at].hash
332
+ [id, status, profile, candidate, checks, screening_notes, candidate_wizard_url, dashboard_url, created_at, updated_at].hash
305
333
  end
306
334
 
307
335
  # Builds the object from hash
@@ -0,0 +1,229 @@
1
+ =begin
2
+ #Pescheck API
3
+
4
+ #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.
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
+ # A note recorded on the screening. `check_id` is the Check the note targets (null for type-only or unscoped notes).
18
+ class V2ScreeningNote < ApiModelBase
19
+ attr_accessor :note
20
+
21
+ attr_accessor :check_type
22
+
23
+ attr_accessor :check_id
24
+
25
+ attr_accessor :created_at
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'note' => :'note',
31
+ :'check_type' => :'check_type',
32
+ :'check_id' => :'check_id',
33
+ :'created_at' => :'created_at'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'note' => :'String',
51
+ :'check_type' => :'String',
52
+ :'check_id' => :'String',
53
+ :'created_at' => :'Time'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ :'check_id',
61
+ ])
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pescheck::V2ScreeningNote` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ acceptable_attribute_map = self.class.acceptable_attribute_map
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!acceptable_attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pescheck::V2ScreeningNote`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'note')
81
+ self.note = attributes[:'note']
82
+ else
83
+ self.note = nil
84
+ end
85
+
86
+ if attributes.key?(:'check_type')
87
+ self.check_type = attributes[:'check_type']
88
+ else
89
+ self.check_type = nil
90
+ end
91
+
92
+ if attributes.key?(:'check_id')
93
+ self.check_id = attributes[:'check_id']
94
+ else
95
+ self.check_id = nil
96
+ end
97
+
98
+ if attributes.key?(:'created_at')
99
+ self.created_at = attributes[:'created_at']
100
+ else
101
+ self.created_at = nil
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ if @note.nil?
111
+ invalid_properties.push('invalid value for "note", note cannot be nil.')
112
+ end
113
+
114
+ if @check_type.nil?
115
+ invalid_properties.push('invalid value for "check_type", check_type cannot be nil.')
116
+ end
117
+
118
+ if @created_at.nil?
119
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
120
+ end
121
+
122
+ invalid_properties
123
+ end
124
+
125
+ # Check to see if the all the properties in the model are valid
126
+ # @return true if the model is valid
127
+ def valid?
128
+ warn '[DEPRECATED] the `valid?` method is obsolete'
129
+ return false if @note.nil?
130
+ return false if @check_type.nil?
131
+ return false if @created_at.nil?
132
+ true
133
+ end
134
+
135
+ # Custom attribute writer method with validation
136
+ # @param [Object] note Value to be assigned
137
+ def note=(note)
138
+ if note.nil?
139
+ fail ArgumentError, 'note cannot be nil'
140
+ end
141
+
142
+ @note = note
143
+ end
144
+
145
+ # Custom attribute writer method with validation
146
+ # @param [Object] check_type Value to be assigned
147
+ def check_type=(check_type)
148
+ if check_type.nil?
149
+ fail ArgumentError, 'check_type cannot be nil'
150
+ end
151
+
152
+ @check_type = check_type
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] created_at Value to be assigned
157
+ def created_at=(created_at)
158
+ if created_at.nil?
159
+ fail ArgumentError, 'created_at cannot be nil'
160
+ end
161
+
162
+ @created_at = created_at
163
+ end
164
+
165
+ # Checks equality by comparing each attribute.
166
+ # @param [Object] Object to be compared
167
+ def ==(o)
168
+ return true if self.equal?(o)
169
+ self.class == o.class &&
170
+ note == o.note &&
171
+ check_type == o.check_type &&
172
+ check_id == o.check_id &&
173
+ created_at == o.created_at
174
+ end
175
+
176
+ # @see the `==` method
177
+ # @param [Object] Object to be compared
178
+ def eql?(o)
179
+ self == o
180
+ end
181
+
182
+ # Calculates hash code according to all attributes.
183
+ # @return [Integer] Hash code
184
+ def hash
185
+ [note, check_type, check_id, created_at].hash
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def self.build_from_hash(attributes)
192
+ return nil unless attributes.is_a?(Hash)
193
+ attributes = attributes.transform_keys(&:to_sym)
194
+ transformed_hash = {}
195
+ openapi_types.each_pair do |key, type|
196
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
197
+ transformed_hash["#{key}"] = nil
198
+ elsif type =~ /\AArray<(.*)>/i
199
+ # check to ensure the input is an array given that the attribute
200
+ # is documented as an array but the input is not
201
+ if attributes[attribute_map[key]].is_a?(Array)
202
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
203
+ end
204
+ elsif !attributes[attribute_map[key]].nil?
205
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
206
+ end
207
+ end
208
+ new(transformed_hash)
209
+ end
210
+
211
+ # Returns the object in the form of hash
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_hash
214
+ hash = {}
215
+ self.class.attribute_map.each_pair do |attr, param|
216
+ value = self.send(attr)
217
+ if value.nil?
218
+ is_nullable = self.class.openapi_nullable.include?(attr)
219
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
220
+ end
221
+
222
+ hash[param] = _to_hash(value)
223
+ end
224
+ hash
225
+ end
226
+
227
+ end
228
+
229
+ end
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #Pescheck API
3
+
4
+ #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.
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
+ # A note to record on the screening at creation. Scope it to a specific check with `profile_check_id` (links the note to the Check spawned from that ProfileCheck) or to a `check_type`; `profile_check_id` wins when both are given. With neither, the note is recorded against the screening with no check (check_type 'other').
18
+ class V2ScreeningNoteInput < ApiModelBase
19
+ attr_accessor :note
20
+
21
+ # Links the note to the Check spawned from this ProfileCheck. Wins over check_type.
22
+ attr_accessor :profile_check_id
23
+
24
+ # Scope the note to a check type. Ignored when profile_check_id is given. * `addresscheck` - addresscheck * `adversemedia2check` - adversemedia2check * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `focumcheck` - focumcheck * `id2check` - id2check * `idcheck` - idcheck * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `permissioncheck` - permissioncheck * `pescheckadversemediacheck` - pescheckadversemediacheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
25
+ attr_accessor :check_type
26
+
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'note' => :'note',
53
+ :'profile_check_id' => :'profile_check_id',
54
+ :'check_type' => :'check_type'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'note' => :'String',
72
+ :'profile_check_id' => :'String',
73
+ :'check_type' => :'String'
74
+ }
75
+ end
76
+
77
+ # List of attributes with nullable: true
78
+ def self.openapi_nullable
79
+ Set.new([
80
+ :'profile_check_id',
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pescheck::V2ScreeningNoteInput` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ acceptable_attribute_map = self.class.acceptable_attribute_map
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!acceptable_attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pescheck::V2ScreeningNoteInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'note')
101
+ self.note = attributes[:'note']
102
+ else
103
+ self.note = nil
104
+ end
105
+
106
+ if attributes.key?(:'profile_check_id')
107
+ self.profile_check_id = attributes[:'profile_check_id']
108
+ end
109
+
110
+ if attributes.key?(:'check_type')
111
+ self.check_type = attributes[:'check_type']
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
119
+ invalid_properties = Array.new
120
+ if @note.nil?
121
+ invalid_properties.push('invalid value for "note", note cannot be nil.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if @note.nil?
132
+ check_type_validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemedia2check", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "focumcheck", "id2check", "idcheck", "integritycheck", "openhealthcarecheck", "permissioncheck", "pescheckadversemediacheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck", ""])
133
+ return false unless check_type_validator.valid?(@check_type)
134
+ true
135
+ end
136
+
137
+ # Custom attribute writer method with validation
138
+ # @param [Object] note Value to be assigned
139
+ def note=(note)
140
+ if note.nil?
141
+ fail ArgumentError, 'note cannot be nil'
142
+ end
143
+
144
+ @note = note
145
+ end
146
+
147
+ # Custom attribute writer method checking allowed values (enum).
148
+ # @param [Object] check_type Object to be assigned
149
+ def check_type=(check_type)
150
+ validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemedia2check", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "focumcheck", "id2check", "idcheck", "integritycheck", "openhealthcarecheck", "permissioncheck", "pescheckadversemediacheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck", ""])
151
+ unless validator.valid?(check_type)
152
+ fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
153
+ end
154
+ @check_type = check_type
155
+ end
156
+
157
+ # Checks equality by comparing each attribute.
158
+ # @param [Object] Object to be compared
159
+ def ==(o)
160
+ return true if self.equal?(o)
161
+ self.class == o.class &&
162
+ note == o.note &&
163
+ profile_check_id == o.profile_check_id &&
164
+ check_type == o.check_type
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [note, profile_check_id, check_type].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ attributes = attributes.transform_keys(&:to_sym)
185
+ transformed_hash = {}
186
+ openapi_types.each_pair do |key, type|
187
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
188
+ transformed_hash["#{key}"] = nil
189
+ elsif type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[attribute_map[key]].is_a?(Array)
193
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
194
+ end
195
+ elsif !attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
197
+ end
198
+ end
199
+ new(transformed_hash)
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -11,5 +11,5 @@ Generator version: 7.23.0
11
11
  =end
12
12
 
13
13
  module Pescheck
14
- VERSION = '0.4.2'
14
+ VERSION = '0.4.3'
15
15
  end
@@ -51,6 +51,8 @@ require 'pescheck-client/models/v2_screening_create'
51
51
  require 'pescheck-client/models/v2_screening_detail'
52
52
  require 'pescheck-client/models/v2_screening_detail_profile'
53
53
  require 'pescheck-client/models/v2_screening_list_item'
54
+ require 'pescheck-client/models/v2_screening_note'
55
+ require 'pescheck-client/models/v2_screening_note_input'
54
56
  require 'pescheck-client/models/verify_webhook'
55
57
  require 'pescheck-client/models/webhook'
56
58
  require 'pescheck-client/models/webhook_response'
@@ -0,0 +1,52 @@
1
+ =begin
2
+ #Pescheck API
3
+
4
+ #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.
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Pescheck::V2ScreeningNoteInput
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Pescheck::V2ScreeningNoteInput do
21
+ #let(:instance) { Pescheck::V2ScreeningNoteInput.new }
22
+
23
+ describe 'test an instance of V2ScreeningNoteInput' do
24
+ it 'should create an instance of V2ScreeningNoteInput' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Pescheck::V2ScreeningNoteInput)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "note"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "profile_check_id"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "check_type"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["addresscheck", "adversemedia2check", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "focumcheck", "id2check", "idcheck", "integritycheck", "openhealthcarecheck", "permissioncheck", "pescheckadversemediacheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck", ""])
46
+ # validator.allowable_values.each do |value|
47
+ # expect { instance.check_type = value }.not_to raise_error
48
+ # end
49
+ end
50
+ end
51
+
52
+ end