open_api_smart_recruiters_sdk 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.DS_Store +0 -0
  3. data/Gemfile.lock +1 -1
  4. data/lib/.DS_Store +0 -0
  5. data/lib/smart_recruiters/.DS_Store +0 -0
  6. data/lib/smart_recruiters/api/interview_types_api.rb +169 -0
  7. data/lib/smart_recruiters/api/interviews_api.rb +296 -0
  8. data/lib/smart_recruiters/api/messages_api.rb +187 -0
  9. data/lib/smart_recruiters/api/statuses_api.rb +215 -0
  10. data/lib/smart_recruiters/api/timeslots_api.rb +261 -0
  11. data/lib/smart_recruiters/configuration.rb +1 -1
  12. data/lib/smart_recruiters/models/applications.rb +192 -0
  13. data/lib/smart_recruiters/models/attendee_status.rb +202 -0
  14. data/lib/smart_recruiters/models/attendee_status_value.rb +21 -0
  15. data/lib/smart_recruiters/models/candidate_attendee_status_value.rb +22 -0
  16. data/lib/smart_recruiters/models/context.rb +197 -0
  17. data/lib/smart_recruiters/models/interview.rb +305 -0
  18. data/lib/smart_recruiters/models/interview_to_update_input.rb +216 -0
  19. data/lib/smart_recruiters/models/interview_type.rb +188 -0
  20. data/lib/smart_recruiters/models/interview_types.rb +192 -0
  21. data/lib/smart_recruiters/models/interviewer.rb +216 -0
  22. data/lib/smart_recruiters/models/interviewers.rb +192 -0
  23. data/lib/smart_recruiters/models/interviews_list.rb +199 -0
  24. data/lib/smart_recruiters/models/message.rb +222 -0
  25. data/lib/smart_recruiters/models/message_details.rb +206 -0
  26. data/lib/smart_recruiters/models/message_view.rb +233 -0
  27. data/lib/smart_recruiters/models/messages_view.rb +192 -0
  28. data/lib/smart_recruiters/models/share_with.rb +233 -0
  29. data/lib/smart_recruiters/models/timeslot.rb +275 -0
  30. data/lib/smart_recruiters/models/timeslots.rb +192 -0
  31. data/lib/smart_recruiters/models/user_id.rb +189 -0
  32. data/lib/smart_recruiters/models/uuid_read_only.rb +188 -0
  33. data/lib/smart_recruiters/models/visibility.rb +21 -0
  34. data/lib/smart_recruiters/version.rb +1 -1
  35. data/lib/smart_recruiters.rb +2 -19
  36. metadata +31 -1
@@ -0,0 +1,215 @@
1
+
2
+
3
+ module SmartRecruiters
4
+ class StatusesApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Changes a candidate's status.
11
+ # @param body New candidate's status
12
+ # @param interview_id ID of the interview
13
+ # @param [Hash] opts the optional parameters
14
+ # @return [nil]
15
+ def statuses_candidate_put(body, interview_id, opts = {})
16
+ statuses_candidate_put_with_http_info(body, interview_id, opts)
17
+ nil
18
+ end
19
+
20
+ # Changes a candidate's status.
21
+ # @param body New candidate's status
22
+ # @param interview_id ID of the interview
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
25
+ def statuses_candidate_put_with_http_info(body, interview_id, opts = {})
26
+ if @api_client.config.debugging
27
+ @api_client.config.logger.debug 'Calling API: StatusesApi.statuses_candidate_put ...'
28
+ end
29
+ # verify the required parameter 'body' is set
30
+ if @api_client.config.client_side_validation && body.nil?
31
+ fail ArgumentError, "Missing the required parameter 'body' when calling StatusesApi.statuses_candidate_put"
32
+ end
33
+ # verify the required parameter 'interview_id' is set
34
+ if @api_client.config.client_side_validation && interview_id.nil?
35
+ fail ArgumentError, "Missing the required parameter 'interview_id' when calling StatusesApi.statuses_candidate_put"
36
+ end
37
+ # resource path
38
+ local_var_path = '/interviews/{interviewId}/candidate/status'.sub('{' + 'interviewId' + '}', interview_id.to_s)
39
+
40
+ # query parameters
41
+ query_params = opts[:query_params] || {}
42
+
43
+ # header parameters
44
+ header_params = opts[:header_params] || {}
45
+ # HTTP header 'Accept' (if needed)
46
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
47
+ # HTTP header 'Content-Type'
48
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
55
+
56
+ return_type = opts[:return_type]
57
+
58
+ auth_names = opts[:auth_names] || ['key', 'oauth']
59
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
60
+ :header_params => header_params,
61
+ :query_params => query_params,
62
+ :form_params => form_params,
63
+ :body => post_body,
64
+ :auth_names => auth_names,
65
+ :return_type => return_type)
66
+
67
+ if @api_client.config.debugging
68
+ @api_client.config.logger.debug "API called: StatusesApi#statuses_candidate_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
69
+ end
70
+ return data, status_code, headers
71
+ end
72
+ # Changes a interviewer's status in given timeslot
73
+ # @param body New interviewer&#x27;s status
74
+ # @param interview_id ID of the interview
75
+ # @param timeslot_id ID of the timeslot
76
+ # @param user_id ID of the user
77
+ # @param [Hash] opts the optional parameters
78
+ # @return [nil]
79
+ def statuses_interviewer_put(body, interview_id, timeslot_id, user_id, opts = {})
80
+ statuses_interviewer_put_with_http_info(body, interview_id, timeslot_id, user_id, opts)
81
+ nil
82
+ end
83
+
84
+ # Changes a interviewer&#x27;s status in given timeslot
85
+ # @param body New interviewer&#x27;s status
86
+ # @param interview_id ID of the interview
87
+ # @param timeslot_id ID of the timeslot
88
+ # @param user_id ID of the user
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
91
+ def statuses_interviewer_put_with_http_info(body, interview_id, timeslot_id, user_id, opts = {})
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug 'Calling API: StatusesApi.statuses_interviewer_put ...'
94
+ end
95
+ # verify the required parameter 'body' is set
96
+ if @api_client.config.client_side_validation && body.nil?
97
+ fail ArgumentError, "Missing the required parameter 'body' when calling StatusesApi.statuses_interviewer_put"
98
+ end
99
+ # verify the required parameter 'interview_id' is set
100
+ if @api_client.config.client_side_validation && interview_id.nil?
101
+ fail ArgumentError, "Missing the required parameter 'interview_id' when calling StatusesApi.statuses_interviewer_put"
102
+ end
103
+ # verify the required parameter 'timeslot_id' is set
104
+ if @api_client.config.client_side_validation && timeslot_id.nil?
105
+ fail ArgumentError, "Missing the required parameter 'timeslot_id' when calling StatusesApi.statuses_interviewer_put"
106
+ end
107
+ # verify the required parameter 'user_id' is set
108
+ if @api_client.config.client_side_validation && user_id.nil?
109
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling StatusesApi.statuses_interviewer_put"
110
+ end
111
+ # resource path
112
+ local_var_path = '/interviews/{interviewId}/timeslots/{timeslotId}/interviewers/{userId}/status'.sub('{' + 'interviewId' + '}', interview_id.to_s).sub('{' + 'timeslotId' + '}', timeslot_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)
113
+
114
+ # query parameters
115
+ query_params = opts[:query_params] || {}
116
+
117
+ # header parameters
118
+ header_params = opts[:header_params] || {}
119
+ # HTTP header 'Accept' (if needed)
120
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
121
+ # HTTP header 'Content-Type'
122
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
123
+
124
+ # form parameters
125
+ form_params = opts[:form_params] || {}
126
+
127
+ # http body (model)
128
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
129
+
130
+ return_type = opts[:return_type]
131
+
132
+ auth_names = opts[:auth_names] || ['key', 'oauth']
133
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => return_type)
140
+
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug "API called: StatusesApi#statuses_interviewer_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
+ end
144
+ return data, status_code, headers
145
+ end
146
+ # Changes a candidate's status in given timeslot
147
+ # @param body New candidate&#x27;s status
148
+ # @param interview_id ID of the interview
149
+ # @param timeslot_id ID of the timeslot
150
+ # @param [Hash] opts the optional parameters
151
+ # @return [nil]
152
+ def statuses_timeslot_candidate_put(body, interview_id, timeslot_id, opts = {})
153
+ statuses_timeslot_candidate_put_with_http_info(body, interview_id, timeslot_id, opts)
154
+ nil
155
+ end
156
+
157
+ # Changes a candidate&#x27;s status in given timeslot
158
+ # @param body New candidate&#x27;s status
159
+ # @param interview_id ID of the interview
160
+ # @param timeslot_id ID of the timeslot
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
163
+ def statuses_timeslot_candidate_put_with_http_info(body, interview_id, timeslot_id, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: StatusesApi.statuses_timeslot_candidate_put ...'
166
+ end
167
+ # verify the required parameter 'body' is set
168
+ if @api_client.config.client_side_validation && body.nil?
169
+ fail ArgumentError, "Missing the required parameter 'body' when calling StatusesApi.statuses_timeslot_candidate_put"
170
+ end
171
+ # verify the required parameter 'interview_id' is set
172
+ if @api_client.config.client_side_validation && interview_id.nil?
173
+ fail ArgumentError, "Missing the required parameter 'interview_id' when calling StatusesApi.statuses_timeslot_candidate_put"
174
+ end
175
+ # verify the required parameter 'timeslot_id' is set
176
+ if @api_client.config.client_side_validation && timeslot_id.nil?
177
+ fail ArgumentError, "Missing the required parameter 'timeslot_id' when calling StatusesApi.statuses_timeslot_candidate_put"
178
+ end
179
+ # resource path
180
+ local_var_path = '/interviews/{interviewId}/timeslots/{timeslotId}/candidateStatus'.sub('{' + 'interviewId' + '}', interview_id.to_s).sub('{' + 'timeslotId' + '}', timeslot_id.to_s)
181
+
182
+ # query parameters
183
+ query_params = opts[:query_params] || {}
184
+
185
+ # header parameters
186
+ header_params = opts[:header_params] || {}
187
+ # HTTP header 'Accept' (if needed)
188
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
189
+ # HTTP header 'Content-Type'
190
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
191
+
192
+ # form parameters
193
+ form_params = opts[:form_params] || {}
194
+
195
+ # http body (model)
196
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
197
+
198
+ return_type = opts[:return_type]
199
+
200
+ auth_names = opts[:auth_names] || ['key', 'oauth']
201
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
202
+ :header_params => header_params,
203
+ :query_params => query_params,
204
+ :form_params => form_params,
205
+ :body => post_body,
206
+ :auth_names => auth_names,
207
+ :return_type => return_type)
208
+
209
+ if @api_client.config.debugging
210
+ @api_client.config.logger.debug "API called: StatusesApi#statuses_timeslot_candidate_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
211
+ end
212
+ return data, status_code, headers
213
+ end
214
+ end
215
+ end
@@ -0,0 +1,261 @@
1
+
2
+
3
+ module SmartRecruiters
4
+ class TimeslotsApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Creates a timeslot
11
+ # @param body Timeslot to be added
12
+ # @param interview_id ID of the interview
13
+ # @param [Hash] opts the optional parameters
14
+ # @return [Timeslot]
15
+ def timeslots_create(body, interview_id, opts = {})
16
+ data, _status_code, _headers = timeslots_create_with_http_info(body, interview_id, opts)
17
+ data
18
+ end
19
+
20
+ # Creates a timeslot
21
+ # @param body Timeslot to be added
22
+ # @param interview_id ID of the interview
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [Array<(Timeslot, Integer, Hash)>] Timeslot data, response status code and response headers
25
+ def timeslots_create_with_http_info(body, interview_id, opts = {})
26
+ if @api_client.config.debugging
27
+ @api_client.config.logger.debug 'Calling API: TimeslotsApi.timeslots_create ...'
28
+ end
29
+ # verify the required parameter 'body' is set
30
+ if @api_client.config.client_side_validation && body.nil?
31
+ fail ArgumentError, "Missing the required parameter 'body' when calling TimeslotsApi.timeslots_create"
32
+ end
33
+ # verify the required parameter 'interview_id' is set
34
+ if @api_client.config.client_side_validation && interview_id.nil?
35
+ fail ArgumentError, "Missing the required parameter 'interview_id' when calling TimeslotsApi.timeslots_create"
36
+ end
37
+ # resource path
38
+ local_var_path = '/interviews/{interviewId}/timeslots'.sub('{' + 'interviewId' + '}', interview_id.to_s)
39
+
40
+ # query parameters
41
+ query_params = opts[:query_params] || {}
42
+
43
+ # header parameters
44
+ header_params = opts[:header_params] || {}
45
+ # HTTP header 'Accept' (if needed)
46
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8', 'application/json'])
47
+ # HTTP header 'Content-Type'
48
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
55
+
56
+ return_type = opts[:return_type] || 'Timeslot'
57
+
58
+ auth_names = opts[:auth_names] || ['key', 'oauth']
59
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
60
+ :header_params => header_params,
61
+ :query_params => query_params,
62
+ :form_params => form_params,
63
+ :body => post_body,
64
+ :auth_names => auth_names,
65
+ :return_type => return_type)
66
+
67
+ if @api_client.config.debugging
68
+ @api_client.config.logger.debug "API called: TimeslotsApi#timeslots_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
69
+ end
70
+ return data, status_code, headers
71
+ end
72
+ # Deletes a timeslot
73
+ # @param interview_id ID of the interview
74
+ # @param timeslot_id ID of the timeslot
75
+ # @param [Hash] opts the optional parameters
76
+ # @return [nil]
77
+ def timeslots_delete(interview_id, timeslot_id, opts = {})
78
+ timeslots_delete_with_http_info(interview_id, timeslot_id, opts)
79
+ nil
80
+ end
81
+
82
+ # Deletes a timeslot
83
+ # @param interview_id ID of the interview
84
+ # @param timeslot_id ID of the timeslot
85
+ # @param [Hash] opts the optional parameters
86
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
87
+ def timeslots_delete_with_http_info(interview_id, timeslot_id, opts = {})
88
+ if @api_client.config.debugging
89
+ @api_client.config.logger.debug 'Calling API: TimeslotsApi.timeslots_delete ...'
90
+ end
91
+ # verify the required parameter 'interview_id' is set
92
+ if @api_client.config.client_side_validation && interview_id.nil?
93
+ fail ArgumentError, "Missing the required parameter 'interview_id' when calling TimeslotsApi.timeslots_delete"
94
+ end
95
+ # verify the required parameter 'timeslot_id' is set
96
+ if @api_client.config.client_side_validation && timeslot_id.nil?
97
+ fail ArgumentError, "Missing the required parameter 'timeslot_id' when calling TimeslotsApi.timeslots_delete"
98
+ end
99
+ # resource path
100
+ local_var_path = '/interviews/{interviewId}/timeslots/{timeslotId}'.sub('{' + 'interviewId' + '}', interview_id.to_s).sub('{' + 'timeslotId' + '}', timeslot_id.to_s)
101
+
102
+ # query parameters
103
+ query_params = opts[:query_params] || {}
104
+
105
+ # header parameters
106
+ header_params = opts[:header_params] || {}
107
+ # HTTP header 'Accept' (if needed)
108
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
109
+
110
+ # form parameters
111
+ form_params = opts[:form_params] || {}
112
+
113
+ # http body (model)
114
+ post_body = opts[:body]
115
+
116
+ return_type = opts[:return_type]
117
+
118
+ auth_names = opts[:auth_names] || ['key', 'oauth']
119
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
120
+ :header_params => header_params,
121
+ :query_params => query_params,
122
+ :form_params => form_params,
123
+ :body => post_body,
124
+ :auth_names => auth_names,
125
+ :return_type => return_type)
126
+
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "API called: TimeslotsApi#timeslots_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ end
130
+ return data, status_code, headers
131
+ end
132
+ # Retrieves a timeslot
133
+ # @param interview_id ID of the interview
134
+ # @param timeslot_id ID of the timeslot
135
+ # @param [Hash] opts the optional parameters
136
+ # @return [Timeslot]
137
+ def timeslots_get(interview_id, timeslot_id, opts = {})
138
+ data, _status_code, _headers = timeslots_get_with_http_info(interview_id, timeslot_id, opts)
139
+ data
140
+ end
141
+
142
+ # Retrieves a timeslot
143
+ # @param interview_id ID of the interview
144
+ # @param timeslot_id ID of the timeslot
145
+ # @param [Hash] opts the optional parameters
146
+ # @return [Array<(Timeslot, Integer, Hash)>] Timeslot data, response status code and response headers
147
+ def timeslots_get_with_http_info(interview_id, timeslot_id, opts = {})
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug 'Calling API: TimeslotsApi.timeslots_get ...'
150
+ end
151
+ # verify the required parameter 'interview_id' is set
152
+ if @api_client.config.client_side_validation && interview_id.nil?
153
+ fail ArgumentError, "Missing the required parameter 'interview_id' when calling TimeslotsApi.timeslots_get"
154
+ end
155
+ # verify the required parameter 'timeslot_id' is set
156
+ if @api_client.config.client_side_validation && timeslot_id.nil?
157
+ fail ArgumentError, "Missing the required parameter 'timeslot_id' when calling TimeslotsApi.timeslots_get"
158
+ end
159
+ # resource path
160
+ local_var_path = '/interviews/{interviewId}/timeslots/{timeslotId}'.sub('{' + 'interviewId' + '}', interview_id.to_s).sub('{' + 'timeslotId' + '}', timeslot_id.to_s)
161
+
162
+ # query parameters
163
+ query_params = opts[:query_params] || {}
164
+
165
+ # header parameters
166
+ header_params = opts[:header_params] || {}
167
+ # HTTP header 'Accept' (if needed)
168
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
169
+
170
+ # form parameters
171
+ form_params = opts[:form_params] || {}
172
+
173
+ # http body (model)
174
+ post_body = opts[:body]
175
+
176
+ return_type = opts[:return_type] || 'Timeslot'
177
+
178
+ auth_names = opts[:auth_names] || ['key', 'oauth']
179
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
180
+ :header_params => header_params,
181
+ :query_params => query_params,
182
+ :form_params => form_params,
183
+ :body => post_body,
184
+ :auth_names => auth_names,
185
+ :return_type => return_type)
186
+
187
+ if @api_client.config.debugging
188
+ @api_client.config.logger.debug "API called: TimeslotsApi#timeslots_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
189
+ end
190
+ return data, status_code, headers
191
+ end
192
+ # Modifies a timeslot
193
+ # @param body Timeslot to be updated
194
+ # @param interview_id ID of the interview
195
+ # @param timeslot_id ID of the timeslot
196
+ # @param [Hash] opts the optional parameters
197
+ # @return [nil]
198
+ def timeslots_update(body, interview_id, timeslot_id, opts = {})
199
+ timeslots_update_with_http_info(body, interview_id, timeslot_id, opts)
200
+ nil
201
+ end
202
+
203
+ # Modifies a timeslot
204
+ # @param body Timeslot to be updated
205
+ # @param interview_id ID of the interview
206
+ # @param timeslot_id ID of the timeslot
207
+ # @param [Hash] opts the optional parameters
208
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
209
+ def timeslots_update_with_http_info(body, interview_id, timeslot_id, opts = {})
210
+ if @api_client.config.debugging
211
+ @api_client.config.logger.debug 'Calling API: TimeslotsApi.timeslots_update ...'
212
+ end
213
+ # verify the required parameter 'body' is set
214
+ if @api_client.config.client_side_validation && body.nil?
215
+ fail ArgumentError, "Missing the required parameter 'body' when calling TimeslotsApi.timeslots_update"
216
+ end
217
+ # verify the required parameter 'interview_id' is set
218
+ if @api_client.config.client_side_validation && interview_id.nil?
219
+ fail ArgumentError, "Missing the required parameter 'interview_id' when calling TimeslotsApi.timeslots_update"
220
+ end
221
+ # verify the required parameter 'timeslot_id' is set
222
+ if @api_client.config.client_side_validation && timeslot_id.nil?
223
+ fail ArgumentError, "Missing the required parameter 'timeslot_id' when calling TimeslotsApi.timeslots_update"
224
+ end
225
+ # resource path
226
+ local_var_path = '/interviews/{interviewId}/timeslots/{timeslotId}'.sub('{' + 'interviewId' + '}', interview_id.to_s).sub('{' + 'timeslotId' + '}', timeslot_id.to_s)
227
+
228
+ # query parameters
229
+ query_params = opts[:query_params] || {}
230
+
231
+ # header parameters
232
+ header_params = opts[:header_params] || {}
233
+ # HTTP header 'Accept' (if needed)
234
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
235
+ # HTTP header 'Content-Type'
236
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
237
+
238
+ # form parameters
239
+ form_params = opts[:form_params] || {}
240
+
241
+ # http body (model)
242
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
243
+
244
+ return_type = opts[:return_type]
245
+
246
+ auth_names = opts[:auth_names] || ['key', 'oauth']
247
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
248
+ :header_params => header_params,
249
+ :query_params => query_params,
250
+ :form_params => form_params,
251
+ :body => post_body,
252
+ :auth_names => auth_names,
253
+ :return_type => return_type)
254
+
255
+ if @api_client.config.debugging
256
+ @api_client.config.logger.debug "API called: TimeslotsApi#timeslots_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
257
+ end
258
+ return data, status_code, headers
259
+ end
260
+ end
261
+ end
@@ -132,7 +132,7 @@ module SmartRecruiters
132
132
  def initialize
133
133
  @scheme = 'https'
134
134
  @host = 'api.smartrecruiters.com'
135
- @base_path = 'https://api.smartrecruiters.com'
135
+ @base_path = ''
136
136
  @api_key = {}
137
137
  @api_key_prefix = {}
138
138
  @client_id = nil
@@ -0,0 +1,192 @@
1
+
2
+
3
+ require 'date'
4
+
5
+ module SmartRecruiters
6
+ class Applications
7
+ # Attribute mapping from ruby-style variable name to JSON key.
8
+ def self.attribute_map
9
+ {
10
+ }
11
+ end
12
+
13
+ # Attribute type mapping.
14
+ def self.openapi_types
15
+ {
16
+ }
17
+ end
18
+
19
+ # List of attributes with nullable: true
20
+ def self.openapi_nullable
21
+ Set.new([
22
+ ])
23
+ end
24
+
25
+ # Initializes the object
26
+ # @param [Hash] attributes Model attributes in the form of hash
27
+ def initialize(attributes = {})
28
+ if (!attributes.is_a?(Hash))
29
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmartRecruiters::Applications` initialize method"
30
+ end
31
+
32
+ # check to see if the attribute exists and convert string to symbol for hash key
33
+ attributes = attributes.each_with_object({}) { |(k, v), h|
34
+ if (!self.class.attribute_map.key?(k.to_sym))
35
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmartRecruiters::Applications`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
36
+ end
37
+ h[k.to_sym] = v
38
+ }
39
+
40
+ # call parent's initialize
41
+ super(attributes)
42
+ end
43
+
44
+ # Show invalid properties with the reasons. Usually used together with valid?
45
+ # @return Array for valid properties with the reasons
46
+ def list_invalid_properties
47
+ invalid_properties = super
48
+ invalid_properties
49
+ end
50
+
51
+ # Check to see if the all the properties in the model are valid
52
+ # @return true if the model is valid
53
+ def valid?
54
+ true
55
+ end
56
+
57
+ # Checks equality by comparing each attribute.
58
+ # @param [Object] Object to be compared
59
+ def ==(o)
60
+ return true if self.equal?(o)
61
+ self.class == o.class && super(o)
62
+ end
63
+
64
+ # @see the `==` method
65
+ # @param [Object] Object to be compared
66
+ def eql?(o)
67
+ self == o
68
+ end
69
+
70
+ # Calculates hash code according to all attributes.
71
+ # @return [Integer] Hash code
72
+ def hash
73
+ [].hash
74
+ end
75
+
76
+ # Builds the object from hash
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ # @return [Object] Returns the model itself
79
+ def self.build_from_hash(attributes)
80
+ new.build_from_hash(attributes)
81
+ end
82
+
83
+ # Builds the object from hash
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ # @return [Object] Returns the model itself
86
+ def build_from_hash(attributes)
87
+ return nil unless attributes.is_a?(Hash)
88
+ super(attributes)
89
+ self.class.openapi_types.each_pair do |key, type|
90
+ if type =~ /\AArray<(.*)>/i
91
+ # check to ensure the input is an array given that the attribute
92
+ # is documented as an array but the input is not
93
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
94
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
95
+ end
96
+ elsif !attributes[self.class.attribute_map[key]].nil?
97
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
98
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
99
+ self.send("#{key}=", nil)
100
+ end
101
+ end
102
+
103
+ self
104
+ end
105
+
106
+ # Deserializes the data based on type
107
+ # @param string type Data type
108
+ # @param string value Value to be deserialized
109
+ # @return [Object] Deserialized data
110
+ def _deserialize(type, value)
111
+ case type.to_sym
112
+ when :DateTime
113
+ DateTime.parse(value)
114
+ when :Date
115
+ Date.parse(value)
116
+ when :String
117
+ value.to_s
118
+ when :Integer
119
+ value.to_i
120
+ when :Float
121
+ value.to_f
122
+ when :Boolean
123
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
124
+ true
125
+ else
126
+ false
127
+ end
128
+ when :Object
129
+ # generic object (usually a Hash), return directly
130
+ value
131
+ when /\AArray<(?<inner_type>.+)>\z/
132
+ inner_type = Regexp.last_match[:inner_type]
133
+ value.map { |v| _deserialize(inner_type, v) }
134
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
135
+ k_type = Regexp.last_match[:k_type]
136
+ v_type = Regexp.last_match[:v_type]
137
+ {}.tap do |hash|
138
+ value.each do |k, v|
139
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
140
+ end
141
+ end
142
+ else # model
143
+ SmartRecruiters.const_get(type).build_from_hash(value)
144
+ end
145
+ end
146
+
147
+ # Returns the string representation of the object
148
+ # @return [String] String presentation of the object
149
+ def to_s
150
+ to_hash.to_s
151
+ end
152
+
153
+ # to_body is an alias to to_hash (backward compatibility)
154
+ # @return [Hash] Returns the object in the form of hash
155
+ def to_body
156
+ to_hash
157
+ end
158
+
159
+ # Returns the object in the form of hash
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_hash
162
+ hash = super
163
+ self.class.attribute_map.each_pair do |attr, param|
164
+ value = self.send(attr)
165
+ if value.nil?
166
+ is_nullable = self.class.openapi_nullable.include?(attr)
167
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
168
+ end
169
+
170
+ hash[param] = _to_hash(value)
171
+ end
172
+ hash
173
+ end
174
+
175
+ # Outputs non-array value in the form of hash
176
+ # For object, use to_hash. Otherwise, just return the value
177
+ # @param [Object] value Any valid value
178
+ # @return [Hash] Returns the value in the form of hash
179
+ def _to_hash(value)
180
+ if value.is_a?(Array)
181
+ value.compact.map { |v| _to_hash(v) }
182
+ elsif value.is_a?(Hash)
183
+ {}.tap do |hash|
184
+ value.each { |k, v| hash[k] = _to_hash(v) }
185
+ end
186
+ elsif value.respond_to? :to_hash
187
+ value.to_hash
188
+ else
189
+ value
190
+ end
191
+ end end
192
+ end