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,201 @@
|
|
|
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
|
+
# Input serializer for one `{check_type, config}` profile-check entry. Used by profile create directly. Subclass with `PARTIAL_CONFIG = True` for screening overrides where only the fields actually being changed should be validated.
|
|
18
|
+
class V2ProfileCheck < ApiModelBase
|
|
19
|
+
# * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `id2check` - id2check * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
|
|
20
|
+
attr_accessor :check_type
|
|
21
|
+
|
|
22
|
+
attr_accessor :config
|
|
23
|
+
|
|
24
|
+
class EnumAttributeValidator
|
|
25
|
+
attr_reader :datatype
|
|
26
|
+
attr_reader :allowable_values
|
|
27
|
+
|
|
28
|
+
def initialize(datatype, allowable_values)
|
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
|
30
|
+
case datatype.to_s
|
|
31
|
+
when /Integer/i
|
|
32
|
+
value.to_i
|
|
33
|
+
when /Float/i
|
|
34
|
+
value.to_f
|
|
35
|
+
else
|
|
36
|
+
value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def valid?(value)
|
|
42
|
+
!value || allowable_values.include?(value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'check_type' => :'check_type',
|
|
50
|
+
:'config' => :'config'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns attribute mapping this model knows about
|
|
55
|
+
def self.acceptable_attribute_map
|
|
56
|
+
attribute_map
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Returns all the JSON keys this model knows about
|
|
60
|
+
def self.acceptable_attributes
|
|
61
|
+
acceptable_attribute_map.values
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Attribute type mapping.
|
|
65
|
+
def self.openapi_types
|
|
66
|
+
{
|
|
67
|
+
:'check_type' => :'String',
|
|
68
|
+
:'config' => :'Hash<String, Object>'
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# List of attributes with nullable: true
|
|
73
|
+
def self.openapi_nullable
|
|
74
|
+
Set.new([
|
|
75
|
+
])
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Initializes the object
|
|
79
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
80
|
+
def initialize(attributes = {})
|
|
81
|
+
if (!attributes.is_a?(Hash))
|
|
82
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pescheck::V2ProfileCheck` initialize method"
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
86
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
88
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
89
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pescheck::V2ProfileCheck`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
90
|
+
end
|
|
91
|
+
h[k.to_sym] = v
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'check_type')
|
|
95
|
+
self.check_type = attributes[:'check_type']
|
|
96
|
+
else
|
|
97
|
+
self.check_type = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'config')
|
|
101
|
+
if (value = attributes[:'config']).is_a?(Hash)
|
|
102
|
+
self.config = value
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
108
|
+
# @return Array for valid properties with the reasons
|
|
109
|
+
def list_invalid_properties
|
|
110
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
111
|
+
invalid_properties = Array.new
|
|
112
|
+
if @check_type.nil?
|
|
113
|
+
invalid_properties.push('invalid value for "check_type", check_type cannot be nil.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
invalid_properties
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Check to see if the all the properties in the model are valid
|
|
120
|
+
# @return true if the model is valid
|
|
121
|
+
def valid?
|
|
122
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
123
|
+
return false if @check_type.nil?
|
|
124
|
+
check_type_validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "id2check", "integritycheck", "openhealthcarecheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
|
|
125
|
+
return false unless check_type_validator.valid?(@check_type)
|
|
126
|
+
true
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
130
|
+
# @param [Object] check_type Object to be assigned
|
|
131
|
+
def check_type=(check_type)
|
|
132
|
+
validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "id2check", "integritycheck", "openhealthcarecheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
|
|
133
|
+
unless validator.valid?(check_type)
|
|
134
|
+
fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
|
|
135
|
+
end
|
|
136
|
+
@check_type = check_type
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Checks equality by comparing each attribute.
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def ==(o)
|
|
142
|
+
return true if self.equal?(o)
|
|
143
|
+
self.class == o.class &&
|
|
144
|
+
check_type == o.check_type &&
|
|
145
|
+
config == o.config
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# @see the `==` method
|
|
149
|
+
# @param [Object] Object to be compared
|
|
150
|
+
def eql?(o)
|
|
151
|
+
self == o
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Calculates hash code according to all attributes.
|
|
155
|
+
# @return [Integer] Hash code
|
|
156
|
+
def hash
|
|
157
|
+
[check_type, config].hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Builds the object from hash
|
|
161
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
162
|
+
# @return [Object] Returns the model itself
|
|
163
|
+
def self.build_from_hash(attributes)
|
|
164
|
+
return nil unless attributes.is_a?(Hash)
|
|
165
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
166
|
+
transformed_hash = {}
|
|
167
|
+
openapi_types.each_pair do |key, type|
|
|
168
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
169
|
+
transformed_hash["#{key}"] = nil
|
|
170
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
171
|
+
# check to ensure the input is an array given that the attribute
|
|
172
|
+
# is documented as an array but the input is not
|
|
173
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
174
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
175
|
+
end
|
|
176
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
177
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
new(transformed_hash)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Returns the object in the form of hash
|
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
|
185
|
+
def to_hash
|
|
186
|
+
hash = {}
|
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
188
|
+
value = self.send(attr)
|
|
189
|
+
if value.nil?
|
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
hash[param] = _to_hash(value)
|
|
195
|
+
end
|
|
196
|
+
hash
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
end
|
|
@@ -0,0 +1,349 @@
|
|
|
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 V2ProfileCheckEntry < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
# * `addresscheck` - addresscheck * `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
|
|
21
|
+
attr_accessor :check_type
|
|
22
|
+
|
|
23
|
+
attr_accessor :display_name
|
|
24
|
+
|
|
25
|
+
attr_accessor :configured_price
|
|
26
|
+
|
|
27
|
+
attr_accessor :config
|
|
28
|
+
|
|
29
|
+
attr_accessor :input_fields
|
|
30
|
+
|
|
31
|
+
attr_accessor :is_system_managed
|
|
32
|
+
|
|
33
|
+
class EnumAttributeValidator
|
|
34
|
+
attr_reader :datatype
|
|
35
|
+
attr_reader :allowable_values
|
|
36
|
+
|
|
37
|
+
def initialize(datatype, allowable_values)
|
|
38
|
+
@allowable_values = allowable_values.map do |value|
|
|
39
|
+
case datatype.to_s
|
|
40
|
+
when /Integer/i
|
|
41
|
+
value.to_i
|
|
42
|
+
when /Float/i
|
|
43
|
+
value.to_f
|
|
44
|
+
else
|
|
45
|
+
value
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def valid?(value)
|
|
51
|
+
!value || allowable_values.include?(value)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
|
+
def self.attribute_map
|
|
57
|
+
{
|
|
58
|
+
:'id' => :'id',
|
|
59
|
+
:'check_type' => :'check_type',
|
|
60
|
+
:'display_name' => :'display_name',
|
|
61
|
+
:'configured_price' => :'configured_price',
|
|
62
|
+
:'config' => :'config',
|
|
63
|
+
:'input_fields' => :'input_fields',
|
|
64
|
+
:'is_system_managed' => :'is_system_managed'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Returns attribute mapping this model knows about
|
|
69
|
+
def self.acceptable_attribute_map
|
|
70
|
+
attribute_map
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Returns all the JSON keys this model knows about
|
|
74
|
+
def self.acceptable_attributes
|
|
75
|
+
acceptable_attribute_map.values
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Attribute type mapping.
|
|
79
|
+
def self.openapi_types
|
|
80
|
+
{
|
|
81
|
+
:'id' => :'String',
|
|
82
|
+
:'check_type' => :'String',
|
|
83
|
+
:'display_name' => :'String',
|
|
84
|
+
:'configured_price' => :'V2Money',
|
|
85
|
+
:'config' => :'Hash<String, Object>',
|
|
86
|
+
:'input_fields' => :'Array<Object>',
|
|
87
|
+
:'is_system_managed' => :'Boolean'
|
|
88
|
+
}
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# List of attributes with nullable: true
|
|
92
|
+
def self.openapi_nullable
|
|
93
|
+
Set.new([
|
|
94
|
+
])
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Initializes the object
|
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
99
|
+
def initialize(attributes = {})
|
|
100
|
+
if (!attributes.is_a?(Hash))
|
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pescheck::V2ProfileCheckEntry` initialize method"
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
105
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
106
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
107
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
108
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pescheck::V2ProfileCheckEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
109
|
+
end
|
|
110
|
+
h[k.to_sym] = v
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'id')
|
|
114
|
+
self.id = attributes[:'id']
|
|
115
|
+
else
|
|
116
|
+
self.id = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'check_type')
|
|
120
|
+
self.check_type = attributes[:'check_type']
|
|
121
|
+
else
|
|
122
|
+
self.check_type = nil
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'display_name')
|
|
126
|
+
self.display_name = attributes[:'display_name']
|
|
127
|
+
else
|
|
128
|
+
self.display_name = nil
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'configured_price')
|
|
132
|
+
self.configured_price = attributes[:'configured_price']
|
|
133
|
+
else
|
|
134
|
+
self.configured_price = nil
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'config')
|
|
138
|
+
if (value = attributes[:'config']).is_a?(Hash)
|
|
139
|
+
self.config = value
|
|
140
|
+
end
|
|
141
|
+
else
|
|
142
|
+
self.config = nil
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'input_fields')
|
|
146
|
+
if (value = attributes[:'input_fields']).is_a?(Array)
|
|
147
|
+
self.input_fields = value
|
|
148
|
+
end
|
|
149
|
+
else
|
|
150
|
+
self.input_fields = nil
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'is_system_managed')
|
|
154
|
+
self.is_system_managed = attributes[:'is_system_managed']
|
|
155
|
+
else
|
|
156
|
+
self.is_system_managed = nil
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
161
|
+
# @return Array for valid properties with the reasons
|
|
162
|
+
def list_invalid_properties
|
|
163
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
164
|
+
invalid_properties = Array.new
|
|
165
|
+
if @id.nil?
|
|
166
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if @check_type.nil?
|
|
170
|
+
invalid_properties.push('invalid value for "check_type", check_type cannot be nil.')
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if @display_name.nil?
|
|
174
|
+
invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if @configured_price.nil?
|
|
178
|
+
invalid_properties.push('invalid value for "configured_price", configured_price cannot be nil.')
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if @config.nil?
|
|
182
|
+
invalid_properties.push('invalid value for "config", config cannot be nil.')
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
if @input_fields.nil?
|
|
186
|
+
invalid_properties.push('invalid value for "input_fields", input_fields cannot be nil.')
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if @is_system_managed.nil?
|
|
190
|
+
invalid_properties.push('invalid value for "is_system_managed", is_system_managed cannot be nil.')
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
invalid_properties
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Check to see if the all the properties in the model are valid
|
|
197
|
+
# @return true if the model is valid
|
|
198
|
+
def valid?
|
|
199
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
200
|
+
return false if @id.nil?
|
|
201
|
+
return false if @check_type.nil?
|
|
202
|
+
check_type_validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "focumcheck", "id2check", "idcheck", "integritycheck", "openhealthcarecheck", "permissioncheck", "pescheckadversemediacheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
|
|
203
|
+
return false unless check_type_validator.valid?(@check_type)
|
|
204
|
+
return false if @display_name.nil?
|
|
205
|
+
return false if @configured_price.nil?
|
|
206
|
+
return false if @config.nil?
|
|
207
|
+
return false if @input_fields.nil?
|
|
208
|
+
return false if @is_system_managed.nil?
|
|
209
|
+
true
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Custom attribute writer method with validation
|
|
213
|
+
# @param [Object] id Value to be assigned
|
|
214
|
+
def id=(id)
|
|
215
|
+
if id.nil?
|
|
216
|
+
fail ArgumentError, 'id cannot be nil'
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
@id = id
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
223
|
+
# @param [Object] check_type Object to be assigned
|
|
224
|
+
def check_type=(check_type)
|
|
225
|
+
validator = EnumAttributeValidator.new('String', ["addresscheck", "adversemediacheck", "bigcheck", "criminalrecordscheck", "criminalrecordsuploadcheck", "customintegritycheck", "cvcheck", "edrcheck", "focumcheck", "id2check", "idcheck", "integritycheck", "openhealthcarecheck", "permissioncheck", "pescheckadversemediacheck", "qualificationcheck", "righttoworkcheck", "vogcheck", "watchlist2check", "watchlistcheck", "workreferencecheck", "worldwidecreditcheck"])
|
|
226
|
+
unless validator.valid?(check_type)
|
|
227
|
+
fail ArgumentError, "invalid value for \"check_type\", must be one of #{validator.allowable_values}."
|
|
228
|
+
end
|
|
229
|
+
@check_type = check_type
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Custom attribute writer method with validation
|
|
233
|
+
# @param [Object] display_name Value to be assigned
|
|
234
|
+
def display_name=(display_name)
|
|
235
|
+
if display_name.nil?
|
|
236
|
+
fail ArgumentError, 'display_name cannot be nil'
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
@display_name = display_name
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Custom attribute writer method with validation
|
|
243
|
+
# @param [Object] configured_price Value to be assigned
|
|
244
|
+
def configured_price=(configured_price)
|
|
245
|
+
if configured_price.nil?
|
|
246
|
+
fail ArgumentError, 'configured_price cannot be nil'
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
@configured_price = configured_price
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Custom attribute writer method with validation
|
|
253
|
+
# @param [Object] config Value to be assigned
|
|
254
|
+
def config=(config)
|
|
255
|
+
if config.nil?
|
|
256
|
+
fail ArgumentError, 'config cannot be nil'
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
@config = config
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Custom attribute writer method with validation
|
|
263
|
+
# @param [Object] input_fields Value to be assigned
|
|
264
|
+
def input_fields=(input_fields)
|
|
265
|
+
if input_fields.nil?
|
|
266
|
+
fail ArgumentError, 'input_fields cannot be nil'
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
@input_fields = input_fields
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Custom attribute writer method with validation
|
|
273
|
+
# @param [Object] is_system_managed Value to be assigned
|
|
274
|
+
def is_system_managed=(is_system_managed)
|
|
275
|
+
if is_system_managed.nil?
|
|
276
|
+
fail ArgumentError, 'is_system_managed cannot be nil'
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
@is_system_managed = is_system_managed
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Checks equality by comparing each attribute.
|
|
283
|
+
# @param [Object] Object to be compared
|
|
284
|
+
def ==(o)
|
|
285
|
+
return true if self.equal?(o)
|
|
286
|
+
self.class == o.class &&
|
|
287
|
+
id == o.id &&
|
|
288
|
+
check_type == o.check_type &&
|
|
289
|
+
display_name == o.display_name &&
|
|
290
|
+
configured_price == o.configured_price &&
|
|
291
|
+
config == o.config &&
|
|
292
|
+
input_fields == o.input_fields &&
|
|
293
|
+
is_system_managed == o.is_system_managed
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# @see the `==` method
|
|
297
|
+
# @param [Object] Object to be compared
|
|
298
|
+
def eql?(o)
|
|
299
|
+
self == o
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Calculates hash code according to all attributes.
|
|
303
|
+
# @return [Integer] Hash code
|
|
304
|
+
def hash
|
|
305
|
+
[id, check_type, display_name, configured_price, config, input_fields, is_system_managed].hash
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Builds the object from hash
|
|
309
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
310
|
+
# @return [Object] Returns the model itself
|
|
311
|
+
def self.build_from_hash(attributes)
|
|
312
|
+
return nil unless attributes.is_a?(Hash)
|
|
313
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
314
|
+
transformed_hash = {}
|
|
315
|
+
openapi_types.each_pair do |key, type|
|
|
316
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
317
|
+
transformed_hash["#{key}"] = nil
|
|
318
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
319
|
+
# check to ensure the input is an array given that the attribute
|
|
320
|
+
# is documented as an array but the input is not
|
|
321
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
322
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
323
|
+
end
|
|
324
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
325
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
326
|
+
end
|
|
327
|
+
end
|
|
328
|
+
new(transformed_hash)
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# Returns the object in the form of hash
|
|
332
|
+
# @return [Hash] Returns the object in the form of hash
|
|
333
|
+
def to_hash
|
|
334
|
+
hash = {}
|
|
335
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
336
|
+
value = self.send(attr)
|
|
337
|
+
if value.nil?
|
|
338
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
339
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
hash[param] = _to_hash(value)
|
|
343
|
+
end
|
|
344
|
+
hash
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
end
|