merge_ats_client 3.0.0 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -6
  3. data/docs/AccountIntegration.md +6 -2
  4. data/docs/ActivitiesApi.md +164 -8
  5. data/docs/Activity.md +12 -6
  6. data/docs/ActivityEndpointRequest.md +20 -0
  7. data/docs/ActivityRequest.md +32 -0
  8. data/docs/ActivityResponse.md +24 -0
  9. data/docs/Application.md +12 -10
  10. data/docs/ApplicationRequest.md +5 -9
  11. data/docs/ApplicationsApi.md +4 -4
  12. data/docs/AsyncPassthroughApi.md +155 -0
  13. data/docs/AsyncPassthroughReciept.md +18 -0
  14. data/docs/Attachment.md +8 -4
  15. data/docs/AttachmentRequest.md +1 -3
  16. data/docs/AttachmentsApi.md +13 -9
  17. data/docs/Candidate.md +8 -6
  18. data/docs/CandidateRequest.md +1 -9
  19. data/docs/CandidatesApi.md +172 -13
  20. data/docs/CommonModelScopesBodyRequest.md +22 -0
  21. data/docs/ConditionSchema.md +1 -1
  22. data/docs/DataPassthroughRequest.md +1 -1
  23. data/docs/DeleteAccountApi.md +9 -9
  24. data/docs/Department.md +7 -3
  25. data/docs/DepartmentsApi.md +4 -4
  26. data/docs/EEOC.md +12 -8
  27. data/docs/EeocsApi.md +13 -9
  28. data/docs/EmailAddress.md +4 -2
  29. data/docs/EmailAddressRequest.md +1 -1
  30. data/docs/EnabledActionsEnum.md +15 -0
  31. data/docs/EndUserDetailsRequest.md +4 -2
  32. data/docs/ForceResyncApi.md +1 -1
  33. data/docs/InterviewsApi.md +165 -9
  34. data/docs/Issue.md +10 -8
  35. data/docs/IssuesApi.md +6 -6
  36. data/docs/Job.md +8 -4
  37. data/docs/JobInterviewStage.md +10 -4
  38. data/docs/JobInterviewStagesApi.md +4 -4
  39. data/docs/JobsApi.md +16 -10
  40. data/docs/LinkToken.md +1 -1
  41. data/docs/LinkedAccountsApi.md +2 -2
  42. data/docs/MetaResponse.md +2 -0
  43. data/docs/MultipartFormFieldRequest.md +1 -1
  44. data/docs/Offer.md +10 -6
  45. data/docs/OffersApi.md +13 -9
  46. data/docs/Office.md +7 -3
  47. data/docs/OfficesApi.md +4 -4
  48. data/docs/PaginatedConditionSchemaList.md +2 -2
  49. data/docs/PatchedCandidateEndpointRequest.md +20 -0
  50. data/docs/PatchedCandidateRequest.md +50 -0
  51. data/docs/PhoneNumber.md +4 -2
  52. data/docs/PhoneNumberRequest.md +1 -1
  53. data/docs/RejectReason.md +7 -3
  54. data/docs/RejectReasonsApi.md +4 -4
  55. data/docs/RemoteData.md +1 -1
  56. data/docs/RemoteUser.md +8 -4
  57. data/docs/ScheduledInterview.md +11 -7
  58. data/docs/ScheduledInterviewEndpointRequest.md +20 -0
  59. data/docs/ScheduledInterviewRequest.md +36 -0
  60. data/docs/ScheduledInterviewResponse.md +24 -0
  61. data/docs/Scorecard.md +11 -7
  62. data/docs/ScorecardsApi.md +13 -9
  63. data/docs/SelectiveSyncApi.md +2 -2
  64. data/docs/SelectiveSyncConfigurationsUsageEnum.md +15 -0
  65. data/docs/SyncStatus.md +3 -1
  66. data/docs/SyncStatusApi.md +1 -1
  67. data/docs/Tag.md +7 -3
  68. data/docs/TagsApi.md +4 -4
  69. data/docs/Url.md +4 -2
  70. data/docs/UrlRequest.md +1 -1
  71. data/docs/UsersApi.md +13 -9
  72. data/lib/merge_ats_client/api/activities_api.rb +160 -8
  73. data/lib/merge_ats_client/api/applications_api.rb +4 -4
  74. data/lib/merge_ats_client/api/async_passthrough_api.rb +160 -0
  75. data/lib/merge_ats_client/api/attachments_api.rb +22 -8
  76. data/lib/merge_ats_client/api/candidates_api.rb +165 -11
  77. data/lib/merge_ats_client/api/delete_account_api.rb +7 -7
  78. data/lib/merge_ats_client/api/departments_api.rb +4 -4
  79. data/lib/merge_ats_client/api/eeocs_api.rb +22 -8
  80. data/lib/merge_ats_client/api/force_resync_api.rb +2 -2
  81. data/lib/merge_ats_client/api/interviews_api.rb +160 -8
  82. data/lib/merge_ats_client/api/issues_api.rb +6 -6
  83. data/lib/merge_ats_client/api/job_interview_stages_api.rb +4 -4
  84. data/lib/merge_ats_client/api/jobs_api.rb +27 -10
  85. data/lib/merge_ats_client/api/linked_accounts_api.rb +3 -3
  86. data/lib/merge_ats_client/api/offers_api.rb +22 -8
  87. data/lib/merge_ats_client/api/offices_api.rb +4 -4
  88. data/lib/merge_ats_client/api/reject_reasons_api.rb +4 -4
  89. data/lib/merge_ats_client/api/scorecards_api.rb +22 -8
  90. data/lib/merge_ats_client/api/selective_sync_api.rb +2 -2
  91. data/lib/merge_ats_client/api/sync_status_api.rb +2 -2
  92. data/lib/merge_ats_client/api/tags_api.rb +4 -4
  93. data/lib/merge_ats_client/api/users_api.rb +22 -8
  94. data/lib/merge_ats_client/models/account_integration.rb +30 -8
  95. data/lib/merge_ats_client/models/activity.rb +50 -16
  96. data/lib/merge_ats_client/models/activity_endpoint_request.rb +237 -0
  97. data/lib/merge_ats_client/models/activity_request.rb +300 -0
  98. data/lib/merge_ats_client/models/activity_response.rb +266 -0
  99. data/lib/merge_ats_client/models/application.rb +40 -26
  100. data/lib/merge_ats_client/models/application_request.rb +7 -26
  101. data/lib/merge_ats_client/models/async_passthrough_reciept.rb +223 -0
  102. data/lib/merge_ats_client/models/attachment.rb +38 -16
  103. data/lib/merge_ats_client/models/attachment_request.rb +3 -14
  104. data/lib/merge_ats_client/models/candidate.rb +36 -27
  105. data/lib/merge_ats_client/models/candidate_request.rb +3 -49
  106. data/lib/merge_ats_client/models/categories_enum.rb +3 -1
  107. data/lib/merge_ats_client/models/category_enum.rb +3 -1
  108. data/lib/merge_ats_client/models/common_model_scopes_body_request.rb +274 -0
  109. data/lib/merge_ats_client/models/condition_schema.rb +1 -0
  110. data/lib/merge_ats_client/models/data_passthrough_request.rb +1 -0
  111. data/lib/merge_ats_client/models/department.rb +36 -14
  112. data/lib/merge_ats_client/models/eeoc.rb +42 -19
  113. data/lib/merge_ats_client/models/email_address.rb +16 -6
  114. data/lib/merge_ats_client/models/email_address_request.rb +1 -1
  115. data/lib/merge_ats_client/models/enabled_actions_enum.rb +45 -0
  116. data/lib/merge_ats_client/models/end_user_details_request.rb +19 -6
  117. data/lib/merge_ats_client/models/issue.rb +16 -4
  118. data/lib/merge_ats_client/models/job.rb +38 -16
  119. data/lib/merge_ats_client/models/job_interview_stage.rb +72 -15
  120. data/lib/merge_ats_client/models/link_token.rb +0 -5
  121. data/lib/merge_ats_client/models/meta_response.rb +12 -1
  122. data/lib/merge_ats_client/models/multipart_form_field_request.rb +1 -1
  123. data/lib/merge_ats_client/models/offer.rb +40 -16
  124. data/lib/merge_ats_client/models/office.rb +37 -15
  125. data/lib/merge_ats_client/models/patched_candidate_endpoint_request.rb +237 -0
  126. data/lib/merge_ats_client/models/patched_candidate_request.rb +418 -0
  127. data/lib/merge_ats_client/models/phone_number.rb +16 -6
  128. data/lib/merge_ats_client/models/phone_number_request.rb +1 -1
  129. data/lib/merge_ats_client/models/reject_reason.rb +37 -15
  130. data/lib/merge_ats_client/models/remote_data.rb +3 -4
  131. data/lib/merge_ats_client/models/remote_user.rb +38 -16
  132. data/lib/merge_ats_client/models/scheduled_interview.rb +41 -16
  133. data/lib/merge_ats_client/models/scheduled_interview_endpoint_request.rb +237 -0
  134. data/lib/merge_ats_client/models/scheduled_interview_request.rb +323 -0
  135. data/lib/merge_ats_client/models/scheduled_interview_response.rb +266 -0
  136. data/lib/merge_ats_client/models/scorecard.rb +41 -16
  137. data/lib/merge_ats_client/models/selective_sync_configurations_usage_enum.rb +45 -0
  138. data/lib/merge_ats_client/models/sync_status.rb +13 -4
  139. data/lib/merge_ats_client/models/sync_status_status_enum.rb +2 -1
  140. data/lib/merge_ats_client/models/tag.rb +36 -14
  141. data/lib/merge_ats_client/models/url.rb +16 -6
  142. data/lib/merge_ats_client/models/url_request.rb +1 -1
  143. data/lib/merge_ats_client/version.rb +1 -1
  144. data/lib/merge_ats_client.rb +13 -1
  145. data/spec/api/activities_api_spec.rb +31 -4
  146. data/spec/api/applications_api_spec.rb +2 -2
  147. data/spec/api/async_passthrough_api_spec.rb +59 -0
  148. data/spec/api/attachments_api_spec.rb +6 -4
  149. data/spec/api/candidates_api_spec.rb +32 -3
  150. data/spec/api/delete_account_api_spec.rb +2 -2
  151. data/spec/api/departments_api_spec.rb +2 -2
  152. data/spec/api/eeocs_api_spec.rb +6 -4
  153. data/spec/api/force_resync_api_spec.rb +1 -1
  154. data/spec/api/interviews_api_spec.rb +31 -4
  155. data/spec/api/issues_api_spec.rb +3 -3
  156. data/spec/api/job_interview_stages_api_spec.rb +2 -2
  157. data/spec/api/jobs_api_spec.rb +8 -5
  158. data/spec/api/linked_accounts_api_spec.rb +1 -1
  159. data/spec/api/offers_api_spec.rb +6 -4
  160. data/spec/api/offices_api_spec.rb +2 -2
  161. data/spec/api/reject_reasons_api_spec.rb +2 -2
  162. data/spec/api/scorecards_api_spec.rb +6 -4
  163. data/spec/api/selective_sync_api_spec.rb +1 -1
  164. data/spec/api/sync_status_api_spec.rb +1 -1
  165. data/spec/api/tags_api_spec.rb +2 -2
  166. data/spec/api/users_api_spec.rb +6 -4
  167. data/spec/models/account_integration_spec.rb +12 -0
  168. data/spec/models/{ignore_common_model_spec.rb → activity_endpoint_request_spec.rb} +8 -8
  169. data/spec/models/activity_request_spec.rb +76 -0
  170. data/spec/models/activity_response_spec.rb +52 -0
  171. data/spec/models/activity_spec.rb +19 -1
  172. data/spec/models/application_request_spec.rb +0 -12
  173. data/spec/models/application_spec.rb +9 -3
  174. data/spec/models/async_passthrough_reciept_spec.rb +34 -0
  175. data/spec/models/attachment_request_spec.rb +0 -6
  176. data/spec/models/attachment_spec.rb +14 -2
  177. data/spec/models/candidate_request_spec.rb +0 -24
  178. data/spec/models/candidate_spec.rb +9 -3
  179. data/spec/models/common_model_scopes_body_request_spec.rb +46 -0
  180. data/spec/models/department_spec.rb +14 -2
  181. data/spec/models/eeoc_spec.rb +14 -2
  182. data/spec/models/email_address_spec.rb +6 -0
  183. data/spec/models/enabled_actions_enum_spec.rb +28 -0
  184. data/spec/models/end_user_details_request_spec.rb +6 -0
  185. data/spec/models/issue_spec.rb +6 -0
  186. data/spec/models/job_interview_stage_spec.rb +19 -1
  187. data/spec/models/job_spec.rb +14 -2
  188. data/spec/models/meta_response_spec.rb +6 -0
  189. data/spec/models/offer_spec.rb +14 -2
  190. data/spec/models/office_spec.rb +14 -2
  191. data/spec/models/{remote_data_request_spec.rb → patched_candidate_endpoint_request_spec.rb} +8 -8
  192. data/spec/models/patched_candidate_request_spec.rb +130 -0
  193. data/spec/models/phone_number_spec.rb +6 -0
  194. data/spec/models/reject_reason_spec.rb +14 -2
  195. data/spec/models/remote_user_spec.rb +14 -2
  196. data/spec/models/scheduled_interview_endpoint_request_spec.rb +40 -0
  197. data/spec/models/scheduled_interview_request_spec.rb +88 -0
  198. data/spec/models/scheduled_interview_response_spec.rb +52 -0
  199. data/spec/models/scheduled_interview_spec.rb +14 -2
  200. data/spec/models/scorecard_spec.rb +14 -2
  201. data/spec/models/selective_sync_configurations_usage_enum_spec.rb +28 -0
  202. data/spec/models/sync_status_spec.rb +6 -0
  203. data/spec/models/tag_spec.rb +14 -2
  204. data/spec/models/url_spec.rb +6 -0
  205. metadata +167 -119
@@ -0,0 +1,237 @@
1
+ =begin
2
+ #Merge ATS API
3
+
4
+ #The unified API for building rich integrations with multiple Applicant Tracking System platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MergeATSClient
17
+ class PatchedCandidateEndpointRequest
18
+ attr_accessor :model
19
+
20
+ attr_accessor :remote_user_id
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'model' => :'model',
26
+ :'remote_user_id' => :'remote_user_id'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'model' => :'PatchedCandidateRequest',
39
+ :'remote_user_id' => :'String'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::PatchedCandidateEndpointRequest` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::PatchedCandidateEndpointRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'model')
65
+ self.model = attributes[:'model']
66
+ end
67
+
68
+ if attributes.key?(:'remote_user_id')
69
+ self.remote_user_id = attributes[:'remote_user_id']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ if @model.nil?
78
+ invalid_properties.push('invalid value for "model", model cannot be nil.')
79
+ end
80
+
81
+ if @remote_user_id.nil?
82
+ invalid_properties.push('invalid value for "remote_user_id", remote_user_id cannot be nil.')
83
+ end
84
+
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ return false if @model.nil?
92
+ return false if @remote_user_id.nil?
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ model == o.model &&
102
+ remote_user_id == o.remote_user_id
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [model, remote_user_id].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ new.build_from_hash(attributes)
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ self.class.openapi_types.each_pair do |key, type|
130
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
+ self.send("#{key}=", nil)
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ end
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = MergeATSClient.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end
@@ -0,0 +1,418 @@
1
+ =begin
2
+ #Merge ATS API
3
+
4
+ #The unified API for building rich integrations with multiple Applicant Tracking System platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MergeATSClient
17
+ # # The Candidate Object ### Description The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. ### Usage Example Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates.
18
+ class PatchedCandidateRequest
19
+ # The candidate's first name.
20
+ attr_accessor :first_name
21
+
22
+ # The candidate's last name.
23
+ attr_accessor :last_name
24
+
25
+ # The candidate's current company.
26
+ attr_accessor :company
27
+
28
+ # The candidate's current title.
29
+ attr_accessor :title
30
+
31
+ # When the most recent interaction with the candidate occurred.
32
+ attr_accessor :last_interaction_at
33
+
34
+ # Whether or not the candidate is private.
35
+ attr_accessor :is_private
36
+
37
+ # Whether or not the candidate can be emailed.
38
+ attr_accessor :can_email
39
+
40
+ # The candidate's locations.
41
+ attr_accessor :locations
42
+
43
+ attr_accessor :phone_numbers
44
+
45
+ attr_accessor :email_addresses
46
+
47
+ attr_accessor :urls
48
+
49
+ # Array of `Tag` names as strings.
50
+ attr_accessor :tags
51
+
52
+ # Array of `Application` object IDs.
53
+ attr_accessor :applications
54
+
55
+ # Array of `Attachment` object IDs.
56
+ attr_accessor :attachments
57
+
58
+ attr_accessor :remote_template_id
59
+
60
+ attr_accessor :integration_params
61
+
62
+ attr_accessor :linked_account_params
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'first_name' => :'first_name',
68
+ :'last_name' => :'last_name',
69
+ :'company' => :'company',
70
+ :'title' => :'title',
71
+ :'last_interaction_at' => :'last_interaction_at',
72
+ :'is_private' => :'is_private',
73
+ :'can_email' => :'can_email',
74
+ :'locations' => :'locations',
75
+ :'phone_numbers' => :'phone_numbers',
76
+ :'email_addresses' => :'email_addresses',
77
+ :'urls' => :'urls',
78
+ :'tags' => :'tags',
79
+ :'applications' => :'applications',
80
+ :'attachments' => :'attachments',
81
+ :'remote_template_id' => :'remote_template_id',
82
+ :'integration_params' => :'integration_params',
83
+ :'linked_account_params' => :'linked_account_params'
84
+ }
85
+ end
86
+
87
+ # Returns all the JSON keys this model knows about
88
+ def self.acceptable_attributes
89
+ attribute_map.values
90
+ end
91
+
92
+ # Attribute type mapping.
93
+ def self.openapi_types
94
+ {
95
+ :'first_name' => :'String',
96
+ :'last_name' => :'String',
97
+ :'company' => :'String',
98
+ :'title' => :'String',
99
+ :'last_interaction_at' => :'Time',
100
+ :'is_private' => :'Boolean',
101
+ :'can_email' => :'Boolean',
102
+ :'locations' => :'Array<String>',
103
+ :'phone_numbers' => :'Array<PhoneNumberRequest>',
104
+ :'email_addresses' => :'Array<EmailAddressRequest>',
105
+ :'urls' => :'Array<UrlRequest>',
106
+ :'tags' => :'Array<String>',
107
+ :'applications' => :'Array<String>',
108
+ :'attachments' => :'Array<String>',
109
+ :'remote_template_id' => :'String',
110
+ :'integration_params' => :'Hash<String, Object>',
111
+ :'linked_account_params' => :'Hash<String, Object>'
112
+ }
113
+ end
114
+
115
+ # List of attributes with nullable: true
116
+ def self.openapi_nullable
117
+ Set.new([
118
+ :'first_name',
119
+ :'last_name',
120
+ :'company',
121
+ :'title',
122
+ :'last_interaction_at',
123
+ :'is_private',
124
+ :'can_email',
125
+ :'locations',
126
+ :'remote_template_id',
127
+ :'integration_params',
128
+ :'linked_account_params'
129
+ ])
130
+ end
131
+
132
+ # Initializes the object
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ def initialize(attributes = {})
135
+ if (!attributes.is_a?(Hash))
136
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::PatchedCandidateRequest` initialize method"
137
+ end
138
+
139
+ # check to see if the attribute exists and convert string to symbol for hash key
140
+ attributes = attributes.each_with_object({}) { |(k, v), h|
141
+ if (!self.class.attribute_map.key?(k.to_sym))
142
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::PatchedCandidateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
143
+ end
144
+ h[k.to_sym] = v
145
+ }
146
+
147
+ if attributes.key?(:'first_name')
148
+ self.first_name = attributes[:'first_name']
149
+ end
150
+
151
+ if attributes.key?(:'last_name')
152
+ self.last_name = attributes[:'last_name']
153
+ end
154
+
155
+ if attributes.key?(:'company')
156
+ self.company = attributes[:'company']
157
+ end
158
+
159
+ if attributes.key?(:'title')
160
+ self.title = attributes[:'title']
161
+ end
162
+
163
+ if attributes.key?(:'last_interaction_at')
164
+ self.last_interaction_at = attributes[:'last_interaction_at']
165
+ end
166
+
167
+ if attributes.key?(:'is_private')
168
+ self.is_private = attributes[:'is_private']
169
+ end
170
+
171
+ if attributes.key?(:'can_email')
172
+ self.can_email = attributes[:'can_email']
173
+ end
174
+
175
+ if attributes.key?(:'locations')
176
+ if (value = attributes[:'locations']).is_a?(Array)
177
+ self.locations = value
178
+ end
179
+ end
180
+
181
+ if attributes.key?(:'phone_numbers')
182
+ if (value = attributes[:'phone_numbers']).is_a?(Array)
183
+ self.phone_numbers = value
184
+ end
185
+ end
186
+
187
+ if attributes.key?(:'email_addresses')
188
+ if (value = attributes[:'email_addresses']).is_a?(Array)
189
+ self.email_addresses = value
190
+ end
191
+ end
192
+
193
+ if attributes.key?(:'urls')
194
+ if (value = attributes[:'urls']).is_a?(Array)
195
+ self.urls = value
196
+ end
197
+ end
198
+
199
+ if attributes.key?(:'tags')
200
+ if (value = attributes[:'tags']).is_a?(Array)
201
+ self.tags = value
202
+ end
203
+ end
204
+
205
+ if attributes.key?(:'applications')
206
+ if (value = attributes[:'applications']).is_a?(Array)
207
+ self.applications = value
208
+ end
209
+ end
210
+
211
+ if attributes.key?(:'attachments')
212
+ if (value = attributes[:'attachments']).is_a?(Array)
213
+ self.attachments = value
214
+ end
215
+ end
216
+
217
+ if attributes.key?(:'remote_template_id')
218
+ self.remote_template_id = attributes[:'remote_template_id']
219
+ end
220
+
221
+ if attributes.key?(:'integration_params')
222
+ if (value = attributes[:'integration_params']).is_a?(Hash)
223
+ self.integration_params = value
224
+ end
225
+ end
226
+
227
+ if attributes.key?(:'linked_account_params')
228
+ if (value = attributes[:'linked_account_params']).is_a?(Hash)
229
+ self.linked_account_params = value
230
+ end
231
+ end
232
+ end
233
+
234
+ # Show invalid properties with the reasons. Usually used together with valid?
235
+ # @return Array for valid properties with the reasons
236
+ def list_invalid_properties
237
+ invalid_properties = Array.new
238
+ if !@remote_template_id.nil? && @remote_template_id.to_s.length < 1
239
+ invalid_properties.push('invalid value for "remote_template_id", the character length must be great than or equal to 1.')
240
+ end
241
+
242
+ invalid_properties
243
+ end
244
+
245
+ # Check to see if the all the properties in the model are valid
246
+ # @return true if the model is valid
247
+ def valid?
248
+ return false if !@remote_template_id.nil? && @remote_template_id.to_s.length < 1
249
+ true
250
+ end
251
+
252
+ # Custom attribute writer method with validation
253
+ # @param [Object] remote_template_id Value to be assigned
254
+ def remote_template_id=(remote_template_id)
255
+ if !remote_template_id.nil? && remote_template_id.to_s.length < 1
256
+ fail ArgumentError, 'invalid value for "remote_template_id", the character length must be great than or equal to 1.'
257
+ end
258
+
259
+ @remote_template_id = remote_template_id
260
+ end
261
+
262
+ # Checks equality by comparing each attribute.
263
+ # @param [Object] Object to be compared
264
+ def ==(o)
265
+ return true if self.equal?(o)
266
+ self.class == o.class &&
267
+ first_name == o.first_name &&
268
+ last_name == o.last_name &&
269
+ company == o.company &&
270
+ title == o.title &&
271
+ last_interaction_at == o.last_interaction_at &&
272
+ is_private == o.is_private &&
273
+ can_email == o.can_email &&
274
+ locations == o.locations &&
275
+ phone_numbers == o.phone_numbers &&
276
+ email_addresses == o.email_addresses &&
277
+ urls == o.urls &&
278
+ tags == o.tags &&
279
+ applications == o.applications &&
280
+ attachments == o.attachments &&
281
+ remote_template_id == o.remote_template_id &&
282
+ integration_params == o.integration_params &&
283
+ linked_account_params == o.linked_account_params
284
+ end
285
+
286
+ # @see the `==` method
287
+ # @param [Object] Object to be compared
288
+ def eql?(o)
289
+ self == o
290
+ end
291
+
292
+ # Calculates hash code according to all attributes.
293
+ # @return [Integer] Hash code
294
+ def hash
295
+ [first_name, last_name, company, title, last_interaction_at, is_private, can_email, locations, phone_numbers, email_addresses, urls, tags, applications, attachments, remote_template_id, integration_params, linked_account_params].hash
296
+ end
297
+
298
+ # Builds the object from hash
299
+ # @param [Hash] attributes Model attributes in the form of hash
300
+ # @return [Object] Returns the model itself
301
+ def self.build_from_hash(attributes)
302
+ new.build_from_hash(attributes)
303
+ end
304
+
305
+ # Builds the object from hash
306
+ # @param [Hash] attributes Model attributes in the form of hash
307
+ # @return [Object] Returns the model itself
308
+ def build_from_hash(attributes)
309
+ return nil unless attributes.is_a?(Hash)
310
+ self.class.openapi_types.each_pair do |key, type|
311
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
312
+ self.send("#{key}=", nil)
313
+ elsif type =~ /\AArray<(.*)>/i
314
+ # check to ensure the input is an array given that the attribute
315
+ # is documented as an array but the input is not
316
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
317
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
318
+ end
319
+ elsif !attributes[self.class.attribute_map[key]].nil?
320
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
321
+ end
322
+ end
323
+
324
+ self
325
+ end
326
+
327
+ # Deserializes the data based on type
328
+ # @param string type Data type
329
+ # @param string value Value to be deserialized
330
+ # @return [Object] Deserialized data
331
+ def _deserialize(type, value)
332
+ case type.to_sym
333
+ when :Time
334
+ Time.parse(value)
335
+ when :Date
336
+ Date.parse(value)
337
+ when :String
338
+ value
339
+ when :Integer
340
+ value.to_i
341
+ when :Float
342
+ value.to_f
343
+ when :Boolean
344
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
345
+ true
346
+ else
347
+ false
348
+ end
349
+ when :Object
350
+ # generic object (usually a Hash), return directly
351
+ value
352
+ when /\AArray<(?<inner_type>.+)>\z/
353
+ inner_type = Regexp.last_match[:inner_type]
354
+ value.map { |v| _deserialize(inner_type, v) }
355
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
356
+ k_type = Regexp.last_match[:k_type]
357
+ v_type = Regexp.last_match[:v_type]
358
+ {}.tap do |hash|
359
+ value.each do |k, v|
360
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
361
+ end
362
+ end
363
+ else # model
364
+ # models (e.g. Pet) or oneOf
365
+ klass = MergeATSClient.const_get(type)
366
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
367
+ end
368
+ end
369
+
370
+ # Returns the string representation of the object
371
+ # @return [String] String presentation of the object
372
+ def to_s
373
+ to_hash.to_s
374
+ end
375
+
376
+ # to_body is an alias to to_hash (backward compatibility)
377
+ # @return [Hash] Returns the object in the form of hash
378
+ def to_body
379
+ to_hash
380
+ end
381
+
382
+ # Returns the object in the form of hash
383
+ # @return [Hash] Returns the object in the form of hash
384
+ def to_hash
385
+ hash = {}
386
+ self.class.attribute_map.each_pair do |attr, param|
387
+ value = self.send(attr)
388
+ if value.nil?
389
+ is_nullable = self.class.openapi_nullable.include?(attr)
390
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
391
+ end
392
+
393
+ hash[param] = _to_hash(value)
394
+ end
395
+ hash
396
+ end
397
+
398
+ # Outputs non-array value in the form of hash
399
+ # For object, use to_hash. Otherwise, just return the value
400
+ # @param [Object] value Any valid value
401
+ # @return [Hash] Returns the value in the form of hash
402
+ def _to_hash(value)
403
+ if value.is_a?(Array)
404
+ value.compact.map { |v| _to_hash(v) }
405
+ elsif value.is_a?(Hash)
406
+ {}.tap do |hash|
407
+ value.each { |k, v| hash[k] = _to_hash(v) }
408
+ end
409
+ elsif value.respond_to? :to_hash
410
+ value.to_hash
411
+ else
412
+ value
413
+ end
414
+ end
415
+
416
+ end
417
+
418
+ end