merge_ats_client 3.0.2 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +198 -186
  3. data/docs/Activity.md +2 -2
  4. data/docs/Application.md +2 -2
  5. data/docs/AsyncPassthroughApi.md +155 -0
  6. data/docs/AsyncPassthroughReciept.md +18 -0
  7. data/docs/Attachment.md +2 -2
  8. data/docs/Candidate.md +2 -2
  9. data/docs/CandidatesApi.md +156 -0
  10. data/docs/DeleteAccountApi.md +9 -9
  11. data/docs/Department.md +2 -2
  12. data/docs/EEOC.md +2 -2
  13. data/docs/EndUserDetailsRequest.md +1 -1
  14. data/docs/Job.md +2 -2
  15. data/docs/JobInterviewStage.md +2 -2
  16. data/docs/Offer.md +2 -2
  17. data/docs/Office.md +2 -2
  18. data/docs/PatchedCandidateEndpointRequest.md +20 -0
  19. data/docs/PatchedCandidateRequest.md +50 -0
  20. data/docs/RejectReason.md +2 -2
  21. data/docs/RemoteData.md +1 -1
  22. data/docs/RemoteUser.md +2 -2
  23. data/docs/ScheduledInterview.md +2 -2
  24. data/docs/Scorecard.md +2 -2
  25. data/docs/Tag.md +2 -2
  26. data/lib/merge_ats_client/api/async_passthrough_api.rb +160 -0
  27. data/lib/merge_ats_client/api/candidates_api.rb +150 -0
  28. data/lib/merge_ats_client/api/delete_account_api.rb +7 -7
  29. data/lib/merge_ats_client/models/activity.rb +10 -10
  30. data/lib/merge_ats_client/models/application.rb +10 -10
  31. data/lib/merge_ats_client/models/async_passthrough_reciept.rb +223 -0
  32. data/lib/merge_ats_client/models/attachment.rb +10 -10
  33. data/lib/merge_ats_client/models/candidate.rb +10 -10
  34. data/lib/merge_ats_client/models/department.rb +10 -10
  35. data/lib/merge_ats_client/models/eeoc.rb +10 -10
  36. data/lib/merge_ats_client/models/end_user_details_request.rb +1 -1
  37. data/lib/merge_ats_client/models/job.rb +10 -10
  38. data/lib/merge_ats_client/models/job_interview_stage.rb +10 -10
  39. data/lib/merge_ats_client/models/offer.rb +10 -10
  40. data/lib/merge_ats_client/models/office.rb +10 -10
  41. data/lib/merge_ats_client/models/patched_candidate_endpoint_request.rb +237 -0
  42. data/lib/merge_ats_client/models/patched_candidate_request.rb +418 -0
  43. data/lib/merge_ats_client/models/reject_reason.rb +10 -10
  44. data/lib/merge_ats_client/models/remote_data.rb +3 -4
  45. data/lib/merge_ats_client/models/remote_user.rb +10 -10
  46. data/lib/merge_ats_client/models/scheduled_interview.rb +10 -10
  47. data/lib/merge_ats_client/models/scorecard.rb +10 -10
  48. data/lib/merge_ats_client/models/tag.rb +10 -10
  49. data/lib/merge_ats_client/version.rb +1 -1
  50. data/lib/merge_ats_client.rb +4 -0
  51. data/spec/api/async_passthrough_api_spec.rb +59 -0
  52. data/spec/api/candidates_api_spec.rb +27 -0
  53. data/spec/api/delete_account_api_spec.rb +2 -2
  54. data/spec/models/activity_spec.rb +2 -2
  55. data/spec/models/application_spec.rb +2 -2
  56. data/spec/models/async_passthrough_reciept_spec.rb +34 -0
  57. data/spec/models/attachment_spec.rb +2 -2
  58. data/spec/models/candidate_spec.rb +2 -2
  59. data/spec/models/department_spec.rb +2 -2
  60. data/spec/models/eeoc_spec.rb +2 -2
  61. data/spec/models/job_interview_stage_spec.rb +2 -2
  62. data/spec/models/job_spec.rb +2 -2
  63. data/spec/models/offer_spec.rb +2 -2
  64. data/spec/models/office_spec.rb +2 -2
  65. data/spec/models/patched_candidate_endpoint_request_spec.rb +40 -0
  66. data/spec/models/patched_candidate_request_spec.rb +130 -0
  67. data/spec/models/reject_reason_spec.rb +2 -2
  68. data/spec/models/remote_user_spec.rb +2 -2
  69. data/spec/models/scheduled_interview_spec.rb +2 -2
  70. data/spec/models/scorecard_spec.rb +2 -2
  71. data/spec/models/tag_spec.rb +2 -2
  72. metadata +140 -124
@@ -45,11 +45,11 @@ module MergeATSClient
45
45
  # Indicates whether or not this object has been deleted by third party webhooks.
46
46
  attr_accessor :remote_was_deleted
47
47
 
48
- attr_accessor :field_mappings
49
-
50
48
  # This is the datetime that this object was last updated by Merge
51
49
  attr_accessor :modified_at
52
50
 
51
+ attr_accessor :field_mappings
52
+
53
53
  attr_accessor :remote_data
54
54
 
55
55
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -65,8 +65,8 @@ module MergeATSClient
65
65
  :'start_date' => :'start_date',
66
66
  :'status' => :'status',
67
67
  :'remote_was_deleted' => :'remote_was_deleted',
68
- :'field_mappings' => :'field_mappings',
69
68
  :'modified_at' => :'modified_at',
69
+ :'field_mappings' => :'field_mappings',
70
70
  :'remote_data' => :'remote_data'
71
71
  }
72
72
  end
@@ -89,8 +89,8 @@ module MergeATSClient
89
89
  :'start_date' => :'Time',
90
90
  :'status' => :'OfferStatusEnum',
91
91
  :'remote_was_deleted' => :'Boolean',
92
- :'field_mappings' => :'Hash<String, Object>',
93
92
  :'modified_at' => :'Time',
93
+ :'field_mappings' => :'Hash<String, Object>',
94
94
  :'remote_data' => :'Array<RemoteData>'
95
95
  }
96
96
  end
@@ -166,16 +166,16 @@ module MergeATSClient
166
166
  self.remote_was_deleted = attributes[:'remote_was_deleted']
167
167
  end
168
168
 
169
+ if attributes.key?(:'modified_at')
170
+ self.modified_at = attributes[:'modified_at']
171
+ end
172
+
169
173
  if attributes.key?(:'field_mappings')
170
174
  if (value = attributes[:'field_mappings']).is_a?(Hash)
171
175
  self.field_mappings = value
172
176
  end
173
177
  end
174
178
 
175
- if attributes.key?(:'modified_at')
176
- self.modified_at = attributes[:'modified_at']
177
- end
178
-
179
179
  if attributes.key?(:'remote_data')
180
180
  if (value = attributes[:'remote_data']).is_a?(Array)
181
181
  self.remote_data = value
@@ -211,8 +211,8 @@ module MergeATSClient
211
211
  start_date == o.start_date &&
212
212
  status == o.status &&
213
213
  remote_was_deleted == o.remote_was_deleted &&
214
- field_mappings == o.field_mappings &&
215
214
  modified_at == o.modified_at &&
215
+ field_mappings == o.field_mappings &&
216
216
  remote_data == o.remote_data
217
217
  end
218
218
 
@@ -225,7 +225,7 @@ module MergeATSClient
225
225
  # Calculates hash code according to all attributes.
226
226
  # @return [Integer] Hash code
227
227
  def hash
228
- [id, remote_id, application, creator, remote_created_at, closed_at, sent_at, start_date, status, remote_was_deleted, field_mappings, modified_at, remote_data].hash
228
+ [id, remote_id, application, creator, remote_created_at, closed_at, sent_at, start_date, status, remote_was_deleted, modified_at, field_mappings, remote_data].hash
229
229
  end
230
230
 
231
231
  # Builds the object from hash
@@ -30,11 +30,11 @@ module MergeATSClient
30
30
  # Indicates whether or not this object has been deleted by third party webhooks.
31
31
  attr_accessor :remote_was_deleted
32
32
 
33
- attr_accessor :field_mappings
34
-
35
33
  # This is the datetime that this object was last updated by Merge
36
34
  attr_accessor :modified_at
37
35
 
36
+ attr_accessor :field_mappings
37
+
38
38
  attr_accessor :remote_data
39
39
 
40
40
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -45,8 +45,8 @@ module MergeATSClient
45
45
  :'name' => :'name',
46
46
  :'location' => :'location',
47
47
  :'remote_was_deleted' => :'remote_was_deleted',
48
- :'field_mappings' => :'field_mappings',
49
48
  :'modified_at' => :'modified_at',
49
+ :'field_mappings' => :'field_mappings',
50
50
  :'remote_data' => :'remote_data'
51
51
  }
52
52
  end
@@ -64,8 +64,8 @@ module MergeATSClient
64
64
  :'name' => :'String',
65
65
  :'location' => :'String',
66
66
  :'remote_was_deleted' => :'Boolean',
67
- :'field_mappings' => :'Hash<String, Object>',
68
67
  :'modified_at' => :'Time',
68
+ :'field_mappings' => :'Hash<String, Object>',
69
69
  :'remote_data' => :'Array<RemoteData>'
70
70
  }
71
71
  end
@@ -116,16 +116,16 @@ module MergeATSClient
116
116
  self.remote_was_deleted = attributes[:'remote_was_deleted']
117
117
  end
118
118
 
119
+ if attributes.key?(:'modified_at')
120
+ self.modified_at = attributes[:'modified_at']
121
+ end
122
+
119
123
  if attributes.key?(:'field_mappings')
120
124
  if (value = attributes[:'field_mappings']).is_a?(Hash)
121
125
  self.field_mappings = value
122
126
  end
123
127
  end
124
128
 
125
- if attributes.key?(:'modified_at')
126
- self.modified_at = attributes[:'modified_at']
127
- end
128
-
129
129
  if attributes.key?(:'remote_data')
130
130
  if (value = attributes[:'remote_data']).is_a?(Array)
131
131
  self.remote_data = value
@@ -156,8 +156,8 @@ module MergeATSClient
156
156
  name == o.name &&
157
157
  location == o.location &&
158
158
  remote_was_deleted == o.remote_was_deleted &&
159
- field_mappings == o.field_mappings &&
160
159
  modified_at == o.modified_at &&
160
+ field_mappings == o.field_mappings &&
161
161
  remote_data == o.remote_data
162
162
  end
163
163
 
@@ -170,7 +170,7 @@ module MergeATSClient
170
170
  # Calculates hash code according to all attributes.
171
171
  # @return [Integer] Hash code
172
172
  def hash
173
- [id, remote_id, name, location, remote_was_deleted, field_mappings, modified_at, remote_data].hash
173
+ [id, remote_id, name, location, remote_was_deleted, modified_at, field_mappings, remote_data].hash
174
174
  end
175
175
 
176
176
  # Builds the object from hash
@@ -0,0 +1,237 @@
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 PatchedCandidateEndpointRequest
18
+ attr_accessor :model
19
+
20
+ attr_accessor :remote_user_id
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'model' => :'model',
26
+ :'remote_user_id' => :'remote_user_id'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'model' => :'PatchedCandidateRequest',
39
+ :'remote_user_id' => :'String'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::PatchedCandidateEndpointRequest` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::PatchedCandidateEndpointRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'model')
65
+ self.model = attributes[:'model']
66
+ end
67
+
68
+ if attributes.key?(:'remote_user_id')
69
+ self.remote_user_id = attributes[:'remote_user_id']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ if @model.nil?
78
+ invalid_properties.push('invalid value for "model", model cannot be nil.')
79
+ end
80
+
81
+ if @remote_user_id.nil?
82
+ invalid_properties.push('invalid value for "remote_user_id", remote_user_id cannot be nil.')
83
+ end
84
+
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ return false if @model.nil?
92
+ return false if @remote_user_id.nil?
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ model == o.model &&
102
+ remote_user_id == o.remote_user_id
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [model, remote_user_id].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ new.build_from_hash(attributes)
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ self.class.openapi_types.each_pair do |key, type|
130
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
+ self.send("#{key}=", nil)
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ end
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = MergeATSClient.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end