merge_ats_client 1.0.1 → 1.0.2

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -3
  3. data/docs/AccountToken.md +3 -1
  4. data/docs/ApplicationsApi.md +0 -82
  5. data/docs/Attachment.md +2 -0
  6. data/docs/AttachmentRequest.md +26 -0
  7. data/docs/AttachmentTypeEnum.md +15 -0
  8. data/docs/AttachmentsApi.md +80 -0
  9. data/docs/AvailableActions.md +1 -1
  10. data/docs/Candidate.md +2 -2
  11. data/docs/CandidateRequest.md +5 -1
  12. data/docs/InterviewsApi.md +80 -0
  13. data/docs/JobsApi.md +3 -1
  14. data/docs/ModelOperation.md +3 -1
  15. data/docs/PaginatedSyncStatusList.md +22 -0
  16. data/docs/RemoteUserRequest.md +30 -0
  17. data/docs/ScheduledInterviewRequest.md +38 -0
  18. data/docs/ScorecardRequest.md +30 -0
  19. data/docs/ScorecardsApi.md +80 -0
  20. data/docs/SyncStatus.md +1 -1
  21. data/docs/SyncStatusApi.md +89 -11
  22. data/docs/SyncStatusStatusEnum.md +15 -0
  23. data/docs/UsersApi.md +81 -0
  24. data/lib/merge_ats_client/api/applications_api.rb +0 -82
  25. data/lib/merge_ats_client/api/attachments_api.rb +76 -0
  26. data/lib/merge_ats_client/api/interviews_api.rb +76 -0
  27. data/lib/merge_ats_client/api/jobs_api.rb +7 -0
  28. data/lib/merge_ats_client/api/scorecards_api.rb +76 -0
  29. data/lib/merge_ats_client/api/sync_status_api.rb +78 -10
  30. data/lib/merge_ats_client/api/users_api.rb +79 -0
  31. data/lib/merge_ats_client/api_client.rb +1 -1
  32. data/lib/merge_ats_client/models/account_token.rb +18 -4
  33. data/lib/merge_ats_client/models/activity.rb +1 -1
  34. data/lib/merge_ats_client/models/application.rb +1 -1
  35. data/lib/merge_ats_client/models/attachment.rb +13 -2
  36. data/lib/merge_ats_client/models/attachment_request.rb +279 -0
  37. data/lib/merge_ats_client/models/attachment_type_enum.rb +39 -0
  38. data/lib/merge_ats_client/models/candidate.rb +1 -1
  39. data/lib/merge_ats_client/models/candidate_request.rb +26 -4
  40. data/lib/merge_ats_client/models/data_passthrough_request.rb +1 -0
  41. data/lib/merge_ats_client/models/eeoc.rb +1 -1
  42. data/lib/merge_ats_client/models/end_user_details_request.rb +1 -5
  43. data/lib/merge_ats_client/models/job.rb +1 -1
  44. data/lib/merge_ats_client/models/job_interview_stage.rb +1 -1
  45. data/lib/merge_ats_client/models/model_operation.rb +20 -4
  46. data/lib/merge_ats_client/models/offer.rb +1 -1
  47. data/lib/merge_ats_client/models/paginated_sync_status_list.rb +240 -0
  48. data/lib/merge_ats_client/models/remote_user_request.rb +302 -0
  49. data/lib/merge_ats_client/models/scheduled_interview.rb +1 -1
  50. data/lib/merge_ats_client/models/scheduled_interview_request.rb +331 -0
  51. data/lib/merge_ats_client/models/scorecard.rb +1 -1
  52. data/lib/merge_ats_client/models/scorecard_request.rb +287 -0
  53. data/lib/merge_ats_client/models/sync_status.rb +1 -1
  54. data/lib/merge_ats_client/models/sync_status_status_enum.rb +37 -0
  55. data/lib/merge_ats_client/version.rb +2 -2
  56. data/lib/merge_ats_client.rb +7 -3
  57. data/spec/api/delete_account_api_spec.rb +46 -0
  58. data/spec/api/generate_key_api_spec.rb +46 -0
  59. data/spec/api/issues_api_spec.rb +65 -0
  60. data/spec/models/attachment_request_spec.rb +58 -0
  61. data/spec/models/attachment_type_enum_spec.rb +28 -0
  62. data/spec/models/generate_remote_key_request_spec.rb +1 -1
  63. data/spec/models/issue_spec.rb +70 -0
  64. data/spec/models/issue_status_enum_spec.rb +28 -0
  65. data/spec/models/paginated_issue_list_spec.rb +46 -0
  66. data/spec/models/paginated_sync_status_list_spec.rb +46 -0
  67. data/spec/models/remote_data_request_spec.rb +40 -0
  68. data/spec/models/remote_user_request_spec.rb +70 -0
  69. data/spec/models/scheduled_interview_request_spec.rb +94 -0
  70. data/spec/models/scorecard_request_spec.rb +70 -0
  71. data/spec/models/sync_status_status_enum_spec.rb +28 -0
  72. data/test_ats.rb +13 -13
  73. data/test_signature.rb +2 -2
  74. metadata +44 -3
  75. data/merge_ats_client-1.0.0.gem +0 -0
@@ -0,0 +1,331 @@
1
+ =begin
2
+ #Merge ATS API
3
+
4
+ #The unified API for building rich integrations with multiple Applicant Tracking System platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MergeATSClient
17
+ # # The ScheduledInterview Object ### Description The `ScheduledInterview` object is used to represent an interview ### Usage Example Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations.
18
+ class ScheduledInterviewRequest
19
+ # The third-party API ID of the matching object.
20
+ attr_accessor :remote_id
21
+
22
+ # The application being interviewed.
23
+ attr_accessor :application
24
+
25
+ # The stage of the interview.
26
+ attr_accessor :job_interview_stage
27
+
28
+ # The user organizing the interview.
29
+ attr_accessor :organizer
30
+
31
+ attr_accessor :interviewers
32
+
33
+ # The interview's location.
34
+ attr_accessor :location
35
+
36
+ # When the interview was started.
37
+ attr_accessor :start_at
38
+
39
+ # When the interview was ended.
40
+ attr_accessor :end_at
41
+
42
+ # When the third party's interview was created.
43
+ attr_accessor :remote_created_at
44
+
45
+ # When the third party's interview was updated.
46
+ attr_accessor :remote_updated_at
47
+
48
+ # The interview's status.
49
+ attr_accessor :status
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'remote_id' => :'remote_id',
55
+ :'application' => :'application',
56
+ :'job_interview_stage' => :'job_interview_stage',
57
+ :'organizer' => :'organizer',
58
+ :'interviewers' => :'interviewers',
59
+ :'location' => :'location',
60
+ :'start_at' => :'start_at',
61
+ :'end_at' => :'end_at',
62
+ :'remote_created_at' => :'remote_created_at',
63
+ :'remote_updated_at' => :'remote_updated_at',
64
+ :'status' => :'status'
65
+ }
66
+ end
67
+
68
+ # Returns all the JSON keys this model knows about
69
+ def self.acceptable_attributes
70
+ attribute_map.values
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.openapi_types
75
+ {
76
+ :'remote_id' => :'String',
77
+ :'application' => :'String',
78
+ :'job_interview_stage' => :'String',
79
+ :'organizer' => :'String',
80
+ :'interviewers' => :'Array<String>',
81
+ :'location' => :'String',
82
+ :'start_at' => :'Time',
83
+ :'end_at' => :'Time',
84
+ :'remote_created_at' => :'Time',
85
+ :'remote_updated_at' => :'Time',
86
+ :'status' => :'ScheduledInterviewStatusEnum'
87
+ }
88
+ end
89
+
90
+ # List of attributes with nullable: true
91
+ def self.openapi_nullable
92
+ Set.new([
93
+ :'remote_id',
94
+ :'application',
95
+ :'job_interview_stage',
96
+ :'organizer',
97
+ :'location',
98
+ :'start_at',
99
+ :'end_at',
100
+ :'remote_created_at',
101
+ :'remote_updated_at',
102
+ :'status'
103
+ ])
104
+ end
105
+
106
+ # Initializes the object
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ def initialize(attributes = {})
109
+ if (!attributes.is_a?(Hash))
110
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::ScheduledInterviewRequest` initialize method"
111
+ end
112
+
113
+ # check to see if the attribute exists and convert string to symbol for hash key
114
+ attributes = attributes.each_with_object({}) { |(k, v), h|
115
+ if (!self.class.attribute_map.key?(k.to_sym))
116
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::ScheduledInterviewRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
117
+ end
118
+ h[k.to_sym] = v
119
+ }
120
+
121
+ if attributes.key?(:'remote_id')
122
+ self.remote_id = attributes[:'remote_id']
123
+ end
124
+
125
+ if attributes.key?(:'application')
126
+ self.application = attributes[:'application']
127
+ end
128
+
129
+ if attributes.key?(:'job_interview_stage')
130
+ self.job_interview_stage = attributes[:'job_interview_stage']
131
+ end
132
+
133
+ if attributes.key?(:'organizer')
134
+ self.organizer = attributes[:'organizer']
135
+ end
136
+
137
+ if attributes.key?(:'interviewers')
138
+ if (value = attributes[:'interviewers']).is_a?(Array)
139
+ self.interviewers = value
140
+ end
141
+ end
142
+
143
+ if attributes.key?(:'location')
144
+ self.location = attributes[:'location']
145
+ end
146
+
147
+ if attributes.key?(:'start_at')
148
+ self.start_at = attributes[:'start_at']
149
+ end
150
+
151
+ if attributes.key?(:'end_at')
152
+ self.end_at = attributes[:'end_at']
153
+ end
154
+
155
+ if attributes.key?(:'remote_created_at')
156
+ self.remote_created_at = attributes[:'remote_created_at']
157
+ end
158
+
159
+ if attributes.key?(:'remote_updated_at')
160
+ self.remote_updated_at = attributes[:'remote_updated_at']
161
+ end
162
+
163
+ if attributes.key?(:'status')
164
+ self.status = attributes[:'status']
165
+ end
166
+ end
167
+
168
+ # Show invalid properties with the reasons. Usually used together with valid?
169
+ # @return Array for valid properties with the reasons
170
+ def list_invalid_properties
171
+ invalid_properties = Array.new
172
+ invalid_properties
173
+ end
174
+
175
+ # Check to see if the all the properties in the model are valid
176
+ # @return true if the model is valid
177
+ def valid?
178
+ true
179
+ end
180
+
181
+ # Checks equality by comparing each attribute.
182
+ # @param [Object] Object to be compared
183
+ def ==(o)
184
+ return true if self.equal?(o)
185
+ self.class == o.class &&
186
+ remote_id == o.remote_id &&
187
+ application == o.application &&
188
+ job_interview_stage == o.job_interview_stage &&
189
+ organizer == o.organizer &&
190
+ interviewers == o.interviewers &&
191
+ location == o.location &&
192
+ start_at == o.start_at &&
193
+ end_at == o.end_at &&
194
+ remote_created_at == o.remote_created_at &&
195
+ remote_updated_at == o.remote_updated_at &&
196
+ status == o.status
197
+ end
198
+
199
+ # @see the `==` method
200
+ # @param [Object] Object to be compared
201
+ def eql?(o)
202
+ self == o
203
+ end
204
+
205
+ # Calculates hash code according to all attributes.
206
+ # @return [Integer] Hash code
207
+ def hash
208
+ [remote_id, application, job_interview_stage, organizer, interviewers, location, start_at, end_at, remote_created_at, remote_updated_at, status].hash
209
+ end
210
+
211
+ # Builds the object from hash
212
+ # @param [Hash] attributes Model attributes in the form of hash
213
+ # @return [Object] Returns the model itself
214
+ def self.build_from_hash(attributes)
215
+ new.build_from_hash(attributes)
216
+ end
217
+
218
+ # Builds the object from hash
219
+ # @param [Hash] attributes Model attributes in the form of hash
220
+ # @return [Object] Returns the model itself
221
+ def build_from_hash(attributes)
222
+ return nil unless attributes.is_a?(Hash)
223
+ self.class.openapi_types.each_pair do |key, type|
224
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
225
+ self.send("#{key}=", nil)
226
+ elsif type =~ /\AArray<(.*)>/i
227
+ # check to ensure the input is an array given that the attribute
228
+ # is documented as an array but the input is not
229
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
230
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
231
+ end
232
+ elsif !attributes[self.class.attribute_map[key]].nil?
233
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
234
+ end
235
+ end
236
+
237
+ self
238
+ end
239
+
240
+ # Deserializes the data based on type
241
+ # @param string type Data type
242
+ # @param string value Value to be deserialized
243
+ # @return [Object] Deserialized data
244
+ def _deserialize(type, value)
245
+ case type.to_sym
246
+ when :Time
247
+ Time.parse(value)
248
+ when :Date
249
+ Date.parse(value)
250
+ when :String
251
+ value.to_s
252
+ when :Integer
253
+ value.to_i
254
+ when :Float
255
+ value.to_f
256
+ when :Boolean
257
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
258
+ true
259
+ else
260
+ false
261
+ end
262
+ when :Object
263
+ # generic object (usually a Hash), return directly
264
+ value
265
+ when /\AArray<(?<inner_type>.+)>\z/
266
+ inner_type = Regexp.last_match[:inner_type]
267
+ value.map { |v| _deserialize(inner_type, v) }
268
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
269
+ k_type = Regexp.last_match[:k_type]
270
+ v_type = Regexp.last_match[:v_type]
271
+ {}.tap do |hash|
272
+ value.each do |k, v|
273
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
274
+ end
275
+ end
276
+ else # model
277
+ # models (e.g. Pet) or oneOf
278
+ klass = MergeATSClient.const_get(type)
279
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
280
+ end
281
+ end
282
+
283
+ # Returns the string representation of the object
284
+ # @return [String] String presentation of the object
285
+ def to_s
286
+ to_hash.to_s
287
+ end
288
+
289
+ # to_body is an alias to to_hash (backward compatibility)
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_body
292
+ to_hash
293
+ end
294
+
295
+ # Returns the object in the form of hash
296
+ # @return [Hash] Returns the object in the form of hash
297
+ def to_hash
298
+ hash = {}
299
+ self.class.attribute_map.each_pair do |attr, param|
300
+ value = self.send(attr)
301
+ if value.nil?
302
+ is_nullable = self.class.openapi_nullable.include?(attr)
303
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
304
+ end
305
+
306
+ hash[param] = _to_hash(value)
307
+ end
308
+ hash
309
+ end
310
+
311
+ # Outputs non-array value in the form of hash
312
+ # For object, use to_hash. Otherwise, just return the value
313
+ # @param [Object] value Any valid value
314
+ # @return [Hash] Returns the value in the form of hash
315
+ def _to_hash(value)
316
+ if value.is_a?(Array)
317
+ value.compact.map { |v| _to_hash(v) }
318
+ elsif value.is_a?(Hash)
319
+ {}.tap do |hash|
320
+ value.each { |k, v| hash[k] = _to_hash(v) }
321
+ end
322
+ elsif value.respond_to? :to_hash
323
+ value.to_hash
324
+ else
325
+ value
326
+ end
327
+ end
328
+
329
+ end
330
+
331
+ end
@@ -225,7 +225,7 @@ module MergeATSClient
225
225
  when :Date
226
226
  Date.parse(value)
227
227
  when :String
228
- value.to_s
228
+ value
229
229
  when :Integer
230
230
  value.to_i
231
231
  when :Float
@@ -0,0 +1,287 @@
1
+ =begin
2
+ #Merge ATS API
3
+
4
+ #The unified API for building rich integrations with multiple Applicant Tracking System platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MergeATSClient
17
+ # # The Scorecard Object ### Description The `Scorecard` object is used to represent a Scorecard for an interview ### Usage Example Fetch from the `LIST Scorecards` endpoint and filter by `application` to show all scorecard for an applicant.
18
+ class ScorecardRequest
19
+ # The third-party API ID of the matching object.
20
+ attr_accessor :remote_id
21
+
22
+ # The application being scored.
23
+ attr_accessor :application
24
+
25
+ # The interview being scored.
26
+ attr_accessor :interview
27
+
28
+ # The interviewer doing the scoring.
29
+ attr_accessor :interviewer
30
+
31
+ # When the third party's scorecard was created.
32
+ attr_accessor :remote_created_at
33
+
34
+ # When the scorecard was submitted.
35
+ attr_accessor :submitted_at
36
+
37
+ # The inteviewer's recommendation.
38
+ attr_accessor :overall_recommendation
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'remote_id' => :'remote_id',
44
+ :'application' => :'application',
45
+ :'interview' => :'interview',
46
+ :'interviewer' => :'interviewer',
47
+ :'remote_created_at' => :'remote_created_at',
48
+ :'submitted_at' => :'submitted_at',
49
+ :'overall_recommendation' => :'overall_recommendation'
50
+ }
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'remote_id' => :'String',
62
+ :'application' => :'String',
63
+ :'interview' => :'String',
64
+ :'interviewer' => :'String',
65
+ :'remote_created_at' => :'Time',
66
+ :'submitted_at' => :'Time',
67
+ :'overall_recommendation' => :'OverallRecommendationEnum'
68
+ }
69
+ end
70
+
71
+ # List of attributes with nullable: true
72
+ def self.openapi_nullable
73
+ Set.new([
74
+ :'remote_id',
75
+ :'application',
76
+ :'interview',
77
+ :'interviewer',
78
+ :'remote_created_at',
79
+ :'submitted_at',
80
+ :'overall_recommendation'
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::ScorecardRequest` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ attributes = attributes.each_with_object({}) { |(k, v), h|
93
+ if (!self.class.attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::ScorecardRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
95
+ end
96
+ h[k.to_sym] = v
97
+ }
98
+
99
+ if attributes.key?(:'remote_id')
100
+ self.remote_id = attributes[:'remote_id']
101
+ end
102
+
103
+ if attributes.key?(:'application')
104
+ self.application = attributes[:'application']
105
+ end
106
+
107
+ if attributes.key?(:'interview')
108
+ self.interview = attributes[:'interview']
109
+ end
110
+
111
+ if attributes.key?(:'interviewer')
112
+ self.interviewer = attributes[:'interviewer']
113
+ end
114
+
115
+ if attributes.key?(:'remote_created_at')
116
+ self.remote_created_at = attributes[:'remote_created_at']
117
+ end
118
+
119
+ if attributes.key?(:'submitted_at')
120
+ self.submitted_at = attributes[:'submitted_at']
121
+ end
122
+
123
+ if attributes.key?(:'overall_recommendation')
124
+ self.overall_recommendation = attributes[:'overall_recommendation']
125
+ end
126
+ end
127
+
128
+ # Show invalid properties with the reasons. Usually used together with valid?
129
+ # @return Array for valid properties with the reasons
130
+ def list_invalid_properties
131
+ invalid_properties = Array.new
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ true
139
+ end
140
+
141
+ # Checks equality by comparing each attribute.
142
+ # @param [Object] Object to be compared
143
+ def ==(o)
144
+ return true if self.equal?(o)
145
+ self.class == o.class &&
146
+ remote_id == o.remote_id &&
147
+ application == o.application &&
148
+ interview == o.interview &&
149
+ interviewer == o.interviewer &&
150
+ remote_created_at == o.remote_created_at &&
151
+ submitted_at == o.submitted_at &&
152
+ overall_recommendation == o.overall_recommendation
153
+ end
154
+
155
+ # @see the `==` method
156
+ # @param [Object] Object to be compared
157
+ def eql?(o)
158
+ self == o
159
+ end
160
+
161
+ # Calculates hash code according to all attributes.
162
+ # @return [Integer] Hash code
163
+ def hash
164
+ [remote_id, application, interview, interviewer, remote_created_at, submitted_at, overall_recommendation].hash
165
+ end
166
+
167
+ # Builds the object from hash
168
+ # @param [Hash] attributes Model attributes in the form of hash
169
+ # @return [Object] Returns the model itself
170
+ def self.build_from_hash(attributes)
171
+ new.build_from_hash(attributes)
172
+ end
173
+
174
+ # Builds the object from hash
175
+ # @param [Hash] attributes Model attributes in the form of hash
176
+ # @return [Object] Returns the model itself
177
+ def build_from_hash(attributes)
178
+ return nil unless attributes.is_a?(Hash)
179
+ self.class.openapi_types.each_pair do |key, type|
180
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
181
+ self.send("#{key}=", nil)
182
+ elsif type =~ /\AArray<(.*)>/i
183
+ # check to ensure the input is an array given that the attribute
184
+ # is documented as an array but the input is not
185
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
186
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
187
+ end
188
+ elsif !attributes[self.class.attribute_map[key]].nil?
189
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
190
+ end
191
+ end
192
+
193
+ self
194
+ end
195
+
196
+ # Deserializes the data based on type
197
+ # @param string type Data type
198
+ # @param string value Value to be deserialized
199
+ # @return [Object] Deserialized data
200
+ def _deserialize(type, value)
201
+ case type.to_sym
202
+ when :Time
203
+ Time.parse(value)
204
+ when :Date
205
+ Date.parse(value)
206
+ when :String
207
+ value.to_s
208
+ when :Integer
209
+ value.to_i
210
+ when :Float
211
+ value.to_f
212
+ when :Boolean
213
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
214
+ true
215
+ else
216
+ false
217
+ end
218
+ when :Object
219
+ # generic object (usually a Hash), return directly
220
+ value
221
+ when /\AArray<(?<inner_type>.+)>\z/
222
+ inner_type = Regexp.last_match[:inner_type]
223
+ value.map { |v| _deserialize(inner_type, v) }
224
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
225
+ k_type = Regexp.last_match[:k_type]
226
+ v_type = Regexp.last_match[:v_type]
227
+ {}.tap do |hash|
228
+ value.each do |k, v|
229
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
230
+ end
231
+ end
232
+ else # model
233
+ # models (e.g. Pet) or oneOf
234
+ klass = MergeATSClient.const_get(type)
235
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
236
+ end
237
+ end
238
+
239
+ # Returns the string representation of the object
240
+ # @return [String] String presentation of the object
241
+ def to_s
242
+ to_hash.to_s
243
+ end
244
+
245
+ # to_body is an alias to to_hash (backward compatibility)
246
+ # @return [Hash] Returns the object in the form of hash
247
+ def to_body
248
+ to_hash
249
+ end
250
+
251
+ # Returns the object in the form of hash
252
+ # @return [Hash] Returns the object in the form of hash
253
+ def to_hash
254
+ hash = {}
255
+ self.class.attribute_map.each_pair do |attr, param|
256
+ value = self.send(attr)
257
+ if value.nil?
258
+ is_nullable = self.class.openapi_nullable.include?(attr)
259
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
260
+ end
261
+
262
+ hash[param] = _to_hash(value)
263
+ end
264
+ hash
265
+ end
266
+
267
+ # Outputs non-array value in the form of hash
268
+ # For object, use to_hash. Otherwise, just return the value
269
+ # @param [Object] value Any valid value
270
+ # @return [Hash] Returns the value in the form of hash
271
+ def _to_hash(value)
272
+ if value.is_a?(Array)
273
+ value.compact.map { |v| _to_hash(v) }
274
+ elsif value.is_a?(Hash)
275
+ {}.tap do |hash|
276
+ value.each { |k, v| hash[k] = _to_hash(v) }
277
+ end
278
+ elsif value.respond_to? :to_hash
279
+ value.to_hash
280
+ else
281
+ value
282
+ end
283
+ end
284
+
285
+ end
286
+
287
+ end
@@ -52,7 +52,7 @@ module MergeATSClient
52
52
  :'model_id' => :'String',
53
53
  :'last_sync_start' => :'Time',
54
54
  :'next_sync_start' => :'Time',
55
- :'status' => :'String',
55
+ :'status' => :'SyncStatusStatusEnum',
56
56
  :'is_initial_sync' => :'Boolean'
57
57
  }
58
58
  end
@@ -0,0 +1,37 @@
1
+ =begin
2
+ #Merge ATS API
3
+
4
+ #The unified API for building rich integrations with multiple Applicant Tracking System platforms.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: hello@merge.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.1.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MergeATSClient
17
+ class SyncStatusStatusEnum
18
+ SYNCING = "SYNCING".freeze
19
+ DONE = "DONE".freeze
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ constantValues = SyncStatusStatusEnum.constants.select { |c| SyncStatusStatusEnum::const_get(c) == value }
33
+ raise "Invalid ENUM value #{value} for class #SyncStatusStatusEnum" if constantValues.empty?
34
+ value
35
+ end
36
+ end
37
+ end
@@ -6,10 +6,10 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
13
13
  module MergeATSClient
14
- VERSION = '1.0.1'
14
+ VERSION = '1.0.2'
15
15
  end