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,202 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module SmartRecruiters
|
6
|
+
class Identifiable
|
7
|
+
attr_accessor :id
|
8
|
+
|
9
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
10
|
+
def self.attribute_map
|
11
|
+
{
|
12
|
+
:'id' => :'id'
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
# Attribute type mapping.
|
17
|
+
def self.openapi_types
|
18
|
+
{
|
19
|
+
:'id' => :'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::Identifiable` 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::Identifiable`. 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?(:'id')
|
45
|
+
self.id = attributes[:'id']
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
50
|
+
# @return Array for valid properties with the reasons
|
51
|
+
def list_invalid_properties
|
52
|
+
invalid_properties = Array.new
|
53
|
+
if @id.nil?
|
54
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
55
|
+
end
|
56
|
+
|
57
|
+
invalid_properties
|
58
|
+
end
|
59
|
+
|
60
|
+
# Check to see if the all the properties in the model are valid
|
61
|
+
# @return true if the model is valid
|
62
|
+
def valid?
|
63
|
+
return false if @id.nil?
|
64
|
+
true
|
65
|
+
end
|
66
|
+
|
67
|
+
# Checks equality by comparing each attribute.
|
68
|
+
# @param [Object] Object to be compared
|
69
|
+
def ==(o)
|
70
|
+
return true if self.equal?(o)
|
71
|
+
self.class == o.class &&
|
72
|
+
id == o.id
|
73
|
+
end
|
74
|
+
|
75
|
+
# @see the `==` method
|
76
|
+
# @param [Object] Object to be compared
|
77
|
+
def eql?(o)
|
78
|
+
self == o
|
79
|
+
end
|
80
|
+
|
81
|
+
# Calculates hash code according to all attributes.
|
82
|
+
# @return [Integer] Hash code
|
83
|
+
def hash
|
84
|
+
[id].hash
|
85
|
+
end
|
86
|
+
|
87
|
+
# Builds the object from hash
|
88
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
89
|
+
# @return [Object] Returns the model itself
|
90
|
+
def self.build_from_hash(attributes)
|
91
|
+
new.build_from_hash(attributes)
|
92
|
+
end
|
93
|
+
|
94
|
+
# Builds the object from hash
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
# @return [Object] Returns the model itself
|
97
|
+
def build_from_hash(attributes)
|
98
|
+
return nil unless attributes.is_a?(Hash)
|
99
|
+
self.class.openapi_types.each_pair do |key, type|
|
100
|
+
if type =~ /\AArray<(.*)>/i
|
101
|
+
# check to ensure the input is an array given that the attribute
|
102
|
+
# is documented as an array but the input is not
|
103
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
104
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
105
|
+
end
|
106
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
107
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
108
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
109
|
+
self.send("#{key}=", nil)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
self
|
114
|
+
end
|
115
|
+
|
116
|
+
# Deserializes the data based on type
|
117
|
+
# @param string type Data type
|
118
|
+
# @param string value Value to be deserialized
|
119
|
+
# @return [Object] Deserialized data
|
120
|
+
def _deserialize(type, value)
|
121
|
+
case type.to_sym
|
122
|
+
when :DateTime
|
123
|
+
DateTime.parse(value)
|
124
|
+
when :Date
|
125
|
+
Date.parse(value)
|
126
|
+
when :String
|
127
|
+
value.to_s
|
128
|
+
when :Integer
|
129
|
+
value.to_i
|
130
|
+
when :Float
|
131
|
+
value.to_f
|
132
|
+
when :Boolean
|
133
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
134
|
+
true
|
135
|
+
else
|
136
|
+
false
|
137
|
+
end
|
138
|
+
when :Object
|
139
|
+
# generic object (usually a Hash), return directly
|
140
|
+
value
|
141
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
142
|
+
inner_type = Regexp.last_match[:inner_type]
|
143
|
+
value.map { |v| _deserialize(inner_type, v) }
|
144
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
145
|
+
k_type = Regexp.last_match[:k_type]
|
146
|
+
v_type = Regexp.last_match[:v_type]
|
147
|
+
{}.tap do |hash|
|
148
|
+
value.each do |k, v|
|
149
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
else # model
|
153
|
+
SmartRecruiters.const_get(type).build_from_hash(value)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# Returns the string representation of the object
|
158
|
+
# @return [String] String presentation of the object
|
159
|
+
def to_s
|
160
|
+
to_hash.to_s
|
161
|
+
end
|
162
|
+
|
163
|
+
# to_body is an alias to to_hash (backward compatibility)
|
164
|
+
# @return [Hash] Returns the object in the form of hash
|
165
|
+
def to_body
|
166
|
+
to_hash
|
167
|
+
end
|
168
|
+
|
169
|
+
# Returns the object in the form of hash
|
170
|
+
# @return [Hash] Returns the object in the form of hash
|
171
|
+
def to_hash
|
172
|
+
hash = {}
|
173
|
+
self.class.attribute_map.each_pair do |attr, param|
|
174
|
+
value = self.send(attr)
|
175
|
+
if value.nil?
|
176
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
177
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
178
|
+
end
|
179
|
+
|
180
|
+
hash[param] = _to_hash(value)
|
181
|
+
end
|
182
|
+
hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Outputs non-array value in the form of hash
|
186
|
+
# For object, use to_hash. Otherwise, just return the value
|
187
|
+
# @param [Object] value Any valid value
|
188
|
+
# @return [Hash] Returns the value in the form of hash
|
189
|
+
def _to_hash(value)
|
190
|
+
if value.is_a?(Array)
|
191
|
+
value.compact.map { |v| _to_hash(v) }
|
192
|
+
elsif value.is_a?(Hash)
|
193
|
+
{}.tap do |hash|
|
194
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
195
|
+
end
|
196
|
+
elsif value.respond_to? :to_hash
|
197
|
+
value.to_hash
|
198
|
+
else
|
199
|
+
value
|
200
|
+
end
|
201
|
+
end end
|
202
|
+
end
|
@@ -0,0 +1,207 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module SmartRecruiters
|
6
|
+
# Company industry information.
|
7
|
+
class Industry
|
8
|
+
attr_accessor :id
|
9
|
+
|
10
|
+
attr_accessor :label
|
11
|
+
|
12
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
13
|
+
def self.attribute_map
|
14
|
+
{
|
15
|
+
:'id' => :'id',
|
16
|
+
:'label' => :'label'
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
# Attribute type mapping.
|
21
|
+
def self.openapi_types
|
22
|
+
{
|
23
|
+
:'id' => :'Object',
|
24
|
+
:'label' => :'Object'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# List of attributes with nullable: true
|
29
|
+
def self.openapi_nullable
|
30
|
+
Set.new([
|
31
|
+
])
|
32
|
+
end
|
33
|
+
|
34
|
+
# Initializes the object
|
35
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
36
|
+
def initialize(attributes = {})
|
37
|
+
if (!attributes.is_a?(Hash))
|
38
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmartRecruiters::Industry` initialize method"
|
39
|
+
end
|
40
|
+
|
41
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
42
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
43
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
44
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmartRecruiters::Industry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
45
|
+
end
|
46
|
+
h[k.to_sym] = v
|
47
|
+
}
|
48
|
+
|
49
|
+
if attributes.key?(:'id')
|
50
|
+
self.id = attributes[:'id']
|
51
|
+
end
|
52
|
+
|
53
|
+
if attributes.key?(:'label')
|
54
|
+
self.label = attributes[:'label']
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
59
|
+
# @return Array for valid properties with the reasons
|
60
|
+
def list_invalid_properties
|
61
|
+
invalid_properties = Array.new
|
62
|
+
invalid_properties
|
63
|
+
end
|
64
|
+
|
65
|
+
# Check to see if the all the properties in the model are valid
|
66
|
+
# @return true if the model is valid
|
67
|
+
def valid?
|
68
|
+
true
|
69
|
+
end
|
70
|
+
|
71
|
+
# Checks equality by comparing each attribute.
|
72
|
+
# @param [Object] Object to be compared
|
73
|
+
def ==(o)
|
74
|
+
return true if self.equal?(o)
|
75
|
+
self.class == o.class &&
|
76
|
+
id == o.id &&
|
77
|
+
label == o.label
|
78
|
+
end
|
79
|
+
|
80
|
+
# @see the `==` method
|
81
|
+
# @param [Object] Object to be compared
|
82
|
+
def eql?(o)
|
83
|
+
self == o
|
84
|
+
end
|
85
|
+
|
86
|
+
# Calculates hash code according to all attributes.
|
87
|
+
# @return [Integer] Hash code
|
88
|
+
def hash
|
89
|
+
[id, label].hash
|
90
|
+
end
|
91
|
+
|
92
|
+
# Builds the object from hash
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
94
|
+
# @return [Object] Returns the model itself
|
95
|
+
def self.build_from_hash(attributes)
|
96
|
+
new.build_from_hash(attributes)
|
97
|
+
end
|
98
|
+
|
99
|
+
# Builds the object from hash
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
+
# @return [Object] Returns the model itself
|
102
|
+
def build_from_hash(attributes)
|
103
|
+
return nil unless attributes.is_a?(Hash)
|
104
|
+
self.class.openapi_types.each_pair do |key, type|
|
105
|
+
if type =~ /\AArray<(.*)>/i
|
106
|
+
# check to ensure the input is an array given that the attribute
|
107
|
+
# is documented as an array but the input is not
|
108
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
109
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
110
|
+
end
|
111
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
112
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
113
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
114
|
+
self.send("#{key}=", nil)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
self
|
119
|
+
end
|
120
|
+
|
121
|
+
# Deserializes the data based on type
|
122
|
+
# @param string type Data type
|
123
|
+
# @param string value Value to be deserialized
|
124
|
+
# @return [Object] Deserialized data
|
125
|
+
def _deserialize(type, value)
|
126
|
+
case type.to_sym
|
127
|
+
when :DateTime
|
128
|
+
DateTime.parse(value)
|
129
|
+
when :Date
|
130
|
+
Date.parse(value)
|
131
|
+
when :String
|
132
|
+
value.to_s
|
133
|
+
when :Integer
|
134
|
+
value.to_i
|
135
|
+
when :Float
|
136
|
+
value.to_f
|
137
|
+
when :Boolean
|
138
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
139
|
+
true
|
140
|
+
else
|
141
|
+
false
|
142
|
+
end
|
143
|
+
when :Object
|
144
|
+
# generic object (usually a Hash), return directly
|
145
|
+
value
|
146
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
147
|
+
inner_type = Regexp.last_match[:inner_type]
|
148
|
+
value.map { |v| _deserialize(inner_type, v) }
|
149
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
150
|
+
k_type = Regexp.last_match[:k_type]
|
151
|
+
v_type = Regexp.last_match[:v_type]
|
152
|
+
{}.tap do |hash|
|
153
|
+
value.each do |k, v|
|
154
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
else # model
|
158
|
+
SmartRecruiters.const_get(type).build_from_hash(value)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the string representation of the object
|
163
|
+
# @return [String] String presentation of the object
|
164
|
+
def to_s
|
165
|
+
to_hash.to_s
|
166
|
+
end
|
167
|
+
|
168
|
+
# to_body is an alias to to_hash (backward compatibility)
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
170
|
+
def to_body
|
171
|
+
to_hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns the object in the form of hash
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
176
|
+
def to_hash
|
177
|
+
hash = {}
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
179
|
+
value = self.send(attr)
|
180
|
+
if value.nil?
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
183
|
+
end
|
184
|
+
|
185
|
+
hash[param] = _to_hash(value)
|
186
|
+
end
|
187
|
+
hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Outputs non-array value in the form of hash
|
191
|
+
# For object, use to_hash. Otherwise, just return the value
|
192
|
+
# @param [Object] value Any valid value
|
193
|
+
# @return [Hash] Returns the value in the form of hash
|
194
|
+
def _to_hash(value)
|
195
|
+
if value.is_a?(Array)
|
196
|
+
value.compact.map { |v| _to_hash(v) }
|
197
|
+
elsif value.is_a?(Hash)
|
198
|
+
{}.tap do |hash|
|
199
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
200
|
+
end
|
201
|
+
elsif value.respond_to? :to_hash
|
202
|
+
value.to_hash
|
203
|
+
else
|
204
|
+
value
|
205
|
+
end
|
206
|
+
end end
|
207
|
+
end
|
@@ -0,0 +1,197 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module SmartRecruiters
|
6
|
+
class Job
|
7
|
+
attr_accessor :job
|
8
|
+
|
9
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
10
|
+
def self.attribute_map
|
11
|
+
{
|
12
|
+
:'job' => :'job'
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
# Attribute type mapping.
|
17
|
+
def self.openapi_types
|
18
|
+
{
|
19
|
+
:'job' => :'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::Job` 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::Job`. 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?(:'job')
|
45
|
+
self.job = attributes[:'job']
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
50
|
+
# @return Array for valid properties with the reasons
|
51
|
+
def list_invalid_properties
|
52
|
+
invalid_properties = Array.new
|
53
|
+
invalid_properties
|
54
|
+
end
|
55
|
+
|
56
|
+
# Check to see if the all the properties in the model are valid
|
57
|
+
# @return true if the model is valid
|
58
|
+
def valid?
|
59
|
+
true
|
60
|
+
end
|
61
|
+
|
62
|
+
# Checks equality by comparing each attribute.
|
63
|
+
# @param [Object] Object to be compared
|
64
|
+
def ==(o)
|
65
|
+
return true if self.equal?(o)
|
66
|
+
self.class == o.class &&
|
67
|
+
job == o.job
|
68
|
+
end
|
69
|
+
|
70
|
+
# @see the `==` method
|
71
|
+
# @param [Object] Object to be compared
|
72
|
+
def eql?(o)
|
73
|
+
self == o
|
74
|
+
end
|
75
|
+
|
76
|
+
# Calculates hash code according to all attributes.
|
77
|
+
# @return [Integer] Hash code
|
78
|
+
def hash
|
79
|
+
[job].hash
|
80
|
+
end
|
81
|
+
|
82
|
+
# Builds the object from hash
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
84
|
+
# @return [Object] Returns the model itself
|
85
|
+
def self.build_from_hash(attributes)
|
86
|
+
new.build_from_hash(attributes)
|
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 build_from_hash(attributes)
|
93
|
+
return nil unless attributes.is_a?(Hash)
|
94
|
+
self.class.openapi_types.each_pair do |key, type|
|
95
|
+
if type =~ /\AArray<(.*)>/i
|
96
|
+
# check to ensure the input is an array given that the attribute
|
97
|
+
# is documented as an array but the input is not
|
98
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
99
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
100
|
+
end
|
101
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
102
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
103
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
104
|
+
self.send("#{key}=", nil)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
self
|
109
|
+
end
|
110
|
+
|
111
|
+
# Deserializes the data based on type
|
112
|
+
# @param string type Data type
|
113
|
+
# @param string value Value to be deserialized
|
114
|
+
# @return [Object] Deserialized data
|
115
|
+
def _deserialize(type, value)
|
116
|
+
case type.to_sym
|
117
|
+
when :DateTime
|
118
|
+
DateTime.parse(value)
|
119
|
+
when :Date
|
120
|
+
Date.parse(value)
|
121
|
+
when :String
|
122
|
+
value.to_s
|
123
|
+
when :Integer
|
124
|
+
value.to_i
|
125
|
+
when :Float
|
126
|
+
value.to_f
|
127
|
+
when :Boolean
|
128
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
129
|
+
true
|
130
|
+
else
|
131
|
+
false
|
132
|
+
end
|
133
|
+
when :Object
|
134
|
+
# generic object (usually a Hash), return directly
|
135
|
+
value
|
136
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
137
|
+
inner_type = Regexp.last_match[:inner_type]
|
138
|
+
value.map { |v| _deserialize(inner_type, v) }
|
139
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
140
|
+
k_type = Regexp.last_match[:k_type]
|
141
|
+
v_type = Regexp.last_match[:v_type]
|
142
|
+
{}.tap do |hash|
|
143
|
+
value.each do |k, v|
|
144
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
else # model
|
148
|
+
SmartRecruiters.const_get(type).build_from_hash(value)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Returns the string representation of the object
|
153
|
+
# @return [String] String presentation of the object
|
154
|
+
def to_s
|
155
|
+
to_hash.to_s
|
156
|
+
end
|
157
|
+
|
158
|
+
# to_body is an alias to to_hash (backward compatibility)
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
160
|
+
def to_body
|
161
|
+
to_hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Returns the object in the form of hash
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
166
|
+
def to_hash
|
167
|
+
hash = {}
|
168
|
+
self.class.attribute_map.each_pair do |attr, param|
|
169
|
+
value = self.send(attr)
|
170
|
+
if value.nil?
|
171
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
172
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
173
|
+
end
|
174
|
+
|
175
|
+
hash[param] = _to_hash(value)
|
176
|
+
end
|
177
|
+
hash
|
178
|
+
end
|
179
|
+
|
180
|
+
# Outputs non-array value in the form of hash
|
181
|
+
# For object, use to_hash. Otherwise, just return the value
|
182
|
+
# @param [Object] value Any valid value
|
183
|
+
# @return [Hash] Returns the value in the form of hash
|
184
|
+
def _to_hash(value)
|
185
|
+
if value.is_a?(Array)
|
186
|
+
value.compact.map { |v| _to_hash(v) }
|
187
|
+
elsif value.is_a?(Hash)
|
188
|
+
{}.tap do |hash|
|
189
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
190
|
+
end
|
191
|
+
elsif value.respond_to? :to_hash
|
192
|
+
value.to_hash
|
193
|
+
else
|
194
|
+
value
|
195
|
+
end
|
196
|
+
end end
|
197
|
+
end
|