merge_ats_client 1.0.4 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (337) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -18
  3. data/docs/AccountDetails.md +13 -7
  4. data/docs/AccountDetailsAndActions.md +6 -0
  5. data/docs/AccountDetailsAndActionsIntegration.md +1 -1
  6. data/docs/AccountDetailsApi.md +10 -7
  7. data/docs/AccountIntegration.md +4 -4
  8. data/docs/AccountTokenApi.md +2 -2
  9. data/docs/ActivitiesApi.md +11 -5
  10. data/docs/Activity.md +4 -2
  11. data/docs/Application.md +8 -6
  12. data/docs/ApplicationEndpointRequest.md +20 -0
  13. data/docs/ApplicationRequest.md +12 -6
  14. data/docs/ApplicationResponse.md +24 -0
  15. data/docs/ApplicationsApi.md +180 -18
  16. data/docs/Attachment.md +3 -1
  17. data/docs/AttachmentEndpointRequest.md +20 -0
  18. data/docs/AttachmentRequest.md +5 -1
  19. data/docs/AttachmentResponse.md +24 -0
  20. data/docs/AttachmentsApi.md +98 -16
  21. data/docs/AvailableActionsApi.md +2 -2
  22. data/docs/Candidate.md +3 -1
  23. data/docs/CandidateEndpointRequest.md +20 -0
  24. data/docs/CandidateRequest.md +7 -1
  25. data/docs/CandidateResponse.md +24 -0
  26. data/docs/CandidatesApi.md +168 -22
  27. data/docs/DataPassthroughRequest.md +6 -2
  28. data/docs/DebugModeLog.md +22 -0
  29. data/docs/DebugModelLogSummary.md +22 -0
  30. data/docs/Department.md +3 -1
  31. data/docs/DepartmentsApi.md +6 -4
  32. data/docs/EEOC.md +4 -2
  33. data/docs/EeocsApi.md +11 -5
  34. data/docs/EncodingEnum.md +15 -0
  35. data/docs/EndUserDetailsRequest.md +10 -6
  36. data/docs/ErrorValidationProblem.md +24 -0
  37. data/docs/ForceResyncApi.md +79 -0
  38. data/docs/GenerateKeyApi.md +2 -2
  39. data/docs/IgnoreCommonModel.md +20 -0
  40. data/docs/IgnoreCommonModelRequest.md +20 -0
  41. data/docs/InterviewsApi.md +11 -85
  42. data/docs/IssuesApi.md +18 -10
  43. data/docs/Job.md +7 -1
  44. data/docs/JobInterviewStage.md +4 -2
  45. data/docs/JobInterviewStagesApi.md +8 -6
  46. data/docs/JobsApi.md +13 -6
  47. data/docs/LinkToken.md +3 -1
  48. data/docs/LinkTokenApi.md +3 -3
  49. data/docs/LinkedAccountStatus.md +20 -0
  50. data/docs/LinkedAccountsApi.md +24 -22
  51. data/docs/MetaResponse.md +24 -0
  52. data/docs/MultipartFormFieldRequest.md +26 -0
  53. data/docs/Offer.md +5 -3
  54. data/docs/OffersApi.md +11 -5
  55. data/docs/Office.md +3 -1
  56. data/docs/OfficesApi.md +6 -4
  57. data/docs/PassthroughApi.md +2 -2
  58. data/docs/ReasonEnum.md +15 -0
  59. data/docs/RegenerateKeyApi.md +2 -2
  60. data/docs/RejectReason.md +3 -1
  61. data/docs/RejectReasonsApi.md +6 -4
  62. data/docs/RemoteResponse.md +5 -1
  63. data/docs/RemoteUser.md +3 -1
  64. data/docs/ResponseTypeEnum.md +15 -0
  65. data/docs/ScheduledInterview.md +6 -4
  66. data/docs/Scorecard.md +6 -4
  67. data/docs/ScorecardsApi.md +11 -85
  68. data/docs/SyncStatus.md +2 -2
  69. data/docs/SyncStatusApi.md +3 -75
  70. data/docs/Tag.md +3 -1
  71. data/docs/TagsApi.md +4 -2
  72. data/docs/UpdateApplicationStageRequest.md +20 -0
  73. data/docs/UsersApi.md +11 -85
  74. data/docs/ValidationProblemSource.md +18 -0
  75. data/docs/WarningValidationProblem.md +24 -0
  76. data/docs/WebhookReceiver.md +22 -0
  77. data/docs/WebhookReceiverRequest.md +22 -0
  78. data/docs/WebhookReceiversApi.md +153 -0
  79. data/lib/merge_ats_client/api/account_details_api.rb +10 -3
  80. data/lib/merge_ats_client/api/activities_api.rb +17 -0
  81. data/lib/merge_ats_client/api/applications_api.rb +164 -15
  82. data/lib/merge_ats_client/api/attachments_api.rb +108 -15
  83. data/lib/merge_ats_client/api/candidates_api.rb +156 -21
  84. data/lib/merge_ats_client/api/departments_api.rb +3 -0
  85. data/lib/merge_ats_client/api/eeocs_api.rb +17 -0
  86. data/lib/merge_ats_client/api/force_resync_api.rb +84 -0
  87. data/lib/merge_ats_client/api/interviews_api.rb +17 -76
  88. data/lib/merge_ats_client/api/issues_api.rb +22 -10
  89. data/lib/merge_ats_client/api/job_interview_stages_api.rb +5 -2
  90. data/lib/merge_ats_client/api/jobs_api.rb +20 -3
  91. data/lib/merge_ats_client/api/linked_accounts_api.rb +24 -21
  92. data/lib/merge_ats_client/api/offers_api.rb +17 -0
  93. data/lib/merge_ats_client/api/offices_api.rb +3 -0
  94. data/lib/merge_ats_client/api/reject_reasons_api.rb +3 -0
  95. data/lib/merge_ats_client/api/scorecards_api.rb +17 -76
  96. data/lib/merge_ats_client/api/sync_status_api.rb +4 -66
  97. data/lib/merge_ats_client/api/tags_api.rb +3 -0
  98. data/lib/merge_ats_client/api/users_api.rb +17 -76
  99. data/lib/merge_ats_client/api/webhook_receivers_api.rb +154 -0
  100. data/lib/merge_ats_client/configuration.rb +6 -4
  101. data/lib/merge_ats_client/models/access_role_enum.rb +17 -7
  102. data/lib/merge_ats_client/models/account_details.rb +33 -4
  103. data/lib/merge_ats_client/models/account_details_and_actions.rb +35 -1
  104. data/lib/merge_ats_client/models/account_details_and_actions_integration.rb +4 -2
  105. data/lib/merge_ats_client/models/account_details_and_actions_status_enum.rb +17 -7
  106. data/lib/merge_ats_client/models/account_integration.rb +2 -24
  107. data/lib/merge_ats_client/models/account_token.rb +1 -1
  108. data/lib/merge_ats_client/models/activity.rb +16 -7
  109. data/lib/merge_ats_client/models/activity_type_enum.rb +17 -7
  110. data/lib/merge_ats_client/models/application.rb +15 -11
  111. data/lib/merge_ats_client/models/application_endpoint_request.rb +237 -0
  112. data/lib/merge_ats_client/models/application_request.rb +56 -12
  113. data/lib/merge_ats_client/models/application_response.rb +266 -0
  114. data/lib/merge_ats_client/models/attachment.rb +15 -6
  115. data/lib/merge_ats_client/models/attachment_endpoint_request.rb +237 -0
  116. data/lib/merge_ats_client/models/attachment_request.rb +31 -7
  117. data/lib/merge_ats_client/models/attachment_response.rb +266 -0
  118. data/lib/merge_ats_client/models/attachment_type_enum.rb +17 -9
  119. data/lib/merge_ats_client/models/available_actions.rb +1 -1
  120. data/lib/merge_ats_client/models/candidate.rb +15 -6
  121. data/lib/merge_ats_client/models/{remote_key_for_regeneration.rb → candidate_endpoint_request.rb} +29 -16
  122. data/lib/merge_ats_client/models/candidate_request.rb +56 -7
  123. data/lib/merge_ats_client/models/candidate_response.rb +266 -0
  124. data/lib/merge_ats_client/models/categories_enum.rb +19 -7
  125. data/lib/merge_ats_client/models/category_enum.rb +19 -7
  126. data/lib/merge_ats_client/models/data_passthrough_request.rb +79 -7
  127. data/lib/merge_ats_client/models/debug_mode_log.rb +251 -0
  128. data/lib/merge_ats_client/models/{data_passthrough.rb → debug_model_log_summary.rb} +30 -41
  129. data/lib/merge_ats_client/models/department.rb +17 -7
  130. data/lib/merge_ats_client/models/disability_status_enum.rb +17 -7
  131. data/lib/merge_ats_client/models/eeoc.rb +16 -7
  132. data/lib/merge_ats_client/models/email_address.rb +2 -2
  133. data/lib/merge_ats_client/models/email_address_request.rb +2 -2
  134. data/lib/merge_ats_client/models/email_address_type_enum.rb +17 -7
  135. data/lib/merge_ats_client/models/encoding_enum.rb +46 -0
  136. data/lib/merge_ats_client/models/end_user_details_request.rb +163 -27
  137. data/lib/merge_ats_client/models/error_validation_problem.rb +260 -0
  138. data/lib/merge_ats_client/models/gender_enum.rb +17 -7
  139. data/lib/merge_ats_client/models/generate_remote_key_request.rb +20 -1
  140. data/lib/merge_ats_client/models/ignore_common_model.rb +247 -0
  141. data/lib/merge_ats_client/models/ignore_common_model_request.rb +256 -0
  142. data/lib/merge_ats_client/models/issue.rb +2 -2
  143. data/lib/merge_ats_client/models/issue_status_enum.rb +17 -7
  144. data/lib/merge_ats_client/models/job.rb +39 -6
  145. data/lib/merge_ats_client/models/job_interview_stage.rb +17 -7
  146. data/lib/merge_ats_client/models/job_status_enum.rb +17 -7
  147. data/lib/merge_ats_client/models/link_token.rb +14 -5
  148. data/lib/merge_ats_client/models/linked_account_status.rb +237 -0
  149. data/lib/merge_ats_client/models/{scorecard_request.rb → meta_response.rb} +45 -70
  150. data/lib/merge_ats_client/models/method_enum.rb +17 -7
  151. data/lib/merge_ats_client/models/model_operation.rb +1 -1
  152. data/lib/merge_ats_client/models/{scheduled_interview_request.rb → multipart_form_field_request.rb} +115 -106
  153. data/lib/merge_ats_client/models/offer.rb +16 -8
  154. data/lib/merge_ats_client/models/offer_status_enum.rb +17 -7
  155. data/lib/merge_ats_client/models/office.rb +17 -7
  156. data/lib/merge_ats_client/models/overall_recommendation_enum.rb +17 -7
  157. data/lib/merge_ats_client/models/paginated_activity_list.rb +1 -1
  158. data/lib/merge_ats_client/models/paginated_application_list.rb +1 -1
  159. data/lib/merge_ats_client/models/paginated_attachment_list.rb +1 -1
  160. data/lib/merge_ats_client/models/paginated_candidate_list.rb +1 -1
  161. data/lib/merge_ats_client/models/paginated_department_list.rb +1 -1
  162. data/lib/merge_ats_client/models/paginated_eeoc_list.rb +1 -1
  163. data/lib/merge_ats_client/models/paginated_issue_list.rb +1 -1
  164. data/lib/merge_ats_client/models/paginated_job_interview_stage_list.rb +1 -1
  165. data/lib/merge_ats_client/models/paginated_job_list.rb +1 -1
  166. data/lib/merge_ats_client/models/paginated_offer_list.rb +1 -1
  167. data/lib/merge_ats_client/models/paginated_office_list.rb +1 -1
  168. data/lib/merge_ats_client/models/paginated_reject_reason_list.rb +1 -1
  169. data/lib/merge_ats_client/models/paginated_remote_user_list.rb +1 -1
  170. data/lib/merge_ats_client/models/paginated_scheduled_interview_list.rb +1 -1
  171. data/lib/merge_ats_client/models/paginated_scorecard_list.rb +1 -1
  172. data/lib/merge_ats_client/models/paginated_sync_status_list.rb +1 -1
  173. data/lib/merge_ats_client/models/paginated_tag_list.rb +1 -1
  174. data/lib/merge_ats_client/models/phone_number.rb +2 -2
  175. data/lib/merge_ats_client/models/phone_number_request.rb +2 -2
  176. data/lib/merge_ats_client/models/phone_number_type_enum.rb +17 -7
  177. data/lib/merge_ats_client/models/race_enum.rb +17 -7
  178. data/lib/merge_ats_client/models/reason_enum.rb +46 -0
  179. data/lib/merge_ats_client/models/reject_reason.rb +17 -7
  180. data/lib/merge_ats_client/models/remote_data.rb +1 -1
  181. data/lib/merge_ats_client/models/remote_key.rb +1 -1
  182. data/lib/merge_ats_client/models/remote_key_for_regeneration_request.rb +20 -1
  183. data/lib/merge_ats_client/models/remote_response.rb +24 -10
  184. data/lib/merge_ats_client/models/remote_user.rb +17 -7
  185. data/lib/merge_ats_client/models/request_format_enum.rb +18 -7
  186. data/lib/merge_ats_client/models/response_type_enum.rb +45 -0
  187. data/lib/merge_ats_client/models/scheduled_interview.rb +16 -9
  188. data/lib/merge_ats_client/models/scheduled_interview_status_enum.rb +17 -7
  189. data/lib/merge_ats_client/models/scorecard.rb +16 -9
  190. data/lib/merge_ats_client/models/sync_status.rb +1 -11
  191. data/lib/merge_ats_client/models/sync_status_status_enum.rb +19 -9
  192. data/lib/merge_ats_client/models/tag.rb +17 -7
  193. data/lib/merge_ats_client/models/update_application_stage_request.rb +244 -0
  194. data/lib/merge_ats_client/models/url.rb +2 -2
  195. data/lib/merge_ats_client/models/url_request.rb +2 -2
  196. data/lib/merge_ats_client/models/url_type_enum.rb +18 -7
  197. data/lib/merge_ats_client/models/{remote_data_request.rb → validation_problem_source.rb} +14 -25
  198. data/lib/merge_ats_client/models/veteran_status_enum.rb +17 -7
  199. data/lib/merge_ats_client/models/visibility_enum.rb +17 -7
  200. data/lib/merge_ats_client/models/warning_validation_problem.rb +260 -0
  201. data/lib/merge_ats_client/models/webhook_receiver.rb +246 -0
  202. data/lib/merge_ats_client/models/{end_user_details.rb → webhook_receiver_request.rb} +60 -69
  203. data/lib/merge_ats_client/version.rb +1 -1
  204. data/lib/merge_ats_client.rb +24 -4
  205. data/spec/api/account_details_api_spec.rb +1 -0
  206. data/spec/api/account_token_api_spec.rb +1 -1
  207. data/spec/api/activities_api_spec.rb +6 -1
  208. data/spec/api/applications_api_spec.rb +46 -1
  209. data/spec/api/attachments_api_spec.rb +33 -1
  210. data/spec/api/available_actions_api_spec.rb +1 -1
  211. data/spec/api/candidates_api_spec.rb +44 -1
  212. data/spec/api/departments_api_spec.rb +4 -1
  213. data/spec/api/eeocs_api_spec.rb +6 -1
  214. data/spec/api/force_resync_api_spec.rb +46 -0
  215. data/spec/api/interviews_api_spec.rb +6 -1
  216. data/spec/api/issues_api_spec.rb +9 -5
  217. data/spec/api/job_interview_stages_api_spec.rb +4 -1
  218. data/spec/api/jobs_api_spec.rb +8 -1
  219. data/spec/api/link_token_api_spec.rb +2 -2
  220. data/spec/api/linked_accounts_api_spec.rb +11 -10
  221. data/spec/api/offers_api_spec.rb +6 -1
  222. data/spec/api/offices_api_spec.rb +4 -1
  223. data/spec/api/passthrough_api_spec.rb +2 -2
  224. data/spec/api/regenerate_key_api_spec.rb +3 -5
  225. data/spec/api/reject_reasons_api_spec.rb +4 -1
  226. data/spec/api/scorecards_api_spec.rb +6 -1
  227. data/spec/api/sync_status_api_spec.rb +8 -5
  228. data/spec/api/tags_api_spec.rb +3 -1
  229. data/spec/api/users_api_spec.rb +7 -1
  230. data/spec/api/webhook_receivers_api_spec.rb +58 -0
  231. data/spec/models/access_role_enum_spec.rb +1 -1
  232. data/spec/models/account_details_and_actions_spec.rb +18 -0
  233. data/spec/models/account_details_spec.rb +18 -0
  234. data/spec/models/account_integration_spec.rb +7 -1
  235. data/spec/models/account_token_spec.rb +7 -1
  236. data/spec/models/activity_spec.rb +13 -1
  237. data/spec/models/activity_type_enum_spec.rb +1 -1
  238. data/spec/models/application_endpoint_request_spec.rb +40 -0
  239. data/spec/models/application_request_spec.rb +25 -1
  240. data/spec/models/{end_user_details_spec.rb → application_response_spec.rb} +11 -15
  241. data/spec/models/application_spec.rb +19 -7
  242. data/spec/models/attachment_endpoint_request_spec.rb +40 -0
  243. data/spec/models/attachment_request_spec.rb +12 -0
  244. data/spec/models/attachment_response_spec.rb +52 -0
  245. data/spec/models/attachment_spec.rb +25 -1
  246. data/spec/models/available_actions_spec.rb +1 -1
  247. data/spec/models/candidate_endpoint_request_spec.rb +40 -0
  248. data/spec/models/candidate_request_spec.rb +37 -1
  249. data/spec/models/{data_passthrough_spec.rb → candidate_response_spec.rb} +11 -11
  250. data/spec/models/candidate_spec.rb +19 -1
  251. data/spec/models/data_passthrough_request_spec.rb +19 -1
  252. data/spec/models/debug_mode_log_spec.rb +46 -0
  253. data/spec/models/debug_model_log_summary_spec.rb +46 -0
  254. data/spec/models/department_spec.rb +13 -1
  255. data/spec/models/disability_status_enum_spec.rb +1 -1
  256. data/spec/models/eeoc_spec.rb +13 -1
  257. data/spec/models/email_address_request_spec.rb +1 -1
  258. data/spec/models/email_address_spec.rb +1 -1
  259. data/spec/models/email_address_type_enum_spec.rb +1 -1
  260. data/spec/models/encoding_enum_spec.rb +28 -0
  261. data/spec/models/end_user_details_request_spec.rb +19 -5
  262. data/spec/models/error_validation_problem_spec.rb +52 -0
  263. data/spec/models/gender_enum_spec.rb +1 -1
  264. data/spec/models/ignore_common_model_request_spec.rb +40 -0
  265. data/spec/models/ignore_common_model_spec.rb +40 -0
  266. data/spec/models/job_interview_stage_spec.rb +13 -1
  267. data/spec/models/job_spec.rb +37 -1
  268. data/spec/models/job_status_enum_spec.rb +1 -1
  269. data/spec/models/link_token_spec.rb +7 -1
  270. data/spec/models/linked_account_status_spec.rb +40 -0
  271. data/spec/models/meta_response_spec.rb +52 -0
  272. data/spec/models/method_enum_spec.rb +1 -1
  273. data/spec/models/model_operation_spec.rb +13 -1
  274. data/spec/models/{remote_user_request_spec.rb → multipart_form_field_request_spec.rb} +11 -23
  275. data/spec/models/offer_spec.rb +13 -1
  276. data/spec/models/offer_status_enum_spec.rb +1 -1
  277. data/spec/models/office_spec.rb +13 -1
  278. data/spec/models/overall_recommendation_enum_spec.rb +1 -1
  279. data/spec/models/paginated_activity_list_spec.rb +1 -1
  280. data/spec/models/paginated_application_list_spec.rb +1 -1
  281. data/spec/models/paginated_attachment_list_spec.rb +1 -1
  282. data/spec/models/paginated_candidate_list_spec.rb +1 -1
  283. data/spec/models/paginated_department_list_spec.rb +1 -1
  284. data/spec/models/paginated_eeoc_list_spec.rb +1 -1
  285. data/spec/models/paginated_job_interview_stage_list_spec.rb +1 -1
  286. data/spec/models/paginated_job_list_spec.rb +1 -1
  287. data/spec/models/paginated_offer_list_spec.rb +1 -1
  288. data/spec/models/paginated_office_list_spec.rb +1 -1
  289. data/spec/models/paginated_reject_reason_list_spec.rb +1 -1
  290. data/spec/models/paginated_remote_user_list_spec.rb +1 -1
  291. data/spec/models/paginated_scheduled_interview_list_spec.rb +1 -1
  292. data/spec/models/paginated_scorecard_list_spec.rb +1 -1
  293. data/spec/models/paginated_tag_list_spec.rb +1 -1
  294. data/spec/models/phone_number_request_spec.rb +1 -1
  295. data/spec/models/phone_number_spec.rb +1 -1
  296. data/spec/models/phone_number_type_enum_spec.rb +1 -1
  297. data/spec/models/race_enum_spec.rb +1 -1
  298. data/spec/models/reason_enum_spec.rb +28 -0
  299. data/spec/models/reject_reason_spec.rb +13 -1
  300. data/spec/models/remote_data_spec.rb +1 -1
  301. data/spec/models/remote_key_for_regeneration_request_spec.rb +1 -1
  302. data/spec/models/remote_key_spec.rb +1 -1
  303. data/spec/models/remote_response_spec.rb +13 -1
  304. data/spec/models/remote_user_spec.rb +13 -1
  305. data/spec/models/response_type_enum_spec.rb +28 -0
  306. data/spec/models/scheduled_interview_spec.rb +13 -1
  307. data/spec/models/scheduled_interview_status_enum_spec.rb +1 -1
  308. data/spec/models/scorecard_spec.rb +13 -1
  309. data/spec/models/sync_status_spec.rb +1 -1
  310. data/spec/models/tag_spec.rb +13 -1
  311. data/spec/models/update_application_stage_request_spec.rb +40 -0
  312. data/spec/models/url_request_spec.rb +1 -1
  313. data/spec/models/url_spec.rb +1 -1
  314. data/spec/models/url_type_enum_spec.rb +1 -1
  315. data/spec/models/{remote_key_for_regeneration_spec.rb → validation_problem_source_spec.rb} +8 -8
  316. data/spec/models/veteran_status_enum_spec.rb +1 -1
  317. data/spec/models/visibility_enum_spec.rb +1 -1
  318. data/spec/models/warning_validation_problem_spec.rb +52 -0
  319. data/spec/models/webhook_receiver_request_spec.rb +46 -0
  320. data/spec/models/webhook_receiver_spec.rb +46 -0
  321. metadata +186 -123
  322. data/config.json +0 -2
  323. data/docs/DataPassthrough.md +0 -24
  324. data/docs/EndUserDetails.md +0 -24
  325. data/docs/PatchedApplicationRequest.md +0 -34
  326. data/docs/RemoteKeyForRegeneration.md +0 -18
  327. data/docs/RemoteUserRequest.md +0 -30
  328. data/docs/ScheduledInterviewRequest.md +0 -38
  329. data/docs/ScorecardRequest.md +0 -30
  330. data/lib/merge_ats_client/models/patched_application_request.rb +0 -309
  331. data/lib/merge_ats_client/models/remote_user_request.rb +0 -302
  332. data/merge_ats_client-1.0.3.gem +0 -0
  333. data/spec/models/patched_application_request_spec.rb +0 -82
  334. data/spec/models/scheduled_interview_request_spec.rb +0 -94
  335. data/spec/models/scorecard_request_spec.rb +0 -70
  336. data/test_ats.rb +0 -22
  337. data/test_signature.rb +0 -32
@@ -0,0 +1,46 @@
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 EncodingEnum
18
+ RAW = "RAW".freeze
19
+ BASE64 = "BASE64".freeze
20
+ GZIP_BASE64 = "GZIP_BASE64".freeze
21
+
22
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
23
+
24
+ attr_accessor :value
25
+ attr_accessor :raw_value
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ @raw_value = value
32
+ if ["RAW", "BASE64", "GZIP_BASE64", ].include? value
33
+ @value = value
34
+ else
35
+ @value = MERGE_NONSTANDARD_VALUE
36
+ end
37
+
38
+ self
39
+ end
40
+
41
+ def self.build_from_hash(value)
42
+ IssueStatusEnum.new.build_from_hash(value)
43
+ end
44
+ end
45
+
46
+ end
@@ -15,37 +15,26 @@ require 'time'
15
15
 
16
16
  module MergeATSClient
17
17
  class EndUserDetailsRequest
18
+ # Your end user's email address.
18
19
  attr_accessor :end_user_email_address
19
20
 
21
+ # Your end user's organization.
20
22
  attr_accessor :end_user_organization_name
21
23
 
24
+ # Unique ID for your end user.
22
25
  attr_accessor :end_user_origin_id
23
26
 
27
+ # The integration categories to show in Merge Link.
24
28
  attr_accessor :categories
25
29
 
30
+ # The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://www.merge.dev/docs/basics/integration-metadata/.
26
31
  attr_accessor :integration
27
32
 
28
- class EnumAttributeValidator
29
- attr_reader :datatype
30
- attr_reader :allowable_values
31
-
32
- def initialize(datatype, allowable_values)
33
- @allowable_values = allowable_values.map do |value|
34
- case datatype.to_s
35
- when /Integer/i
36
- value.to_i
37
- when /Float/i
38
- value.to_f
39
- else
40
- value
41
- end
42
- end
43
- end
33
+ # An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30.
34
+ attr_accessor :link_expiry_mins
44
35
 
45
- def valid?(value)
46
- !value || allowable_values.include?(value)
47
- end
48
- end
36
+ # Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/product/integrations,-fast.-say-hello-to-magic-link/.
37
+ attr_accessor :should_create_magic_link_url
49
38
 
50
39
  # Attribute mapping from ruby-style variable name to JSON key.
51
40
  def self.attribute_map
@@ -54,7 +43,9 @@ module MergeATSClient
54
43
  :'end_user_organization_name' => :'end_user_organization_name',
55
44
  :'end_user_origin_id' => :'end_user_origin_id',
56
45
  :'categories' => :'categories',
57
- :'integration' => :'integration'
46
+ :'integration' => :'integration',
47
+ :'link_expiry_mins' => :'link_expiry_mins',
48
+ :'should_create_magic_link_url' => :'should_create_magic_link_url'
58
49
  }
59
50
  end
60
51
 
@@ -69,15 +60,18 @@ module MergeATSClient
69
60
  :'end_user_email_address' => :'String',
70
61
  :'end_user_organization_name' => :'String',
71
62
  :'end_user_origin_id' => :'String',
72
- :'categories' => :'Array<String>',
73
- :'integration' => :'String'
63
+ :'categories' => :'Array<CategoriesEnum>',
64
+ :'integration' => :'String',
65
+ :'link_expiry_mins' => :'Integer',
66
+ :'should_create_magic_link_url' => :'Boolean'
74
67
  }
75
68
  end
76
69
 
77
70
  # List of attributes with nullable: true
78
71
  def self.openapi_nullable
79
72
  Set.new([
80
- :'integration'
73
+ :'integration',
74
+ :'should_create_magic_link_url'
81
75
  ])
82
76
  end
83
77
 
@@ -117,6 +111,18 @@ module MergeATSClient
117
111
  if attributes.key?(:'integration')
118
112
  self.integration = attributes[:'integration']
119
113
  end
114
+
115
+ if attributes.key?(:'link_expiry_mins')
116
+ self.link_expiry_mins = attributes[:'link_expiry_mins']
117
+ else
118
+ self.link_expiry_mins = 30
119
+ end
120
+
121
+ if attributes.key?(:'should_create_magic_link_url')
122
+ self.should_create_magic_link_url = attributes[:'should_create_magic_link_url']
123
+ else
124
+ self.should_create_magic_link_url = false
125
+ end
120
126
  end
121
127
 
122
128
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -127,14 +133,54 @@ module MergeATSClient
127
133
  invalid_properties.push('invalid value for "end_user_email_address", end_user_email_address cannot be nil.')
128
134
  end
129
135
 
136
+ if @end_user_email_address.to_s.length > 100
137
+ invalid_properties.push('invalid value for "end_user_email_address", the character length must be smaller than or equal to 100.')
138
+ end
139
+
140
+ if @end_user_email_address.to_s.length < 1
141
+ invalid_properties.push('invalid value for "end_user_email_address", the character length must be great than or equal to 1.')
142
+ end
143
+
130
144
  if @end_user_organization_name.nil?
131
145
  invalid_properties.push('invalid value for "end_user_organization_name", end_user_organization_name cannot be nil.')
132
146
  end
133
147
 
148
+ if @end_user_organization_name.to_s.length > 100
149
+ invalid_properties.push('invalid value for "end_user_organization_name", the character length must be smaller than or equal to 100.')
150
+ end
151
+
152
+ if @end_user_organization_name.to_s.length < 1
153
+ invalid_properties.push('invalid value for "end_user_organization_name", the character length must be great than or equal to 1.')
154
+ end
155
+
134
156
  if @end_user_origin_id.nil?
135
157
  invalid_properties.push('invalid value for "end_user_origin_id", end_user_origin_id cannot be nil.')
136
158
  end
137
159
 
160
+ if @end_user_origin_id.to_s.length > 100
161
+ invalid_properties.push('invalid value for "end_user_origin_id", the character length must be smaller than or equal to 100.')
162
+ end
163
+
164
+ if @end_user_origin_id.to_s.length < 1
165
+ invalid_properties.push('invalid value for "end_user_origin_id", the character length must be great than or equal to 1.')
166
+ end
167
+
168
+ if @categories.nil?
169
+ invalid_properties.push('invalid value for "categories", categories cannot be nil.')
170
+ end
171
+
172
+ if !@integration.nil? && @integration.to_s.length < 1
173
+ invalid_properties.push('invalid value for "integration", the character length must be great than or equal to 1.')
174
+ end
175
+
176
+ if !@link_expiry_mins.nil? && @link_expiry_mins > 10080
177
+ invalid_properties.push('invalid value for "link_expiry_mins", must be smaller than or equal to 10080.')
178
+ end
179
+
180
+ if !@link_expiry_mins.nil? && @link_expiry_mins < 30
181
+ invalid_properties.push('invalid value for "link_expiry_mins", must be greater than or equal to 30.')
182
+ end
183
+
138
184
  invalid_properties
139
185
  end
140
186
 
@@ -142,11 +188,99 @@ module MergeATSClient
142
188
  # @return true if the model is valid
143
189
  def valid?
144
190
  return false if @end_user_email_address.nil?
191
+ return false if @end_user_email_address.to_s.length > 100
192
+ return false if @end_user_email_address.to_s.length < 1
145
193
  return false if @end_user_organization_name.nil?
194
+ return false if @end_user_organization_name.to_s.length > 100
195
+ return false if @end_user_organization_name.to_s.length < 1
146
196
  return false if @end_user_origin_id.nil?
197
+ return false if @end_user_origin_id.to_s.length > 100
198
+ return false if @end_user_origin_id.to_s.length < 1
199
+ return false if @categories.nil?
200
+ return false if !@integration.nil? && @integration.to_s.length < 1
201
+ return false if !@link_expiry_mins.nil? && @link_expiry_mins > 10080
202
+ return false if !@link_expiry_mins.nil? && @link_expiry_mins < 30
147
203
  true
148
204
  end
149
205
 
206
+ # Custom attribute writer method with validation
207
+ # @param [Object] end_user_email_address Value to be assigned
208
+ def end_user_email_address=(end_user_email_address)
209
+ if end_user_email_address.nil?
210
+ fail ArgumentError, 'end_user_email_address cannot be nil'
211
+ end
212
+
213
+ if end_user_email_address.to_s.length > 100
214
+ fail ArgumentError, 'invalid value for "end_user_email_address", the character length must be smaller than or equal to 100.'
215
+ end
216
+
217
+ if end_user_email_address.to_s.length < 1
218
+ fail ArgumentError, 'invalid value for "end_user_email_address", the character length must be great than or equal to 1.'
219
+ end
220
+
221
+ @end_user_email_address = end_user_email_address
222
+ end
223
+
224
+ # Custom attribute writer method with validation
225
+ # @param [Object] end_user_organization_name Value to be assigned
226
+ def end_user_organization_name=(end_user_organization_name)
227
+ if end_user_organization_name.nil?
228
+ fail ArgumentError, 'end_user_organization_name cannot be nil'
229
+ end
230
+
231
+ if end_user_organization_name.to_s.length > 100
232
+ fail ArgumentError, 'invalid value for "end_user_organization_name", the character length must be smaller than or equal to 100.'
233
+ end
234
+
235
+ if end_user_organization_name.to_s.length < 1
236
+ fail ArgumentError, 'invalid value for "end_user_organization_name", the character length must be great than or equal to 1.'
237
+ end
238
+
239
+ @end_user_organization_name = end_user_organization_name
240
+ end
241
+
242
+ # Custom attribute writer method with validation
243
+ # @param [Object] end_user_origin_id Value to be assigned
244
+ def end_user_origin_id=(end_user_origin_id)
245
+ if end_user_origin_id.nil?
246
+ fail ArgumentError, 'end_user_origin_id cannot be nil'
247
+ end
248
+
249
+ if end_user_origin_id.to_s.length > 100
250
+ fail ArgumentError, 'invalid value for "end_user_origin_id", the character length must be smaller than or equal to 100.'
251
+ end
252
+
253
+ if end_user_origin_id.to_s.length < 1
254
+ fail ArgumentError, 'invalid value for "end_user_origin_id", the character length must be great than or equal to 1.'
255
+ end
256
+
257
+ @end_user_origin_id = end_user_origin_id
258
+ end
259
+
260
+ # Custom attribute writer method with validation
261
+ # @param [Object] integration Value to be assigned
262
+ def integration=(integration)
263
+ if !integration.nil? && integration.to_s.length < 1
264
+ fail ArgumentError, 'invalid value for "integration", the character length must be great than or equal to 1.'
265
+ end
266
+
267
+ @integration = integration
268
+ end
269
+
270
+ # Custom attribute writer method with validation
271
+ # @param [Object] link_expiry_mins Value to be assigned
272
+ def link_expiry_mins=(link_expiry_mins)
273
+ if !link_expiry_mins.nil? && link_expiry_mins > 10080
274
+ fail ArgumentError, 'invalid value for "link_expiry_mins", must be smaller than or equal to 10080.'
275
+ end
276
+
277
+ if !link_expiry_mins.nil? && link_expiry_mins < 30
278
+ fail ArgumentError, 'invalid value for "link_expiry_mins", must be greater than or equal to 30.'
279
+ end
280
+
281
+ @link_expiry_mins = link_expiry_mins
282
+ end
283
+
150
284
  # Checks equality by comparing each attribute.
151
285
  # @param [Object] Object to be compared
152
286
  def ==(o)
@@ -156,7 +290,9 @@ module MergeATSClient
156
290
  end_user_organization_name == o.end_user_organization_name &&
157
291
  end_user_origin_id == o.end_user_origin_id &&
158
292
  categories == o.categories &&
159
- integration == o.integration
293
+ integration == o.integration &&
294
+ link_expiry_mins == o.link_expiry_mins &&
295
+ should_create_magic_link_url == o.should_create_magic_link_url
160
296
  end
161
297
 
162
298
  # @see the `==` method
@@ -168,7 +304,7 @@ module MergeATSClient
168
304
  # Calculates hash code according to all attributes.
169
305
  # @return [Integer] Hash code
170
306
  def hash
171
- [end_user_email_address, end_user_organization_name, end_user_origin_id, categories, integration].hash
307
+ [end_user_email_address, end_user_organization_name, end_user_origin_id, categories, integration, link_expiry_mins, should_create_magic_link_url].hash
172
308
  end
173
309
 
174
310
  # Builds the object from hash
@@ -211,7 +347,7 @@ module MergeATSClient
211
347
  when :Date
212
348
  Date.parse(value)
213
349
  when :String
214
- value.to_s
350
+ value
215
351
  when :Integer
216
352
  value.to_i
217
353
  when :Float
@@ -0,0 +1,260 @@
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 ErrorValidationProblem
18
+ attr_accessor :source
19
+
20
+ attr_accessor :title
21
+
22
+ attr_accessor :detail
23
+
24
+ attr_accessor :problem_type
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'source' => :'source',
30
+ :'title' => :'title',
31
+ :'detail' => :'detail',
32
+ :'problem_type' => :'problem_type'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'source' => :'ValidationProblemSource',
45
+ :'title' => :'String',
46
+ :'detail' => :'String',
47
+ :'problem_type' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::ErrorValidationProblem` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::ErrorValidationProblem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'source')
73
+ self.source = attributes[:'source']
74
+ end
75
+
76
+ if attributes.key?(:'title')
77
+ self.title = attributes[:'title']
78
+ end
79
+
80
+ if attributes.key?(:'detail')
81
+ self.detail = attributes[:'detail']
82
+ end
83
+
84
+ if attributes.key?(:'problem_type')
85
+ self.problem_type = attributes[:'problem_type']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ invalid_properties = Array.new
93
+ if @title.nil?
94
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
95
+ end
96
+
97
+ if @detail.nil?
98
+ invalid_properties.push('invalid value for "detail", detail cannot be nil.')
99
+ end
100
+
101
+ if @problem_type.nil?
102
+ invalid_properties.push('invalid value for "problem_type", problem_type cannot be nil.')
103
+ end
104
+
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ return false if @title.nil?
112
+ return false if @detail.nil?
113
+ return false if @problem_type.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ source == o.source &&
123
+ title == o.title &&
124
+ detail == o.detail &&
125
+ problem_type == o.problem_type
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [source, title, detail, problem_type].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def self.build_from_hash(attributes)
144
+ new.build_from_hash(attributes)
145
+ end
146
+
147
+ # Builds the object from hash
148
+ # @param [Hash] attributes Model attributes in the form of hash
149
+ # @return [Object] Returns the model itself
150
+ def build_from_hash(attributes)
151
+ return nil unless attributes.is_a?(Hash)
152
+ self.class.openapi_types.each_pair do |key, type|
153
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
+ self.send("#{key}=", nil)
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :Time
176
+ Time.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ # models (e.g. Pet) or oneOf
207
+ klass = MergeATSClient.const_get(type)
208
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ # Returns the string representation of the object
213
+ # @return [String] String presentation of the object
214
+ def to_s
215
+ to_hash.to_s
216
+ end
217
+
218
+ # to_body is an alias to to_hash (backward compatibility)
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_body
221
+ to_hash
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ # Outputs non-array value in the form of hash
241
+ # For object, use to_hash. Otherwise, just return the value
242
+ # @param [Object] value Any valid value
243
+ # @return [Hash] Returns the value in the form of hash
244
+ def _to_hash(value)
245
+ if value.is_a?(Array)
246
+ value.compact.map { |v| _to_hash(v) }
247
+ elsif value.is_a?(Hash)
248
+ {}.tap do |hash|
249
+ value.each { |k, v| hash[k] = _to_hash(v) }
250
+ end
251
+ elsif value.respond_to? :to_hash
252
+ value.to_hash
253
+ else
254
+ value
255
+ end
256
+ end
257
+
258
+ end
259
+
260
+ end
@@ -21,18 +21,28 @@ module MergeATSClient
21
21
  OTHER = "OTHER".freeze
22
22
  DECLINE_TO_SELF_IDENTIFY = "DECLINE_TO_SELF_IDENTIFY".freeze
23
23
 
24
- # Builds the enum from string
25
- # @param [String] The enum value in the form of the string
26
- # @return [String] The enum value
27
- def self.build_from_hash(value)
28
- new.build_from_hash(value)
29
- end
24
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
25
+
26
+ attr_accessor :value
27
+ attr_accessor :raw_value
30
28
 
31
29
  # Builds the enum from string
32
30
  # @param [String] The enum value in the form of the string
33
31
  # @return [String] The enum value
34
32
  def build_from_hash(value)
35
- value
33
+ @raw_value = value
34
+ if ["MALE", "FEMALE", "NON-BINARY", "OTHER", "DECLINE_TO_SELF_IDENTIFY", ].include? value
35
+ @value = value
36
+ else
37
+ @value = MERGE_NONSTANDARD_VALUE
38
+ end
39
+
40
+ self
41
+ end
42
+
43
+ def self.build_from_hash(value)
44
+ IssueStatusEnum.new.build_from_hash(value)
36
45
  end
37
46
  end
47
+
38
48
  end
@@ -71,6 +71,10 @@ module MergeATSClient
71
71
  invalid_properties.push('invalid value for "name", name cannot be nil.')
72
72
  end
73
73
 
74
+ if @name.to_s.length < 1
75
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
76
+ end
77
+
74
78
  invalid_properties
75
79
  end
76
80
 
@@ -78,9 +82,24 @@ module MergeATSClient
78
82
  # @return true if the model is valid
79
83
  def valid?
80
84
  return false if @name.nil?
85
+ return false if @name.to_s.length < 1
81
86
  true
82
87
  end
83
88
 
89
+ # Custom attribute writer method with validation
90
+ # @param [Object] name Value to be assigned
91
+ def name=(name)
92
+ if name.nil?
93
+ fail ArgumentError, 'name cannot be nil'
94
+ end
95
+
96
+ if name.to_s.length < 1
97
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
98
+ end
99
+
100
+ @name = name
101
+ end
102
+
84
103
  # Checks equality by comparing each attribute.
85
104
  # @param [Object] Object to be compared
86
105
  def ==(o)
@@ -141,7 +160,7 @@ module MergeATSClient
141
160
  when :Date
142
161
  Date.parse(value)
143
162
  when :String
144
- value.to_s
163
+ value
145
164
  when :Integer
146
165
  value.to_i
147
166
  when :Float