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