merge_ats_client 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (297) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +208 -0
  4. data/Rakefile +10 -0
  5. data/config.json +2 -0
  6. data/docs/AccessRoleEnum.md +15 -0
  7. data/docs/AccountIntegration.md +28 -0
  8. data/docs/AccountToken.md +18 -0
  9. data/docs/AccountTokenApi.md +79 -0
  10. data/docs/ActivitiesApi.md +181 -0
  11. data/docs/Activity.md +34 -0
  12. data/docs/ActivityTypeEnum.md +15 -0
  13. data/docs/Application.md +38 -0
  14. data/docs/ApplicationRequest.md +34 -0
  15. data/docs/ApplicationsApi.md +351 -0
  16. data/docs/Attachment.md +28 -0
  17. data/docs/AttachmentsApi.md +177 -0
  18. data/docs/AvailableActions.md +22 -0
  19. data/docs/AvailableActionsApi.md +79 -0
  20. data/docs/Candidate.md +54 -0
  21. data/docs/CandidateRequest.md +46 -0
  22. data/docs/CandidatesApi.md +259 -0
  23. data/docs/DataPassthrough.md +24 -0
  24. data/docs/DataPassthroughRequest.md +26 -0
  25. data/docs/Department.md +24 -0
  26. data/docs/DepartmentsApi.md +175 -0
  27. data/docs/DisabilityStatusEnum.md +15 -0
  28. data/docs/EEOC.md +34 -0
  29. data/docs/EeocsApi.md +181 -0
  30. data/docs/EmailAddress.md +20 -0
  31. data/docs/EmailAddressRequest.md +20 -0
  32. data/docs/EmailAddressTypeEnum.md +15 -0
  33. data/docs/EndUserDetails.md +24 -0
  34. data/docs/EndUserDetailsRequest.md +26 -0
  35. data/docs/GenderEnum.md +15 -0
  36. data/docs/GenerateKeyApi.md +79 -0
  37. data/docs/GenerateRemoteKeyRequest.md +18 -0
  38. data/docs/InterviewsApi.md +185 -0
  39. data/docs/Job.md +40 -0
  40. data/docs/JobInterviewStage.md +26 -0
  41. data/docs/JobInterviewStagesApi.md +181 -0
  42. data/docs/JobStatusEnum.md +15 -0
  43. data/docs/JobsApi.md +179 -0
  44. data/docs/LinkToken.md +20 -0
  45. data/docs/LinkTokenApi.md +79 -0
  46. data/docs/MethodEnum.md +15 -0
  47. data/docs/ModelOperation.md +22 -0
  48. data/docs/Offer.md +36 -0
  49. data/docs/OfferStatusEnum.md +15 -0
  50. data/docs/OffersApi.md +183 -0
  51. data/docs/Office.md +26 -0
  52. data/docs/OfficesApi.md +175 -0
  53. data/docs/OverallRecommendationEnum.md +15 -0
  54. data/docs/PaginatedActivityList.md +22 -0
  55. data/docs/PaginatedApplicationList.md +22 -0
  56. data/docs/PaginatedAttachmentList.md +22 -0
  57. data/docs/PaginatedCandidateList.md +22 -0
  58. data/docs/PaginatedDepartmentList.md +22 -0
  59. data/docs/PaginatedEEOCList.md +22 -0
  60. data/docs/PaginatedJobInterviewStageList.md +22 -0
  61. data/docs/PaginatedJobList.md +22 -0
  62. data/docs/PaginatedOfferList.md +22 -0
  63. data/docs/PaginatedOfficeList.md +22 -0
  64. data/docs/PaginatedRejectReasonList.md +22 -0
  65. data/docs/PaginatedRemoteUserList.md +22 -0
  66. data/docs/PaginatedScheduledInterviewList.md +22 -0
  67. data/docs/PaginatedScorecardList.md +22 -0
  68. data/docs/PaginatedTagList.md +22 -0
  69. data/docs/PassthroughApi.md +81 -0
  70. data/docs/PatchedApplicationRequest.md +34 -0
  71. data/docs/PhoneNumber.md +20 -0
  72. data/docs/PhoneNumberRequest.md +20 -0
  73. data/docs/PhoneNumberTypeEnum.md +15 -0
  74. data/docs/RaceEnum.md +15 -0
  75. data/docs/RegenerateKeyApi.md +79 -0
  76. data/docs/RejectReason.md +24 -0
  77. data/docs/RejectReasonsApi.md +175 -0
  78. data/docs/RemoteData.md +20 -0
  79. data/docs/RemoteDataRequest.md +20 -0
  80. data/docs/RemoteKey.md +20 -0
  81. data/docs/RemoteKeyForRegeneration.md +18 -0
  82. data/docs/RemoteKeyForRegenerationRequest.md +18 -0
  83. data/docs/RemoteResponse.md +26 -0
  84. data/docs/RemoteUser.md +34 -0
  85. data/docs/ScheduledInterview.md +42 -0
  86. data/docs/ScheduledInterviewStatusEnum.md +15 -0
  87. data/docs/Scorecard.md +34 -0
  88. data/docs/ScorecardsApi.md +185 -0
  89. data/docs/SyncStatus.md +28 -0
  90. data/docs/SyncStatusApi.md +79 -0
  91. data/docs/Tag.md +22 -0
  92. data/docs/TagsApi.md +97 -0
  93. data/docs/Url.md +20 -0
  94. data/docs/UrlRequest.md +20 -0
  95. data/docs/UrlTypeEnum.md +15 -0
  96. data/docs/UsersApi.md +175 -0
  97. data/docs/VeteranStatusEnum.md +15 -0
  98. data/docs/VisibilityEnum.md +15 -0
  99. data/git_push.sh +58 -0
  100. data/lib/merge_ats_client.rb +131 -0
  101. data/lib/merge_ats_client/api/account_token_api.rb +83 -0
  102. data/lib/merge_ats_client/api/activities_api.rb +196 -0
  103. data/lib/merge_ats_client/api/applications_api.rb +366 -0
  104. data/lib/merge_ats_client/api/attachments_api.rb +182 -0
  105. data/lib/merge_ats_client/api/available_actions_api.rb +84 -0
  106. data/lib/merge_ats_client/api/candidates_api.rb +269 -0
  107. data/lib/merge_ats_client/api/departments_api.rb +179 -0
  108. data/lib/merge_ats_client/api/eeocs_api.rb +196 -0
  109. data/lib/merge_ats_client/api/generate_key_api.rb +85 -0
  110. data/lib/merge_ats_client/api/interviews_api.rb +202 -0
  111. data/lib/merge_ats_client/api/job_interview_stages_api.rb +196 -0
  112. data/lib/merge_ats_client/api/jobs_api.rb +193 -0
  113. data/lib/merge_ats_client/api/link_token_api.rb +85 -0
  114. data/lib/merge_ats_client/api/offers_api.rb +199 -0
  115. data/lib/merge_ats_client/api/offices_api.rb +179 -0
  116. data/lib/merge_ats_client/api/passthrough_api.rb +92 -0
  117. data/lib/merge_ats_client/api/regenerate_key_api.rb +85 -0
  118. data/lib/merge_ats_client/api/reject_reasons_api.rb +179 -0
  119. data/lib/merge_ats_client/api/scorecards_api.rb +202 -0
  120. data/lib/merge_ats_client/api/sync_status_api.rb +84 -0
  121. data/lib/merge_ats_client/api/tags_api.rb +108 -0
  122. data/lib/merge_ats_client/api/users_api.rb +179 -0
  123. data/lib/merge_ats_client/api_client.rb +390 -0
  124. data/lib/merge_ats_client/api_error.rb +57 -0
  125. data/lib/merge_ats_client/configuration.rb +279 -0
  126. data/lib/merge_ats_client/models/access_role_enum.rb +38 -0
  127. data/lib/merge_ats_client/models/account_integration.rb +325 -0
  128. data/lib/merge_ats_client/models/account_token.rb +223 -0
  129. data/lib/merge_ats_client/models/activity.rb +308 -0
  130. data/lib/merge_ats_client/models/activity_type_enum.rb +36 -0
  131. data/lib/merge_ats_client/models/application.rb +330 -0
  132. data/lib/merge_ats_client/models/application_request.rb +309 -0
  133. data/lib/merge_ats_client/models/attachment.rb +289 -0
  134. data/lib/merge_ats_client/models/available_actions.rb +249 -0
  135. data/lib/merge_ats_client/models/candidate.rb +420 -0
  136. data/lib/merge_ats_client/models/candidate_request.rb +377 -0
  137. data/lib/merge_ats_client/models/data_passthrough.rb +262 -0
  138. data/lib/merge_ats_client/models/data_passthrough_request.rb +271 -0
  139. data/lib/merge_ats_client/models/department.rb +253 -0
  140. data/lib/merge_ats_client/models/disability_status_enum.rb +36 -0
  141. data/lib/merge_ats_client/models/eeoc.rb +308 -0
  142. data/lib/merge_ats_client/models/email_address.rb +247 -0
  143. data/lib/merge_ats_client/models/email_address_request.rb +247 -0
  144. data/lib/merge_ats_client/models/email_address_type_enum.rb +36 -0
  145. data/lib/merge_ats_client/models/end_user_details.rb +289 -0
  146. data/lib/merge_ats_client/models/end_user_details_request.rb +298 -0
  147. data/lib/merge_ats_client/models/gender_enum.rb +38 -0
  148. data/lib/merge_ats_client/models/generate_remote_key_request.rb +224 -0
  149. data/lib/merge_ats_client/models/job.rb +341 -0
  150. data/lib/merge_ats_client/models/job_interview_stage.rb +264 -0
  151. data/lib/merge_ats_client/models/job_status_enum.rb +38 -0
  152. data/lib/merge_ats_client/models/link_token.rb +237 -0
  153. data/lib/merge_ats_client/models/method_enum.rb +40 -0
  154. data/lib/merge_ats_client/models/model_operation.rb +256 -0
  155. data/lib/merge_ats_client/models/offer.rb +319 -0
  156. data/lib/merge_ats_client/models/offer_status_enum.rb +42 -0
  157. data/lib/merge_ats_client/models/office.rb +264 -0
  158. data/lib/merge_ats_client/models/overall_recommendation_enum.rb +38 -0
  159. data/lib/merge_ats_client/models/paginated_activity_list.rb +240 -0
  160. data/lib/merge_ats_client/models/paginated_application_list.rb +240 -0
  161. data/lib/merge_ats_client/models/paginated_attachment_list.rb +240 -0
  162. data/lib/merge_ats_client/models/paginated_candidate_list.rb +240 -0
  163. data/lib/merge_ats_client/models/paginated_department_list.rb +240 -0
  164. data/lib/merge_ats_client/models/paginated_eeoc_list.rb +240 -0
  165. data/lib/merge_ats_client/models/paginated_job_interview_stage_list.rb +240 -0
  166. data/lib/merge_ats_client/models/paginated_job_list.rb +240 -0
  167. data/lib/merge_ats_client/models/paginated_offer_list.rb +240 -0
  168. data/lib/merge_ats_client/models/paginated_office_list.rb +240 -0
  169. data/lib/merge_ats_client/models/paginated_reject_reason_list.rb +240 -0
  170. data/lib/merge_ats_client/models/paginated_remote_user_list.rb +240 -0
  171. data/lib/merge_ats_client/models/paginated_scheduled_interview_list.rb +240 -0
  172. data/lib/merge_ats_client/models/paginated_scorecard_list.rb +240 -0
  173. data/lib/merge_ats_client/models/paginated_tag_list.rb +240 -0
  174. data/lib/merge_ats_client/models/patched_application_request.rb +309 -0
  175. data/lib/merge_ats_client/models/phone_number.rb +232 -0
  176. data/lib/merge_ats_client/models/phone_number_request.rb +232 -0
  177. data/lib/merge_ats_client/models/phone_number_type_enum.rb +38 -0
  178. data/lib/merge_ats_client/models/race_enum.rb +41 -0
  179. data/lib/merge_ats_client/models/reject_reason.rb +253 -0
  180. data/lib/merge_ats_client/models/remote_data.rb +234 -0
  181. data/lib/merge_ats_client/models/remote_data_request.rb +234 -0
  182. data/lib/merge_ats_client/models/remote_key.rb +238 -0
  183. data/lib/merge_ats_client/models/remote_key_for_regeneration.rb +224 -0
  184. data/lib/merge_ats_client/models/remote_key_for_regeneration_request.rb +224 -0
  185. data/lib/merge_ats_client/models/remote_response.rb +279 -0
  186. data/lib/merge_ats_client/models/remote_user.rb +323 -0
  187. data/lib/merge_ats_client/models/scheduled_interview.rb +352 -0
  188. data/lib/merge_ats_client/models/scheduled_interview_status_enum.rb +36 -0
  189. data/lib/merge_ats_client/models/scorecard.rb +308 -0
  190. data/lib/merge_ats_client/models/sync_status.rb +294 -0
  191. data/lib/merge_ats_client/models/tag.rb +244 -0
  192. data/lib/merge_ats_client/models/url.rb +247 -0
  193. data/lib/merge_ats_client/models/url_request.rb +247 -0
  194. data/lib/merge_ats_client/models/url_type_enum.rb +39 -0
  195. data/lib/merge_ats_client/models/veteran_status_enum.rb +36 -0
  196. data/lib/merge_ats_client/models/visibility_enum.rb +36 -0
  197. data/lib/merge_ats_client/version.rb +15 -0
  198. data/merge_ats_client-1.0.0.gem +0 -0
  199. data/merge_ats_client.gemspec +38 -0
  200. data/pull_request_template.md +22 -0
  201. data/spec/api/account_token_api_spec.rb +46 -0
  202. data/spec/api/activities_api_spec.rb +68 -0
  203. data/spec/api/applications_api_spec.rb +72 -0
  204. data/spec/api/attachments_api_spec.rb +66 -0
  205. data/spec/api/available_actions_api_spec.rb +46 -0
  206. data/spec/api/candidates_api_spec.rb +67 -0
  207. data/spec/api/departments_api_spec.rb +65 -0
  208. data/spec/api/eeocs_api_spec.rb +68 -0
  209. data/spec/api/interviews_api_spec.rb +70 -0
  210. data/spec/api/job_interview_stages_api_spec.rb +68 -0
  211. data/spec/api/jobs_api_spec.rb +67 -0
  212. data/spec/api/link_token_api_spec.rb +46 -0
  213. data/spec/api/offers_api_spec.rb +69 -0
  214. data/spec/api/offices_api_spec.rb +65 -0
  215. data/spec/api/passthrough_api_spec.rb +47 -0
  216. data/spec/api/regenerate_key_api_spec.rb +48 -0
  217. data/spec/api/reject_reasons_api_spec.rb +65 -0
  218. data/spec/api/scorecards_api_spec.rb +70 -0
  219. data/spec/api/sync_status_api_spec.rb +45 -0
  220. data/spec/api/tags_api_spec.rb +53 -0
  221. data/spec/api/users_api_spec.rb +65 -0
  222. data/spec/api_client_spec.rb +226 -0
  223. data/spec/configuration_spec.rb +42 -0
  224. data/spec/models/access_role_enum_spec.rb +28 -0
  225. data/spec/models/account_integration_spec.rb +58 -0
  226. data/spec/models/account_token_spec.rb +34 -0
  227. data/spec/models/activity_spec.rb +76 -0
  228. data/spec/models/activity_type_enum_spec.rb +28 -0
  229. data/spec/models/application_request_spec.rb +82 -0
  230. data/spec/models/application_spec.rb +94 -0
  231. data/spec/models/attachment_spec.rb +52 -0
  232. data/spec/models/available_actions_spec.rb +46 -0
  233. data/spec/models/candidate_request_spec.rb +118 -0
  234. data/spec/models/candidate_spec.rb +136 -0
  235. data/spec/models/data_passthrough_request_spec.rb +58 -0
  236. data/spec/models/data_passthrough_spec.rb +52 -0
  237. data/spec/models/department_spec.rb +46 -0
  238. data/spec/models/disability_status_enum_spec.rb +28 -0
  239. data/spec/models/eeoc_spec.rb +76 -0
  240. data/spec/models/email_address_request_spec.rb +40 -0
  241. data/spec/models/email_address_spec.rb +40 -0
  242. data/spec/models/email_address_type_enum_spec.rb +28 -0
  243. data/spec/models/end_user_details_request_spec.rb +56 -0
  244. data/spec/models/end_user_details_spec.rb +56 -0
  245. data/spec/models/gender_enum_spec.rb +28 -0
  246. data/spec/models/generate_remote_key_request_spec.rb +34 -0
  247. data/spec/models/job_interview_stage_spec.rb +52 -0
  248. data/spec/models/job_spec.rb +88 -0
  249. data/spec/models/job_status_enum_spec.rb +28 -0
  250. data/spec/models/link_token_spec.rb +40 -0
  251. data/spec/models/method_enum_spec.rb +28 -0
  252. data/spec/models/model_operation_spec.rb +40 -0
  253. data/spec/models/offer_spec.rb +82 -0
  254. data/spec/models/offer_status_enum_spec.rb +28 -0
  255. data/spec/models/office_spec.rb +52 -0
  256. data/spec/models/overall_recommendation_enum_spec.rb +28 -0
  257. data/spec/models/paginated_activity_list_spec.rb +46 -0
  258. data/spec/models/paginated_application_list_spec.rb +46 -0
  259. data/spec/models/paginated_attachment_list_spec.rb +46 -0
  260. data/spec/models/paginated_candidate_list_spec.rb +46 -0
  261. data/spec/models/paginated_department_list_spec.rb +46 -0
  262. data/spec/models/paginated_eeoc_list_spec.rb +46 -0
  263. data/spec/models/paginated_job_interview_stage_list_spec.rb +46 -0
  264. data/spec/models/paginated_job_list_spec.rb +46 -0
  265. data/spec/models/paginated_offer_list_spec.rb +46 -0
  266. data/spec/models/paginated_office_list_spec.rb +46 -0
  267. data/spec/models/paginated_reject_reason_list_spec.rb +46 -0
  268. data/spec/models/paginated_remote_user_list_spec.rb +46 -0
  269. data/spec/models/paginated_scheduled_interview_list_spec.rb +46 -0
  270. data/spec/models/paginated_scorecard_list_spec.rb +46 -0
  271. data/spec/models/paginated_tag_list_spec.rb +46 -0
  272. data/spec/models/patched_application_request_spec.rb +82 -0
  273. data/spec/models/phone_number_request_spec.rb +40 -0
  274. data/spec/models/phone_number_spec.rb +40 -0
  275. data/spec/models/phone_number_type_enum_spec.rb +28 -0
  276. data/spec/models/race_enum_spec.rb +28 -0
  277. data/spec/models/reject_reason_spec.rb +46 -0
  278. data/spec/models/remote_data_spec.rb +40 -0
  279. data/spec/models/remote_key_for_regeneration_request_spec.rb +34 -0
  280. data/spec/models/remote_key_for_regeneration_spec.rb +34 -0
  281. data/spec/models/remote_key_spec.rb +40 -0
  282. data/spec/models/remote_response_spec.rb +58 -0
  283. data/spec/models/remote_user_spec.rb +76 -0
  284. data/spec/models/scheduled_interview_spec.rb +100 -0
  285. data/spec/models/scheduled_interview_status_enum_spec.rb +28 -0
  286. data/spec/models/scorecard_spec.rb +76 -0
  287. data/spec/models/sync_status_spec.rb +64 -0
  288. data/spec/models/tag_spec.rb +40 -0
  289. data/spec/models/url_request_spec.rb +40 -0
  290. data/spec/models/url_spec.rb +40 -0
  291. data/spec/models/url_type_enum_spec.rb +28 -0
  292. data/spec/models/veteran_status_enum_spec.rb +28 -0
  293. data/spec/models/visibility_enum_spec.rb +28 -0
  294. data/spec/spec_helper.rb +111 -0
  295. data/test_ats.rb +22 -0
  296. data/test_signature.rb +32 -0
  297. metadata +473 -0
@@ -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.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MergeATSClient
17
+ # # The RemoteUser Object ### Description The `RemoteUser` object is used to represent a third party user. ### Usage Example Fetch from the `LIST RemoteUsers` endpoint to show all users for a third party.
18
+ class RemoteUser
19
+ attr_accessor :id
20
+
21
+ # The third-party API ID of the matching object.
22
+ attr_accessor :remote_id
23
+
24
+ # The user's first name.
25
+ attr_accessor :first_name
26
+
27
+ # The user's last name.
28
+ attr_accessor :last_name
29
+
30
+ # The user's email.
31
+ attr_accessor :email
32
+
33
+ # Whether the user's account had been disabled.
34
+ attr_accessor :disabled
35
+
36
+ # When the third party's user was created.
37
+ attr_accessor :remote_created_at
38
+
39
+ # The user's role.
40
+ attr_accessor :access_role
41
+
42
+ attr_accessor :remote_data
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'id' => :'id',
48
+ :'remote_id' => :'remote_id',
49
+ :'first_name' => :'first_name',
50
+ :'last_name' => :'last_name',
51
+ :'email' => :'email',
52
+ :'disabled' => :'disabled',
53
+ :'remote_created_at' => :'remote_created_at',
54
+ :'access_role' => :'access_role',
55
+ :'remote_data' => :'remote_data'
56
+ }
57
+ end
58
+
59
+ # Returns all the JSON keys this model knows about
60
+ def self.acceptable_attributes
61
+ attribute_map.values
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.openapi_types
66
+ {
67
+ :'id' => :'String',
68
+ :'remote_id' => :'String',
69
+ :'first_name' => :'String',
70
+ :'last_name' => :'String',
71
+ :'email' => :'String',
72
+ :'disabled' => :'Boolean',
73
+ :'remote_created_at' => :'Time',
74
+ :'access_role' => :'AccessRoleEnum',
75
+ :'remote_data' => :'Array<RemoteData>'
76
+ }
77
+ end
78
+
79
+ # List of attributes with nullable: true
80
+ def self.openapi_nullable
81
+ Set.new([
82
+ :'remote_id',
83
+ :'first_name',
84
+ :'last_name',
85
+ :'email',
86
+ :'disabled',
87
+ :'remote_created_at',
88
+ :'access_role',
89
+ :'remote_data'
90
+ ])
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ def initialize(attributes = {})
96
+ if (!attributes.is_a?(Hash))
97
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::RemoteUser` initialize method"
98
+ end
99
+
100
+ # check to see if the attribute exists and convert string to symbol for hash key
101
+ attributes = attributes.each_with_object({}) { |(k, v), h|
102
+ if (!self.class.attribute_map.key?(k.to_sym))
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::RemoteUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
107
+
108
+ if attributes.key?(:'id')
109
+ self.id = attributes[:'id']
110
+ end
111
+
112
+ if attributes.key?(:'remote_id')
113
+ self.remote_id = attributes[:'remote_id']
114
+ end
115
+
116
+ if attributes.key?(:'first_name')
117
+ self.first_name = attributes[:'first_name']
118
+ end
119
+
120
+ if attributes.key?(:'last_name')
121
+ self.last_name = attributes[:'last_name']
122
+ end
123
+
124
+ if attributes.key?(:'email')
125
+ self.email = attributes[:'email']
126
+ end
127
+
128
+ if attributes.key?(:'disabled')
129
+ self.disabled = attributes[:'disabled']
130
+ end
131
+
132
+ if attributes.key?(:'remote_created_at')
133
+ self.remote_created_at = attributes[:'remote_created_at']
134
+ end
135
+
136
+ if attributes.key?(:'access_role')
137
+ self.access_role = attributes[:'access_role']
138
+ end
139
+
140
+ if attributes.key?(:'remote_data')
141
+ if (value = attributes[:'remote_data']).is_a?(Array)
142
+ self.remote_data = value
143
+ end
144
+ end
145
+ end
146
+
147
+ # Show invalid properties with the reasons. Usually used together with valid?
148
+ # @return Array for valid properties with the reasons
149
+ def list_invalid_properties
150
+ invalid_properties = Array.new
151
+ if !@email.nil? && @email.to_s.length > 254
152
+ invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 254.')
153
+ end
154
+
155
+ invalid_properties
156
+ end
157
+
158
+ # Check to see if the all the properties in the model are valid
159
+ # @return true if the model is valid
160
+ def valid?
161
+ return false if !@email.nil? && @email.to_s.length > 254
162
+ true
163
+ end
164
+
165
+ # Custom attribute writer method with validation
166
+ # @param [Object] email Value to be assigned
167
+ def email=(email)
168
+ if !email.nil? && email.to_s.length > 254
169
+ fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 254.'
170
+ end
171
+
172
+ @email = email
173
+ end
174
+
175
+ # Checks equality by comparing each attribute.
176
+ # @param [Object] Object to be compared
177
+ def ==(o)
178
+ return true if self.equal?(o)
179
+ self.class == o.class &&
180
+ id == o.id &&
181
+ remote_id == o.remote_id &&
182
+ first_name == o.first_name &&
183
+ last_name == o.last_name &&
184
+ email == o.email &&
185
+ disabled == o.disabled &&
186
+ remote_created_at == o.remote_created_at &&
187
+ access_role == o.access_role &&
188
+ remote_data == o.remote_data
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
+ [id, remote_id, first_name, last_name, email, disabled, remote_created_at, access_role, remote_data].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.to_s
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
@@ -0,0 +1,352 @@
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.0.0
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 an interview ### Usage Example Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations.
18
+ class ScheduledInterview
19
+ attr_accessor :id
20
+
21
+ # The third-party API ID of the matching object.
22
+ attr_accessor :remote_id
23
+
24
+ # The application being interviewed.
25
+ attr_accessor :application
26
+
27
+ # The stage of the interview.
28
+ attr_accessor :job_interview_stage
29
+
30
+ # The user organizing the interview.
31
+ attr_accessor :organizer
32
+
33
+ attr_accessor :interviewers
34
+
35
+ # The interview's location.
36
+ attr_accessor :location
37
+
38
+ # When the interview was started.
39
+ attr_accessor :start_at
40
+
41
+ # When the interview was ended.
42
+ attr_accessor :end_at
43
+
44
+ # When the third party's interview was created.
45
+ attr_accessor :remote_created_at
46
+
47
+ # When the third party's interview was updated.
48
+ attr_accessor :remote_updated_at
49
+
50
+ # The interview's status.
51
+ attr_accessor :status
52
+
53
+ attr_accessor :remote_data
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'id' => :'id',
59
+ :'remote_id' => :'remote_id',
60
+ :'application' => :'application',
61
+ :'job_interview_stage' => :'job_interview_stage',
62
+ :'organizer' => :'organizer',
63
+ :'interviewers' => :'interviewers',
64
+ :'location' => :'location',
65
+ :'start_at' => :'start_at',
66
+ :'end_at' => :'end_at',
67
+ :'remote_created_at' => :'remote_created_at',
68
+ :'remote_updated_at' => :'remote_updated_at',
69
+ :'status' => :'status',
70
+ :'remote_data' => :'remote_data'
71
+ }
72
+ end
73
+
74
+ # Returns all the JSON keys this model knows about
75
+ def self.acceptable_attributes
76
+ attribute_map.values
77
+ end
78
+
79
+ # Attribute type mapping.
80
+ def self.openapi_types
81
+ {
82
+ :'id' => :'String',
83
+ :'remote_id' => :'String',
84
+ :'application' => :'String',
85
+ :'job_interview_stage' => :'String',
86
+ :'organizer' => :'String',
87
+ :'interviewers' => :'Array<String>',
88
+ :'location' => :'String',
89
+ :'start_at' => :'Time',
90
+ :'end_at' => :'Time',
91
+ :'remote_created_at' => :'Time',
92
+ :'remote_updated_at' => :'Time',
93
+ :'status' => :'ScheduledInterviewStatusEnum',
94
+ :'remote_data' => :'Array<RemoteData>'
95
+ }
96
+ end
97
+
98
+ # List of attributes with nullable: true
99
+ def self.openapi_nullable
100
+ Set.new([
101
+ :'remote_id',
102
+ :'application',
103
+ :'job_interview_stage',
104
+ :'organizer',
105
+ :'location',
106
+ :'start_at',
107
+ :'end_at',
108
+ :'remote_created_at',
109
+ :'remote_updated_at',
110
+ :'status',
111
+ :'remote_data'
112
+ ])
113
+ end
114
+
115
+ # Initializes the object
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ def initialize(attributes = {})
118
+ if (!attributes.is_a?(Hash))
119
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::ScheduledInterview` initialize method"
120
+ end
121
+
122
+ # check to see if the attribute exists and convert string to symbol for hash key
123
+ attributes = attributes.each_with_object({}) { |(k, v), h|
124
+ if (!self.class.attribute_map.key?(k.to_sym))
125
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::ScheduledInterview`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
126
+ end
127
+ h[k.to_sym] = v
128
+ }
129
+
130
+ if attributes.key?(:'id')
131
+ self.id = attributes[:'id']
132
+ end
133
+
134
+ if attributes.key?(:'remote_id')
135
+ self.remote_id = attributes[:'remote_id']
136
+ end
137
+
138
+ if attributes.key?(:'application')
139
+ self.application = attributes[:'application']
140
+ end
141
+
142
+ if attributes.key?(:'job_interview_stage')
143
+ self.job_interview_stage = attributes[:'job_interview_stage']
144
+ end
145
+
146
+ if attributes.key?(:'organizer')
147
+ self.organizer = attributes[:'organizer']
148
+ end
149
+
150
+ if attributes.key?(:'interviewers')
151
+ if (value = attributes[:'interviewers']).is_a?(Array)
152
+ self.interviewers = value
153
+ end
154
+ end
155
+
156
+ if attributes.key?(:'location')
157
+ self.location = attributes[:'location']
158
+ end
159
+
160
+ if attributes.key?(:'start_at')
161
+ self.start_at = attributes[:'start_at']
162
+ end
163
+
164
+ if attributes.key?(:'end_at')
165
+ self.end_at = attributes[:'end_at']
166
+ end
167
+
168
+ if attributes.key?(:'remote_created_at')
169
+ self.remote_created_at = attributes[:'remote_created_at']
170
+ end
171
+
172
+ if attributes.key?(:'remote_updated_at')
173
+ self.remote_updated_at = attributes[:'remote_updated_at']
174
+ end
175
+
176
+ if attributes.key?(:'status')
177
+ self.status = attributes[:'status']
178
+ end
179
+
180
+ if attributes.key?(:'remote_data')
181
+ if (value = attributes[:'remote_data']).is_a?(Array)
182
+ self.remote_data = value
183
+ end
184
+ end
185
+ end
186
+
187
+ # Show invalid properties with the reasons. Usually used together with valid?
188
+ # @return Array for valid properties with the reasons
189
+ def list_invalid_properties
190
+ invalid_properties = Array.new
191
+ invalid_properties
192
+ end
193
+
194
+ # Check to see if the all the properties in the model are valid
195
+ # @return true if the model is valid
196
+ def valid?
197
+ true
198
+ end
199
+
200
+ # Checks equality by comparing each attribute.
201
+ # @param [Object] Object to be compared
202
+ def ==(o)
203
+ return true if self.equal?(o)
204
+ self.class == o.class &&
205
+ id == o.id &&
206
+ remote_id == o.remote_id &&
207
+ application == o.application &&
208
+ job_interview_stage == o.job_interview_stage &&
209
+ organizer == o.organizer &&
210
+ interviewers == o.interviewers &&
211
+ location == o.location &&
212
+ start_at == o.start_at &&
213
+ end_at == o.end_at &&
214
+ remote_created_at == o.remote_created_at &&
215
+ remote_updated_at == o.remote_updated_at &&
216
+ status == o.status &&
217
+ remote_data == o.remote_data
218
+ end
219
+
220
+ # @see the `==` method
221
+ # @param [Object] Object to be compared
222
+ def eql?(o)
223
+ self == o
224
+ end
225
+
226
+ # Calculates hash code according to all attributes.
227
+ # @return [Integer] Hash code
228
+ def hash
229
+ [id, remote_id, application, job_interview_stage, organizer, interviewers, location, start_at, end_at, remote_created_at, remote_updated_at, status, remote_data].hash
230
+ end
231
+
232
+ # Builds the object from hash
233
+ # @param [Hash] attributes Model attributes in the form of hash
234
+ # @return [Object] Returns the model itself
235
+ def self.build_from_hash(attributes)
236
+ new.build_from_hash(attributes)
237
+ end
238
+
239
+ # Builds the object from hash
240
+ # @param [Hash] attributes Model attributes in the form of hash
241
+ # @return [Object] Returns the model itself
242
+ def build_from_hash(attributes)
243
+ return nil unless attributes.is_a?(Hash)
244
+ self.class.openapi_types.each_pair do |key, type|
245
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
246
+ self.send("#{key}=", nil)
247
+ elsif type =~ /\AArray<(.*)>/i
248
+ # check to ensure the input is an array given that the attribute
249
+ # is documented as an array but the input is not
250
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
251
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
252
+ end
253
+ elsif !attributes[self.class.attribute_map[key]].nil?
254
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
255
+ end
256
+ end
257
+
258
+ self
259
+ end
260
+
261
+ # Deserializes the data based on type
262
+ # @param string type Data type
263
+ # @param string value Value to be deserialized
264
+ # @return [Object] Deserialized data
265
+ def _deserialize(type, value)
266
+ case type.to_sym
267
+ when :Time
268
+ Time.parse(value)
269
+ when :Date
270
+ Date.parse(value)
271
+ when :String
272
+ value.to_s
273
+ when :Integer
274
+ value.to_i
275
+ when :Float
276
+ value.to_f
277
+ when :Boolean
278
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
279
+ true
280
+ else
281
+ false
282
+ end
283
+ when :Object
284
+ # generic object (usually a Hash), return directly
285
+ value
286
+ when /\AArray<(?<inner_type>.+)>\z/
287
+ inner_type = Regexp.last_match[:inner_type]
288
+ value.map { |v| _deserialize(inner_type, v) }
289
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
290
+ k_type = Regexp.last_match[:k_type]
291
+ v_type = Regexp.last_match[:v_type]
292
+ {}.tap do |hash|
293
+ value.each do |k, v|
294
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
295
+ end
296
+ end
297
+ else # model
298
+ # models (e.g. Pet) or oneOf
299
+ klass = MergeATSClient.const_get(type)
300
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
301
+ end
302
+ end
303
+
304
+ # Returns the string representation of the object
305
+ # @return [String] String presentation of the object
306
+ def to_s
307
+ to_hash.to_s
308
+ end
309
+
310
+ # to_body is an alias to to_hash (backward compatibility)
311
+ # @return [Hash] Returns the object in the form of hash
312
+ def to_body
313
+ to_hash
314
+ end
315
+
316
+ # Returns the object in the form of hash
317
+ # @return [Hash] Returns the object in the form of hash
318
+ def to_hash
319
+ hash = {}
320
+ self.class.attribute_map.each_pair do |attr, param|
321
+ value = self.send(attr)
322
+ if value.nil?
323
+ is_nullable = self.class.openapi_nullable.include?(attr)
324
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
325
+ end
326
+
327
+ hash[param] = _to_hash(value)
328
+ end
329
+ hash
330
+ end
331
+
332
+ # Outputs non-array value in the form of hash
333
+ # For object, use to_hash. Otherwise, just return the value
334
+ # @param [Object] value Any valid value
335
+ # @return [Hash] Returns the value in the form of hash
336
+ def _to_hash(value)
337
+ if value.is_a?(Array)
338
+ value.compact.map { |v| _to_hash(v) }
339
+ elsif value.is_a?(Hash)
340
+ {}.tap do |hash|
341
+ value.each { |k, v| hash[k] = _to_hash(v) }
342
+ end
343
+ elsif value.respond_to? :to_hash
344
+ value.to_hash
345
+ else
346
+ value
347
+ end
348
+ end
349
+
350
+ end
351
+
352
+ end