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,57 @@
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
+ module MergeATSClient
14
+ class ApiError < StandardError
15
+ attr_reader :code, :response_headers, :response_body
16
+
17
+ # Usage examples:
18
+ # ApiError.new
19
+ # ApiError.new("message")
20
+ # ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
21
+ # ApiError.new(:code => 404, :message => "Not Found")
22
+ def initialize(arg = nil)
23
+ if arg.is_a? Hash
24
+ if arg.key?(:message) || arg.key?('message')
25
+ super(arg[:message] || arg['message'])
26
+ else
27
+ super arg
28
+ end
29
+
30
+ arg.each do |k, v|
31
+ instance_variable_set "@#{k}", v
32
+ end
33
+ else
34
+ super arg
35
+ end
36
+ end
37
+
38
+ # Override to_s to display a friendly error message
39
+ def to_s
40
+ message
41
+ end
42
+
43
+ def message
44
+ if @message.nil?
45
+ msg = "Error message: the server returns an error"
46
+ else
47
+ msg = @message
48
+ end
49
+
50
+ msg += "\nHTTP status code: #{code}" if code
51
+ msg += "\nResponse headers: #{response_headers}" if response_headers
52
+ msg += "\nResponse body: #{response_body}" if response_body
53
+
54
+ msg
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,279 @@
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
+ module MergeATSClient
14
+ class Configuration
15
+ # Defines url scheme
16
+ attr_accessor :scheme
17
+
18
+ # Defines url host
19
+ attr_accessor :host
20
+
21
+ # Defines url base path
22
+ attr_accessor :base_path
23
+
24
+ # Define server configuration index
25
+ attr_accessor :server_index
26
+
27
+ # Define server operation configuration index
28
+ attr_accessor :server_operation_index
29
+
30
+ # Default server variables
31
+ attr_accessor :server_variables
32
+
33
+ # Default server operation variables
34
+ attr_accessor :server_operation_variables
35
+
36
+ # Defines API keys used with API Key authentications.
37
+ #
38
+ # @return [Hash] key: parameter name, value: parameter value (API key)
39
+ #
40
+ # @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
41
+ # config.api_key['api_key'] = 'xxx'
42
+ attr_accessor :api_key
43
+
44
+ # Defines API key prefixes used with API Key authentications.
45
+ #
46
+ # @return [Hash] key: parameter name, value: API key prefix
47
+ #
48
+ # @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
49
+ # config.api_key_prefix['api_key'] = 'Token'
50
+ attr_accessor :api_key_prefix
51
+
52
+ # Defines the username used with HTTP basic authentication.
53
+ #
54
+ # @return [String]
55
+ attr_accessor :username
56
+
57
+ # Defines the password used with HTTP basic authentication.
58
+ #
59
+ # @return [String]
60
+ attr_accessor :password
61
+
62
+ # Defines the access token (Bearer) used with OAuth2.
63
+ attr_accessor :access_token
64
+
65
+ # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
66
+ # details will be logged with `logger.debug` (see the `logger` attribute).
67
+ # Default to false.
68
+ #
69
+ # @return [true, false]
70
+ attr_accessor :debugging
71
+
72
+ # Defines the logger used for debugging.
73
+ # Default to `Rails.logger` (when in Rails) or logging to STDOUT.
74
+ #
75
+ # @return [#debug]
76
+ attr_accessor :logger
77
+
78
+ # Defines the temporary folder to store downloaded files
79
+ # (for API endpoints that have file response).
80
+ # Default to use `Tempfile`.
81
+ #
82
+ # @return [String]
83
+ attr_accessor :temp_folder_path
84
+
85
+ # The time limit for HTTP request in seconds.
86
+ # Default to 0 (never times out).
87
+ attr_accessor :timeout
88
+
89
+ # Set this to false to skip client side validation in the operation.
90
+ # Default to true.
91
+ # @return [true, false]
92
+ attr_accessor :client_side_validation
93
+
94
+ ### TLS/SSL setting
95
+ # Set this to false to skip verifying SSL certificate when calling API from https server.
96
+ # Default to true.
97
+ #
98
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
99
+ #
100
+ # @return [true, false]
101
+ attr_accessor :verify_ssl
102
+
103
+ ### TLS/SSL setting
104
+ # Set this to false to skip verifying SSL host name
105
+ # Default to true.
106
+ #
107
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
108
+ #
109
+ # @return [true, false]
110
+ attr_accessor :verify_ssl_host
111
+
112
+ ### TLS/SSL setting
113
+ # Set this to customize the certificate file to verify the peer.
114
+ #
115
+ # @return [String] the path to the certificate file
116
+ #
117
+ # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
118
+ # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
119
+ attr_accessor :ssl_ca_cert
120
+
121
+ ### TLS/SSL setting
122
+ # Client certificate file (for client certificate)
123
+ attr_accessor :cert_file
124
+
125
+ ### TLS/SSL setting
126
+ # Client private key file (for client certificate)
127
+ attr_accessor :key_file
128
+
129
+ # Set this to customize parameters encoding of array parameter with multi collectionFormat.
130
+ # Default to nil.
131
+ #
132
+ # @see The params_encoding option of Ethon. Related source code:
133
+ # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
134
+ attr_accessor :params_encoding
135
+
136
+ attr_accessor :inject_format
137
+
138
+ attr_accessor :force_ending_format
139
+
140
+ def initialize
141
+ @scheme = 'https'
142
+ @host = 'api.merge.dev'
143
+ @base_path = '/api/ats/v1'
144
+ @server_index = 0
145
+ @server_operation_index = {}
146
+ @server_variables = {}
147
+ @server_operation_variables = {}
148
+ @api_key = {}
149
+ @api_key_prefix = {}
150
+ @timeout = 0
151
+ @client_side_validation = true
152
+ @verify_ssl = true
153
+ @verify_ssl_host = true
154
+ @params_encoding = nil
155
+ @cert_file = nil
156
+ @key_file = nil
157
+ @debugging = false
158
+ @inject_format = false
159
+ @force_ending_format = false
160
+ @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
161
+
162
+ yield(self) if block_given?
163
+ end
164
+
165
+ # The default Configuration object.
166
+ def self.default
167
+ @@default ||= Configuration.new
168
+ end
169
+
170
+ def configure
171
+ yield(self) if block_given?
172
+ end
173
+
174
+ def scheme=(scheme)
175
+ # remove :// from scheme
176
+ @scheme = scheme.sub(/:\/\//, '')
177
+ end
178
+
179
+ def host=(host)
180
+ # remove http(s):// and anything after a slash
181
+ @host = host.sub(/https?:\/\//, '').split('/').first
182
+ end
183
+
184
+ def base_path=(base_path)
185
+ # Add leading and trailing slashes to base_path
186
+ @base_path = "/#{base_path}".gsub(/\/+/, '/')
187
+ @base_path = '' if @base_path == '/'
188
+ end
189
+
190
+ # Returns base URL for specified operation based on server settings
191
+ def base_url(operation = nil)
192
+ index = server_operation_index.fetch(operation, server_index)
193
+ return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
194
+
195
+ server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
196
+ end
197
+
198
+ # Gets API key (with prefix if set).
199
+ # @param [String] param_name the parameter name of API key auth
200
+ def api_key_with_prefix(param_name)
201
+ if @api_key_prefix[param_name]
202
+ "#{@api_key_prefix[param_name]} #{@api_key[param_name]}"
203
+ else
204
+ @api_key[param_name]
205
+ end
206
+ end
207
+
208
+ # Gets Basic Auth token string
209
+ def basic_auth_token
210
+ 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
211
+ end
212
+
213
+ # Returns Auth Settings hash for api client.
214
+ def auth_settings
215
+ {
216
+ 'tokenAuth' =>
217
+ {
218
+ type: 'api_key',
219
+ in: 'header',
220
+ key: 'Authorization',
221
+ value: api_key_with_prefix('Authorization')
222
+ },
223
+ }
224
+ end
225
+
226
+ # Returns an array of Server setting
227
+ def server_settings
228
+ [
229
+ {
230
+ url: "https://api.merge.dev/api/ats/v1",
231
+ description: "Production",
232
+ },
233
+ {
234
+ url: "https://api-sandbox.merge.dev/api/ats/v1",
235
+ description: "Sandbox",
236
+ }
237
+ ]
238
+ end
239
+
240
+ def operation_server_settings
241
+ {
242
+ }
243
+ end
244
+
245
+ # Returns URL based on server settings
246
+ #
247
+ # @param index array index of the server settings
248
+ # @param variables hash of variable and the corresponding value
249
+ def server_url(index, variables = {}, servers = nil)
250
+ servers = server_settings if servers == nil
251
+
252
+ # check array index out of bound
253
+ if (index < 0 || index >= servers.size)
254
+ fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
255
+ end
256
+
257
+ server = servers[index]
258
+ url = server[:url]
259
+
260
+ return url unless server.key? :variables
261
+
262
+ # go through variable and assign a value
263
+ server[:variables].each do |name, variable|
264
+ if variables.key?(name)
265
+ if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
266
+ url.gsub! "{" + name.to_s + "}", variables[name]
267
+ else
268
+ fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
269
+ end
270
+ else
271
+ # use default value
272
+ url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
273
+ end
274
+ end
275
+
276
+ url
277
+ end
278
+ end
279
+ end
@@ -0,0 +1,38 @@
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 AccessRoleEnum
18
+ SUPER_ADMIN = "SUPER_ADMIN".freeze
19
+ ADMIN = "ADMIN".freeze
20
+ TEAM_MEMBER = "TEAM_MEMBER".freeze
21
+ LIMITED_TEAM_MEMBER = "LIMITED_TEAM_MEMBER".freeze
22
+ INTERVIEWER = "INTERVIEWER".freeze
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
30
+
31
+ # Builds the enum from string
32
+ # @param [String] The enum value in the form of the string
33
+ # @return [String] The enum value
34
+ def build_from_hash(value)
35
+ value
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,325 @@
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 AccountIntegration
18
+ # Company name.
19
+ attr_accessor :name
20
+
21
+ # Category or categories this integration belongs to.
22
+ attr_accessor :categories
23
+
24
+ # Company logo in rectangular shape.
25
+ attr_accessor :image
26
+
27
+ # Company logo in square shape.
28
+ attr_accessor :square_image
29
+
30
+ # The color of this integration used for buttons and text throughout the app and landing pages.
31
+ attr_accessor :color
32
+
33
+ attr_accessor :slug
34
+
35
+ class EnumAttributeValidator
36
+ attr_reader :datatype
37
+ attr_reader :allowable_values
38
+
39
+ def initialize(datatype, allowable_values)
40
+ @allowable_values = allowable_values.map do |value|
41
+ case datatype.to_s
42
+ when /Integer/i
43
+ value.to_i
44
+ when /Float/i
45
+ value.to_f
46
+ else
47
+ value
48
+ end
49
+ end
50
+ end
51
+
52
+ def valid?(value)
53
+ !value || allowable_values.include?(value)
54
+ end
55
+ end
56
+
57
+ # Attribute mapping from ruby-style variable name to JSON key.
58
+ def self.attribute_map
59
+ {
60
+ :'name' => :'name',
61
+ :'categories' => :'categories',
62
+ :'image' => :'image',
63
+ :'square_image' => :'square_image',
64
+ :'color' => :'color',
65
+ :'slug' => :'slug'
66
+ }
67
+ end
68
+
69
+ # Returns all the JSON keys this model knows about
70
+ def self.acceptable_attributes
71
+ attribute_map.values
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'name' => :'String',
78
+ :'categories' => :'Array<String>',
79
+ :'image' => :'String',
80
+ :'square_image' => :'String',
81
+ :'color' => :'String',
82
+ :'slug' => :'String'
83
+ }
84
+ end
85
+
86
+ # List of attributes with nullable: true
87
+ def self.openapi_nullable
88
+ Set.new([
89
+ :'image',
90
+ :'square_image',
91
+ ])
92
+ end
93
+
94
+ # Initializes the object
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ def initialize(attributes = {})
97
+ if (!attributes.is_a?(Hash))
98
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::AccountIntegration` initialize method"
99
+ end
100
+
101
+ # check to see if the attribute exists and convert string to symbol for hash key
102
+ attributes = attributes.each_with_object({}) { |(k, v), h|
103
+ if (!self.class.attribute_map.key?(k.to_sym))
104
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::AccountIntegration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
105
+ end
106
+ h[k.to_sym] = v
107
+ }
108
+
109
+ if attributes.key?(:'name')
110
+ self.name = attributes[:'name']
111
+ end
112
+
113
+ if attributes.key?(:'categories')
114
+ if (value = attributes[:'categories']).is_a?(Array)
115
+ self.categories = value
116
+ end
117
+ end
118
+
119
+ if attributes.key?(:'image')
120
+ self.image = attributes[:'image']
121
+ end
122
+
123
+ if attributes.key?(:'square_image')
124
+ self.square_image = attributes[:'square_image']
125
+ end
126
+
127
+ if attributes.key?(:'color')
128
+ self.color = attributes[:'color']
129
+ end
130
+
131
+ if attributes.key?(:'slug')
132
+ self.slug = attributes[:'slug']
133
+ end
134
+ end
135
+
136
+ # Show invalid properties with the reasons. Usually used together with valid?
137
+ # @return Array for valid properties with the reasons
138
+ def list_invalid_properties
139
+ invalid_properties = Array.new
140
+ if @name.nil?
141
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
142
+ end
143
+
144
+ if !@color.nil? && @color.to_s.length > 18
145
+ invalid_properties.push('invalid value for "color", the character length must be smaller than or equal to 18.')
146
+ end
147
+
148
+ pattern = Regexp.new(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
149
+ if !@color.nil? && @color !~ pattern
150
+ invalid_properties.push("invalid value for \"color\", must conform to the pattern #{pattern}.")
151
+ end
152
+
153
+ invalid_properties
154
+ end
155
+
156
+ # Check to see if the all the properties in the model are valid
157
+ # @return true if the model is valid
158
+ def valid?
159
+ return false if @name.nil?
160
+ return false if !@color.nil? && @color.to_s.length > 18
161
+ return false if !@color.nil? && @color !~ Regexp.new(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
162
+ true
163
+ end
164
+
165
+ # Custom attribute writer method with validation
166
+ # @param [Object] color Value to be assigned
167
+ def color=(color)
168
+ if !color.nil? && color.to_s.length > 18
169
+ fail ArgumentError, 'invalid value for "color", the character length must be smaller than or equal to 18.'
170
+ end
171
+
172
+ pattern = Regexp.new(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)
173
+ if !color.nil? && color !~ pattern
174
+ fail ArgumentError, "invalid value for \"color\", must conform to the pattern #{pattern}."
175
+ end
176
+
177
+ @color = color
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
+ name == o.name &&
186
+ categories == o.categories &&
187
+ image == o.image &&
188
+ square_image == o.square_image &&
189
+ color == o.color &&
190
+ slug == o.slug
191
+ end
192
+
193
+ # @see the `==` method
194
+ # @param [Object] Object to be compared
195
+ def eql?(o)
196
+ self == o
197
+ end
198
+
199
+ # Calculates hash code according to all attributes.
200
+ # @return [Integer] Hash code
201
+ def hash
202
+ [name, categories, image, square_image, color, slug].hash
203
+ end
204
+
205
+ # Builds the object from hash
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ # @return [Object] Returns the model itself
208
+ def self.build_from_hash(attributes)
209
+ new.build_from_hash(attributes)
210
+ end
211
+
212
+ # Builds the object from hash
213
+ # @param [Hash] attributes Model attributes in the form of hash
214
+ # @return [Object] Returns the model itself
215
+ def build_from_hash(attributes)
216
+ return nil unless attributes.is_a?(Hash)
217
+ self.class.openapi_types.each_pair do |key, type|
218
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
219
+ self.send("#{key}=", nil)
220
+ elsif type =~ /\AArray<(.*)>/i
221
+ # check to ensure the input is an array given that the attribute
222
+ # is documented as an array but the input is not
223
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
224
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
225
+ end
226
+ elsif !attributes[self.class.attribute_map[key]].nil?
227
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
228
+ end
229
+ end
230
+
231
+ self
232
+ end
233
+
234
+ # Deserializes the data based on type
235
+ # @param string type Data type
236
+ # @param string value Value to be deserialized
237
+ # @return [Object] Deserialized data
238
+ def _deserialize(type, value)
239
+ case type.to_sym
240
+ when :Time
241
+ Time.parse(value)
242
+ when :Date
243
+ Date.parse(value)
244
+ when :String
245
+ value.to_s
246
+ when :Integer
247
+ value.to_i
248
+ when :Float
249
+ value.to_f
250
+ when :Boolean
251
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
252
+ true
253
+ else
254
+ false
255
+ end
256
+ when :Object
257
+ # generic object (usually a Hash), return directly
258
+ value
259
+ when /\AArray<(?<inner_type>.+)>\z/
260
+ inner_type = Regexp.last_match[:inner_type]
261
+ value.map { |v| _deserialize(inner_type, v) }
262
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
263
+ k_type = Regexp.last_match[:k_type]
264
+ v_type = Regexp.last_match[:v_type]
265
+ {}.tap do |hash|
266
+ value.each do |k, v|
267
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
268
+ end
269
+ end
270
+ else # model
271
+ # models (e.g. Pet) or oneOf
272
+ klass = MergeATSClient.const_get(type)
273
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
274
+ end
275
+ end
276
+
277
+ # Returns the string representation of the object
278
+ # @return [String] String presentation of the object
279
+ def to_s
280
+ to_hash.to_s
281
+ end
282
+
283
+ # to_body is an alias to to_hash (backward compatibility)
284
+ # @return [Hash] Returns the object in the form of hash
285
+ def to_body
286
+ to_hash
287
+ end
288
+
289
+ # Returns the object in the form of hash
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_hash
292
+ hash = {}
293
+ self.class.attribute_map.each_pair do |attr, param|
294
+ value = self.send(attr)
295
+ if value.nil?
296
+ is_nullable = self.class.openapi_nullable.include?(attr)
297
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
298
+ end
299
+
300
+ hash[param] = _to_hash(value)
301
+ end
302
+ hash
303
+ end
304
+
305
+ # Outputs non-array value in the form of hash
306
+ # For object, use to_hash. Otherwise, just return the value
307
+ # @param [Object] value Any valid value
308
+ # @return [Hash] Returns the value in the form of hash
309
+ def _to_hash(value)
310
+ if value.is_a?(Array)
311
+ value.compact.map { |v| _to_hash(v) }
312
+ elsif value.is_a?(Hash)
313
+ {}.tap do |hash|
314
+ value.each { |k, v| hash[k] = _to_hash(v) }
315
+ end
316
+ elsif value.respond_to? :to_hash
317
+ value.to_hash
318
+ else
319
+ value
320
+ end
321
+ end
322
+
323
+ end
324
+
325
+ end