stackone_client 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stackone/models/operations/hris_get_company.rb +3 -3
  3. data/lib/stackone/models/operations/hris_get_employee.rb +3 -3
  4. data/lib/stackone/models/shared/content.rb +4 -4
  5. data/lib/stackone/models/shared/costcenters.rb +5 -2
  6. data/lib/stackone/models/shared/countrycodeenum.rb +4 -4
  7. data/lib/stackone/models/shared/documentapimodel.rb +8 -8
  8. data/lib/stackone/models/shared/employee.rb +39 -22
  9. data/lib/stackone/models/shared/employeecustomfields.rb +3 -3
  10. data/lib/stackone/models/shared/employment.rb +11 -10
  11. data/lib/stackone/models/shared/{documentfileformatenum.rb → fileformatenum.rb} +16 -4
  12. data/lib/stackone/models/shared/hriscreateemployeerequestdto.rb +3 -3
  13. data/lib/stackone/models/shared/hriscreatetimeoffrequestdto.rb +3 -3
  14. data/lib/stackone/models/shared/hrislocation.rb +8 -8
  15. data/lib/stackone/models/shared/workeligibility.rb +101 -0
  16. data/lib/stackone/sdk.rb +1 -4
  17. data/lib/stackone/sdkconfiguration.rb +3 -3
  18. data/lib/stackone_client.rb +4 -154
  19. metadata +3 -153
  20. data/lib/stackone/ats.rb +0 -1289
  21. data/lib/stackone/crm.rb +0 -323
  22. data/lib/stackone/marketing.rb +0 -584
  23. data/lib/stackone/models/operations/ats_create_application.rb +0 -53
  24. data/lib/stackone/models/operations/ats_create_candidate.rb +0 -53
  25. data/lib/stackone/models/operations/ats_create_candidate_note.rb +0 -56
  26. data/lib/stackone/models/operations/ats_create_offer.rb +0 -53
  27. data/lib/stackone/models/operations/ats_get_application.rb +0 -88
  28. data/lib/stackone/models/operations/ats_get_application_offer.rb +0 -91
  29. data/lib/stackone/models/operations/ats_get_application_scorecard.rb +0 -91
  30. data/lib/stackone/models/operations/ats_get_candidate.rb +0 -88
  31. data/lib/stackone/models/operations/ats_get_candidate_note.rb +0 -91
  32. data/lib/stackone/models/operations/ats_get_department.rb +0 -88
  33. data/lib/stackone/models/operations/ats_get_interview.rb +0 -88
  34. data/lib/stackone/models/operations/ats_get_interview_stage.rb +0 -88
  35. data/lib/stackone/models/operations/ats_get_job.rb +0 -88
  36. data/lib/stackone/models/operations/ats_get_job_posting.rb +0 -91
  37. data/lib/stackone/models/operations/ats_get_location.rb +0 -88
  38. data/lib/stackone/models/operations/ats_get_offer.rb +0 -88
  39. data/lib/stackone/models/operations/ats_get_rejected_reason.rb +0 -88
  40. data/lib/stackone/models/operations/ats_get_user.rb +0 -88
  41. data/lib/stackone/models/operations/ats_list_application_scorecards.rb +0 -88
  42. data/lib/stackone/models/operations/ats_list_applications.rb +0 -85
  43. data/lib/stackone/models/operations/ats_list_applications_offers.rb +0 -88
  44. data/lib/stackone/models/operations/ats_list_candidate_notes.rb +0 -88
  45. data/lib/stackone/models/operations/ats_list_candidates.rb +0 -85
  46. data/lib/stackone/models/operations/ats_list_departments.rb +0 -85
  47. data/lib/stackone/models/operations/ats_list_interview_stages.rb +0 -85
  48. data/lib/stackone/models/operations/ats_list_interviews.rb +0 -85
  49. data/lib/stackone/models/operations/ats_list_job_postings.rb +0 -88
  50. data/lib/stackone/models/operations/ats_list_jobs.rb +0 -85
  51. data/lib/stackone/models/operations/ats_list_locations.rb +0 -85
  52. data/lib/stackone/models/operations/ats_list_offers.rb +0 -85
  53. data/lib/stackone/models/operations/ats_list_rejected_reasons.rb +0 -85
  54. data/lib/stackone/models/operations/ats_list_users.rb +0 -85
  55. data/lib/stackone/models/operations/ats_update_application.rb +0 -56
  56. data/lib/stackone/models/operations/ats_update_candidate.rb +0 -56
  57. data/lib/stackone/models/operations/crm_create_contact.rb +0 -53
  58. data/lib/stackone/models/operations/crm_get_account.rb +0 -88
  59. data/lib/stackone/models/operations/crm_get_contact.rb +0 -88
  60. data/lib/stackone/models/operations/crm_get_list.rb +0 -88
  61. data/lib/stackone/models/operations/crm_list_accounts.rb +0 -85
  62. data/lib/stackone/models/operations/crm_list_contacts.rb +0 -85
  63. data/lib/stackone/models/operations/crm_list_lists.rb +0 -85
  64. data/lib/stackone/models/operations/crm_update_contact.rb +0 -56
  65. data/lib/stackone/models/operations/marketing_create_email_template.rb +0 -53
  66. data/lib/stackone/models/operations/marketing_create_omni_channel_template.rb +0 -53
  67. data/lib/stackone/models/operations/marketing_create_push_template.rb +0 -53
  68. data/lib/stackone/models/operations/marketing_get_campaign.rb +0 -88
  69. data/lib/stackone/models/operations/marketing_get_email_template.rb +0 -88
  70. data/lib/stackone/models/operations/marketing_get_omni_channel_template.rb +0 -88
  71. data/lib/stackone/models/operations/marketing_get_push_template.rb +0 -88
  72. data/lib/stackone/models/operations/marketing_list_campaigns.rb +0 -85
  73. data/lib/stackone/models/operations/marketing_list_email_templates.rb +0 -85
  74. data/lib/stackone/models/operations/marketing_list_omni_channel_templates.rb +0 -85
  75. data/lib/stackone/models/operations/marketing_list_push_templates.rb +0 -85
  76. data/lib/stackone/models/operations/marketing_update_email_template.rb +0 -56
  77. data/lib/stackone/models/operations/marketing_update_omni_channel_template.rb +0 -56
  78. data/lib/stackone/models/operations/marketing_update_push_template.rb +0 -56
  79. data/lib/stackone/models/shared/account.rb +0 -55
  80. data/lib/stackone/models/shared/accountaddress.rb +0 -342
  81. data/lib/stackone/models/shared/accountresult.rb +0 -29
  82. data/lib/stackone/models/shared/accountspaginated.rb +0 -34
  83. data/lib/stackone/models/shared/answer.rb +0 -64
  84. data/lib/stackone/models/shared/application.rb +0 -158
  85. data/lib/stackone/models/shared/applicationattachment.rb +0 -63
  86. data/lib/stackone/models/shared/applicationresult.rb +0 -29
  87. data/lib/stackone/models/shared/applicationspaginated.rb +0 -34
  88. data/lib/stackone/models/shared/atscreateapplicationrequestdto.rb +0 -102
  89. data/lib/stackone/models/shared/atscreatecandidaterequestdto.rb +0 -46
  90. data/lib/stackone/models/shared/atscreatenotesrequestdto.rb +0 -57
  91. data/lib/stackone/models/shared/atscreateofferrequestdto.rb +0 -72
  92. data/lib/stackone/models/shared/atslocation.rb +0 -28
  93. data/lib/stackone/models/shared/atslocationresult.rb +0 -29
  94. data/lib/stackone/models/shared/atslocationspaginated.rb +0 -34
  95. data/lib/stackone/models/shared/atsupdateapplicationrequestdto.rb +0 -105
  96. data/lib/stackone/models/shared/atsupdatecandidatesrequestdto.rb +0 -49
  97. data/lib/stackone/models/shared/attachmenttype.rb +0 -40
  98. data/lib/stackone/models/shared/campaign.rb +0 -120
  99. data/lib/stackone/models/shared/campaignresult.rb +0 -29
  100. data/lib/stackone/models/shared/campaignspaginated.rb +0 -34
  101. data/lib/stackone/models/shared/candidate.rb +0 -64
  102. data/lib/stackone/models/shared/candidateemail.rb +0 -28
  103. data/lib/stackone/models/shared/candidateresult.rb +0 -29
  104. data/lib/stackone/models/shared/candidatespaginated.rb +0 -34
  105. data/lib/stackone/models/shared/channelsenum.rb +0 -42
  106. data/lib/stackone/models/shared/contact.rb +0 -52
  107. data/lib/stackone/models/shared/contactresult.rb +0 -29
  108. data/lib/stackone/models/shared/contactspaginated.rb +0 -34
  109. data/lib/stackone/models/shared/createcandidatenoteresult.rb +0 -31
  110. data/lib/stackone/models/shared/createofferresult.rb +0 -31
  111. data/lib/stackone/models/shared/createresult.rb +0 -31
  112. data/lib/stackone/models/shared/createtemplateresult.rb +0 -31
  113. data/lib/stackone/models/shared/crmcreatecontactrequestdto.rb +0 -43
  114. data/lib/stackone/models/shared/department.rb +0 -28
  115. data/lib/stackone/models/shared/departmentresult.rb +0 -29
  116. data/lib/stackone/models/shared/departmentspaginated.rb +0 -34
  117. data/lib/stackone/models/shared/emailmessages.rb +0 -93
  118. data/lib/stackone/models/shared/field.rb +0 -56
  119. data/lib/stackone/models/shared/interview.rb +0 -117
  120. data/lib/stackone/models/shared/interviewer.rb +0 -37
  121. data/lib/stackone/models/shared/interviewpart.rb +0 -40
  122. data/lib/stackone/models/shared/interviewspaginated.rb +0 -34
  123. data/lib/stackone/models/shared/interviewsresult.rb +0 -29
  124. data/lib/stackone/models/shared/interviewstage.rb +0 -37
  125. data/lib/stackone/models/shared/interviewstageresult.rb +0 -29
  126. data/lib/stackone/models/shared/interviewstagespaginated.rb +0 -34
  127. data/lib/stackone/models/shared/job.rb +0 -96
  128. data/lib/stackone/models/shared/jobhiringteam.rb +0 -37
  129. data/lib/stackone/models/shared/jobposting.rb +0 -189
  130. data/lib/stackone/models/shared/jobpostingcompensation.rb +0 -149
  131. data/lib/stackone/models/shared/jobpostinglocation.rb +0 -28
  132. data/lib/stackone/models/shared/jobpostingquestionnaire.rb +0 -34
  133. data/lib/stackone/models/shared/jobpostingresult.rb +0 -29
  134. data/lib/stackone/models/shared/jobpostingspaginated.rb +0 -34
  135. data/lib/stackone/models/shared/jobresult.rb +0 -29
  136. data/lib/stackone/models/shared/jobspaginated.rb +0 -34
  137. data/lib/stackone/models/shared/list.rb +0 -67
  138. data/lib/stackone/models/shared/listresult.rb +0 -29
  139. data/lib/stackone/models/shared/listspaginated.rb +0 -34
  140. data/lib/stackone/models/shared/marketingcreateemailtemplaterequestdto.rb +0 -34
  141. data/lib/stackone/models/shared/marketingcreatepushtemplaterequestdto.rb +0 -34
  142. data/lib/stackone/models/shared/marketingcreatetemplaterequestdto.rb +0 -34
  143. data/lib/stackone/models/shared/message.rb +0 -50
  144. data/lib/stackone/models/shared/note.rb +0 -69
  145. data/lib/stackone/models/shared/notecontentapimodel.rb +0 -25
  146. data/lib/stackone/models/shared/noteresult.rb +0 -29
  147. data/lib/stackone/models/shared/notespaginated.rb +0 -34
  148. data/lib/stackone/models/shared/offer.rb +0 -81
  149. data/lib/stackone/models/shared/offerhistory.rb +0 -37
  150. data/lib/stackone/models/shared/offerspaginated.rb +0 -34
  151. data/lib/stackone/models/shared/offersresult.rb +0 -29
  152. data/lib/stackone/models/shared/pushmessages.rb +0 -81
  153. data/lib/stackone/models/shared/question.rb +0 -73
  154. data/lib/stackone/models/shared/questionmultiplechoiceanswers.rb +0 -28
  155. data/lib/stackone/models/shared/questionnaire.rb +0 -28
  156. data/lib/stackone/models/shared/rejectedreason.rb +0 -60
  157. data/lib/stackone/models/shared/rejectedreasonresult.rb +0 -29
  158. data/lib/stackone/models/shared/rejectedreasonspaginated.rb +0 -34
  159. data/lib/stackone/models/shared/resultlink.rb +0 -28
  160. data/lib/stackone/models/shared/scorecard.rb +0 -65
  161. data/lib/stackone/models/shared/scorecardsection.rb +0 -31
  162. data/lib/stackone/models/shared/scorecardspaginated.rb +0 -34
  163. data/lib/stackone/models/shared/sociallink.rb +0 -28
  164. data/lib/stackone/models/shared/template.rb +0 -37
  165. data/lib/stackone/models/shared/templateresult.rb +0 -29
  166. data/lib/stackone/models/shared/templatespaginated.rb +0 -34
  167. data/lib/stackone/models/shared/updateresult.rb +0 -31
  168. data/lib/stackone/models/shared/user.rb +0 -40
  169. data/lib/stackone/models/shared/userresult.rb +0 -29
  170. data/lib/stackone/models/shared/userspaginated.rb +0 -34
data/lib/stackone/ats.rb DELETED
@@ -1,1289 +0,0 @@
1
- # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
-
3
- # typed: true
4
- # frozen_string_literal: true
5
-
6
- require 'faraday'
7
- require 'faraday/multipart'
8
- require 'sorbet-runtime'
9
-
10
- module StackOne
11
- extend T::Sig
12
- class Ats
13
-
14
- extend T::Sig
15
- sig { params(sdk_config: SDKConfiguration).void }
16
- def initialize(sdk_config)
17
- @sdk_configuration = sdk_config
18
- end
19
-
20
- sig { params(ats_create_application_request_dto: Shared::AtsCreateApplicationRequestDto, x_account_id: String).returns(Utils::FieldAugmented) }
21
- def create_application(ats_create_application_request_dto, x_account_id)
22
- # create_application - Create Application
23
- request = Operations::AtsCreateApplicationRequest.new(
24
-
25
- ats_create_application_request_dto: ats_create_application_request_dto,
26
- x_account_id: x_account_id
27
- )
28
- url, params = @sdk_configuration.get_server_details
29
- base_url = Utils.template_url(url, params)
30
- url = "#{base_url}/unified/ats/applications"
31
- headers = Utils.get_headers(request)
32
- req_content_type, data, form = Utils.serialize_request_body(request, :ats_create_application_request_dto, :json)
33
- headers['content-type'] = req_content_type
34
- raise StandardError, 'request body is required' if data.nil? && form.nil?
35
- headers['Accept'] = 'application/json'
36
- headers['user-agent'] = @sdk_configuration.user_agent
37
-
38
- r = @sdk_configuration.client.post(url) do |req|
39
- req.headers = headers
40
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
41
- if form
42
- req.body = Utils.encode_form(form)
43
- elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
44
- req.body = URI.encode_www_form(data)
45
- else
46
- req.body = data
47
- end
48
- end
49
-
50
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
51
-
52
- res = Operations::AtsCreateApplicationResponse.new(
53
- status_code: r.status, content_type: content_type, raw_response: r
54
- )
55
- if r.status == 201
56
- if Utils.match_content_type(content_type, 'application/json')
57
- out = Utils.unmarshal_complex(r.env.response_body, Shared::CreateResult)
58
- res.create_result = out
59
- end
60
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
61
- end
62
- res
63
- end
64
-
65
- sig { params(ats_create_candidate_request_dto: Shared::AtsCreateCandidateRequestDto, x_account_id: String).returns(Utils::FieldAugmented) }
66
- def create_candidate(ats_create_candidate_request_dto, x_account_id)
67
- # create_candidate - Create Candidate (early access)
68
- request = Operations::AtsCreateCandidateRequest.new(
69
-
70
- ats_create_candidate_request_dto: ats_create_candidate_request_dto,
71
- x_account_id: x_account_id
72
- )
73
- url, params = @sdk_configuration.get_server_details
74
- base_url = Utils.template_url(url, params)
75
- url = "#{base_url}/unified/ats/candidates"
76
- headers = Utils.get_headers(request)
77
- req_content_type, data, form = Utils.serialize_request_body(request, :ats_create_candidate_request_dto, :json)
78
- headers['content-type'] = req_content_type
79
- raise StandardError, 'request body is required' if data.nil? && form.nil?
80
- headers['Accept'] = 'application/json'
81
- headers['user-agent'] = @sdk_configuration.user_agent
82
-
83
- r = @sdk_configuration.client.post(url) do |req|
84
- req.headers = headers
85
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
86
- if form
87
- req.body = Utils.encode_form(form)
88
- elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
89
- req.body = URI.encode_www_form(data)
90
- else
91
- req.body = data
92
- end
93
- end
94
-
95
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
96
-
97
- res = Operations::AtsCreateCandidateResponse.new(
98
- status_code: r.status, content_type: content_type, raw_response: r
99
- )
100
- if r.status == 200
101
- if Utils.match_content_type(content_type, 'application/json')
102
- out = Utils.unmarshal_complex(r.env.response_body, Shared::CandidateResult)
103
- res.candidate_result = out
104
- end
105
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
106
- end
107
- res
108
- end
109
-
110
- sig { params(ats_create_notes_request_dto: Shared::AtsCreateNotesRequestDto, id: String, x_account_id: String).returns(Utils::FieldAugmented) }
111
- def create_candidate_note(ats_create_notes_request_dto, id, x_account_id)
112
- # create_candidate_note - Create Candidate Note
113
- request = Operations::AtsCreateCandidateNoteRequest.new(
114
-
115
- ats_create_notes_request_dto: ats_create_notes_request_dto,
116
- id: id,
117
- x_account_id: x_account_id
118
- )
119
- url, params = @sdk_configuration.get_server_details
120
- base_url = Utils.template_url(url, params)
121
- url = Utils.generate_url(
122
- Operations::AtsCreateCandidateNoteRequest,
123
- base_url,
124
- '/unified/ats/candidates/{id}/notes',
125
- request
126
- )
127
- headers = Utils.get_headers(request)
128
- req_content_type, data, form = Utils.serialize_request_body(request, :ats_create_notes_request_dto, :json)
129
- headers['content-type'] = req_content_type
130
- raise StandardError, 'request body is required' if data.nil? && form.nil?
131
- headers['Accept'] = 'application/json'
132
- headers['user-agent'] = @sdk_configuration.user_agent
133
-
134
- r = @sdk_configuration.client.post(url) do |req|
135
- req.headers = headers
136
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
137
- if form
138
- req.body = Utils.encode_form(form)
139
- elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
140
- req.body = URI.encode_www_form(data)
141
- else
142
- req.body = data
143
- end
144
- end
145
-
146
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
147
-
148
- res = Operations::AtsCreateCandidateNoteResponse.new(
149
- status_code: r.status, content_type: content_type, raw_response: r
150
- )
151
- if r.status == 201
152
- if Utils.match_content_type(content_type, 'application/json')
153
- out = Utils.unmarshal_complex(r.env.response_body, Shared::CreateCandidateNoteResult)
154
- res.create_candidate_note_result = out
155
- end
156
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
157
- end
158
- res
159
- end
160
-
161
- sig { params(ats_create_offer_request_dto: Shared::AtsCreateOfferRequestDto, x_account_id: String).returns(Utils::FieldAugmented) }
162
- def create_offer(ats_create_offer_request_dto, x_account_id)
163
- # create_offer - Creates an offer
164
- request = Operations::AtsCreateOfferRequest.new(
165
-
166
- ats_create_offer_request_dto: ats_create_offer_request_dto,
167
- x_account_id: x_account_id
168
- )
169
- url, params = @sdk_configuration.get_server_details
170
- base_url = Utils.template_url(url, params)
171
- url = "#{base_url}/unified/ats/offers"
172
- headers = Utils.get_headers(request)
173
- req_content_type, data, form = Utils.serialize_request_body(request, :ats_create_offer_request_dto, :json)
174
- headers['content-type'] = req_content_type
175
- raise StandardError, 'request body is required' if data.nil? && form.nil?
176
- headers['Accept'] = 'application/json'
177
- headers['user-agent'] = @sdk_configuration.user_agent
178
-
179
- r = @sdk_configuration.client.post(url) do |req|
180
- req.headers = headers
181
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
182
- if form
183
- req.body = Utils.encode_form(form)
184
- elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
185
- req.body = URI.encode_www_form(data)
186
- else
187
- req.body = data
188
- end
189
- end
190
-
191
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
192
-
193
- res = Operations::AtsCreateOfferResponse.new(
194
- status_code: r.status, content_type: content_type, raw_response: r
195
- )
196
- if r.status == 200
197
- if Utils.match_content_type(content_type, 'application/json')
198
- out = Utils.unmarshal_complex(r.env.response_body, Shared::CreateOfferResult)
199
- res.create_offer_result = out
200
- end
201
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
202
- end
203
- res
204
- end
205
-
206
- sig { params(request: T.nilable(Operations::AtsGetApplicationRequest)).returns(Utils::FieldAugmented) }
207
- def get_application(request)
208
- # get_application - Get Application
209
- url, params = @sdk_configuration.get_server_details
210
- base_url = Utils.template_url(url, params)
211
- url = Utils.generate_url(
212
- Operations::AtsGetApplicationRequest,
213
- base_url,
214
- '/unified/ats/applications/{id}',
215
- request
216
- )
217
- headers = Utils.get_headers(request)
218
- query_params = Utils.get_query_params(Operations::AtsGetApplicationRequest, request)
219
- headers['Accept'] = 'application/json'
220
- headers['user-agent'] = @sdk_configuration.user_agent
221
-
222
- r = @sdk_configuration.client.get(url) do |req|
223
- req.headers = headers
224
- req.params = query_params
225
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
226
- end
227
-
228
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
229
-
230
- res = Operations::AtsGetApplicationResponse.new(
231
- status_code: r.status, content_type: content_type, raw_response: r
232
- )
233
- if r.status == 200
234
- if Utils.match_content_type(content_type, 'application/json')
235
- out = Utils.unmarshal_complex(r.env.response_body, Shared::ApplicationResult)
236
- res.application_result = out
237
- end
238
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
239
- end
240
- res
241
- end
242
-
243
- sig { params(request: T.nilable(Operations::AtsGetApplicationOfferRequest)).returns(Utils::FieldAugmented) }
244
- def get_application_offer(request)
245
- # get_application_offer - Get Application Offer
246
- url, params = @sdk_configuration.get_server_details
247
- base_url = Utils.template_url(url, params)
248
- url = Utils.generate_url(
249
- Operations::AtsGetApplicationOfferRequest,
250
- base_url,
251
- '/unified/ats/applications/{id}/offers/{subResourceId}',
252
- request
253
- )
254
- headers = Utils.get_headers(request)
255
- query_params = Utils.get_query_params(Operations::AtsGetApplicationOfferRequest, request)
256
- headers['Accept'] = 'application/json'
257
- headers['user-agent'] = @sdk_configuration.user_agent
258
-
259
- r = @sdk_configuration.client.get(url) do |req|
260
- req.headers = headers
261
- req.params = query_params
262
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
263
- end
264
-
265
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
266
-
267
- res = Operations::AtsGetApplicationOfferResponse.new(
268
- status_code: r.status, content_type: content_type, raw_response: r
269
- )
270
- if r.status == 200
271
- if Utils.match_content_type(content_type, 'application/json')
272
- out = Utils.unmarshal_complex(r.env.response_body, Shared::OffersResult)
273
- res.offers_result = out
274
- end
275
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
276
- end
277
- res
278
- end
279
-
280
- sig { params(request: T.nilable(Operations::AtsGetApplicationScorecardRequest)).returns(Utils::FieldAugmented) }
281
- def get_application_scorecard(request)
282
- # get_application_scorecard - Get Application Scorecard
283
- url, params = @sdk_configuration.get_server_details
284
- base_url = Utils.template_url(url, params)
285
- url = Utils.generate_url(
286
- Operations::AtsGetApplicationScorecardRequest,
287
- base_url,
288
- '/unified/ats/applications/{id}/scorecards/{subResourceId}',
289
- request
290
- )
291
- headers = Utils.get_headers(request)
292
- query_params = Utils.get_query_params(Operations::AtsGetApplicationScorecardRequest, request)
293
- headers['Accept'] = 'application/json'
294
- headers['user-agent'] = @sdk_configuration.user_agent
295
-
296
- r = @sdk_configuration.client.get(url) do |req|
297
- req.headers = headers
298
- req.params = query_params
299
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
300
- end
301
-
302
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
303
-
304
- res = Operations::AtsGetApplicationScorecardResponse.new(
305
- status_code: r.status, content_type: content_type, raw_response: r
306
- )
307
- if r.status == 200
308
- if Utils.match_content_type(content_type, 'application/json')
309
- out = Utils.unmarshal_complex(r.env.response_body, Shared::OffersResult)
310
- res.offers_result = out
311
- end
312
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
313
- end
314
- res
315
- end
316
-
317
- sig { params(request: T.nilable(Operations::AtsGetCandidateRequest)).returns(Utils::FieldAugmented) }
318
- def get_candidate(request)
319
- # get_candidate - Get Candidate
320
- url, params = @sdk_configuration.get_server_details
321
- base_url = Utils.template_url(url, params)
322
- url = Utils.generate_url(
323
- Operations::AtsGetCandidateRequest,
324
- base_url,
325
- '/unified/ats/candidates/{id}',
326
- request
327
- )
328
- headers = Utils.get_headers(request)
329
- query_params = Utils.get_query_params(Operations::AtsGetCandidateRequest, request)
330
- headers['Accept'] = 'application/json'
331
- headers['user-agent'] = @sdk_configuration.user_agent
332
-
333
- r = @sdk_configuration.client.get(url) do |req|
334
- req.headers = headers
335
- req.params = query_params
336
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
337
- end
338
-
339
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
340
-
341
- res = Operations::AtsGetCandidateResponse.new(
342
- status_code: r.status, content_type: content_type, raw_response: r
343
- )
344
- if r.status == 200
345
- if Utils.match_content_type(content_type, 'application/json')
346
- out = Utils.unmarshal_complex(r.env.response_body, Shared::CandidateResult)
347
- res.candidate_result = out
348
- end
349
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
350
- end
351
- res
352
- end
353
-
354
- sig { params(request: T.nilable(Operations::AtsGetCandidateNoteRequest)).returns(Utils::FieldAugmented) }
355
- def get_candidate_note(request)
356
- # get_candidate_note - Get Candidate Note
357
- url, params = @sdk_configuration.get_server_details
358
- base_url = Utils.template_url(url, params)
359
- url = Utils.generate_url(
360
- Operations::AtsGetCandidateNoteRequest,
361
- base_url,
362
- '/unified/ats/candidates/{id}/notes/{subResourceId}',
363
- request
364
- )
365
- headers = Utils.get_headers(request)
366
- query_params = Utils.get_query_params(Operations::AtsGetCandidateNoteRequest, request)
367
- headers['Accept'] = 'application/json'
368
- headers['user-agent'] = @sdk_configuration.user_agent
369
-
370
- r = @sdk_configuration.client.get(url) do |req|
371
- req.headers = headers
372
- req.params = query_params
373
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
374
- end
375
-
376
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
377
-
378
- res = Operations::AtsGetCandidateNoteResponse.new(
379
- status_code: r.status, content_type: content_type, raw_response: r
380
- )
381
- if r.status == 200
382
- if Utils.match_content_type(content_type, 'application/json')
383
- out = Utils.unmarshal_complex(r.env.response_body, Shared::NoteResult)
384
- res.note_result = out
385
- end
386
- elsif [400, 403, 429, 500, 501].include?(r.status)
387
- end
388
- res
389
- end
390
-
391
- sig { params(request: T.nilable(Operations::AtsGetDepartmentRequest)).returns(Utils::FieldAugmented) }
392
- def get_department(request)
393
- # get_department - Get Department
394
- url, params = @sdk_configuration.get_server_details
395
- base_url = Utils.template_url(url, params)
396
- url = Utils.generate_url(
397
- Operations::AtsGetDepartmentRequest,
398
- base_url,
399
- '/unified/ats/departments/{id}',
400
- request
401
- )
402
- headers = Utils.get_headers(request)
403
- query_params = Utils.get_query_params(Operations::AtsGetDepartmentRequest, request)
404
- headers['Accept'] = 'application/json'
405
- headers['user-agent'] = @sdk_configuration.user_agent
406
-
407
- r = @sdk_configuration.client.get(url) do |req|
408
- req.headers = headers
409
- req.params = query_params
410
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
411
- end
412
-
413
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
414
-
415
- res = Operations::AtsGetDepartmentResponse.new(
416
- status_code: r.status, content_type: content_type, raw_response: r
417
- )
418
- if r.status == 200
419
- if Utils.match_content_type(content_type, 'application/json')
420
- out = Utils.unmarshal_complex(r.env.response_body, Shared::DepartmentResult)
421
- res.department_result = out
422
- end
423
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
424
- end
425
- res
426
- end
427
-
428
- sig { params(request: T.nilable(Operations::AtsGetInterviewRequest)).returns(Utils::FieldAugmented) }
429
- def get_interview(request)
430
- # get_interview - Get Interview
431
- url, params = @sdk_configuration.get_server_details
432
- base_url = Utils.template_url(url, params)
433
- url = Utils.generate_url(
434
- Operations::AtsGetInterviewRequest,
435
- base_url,
436
- '/unified/ats/interviews/{id}',
437
- request
438
- )
439
- headers = Utils.get_headers(request)
440
- query_params = Utils.get_query_params(Operations::AtsGetInterviewRequest, request)
441
- headers['Accept'] = 'application/json'
442
- headers['user-agent'] = @sdk_configuration.user_agent
443
-
444
- r = @sdk_configuration.client.get(url) do |req|
445
- req.headers = headers
446
- req.params = query_params
447
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
448
- end
449
-
450
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
451
-
452
- res = Operations::AtsGetInterviewResponse.new(
453
- status_code: r.status, content_type: content_type, raw_response: r
454
- )
455
- if r.status == 200
456
- if Utils.match_content_type(content_type, 'application/json')
457
- out = Utils.unmarshal_complex(r.env.response_body, Shared::InterviewsResult)
458
- res.interviews_result = out
459
- end
460
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
461
- end
462
- res
463
- end
464
-
465
- sig { params(request: T.nilable(Operations::AtsGetInterviewStageRequest)).returns(Utils::FieldAugmented) }
466
- def get_interview_stage(request)
467
- # get_interview_stage - Get Interview Stage
468
- url, params = @sdk_configuration.get_server_details
469
- base_url = Utils.template_url(url, params)
470
- url = Utils.generate_url(
471
- Operations::AtsGetInterviewStageRequest,
472
- base_url,
473
- '/unified/ats/interview_stages/{id}',
474
- request
475
- )
476
- headers = Utils.get_headers(request)
477
- query_params = Utils.get_query_params(Operations::AtsGetInterviewStageRequest, request)
478
- headers['Accept'] = 'application/json'
479
- headers['user-agent'] = @sdk_configuration.user_agent
480
-
481
- r = @sdk_configuration.client.get(url) do |req|
482
- req.headers = headers
483
- req.params = query_params
484
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
485
- end
486
-
487
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
488
-
489
- res = Operations::AtsGetInterviewStageResponse.new(
490
- status_code: r.status, content_type: content_type, raw_response: r
491
- )
492
- if r.status == 200
493
- if Utils.match_content_type(content_type, 'application/json')
494
- out = Utils.unmarshal_complex(r.env.response_body, Shared::InterviewStageResult)
495
- res.interview_stage_result = out
496
- end
497
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
498
- end
499
- res
500
- end
501
-
502
- sig { params(request: T.nilable(Operations::AtsGetJobRequest)).returns(Utils::FieldAugmented) }
503
- def get_job(request)
504
- # get_job - Get Job
505
- url, params = @sdk_configuration.get_server_details
506
- base_url = Utils.template_url(url, params)
507
- url = Utils.generate_url(
508
- Operations::AtsGetJobRequest,
509
- base_url,
510
- '/unified/ats/jobs/{id}',
511
- request
512
- )
513
- headers = Utils.get_headers(request)
514
- query_params = Utils.get_query_params(Operations::AtsGetJobRequest, request)
515
- headers['Accept'] = 'application/json'
516
- headers['user-agent'] = @sdk_configuration.user_agent
517
-
518
- r = @sdk_configuration.client.get(url) do |req|
519
- req.headers = headers
520
- req.params = query_params
521
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
522
- end
523
-
524
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
525
-
526
- res = Operations::AtsGetJobResponse.new(
527
- status_code: r.status, content_type: content_type, raw_response: r
528
- )
529
- if r.status == 200
530
- if Utils.match_content_type(content_type, 'application/json')
531
- out = Utils.unmarshal_complex(r.env.response_body, Shared::JobResult)
532
- res.job_result = out
533
- end
534
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
535
- end
536
- res
537
- end
538
-
539
- sig { params(request: T.nilable(Operations::AtsGetJobPostingRequest)).returns(Utils::FieldAugmented) }
540
- def get_job_posting(request)
541
- # get_job_posting - Get Job Posting
542
- url, params = @sdk_configuration.get_server_details
543
- base_url = Utils.template_url(url, params)
544
- url = Utils.generate_url(
545
- Operations::AtsGetJobPostingRequest,
546
- base_url,
547
- '/unified/ats/job_postings/{id}',
548
- request
549
- )
550
- headers = Utils.get_headers(request)
551
- query_params = Utils.get_query_params(Operations::AtsGetJobPostingRequest, request)
552
- headers['Accept'] = 'application/json'
553
- headers['user-agent'] = @sdk_configuration.user_agent
554
-
555
- r = @sdk_configuration.client.get(url) do |req|
556
- req.headers = headers
557
- req.params = query_params
558
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
559
- end
560
-
561
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
562
-
563
- res = Operations::AtsGetJobPostingResponse.new(
564
- status_code: r.status, content_type: content_type, raw_response: r
565
- )
566
- if r.status == 200
567
- if Utils.match_content_type(content_type, 'application/json')
568
- out = Utils.unmarshal_complex(r.env.response_body, Shared::JobPostingResult)
569
- res.job_posting_result = out
570
- end
571
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
572
- end
573
- res
574
- end
575
-
576
- sig { params(request: T.nilable(Operations::AtsGetLocationRequest)).returns(Utils::FieldAugmented) }
577
- def get_location(request)
578
- # get_location - Get Location
579
- url, params = @sdk_configuration.get_server_details
580
- base_url = Utils.template_url(url, params)
581
- url = Utils.generate_url(
582
- Operations::AtsGetLocationRequest,
583
- base_url,
584
- '/unified/ats/locations/{id}',
585
- request
586
- )
587
- headers = Utils.get_headers(request)
588
- query_params = Utils.get_query_params(Operations::AtsGetLocationRequest, request)
589
- headers['Accept'] = 'application/json'
590
- headers['user-agent'] = @sdk_configuration.user_agent
591
-
592
- r = @sdk_configuration.client.get(url) do |req|
593
- req.headers = headers
594
- req.params = query_params
595
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
596
- end
597
-
598
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
599
-
600
- res = Operations::AtsGetLocationResponse.new(
601
- status_code: r.status, content_type: content_type, raw_response: r
602
- )
603
- if r.status == 200
604
- if Utils.match_content_type(content_type, 'application/json')
605
- out = Utils.unmarshal_complex(r.env.response_body, Shared::ATSLocationResult)
606
- res.ats_location_result = out
607
- end
608
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
609
- end
610
- res
611
- end
612
-
613
- sig { params(request: T.nilable(Operations::AtsGetOfferRequest)).returns(Utils::FieldAugmented) }
614
- def get_offer(request)
615
- # get_offer - Get Offer
616
- url, params = @sdk_configuration.get_server_details
617
- base_url = Utils.template_url(url, params)
618
- url = Utils.generate_url(
619
- Operations::AtsGetOfferRequest,
620
- base_url,
621
- '/unified/ats/offers/{id}',
622
- request
623
- )
624
- headers = Utils.get_headers(request)
625
- query_params = Utils.get_query_params(Operations::AtsGetOfferRequest, request)
626
- headers['Accept'] = 'application/json'
627
- headers['user-agent'] = @sdk_configuration.user_agent
628
-
629
- r = @sdk_configuration.client.get(url) do |req|
630
- req.headers = headers
631
- req.params = query_params
632
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
633
- end
634
-
635
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
636
-
637
- res = Operations::AtsGetOfferResponse.new(
638
- status_code: r.status, content_type: content_type, raw_response: r
639
- )
640
- if r.status == 200
641
- if Utils.match_content_type(content_type, 'application/json')
642
- out = Utils.unmarshal_complex(r.env.response_body, Shared::OffersResult)
643
- res.offers_result = out
644
- end
645
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
646
- end
647
- res
648
- end
649
-
650
- sig { params(request: T.nilable(Operations::AtsGetRejectedReasonRequest)).returns(Utils::FieldAugmented) }
651
- def get_rejected_reason(request)
652
- # get_rejected_reason - Get Rejected Reason
653
- url, params = @sdk_configuration.get_server_details
654
- base_url = Utils.template_url(url, params)
655
- url = Utils.generate_url(
656
- Operations::AtsGetRejectedReasonRequest,
657
- base_url,
658
- '/unified/ats/rejected_reasons/{id}',
659
- request
660
- )
661
- headers = Utils.get_headers(request)
662
- query_params = Utils.get_query_params(Operations::AtsGetRejectedReasonRequest, request)
663
- headers['Accept'] = 'application/json'
664
- headers['user-agent'] = @sdk_configuration.user_agent
665
-
666
- r = @sdk_configuration.client.get(url) do |req|
667
- req.headers = headers
668
- req.params = query_params
669
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
670
- end
671
-
672
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
673
-
674
- res = Operations::AtsGetRejectedReasonResponse.new(
675
- status_code: r.status, content_type: content_type, raw_response: r
676
- )
677
- if r.status == 200
678
- if Utils.match_content_type(content_type, 'application/json')
679
- out = Utils.unmarshal_complex(r.env.response_body, Shared::RejectedReasonResult)
680
- res.rejected_reason_result = out
681
- end
682
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
683
- end
684
- res
685
- end
686
-
687
- sig { params(request: T.nilable(Operations::AtsGetUserRequest)).returns(Utils::FieldAugmented) }
688
- def get_user(request)
689
- # get_user - Get User
690
- url, params = @sdk_configuration.get_server_details
691
- base_url = Utils.template_url(url, params)
692
- url = Utils.generate_url(
693
- Operations::AtsGetUserRequest,
694
- base_url,
695
- '/unified/ats/users/{id}',
696
- request
697
- )
698
- headers = Utils.get_headers(request)
699
- query_params = Utils.get_query_params(Operations::AtsGetUserRequest, request)
700
- headers['Accept'] = 'application/json'
701
- headers['user-agent'] = @sdk_configuration.user_agent
702
-
703
- r = @sdk_configuration.client.get(url) do |req|
704
- req.headers = headers
705
- req.params = query_params
706
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
707
- end
708
-
709
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
710
-
711
- res = Operations::AtsGetUserResponse.new(
712
- status_code: r.status, content_type: content_type, raw_response: r
713
- )
714
- if r.status == 200
715
- if Utils.match_content_type(content_type, 'application/json')
716
- out = Utils.unmarshal_complex(r.env.response_body, Shared::UserResult)
717
- res.user_result = out
718
- end
719
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
720
- end
721
- res
722
- end
723
-
724
- sig { params(request: T.nilable(Operations::AtsListApplicationScorecardsRequest)).returns(Utils::FieldAugmented) }
725
- def list_application_scorecards(request)
726
- # list_application_scorecards - List Application Scorecards
727
- url, params = @sdk_configuration.get_server_details
728
- base_url = Utils.template_url(url, params)
729
- url = Utils.generate_url(
730
- Operations::AtsListApplicationScorecardsRequest,
731
- base_url,
732
- '/unified/ats/applications/{id}/scorecards',
733
- request
734
- )
735
- headers = Utils.get_headers(request)
736
- query_params = Utils.get_query_params(Operations::AtsListApplicationScorecardsRequest, request)
737
- headers['Accept'] = 'application/json'
738
- headers['user-agent'] = @sdk_configuration.user_agent
739
-
740
- r = @sdk_configuration.client.get(url) do |req|
741
- req.headers = headers
742
- req.params = query_params
743
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
744
- end
745
-
746
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
747
-
748
- res = Operations::AtsListApplicationScorecardsResponse.new(
749
- status_code: r.status, content_type: content_type, raw_response: r
750
- )
751
- if r.status == 200
752
- if Utils.match_content_type(content_type, 'application/json')
753
- out = Utils.unmarshal_complex(r.env.response_body, Shared::ScorecardsPaginated)
754
- res.scorecards_paginated = out
755
- end
756
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
757
- end
758
- res
759
- end
760
-
761
- sig { params(request: T.nilable(Operations::AtsListApplicationsRequest)).returns(Utils::FieldAugmented) }
762
- def list_applications(request)
763
- # list_applications - List Applications
764
- url, params = @sdk_configuration.get_server_details
765
- base_url = Utils.template_url(url, params)
766
- url = "#{base_url}/unified/ats/applications"
767
- headers = Utils.get_headers(request)
768
- query_params = Utils.get_query_params(Operations::AtsListApplicationsRequest, request)
769
- headers['Accept'] = 'application/json'
770
- headers['user-agent'] = @sdk_configuration.user_agent
771
-
772
- r = @sdk_configuration.client.get(url) do |req|
773
- req.headers = headers
774
- req.params = query_params
775
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
776
- end
777
-
778
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
779
-
780
- res = Operations::AtsListApplicationsResponse.new(
781
- status_code: r.status, content_type: content_type, raw_response: r
782
- )
783
- if r.status == 200
784
- if Utils.match_content_type(content_type, 'application/json')
785
- out = Utils.unmarshal_complex(r.env.response_body, Shared::ApplicationsPaginated)
786
- res.applications_paginated = out
787
- end
788
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
789
- end
790
- res
791
- end
792
-
793
- sig { params(request: T.nilable(Operations::AtsListApplicationsOffersRequest)).returns(Utils::FieldAugmented) }
794
- def list_applications_offers(request)
795
- # list_applications_offers - List Application Offers
796
- url, params = @sdk_configuration.get_server_details
797
- base_url = Utils.template_url(url, params)
798
- url = Utils.generate_url(
799
- Operations::AtsListApplicationsOffersRequest,
800
- base_url,
801
- '/unified/ats/applications/{id}/offers',
802
- request
803
- )
804
- headers = Utils.get_headers(request)
805
- query_params = Utils.get_query_params(Operations::AtsListApplicationsOffersRequest, request)
806
- headers['Accept'] = 'application/json'
807
- headers['user-agent'] = @sdk_configuration.user_agent
808
-
809
- r = @sdk_configuration.client.get(url) do |req|
810
- req.headers = headers
811
- req.params = query_params
812
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
813
- end
814
-
815
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
816
-
817
- res = Operations::AtsListApplicationsOffersResponse.new(
818
- status_code: r.status, content_type: content_type, raw_response: r
819
- )
820
- if r.status == 200
821
- if Utils.match_content_type(content_type, 'application/json')
822
- out = Utils.unmarshal_complex(r.env.response_body, Shared::OffersPaginated)
823
- res.offers_paginated = out
824
- end
825
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
826
- end
827
- res
828
- end
829
-
830
- sig { params(request: T.nilable(Operations::AtsListCandidateNotesRequest)).returns(Utils::FieldAugmented) }
831
- def list_candidate_notes(request)
832
- # list_candidate_notes - List Candidate Notes
833
- url, params = @sdk_configuration.get_server_details
834
- base_url = Utils.template_url(url, params)
835
- url = Utils.generate_url(
836
- Operations::AtsListCandidateNotesRequest,
837
- base_url,
838
- '/unified/ats/candidates/{id}/notes',
839
- request
840
- )
841
- headers = Utils.get_headers(request)
842
- query_params = Utils.get_query_params(Operations::AtsListCandidateNotesRequest, request)
843
- headers['Accept'] = 'application/json'
844
- headers['user-agent'] = @sdk_configuration.user_agent
845
-
846
- r = @sdk_configuration.client.get(url) do |req|
847
- req.headers = headers
848
- req.params = query_params
849
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
850
- end
851
-
852
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
853
-
854
- res = Operations::AtsListCandidateNotesResponse.new(
855
- status_code: r.status, content_type: content_type, raw_response: r
856
- )
857
- if r.status == 200
858
- if Utils.match_content_type(content_type, 'application/json')
859
- out = Utils.unmarshal_complex(r.env.response_body, Shared::NotesPaginated)
860
- res.notes_paginated = out
861
- end
862
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
863
- end
864
- res
865
- end
866
-
867
- sig { params(request: T.nilable(Operations::AtsListCandidatesRequest)).returns(Utils::FieldAugmented) }
868
- def list_candidates(request)
869
- # list_candidates - List Candidates
870
- url, params = @sdk_configuration.get_server_details
871
- base_url = Utils.template_url(url, params)
872
- url = "#{base_url}/unified/ats/candidates"
873
- headers = Utils.get_headers(request)
874
- query_params = Utils.get_query_params(Operations::AtsListCandidatesRequest, request)
875
- headers['Accept'] = 'application/json'
876
- headers['user-agent'] = @sdk_configuration.user_agent
877
-
878
- r = @sdk_configuration.client.get(url) do |req|
879
- req.headers = headers
880
- req.params = query_params
881
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
882
- end
883
-
884
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
885
-
886
- res = Operations::AtsListCandidatesResponse.new(
887
- status_code: r.status, content_type: content_type, raw_response: r
888
- )
889
- if r.status == 200
890
- if Utils.match_content_type(content_type, 'application/json')
891
- out = Utils.unmarshal_complex(r.env.response_body, Shared::CandidatesPaginated)
892
- res.candidates_paginated = out
893
- end
894
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
895
- end
896
- res
897
- end
898
-
899
- sig { params(request: T.nilable(Operations::AtsListDepartmentsRequest)).returns(Utils::FieldAugmented) }
900
- def list_departments(request)
901
- # list_departments - List Departments
902
- url, params = @sdk_configuration.get_server_details
903
- base_url = Utils.template_url(url, params)
904
- url = "#{base_url}/unified/ats/departments"
905
- headers = Utils.get_headers(request)
906
- query_params = Utils.get_query_params(Operations::AtsListDepartmentsRequest, request)
907
- headers['Accept'] = 'application/json'
908
- headers['user-agent'] = @sdk_configuration.user_agent
909
-
910
- r = @sdk_configuration.client.get(url) do |req|
911
- req.headers = headers
912
- req.params = query_params
913
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
914
- end
915
-
916
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
917
-
918
- res = Operations::AtsListDepartmentsResponse.new(
919
- status_code: r.status, content_type: content_type, raw_response: r
920
- )
921
- if r.status == 200
922
- if Utils.match_content_type(content_type, 'application/json')
923
- out = Utils.unmarshal_complex(r.env.response_body, Shared::DepartmentsPaginated)
924
- res.departments_paginated = out
925
- end
926
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
927
- end
928
- res
929
- end
930
-
931
- sig { params(request: T.nilable(Operations::AtsListInterviewStagesRequest)).returns(Utils::FieldAugmented) }
932
- def list_interview_stages(request)
933
- # list_interview_stages - List Interview Stages
934
- url, params = @sdk_configuration.get_server_details
935
- base_url = Utils.template_url(url, params)
936
- url = "#{base_url}/unified/ats/interview_stages"
937
- headers = Utils.get_headers(request)
938
- query_params = Utils.get_query_params(Operations::AtsListInterviewStagesRequest, request)
939
- headers['Accept'] = 'application/json'
940
- headers['user-agent'] = @sdk_configuration.user_agent
941
-
942
- r = @sdk_configuration.client.get(url) do |req|
943
- req.headers = headers
944
- req.params = query_params
945
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
946
- end
947
-
948
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
949
-
950
- res = Operations::AtsListInterviewStagesResponse.new(
951
- status_code: r.status, content_type: content_type, raw_response: r
952
- )
953
- if r.status == 200
954
- if Utils.match_content_type(content_type, 'application/json')
955
- out = Utils.unmarshal_complex(r.env.response_body, Shared::InterviewStagesPaginated)
956
- res.interview_stages_paginated = out
957
- end
958
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
959
- end
960
- res
961
- end
962
-
963
- sig { params(request: T.nilable(Operations::AtsListInterviewsRequest)).returns(Utils::FieldAugmented) }
964
- def list_interviews(request)
965
- # list_interviews - List Interviews
966
- url, params = @sdk_configuration.get_server_details
967
- base_url = Utils.template_url(url, params)
968
- url = "#{base_url}/unified/ats/interviews"
969
- headers = Utils.get_headers(request)
970
- query_params = Utils.get_query_params(Operations::AtsListInterviewsRequest, request)
971
- headers['Accept'] = 'application/json'
972
- headers['user-agent'] = @sdk_configuration.user_agent
973
-
974
- r = @sdk_configuration.client.get(url) do |req|
975
- req.headers = headers
976
- req.params = query_params
977
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
978
- end
979
-
980
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
981
-
982
- res = Operations::AtsListInterviewsResponse.new(
983
- status_code: r.status, content_type: content_type, raw_response: r
984
- )
985
- if r.status == 200
986
- if Utils.match_content_type(content_type, 'application/json')
987
- out = Utils.unmarshal_complex(r.env.response_body, Shared::InterviewsPaginated)
988
- res.interviews_paginated = out
989
- end
990
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
991
- end
992
- res
993
- end
994
-
995
- sig { params(request: T.nilable(Operations::AtsListJobPostingsRequest)).returns(Utils::FieldAugmented) }
996
- def list_job_postings(request)
997
- # list_job_postings - List Job Postings
998
- url, params = @sdk_configuration.get_server_details
999
- base_url = Utils.template_url(url, params)
1000
- url = "#{base_url}/unified/ats/job_postings"
1001
- headers = Utils.get_headers(request)
1002
- query_params = Utils.get_query_params(Operations::AtsListJobPostingsRequest, request)
1003
- headers['Accept'] = 'application/json'
1004
- headers['user-agent'] = @sdk_configuration.user_agent
1005
-
1006
- r = @sdk_configuration.client.get(url) do |req|
1007
- req.headers = headers
1008
- req.params = query_params
1009
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
1010
- end
1011
-
1012
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
1013
-
1014
- res = Operations::AtsListJobPostingsResponse.new(
1015
- status_code: r.status, content_type: content_type, raw_response: r
1016
- )
1017
- if r.status == 200
1018
- if Utils.match_content_type(content_type, 'application/json')
1019
- out = Utils.unmarshal_complex(r.env.response_body, Shared::JobPostingsPaginated)
1020
- res.job_postings_paginated = out
1021
- end
1022
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
1023
- end
1024
- res
1025
- end
1026
-
1027
- sig { params(request: T.nilable(Operations::AtsListJobsRequest)).returns(Utils::FieldAugmented) }
1028
- def list_jobs(request)
1029
- # list_jobs - List Jobs
1030
- url, params = @sdk_configuration.get_server_details
1031
- base_url = Utils.template_url(url, params)
1032
- url = "#{base_url}/unified/ats/jobs"
1033
- headers = Utils.get_headers(request)
1034
- query_params = Utils.get_query_params(Operations::AtsListJobsRequest, request)
1035
- headers['Accept'] = 'application/json'
1036
- headers['user-agent'] = @sdk_configuration.user_agent
1037
-
1038
- r = @sdk_configuration.client.get(url) do |req|
1039
- req.headers = headers
1040
- req.params = query_params
1041
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
1042
- end
1043
-
1044
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
1045
-
1046
- res = Operations::AtsListJobsResponse.new(
1047
- status_code: r.status, content_type: content_type, raw_response: r
1048
- )
1049
- if r.status == 200
1050
- if Utils.match_content_type(content_type, 'application/json')
1051
- out = Utils.unmarshal_complex(r.env.response_body, Shared::JobsPaginated)
1052
- res.jobs_paginated = out
1053
- end
1054
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
1055
- end
1056
- res
1057
- end
1058
-
1059
- sig { params(request: T.nilable(Operations::AtsListLocationsRequest)).returns(Utils::FieldAugmented) }
1060
- def list_locations(request)
1061
- # list_locations - List locations
1062
- url, params = @sdk_configuration.get_server_details
1063
- base_url = Utils.template_url(url, params)
1064
- url = "#{base_url}/unified/ats/locations"
1065
- headers = Utils.get_headers(request)
1066
- query_params = Utils.get_query_params(Operations::AtsListLocationsRequest, request)
1067
- headers['Accept'] = 'application/json'
1068
- headers['user-agent'] = @sdk_configuration.user_agent
1069
-
1070
- r = @sdk_configuration.client.get(url) do |req|
1071
- req.headers = headers
1072
- req.params = query_params
1073
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
1074
- end
1075
-
1076
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
1077
-
1078
- res = Operations::AtsListLocationsResponse.new(
1079
- status_code: r.status, content_type: content_type, raw_response: r
1080
- )
1081
- if r.status == 200
1082
- if Utils.match_content_type(content_type, 'application/json')
1083
- out = Utils.unmarshal_complex(r.env.response_body, Shared::ATSLocationsPaginated)
1084
- res.ats_locations_paginated = out
1085
- end
1086
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
1087
- end
1088
- res
1089
- end
1090
-
1091
- sig { params(request: T.nilable(Operations::AtsListOffersRequest)).returns(Utils::FieldAugmented) }
1092
- def list_offers(request)
1093
- # list_offers - List Offers
1094
- url, params = @sdk_configuration.get_server_details
1095
- base_url = Utils.template_url(url, params)
1096
- url = "#{base_url}/unified/ats/offers"
1097
- headers = Utils.get_headers(request)
1098
- query_params = Utils.get_query_params(Operations::AtsListOffersRequest, request)
1099
- headers['Accept'] = 'application/json'
1100
- headers['user-agent'] = @sdk_configuration.user_agent
1101
-
1102
- r = @sdk_configuration.client.get(url) do |req|
1103
- req.headers = headers
1104
- req.params = query_params
1105
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
1106
- end
1107
-
1108
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
1109
-
1110
- res = Operations::AtsListOffersResponse.new(
1111
- status_code: r.status, content_type: content_type, raw_response: r
1112
- )
1113
- if r.status == 200
1114
- if Utils.match_content_type(content_type, 'application/json')
1115
- out = Utils.unmarshal_complex(r.env.response_body, Shared::OffersPaginated)
1116
- res.offers_paginated = out
1117
- end
1118
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
1119
- end
1120
- res
1121
- end
1122
-
1123
- sig { params(request: T.nilable(Operations::AtsListRejectedReasonsRequest)).returns(Utils::FieldAugmented) }
1124
- def list_rejected_reasons(request)
1125
- # list_rejected_reasons - List Rejected Reasons
1126
- url, params = @sdk_configuration.get_server_details
1127
- base_url = Utils.template_url(url, params)
1128
- url = "#{base_url}/unified/ats/rejected_reasons"
1129
- headers = Utils.get_headers(request)
1130
- query_params = Utils.get_query_params(Operations::AtsListRejectedReasonsRequest, request)
1131
- headers['Accept'] = 'application/json'
1132
- headers['user-agent'] = @sdk_configuration.user_agent
1133
-
1134
- r = @sdk_configuration.client.get(url) do |req|
1135
- req.headers = headers
1136
- req.params = query_params
1137
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
1138
- end
1139
-
1140
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
1141
-
1142
- res = Operations::AtsListRejectedReasonsResponse.new(
1143
- status_code: r.status, content_type: content_type, raw_response: r
1144
- )
1145
- if r.status == 200
1146
- if Utils.match_content_type(content_type, 'application/json')
1147
- out = Utils.unmarshal_complex(r.env.response_body, Shared::RejectedReasonsPaginated)
1148
- res.rejected_reasons_paginated = out
1149
- end
1150
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
1151
- end
1152
- res
1153
- end
1154
-
1155
- sig { params(request: T.nilable(Operations::AtsListUsersRequest)).returns(Utils::FieldAugmented) }
1156
- def list_users(request)
1157
- # list_users - List Users
1158
- url, params = @sdk_configuration.get_server_details
1159
- base_url = Utils.template_url(url, params)
1160
- url = "#{base_url}/unified/ats/users"
1161
- headers = Utils.get_headers(request)
1162
- query_params = Utils.get_query_params(Operations::AtsListUsersRequest, request)
1163
- headers['Accept'] = 'application/json'
1164
- headers['user-agent'] = @sdk_configuration.user_agent
1165
-
1166
- r = @sdk_configuration.client.get(url) do |req|
1167
- req.headers = headers
1168
- req.params = query_params
1169
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
1170
- end
1171
-
1172
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
1173
-
1174
- res = Operations::AtsListUsersResponse.new(
1175
- status_code: r.status, content_type: content_type, raw_response: r
1176
- )
1177
- if r.status == 200
1178
- if Utils.match_content_type(content_type, 'application/json')
1179
- out = Utils.unmarshal_complex(r.env.response_body, Shared::UsersPaginated)
1180
- res.users_paginated = out
1181
- end
1182
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
1183
- end
1184
- res
1185
- end
1186
-
1187
- sig { params(ats_update_application_request_dto: Shared::AtsUpdateApplicationRequestDto, id: String, x_account_id: String).returns(Utils::FieldAugmented) }
1188
- def update_application(ats_update_application_request_dto, id, x_account_id)
1189
- # update_application - Update Application
1190
- request = Operations::AtsUpdateApplicationRequest.new(
1191
-
1192
- ats_update_application_request_dto: ats_update_application_request_dto,
1193
- id: id,
1194
- x_account_id: x_account_id
1195
- )
1196
- url, params = @sdk_configuration.get_server_details
1197
- base_url = Utils.template_url(url, params)
1198
- url = Utils.generate_url(
1199
- Operations::AtsUpdateApplicationRequest,
1200
- base_url,
1201
- '/unified/ats/applications/{id}',
1202
- request
1203
- )
1204
- headers = Utils.get_headers(request)
1205
- req_content_type, data, form = Utils.serialize_request_body(request, :ats_update_application_request_dto, :json)
1206
- headers['content-type'] = req_content_type
1207
- raise StandardError, 'request body is required' if data.nil? && form.nil?
1208
- headers['Accept'] = 'application/json'
1209
- headers['user-agent'] = @sdk_configuration.user_agent
1210
-
1211
- r = @sdk_configuration.client.patch(url) do |req|
1212
- req.headers = headers
1213
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
1214
- if form
1215
- req.body = Utils.encode_form(form)
1216
- elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
1217
- req.body = URI.encode_www_form(data)
1218
- else
1219
- req.body = data
1220
- end
1221
- end
1222
-
1223
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
1224
-
1225
- res = Operations::AtsUpdateApplicationResponse.new(
1226
- status_code: r.status, content_type: content_type, raw_response: r
1227
- )
1228
- if r.status == 200
1229
- if Utils.match_content_type(content_type, 'application/json')
1230
- out = Utils.unmarshal_complex(r.env.response_body, Shared::UpdateResult)
1231
- res.update_result = out
1232
- end
1233
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
1234
- end
1235
- res
1236
- end
1237
-
1238
- sig { params(ats_update_candidates_request_dto: Shared::AtsUpdateCandidatesRequestDto, id: String, x_account_id: String).returns(Utils::FieldAugmented) }
1239
- def update_candidate(ats_update_candidates_request_dto, id, x_account_id)
1240
- # update_candidate - Update Candidate (early access)
1241
- request = Operations::AtsUpdateCandidateRequest.new(
1242
-
1243
- ats_update_candidates_request_dto: ats_update_candidates_request_dto,
1244
- id: id,
1245
- x_account_id: x_account_id
1246
- )
1247
- url, params = @sdk_configuration.get_server_details
1248
- base_url = Utils.template_url(url, params)
1249
- url = Utils.generate_url(
1250
- Operations::AtsUpdateCandidateRequest,
1251
- base_url,
1252
- '/unified/ats/candidates/{id}',
1253
- request
1254
- )
1255
- headers = Utils.get_headers(request)
1256
- req_content_type, data, form = Utils.serialize_request_body(request, :ats_update_candidates_request_dto, :json)
1257
- headers['content-type'] = req_content_type
1258
- raise StandardError, 'request body is required' if data.nil? && form.nil?
1259
- headers['Accept'] = 'application/json'
1260
- headers['user-agent'] = @sdk_configuration.user_agent
1261
-
1262
- r = @sdk_configuration.client.patch(url) do |req|
1263
- req.headers = headers
1264
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
1265
- if form
1266
- req.body = Utils.encode_form(form)
1267
- elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
1268
- req.body = URI.encode_www_form(data)
1269
- else
1270
- req.body = data
1271
- end
1272
- end
1273
-
1274
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
1275
-
1276
- res = Operations::AtsUpdateCandidateResponse.new(
1277
- status_code: r.status, content_type: content_type, raw_response: r
1278
- )
1279
- if r.status == 200
1280
- if Utils.match_content_type(content_type, 'application/json')
1281
- out = Utils.unmarshal_complex(r.env.response_body, Shared::CandidateResult)
1282
- res.candidate_result = out
1283
- end
1284
- elsif [400, 403, 412, 429, 500, 501].include?(r.status)
1285
- end
1286
- res
1287
- end
1288
- end
1289
- end