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,36 @@
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
+ class ActivityTypeEnum
18
+ NOTE = "NOTE".freeze
19
+ EMAIL = "EMAIL".freeze
20
+ OTHER = "OTHER".freeze
21
+
22
+ # Builds the enum from string
23
+ # @param [String] The enum value in the form of the string
24
+ # @return [String] The enum value
25
+ def self.build_from_hash(value)
26
+ new.build_from_hash(value)
27
+ end
28
+
29
+ # Builds the enum from string
30
+ # @param [String] The enum value in the form of the string
31
+ # @return [String] The enum value
32
+ def build_from_hash(value)
33
+ value
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,330 @@
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 Application Object ### Description The `Application` object is used to represent an Application for a job position. ### Usage Example Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications.
18
+ class Application
19
+ attr_accessor :id
20
+
21
+ # The third-party API ID of the matching object.
22
+ attr_accessor :remote_id
23
+
24
+ # The candidate applying.
25
+ attr_accessor :candidate
26
+
27
+ # The job being applied for.
28
+ attr_accessor :job
29
+
30
+ # When the application was submitted.
31
+ attr_accessor :applied_at
32
+
33
+ # When the application was rejected.
34
+ attr_accessor :rejected_at
35
+
36
+ # The application's source.
37
+ attr_accessor :source
38
+
39
+ # The user credited for this application.
40
+ attr_accessor :credited_to
41
+
42
+ # The application's current stage.
43
+ attr_accessor :current_stage
44
+
45
+ # The application's reason for rejection.
46
+ attr_accessor :reject_reason
47
+
48
+ attr_accessor :remote_data
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'id' => :'id',
54
+ :'remote_id' => :'remote_id',
55
+ :'candidate' => :'candidate',
56
+ :'job' => :'job',
57
+ :'applied_at' => :'applied_at',
58
+ :'rejected_at' => :'rejected_at',
59
+ :'source' => :'source',
60
+ :'credited_to' => :'credited_to',
61
+ :'current_stage' => :'current_stage',
62
+ :'reject_reason' => :'reject_reason',
63
+ :'remote_data' => :'remote_data'
64
+ }
65
+ end
66
+
67
+ # Returns all the JSON keys this model knows about
68
+ def self.acceptable_attributes
69
+ attribute_map.values
70
+ end
71
+
72
+ # Attribute type mapping.
73
+ def self.openapi_types
74
+ {
75
+ :'id' => :'String',
76
+ :'remote_id' => :'String',
77
+ :'candidate' => :'String',
78
+ :'job' => :'String',
79
+ :'applied_at' => :'Time',
80
+ :'rejected_at' => :'Time',
81
+ :'source' => :'String',
82
+ :'credited_to' => :'String',
83
+ :'current_stage' => :'String',
84
+ :'reject_reason' => :'String',
85
+ :'remote_data' => :'Array<RemoteData>'
86
+ }
87
+ end
88
+
89
+ # List of attributes with nullable: true
90
+ def self.openapi_nullable
91
+ Set.new([
92
+ :'remote_id',
93
+ :'candidate',
94
+ :'job',
95
+ :'applied_at',
96
+ :'rejected_at',
97
+ :'source',
98
+ :'credited_to',
99
+ :'current_stage',
100
+ :'reject_reason',
101
+ :'remote_data'
102
+ ])
103
+ end
104
+
105
+ # Initializes the object
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ def initialize(attributes = {})
108
+ if (!attributes.is_a?(Hash))
109
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::Application` initialize method"
110
+ end
111
+
112
+ # check to see if the attribute exists and convert string to symbol for hash key
113
+ attributes = attributes.each_with_object({}) { |(k, v), h|
114
+ if (!self.class.attribute_map.key?(k.to_sym))
115
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::Application`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
116
+ end
117
+ h[k.to_sym] = v
118
+ }
119
+
120
+ if attributes.key?(:'id')
121
+ self.id = attributes[:'id']
122
+ end
123
+
124
+ if attributes.key?(:'remote_id')
125
+ self.remote_id = attributes[:'remote_id']
126
+ end
127
+
128
+ if attributes.key?(:'candidate')
129
+ self.candidate = attributes[:'candidate']
130
+ end
131
+
132
+ if attributes.key?(:'job')
133
+ self.job = attributes[:'job']
134
+ end
135
+
136
+ if attributes.key?(:'applied_at')
137
+ self.applied_at = attributes[:'applied_at']
138
+ end
139
+
140
+ if attributes.key?(:'rejected_at')
141
+ self.rejected_at = attributes[:'rejected_at']
142
+ end
143
+
144
+ if attributes.key?(:'source')
145
+ self.source = attributes[:'source']
146
+ end
147
+
148
+ if attributes.key?(:'credited_to')
149
+ self.credited_to = attributes[:'credited_to']
150
+ end
151
+
152
+ if attributes.key?(:'current_stage')
153
+ self.current_stage = attributes[:'current_stage']
154
+ end
155
+
156
+ if attributes.key?(:'reject_reason')
157
+ self.reject_reason = attributes[:'reject_reason']
158
+ end
159
+
160
+ if attributes.key?(:'remote_data')
161
+ if (value = attributes[:'remote_data']).is_a?(Array)
162
+ self.remote_data = value
163
+ end
164
+ end
165
+ end
166
+
167
+ # Show invalid properties with the reasons. Usually used together with valid?
168
+ # @return Array for valid properties with the reasons
169
+ def list_invalid_properties
170
+ invalid_properties = Array.new
171
+ invalid_properties
172
+ end
173
+
174
+ # Check to see if the all the properties in the model are valid
175
+ # @return true if the model is valid
176
+ def valid?
177
+ true
178
+ end
179
+
180
+ # Checks equality by comparing each attribute.
181
+ # @param [Object] Object to be compared
182
+ def ==(o)
183
+ return true if self.equal?(o)
184
+ self.class == o.class &&
185
+ id == o.id &&
186
+ remote_id == o.remote_id &&
187
+ candidate == o.candidate &&
188
+ job == o.job &&
189
+ applied_at == o.applied_at &&
190
+ rejected_at == o.rejected_at &&
191
+ source == o.source &&
192
+ credited_to == o.credited_to &&
193
+ current_stage == o.current_stage &&
194
+ reject_reason == o.reject_reason &&
195
+ remote_data == o.remote_data
196
+ end
197
+
198
+ # @see the `==` method
199
+ # @param [Object] Object to be compared
200
+ def eql?(o)
201
+ self == o
202
+ end
203
+
204
+ # Calculates hash code according to all attributes.
205
+ # @return [Integer] Hash code
206
+ def hash
207
+ [id, remote_id, candidate, job, applied_at, rejected_at, source, credited_to, current_stage, reject_reason, remote_data].hash
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 self.build_from_hash(attributes)
214
+ new.build_from_hash(attributes)
215
+ end
216
+
217
+ # Builds the object from hash
218
+ # @param [Hash] attributes Model attributes in the form of hash
219
+ # @return [Object] Returns the model itself
220
+ def build_from_hash(attributes)
221
+ return nil unless attributes.is_a?(Hash)
222
+ self.class.openapi_types.each_pair do |key, type|
223
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
224
+ self.send("#{key}=", nil)
225
+ elsif type =~ /\AArray<(.*)>/i
226
+ # check to ensure the input is an array given that the attribute
227
+ # is documented as an array but the input is not
228
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
229
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
230
+ end
231
+ elsif !attributes[self.class.attribute_map[key]].nil?
232
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
233
+ end
234
+ end
235
+
236
+ self
237
+ end
238
+
239
+ # Deserializes the data based on type
240
+ # @param string type Data type
241
+ # @param string value Value to be deserialized
242
+ # @return [Object] Deserialized data
243
+ def _deserialize(type, value)
244
+ case type.to_sym
245
+ when :Time
246
+ Time.parse(value)
247
+ when :Date
248
+ Date.parse(value)
249
+ when :String
250
+ value.to_s
251
+ when :Integer
252
+ value.to_i
253
+ when :Float
254
+ value.to_f
255
+ when :Boolean
256
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
257
+ true
258
+ else
259
+ false
260
+ end
261
+ when :Object
262
+ # generic object (usually a Hash), return directly
263
+ value
264
+ when /\AArray<(?<inner_type>.+)>\z/
265
+ inner_type = Regexp.last_match[:inner_type]
266
+ value.map { |v| _deserialize(inner_type, v) }
267
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
268
+ k_type = Regexp.last_match[:k_type]
269
+ v_type = Regexp.last_match[:v_type]
270
+ {}.tap do |hash|
271
+ value.each do |k, v|
272
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
273
+ end
274
+ end
275
+ else # model
276
+ # models (e.g. Pet) or oneOf
277
+ klass = MergeATSClient.const_get(type)
278
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
279
+ end
280
+ end
281
+
282
+ # Returns the string representation of the object
283
+ # @return [String] String presentation of the object
284
+ def to_s
285
+ to_hash.to_s
286
+ end
287
+
288
+ # to_body is an alias to to_hash (backward compatibility)
289
+ # @return [Hash] Returns the object in the form of hash
290
+ def to_body
291
+ to_hash
292
+ end
293
+
294
+ # Returns the object in the form of hash
295
+ # @return [Hash] Returns the object in the form of hash
296
+ def to_hash
297
+ hash = {}
298
+ self.class.attribute_map.each_pair do |attr, param|
299
+ value = self.send(attr)
300
+ if value.nil?
301
+ is_nullable = self.class.openapi_nullable.include?(attr)
302
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
303
+ end
304
+
305
+ hash[param] = _to_hash(value)
306
+ end
307
+ hash
308
+ end
309
+
310
+ # Outputs non-array value in the form of hash
311
+ # For object, use to_hash. Otherwise, just return the value
312
+ # @param [Object] value Any valid value
313
+ # @return [Hash] Returns the value in the form of hash
314
+ def _to_hash(value)
315
+ if value.is_a?(Array)
316
+ value.compact.map { |v| _to_hash(v) }
317
+ elsif value.is_a?(Hash)
318
+ {}.tap do |hash|
319
+ value.each { |k, v| hash[k] = _to_hash(v) }
320
+ end
321
+ elsif value.respond_to? :to_hash
322
+ value.to_hash
323
+ else
324
+ value
325
+ end
326
+ end
327
+
328
+ end
329
+
330
+ end
@@ -0,0 +1,309 @@
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 Application Object ### Description The `Application` object is used to represent an Application for a job position. ### Usage Example Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications.
18
+ class ApplicationRequest
19
+ # The third-party API ID of the matching object.
20
+ attr_accessor :remote_id
21
+
22
+ # The candidate applying.
23
+ attr_accessor :candidate
24
+
25
+ # The job being applied for.
26
+ attr_accessor :job
27
+
28
+ # When the application was submitted.
29
+ attr_accessor :applied_at
30
+
31
+ # When the application was rejected.
32
+ attr_accessor :rejected_at
33
+
34
+ # The application's source.
35
+ attr_accessor :source
36
+
37
+ # The user credited for this application.
38
+ attr_accessor :credited_to
39
+
40
+ # The application's current stage.
41
+ attr_accessor :current_stage
42
+
43
+ # The application's reason for rejection.
44
+ attr_accessor :reject_reason
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'remote_id' => :'remote_id',
50
+ :'candidate' => :'candidate',
51
+ :'job' => :'job',
52
+ :'applied_at' => :'applied_at',
53
+ :'rejected_at' => :'rejected_at',
54
+ :'source' => :'source',
55
+ :'credited_to' => :'credited_to',
56
+ :'current_stage' => :'current_stage',
57
+ :'reject_reason' => :'reject_reason'
58
+ }
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'remote_id' => :'String',
70
+ :'candidate' => :'String',
71
+ :'job' => :'String',
72
+ :'applied_at' => :'Time',
73
+ :'rejected_at' => :'Time',
74
+ :'source' => :'String',
75
+ :'credited_to' => :'String',
76
+ :'current_stage' => :'String',
77
+ :'reject_reason' => :'String'
78
+ }
79
+ end
80
+
81
+ # List of attributes with nullable: true
82
+ def self.openapi_nullable
83
+ Set.new([
84
+ :'remote_id',
85
+ :'candidate',
86
+ :'job',
87
+ :'applied_at',
88
+ :'rejected_at',
89
+ :'source',
90
+ :'credited_to',
91
+ :'current_stage',
92
+ :'reject_reason'
93
+ ])
94
+ end
95
+
96
+ # Initializes the object
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ def initialize(attributes = {})
99
+ if (!attributes.is_a?(Hash))
100
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::ApplicationRequest` initialize method"
101
+ end
102
+
103
+ # check to see if the attribute exists and convert string to symbol for hash key
104
+ attributes = attributes.each_with_object({}) { |(k, v), h|
105
+ if (!self.class.attribute_map.key?(k.to_sym))
106
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::ApplicationRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
107
+ end
108
+ h[k.to_sym] = v
109
+ }
110
+
111
+ if attributes.key?(:'remote_id')
112
+ self.remote_id = attributes[:'remote_id']
113
+ end
114
+
115
+ if attributes.key?(:'candidate')
116
+ self.candidate = attributes[:'candidate']
117
+ end
118
+
119
+ if attributes.key?(:'job')
120
+ self.job = attributes[:'job']
121
+ end
122
+
123
+ if attributes.key?(:'applied_at')
124
+ self.applied_at = attributes[:'applied_at']
125
+ end
126
+
127
+ if attributes.key?(:'rejected_at')
128
+ self.rejected_at = attributes[:'rejected_at']
129
+ end
130
+
131
+ if attributes.key?(:'source')
132
+ self.source = attributes[:'source']
133
+ end
134
+
135
+ if attributes.key?(:'credited_to')
136
+ self.credited_to = attributes[:'credited_to']
137
+ end
138
+
139
+ if attributes.key?(:'current_stage')
140
+ self.current_stage = attributes[:'current_stage']
141
+ end
142
+
143
+ if attributes.key?(:'reject_reason')
144
+ self.reject_reason = attributes[:'reject_reason']
145
+ end
146
+ end
147
+
148
+ # Show invalid properties with the reasons. Usually used together with valid?
149
+ # @return Array for valid properties with the reasons
150
+ def list_invalid_properties
151
+ invalid_properties = Array.new
152
+ invalid_properties
153
+ end
154
+
155
+ # Check to see if the all the properties in the model are valid
156
+ # @return true if the model is valid
157
+ def valid?
158
+ true
159
+ end
160
+
161
+ # Checks equality by comparing each attribute.
162
+ # @param [Object] Object to be compared
163
+ def ==(o)
164
+ return true if self.equal?(o)
165
+ self.class == o.class &&
166
+ remote_id == o.remote_id &&
167
+ candidate == o.candidate &&
168
+ job == o.job &&
169
+ applied_at == o.applied_at &&
170
+ rejected_at == o.rejected_at &&
171
+ source == o.source &&
172
+ credited_to == o.credited_to &&
173
+ current_stage == o.current_stage &&
174
+ reject_reason == o.reject_reason
175
+ end
176
+
177
+ # @see the `==` method
178
+ # @param [Object] Object to be compared
179
+ def eql?(o)
180
+ self == o
181
+ end
182
+
183
+ # Calculates hash code according to all attributes.
184
+ # @return [Integer] Hash code
185
+ def hash
186
+ [remote_id, candidate, job, applied_at, rejected_at, source, credited_to, current_stage, reject_reason].hash
187
+ end
188
+
189
+ # Builds the object from hash
190
+ # @param [Hash] attributes Model attributes in the form of hash
191
+ # @return [Object] Returns the model itself
192
+ def self.build_from_hash(attributes)
193
+ new.build_from_hash(attributes)
194
+ end
195
+
196
+ # Builds the object from hash
197
+ # @param [Hash] attributes Model attributes in the form of hash
198
+ # @return [Object] Returns the model itself
199
+ def build_from_hash(attributes)
200
+ return nil unless attributes.is_a?(Hash)
201
+ self.class.openapi_types.each_pair do |key, type|
202
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
203
+ self.send("#{key}=", nil)
204
+ elsif type =~ /\AArray<(.*)>/i
205
+ # check to ensure the input is an array given that the attribute
206
+ # is documented as an array but the input is not
207
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
208
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
209
+ end
210
+ elsif !attributes[self.class.attribute_map[key]].nil?
211
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
212
+ end
213
+ end
214
+
215
+ self
216
+ end
217
+
218
+ # Deserializes the data based on type
219
+ # @param string type Data type
220
+ # @param string value Value to be deserialized
221
+ # @return [Object] Deserialized data
222
+ def _deserialize(type, value)
223
+ case type.to_sym
224
+ when :Time
225
+ Time.parse(value)
226
+ when :Date
227
+ Date.parse(value)
228
+ when :String
229
+ value.to_s
230
+ when :Integer
231
+ value.to_i
232
+ when :Float
233
+ value.to_f
234
+ when :Boolean
235
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
236
+ true
237
+ else
238
+ false
239
+ end
240
+ when :Object
241
+ # generic object (usually a Hash), return directly
242
+ value
243
+ when /\AArray<(?<inner_type>.+)>\z/
244
+ inner_type = Regexp.last_match[:inner_type]
245
+ value.map { |v| _deserialize(inner_type, v) }
246
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
247
+ k_type = Regexp.last_match[:k_type]
248
+ v_type = Regexp.last_match[:v_type]
249
+ {}.tap do |hash|
250
+ value.each do |k, v|
251
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
252
+ end
253
+ end
254
+ else # model
255
+ # models (e.g. Pet) or oneOf
256
+ klass = MergeATSClient.const_get(type)
257
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
258
+ end
259
+ end
260
+
261
+ # Returns the string representation of the object
262
+ # @return [String] String presentation of the object
263
+ def to_s
264
+ to_hash.to_s
265
+ end
266
+
267
+ # to_body is an alias to to_hash (backward compatibility)
268
+ # @return [Hash] Returns the object in the form of hash
269
+ def to_body
270
+ to_hash
271
+ end
272
+
273
+ # Returns the object in the form of hash
274
+ # @return [Hash] Returns the object in the form of hash
275
+ def to_hash
276
+ hash = {}
277
+ self.class.attribute_map.each_pair do |attr, param|
278
+ value = self.send(attr)
279
+ if value.nil?
280
+ is_nullable = self.class.openapi_nullable.include?(attr)
281
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
282
+ end
283
+
284
+ hash[param] = _to_hash(value)
285
+ end
286
+ hash
287
+ end
288
+
289
+ # Outputs non-array value in the form of hash
290
+ # For object, use to_hash. Otherwise, just return the value
291
+ # @param [Object] value Any valid value
292
+ # @return [Hash] Returns the value in the form of hash
293
+ def _to_hash(value)
294
+ if value.is_a?(Array)
295
+ value.compact.map { |v| _to_hash(v) }
296
+ elsif value.is_a?(Hash)
297
+ {}.tap do |hash|
298
+ value.each { |k, v| hash[k] = _to_hash(v) }
299
+ end
300
+ elsif value.respond_to? :to_hash
301
+ value.to_hash
302
+ else
303
+ value
304
+ end
305
+ end
306
+
307
+ end
308
+
309
+ end