merge_ats_client 2.0.1 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (237) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +16 -0
  3. data/README.md +186 -167
  4. data/docs/AccountIntegration.md +6 -2
  5. data/docs/ActivitiesApi.md +164 -8
  6. data/docs/Activity.md +12 -6
  7. data/docs/ActivityEndpointRequest.md +20 -0
  8. data/docs/ActivityRequest.md +32 -0
  9. data/docs/ActivityResponse.md +24 -0
  10. data/docs/Application.md +12 -10
  11. data/docs/ApplicationRequest.md +5 -9
  12. data/docs/ApplicationsApi.md +4 -4
  13. data/docs/Attachment.md +8 -4
  14. data/docs/AttachmentRequest.md +1 -3
  15. data/docs/AttachmentsApi.md +13 -9
  16. data/docs/Candidate.md +8 -6
  17. data/docs/CandidateRequest.md +1 -9
  18. data/docs/CandidatesApi.md +16 -13
  19. data/docs/CommonModelScopesBodyRequest.md +22 -0
  20. data/docs/ConditionSchema.md +30 -0
  21. data/docs/ConditionTypeEnum.md +15 -0
  22. data/docs/DataPassthroughRequest.md +1 -1
  23. data/docs/Department.md +7 -3
  24. data/docs/DepartmentsApi.md +4 -4
  25. data/docs/EEOC.md +12 -8
  26. data/docs/EeocsApi.md +13 -9
  27. data/docs/EmailAddress.md +4 -2
  28. data/docs/EmailAddressRequest.md +6 -2
  29. data/docs/EnabledActionsEnum.md +15 -0
  30. data/docs/EndUserDetailsRequest.md +5 -3
  31. data/docs/ForceResyncApi.md +1 -1
  32. data/docs/InterviewsApi.md +165 -9
  33. data/docs/Issue.md +10 -8
  34. data/docs/IssuesApi.md +6 -6
  35. data/docs/Job.md +8 -4
  36. data/docs/JobInterviewStage.md +10 -4
  37. data/docs/JobInterviewStagesApi.md +4 -4
  38. data/docs/JobsApi.md +16 -10
  39. data/docs/LinkToken.md +1 -1
  40. data/docs/LinkedAccountCondition.md +28 -0
  41. data/docs/LinkedAccountConditionRequest.md +22 -0
  42. data/docs/LinkedAccountSelectiveSyncConfiguration.md +18 -0
  43. data/docs/LinkedAccountSelectiveSyncConfigurationListRequest.md +18 -0
  44. data/docs/LinkedAccountSelectiveSyncConfigurationRequest.md +18 -0
  45. data/docs/LinkedAccountsApi.md +2 -2
  46. data/docs/MetaResponse.md +2 -0
  47. data/docs/MultipartFormFieldRequest.md +1 -1
  48. data/docs/Offer.md +10 -6
  49. data/docs/OffersApi.md +13 -9
  50. data/docs/Office.md +7 -3
  51. data/docs/OfficesApi.md +4 -4
  52. data/docs/OperatorSchema.md +20 -0
  53. data/docs/PaginatedConditionSchemaList.md +22 -0
  54. data/docs/PhoneNumber.md +4 -2
  55. data/docs/PhoneNumberRequest.md +6 -2
  56. data/docs/RejectReason.md +7 -3
  57. data/docs/RejectReasonsApi.md +4 -4
  58. data/docs/RemoteUser.md +8 -4
  59. data/docs/ScheduledInterview.md +11 -7
  60. data/docs/ScheduledInterviewEndpointRequest.md +20 -0
  61. data/docs/ScheduledInterviewRequest.md +36 -0
  62. data/docs/ScheduledInterviewResponse.md +24 -0
  63. data/docs/Scorecard.md +11 -7
  64. data/docs/ScorecardsApi.md +13 -9
  65. data/docs/SelectiveSyncApi.md +233 -0
  66. data/docs/SelectiveSyncConfigurationsUsageEnum.md +15 -0
  67. data/docs/SyncStatus.md +3 -1
  68. data/docs/SyncStatusApi.md +1 -1
  69. data/docs/Tag.md +7 -3
  70. data/docs/TagsApi.md +4 -4
  71. data/docs/Url.md +4 -2
  72. data/docs/UrlRequest.md +6 -2
  73. data/docs/UsersApi.md +13 -9
  74. data/lib/merge_ats_client/api/activities_api.rb +160 -8
  75. data/lib/merge_ats_client/api/applications_api.rb +4 -4
  76. data/lib/merge_ats_client/api/attachments_api.rb +22 -8
  77. data/lib/merge_ats_client/api/candidates_api.rb +15 -11
  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 +225 -0
  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/access_role_enum.rb +1 -1
  95. data/lib/merge_ats_client/models/account_details_and_actions_status_enum.rb +1 -1
  96. data/lib/merge_ats_client/models/account_integration.rb +30 -8
  97. data/lib/merge_ats_client/models/activity.rb +50 -16
  98. data/lib/merge_ats_client/models/activity_endpoint_request.rb +237 -0
  99. data/lib/merge_ats_client/models/activity_request.rb +300 -0
  100. data/lib/merge_ats_client/models/activity_response.rb +266 -0
  101. data/lib/merge_ats_client/models/activity_type_enum.rb +1 -1
  102. data/lib/merge_ats_client/models/application.rb +40 -26
  103. data/lib/merge_ats_client/models/application_request.rb +7 -26
  104. data/lib/merge_ats_client/models/attachment.rb +38 -16
  105. data/lib/merge_ats_client/models/attachment_request.rb +3 -14
  106. data/lib/merge_ats_client/models/attachment_type_enum.rb +1 -1
  107. data/lib/merge_ats_client/models/candidate.rb +36 -27
  108. data/lib/merge_ats_client/models/candidate_request.rb +3 -49
  109. data/lib/merge_ats_client/models/categories_enum.rb +4 -2
  110. data/lib/merge_ats_client/models/category_enum.rb +4 -2
  111. data/lib/merge_ats_client/models/common_model_scopes_body_request.rb +274 -0
  112. data/lib/merge_ats_client/models/condition_schema.rb +298 -0
  113. data/lib/merge_ats_client/models/condition_type_enum.rb +50 -0
  114. data/lib/merge_ats_client/models/data_passthrough_request.rb +1 -0
  115. data/lib/merge_ats_client/models/department.rb +36 -14
  116. data/lib/merge_ats_client/models/disability_status_enum.rb +1 -1
  117. data/lib/merge_ats_client/models/eeoc.rb +42 -19
  118. data/lib/merge_ats_client/models/email_address.rb +16 -6
  119. data/lib/merge_ats_client/models/email_address_request.rb +30 -6
  120. data/lib/merge_ats_client/models/email_address_type_enum.rb +1 -1
  121. data/lib/merge_ats_client/models/enabled_actions_enum.rb +45 -0
  122. data/lib/merge_ats_client/models/encoding_enum.rb +1 -1
  123. data/lib/merge_ats_client/models/end_user_details_request.rb +20 -7
  124. data/lib/merge_ats_client/models/gender_enum.rb +1 -1
  125. data/lib/merge_ats_client/models/issue.rb +16 -4
  126. data/lib/merge_ats_client/models/job.rb +38 -16
  127. data/lib/merge_ats_client/models/job_interview_stage.rb +72 -15
  128. data/lib/merge_ats_client/models/job_status_enum.rb +1 -1
  129. data/lib/merge_ats_client/models/link_token.rb +0 -5
  130. data/lib/merge_ats_client/models/linked_account_condition.rb +282 -0
  131. data/lib/merge_ats_client/models/linked_account_condition_request.rb +269 -0
  132. data/lib/merge_ats_client/models/linked_account_selective_sync_configuration.rb +221 -0
  133. data/lib/merge_ats_client/models/linked_account_selective_sync_configuration_list_request.rb +226 -0
  134. data/lib/merge_ats_client/models/linked_account_selective_sync_configuration_request.rb +226 -0
  135. data/lib/merge_ats_client/models/meta_response.rb +12 -1
  136. data/lib/merge_ats_client/models/method_enum.rb +1 -1
  137. data/lib/merge_ats_client/models/multipart_form_field_request.rb +1 -1
  138. data/lib/merge_ats_client/models/offer.rb +40 -16
  139. data/lib/merge_ats_client/models/offer_status_enum.rb +1 -1
  140. data/lib/merge_ats_client/models/office.rb +37 -15
  141. data/lib/merge_ats_client/models/operator_schema.rb +229 -0
  142. data/lib/merge_ats_client/models/overall_recommendation_enum.rb +1 -1
  143. data/lib/merge_ats_client/models/paginated_condition_schema_list.rb +240 -0
  144. data/lib/merge_ats_client/models/phone_number.rb +16 -6
  145. data/lib/merge_ats_client/models/phone_number_request.rb +30 -6
  146. data/lib/merge_ats_client/models/phone_number_type_enum.rb +1 -1
  147. data/lib/merge_ats_client/models/race_enum.rb +1 -1
  148. data/lib/merge_ats_client/models/reason_enum.rb +1 -1
  149. data/lib/merge_ats_client/models/reject_reason.rb +37 -15
  150. data/lib/merge_ats_client/models/remote_user.rb +38 -16
  151. data/lib/merge_ats_client/models/request_format_enum.rb +1 -1
  152. data/lib/merge_ats_client/models/response_type_enum.rb +1 -1
  153. data/lib/merge_ats_client/models/scheduled_interview.rb +41 -16
  154. data/lib/merge_ats_client/models/scheduled_interview_endpoint_request.rb +237 -0
  155. data/lib/merge_ats_client/models/scheduled_interview_request.rb +323 -0
  156. data/lib/merge_ats_client/models/scheduled_interview_response.rb +266 -0
  157. data/lib/merge_ats_client/models/scheduled_interview_status_enum.rb +1 -1
  158. data/lib/merge_ats_client/models/scorecard.rb +41 -16
  159. data/lib/merge_ats_client/models/selective_sync_configurations_usage_enum.rb +45 -0
  160. data/lib/merge_ats_client/models/sync_status.rb +13 -4
  161. data/lib/merge_ats_client/models/sync_status_status_enum.rb +3 -2
  162. data/lib/merge_ats_client/models/tag.rb +36 -14
  163. data/lib/merge_ats_client/models/url.rb +17 -7
  164. data/lib/merge_ats_client/models/url_request.rb +31 -7
  165. data/lib/merge_ats_client/models/url_type_enum.rb +1 -1
  166. data/lib/merge_ats_client/models/veteran_status_enum.rb +1 -1
  167. data/lib/merge_ats_client/models/visibility_enum.rb +1 -1
  168. data/lib/merge_ats_client/version.rb +1 -1
  169. data/lib/merge_ats_client.rb +19 -1
  170. data/spec/api/activities_api_spec.rb +31 -4
  171. data/spec/api/applications_api_spec.rb +2 -2
  172. data/spec/api/attachments_api_spec.rb +6 -4
  173. data/spec/api/candidates_api_spec.rb +5 -3
  174. data/spec/api/departments_api_spec.rb +2 -2
  175. data/spec/api/eeocs_api_spec.rb +6 -4
  176. data/spec/api/force_resync_api_spec.rb +1 -1
  177. data/spec/api/interviews_api_spec.rb +31 -4
  178. data/spec/api/issues_api_spec.rb +3 -3
  179. data/spec/api/job_interview_stages_api_spec.rb +2 -2
  180. data/spec/api/jobs_api_spec.rb +8 -5
  181. data/spec/api/linked_accounts_api_spec.rb +1 -1
  182. data/spec/api/offers_api_spec.rb +6 -4
  183. data/spec/api/offices_api_spec.rb +2 -2
  184. data/spec/api/reject_reasons_api_spec.rb +2 -2
  185. data/spec/api/scorecards_api_spec.rb +6 -4
  186. data/spec/api/selective_sync_api_spec.rb +72 -0
  187. data/spec/api/sync_status_api_spec.rb +1 -1
  188. data/spec/api/tags_api_spec.rb +2 -2
  189. data/spec/api/users_api_spec.rb +6 -4
  190. data/spec/models/account_integration_spec.rb +12 -0
  191. data/spec/models/{ignore_common_model_spec.rb → activity_endpoint_request_spec.rb} +8 -8
  192. data/spec/models/activity_request_spec.rb +76 -0
  193. data/spec/models/activity_response_spec.rb +52 -0
  194. data/spec/models/activity_spec.rb +19 -1
  195. data/spec/models/application_request_spec.rb +0 -12
  196. data/spec/models/application_spec.rb +9 -3
  197. data/spec/models/attachment_request_spec.rb +0 -6
  198. data/spec/models/attachment_spec.rb +14 -2
  199. data/spec/models/candidate_request_spec.rb +0 -24
  200. data/spec/models/candidate_spec.rb +9 -3
  201. data/spec/models/common_model_scopes_body_request_spec.rb +46 -0
  202. data/spec/models/condition_schema_spec.rb +70 -0
  203. data/spec/models/condition_type_enum_spec.rb +28 -0
  204. data/spec/models/department_spec.rb +14 -2
  205. data/spec/models/eeoc_spec.rb +14 -2
  206. data/spec/models/email_address_request_spec.rb +12 -0
  207. data/spec/models/email_address_spec.rb +6 -0
  208. data/spec/models/enabled_actions_enum_spec.rb +28 -0
  209. data/spec/models/end_user_details_request_spec.rb +6 -0
  210. data/spec/models/issue_spec.rb +6 -0
  211. data/spec/models/job_interview_stage_spec.rb +19 -1
  212. data/spec/models/job_spec.rb +14 -2
  213. data/spec/models/linked_account_condition_request_spec.rb +46 -0
  214. data/spec/models/linked_account_condition_spec.rb +64 -0
  215. data/spec/models/linked_account_selective_sync_configuration_list_request_spec.rb +34 -0
  216. data/spec/models/linked_account_selective_sync_configuration_request_spec.rb +34 -0
  217. data/spec/models/linked_account_selective_sync_configuration_spec.rb +34 -0
  218. data/spec/models/meta_response_spec.rb +6 -0
  219. data/spec/models/offer_spec.rb +14 -2
  220. data/spec/models/office_spec.rb +14 -2
  221. data/spec/models/{remote_data_request_spec.rb → operator_schema_spec.rb} +8 -8
  222. data/spec/models/paginated_condition_schema_list_spec.rb +46 -0
  223. data/spec/models/phone_number_request_spec.rb +12 -0
  224. data/spec/models/phone_number_spec.rb +6 -0
  225. data/spec/models/reject_reason_spec.rb +14 -2
  226. data/spec/models/remote_user_spec.rb +14 -2
  227. data/spec/models/scheduled_interview_endpoint_request_spec.rb +40 -0
  228. data/spec/models/scheduled_interview_request_spec.rb +88 -0
  229. data/spec/models/scheduled_interview_response_spec.rb +52 -0
  230. data/spec/models/scheduled_interview_spec.rb +14 -2
  231. data/spec/models/scorecard_spec.rb +14 -2
  232. data/spec/models/selective_sync_configurations_usage_enum_spec.rb +28 -0
  233. data/spec/models/sync_status_spec.rb +6 -0
  234. data/spec/models/tag_spec.rb +14 -2
  235. data/spec/models/url_request_spec.rb +12 -0
  236. data/spec/models/url_spec.rb +6 -0
  237. metadata +182 -109
@@ -14,17 +14,20 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeATSClient
17
- # # The ScheduledInterview Object ### Description The `ScheduledInterview` object is used to represent an interview. ### Usage Example Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations.
17
+ # # The ScheduledInterview Object ### Description The `ScheduledInterview` object is used to represent a scheduled interview for a given candidate’s application to a job. An `Application` can have multiple `ScheduledInterview`s depending on the particular hiring process. ### Usage Example Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations.
18
18
  class ScheduledInterview
19
19
  attr_accessor :id
20
20
 
21
21
  # The third-party API ID of the matching object.
22
22
  attr_accessor :remote_id
23
23
 
24
+ # The application being interviewed.
24
25
  attr_accessor :application
25
26
 
27
+ # The stage of the interview.
26
28
  attr_accessor :job_interview_stage
27
29
 
30
+ # The user organizing the interview.
28
31
  attr_accessor :organizer
29
32
 
30
33
  # Array of `RemoteUser` IDs.
@@ -45,14 +48,19 @@ module MergeATSClient
45
48
  # When the third party's interview was updated.
46
49
  attr_accessor :remote_updated_at
47
50
 
48
- # The interview's status.
51
+ # The interview's status. * `SCHEDULED` - SCHEDULED * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK * `COMPLETE` - COMPLETE
49
52
  attr_accessor :status
50
53
 
51
- attr_accessor :remote_data
52
-
53
54
  # Indicates whether or not this object has been deleted by third party webhooks.
54
55
  attr_accessor :remote_was_deleted
55
56
 
57
+ attr_accessor :field_mappings
58
+
59
+ # This is the datetime that this object was last updated by Merge
60
+ attr_accessor :modified_at
61
+
62
+ attr_accessor :remote_data
63
+
56
64
  # Attribute mapping from ruby-style variable name to JSON key.
57
65
  def self.attribute_map
58
66
  {
@@ -68,8 +76,10 @@ module MergeATSClient
68
76
  :'remote_created_at' => :'remote_created_at',
69
77
  :'remote_updated_at' => :'remote_updated_at',
70
78
  :'status' => :'status',
71
- :'remote_data' => :'remote_data',
72
- :'remote_was_deleted' => :'remote_was_deleted'
79
+ :'remote_was_deleted' => :'remote_was_deleted',
80
+ :'field_mappings' => :'field_mappings',
81
+ :'modified_at' => :'modified_at',
82
+ :'remote_data' => :'remote_data'
73
83
  }
74
84
  end
75
85
 
@@ -93,8 +103,10 @@ module MergeATSClient
93
103
  :'remote_created_at' => :'Time',
94
104
  :'remote_updated_at' => :'Time',
95
105
  :'status' => :'ScheduledInterviewStatusEnum',
96
- :'remote_data' => :'Array<RemoteData>',
97
- :'remote_was_deleted' => :'Boolean'
106
+ :'remote_was_deleted' => :'Boolean',
107
+ :'field_mappings' => :'Hash<String, Object>',
108
+ :'modified_at' => :'Time',
109
+ :'remote_data' => :'Array<RemoteData>'
98
110
  }
99
111
  end
100
112
 
@@ -111,7 +123,8 @@ module MergeATSClient
111
123
  :'remote_created_at',
112
124
  :'remote_updated_at',
113
125
  :'status',
114
- :'remote_data',
126
+ :'field_mappings',
127
+ :'remote_data'
115
128
  ])
116
129
  end
117
130
 
@@ -180,15 +193,25 @@ module MergeATSClient
180
193
  self.status = attributes[:'status']
181
194
  end
182
195
 
196
+ if attributes.key?(:'remote_was_deleted')
197
+ self.remote_was_deleted = attributes[:'remote_was_deleted']
198
+ end
199
+
200
+ if attributes.key?(:'field_mappings')
201
+ if (value = attributes[:'field_mappings']).is_a?(Hash)
202
+ self.field_mappings = value
203
+ end
204
+ end
205
+
206
+ if attributes.key?(:'modified_at')
207
+ self.modified_at = attributes[:'modified_at']
208
+ end
209
+
183
210
  if attributes.key?(:'remote_data')
184
211
  if (value = attributes[:'remote_data']).is_a?(Array)
185
212
  self.remote_data = value
186
213
  end
187
214
  end
188
-
189
- if attributes.key?(:'remote_was_deleted')
190
- self.remote_was_deleted = attributes[:'remote_was_deleted']
191
- end
192
215
  end
193
216
 
194
217
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -221,8 +244,10 @@ module MergeATSClient
221
244
  remote_created_at == o.remote_created_at &&
222
245
  remote_updated_at == o.remote_updated_at &&
223
246
  status == o.status &&
224
- remote_data == o.remote_data &&
225
- remote_was_deleted == o.remote_was_deleted
247
+ remote_was_deleted == o.remote_was_deleted &&
248
+ field_mappings == o.field_mappings &&
249
+ modified_at == o.modified_at &&
250
+ remote_data == o.remote_data
226
251
  end
227
252
 
228
253
  # @see the `==` method
@@ -234,7 +259,7 @@ module MergeATSClient
234
259
  # Calculates hash code according to all attributes.
235
260
  # @return [Integer] Hash code
236
261
  def hash
237
- [id, remote_id, application, job_interview_stage, organizer, interviewers, location, start_at, end_at, remote_created_at, remote_updated_at, status, remote_data, remote_was_deleted].hash
262
+ [id, remote_id, application, job_interview_stage, organizer, interviewers, location, start_at, end_at, remote_created_at, remote_updated_at, status, remote_was_deleted, field_mappings, modified_at, remote_data].hash
238
263
  end
239
264
 
240
265
  # Builds the object from hash
@@ -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 ScheduledInterviewEndpointRequest
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' => :'ScheduledInterviewRequest',
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::ScheduledInterviewEndpointRequest` 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::ScheduledInterviewEndpointRequest`. 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,323 @@
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 ScheduledInterview Object ### Description The `ScheduledInterview` object is used to represent a scheduled interview for a given candidate’s application to a job. An `Application` can have multiple `ScheduledInterview`s depending on the particular hiring process. ### Usage Example Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations.
18
+ class ScheduledInterviewRequest
19
+ # The application being interviewed.
20
+ attr_accessor :application
21
+
22
+ # The stage of the interview.
23
+ attr_accessor :job_interview_stage
24
+
25
+ # The user organizing the interview.
26
+ attr_accessor :organizer
27
+
28
+ # Array of `RemoteUser` IDs.
29
+ attr_accessor :interviewers
30
+
31
+ # The interview's location.
32
+ attr_accessor :location
33
+
34
+ # When the interview was started.
35
+ attr_accessor :start_at
36
+
37
+ # When the interview was ended.
38
+ attr_accessor :end_at
39
+
40
+ # The interview's status. * `SCHEDULED` - SCHEDULED * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK * `COMPLETE` - COMPLETE
41
+ attr_accessor :status
42
+
43
+ attr_accessor :integration_params
44
+
45
+ attr_accessor :linked_account_params
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'application' => :'application',
51
+ :'job_interview_stage' => :'job_interview_stage',
52
+ :'organizer' => :'organizer',
53
+ :'interviewers' => :'interviewers',
54
+ :'location' => :'location',
55
+ :'start_at' => :'start_at',
56
+ :'end_at' => :'end_at',
57
+ :'status' => :'status',
58
+ :'integration_params' => :'integration_params',
59
+ :'linked_account_params' => :'linked_account_params'
60
+ }
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'application' => :'String',
72
+ :'job_interview_stage' => :'String',
73
+ :'organizer' => :'String',
74
+ :'interviewers' => :'Array<String>',
75
+ :'location' => :'String',
76
+ :'start_at' => :'Time',
77
+ :'end_at' => :'Time',
78
+ :'status' => :'ScheduledInterviewStatusEnum',
79
+ :'integration_params' => :'Hash<String, Object>',
80
+ :'linked_account_params' => :'Hash<String, Object>'
81
+ }
82
+ end
83
+
84
+ # List of attributes with nullable: true
85
+ def self.openapi_nullable
86
+ Set.new([
87
+ :'application',
88
+ :'job_interview_stage',
89
+ :'organizer',
90
+ :'location',
91
+ :'start_at',
92
+ :'end_at',
93
+ :'status',
94
+ :'integration_params',
95
+ :'linked_account_params'
96
+ ])
97
+ end
98
+
99
+ # Initializes the object
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ def initialize(attributes = {})
102
+ if (!attributes.is_a?(Hash))
103
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::ScheduledInterviewRequest` initialize method"
104
+ end
105
+
106
+ # check to see if the attribute exists and convert string to symbol for hash key
107
+ attributes = attributes.each_with_object({}) { |(k, v), h|
108
+ if (!self.class.attribute_map.key?(k.to_sym))
109
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::ScheduledInterviewRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
110
+ end
111
+ h[k.to_sym] = v
112
+ }
113
+
114
+ if attributes.key?(:'application')
115
+ self.application = attributes[:'application']
116
+ end
117
+
118
+ if attributes.key?(:'job_interview_stage')
119
+ self.job_interview_stage = attributes[:'job_interview_stage']
120
+ end
121
+
122
+ if attributes.key?(:'organizer')
123
+ self.organizer = attributes[:'organizer']
124
+ end
125
+
126
+ if attributes.key?(:'interviewers')
127
+ if (value = attributes[:'interviewers']).is_a?(Array)
128
+ self.interviewers = value
129
+ end
130
+ end
131
+
132
+ if attributes.key?(:'location')
133
+ self.location = attributes[:'location']
134
+ end
135
+
136
+ if attributes.key?(:'start_at')
137
+ self.start_at = attributes[:'start_at']
138
+ end
139
+
140
+ if attributes.key?(:'end_at')
141
+ self.end_at = attributes[:'end_at']
142
+ end
143
+
144
+ if attributes.key?(:'status')
145
+ self.status = attributes[:'status']
146
+ end
147
+
148
+ if attributes.key?(:'integration_params')
149
+ if (value = attributes[:'integration_params']).is_a?(Hash)
150
+ self.integration_params = value
151
+ end
152
+ end
153
+
154
+ if attributes.key?(:'linked_account_params')
155
+ if (value = attributes[:'linked_account_params']).is_a?(Hash)
156
+ self.linked_account_params = value
157
+ end
158
+ end
159
+ end
160
+
161
+ # Show invalid properties with the reasons. Usually used together with valid?
162
+ # @return Array for valid properties with the reasons
163
+ def list_invalid_properties
164
+ invalid_properties = Array.new
165
+ invalid_properties
166
+ end
167
+
168
+ # Check to see if the all the properties in the model are valid
169
+ # @return true if the model is valid
170
+ def valid?
171
+ true
172
+ end
173
+
174
+ # Checks equality by comparing each attribute.
175
+ # @param [Object] Object to be compared
176
+ def ==(o)
177
+ return true if self.equal?(o)
178
+ self.class == o.class &&
179
+ application == o.application &&
180
+ job_interview_stage == o.job_interview_stage &&
181
+ organizer == o.organizer &&
182
+ interviewers == o.interviewers &&
183
+ location == o.location &&
184
+ start_at == o.start_at &&
185
+ end_at == o.end_at &&
186
+ status == o.status &&
187
+ integration_params == o.integration_params &&
188
+ linked_account_params == o.linked_account_params
189
+ end
190
+
191
+ # @see the `==` method
192
+ # @param [Object] Object to be compared
193
+ def eql?(o)
194
+ self == o
195
+ end
196
+
197
+ # Calculates hash code according to all attributes.
198
+ # @return [Integer] Hash code
199
+ def hash
200
+ [application, job_interview_stage, organizer, interviewers, location, start_at, end_at, status, integration_params, linked_account_params].hash
201
+ end
202
+
203
+ # Builds the object from hash
204
+ # @param [Hash] attributes Model attributes in the form of hash
205
+ # @return [Object] Returns the model itself
206
+ def self.build_from_hash(attributes)
207
+ new.build_from_hash(attributes)
208
+ end
209
+
210
+ # Builds the object from hash
211
+ # @param [Hash] attributes Model attributes in the form of hash
212
+ # @return [Object] Returns the model itself
213
+ def build_from_hash(attributes)
214
+ return nil unless attributes.is_a?(Hash)
215
+ self.class.openapi_types.each_pair do |key, type|
216
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
217
+ self.send("#{key}=", nil)
218
+ elsif type =~ /\AArray<(.*)>/i
219
+ # check to ensure the input is an array given that the attribute
220
+ # is documented as an array but the input is not
221
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
222
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
223
+ end
224
+ elsif !attributes[self.class.attribute_map[key]].nil?
225
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
226
+ end
227
+ end
228
+
229
+ self
230
+ end
231
+
232
+ # Deserializes the data based on type
233
+ # @param string type Data type
234
+ # @param string value Value to be deserialized
235
+ # @return [Object] Deserialized data
236
+ def _deserialize(type, value)
237
+ case type.to_sym
238
+ when :Time
239
+ Time.parse(value)
240
+ when :Date
241
+ Date.parse(value)
242
+ when :String
243
+ value
244
+ when :Integer
245
+ value.to_i
246
+ when :Float
247
+ value.to_f
248
+ when :Boolean
249
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
250
+ true
251
+ else
252
+ false
253
+ end
254
+ when :Object
255
+ # generic object (usually a Hash), return directly
256
+ value
257
+ when /\AArray<(?<inner_type>.+)>\z/
258
+ inner_type = Regexp.last_match[:inner_type]
259
+ value.map { |v| _deserialize(inner_type, v) }
260
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
261
+ k_type = Regexp.last_match[:k_type]
262
+ v_type = Regexp.last_match[:v_type]
263
+ {}.tap do |hash|
264
+ value.each do |k, v|
265
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
266
+ end
267
+ end
268
+ else # model
269
+ # models (e.g. Pet) or oneOf
270
+ klass = MergeATSClient.const_get(type)
271
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
272
+ end
273
+ end
274
+
275
+ # Returns the string representation of the object
276
+ # @return [String] String presentation of the object
277
+ def to_s
278
+ to_hash.to_s
279
+ end
280
+
281
+ # to_body is an alias to to_hash (backward compatibility)
282
+ # @return [Hash] Returns the object in the form of hash
283
+ def to_body
284
+ to_hash
285
+ end
286
+
287
+ # Returns the object in the form of hash
288
+ # @return [Hash] Returns the object in the form of hash
289
+ def to_hash
290
+ hash = {}
291
+ self.class.attribute_map.each_pair do |attr, param|
292
+ value = self.send(attr)
293
+ if value.nil?
294
+ is_nullable = self.class.openapi_nullable.include?(attr)
295
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
296
+ end
297
+
298
+ hash[param] = _to_hash(value)
299
+ end
300
+ hash
301
+ end
302
+
303
+ # Outputs non-array value in the form of hash
304
+ # For object, use to_hash. Otherwise, just return the value
305
+ # @param [Object] value Any valid value
306
+ # @return [Hash] Returns the value in the form of hash
307
+ def _to_hash(value)
308
+ if value.is_a?(Array)
309
+ value.compact.map { |v| _to_hash(v) }
310
+ elsif value.is_a?(Hash)
311
+ {}.tap do |hash|
312
+ value.each { |k, v| hash[k] = _to_hash(v) }
313
+ end
314
+ elsif value.respond_to? :to_hash
315
+ value.to_hash
316
+ else
317
+ value
318
+ end
319
+ end
320
+
321
+ end
322
+
323
+ end