merge_ats_client 2.0.1 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (237) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +16 -0
  3. data/README.md +186 -167
  4. data/docs/AccountIntegration.md +6 -2
  5. data/docs/ActivitiesApi.md +164 -8
  6. data/docs/Activity.md +12 -6
  7. data/docs/ActivityEndpointRequest.md +20 -0
  8. data/docs/ActivityRequest.md +32 -0
  9. data/docs/ActivityResponse.md +24 -0
  10. data/docs/Application.md +12 -10
  11. data/docs/ApplicationRequest.md +5 -9
  12. data/docs/ApplicationsApi.md +4 -4
  13. data/docs/Attachment.md +8 -4
  14. data/docs/AttachmentRequest.md +1 -3
  15. data/docs/AttachmentsApi.md +13 -9
  16. data/docs/Candidate.md +8 -6
  17. data/docs/CandidateRequest.md +1 -9
  18. data/docs/CandidatesApi.md +16 -13
  19. data/docs/CommonModelScopesBodyRequest.md +22 -0
  20. data/docs/ConditionSchema.md +30 -0
  21. data/docs/ConditionTypeEnum.md +15 -0
  22. data/docs/DataPassthroughRequest.md +1 -1
  23. data/docs/Department.md +7 -3
  24. data/docs/DepartmentsApi.md +4 -4
  25. data/docs/EEOC.md +12 -8
  26. data/docs/EeocsApi.md +13 -9
  27. data/docs/EmailAddress.md +4 -2
  28. data/docs/EmailAddressRequest.md +6 -2
  29. data/docs/EnabledActionsEnum.md +15 -0
  30. data/docs/EndUserDetailsRequest.md +5 -3
  31. data/docs/ForceResyncApi.md +1 -1
  32. data/docs/InterviewsApi.md +165 -9
  33. data/docs/Issue.md +10 -8
  34. data/docs/IssuesApi.md +6 -6
  35. data/docs/Job.md +8 -4
  36. data/docs/JobInterviewStage.md +10 -4
  37. data/docs/JobInterviewStagesApi.md +4 -4
  38. data/docs/JobsApi.md +16 -10
  39. data/docs/LinkToken.md +1 -1
  40. data/docs/LinkedAccountCondition.md +28 -0
  41. data/docs/LinkedAccountConditionRequest.md +22 -0
  42. data/docs/LinkedAccountSelectiveSyncConfiguration.md +18 -0
  43. data/docs/LinkedAccountSelectiveSyncConfigurationListRequest.md +18 -0
  44. data/docs/LinkedAccountSelectiveSyncConfigurationRequest.md +18 -0
  45. data/docs/LinkedAccountsApi.md +2 -2
  46. data/docs/MetaResponse.md +2 -0
  47. data/docs/MultipartFormFieldRequest.md +1 -1
  48. data/docs/Offer.md +10 -6
  49. data/docs/OffersApi.md +13 -9
  50. data/docs/Office.md +7 -3
  51. data/docs/OfficesApi.md +4 -4
  52. data/docs/OperatorSchema.md +20 -0
  53. data/docs/PaginatedConditionSchemaList.md +22 -0
  54. data/docs/PhoneNumber.md +4 -2
  55. data/docs/PhoneNumberRequest.md +6 -2
  56. data/docs/RejectReason.md +7 -3
  57. data/docs/RejectReasonsApi.md +4 -4
  58. data/docs/RemoteUser.md +8 -4
  59. data/docs/ScheduledInterview.md +11 -7
  60. data/docs/ScheduledInterviewEndpointRequest.md +20 -0
  61. data/docs/ScheduledInterviewRequest.md +36 -0
  62. data/docs/ScheduledInterviewResponse.md +24 -0
  63. data/docs/Scorecard.md +11 -7
  64. data/docs/ScorecardsApi.md +13 -9
  65. data/docs/SelectiveSyncApi.md +233 -0
  66. data/docs/SelectiveSyncConfigurationsUsageEnum.md +15 -0
  67. data/docs/SyncStatus.md +3 -1
  68. data/docs/SyncStatusApi.md +1 -1
  69. data/docs/Tag.md +7 -3
  70. data/docs/TagsApi.md +4 -4
  71. data/docs/Url.md +4 -2
  72. data/docs/UrlRequest.md +6 -2
  73. data/docs/UsersApi.md +13 -9
  74. data/lib/merge_ats_client/api/activities_api.rb +160 -8
  75. data/lib/merge_ats_client/api/applications_api.rb +4 -4
  76. data/lib/merge_ats_client/api/attachments_api.rb +22 -8
  77. data/lib/merge_ats_client/api/candidates_api.rb +15 -11
  78. data/lib/merge_ats_client/api/departments_api.rb +4 -4
  79. data/lib/merge_ats_client/api/eeocs_api.rb +22 -8
  80. data/lib/merge_ats_client/api/force_resync_api.rb +2 -2
  81. data/lib/merge_ats_client/api/interviews_api.rb +160 -8
  82. data/lib/merge_ats_client/api/issues_api.rb +6 -6
  83. data/lib/merge_ats_client/api/job_interview_stages_api.rb +4 -4
  84. data/lib/merge_ats_client/api/jobs_api.rb +27 -10
  85. data/lib/merge_ats_client/api/linked_accounts_api.rb +3 -3
  86. data/lib/merge_ats_client/api/offers_api.rb +22 -8
  87. data/lib/merge_ats_client/api/offices_api.rb +4 -4
  88. data/lib/merge_ats_client/api/reject_reasons_api.rb +4 -4
  89. data/lib/merge_ats_client/api/scorecards_api.rb +22 -8
  90. data/lib/merge_ats_client/api/selective_sync_api.rb +225 -0
  91. data/lib/merge_ats_client/api/sync_status_api.rb +2 -2
  92. data/lib/merge_ats_client/api/tags_api.rb +4 -4
  93. data/lib/merge_ats_client/api/users_api.rb +22 -8
  94. data/lib/merge_ats_client/models/access_role_enum.rb +1 -1
  95. data/lib/merge_ats_client/models/account_details_and_actions_status_enum.rb +1 -1
  96. data/lib/merge_ats_client/models/account_integration.rb +30 -8
  97. data/lib/merge_ats_client/models/activity.rb +50 -16
  98. data/lib/merge_ats_client/models/activity_endpoint_request.rb +237 -0
  99. data/lib/merge_ats_client/models/activity_request.rb +300 -0
  100. data/lib/merge_ats_client/models/activity_response.rb +266 -0
  101. data/lib/merge_ats_client/models/activity_type_enum.rb +1 -1
  102. data/lib/merge_ats_client/models/application.rb +40 -26
  103. data/lib/merge_ats_client/models/application_request.rb +7 -26
  104. data/lib/merge_ats_client/models/attachment.rb +38 -16
  105. data/lib/merge_ats_client/models/attachment_request.rb +3 -14
  106. data/lib/merge_ats_client/models/attachment_type_enum.rb +1 -1
  107. data/lib/merge_ats_client/models/candidate.rb +36 -27
  108. data/lib/merge_ats_client/models/candidate_request.rb +3 -49
  109. data/lib/merge_ats_client/models/categories_enum.rb +4 -2
  110. data/lib/merge_ats_client/models/category_enum.rb +4 -2
  111. data/lib/merge_ats_client/models/common_model_scopes_body_request.rb +274 -0
  112. data/lib/merge_ats_client/models/condition_schema.rb +298 -0
  113. data/lib/merge_ats_client/models/condition_type_enum.rb +50 -0
  114. data/lib/merge_ats_client/models/data_passthrough_request.rb +1 -0
  115. data/lib/merge_ats_client/models/department.rb +36 -14
  116. data/lib/merge_ats_client/models/disability_status_enum.rb +1 -1
  117. data/lib/merge_ats_client/models/eeoc.rb +42 -19
  118. data/lib/merge_ats_client/models/email_address.rb +16 -6
  119. data/lib/merge_ats_client/models/email_address_request.rb +30 -6
  120. data/lib/merge_ats_client/models/email_address_type_enum.rb +1 -1
  121. data/lib/merge_ats_client/models/enabled_actions_enum.rb +45 -0
  122. data/lib/merge_ats_client/models/encoding_enum.rb +1 -1
  123. data/lib/merge_ats_client/models/end_user_details_request.rb +20 -7
  124. data/lib/merge_ats_client/models/gender_enum.rb +1 -1
  125. data/lib/merge_ats_client/models/issue.rb +16 -4
  126. data/lib/merge_ats_client/models/job.rb +38 -16
  127. data/lib/merge_ats_client/models/job_interview_stage.rb +72 -15
  128. data/lib/merge_ats_client/models/job_status_enum.rb +1 -1
  129. data/lib/merge_ats_client/models/link_token.rb +0 -5
  130. data/lib/merge_ats_client/models/linked_account_condition.rb +282 -0
  131. data/lib/merge_ats_client/models/linked_account_condition_request.rb +269 -0
  132. data/lib/merge_ats_client/models/linked_account_selective_sync_configuration.rb +221 -0
  133. data/lib/merge_ats_client/models/linked_account_selective_sync_configuration_list_request.rb +226 -0
  134. data/lib/merge_ats_client/models/linked_account_selective_sync_configuration_request.rb +226 -0
  135. data/lib/merge_ats_client/models/meta_response.rb +12 -1
  136. data/lib/merge_ats_client/models/method_enum.rb +1 -1
  137. data/lib/merge_ats_client/models/multipart_form_field_request.rb +1 -1
  138. data/lib/merge_ats_client/models/offer.rb +40 -16
  139. data/lib/merge_ats_client/models/offer_status_enum.rb +1 -1
  140. data/lib/merge_ats_client/models/office.rb +37 -15
  141. data/lib/merge_ats_client/models/operator_schema.rb +229 -0
  142. data/lib/merge_ats_client/models/overall_recommendation_enum.rb +1 -1
  143. data/lib/merge_ats_client/models/paginated_condition_schema_list.rb +240 -0
  144. data/lib/merge_ats_client/models/phone_number.rb +16 -6
  145. data/lib/merge_ats_client/models/phone_number_request.rb +30 -6
  146. data/lib/merge_ats_client/models/phone_number_type_enum.rb +1 -1
  147. data/lib/merge_ats_client/models/race_enum.rb +1 -1
  148. data/lib/merge_ats_client/models/reason_enum.rb +1 -1
  149. data/lib/merge_ats_client/models/reject_reason.rb +37 -15
  150. data/lib/merge_ats_client/models/remote_user.rb +38 -16
  151. data/lib/merge_ats_client/models/request_format_enum.rb +1 -1
  152. data/lib/merge_ats_client/models/response_type_enum.rb +1 -1
  153. data/lib/merge_ats_client/models/scheduled_interview.rb +41 -16
  154. data/lib/merge_ats_client/models/scheduled_interview_endpoint_request.rb +237 -0
  155. data/lib/merge_ats_client/models/scheduled_interview_request.rb +323 -0
  156. data/lib/merge_ats_client/models/scheduled_interview_response.rb +266 -0
  157. data/lib/merge_ats_client/models/scheduled_interview_status_enum.rb +1 -1
  158. data/lib/merge_ats_client/models/scorecard.rb +41 -16
  159. data/lib/merge_ats_client/models/selective_sync_configurations_usage_enum.rb +45 -0
  160. data/lib/merge_ats_client/models/sync_status.rb +13 -4
  161. data/lib/merge_ats_client/models/sync_status_status_enum.rb +3 -2
  162. data/lib/merge_ats_client/models/tag.rb +36 -14
  163. data/lib/merge_ats_client/models/url.rb +17 -7
  164. data/lib/merge_ats_client/models/url_request.rb +31 -7
  165. data/lib/merge_ats_client/models/url_type_enum.rb +1 -1
  166. data/lib/merge_ats_client/models/veteran_status_enum.rb +1 -1
  167. data/lib/merge_ats_client/models/visibility_enum.rb +1 -1
  168. data/lib/merge_ats_client/version.rb +1 -1
  169. data/lib/merge_ats_client.rb +19 -1
  170. data/spec/api/activities_api_spec.rb +31 -4
  171. data/spec/api/applications_api_spec.rb +2 -2
  172. data/spec/api/attachments_api_spec.rb +6 -4
  173. data/spec/api/candidates_api_spec.rb +5 -3
  174. data/spec/api/departments_api_spec.rb +2 -2
  175. data/spec/api/eeocs_api_spec.rb +6 -4
  176. data/spec/api/force_resync_api_spec.rb +1 -1
  177. data/spec/api/interviews_api_spec.rb +31 -4
  178. data/spec/api/issues_api_spec.rb +3 -3
  179. data/spec/api/job_interview_stages_api_spec.rb +2 -2
  180. data/spec/api/jobs_api_spec.rb +8 -5
  181. data/spec/api/linked_accounts_api_spec.rb +1 -1
  182. data/spec/api/offers_api_spec.rb +6 -4
  183. data/spec/api/offices_api_spec.rb +2 -2
  184. data/spec/api/reject_reasons_api_spec.rb +2 -2
  185. data/spec/api/scorecards_api_spec.rb +6 -4
  186. data/spec/api/selective_sync_api_spec.rb +72 -0
  187. data/spec/api/sync_status_api_spec.rb +1 -1
  188. data/spec/api/tags_api_spec.rb +2 -2
  189. data/spec/api/users_api_spec.rb +6 -4
  190. data/spec/models/account_integration_spec.rb +12 -0
  191. data/spec/models/{ignore_common_model_spec.rb → activity_endpoint_request_spec.rb} +8 -8
  192. data/spec/models/activity_request_spec.rb +76 -0
  193. data/spec/models/activity_response_spec.rb +52 -0
  194. data/spec/models/activity_spec.rb +19 -1
  195. data/spec/models/application_request_spec.rb +0 -12
  196. data/spec/models/application_spec.rb +9 -3
  197. data/spec/models/attachment_request_spec.rb +0 -6
  198. data/spec/models/attachment_spec.rb +14 -2
  199. data/spec/models/candidate_request_spec.rb +0 -24
  200. data/spec/models/candidate_spec.rb +9 -3
  201. data/spec/models/common_model_scopes_body_request_spec.rb +46 -0
  202. data/spec/models/condition_schema_spec.rb +70 -0
  203. data/spec/models/condition_type_enum_spec.rb +28 -0
  204. data/spec/models/department_spec.rb +14 -2
  205. data/spec/models/eeoc_spec.rb +14 -2
  206. data/spec/models/email_address_request_spec.rb +12 -0
  207. data/spec/models/email_address_spec.rb +6 -0
  208. data/spec/models/enabled_actions_enum_spec.rb +28 -0
  209. data/spec/models/end_user_details_request_spec.rb +6 -0
  210. data/spec/models/issue_spec.rb +6 -0
  211. data/spec/models/job_interview_stage_spec.rb +19 -1
  212. data/spec/models/job_spec.rb +14 -2
  213. data/spec/models/linked_account_condition_request_spec.rb +46 -0
  214. data/spec/models/linked_account_condition_spec.rb +64 -0
  215. data/spec/models/linked_account_selective_sync_configuration_list_request_spec.rb +34 -0
  216. data/spec/models/linked_account_selective_sync_configuration_request_spec.rb +34 -0
  217. data/spec/models/linked_account_selective_sync_configuration_spec.rb +34 -0
  218. data/spec/models/meta_response_spec.rb +6 -0
  219. data/spec/models/offer_spec.rb +14 -2
  220. data/spec/models/office_spec.rb +14 -2
  221. data/spec/models/{remote_data_request_spec.rb → operator_schema_spec.rb} +8 -8
  222. data/spec/models/paginated_condition_schema_list_spec.rb +46 -0
  223. data/spec/models/phone_number_request_spec.rb +12 -0
  224. data/spec/models/phone_number_spec.rb +6 -0
  225. data/spec/models/reject_reason_spec.rb +14 -2
  226. data/spec/models/remote_user_spec.rb +14 -2
  227. data/spec/models/scheduled_interview_endpoint_request_spec.rb +40 -0
  228. data/spec/models/scheduled_interview_request_spec.rb +88 -0
  229. data/spec/models/scheduled_interview_response_spec.rb +52 -0
  230. data/spec/models/scheduled_interview_spec.rb +14 -2
  231. data/spec/models/scorecard_spec.rb +14 -2
  232. data/spec/models/selective_sync_configurations_usage_enum_spec.rb +28 -0
  233. data/spec/models/sync_status_spec.rb +6 -0
  234. data/spec/models/tag_spec.rb +14 -2
  235. data/spec/models/url_request_spec.rb +12 -0
  236. data/spec/models/url_spec.rb +6 -0
  237. metadata +182 -109
@@ -0,0 +1,300 @@
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 Activity Object ### Description The `Activity` object is used to represent an activity for a candidate performed by a user. ### Usage Example Fetch from the `LIST Activities` endpoint and filter by `ID` to show all activities.
18
+ class ActivityRequest
19
+ # The user that performed the action.
20
+ attr_accessor :user
21
+
22
+ # The activity's type. * `NOTE` - NOTE * `EMAIL` - EMAIL * `OTHER` - OTHER
23
+ attr_accessor :activity_type
24
+
25
+ # The activity's subject.
26
+ attr_accessor :subject
27
+
28
+ # The activity's body.
29
+ attr_accessor :body
30
+
31
+ # The activity's visibility. * `ADMIN_ONLY` - ADMIN_ONLY * `PUBLIC` - PUBLIC * `PRIVATE` - PRIVATE
32
+ attr_accessor :visibility
33
+
34
+ # The activity’s candidate.
35
+ attr_accessor :candidate
36
+
37
+ attr_accessor :integration_params
38
+
39
+ attr_accessor :linked_account_params
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'user' => :'user',
45
+ :'activity_type' => :'activity_type',
46
+ :'subject' => :'subject',
47
+ :'body' => :'body',
48
+ :'visibility' => :'visibility',
49
+ :'candidate' => :'candidate',
50
+ :'integration_params' => :'integration_params',
51
+ :'linked_account_params' => :'linked_account_params'
52
+ }
53
+ end
54
+
55
+ # Returns all the JSON keys this model knows about
56
+ def self.acceptable_attributes
57
+ attribute_map.values
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.openapi_types
62
+ {
63
+ :'user' => :'String',
64
+ :'activity_type' => :'ActivityTypeEnum',
65
+ :'subject' => :'String',
66
+ :'body' => :'String',
67
+ :'visibility' => :'VisibilityEnum',
68
+ :'candidate' => :'String',
69
+ :'integration_params' => :'Hash<String, Object>',
70
+ :'linked_account_params' => :'Hash<String, Object>'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ :'user',
78
+ :'activity_type',
79
+ :'subject',
80
+ :'body',
81
+ :'visibility',
82
+ :'candidate',
83
+ :'integration_params',
84
+ :'linked_account_params'
85
+ ])
86
+ end
87
+
88
+ # Initializes the object
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ def initialize(attributes = {})
91
+ if (!attributes.is_a?(Hash))
92
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::ActivityRequest` initialize method"
93
+ end
94
+
95
+ # check to see if the attribute exists and convert string to symbol for hash key
96
+ attributes = attributes.each_with_object({}) { |(k, v), h|
97
+ if (!self.class.attribute_map.key?(k.to_sym))
98
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::ActivityRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
99
+ end
100
+ h[k.to_sym] = v
101
+ }
102
+
103
+ if attributes.key?(:'user')
104
+ self.user = attributes[:'user']
105
+ end
106
+
107
+ if attributes.key?(:'activity_type')
108
+ self.activity_type = attributes[:'activity_type']
109
+ end
110
+
111
+ if attributes.key?(:'subject')
112
+ self.subject = attributes[:'subject']
113
+ end
114
+
115
+ if attributes.key?(:'body')
116
+ self.body = attributes[:'body']
117
+ end
118
+
119
+ if attributes.key?(:'visibility')
120
+ self.visibility = attributes[:'visibility']
121
+ end
122
+
123
+ if attributes.key?(:'candidate')
124
+ self.candidate = attributes[:'candidate']
125
+ end
126
+
127
+ if attributes.key?(:'integration_params')
128
+ if (value = attributes[:'integration_params']).is_a?(Hash)
129
+ self.integration_params = value
130
+ end
131
+ end
132
+
133
+ if attributes.key?(:'linked_account_params')
134
+ if (value = attributes[:'linked_account_params']).is_a?(Hash)
135
+ self.linked_account_params = value
136
+ end
137
+ end
138
+ end
139
+
140
+ # Show invalid properties with the reasons. Usually used together with valid?
141
+ # @return Array for valid properties with the reasons
142
+ def list_invalid_properties
143
+ invalid_properties = Array.new
144
+ invalid_properties
145
+ end
146
+
147
+ # Check to see if the all the properties in the model are valid
148
+ # @return true if the model is valid
149
+ def valid?
150
+ true
151
+ end
152
+
153
+ # Checks equality by comparing each attribute.
154
+ # @param [Object] Object to be compared
155
+ def ==(o)
156
+ return true if self.equal?(o)
157
+ self.class == o.class &&
158
+ user == o.user &&
159
+ activity_type == o.activity_type &&
160
+ subject == o.subject &&
161
+ body == o.body &&
162
+ visibility == o.visibility &&
163
+ candidate == o.candidate &&
164
+ integration_params == o.integration_params &&
165
+ linked_account_params == o.linked_account_params
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] Object to be compared
170
+ def eql?(o)
171
+ self == o
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ def hash
177
+ [user, activity_type, subject, body, visibility, candidate, integration_params, linked_account_params].hash
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def self.build_from_hash(attributes)
184
+ new.build_from_hash(attributes)
185
+ end
186
+
187
+ # Builds the object from hash
188
+ # @param [Hash] attributes Model attributes in the form of hash
189
+ # @return [Object] Returns the model itself
190
+ def build_from_hash(attributes)
191
+ return nil unless attributes.is_a?(Hash)
192
+ self.class.openapi_types.each_pair do |key, type|
193
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
194
+ self.send("#{key}=", nil)
195
+ elsif type =~ /\AArray<(.*)>/i
196
+ # check to ensure the input is an array given that the attribute
197
+ # is documented as an array but the input is not
198
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
199
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
200
+ end
201
+ elsif !attributes[self.class.attribute_map[key]].nil?
202
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
203
+ end
204
+ end
205
+
206
+ self
207
+ end
208
+
209
+ # Deserializes the data based on type
210
+ # @param string type Data type
211
+ # @param string value Value to be deserialized
212
+ # @return [Object] Deserialized data
213
+ def _deserialize(type, value)
214
+ case type.to_sym
215
+ when :Time
216
+ Time.parse(value)
217
+ when :Date
218
+ Date.parse(value)
219
+ when :String
220
+ value
221
+ when :Integer
222
+ value.to_i
223
+ when :Float
224
+ value.to_f
225
+ when :Boolean
226
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
227
+ true
228
+ else
229
+ false
230
+ end
231
+ when :Object
232
+ # generic object (usually a Hash), return directly
233
+ value
234
+ when /\AArray<(?<inner_type>.+)>\z/
235
+ inner_type = Regexp.last_match[:inner_type]
236
+ value.map { |v| _deserialize(inner_type, v) }
237
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
238
+ k_type = Regexp.last_match[:k_type]
239
+ v_type = Regexp.last_match[:v_type]
240
+ {}.tap do |hash|
241
+ value.each do |k, v|
242
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
243
+ end
244
+ end
245
+ else # model
246
+ # models (e.g. Pet) or oneOf
247
+ klass = MergeATSClient.const_get(type)
248
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
249
+ end
250
+ end
251
+
252
+ # Returns the string representation of the object
253
+ # @return [String] String presentation of the object
254
+ def to_s
255
+ to_hash.to_s
256
+ end
257
+
258
+ # to_body is an alias to to_hash (backward compatibility)
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_body
261
+ to_hash
262
+ end
263
+
264
+ # Returns the object in the form of hash
265
+ # @return [Hash] Returns the object in the form of hash
266
+ def to_hash
267
+ hash = {}
268
+ self.class.attribute_map.each_pair do |attr, param|
269
+ value = self.send(attr)
270
+ if value.nil?
271
+ is_nullable = self.class.openapi_nullable.include?(attr)
272
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
273
+ end
274
+
275
+ hash[param] = _to_hash(value)
276
+ end
277
+ hash
278
+ end
279
+
280
+ # Outputs non-array value in the form of hash
281
+ # For object, use to_hash. Otherwise, just return the value
282
+ # @param [Object] value Any valid value
283
+ # @return [Hash] Returns the value in the form of hash
284
+ def _to_hash(value)
285
+ if value.is_a?(Array)
286
+ value.compact.map { |v| _to_hash(v) }
287
+ elsif value.is_a?(Hash)
288
+ {}.tap do |hash|
289
+ value.each { |k, v| hash[k] = _to_hash(v) }
290
+ end
291
+ elsif value.respond_to? :to_hash
292
+ value.to_hash
293
+ else
294
+ value
295
+ end
296
+ end
297
+
298
+ end
299
+
300
+ end
@@ -0,0 +1,266 @@
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 ActivityResponse
18
+ attr_accessor :model
19
+
20
+ attr_accessor :warnings
21
+
22
+ attr_accessor :errors
23
+
24
+ attr_accessor :logs
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'model' => :'model',
30
+ :'warnings' => :'warnings',
31
+ :'errors' => :'errors',
32
+ :'logs' => :'logs'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'model' => :'Activity',
45
+ :'warnings' => :'Array<WarningValidationProblem>',
46
+ :'errors' => :'Array<ErrorValidationProblem>',
47
+ :'logs' => :'Array<DebugModeLog>'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::ActivityResponse` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::ActivityResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'model')
73
+ self.model = attributes[:'model']
74
+ end
75
+
76
+ if attributes.key?(:'warnings')
77
+ if (value = attributes[:'warnings']).is_a?(Array)
78
+ self.warnings = value
79
+ end
80
+ end
81
+
82
+ if attributes.key?(:'errors')
83
+ if (value = attributes[:'errors']).is_a?(Array)
84
+ self.errors = value
85
+ end
86
+ end
87
+
88
+ if attributes.key?(:'logs')
89
+ if (value = attributes[:'logs']).is_a?(Array)
90
+ self.logs = value
91
+ end
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ if @model.nil?
100
+ invalid_properties.push('invalid value for "model", model cannot be nil.')
101
+ end
102
+
103
+ if @warnings.nil?
104
+ invalid_properties.push('invalid value for "warnings", warnings cannot be nil.')
105
+ end
106
+
107
+ if @errors.nil?
108
+ invalid_properties.push('invalid value for "errors", errors cannot be nil.')
109
+ end
110
+
111
+ invalid_properties
112
+ end
113
+
114
+ # Check to see if the all the properties in the model are valid
115
+ # @return true if the model is valid
116
+ def valid?
117
+ return false if @model.nil?
118
+ return false if @warnings.nil?
119
+ return false if @errors.nil?
120
+ true
121
+ end
122
+
123
+ # Checks equality by comparing each attribute.
124
+ # @param [Object] Object to be compared
125
+ def ==(o)
126
+ return true if self.equal?(o)
127
+ self.class == o.class &&
128
+ model == o.model &&
129
+ warnings == o.warnings &&
130
+ errors == o.errors &&
131
+ logs == o.logs
132
+ end
133
+
134
+ # @see the `==` method
135
+ # @param [Object] Object to be compared
136
+ def eql?(o)
137
+ self == o
138
+ end
139
+
140
+ # Calculates hash code according to all attributes.
141
+ # @return [Integer] Hash code
142
+ def hash
143
+ [model, warnings, errors, logs].hash
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def self.build_from_hash(attributes)
150
+ new.build_from_hash(attributes)
151
+ end
152
+
153
+ # Builds the object from hash
154
+ # @param [Hash] attributes Model attributes in the form of hash
155
+ # @return [Object] Returns the model itself
156
+ def build_from_hash(attributes)
157
+ return nil unless attributes.is_a?(Hash)
158
+ self.class.openapi_types.each_pair do |key, type|
159
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
160
+ self.send("#{key}=", nil)
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
165
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
166
+ end
167
+ elsif !attributes[self.class.attribute_map[key]].nil?
168
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
169
+ end
170
+ end
171
+
172
+ self
173
+ end
174
+
175
+ # Deserializes the data based on type
176
+ # @param string type Data type
177
+ # @param string value Value to be deserialized
178
+ # @return [Object] Deserialized data
179
+ def _deserialize(type, value)
180
+ case type.to_sym
181
+ when :Time
182
+ Time.parse(value)
183
+ when :Date
184
+ Date.parse(value)
185
+ when :String
186
+ value
187
+ when :Integer
188
+ value.to_i
189
+ when :Float
190
+ value.to_f
191
+ when :Boolean
192
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
193
+ true
194
+ else
195
+ false
196
+ end
197
+ when :Object
198
+ # generic object (usually a Hash), return directly
199
+ value
200
+ when /\AArray<(?<inner_type>.+)>\z/
201
+ inner_type = Regexp.last_match[:inner_type]
202
+ value.map { |v| _deserialize(inner_type, v) }
203
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
204
+ k_type = Regexp.last_match[:k_type]
205
+ v_type = Regexp.last_match[:v_type]
206
+ {}.tap do |hash|
207
+ value.each do |k, v|
208
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
209
+ end
210
+ end
211
+ else # model
212
+ # models (e.g. Pet) or oneOf
213
+ klass = MergeATSClient.const_get(type)
214
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
215
+ end
216
+ end
217
+
218
+ # Returns the string representation of the object
219
+ # @return [String] String presentation of the object
220
+ def to_s
221
+ to_hash.to_s
222
+ end
223
+
224
+ # to_body is an alias to to_hash (backward compatibility)
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_body
227
+ to_hash
228
+ end
229
+
230
+ # Returns the object in the form of hash
231
+ # @return [Hash] Returns the object in the form of hash
232
+ def to_hash
233
+ hash = {}
234
+ self.class.attribute_map.each_pair do |attr, param|
235
+ value = self.send(attr)
236
+ if value.nil?
237
+ is_nullable = self.class.openapi_nullable.include?(attr)
238
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
239
+ end
240
+
241
+ hash[param] = _to_hash(value)
242
+ end
243
+ hash
244
+ end
245
+
246
+ # Outputs non-array value in the form of hash
247
+ # For object, use to_hash. Otherwise, just return the value
248
+ # @param [Object] value Any valid value
249
+ # @return [Hash] Returns the value in the form of hash
250
+ def _to_hash(value)
251
+ if value.is_a?(Array)
252
+ value.compact.map { |v| _to_hash(v) }
253
+ elsif value.is_a?(Hash)
254
+ {}.tap do |hash|
255
+ value.each { |k, v| hash[k] = _to_hash(v) }
256
+ end
257
+ elsif value.respond_to? :to_hash
258
+ value.to_hash
259
+ else
260
+ value
261
+ end
262
+ end
263
+
264
+ end
265
+
266
+ end
@@ -39,7 +39,7 @@ module MergeATSClient
39
39
  end
40
40
 
41
41
  def self.build_from_hash(value)
42
- IssueStatusEnum.new.build_from_hash(value)
42
+ ActivityTypeEnum.new.build_from_hash(value)
43
43
  end
44
44
  end
45
45