open_api_smart_recruiters_sdk 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +13 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +65 -0
- data/LICENSE.txt +21 -0
- data/README.md +35 -0
- data/Rakefile +12 -0
- data/lib/smart_recruiters/api/application_api_api.rb +188 -0
- data/lib/smart_recruiters/api/candidates_api.rb +2417 -0
- data/lib/smart_recruiters/api/configuration_api.rb +2504 -0
- data/lib/smart_recruiters/api/job_applications_api.rb +63 -0
- data/lib/smart_recruiters/api/jobs_api.rb +1851 -0
- data/lib/smart_recruiters/api/subscriptions_api.rb +469 -0
- data/lib/smart_recruiters/api_client.rb +379 -0
- data/lib/smart_recruiters/api_error.rb +46 -0
- data/lib/smart_recruiters/authorization.rb +66 -0
- data/lib/smart_recruiters/configuration.rb +214 -0
- data/lib/smart_recruiters/models/action.rb +248 -0
- data/lib/smart_recruiters/models/actions.rb +190 -0
- data/lib/smart_recruiters/models/all_of_candidate_details_primary_assignment.rb +262 -0
- data/lib/smart_recruiters/models/all_of_candidate_details_secondary_assignments_items.rb +262 -0
- data/lib/smart_recruiters/models/answer_field.rb +227 -0
- data/lib/smart_recruiters/models/answer_field_value.rb +216 -0
- data/lib/smart_recruiters/models/answer_record.rb +197 -0
- data/lib/smart_recruiters/models/application.rb +260 -0
- data/lib/smart_recruiters/models/application_attachment_webhook_payload.rb +248 -0
- data/lib/smart_recruiters/models/application_status_info.rb +231 -0
- data/lib/smart_recruiters/models/application_url.rb +198 -0
- data/lib/smart_recruiters/models/application_webhook_payload.rb +230 -0
- data/lib/smart_recruiters/models/apply_api_error.rb +259 -0
- data/lib/smart_recruiters/models/apply_api_request.rb +386 -0
- data/lib/smart_recruiters/models/apply_api_response.rb +224 -0
- data/lib/smart_recruiters/models/apply_configuration.rb +229 -0
- data/lib/smart_recruiters/models/apply_settings.rb +197 -0
- data/lib/smart_recruiters/models/assignment.rb +251 -0
- data/lib/smart_recruiters/models/assignment_actions.rb +197 -0
- data/lib/smart_recruiters/models/attachment.rb +230 -0
- data/lib/smart_recruiters/models/attachment_actions.rb +202 -0
- data/lib/smart_recruiters/models/attachments.rb +218 -0
- data/lib/smart_recruiters/models/callback_authentication.rb +188 -0
- data/lib/smart_recruiters/models/callback_basic_auth.rb +249 -0
- data/lib/smart_recruiters/models/callback_header_auth.rb +250 -0
- data/lib/smart_recruiters/models/callback_o_auth2_auth.rb +262 -0
- data/lib/smart_recruiters/models/callback_request.rb +216 -0
- data/lib/smart_recruiters/models/callback_request_request_details.rb +219 -0
- data/lib/smart_recruiters/models/callback_request_status.rb +19 -0
- data/lib/smart_recruiters/models/callback_requests.rb +192 -0
- data/lib/smart_recruiters/models/callback_url.rb +188 -0
- data/lib/smart_recruiters/models/candidate.rb +349 -0
- data/lib/smart_recruiters/models/candidate_actions.rb +216 -0
- data/lib/smart_recruiters/models/candidate_attachment_for_job.rb +253 -0
- data/lib/smart_recruiters/models/candidate_attachment_for_job_actions.rb +216 -0
- data/lib/smart_recruiters/models/candidate_attachments_for_job.rb +218 -0
- data/lib/smart_recruiters/models/candidate_consent.rb +197 -0
- data/lib/smart_recruiters/models/candidate_consent_decisions.rb +213 -0
- data/lib/smart_recruiters/models/candidate_consent_status.rb +212 -0
- data/lib/smart_recruiters/models/candidate_details.rb +349 -0
- data/lib/smart_recruiters/models/candidate_details_actions.rb +229 -0
- data/lib/smart_recruiters/models/candidate_input.rb +308 -0
- data/lib/smart_recruiters/models/candidate_job.rb +216 -0
- data/lib/smart_recruiters/models/candidate_location.rb +251 -0
- data/lib/smart_recruiters/models/candidate_primary_assignment.rb +225 -0
- data/lib/smart_recruiters/models/candidate_primary_assignment_job.rb +230 -0
- data/lib/smart_recruiters/models/candidate_primary_assignment_job_actions.rb +202 -0
- data/lib/smart_recruiters/models/candidate_properties.rb +199 -0
- data/lib/smart_recruiters/models/candidate_property.rb +268 -0
- data/lib/smart_recruiters/models/candidate_property_actions.rb +202 -0
- data/lib/smart_recruiters/models/candidate_property_availability.rb +253 -0
- data/lib/smart_recruiters/models/candidate_property_definition.rb +233 -0
- data/lib/smart_recruiters/models/candidate_property_definition_list.rb +208 -0
- data/lib/smart_recruiters/models/candidate_property_filter.rb +215 -0
- data/lib/smart_recruiters/models/candidate_property_filter_values.rb +208 -0
- data/lib/smart_recruiters/models/candidate_property_input_value.rb +198 -0
- data/lib/smart_recruiters/models/candidate_property_type.rb +27 -0
- data/lib/smart_recruiters/models/candidate_property_value.rb +212 -0
- data/lib/smart_recruiters/models/candidate_property_value_label.rb +202 -0
- data/lib/smart_recruiters/models/candidate_property_value_list.rb +208 -0
- data/lib/smart_recruiters/models/candidate_secondary_assignments.rb +202 -0
- data/lib/smart_recruiters/models/candidate_source.rb +225 -0
- data/lib/smart_recruiters/models/candidate_status.rb +230 -0
- data/lib/smart_recruiters/models/candidate_status_enum.rb +26 -0
- data/lib/smart_recruiters/models/candidate_status_history_list.rb +208 -0
- data/lib/smart_recruiters/models/candidate_status_history_list_elem.rb +224 -0
- data/lib/smart_recruiters/models/candidate_tags.rb +204 -0
- data/lib/smart_recruiters/models/candidate_webhook_payload.rb +202 -0
- data/lib/smart_recruiters/models/candidates.rb +255 -0
- data/lib/smart_recruiters/models/company_configuration.rb +246 -0
- data/lib/smart_recruiters/models/compensation.rb +215 -0
- data/lib/smart_recruiters/models/consent_decision.rb +226 -0
- data/lib/smart_recruiters/models/consent_decision_status.rb +20 -0
- data/lib/smart_recruiters/models/consent_request.rb +203 -0
- data/lib/smart_recruiters/models/consent_request_scheduled.rb +250 -0
- data/lib/smart_recruiters/models/consent_request_scheduled_body.rb +197 -0
- data/lib/smart_recruiters/models/consent_request_unavailable.rb +245 -0
- data/lib/smart_recruiters/models/consent_requests_results.rb +204 -0
- data/lib/smart_recruiters/models/consent_scope.rb +22 -0
- data/lib/smart_recruiters/models/consent_status.rb +20 -0
- data/lib/smart_recruiters/models/department.rb +220 -0
- data/lib/smart_recruiters/models/departments.rb +208 -0
- data/lib/smart_recruiters/models/dependent_job_properties.rb +218 -0
- data/lib/smart_recruiters/models/dependent_job_properties_ids.rb +204 -0
- data/lib/smart_recruiters/models/dependent_job_property.rb +216 -0
- data/lib/smart_recruiters/models/dependent_job_property_value.rb +220 -0
- data/lib/smart_recruiters/models/dependent_job_property_values.rb +208 -0
- data/lib/smart_recruiters/models/dependent_job_property_values_relation.rb +218 -0
- data/lib/smart_recruiters/models/dependent_job_property_values_relations.rb +218 -0
- data/lib/smart_recruiters/models/education.rb +270 -0
- data/lib/smart_recruiters/models/email_address.rb +188 -0
- data/lib/smart_recruiters/models/employment.rb +261 -0
- data/lib/smart_recruiters/models/error.rb +211 -0
- data/lib/smart_recruiters/models/error_response.rb +208 -0
- data/lib/smart_recruiters/models/event.rb +206 -0
- data/lib/smart_recruiters/models/event_name.rb +64 -0
- data/lib/smart_recruiters/models/experience.rb +251 -0
- data/lib/smart_recruiters/models/field_value.rb +216 -0
- data/lib/smart_recruiters/models/headcount_patch_request.rb +197 -0
- data/lib/smart_recruiters/models/headcount_update_accepted.rb +231 -0
- data/lib/smart_recruiters/models/hiring_process.rb +224 -0
- data/lib/smart_recruiters/models/hiring_process_sub_statuses.rb +221 -0
- data/lib/smart_recruiters/models/hiring_processes.rb +218 -0
- data/lib/smart_recruiters/models/hiring_team_member.rb +220 -0
- data/lib/smart_recruiters/models/hiring_team_member_response.rb +215 -0
- data/lib/smart_recruiters/models/hiring_team_member_response_actions.rb +202 -0
- data/lib/smart_recruiters/models/hiring_team_member_role.rb +22 -0
- data/lib/smart_recruiters/models/hiring_team_members.rb +208 -0
- data/lib/smart_recruiters/models/id_attachments_body.rb +249 -0
- data/lib/smart_recruiters/models/identifiable.rb +202 -0
- data/lib/smart_recruiters/models/industry.rb +207 -0
- data/lib/smart_recruiters/models/job.rb +197 -0
- data/lib/smart_recruiters/models/job_ad.rb +206 -0
- data/lib/smart_recruiters/models/job_ad_content.rb +220 -0
- data/lib/smart_recruiters/models/job_ad_input.rb +206 -0
- data/lib/smart_recruiters/models/job_ad_item.rb +397 -0
- data/lib/smart_recruiters/models/job_ad_item_actions.rb +202 -0
- data/lib/smart_recruiters/models/job_ad_language.rb +202 -0
- data/lib/smart_recruiters/models/job_ad_postings_webhook_payload.rb +216 -0
- data/lib/smart_recruiters/models/job_ad_publication_scheduled.rb +231 -0
- data/lib/smart_recruiters/models/job_ad_section.rb +206 -0
- data/lib/smart_recruiters/models/job_ad_sections.rb +233 -0
- data/lib/smart_recruiters/models/job_ad_unpublish_scheduled.rb +231 -0
- data/lib/smart_recruiters/models/job_ad_videos.rb +199 -0
- data/lib/smart_recruiters/models/job_ad_webhook_payload.rb +216 -0
- data/lib/smart_recruiters/models/job_ads.rb +192 -0
- data/lib/smart_recruiters/models/job_application.rb +242 -0
- data/lib/smart_recruiters/models/job_application_status.rb +26 -0
- data/lib/smart_recruiters/models/job_approval.rb +217 -0
- data/lib/smart_recruiters/models/job_approval_position.rb +251 -0
- data/lib/smart_recruiters/models/job_approval_webhook_payload.rb +216 -0
- data/lib/smart_recruiters/models/job_details.rb +394 -0
- data/lib/smart_recruiters/models/job_details_actions.rb +233 -0
- data/lib/smart_recruiters/models/job_id_attachments_body.rb +249 -0
- data/lib/smart_recruiters/models/job_input.rb +341 -0
- data/lib/smart_recruiters/models/job_job.rb +215 -0
- data/lib/smart_recruiters/models/job_job_actions.rb +211 -0
- data/lib/smart_recruiters/models/job_location_input.rb +252 -0
- data/lib/smart_recruiters/models/job_note.rb +202 -0
- data/lib/smart_recruiters/models/job_position.rb +256 -0
- data/lib/smart_recruiters/models/job_position_input.rb +282 -0
- data/lib/smart_recruiters/models/job_positions.rb +218 -0
- data/lib/smart_recruiters/models/job_property.rb +225 -0
- data/lib/smart_recruiters/models/job_property_definition.rb +300 -0
- data/lib/smart_recruiters/models/job_property_definition_creation_request.rb +282 -0
- data/lib/smart_recruiters/models/job_property_definition_list.rb +208 -0
- data/lib/smart_recruiters/models/job_property_input.rb +220 -0
- data/lib/smart_recruiters/models/job_property_value.rb +206 -0
- data/lib/smart_recruiters/models/job_property_value_definition.rb +220 -0
- data/lib/smart_recruiters/models/job_property_value_definition_list.rb +208 -0
- data/lib/smart_recruiters/models/job_status.rb +25 -0
- data/lib/smart_recruiters/models/job_status_history.rb +216 -0
- data/lib/smart_recruiters/models/job_status_history_actions.rb +202 -0
- data/lib/smart_recruiters/models/job_status_history_content.rb +220 -0
- data/lib/smart_recruiters/models/job_status_update.rb +202 -0
- data/lib/smart_recruiters/models/job_summary.rb +302 -0
- data/lib/smart_recruiters/models/job_webhook_payload.rb +202 -0
- data/lib/smart_recruiters/models/jobs.rb +235 -0
- data/lib/smart_recruiters/models/json_patch.rb +192 -0
- data/lib/smart_recruiters/models/json_pointer.rb +188 -0
- data/lib/smart_recruiters/models/label_translation.rb +216 -0
- data/lib/smart_recruiters/models/label_translations.rb +192 -0
- data/lib/smart_recruiters/models/labeled.rb +202 -0
- data/lib/smart_recruiters/models/language.rb +220 -0
- data/lib/smart_recruiters/models/language_code.rb +87 -0
- data/lib/smart_recruiters/models/location.rb +251 -0
- data/lib/smart_recruiters/models/model_when.rb +189 -0
- data/lib/smart_recruiters/models/offer_approval_webhook_payload.rb +244 -0
- data/lib/smart_recruiters/models/offer_properties_category.rb +208 -0
- data/lib/smart_recruiters/models/offer_properties_definition.rb +199 -0
- data/lib/smart_recruiters/models/offer_property_definition.rb +258 -0
- data/lib/smart_recruiters/models/offer_webhook_payload.rb +230 -0
- data/lib/smart_recruiters/models/onboarding_assignments_completed_webhook_payload.rb +216 -0
- data/lib/smart_recruiters/models/onboarding_high_priority_assignments_completed_webhook_payload.rb +216 -0
- data/lib/smart_recruiters/models/onboarding_process_webhook_payload.rb +216 -0
- data/lib/smart_recruiters/models/onboarding_status.rb +236 -0
- data/lib/smart_recruiters/models/one_of_candidate_property_value.rb +188 -0
- data/lib/smart_recruiters/models/one_of_consent_requests_results_results_items.rb +188 -0
- data/lib/smart_recruiters/models/one_of_json_patch_items.rb +188 -0
- data/lib/smart_recruiters/models/path.rb +202 -0
- data/lib/smart_recruiters/models/personal_details.rb +242 -0
- data/lib/smart_recruiters/models/position_webhook_payload.rb +216 -0
- data/lib/smart_recruiters/models/posting_status.rb +21 -0
- data/lib/smart_recruiters/models/privacy_policy.rb +206 -0
- data/lib/smart_recruiters/models/properties.rb +208 -0
- data/lib/smart_recruiters/models/property.rb +211 -0
- data/lib/smart_recruiters/models/publication.rb +244 -0
- data/lib/smart_recruiters/models/publication_list.rb +204 -0
- data/lib/smart_recruiters/models/publication_list_item.rb +239 -0
- data/lib/smart_recruiters/models/relation_job_property_value.rb +211 -0
- data/lib/smart_recruiters/models/review_webhook_payload.rb +216 -0
- data/lib/smart_recruiters/models/salary_range.rb +215 -0
- data/lib/smart_recruiters/models/screening_answer.rb +313 -0
- data/lib/smart_recruiters/models/screening_answers.rb +218 -0
- data/lib/smart_recruiters/models/screening_question.rb +246 -0
- data/lib/smart_recruiters/models/screening_question_answer.rb +218 -0
- data/lib/smart_recruiters/models/screening_question_field.rb +315 -0
- data/lib/smart_recruiters/models/screening_questions_answers_webhook_payload.rb +230 -0
- data/lib/smart_recruiters/models/secret_key_payload.rb +197 -0
- data/lib/smart_recruiters/models/source.rb +244 -0
- data/lib/smart_recruiters/models/source_actions.rb +202 -0
- data/lib/smart_recruiters/models/source_definition.rb +230 -0
- data/lib/smart_recruiters/models/source_details.rb +225 -0
- data/lib/smart_recruiters/models/source_types.rb +218 -0
- data/lib/smart_recruiters/models/source_types_actions.rb +202 -0
- data/lib/smart_recruiters/models/source_types_content.rb +246 -0
- data/lib/smart_recruiters/models/sources.rb +246 -0
- data/lib/smart_recruiters/models/subscription.rb +270 -0
- data/lib/smart_recruiters/models/subscription_request.rb +236 -0
- data/lib/smart_recruiters/models/subscriptions.rb +192 -0
- data/lib/smart_recruiters/models/user_identity.rb +215 -0
- data/lib/smart_recruiters/models/uuid.rb +188 -0
- data/lib/smart_recruiters/models/valid_job_status.rb +24 -0
- data/lib/smart_recruiters/models/web.rb +233 -0
- data/lib/smart_recruiters/models/web_profile.rb +233 -0
- data/lib/smart_recruiters/version.rb +5 -0
- data/lib/smart_recruiters.rb +46 -0
- data/open_api_smart_recruiters_sdk.gemspec +45 -0
- data/sig/smart_recruiters.rbs +4 -0
- metadata +367 -0
@@ -0,0 +1,245 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module SmartRecruiters
|
6
|
+
class ConsentRequestUnavailable
|
7
|
+
attr_accessor :status
|
8
|
+
|
9
|
+
attr_accessor :body
|
10
|
+
|
11
|
+
class EnumAttributeValidator
|
12
|
+
attr_reader :datatype
|
13
|
+
attr_reader :allowable_values
|
14
|
+
|
15
|
+
def initialize(datatype, allowable_values)
|
16
|
+
@allowable_values = allowable_values.map do |value|
|
17
|
+
case datatype.to_s
|
18
|
+
when /Integer/i
|
19
|
+
value.to_i
|
20
|
+
when /Float/i
|
21
|
+
value.to_f
|
22
|
+
else
|
23
|
+
value
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def valid?(value)
|
29
|
+
!value || allowable_values.include?(value)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'status' => :'status',
|
37
|
+
:'body' => :'body'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'status' => :'Object',
|
45
|
+
:'body' => :'Object'
|
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 `SmartRecruiters::ConsentRequestUnavailable` initialize method"
|
60
|
+
end
|
61
|
+
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
64
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmartRecruiters::ConsentRequestUnavailable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
66
|
+
end
|
67
|
+
h[k.to_sym] = v
|
68
|
+
}
|
69
|
+
|
70
|
+
if attributes.key?(:'status')
|
71
|
+
self.status = attributes[:'status']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'body')
|
75
|
+
self.body = attributes[:'body']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
80
|
+
# @return Array for valid properties with the reasons
|
81
|
+
def list_invalid_properties
|
82
|
+
invalid_properties = Array.new
|
83
|
+
if @status.nil?
|
84
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
85
|
+
end
|
86
|
+
|
87
|
+
invalid_properties
|
88
|
+
end
|
89
|
+
|
90
|
+
# Check to see if the all the properties in the model are valid
|
91
|
+
# @return true if the model is valid
|
92
|
+
def valid?
|
93
|
+
return false if @status.nil?
|
94
|
+
status_validator = EnumAttributeValidator.new('Object', [403])
|
95
|
+
return false unless status_validator.valid?(@status)
|
96
|
+
true
|
97
|
+
end
|
98
|
+
|
99
|
+
# Custom attribute writer method checking allowed values (enum).
|
100
|
+
# @param [Object] status Object to be assigned
|
101
|
+
def status=(status)
|
102
|
+
validator = EnumAttributeValidator.new('Object', [403])
|
103
|
+
unless validator.valid?(status)
|
104
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
105
|
+
end
|
106
|
+
@status = status
|
107
|
+
end
|
108
|
+
|
109
|
+
# Checks equality by comparing each attribute.
|
110
|
+
# @param [Object] Object to be compared
|
111
|
+
def ==(o)
|
112
|
+
return true if self.equal?(o)
|
113
|
+
self.class == o.class &&
|
114
|
+
status == o.status &&
|
115
|
+
body == o.body
|
116
|
+
end
|
117
|
+
|
118
|
+
# @see the `==` method
|
119
|
+
# @param [Object] Object to be compared
|
120
|
+
def eql?(o)
|
121
|
+
self == o
|
122
|
+
end
|
123
|
+
|
124
|
+
# Calculates hash code according to all attributes.
|
125
|
+
# @return [Integer] Hash code
|
126
|
+
def hash
|
127
|
+
[status, body].hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def self.build_from_hash(attributes)
|
134
|
+
new.build_from_hash(attributes)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Builds the object from hash
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
# @return [Object] Returns the model itself
|
140
|
+
def build_from_hash(attributes)
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
142
|
+
self.class.openapi_types.each_pair do |key, type|
|
143
|
+
if type =~ /\AArray<(.*)>/i
|
144
|
+
# check to ensure the input is an array given that the attribute
|
145
|
+
# is documented as an array but the input is not
|
146
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
147
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
148
|
+
end
|
149
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
150
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
151
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
152
|
+
self.send("#{key}=", nil)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
self
|
157
|
+
end
|
158
|
+
|
159
|
+
# Deserializes the data based on type
|
160
|
+
# @param string type Data type
|
161
|
+
# @param string value Value to be deserialized
|
162
|
+
# @return [Object] Deserialized data
|
163
|
+
def _deserialize(type, value)
|
164
|
+
case type.to_sym
|
165
|
+
when :DateTime
|
166
|
+
DateTime.parse(value)
|
167
|
+
when :Date
|
168
|
+
Date.parse(value)
|
169
|
+
when :String
|
170
|
+
value.to_s
|
171
|
+
when :Integer
|
172
|
+
value.to_i
|
173
|
+
when :Float
|
174
|
+
value.to_f
|
175
|
+
when :Boolean
|
176
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
177
|
+
true
|
178
|
+
else
|
179
|
+
false
|
180
|
+
end
|
181
|
+
when :Object
|
182
|
+
# generic object (usually a Hash), return directly
|
183
|
+
value
|
184
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
185
|
+
inner_type = Regexp.last_match[:inner_type]
|
186
|
+
value.map { |v| _deserialize(inner_type, v) }
|
187
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
188
|
+
k_type = Regexp.last_match[:k_type]
|
189
|
+
v_type = Regexp.last_match[:v_type]
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each do |k, v|
|
192
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
else # model
|
196
|
+
SmartRecruiters.const_get(type).build_from_hash(value)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
# Returns the string representation of the object
|
201
|
+
# @return [String] String presentation of the object
|
202
|
+
def to_s
|
203
|
+
to_hash.to_s
|
204
|
+
end
|
205
|
+
|
206
|
+
# to_body is an alias to to_hash (backward compatibility)
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
208
|
+
def to_body
|
209
|
+
to_hash
|
210
|
+
end
|
211
|
+
|
212
|
+
# Returns the object in the form of hash
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
214
|
+
def to_hash
|
215
|
+
hash = {}
|
216
|
+
self.class.attribute_map.each_pair do |attr, param|
|
217
|
+
value = self.send(attr)
|
218
|
+
if value.nil?
|
219
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
220
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
221
|
+
end
|
222
|
+
|
223
|
+
hash[param] = _to_hash(value)
|
224
|
+
end
|
225
|
+
hash
|
226
|
+
end
|
227
|
+
|
228
|
+
# Outputs non-array value in the form of hash
|
229
|
+
# For object, use to_hash. Otherwise, just return the value
|
230
|
+
# @param [Object] value Any valid value
|
231
|
+
# @return [Hash] Returns the value in the form of hash
|
232
|
+
def _to_hash(value)
|
233
|
+
if value.is_a?(Array)
|
234
|
+
value.compact.map { |v| _to_hash(v) }
|
235
|
+
elsif value.is_a?(Hash)
|
236
|
+
{}.tap do |hash|
|
237
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
238
|
+
end
|
239
|
+
elsif value.respond_to? :to_hash
|
240
|
+
value.to_hash
|
241
|
+
else
|
242
|
+
value
|
243
|
+
end
|
244
|
+
end end
|
245
|
+
end
|
@@ -0,0 +1,204 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module SmartRecruiters
|
6
|
+
class ConsentRequestsResults
|
7
|
+
attr_accessor :results
|
8
|
+
|
9
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
10
|
+
def self.attribute_map
|
11
|
+
{
|
12
|
+
:'results' => :'results'
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
# Attribute type mapping.
|
17
|
+
def self.openapi_types
|
18
|
+
{
|
19
|
+
:'results' => :'Object'
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
# List of attributes with nullable: true
|
24
|
+
def self.openapi_nullable
|
25
|
+
Set.new([
|
26
|
+
])
|
27
|
+
end
|
28
|
+
|
29
|
+
# Initializes the object
|
30
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
31
|
+
def initialize(attributes = {})
|
32
|
+
if (!attributes.is_a?(Hash))
|
33
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmartRecruiters::ConsentRequestsResults` initialize method"
|
34
|
+
end
|
35
|
+
|
36
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
37
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
38
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
39
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmartRecruiters::ConsentRequestsResults`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
40
|
+
end
|
41
|
+
h[k.to_sym] = v
|
42
|
+
}
|
43
|
+
|
44
|
+
if attributes.key?(:'results')
|
45
|
+
if (value = attributes[:'results']).is_a?(Array)
|
46
|
+
self.results = value
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
52
|
+
# @return Array for valid properties with the reasons
|
53
|
+
def list_invalid_properties
|
54
|
+
invalid_properties = Array.new
|
55
|
+
if @results.nil?
|
56
|
+
invalid_properties.push('invalid value for "results", results cannot be nil.')
|
57
|
+
end
|
58
|
+
|
59
|
+
invalid_properties
|
60
|
+
end
|
61
|
+
|
62
|
+
# Check to see if the all the properties in the model are valid
|
63
|
+
# @return true if the model is valid
|
64
|
+
def valid?
|
65
|
+
return false if @results.nil?
|
66
|
+
true
|
67
|
+
end
|
68
|
+
|
69
|
+
# Checks equality by comparing each attribute.
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def ==(o)
|
72
|
+
return true if self.equal?(o)
|
73
|
+
self.class == o.class &&
|
74
|
+
results == o.results
|
75
|
+
end
|
76
|
+
|
77
|
+
# @see the `==` method
|
78
|
+
# @param [Object] Object to be compared
|
79
|
+
def eql?(o)
|
80
|
+
self == o
|
81
|
+
end
|
82
|
+
|
83
|
+
# Calculates hash code according to all attributes.
|
84
|
+
# @return [Integer] Hash code
|
85
|
+
def hash
|
86
|
+
[results].hash
|
87
|
+
end
|
88
|
+
|
89
|
+
# Builds the object from hash
|
90
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
91
|
+
# @return [Object] Returns the model itself
|
92
|
+
def self.build_from_hash(attributes)
|
93
|
+
new.build_from_hash(attributes)
|
94
|
+
end
|
95
|
+
|
96
|
+
# Builds the object from hash
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
98
|
+
# @return [Object] Returns the model itself
|
99
|
+
def build_from_hash(attributes)
|
100
|
+
return nil unless attributes.is_a?(Hash)
|
101
|
+
self.class.openapi_types.each_pair do |key, type|
|
102
|
+
if type =~ /\AArray<(.*)>/i
|
103
|
+
# check to ensure the input is an array given that the attribute
|
104
|
+
# is documented as an array but the input is not
|
105
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
106
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
107
|
+
end
|
108
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
109
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
110
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
111
|
+
self.send("#{key}=", nil)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
self
|
116
|
+
end
|
117
|
+
|
118
|
+
# Deserializes the data based on type
|
119
|
+
# @param string type Data type
|
120
|
+
# @param string value Value to be deserialized
|
121
|
+
# @return [Object] Deserialized data
|
122
|
+
def _deserialize(type, value)
|
123
|
+
case type.to_sym
|
124
|
+
when :DateTime
|
125
|
+
DateTime.parse(value)
|
126
|
+
when :Date
|
127
|
+
Date.parse(value)
|
128
|
+
when :String
|
129
|
+
value.to_s
|
130
|
+
when :Integer
|
131
|
+
value.to_i
|
132
|
+
when :Float
|
133
|
+
value.to_f
|
134
|
+
when :Boolean
|
135
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
136
|
+
true
|
137
|
+
else
|
138
|
+
false
|
139
|
+
end
|
140
|
+
when :Object
|
141
|
+
# generic object (usually a Hash), return directly
|
142
|
+
value
|
143
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
144
|
+
inner_type = Regexp.last_match[:inner_type]
|
145
|
+
value.map { |v| _deserialize(inner_type, v) }
|
146
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
147
|
+
k_type = Regexp.last_match[:k_type]
|
148
|
+
v_type = Regexp.last_match[:v_type]
|
149
|
+
{}.tap do |hash|
|
150
|
+
value.each do |k, v|
|
151
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
else # model
|
155
|
+
SmartRecruiters.const_get(type).build_from_hash(value)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns the string representation of the object
|
160
|
+
# @return [String] String presentation of the object
|
161
|
+
def to_s
|
162
|
+
to_hash.to_s
|
163
|
+
end
|
164
|
+
|
165
|
+
# to_body is an alias to to_hash (backward compatibility)
|
166
|
+
# @return [Hash] Returns the object in the form of hash
|
167
|
+
def to_body
|
168
|
+
to_hash
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the object in the form of hash
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
173
|
+
def to_hash
|
174
|
+
hash = {}
|
175
|
+
self.class.attribute_map.each_pair do |attr, param|
|
176
|
+
value = self.send(attr)
|
177
|
+
if value.nil?
|
178
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
179
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
180
|
+
end
|
181
|
+
|
182
|
+
hash[param] = _to_hash(value)
|
183
|
+
end
|
184
|
+
hash
|
185
|
+
end
|
186
|
+
|
187
|
+
# Outputs non-array value in the form of hash
|
188
|
+
# For object, use to_hash. Otherwise, just return the value
|
189
|
+
# @param [Object] value Any valid value
|
190
|
+
# @return [Hash] Returns the value in the form of hash
|
191
|
+
def _to_hash(value)
|
192
|
+
if value.is_a?(Array)
|
193
|
+
value.compact.map { |v| _to_hash(v) }
|
194
|
+
elsif value.is_a?(Hash)
|
195
|
+
{}.tap do |hash|
|
196
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
197
|
+
end
|
198
|
+
elsif value.respond_to? :to_hash
|
199
|
+
value.to_hash
|
200
|
+
else
|
201
|
+
value
|
202
|
+
end
|
203
|
+
end end
|
204
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module SmartRecruiters
|
6
|
+
class ConsentScope
|
7
|
+
SINGLE = 'Single'.freeze
|
8
|
+
SMART_RECRUIT = 'SmartRecruit'.freeze
|
9
|
+
SMART_CRM = 'SmartCRM'.freeze
|
10
|
+
SMART_MESSAGESMS = 'SmartMessage:SMS'.freeze
|
11
|
+
SMART_MESSAGEWHATS_APP = 'SmartMessage:WhatsApp'.freeze
|
12
|
+
|
13
|
+
# Builds the enum from string
|
14
|
+
# @param [String] The enum value in the form of the string
|
15
|
+
# @return [String] The enum value
|
16
|
+
def build_from_hash(value)
|
17
|
+
constantValues = ConsentScope.constants.select { |c| ConsentScope::const_get(c) == value }
|
18
|
+
raise "Invalid ENUM value #{value} for class #ConsentScope" if constantValues.empty?
|
19
|
+
value
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module SmartRecruiters
|
6
|
+
class ConsentStatus
|
7
|
+
REQUIRED = 'REQUIRED'.freeze
|
8
|
+
PENDING = 'PENDING'.freeze
|
9
|
+
ACQUIRED = 'ACQUIRED'.freeze
|
10
|
+
|
11
|
+
# Builds the enum from string
|
12
|
+
# @param [String] The enum value in the form of the string
|
13
|
+
# @return [String] The enum value
|
14
|
+
def build_from_hash(value)
|
15
|
+
constantValues = ConsentStatus.constants.select { |c| ConsentStatus::const_get(c) == value }
|
16
|
+
raise "Invalid ENUM value #{value} for class #ConsentStatus" if constantValues.empty?
|
17
|
+
value
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,220 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module SmartRecruiters
|
6
|
+
class Department
|
7
|
+
attr_accessor :id
|
8
|
+
|
9
|
+
attr_accessor :label
|
10
|
+
|
11
|
+
attr_accessor :description
|
12
|
+
|
13
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
14
|
+
def self.attribute_map
|
15
|
+
{
|
16
|
+
:'id' => :'id',
|
17
|
+
:'label' => :'label',
|
18
|
+
:'description' => :'description'
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
# Attribute type mapping.
|
23
|
+
def self.openapi_types
|
24
|
+
{
|
25
|
+
:'id' => :'Object',
|
26
|
+
:'label' => :'Object',
|
27
|
+
:'description' => :'Object'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# List of attributes with nullable: true
|
32
|
+
def self.openapi_nullable
|
33
|
+
Set.new([
|
34
|
+
])
|
35
|
+
end
|
36
|
+
|
37
|
+
# Initializes the object
|
38
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
39
|
+
def initialize(attributes = {})
|
40
|
+
if (!attributes.is_a?(Hash))
|
41
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmartRecruiters::Department` initialize method"
|
42
|
+
end
|
43
|
+
|
44
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
46
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
47
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmartRecruiters::Department`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
48
|
+
end
|
49
|
+
h[k.to_sym] = v
|
50
|
+
}
|
51
|
+
|
52
|
+
if attributes.key?(:'id')
|
53
|
+
self.id = attributes[:'id']
|
54
|
+
end
|
55
|
+
|
56
|
+
if attributes.key?(:'label')
|
57
|
+
self.label = attributes[:'label']
|
58
|
+
end
|
59
|
+
|
60
|
+
if attributes.key?(:'description')
|
61
|
+
self.description = attributes[:'description']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
if @label.nil?
|
70
|
+
invalid_properties.push('invalid value for "label", label cannot be nil.')
|
71
|
+
end
|
72
|
+
|
73
|
+
invalid_properties
|
74
|
+
end
|
75
|
+
|
76
|
+
# Check to see if the all the properties in the model are valid
|
77
|
+
# @return true if the model is valid
|
78
|
+
def valid?
|
79
|
+
return false if @label.nil?
|
80
|
+
true
|
81
|
+
end
|
82
|
+
|
83
|
+
# Checks equality by comparing each attribute.
|
84
|
+
# @param [Object] Object to be compared
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
id == o.id &&
|
89
|
+
label == o.label &&
|
90
|
+
description == o.description
|
91
|
+
end
|
92
|
+
|
93
|
+
# @see the `==` method
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def eql?(o)
|
96
|
+
self == o
|
97
|
+
end
|
98
|
+
|
99
|
+
# Calculates hash code according to all attributes.
|
100
|
+
# @return [Integer] Hash code
|
101
|
+
def hash
|
102
|
+
[id, label, description].hash
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def self.build_from_hash(attributes)
|
109
|
+
new.build_from_hash(attributes)
|
110
|
+
end
|
111
|
+
|
112
|
+
# Builds the object from hash
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
114
|
+
# @return [Object] Returns the model itself
|
115
|
+
def build_from_hash(attributes)
|
116
|
+
return nil unless attributes.is_a?(Hash)
|
117
|
+
self.class.openapi_types.each_pair do |key, type|
|
118
|
+
if type =~ /\AArray<(.*)>/i
|
119
|
+
# check to ensure the input is an array given that the attribute
|
120
|
+
# is documented as an array but the input is not
|
121
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
122
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
123
|
+
end
|
124
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
125
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
126
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
127
|
+
self.send("#{key}=", nil)
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
self
|
132
|
+
end
|
133
|
+
|
134
|
+
# Deserializes the data based on type
|
135
|
+
# @param string type Data type
|
136
|
+
# @param string value Value to be deserialized
|
137
|
+
# @return [Object] Deserialized data
|
138
|
+
def _deserialize(type, value)
|
139
|
+
case type.to_sym
|
140
|
+
when :DateTime
|
141
|
+
DateTime.parse(value)
|
142
|
+
when :Date
|
143
|
+
Date.parse(value)
|
144
|
+
when :String
|
145
|
+
value.to_s
|
146
|
+
when :Integer
|
147
|
+
value.to_i
|
148
|
+
when :Float
|
149
|
+
value.to_f
|
150
|
+
when :Boolean
|
151
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
152
|
+
true
|
153
|
+
else
|
154
|
+
false
|
155
|
+
end
|
156
|
+
when :Object
|
157
|
+
# generic object (usually a Hash), return directly
|
158
|
+
value
|
159
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
160
|
+
inner_type = Regexp.last_match[:inner_type]
|
161
|
+
value.map { |v| _deserialize(inner_type, v) }
|
162
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
163
|
+
k_type = Regexp.last_match[:k_type]
|
164
|
+
v_type = Regexp.last_match[:v_type]
|
165
|
+
{}.tap do |hash|
|
166
|
+
value.each do |k, v|
|
167
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
else # model
|
171
|
+
SmartRecruiters.const_get(type).build_from_hash(value)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# Returns the string representation of the object
|
176
|
+
# @return [String] String presentation of the object
|
177
|
+
def to_s
|
178
|
+
to_hash.to_s
|
179
|
+
end
|
180
|
+
|
181
|
+
# to_body is an alias to to_hash (backward compatibility)
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
183
|
+
def to_body
|
184
|
+
to_hash
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the object in the form of hash
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_hash
|
190
|
+
hash = {}
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
192
|
+
value = self.send(attr)
|
193
|
+
if value.nil?
|
194
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
195
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
196
|
+
end
|
197
|
+
|
198
|
+
hash[param] = _to_hash(value)
|
199
|
+
end
|
200
|
+
hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Outputs non-array value in the form of hash
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
205
|
+
# @param [Object] value Any valid value
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
207
|
+
def _to_hash(value)
|
208
|
+
if value.is_a?(Array)
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
210
|
+
elsif value.is_a?(Hash)
|
211
|
+
{}.tap do |hash|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
213
|
+
end
|
214
|
+
elsif value.respond_to? :to_hash
|
215
|
+
value.to_hash
|
216
|
+
else
|
217
|
+
value
|
218
|
+
end
|
219
|
+
end end
|
220
|
+
end
|