merge_ats_client 2.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +16 -0
  3. data/README.md +20 -6
  4. data/docs/AccountDetails.md +3 -1
  5. data/docs/AccountDetailsAndActions.md +2 -0
  6. data/docs/ActivitiesApi.md +7 -3
  7. data/docs/Activity.md +1 -1
  8. data/docs/ApplicationsApi.md +84 -2
  9. data/docs/AttachmentsApi.md +7 -3
  10. data/docs/CandidatesApi.md +2 -2
  11. data/docs/ConditionSchema.md +30 -0
  12. data/docs/ConditionTypeEnum.md +15 -0
  13. data/docs/DataPassthroughRequest.md +3 -1
  14. data/docs/Department.md +1 -1
  15. data/docs/DepartmentsApi.md +2 -2
  16. data/docs/EEOC.md +1 -1
  17. data/docs/EeocsApi.md +7 -3
  18. data/docs/EmailAddressRequest.md +5 -1
  19. data/docs/EndUserDetailsRequest.md +9 -7
  20. data/docs/InterviewsApi.md +7 -3
  21. data/docs/Job.md +4 -2
  22. data/docs/JobInterviewStage.md +2 -2
  23. data/docs/JobInterviewStagesApi.md +2 -2
  24. data/docs/JobsApi.md +7 -3
  25. data/docs/LinkToken.md +3 -1
  26. data/docs/LinkedAccountCondition.md +28 -0
  27. data/docs/LinkedAccountConditionRequest.md +22 -0
  28. data/docs/LinkedAccountSelectiveSyncConfiguration.md +18 -0
  29. data/docs/LinkedAccountSelectiveSyncConfigurationListRequest.md +18 -0
  30. data/docs/LinkedAccountSelectiveSyncConfigurationRequest.md +18 -0
  31. data/docs/LinkedAccountsApi.md +2 -0
  32. data/docs/Offer.md +1 -1
  33. data/docs/OffersApi.md +7 -3
  34. data/docs/Office.md +1 -1
  35. data/docs/OfficesApi.md +2 -2
  36. data/docs/OperatorSchema.md +20 -0
  37. data/docs/PaginatedConditionSchemaList.md +22 -0
  38. data/docs/PhoneNumberRequest.md +5 -1
  39. data/docs/RejectReason.md +1 -1
  40. data/docs/RejectReasonsApi.md +2 -2
  41. data/docs/RemoteResponse.md +5 -1
  42. data/docs/RemoteUser.md +1 -1
  43. data/docs/ResponseTypeEnum.md +15 -0
  44. data/docs/ScheduledInterview.md +1 -1
  45. data/docs/Scorecard.md +1 -1
  46. data/docs/ScorecardsApi.md +7 -3
  47. data/docs/SelectiveSyncApi.md +233 -0
  48. data/docs/SyncStatus.md +2 -2
  49. data/docs/SyncStatusApi.md +1 -1
  50. data/docs/Tag.md +1 -1
  51. data/docs/TagsApi.md +2 -2
  52. data/docs/UpdateApplicationStageRequest.md +20 -0
  53. data/docs/UrlRequest.md +5 -1
  54. data/docs/UsersApi.md +7 -3
  55. data/lib/merge_ats_client/api/activities_api.rb +16 -2
  56. data/lib/merge_ats_client/api/applications_api.rb +80 -2
  57. data/lib/merge_ats_client/api/attachments_api.rb +16 -2
  58. data/lib/merge_ats_client/api/candidates_api.rb +2 -2
  59. data/lib/merge_ats_client/api/departments_api.rb +2 -2
  60. data/lib/merge_ats_client/api/eeocs_api.rb +16 -2
  61. data/lib/merge_ats_client/api/interviews_api.rb +16 -2
  62. data/lib/merge_ats_client/api/job_interview_stages_api.rb +2 -2
  63. data/lib/merge_ats_client/api/jobs_api.rb +16 -2
  64. data/lib/merge_ats_client/api/linked_accounts_api.rb +3 -0
  65. data/lib/merge_ats_client/api/offers_api.rb +16 -2
  66. data/lib/merge_ats_client/api/offices_api.rb +2 -2
  67. data/lib/merge_ats_client/api/reject_reasons_api.rb +2 -2
  68. data/lib/merge_ats_client/api/scorecards_api.rb +16 -2
  69. data/lib/merge_ats_client/api/selective_sync_api.rb +225 -0
  70. data/lib/merge_ats_client/api/sync_status_api.rb +2 -2
  71. data/lib/merge_ats_client/api/tags_api.rb +2 -2
  72. data/lib/merge_ats_client/api/users_api.rb +16 -2
  73. data/lib/merge_ats_client/models/access_role_enum.rb +17 -7
  74. data/lib/merge_ats_client/models/account_details.rb +15 -4
  75. data/lib/merge_ats_client/models/account_details_and_actions.rb +12 -1
  76. data/lib/merge_ats_client/models/account_details_and_actions_status_enum.rb +17 -7
  77. data/lib/merge_ats_client/models/activity.rb +1 -1
  78. data/lib/merge_ats_client/models/activity_type_enum.rb +17 -7
  79. data/lib/merge_ats_client/models/application.rb +1 -1
  80. data/lib/merge_ats_client/models/application_request.rb +3 -3
  81. data/lib/merge_ats_client/models/attachment_request.rb +2 -2
  82. data/lib/merge_ats_client/models/attachment_type_enum.rb +17 -7
  83. data/lib/merge_ats_client/models/candidate.rb +1 -1
  84. data/lib/merge_ats_client/models/candidate_request.rb +3 -3
  85. data/lib/merge_ats_client/models/categories_enum.rb +17 -7
  86. data/lib/merge_ats_client/models/category_enum.rb +17 -7
  87. data/lib/merge_ats_client/models/condition_schema.rb +297 -0
  88. data/lib/merge_ats_client/models/condition_type_enum.rb +50 -0
  89. data/lib/merge_ats_client/models/data_passthrough_request.rb +15 -6
  90. data/lib/merge_ats_client/models/department.rb +1 -1
  91. data/lib/merge_ats_client/models/disability_status_enum.rb +17 -7
  92. data/lib/merge_ats_client/models/eeoc.rb +1 -1
  93. data/lib/merge_ats_client/models/email_address_request.rb +29 -5
  94. data/lib/merge_ats_client/models/email_address_type_enum.rb +17 -7
  95. data/lib/merge_ats_client/models/encoding_enum.rb +18 -7
  96. data/lib/merge_ats_client/models/end_user_details_request.rb +28 -11
  97. data/lib/merge_ats_client/models/gender_enum.rb +17 -7
  98. data/lib/merge_ats_client/models/issue.rb +1 -1
  99. data/lib/merge_ats_client/models/issue_status_enum.rb +17 -7
  100. data/lib/merge_ats_client/models/job.rb +14 -3
  101. data/lib/merge_ats_client/models/job_interview_stage.rb +3 -2
  102. data/lib/merge_ats_client/models/job_status_enum.rb +17 -7
  103. data/lib/merge_ats_client/models/link_token.rb +13 -4
  104. data/lib/merge_ats_client/models/linked_account_condition.rb +282 -0
  105. data/lib/merge_ats_client/models/linked_account_condition_request.rb +269 -0
  106. data/lib/merge_ats_client/models/linked_account_selective_sync_configuration.rb +221 -0
  107. data/lib/merge_ats_client/models/linked_account_selective_sync_configuration_list_request.rb +226 -0
  108. data/lib/merge_ats_client/models/linked_account_selective_sync_configuration_request.rb +226 -0
  109. data/lib/merge_ats_client/models/meta_response.rb +1 -1
  110. data/lib/merge_ats_client/models/method_enum.rb +17 -7
  111. data/lib/merge_ats_client/models/offer.rb +1 -1
  112. data/lib/merge_ats_client/models/offer_status_enum.rb +17 -7
  113. data/lib/merge_ats_client/models/office.rb +1 -1
  114. data/lib/merge_ats_client/models/operator_schema.rb +229 -0
  115. data/lib/merge_ats_client/models/overall_recommendation_enum.rb +17 -7
  116. data/lib/merge_ats_client/models/{remote_data_request.rb → paginated_condition_schema_list.rb} +28 -41
  117. data/lib/merge_ats_client/models/phone_number_request.rb +29 -5
  118. data/lib/merge_ats_client/models/phone_number_type_enum.rb +17 -7
  119. data/lib/merge_ats_client/models/race_enum.rb +17 -7
  120. data/lib/merge_ats_client/models/reason_enum.rb +17 -7
  121. data/lib/merge_ats_client/models/reject_reason.rb +1 -1
  122. data/lib/merge_ats_client/models/remote_response.rb +23 -9
  123. data/lib/merge_ats_client/models/remote_user.rb +1 -1
  124. data/lib/merge_ats_client/models/request_format_enum.rb +17 -7
  125. data/lib/merge_ats_client/models/response_type_enum.rb +45 -0
  126. data/lib/merge_ats_client/models/scheduled_interview.rb +2 -2
  127. data/lib/merge_ats_client/models/scheduled_interview_status_enum.rb +17 -7
  128. data/lib/merge_ats_client/models/scorecard.rb +2 -2
  129. data/lib/merge_ats_client/models/sync_status.rb +0 -10
  130. data/lib/merge_ats_client/models/sync_status_status_enum.rb +18 -7
  131. data/lib/merge_ats_client/models/tag.rb +2 -2
  132. data/lib/merge_ats_client/models/update_application_stage_request.rb +244 -0
  133. data/lib/merge_ats_client/models/url.rb +1 -1
  134. data/lib/merge_ats_client/models/url_request.rb +30 -6
  135. data/lib/merge_ats_client/models/url_type_enum.rb +18 -7
  136. data/lib/merge_ats_client/models/veteran_status_enum.rb +17 -7
  137. data/lib/merge_ats_client/models/visibility_enum.rb +17 -7
  138. data/lib/merge_ats_client/version.rb +1 -1
  139. data/lib/merge_ats_client.rb +12 -1
  140. data/spec/api/activities_api_spec.rb +3 -1
  141. data/spec/api/applications_api_spec.rb +16 -1
  142. data/spec/api/attachments_api_spec.rb +3 -1
  143. data/spec/api/candidates_api_spec.rb +1 -1
  144. data/spec/api/departments_api_spec.rb +1 -1
  145. data/spec/api/eeocs_api_spec.rb +3 -1
  146. data/spec/api/interviews_api_spec.rb +3 -1
  147. data/spec/api/job_interview_stages_api_spec.rb +1 -1
  148. data/spec/api/jobs_api_spec.rb +3 -1
  149. data/spec/api/linked_accounts_api_spec.rb +1 -0
  150. data/spec/api/offers_api_spec.rb +3 -1
  151. data/spec/api/offices_api_spec.rb +1 -1
  152. data/spec/api/reject_reasons_api_spec.rb +1 -1
  153. data/spec/api/scorecards_api_spec.rb +3 -1
  154. data/spec/api/selective_sync_api_spec.rb +72 -0
  155. data/spec/api/sync_status_api_spec.rb +1 -1
  156. data/spec/api/tags_api_spec.rb +1 -1
  157. data/spec/api/users_api_spec.rb +3 -1
  158. data/spec/models/account_details_and_actions_spec.rb +6 -0
  159. data/spec/models/account_details_spec.rb +6 -0
  160. data/spec/models/condition_schema_spec.rb +70 -0
  161. data/spec/models/condition_type_enum_spec.rb +28 -0
  162. data/spec/models/data_passthrough_request_spec.rb +6 -0
  163. data/spec/models/email_address_request_spec.rb +12 -0
  164. data/spec/models/end_user_details_request_spec.rb +6 -0
  165. data/spec/models/job_spec.rb +6 -0
  166. data/spec/models/link_token_spec.rb +6 -0
  167. data/spec/models/linked_account_condition_request_spec.rb +46 -0
  168. data/spec/models/linked_account_condition_spec.rb +64 -0
  169. data/spec/models/linked_account_selective_sync_configuration_list_request_spec.rb +34 -0
  170. data/spec/models/linked_account_selective_sync_configuration_request_spec.rb +34 -0
  171. data/spec/models/linked_account_selective_sync_configuration_spec.rb +34 -0
  172. data/spec/models/operator_schema_spec.rb +40 -0
  173. data/spec/models/paginated_condition_schema_list_spec.rb +46 -0
  174. data/spec/models/phone_number_request_spec.rb +12 -0
  175. data/spec/models/remote_response_spec.rb +12 -0
  176. data/spec/models/response_type_enum_spec.rb +28 -0
  177. data/spec/models/update_application_stage_request_spec.rb +40 -0
  178. data/spec/models/url_request_spec.rb +12 -0
  179. metadata +153 -105
@@ -127,7 +127,7 @@ module MergeATSClient
127
127
  :'applications' => :'Array<String>',
128
128
  :'attachments' => :'Array<String>',
129
129
  :'remote_data' => :'Array<RemoteData>',
130
- :'custom_fields' => :'Hash<String, AnyType>',
130
+ :'custom_fields' => :'Hash<String, Object>',
131
131
  :'remote_was_deleted' => :'Boolean'
132
132
  }
133
133
  end
@@ -125,10 +125,10 @@ module MergeATSClient
125
125
  :'tags' => :'Array<String>',
126
126
  :'applications' => :'Array<String>',
127
127
  :'attachments' => :'Array<String>',
128
- :'custom_fields' => :'Hash<String, AnyType>',
128
+ :'custom_fields' => :'Hash<String, Object>',
129
129
  :'remote_template_id' => :'String',
130
- :'integration_params' => :'Hash<String, AnyType>',
131
- :'linked_account_params' => :'Hash<String, AnyType>'
130
+ :'integration_params' => :'Hash<String, Object>',
131
+ :'linked_account_params' => :'Hash<String, Object>'
132
132
  }
133
133
  end
134
134
 
@@ -21,18 +21,28 @@ module MergeATSClient
21
21
  TICKETING = "ticketing".freeze
22
22
  CRM = "crm".freeze
23
23
 
24
- # Builds the enum from string
25
- # @param [String] The enum value in the form of the string
26
- # @return [String] The enum value
27
- def self.build_from_hash(value)
28
- new.build_from_hash(value)
29
- end
24
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
25
+
26
+ attr_accessor :value
27
+ attr_accessor :raw_value
30
28
 
31
29
  # Builds the enum from string
32
30
  # @param [String] The enum value in the form of the string
33
31
  # @return [String] The enum value
34
32
  def build_from_hash(value)
35
- value
33
+ @raw_value = value
34
+ if ["hris", "ats", "accounting", "ticketing", "crm", ].include? value
35
+ @value = value
36
+ else
37
+ @value = MERGE_NONSTANDARD_VALUE
38
+ end
39
+
40
+ self
41
+ end
42
+
43
+ def self.build_from_hash(value)
44
+ CategoriesEnum.new.build_from_hash(value)
36
45
  end
37
46
  end
47
+
38
48
  end
@@ -21,18 +21,28 @@ module MergeATSClient
21
21
  TICKETING = "ticketing".freeze
22
22
  CRM = "crm".freeze
23
23
 
24
- # Builds the enum from string
25
- # @param [String] The enum value in the form of the string
26
- # @return [String] The enum value
27
- def self.build_from_hash(value)
28
- new.build_from_hash(value)
29
- end
24
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
25
+
26
+ attr_accessor :value
27
+ attr_accessor :raw_value
30
28
 
31
29
  # Builds the enum from string
32
30
  # @param [String] The enum value in the form of the string
33
31
  # @return [String] The enum value
34
32
  def build_from_hash(value)
35
- value
33
+ @raw_value = value
34
+ if ["hris", "ats", "accounting", "ticketing", "crm", ].include? value
35
+ @value = value
36
+ else
37
+ @value = MERGE_NONSTANDARD_VALUE
38
+ end
39
+
40
+ self
41
+ end
42
+
43
+ def self.build_from_hash(value)
44
+ CategoryEnum.new.build_from_hash(value)
36
45
  end
37
46
  end
47
+
38
48
  end
@@ -0,0 +1,297 @@
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 ConditionSchema
18
+ # The ID of the condition schema. This ID is used when updating selective syncs for a linked account.
19
+ attr_accessor :id
20
+
21
+ # The common model for which a condition schema is defined.
22
+ attr_accessor :common_model
23
+
24
+ # User-facing *native condition* name. e.g. \"Skip Manager\".
25
+ attr_accessor :native_name
26
+
27
+ # The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. \"location_type\".
28
+ attr_accessor :field_name
29
+
30
+ # Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times.
31
+ attr_accessor :is_unique
32
+
33
+ attr_accessor :condition_type
34
+
35
+ # The schemas for the operators that can be used on a condition.
36
+ attr_accessor :operators
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'id' => :'id',
42
+ :'common_model' => :'common_model',
43
+ :'native_name' => :'native_name',
44
+ :'field_name' => :'field_name',
45
+ :'is_unique' => :'is_unique',
46
+ :'condition_type' => :'condition_type',
47
+ :'operators' => :'operators'
48
+ }
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'id' => :'String',
60
+ :'common_model' => :'String',
61
+ :'native_name' => :'String',
62
+ :'field_name' => :'String',
63
+ :'is_unique' => :'Boolean',
64
+ :'condition_type' => :'ConditionTypeEnum',
65
+ :'operators' => :'Array<OperatorSchema>'
66
+ }
67
+ end
68
+
69
+ # List of attributes with nullable: true
70
+ def self.openapi_nullable
71
+ Set.new([
72
+ :'native_name',
73
+ :'field_name',
74
+ ])
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::ConditionSchema` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!self.class.attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::ConditionSchema`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'id')
93
+ self.id = attributes[:'id']
94
+ end
95
+
96
+ if attributes.key?(:'common_model')
97
+ self.common_model = attributes[:'common_model']
98
+ end
99
+
100
+ if attributes.key?(:'native_name')
101
+ self.native_name = attributes[:'native_name']
102
+ end
103
+
104
+ if attributes.key?(:'field_name')
105
+ self.field_name = attributes[:'field_name']
106
+ end
107
+
108
+ if attributes.key?(:'is_unique')
109
+ self.is_unique = attributes[:'is_unique']
110
+ end
111
+
112
+ if attributes.key?(:'condition_type')
113
+ self.condition_type = attributes[:'condition_type']
114
+ end
115
+
116
+ if attributes.key?(:'operators')
117
+ if (value = attributes[:'operators']).is_a?(Array)
118
+ self.operators = value
119
+ end
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ invalid_properties = Array.new
127
+ if @id.nil?
128
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
129
+ end
130
+
131
+ if @condition_type.nil?
132
+ invalid_properties.push('invalid value for "condition_type", condition_type cannot be nil.')
133
+ end
134
+
135
+ if @operators.nil?
136
+ invalid_properties.push('invalid value for "operators", operators cannot be nil.')
137
+ end
138
+
139
+ invalid_properties
140
+ end
141
+
142
+ # Check to see if the all the properties in the model are valid
143
+ # @return true if the model is valid
144
+ def valid?
145
+ return false if @id.nil?
146
+ return false if @condition_type.nil?
147
+ return false if @operators.nil?
148
+ true
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ id == o.id &&
157
+ common_model == o.common_model &&
158
+ native_name == o.native_name &&
159
+ field_name == o.field_name &&
160
+ is_unique == o.is_unique &&
161
+ condition_type == o.condition_type &&
162
+ operators == o.operators
163
+ end
164
+
165
+ # @see the `==` method
166
+ # @param [Object] Object to be compared
167
+ def eql?(o)
168
+ self == o
169
+ end
170
+
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Integer] Hash code
173
+ def hash
174
+ [id, common_model, native_name, field_name, is_unique, condition_type, operators].hash
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def self.build_from_hash(attributes)
181
+ new.build_from_hash(attributes)
182
+ end
183
+
184
+ # Builds the object from hash
185
+ # @param [Hash] attributes Model attributes in the form of hash
186
+ # @return [Object] Returns the model itself
187
+ def build_from_hash(attributes)
188
+ return nil unless attributes.is_a?(Hash)
189
+ self.class.openapi_types.each_pair do |key, type|
190
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
191
+ self.send("#{key}=", nil)
192
+ elsif type =~ /\AArray<(.*)>/i
193
+ # check to ensure the input is an array given that the attribute
194
+ # is documented as an array but the input is not
195
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
196
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
197
+ end
198
+ elsif !attributes[self.class.attribute_map[key]].nil?
199
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
200
+ end
201
+ end
202
+
203
+ self
204
+ end
205
+
206
+ # Deserializes the data based on type
207
+ # @param string type Data type
208
+ # @param string value Value to be deserialized
209
+ # @return [Object] Deserialized data
210
+ def _deserialize(type, value)
211
+ case type.to_sym
212
+ when :Time
213
+ Time.parse(value)
214
+ when :Date
215
+ Date.parse(value)
216
+ when :String
217
+ value
218
+ when :Integer
219
+ value.to_i
220
+ when :Float
221
+ value.to_f
222
+ when :Boolean
223
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
224
+ true
225
+ else
226
+ false
227
+ end
228
+ when :Object
229
+ # generic object (usually a Hash), return directly
230
+ value
231
+ when /\AArray<(?<inner_type>.+)>\z/
232
+ inner_type = Regexp.last_match[:inner_type]
233
+ value.map { |v| _deserialize(inner_type, v) }
234
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
235
+ k_type = Regexp.last_match[:k_type]
236
+ v_type = Regexp.last_match[:v_type]
237
+ {}.tap do |hash|
238
+ value.each do |k, v|
239
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
240
+ end
241
+ end
242
+ else # model
243
+ # models (e.g. Pet) or oneOf
244
+ klass = MergeATSClient.const_get(type)
245
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
246
+ end
247
+ end
248
+
249
+ # Returns the string representation of the object
250
+ # @return [String] String presentation of the object
251
+ def to_s
252
+ to_hash.to_s
253
+ end
254
+
255
+ # to_body is an alias to to_hash (backward compatibility)
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_body
258
+ to_hash
259
+ end
260
+
261
+ # Returns the object in the form of hash
262
+ # @return [Hash] Returns the object in the form of hash
263
+ def to_hash
264
+ hash = {}
265
+ self.class.attribute_map.each_pair do |attr, param|
266
+ value = self.send(attr)
267
+ if value.nil?
268
+ is_nullable = self.class.openapi_nullable.include?(attr)
269
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
270
+ end
271
+
272
+ hash[param] = _to_hash(value)
273
+ end
274
+ hash
275
+ end
276
+
277
+ # Outputs non-array value in the form of hash
278
+ # For object, use to_hash. Otherwise, just return the value
279
+ # @param [Object] value Any valid value
280
+ # @return [Hash] Returns the value in the form of hash
281
+ def _to_hash(value)
282
+ if value.is_a?(Array)
283
+ value.compact.map { |v| _to_hash(v) }
284
+ elsif value.is_a?(Hash)
285
+ {}.tap do |hash|
286
+ value.each { |k, v| hash[k] = _to_hash(v) }
287
+ end
288
+ elsif value.respond_to? :to_hash
289
+ value.to_hash
290
+ else
291
+ value
292
+ end
293
+ end
294
+
295
+ end
296
+
297
+ end
@@ -0,0 +1,50 @@
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 ConditionTypeEnum
18
+ BOOLEAN = "BOOLEAN".freeze
19
+ DATE = "DATE".freeze
20
+ DATE_TIME = "DATE_TIME".freeze
21
+ INTEGER = "INTEGER".freeze
22
+ FLOAT = "FLOAT".freeze
23
+ STRING = "STRING".freeze
24
+ LIST_OF_STRINGS = "LIST_OF_STRINGS".freeze
25
+
26
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
27
+
28
+ attr_accessor :value
29
+ attr_accessor :raw_value
30
+
31
+ # Builds the enum from string
32
+ # @param [String] The enum value in the form of the string
33
+ # @return [String] The enum value
34
+ def build_from_hash(value)
35
+ @raw_value = value
36
+ if ["BOOLEAN", "DATE", "DATE_TIME", "INTEGER", "FLOAT", "STRING", "LIST_OF_STRINGS", ].include? value
37
+ @value = value
38
+ else
39
+ @value = MERGE_NONSTANDARD_VALUE
40
+ end
41
+
42
+ self
43
+ end
44
+
45
+ def self.build_from_hash(value)
46
+ ConditionTypeEnum.new.build_from_hash(value)
47
+ end
48
+ end
49
+
50
+ end
@@ -32,6 +32,8 @@ module MergeATSClient
32
32
 
33
33
  attr_accessor :request_format
34
34
 
35
+ attr_accessor :normalize_response
36
+
35
37
  # Attribute mapping from ruby-style variable name to JSON key.
36
38
  def self.attribute_map
37
39
  {
@@ -41,7 +43,8 @@ module MergeATSClient
41
43
  :'data' => :'data',
42
44
  :'multipart_form_data' => :'multipart_form_data',
43
45
  :'headers' => :'headers',
44
- :'request_format' => :'request_format'
46
+ :'request_format' => :'request_format',
47
+ :'normalize_response' => :'normalize_response'
45
48
  }
46
49
  end
47
50
 
@@ -58,8 +61,9 @@ module MergeATSClient
58
61
  :'base_url_override' => :'String',
59
62
  :'data' => :'String',
60
63
  :'multipart_form_data' => :'Array<MultipartFormFieldRequest>',
61
- :'headers' => :'Hash<String, AnyType>',
62
- :'request_format' => :'RequestFormatEnum'
64
+ :'headers' => :'Hash<String, Object>',
65
+ :'request_format' => :'RequestFormatEnum',
66
+ :'normalize_response' => :'Boolean'
63
67
  }
64
68
  end
65
69
 
@@ -70,7 +74,7 @@ module MergeATSClient
70
74
  :'data',
71
75
  :'multipart_form_data',
72
76
  :'headers',
73
- :'request_format'
77
+ :'request_format',
74
78
  ])
75
79
  end
76
80
 
@@ -120,6 +124,10 @@ module MergeATSClient
120
124
  if attributes.key?(:'request_format')
121
125
  self.request_format = attributes[:'request_format']
122
126
  end
127
+
128
+ if attributes.key?(:'normalize_response')
129
+ self.normalize_response = attributes[:'normalize_response']
130
+ end
123
131
  end
124
132
 
125
133
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -205,7 +213,8 @@ module MergeATSClient
205
213
  data == o.data &&
206
214
  multipart_form_data == o.multipart_form_data &&
207
215
  headers == o.headers &&
208
- request_format == o.request_format
216
+ request_format == o.request_format &&
217
+ normalize_response == o.normalize_response
209
218
  end
210
219
 
211
220
  # @see the `==` method
@@ -217,7 +226,7 @@ module MergeATSClient
217
226
  # Calculates hash code according to all attributes.
218
227
  # @return [Integer] Hash code
219
228
  def hash
220
- [method, path, base_url_override, data, multipart_form_data, headers, request_format].hash
229
+ [method, path, base_url_override, data, multipart_form_data, headers, request_format, normalize_response].hash
221
230
  end
222
231
 
223
232
  # Builds the object from hash
@@ -26,7 +26,7 @@ module MergeATSClient
26
26
 
27
27
  attr_accessor :remote_data
28
28
 
29
- # Indicates whether or not this object has been deleted on the third-party.
29
+ # Indicates whether or not this object has been deleted by third party webhooks.
30
30
  attr_accessor :remote_was_deleted
31
31
 
32
32
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -19,18 +19,28 @@ module MergeATSClient
19
19
  NO_I_DONT_HAVE_A_DISABILITY = "NO_I_DONT_HAVE_A_DISABILITY".freeze
20
20
  I_DONT_WISH_TO_ANSWER = "I_DONT_WISH_TO_ANSWER".freeze
21
21
 
22
- # Builds the enum from string
23
- # @param [String] The enum value in the form of the string
24
- # @return [String] The enum value
25
- def self.build_from_hash(value)
26
- new.build_from_hash(value)
27
- end
22
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
23
+
24
+ attr_accessor :value
25
+ attr_accessor :raw_value
28
26
 
29
27
  # Builds the enum from string
30
28
  # @param [String] The enum value in the form of the string
31
29
  # @return [String] The enum value
32
30
  def build_from_hash(value)
33
- value
31
+ @raw_value = value
32
+ if ["YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY", "NO_I_DONT_HAVE_A_DISABILITY", "I_DONT_WISH_TO_ANSWER", ].include? value
33
+ @value = value
34
+ else
35
+ @value = MERGE_NONSTANDARD_VALUE
36
+ end
37
+
38
+ self
39
+ end
40
+
41
+ def self.build_from_hash(value)
42
+ DisabilityStatusEnum.new.build_from_hash(value)
34
43
  end
35
44
  end
45
+
36
46
  end
@@ -40,7 +40,7 @@ module MergeATSClient
40
40
 
41
41
  attr_accessor :remote_data
42
42
 
43
- # Indicates whether or not this object has been deleted on the third-party.
43
+ # Indicates whether or not this object has been deleted by third party webhooks.
44
44
  attr_accessor :remote_was_deleted
45
45
 
46
46
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -22,11 +22,17 @@ module MergeATSClient
22
22
  # The type of email address.
23
23
  attr_accessor :email_address_type
24
24
 
25
+ attr_accessor :integration_params
26
+
27
+ attr_accessor :linked_account_params
28
+
25
29
  # Attribute mapping from ruby-style variable name to JSON key.
26
30
  def self.attribute_map
27
31
  {
28
32
  :'value' => :'value',
29
- :'email_address_type' => :'email_address_type'
33
+ :'email_address_type' => :'email_address_type',
34
+ :'integration_params' => :'integration_params',
35
+ :'linked_account_params' => :'linked_account_params'
30
36
  }
31
37
  end
32
38
 
@@ -39,7 +45,9 @@ module MergeATSClient
39
45
  def self.openapi_types
40
46
  {
41
47
  :'value' => :'String',
42
- :'email_address_type' => :'EmailAddressTypeEnum'
48
+ :'email_address_type' => :'EmailAddressTypeEnum',
49
+ :'integration_params' => :'Hash<String, Object>',
50
+ :'linked_account_params' => :'Hash<String, Object>'
43
51
  }
44
52
  end
45
53
 
@@ -47,7 +55,9 @@ module MergeATSClient
47
55
  def self.openapi_nullable
48
56
  Set.new([
49
57
  :'value',
50
- :'email_address_type'
58
+ :'email_address_type',
59
+ :'integration_params',
60
+ :'linked_account_params'
51
61
  ])
52
62
  end
53
63
 
@@ -73,6 +83,18 @@ module MergeATSClient
73
83
  if attributes.key?(:'email_address_type')
74
84
  self.email_address_type = attributes[:'email_address_type']
75
85
  end
86
+
87
+ if attributes.key?(:'integration_params')
88
+ if (value = attributes[:'integration_params']).is_a?(Hash)
89
+ self.integration_params = value
90
+ end
91
+ end
92
+
93
+ if attributes.key?(:'linked_account_params')
94
+ if (value = attributes[:'linked_account_params']).is_a?(Hash)
95
+ self.linked_account_params = value
96
+ end
97
+ end
76
98
  end
77
99
 
78
100
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -109,7 +131,9 @@ module MergeATSClient
109
131
  return true if self.equal?(o)
110
132
  self.class == o.class &&
111
133
  value == o.value &&
112
- email_address_type == o.email_address_type
134
+ email_address_type == o.email_address_type &&
135
+ integration_params == o.integration_params &&
136
+ linked_account_params == o.linked_account_params
113
137
  end
114
138
 
115
139
  # @see the `==` method
@@ -121,7 +145,7 @@ module MergeATSClient
121
145
  # Calculates hash code according to all attributes.
122
146
  # @return [Integer] Hash code
123
147
  def hash
124
- [value, email_address_type].hash
148
+ [value, email_address_type, integration_params, linked_account_params].hash
125
149
  end
126
150
 
127
151
  # Builds the object from hash
@@ -19,18 +19,28 @@ module MergeATSClient
19
19
  WORK = "WORK".freeze
20
20
  OTHER = "OTHER".freeze
21
21
 
22
- # Builds the enum from string
23
- # @param [String] The enum value in the form of the string
24
- # @return [String] The enum value
25
- def self.build_from_hash(value)
26
- new.build_from_hash(value)
27
- end
22
+ MERGE_NONSTANDARD_VALUE = "MERGE_NONSTANDARD_VALUE".freeze
23
+
24
+ attr_accessor :value
25
+ attr_accessor :raw_value
28
26
 
29
27
  # Builds the enum from string
30
28
  # @param [String] The enum value in the form of the string
31
29
  # @return [String] The enum value
32
30
  def build_from_hash(value)
33
- value
31
+ @raw_value = value
32
+ if ["PERSONAL", "WORK", "OTHER", ].include? value
33
+ @value = value
34
+ else
35
+ @value = MERGE_NONSTANDARD_VALUE
36
+ end
37
+
38
+ self
39
+ end
40
+
41
+ def self.build_from_hash(value)
42
+ EmailAddressTypeEnum.new.build_from_hash(value)
34
43
  end
35
44
  end
45
+
36
46
  end