merge_ats_client 1.0.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (311) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -17
  3. data/docs/AccountDetails.md +11 -7
  4. data/docs/AccountDetailsAndActions.md +4 -0
  5. data/docs/AccountDetailsAndActionsIntegration.md +1 -1
  6. data/docs/AccountDetailsApi.md +10 -7
  7. data/docs/AccountIntegration.md +4 -4
  8. data/docs/AccountTokenApi.md +2 -2
  9. data/docs/ActivitiesApi.md +6 -4
  10. data/docs/Activity.md +4 -2
  11. data/docs/Application.md +8 -6
  12. data/docs/ApplicationEndpointRequest.md +20 -0
  13. data/docs/ApplicationRequest.md +12 -6
  14. data/docs/ApplicationResponse.md +24 -0
  15. data/docs/ApplicationsApi.md +98 -18
  16. data/docs/Attachment.md +3 -1
  17. data/docs/AttachmentEndpointRequest.md +20 -0
  18. data/docs/AttachmentRequest.md +5 -1
  19. data/docs/AttachmentResponse.md +24 -0
  20. data/docs/AttachmentsApi.md +93 -15
  21. data/docs/AvailableActionsApi.md +2 -2
  22. data/docs/Candidate.md +3 -1
  23. data/docs/CandidateEndpointRequest.md +20 -0
  24. data/docs/CandidateRequest.md +7 -1
  25. data/docs/CandidateResponse.md +24 -0
  26. data/docs/CandidatesApi.md +168 -22
  27. data/docs/DataPassthroughRequest.md +3 -1
  28. data/docs/DebugModeLog.md +22 -0
  29. data/docs/DebugModelLogSummary.md +22 -0
  30. data/docs/Department.md +3 -1
  31. data/docs/DepartmentsApi.md +6 -4
  32. data/docs/EEOC.md +4 -2
  33. data/docs/EeocsApi.md +6 -4
  34. data/docs/EncodingEnum.md +15 -0
  35. data/docs/EndUserDetailsRequest.md +5 -3
  36. data/docs/ErrorValidationProblem.md +24 -0
  37. data/docs/ForceResyncApi.md +79 -0
  38. data/docs/GenerateKeyApi.md +2 -2
  39. data/docs/IgnoreCommonModel.md +20 -0
  40. data/docs/IgnoreCommonModelRequest.md +20 -0
  41. data/docs/InterviewsApi.md +6 -84
  42. data/docs/IssuesApi.md +18 -10
  43. data/docs/Job.md +5 -1
  44. data/docs/JobInterviewStage.md +4 -2
  45. data/docs/JobInterviewStagesApi.md +8 -6
  46. data/docs/JobsApi.md +8 -5
  47. data/docs/LinkTokenApi.md +3 -3
  48. data/docs/LinkedAccountStatus.md +20 -0
  49. data/docs/LinkedAccountsApi.md +22 -22
  50. data/docs/MetaResponse.md +24 -0
  51. data/docs/MultipartFormFieldRequest.md +26 -0
  52. data/docs/Offer.md +5 -3
  53. data/docs/OffersApi.md +6 -4
  54. data/docs/Office.md +3 -1
  55. data/docs/OfficesApi.md +6 -4
  56. data/docs/PassthroughApi.md +2 -2
  57. data/docs/ReasonEnum.md +15 -0
  58. data/docs/RegenerateKeyApi.md +2 -2
  59. data/docs/RejectReason.md +3 -1
  60. data/docs/RejectReasonsApi.md +6 -4
  61. data/docs/RemoteUser.md +3 -1
  62. data/docs/ScheduledInterview.md +6 -4
  63. data/docs/Scorecard.md +6 -4
  64. data/docs/ScorecardsApi.md +6 -84
  65. data/docs/SyncStatusApi.md +3 -75
  66. data/docs/Tag.md +3 -1
  67. data/docs/TagsApi.md +4 -2
  68. data/docs/UsersApi.md +6 -84
  69. data/docs/ValidationProblemSource.md +18 -0
  70. data/docs/WarningValidationProblem.md +24 -0
  71. data/docs/WebhookReceiver.md +22 -0
  72. data/docs/WebhookReceiverRequest.md +22 -0
  73. data/docs/WebhookReceiversApi.md +153 -0
  74. data/lib/merge_ats_client/api/account_details_api.rb +10 -3
  75. data/lib/merge_ats_client/api/activities_api.rb +3 -0
  76. data/lib/merge_ats_client/api/applications_api.rb +86 -15
  77. data/lib/merge_ats_client/api/attachments_api.rb +94 -15
  78. data/lib/merge_ats_client/api/candidates_api.rb +156 -21
  79. data/lib/merge_ats_client/api/departments_api.rb +3 -0
  80. data/lib/merge_ats_client/api/eeocs_api.rb +3 -0
  81. data/lib/merge_ats_client/api/force_resync_api.rb +84 -0
  82. data/lib/merge_ats_client/api/interviews_api.rb +3 -76
  83. data/lib/merge_ats_client/api/issues_api.rb +22 -10
  84. data/lib/merge_ats_client/api/job_interview_stages_api.rb +5 -2
  85. data/lib/merge_ats_client/api/jobs_api.rb +6 -3
  86. data/lib/merge_ats_client/api/linked_accounts_api.rb +21 -21
  87. data/lib/merge_ats_client/api/offers_api.rb +3 -0
  88. data/lib/merge_ats_client/api/offices_api.rb +3 -0
  89. data/lib/merge_ats_client/api/reject_reasons_api.rb +3 -0
  90. data/lib/merge_ats_client/api/scorecards_api.rb +3 -76
  91. data/lib/merge_ats_client/api/sync_status_api.rb +4 -66
  92. data/lib/merge_ats_client/api/tags_api.rb +3 -0
  93. data/lib/merge_ats_client/api/users_api.rb +3 -76
  94. data/lib/merge_ats_client/api/webhook_receivers_api.rb +154 -0
  95. data/lib/merge_ats_client/configuration.rb +6 -4
  96. data/lib/merge_ats_client/models/account_details.rb +22 -4
  97. data/lib/merge_ats_client/models/account_details_and_actions.rb +24 -1
  98. data/lib/merge_ats_client/models/account_details_and_actions_integration.rb +4 -2
  99. data/lib/merge_ats_client/models/account_integration.rb +2 -24
  100. data/lib/merge_ats_client/models/account_token.rb +1 -1
  101. data/lib/merge_ats_client/models/activity.rb +16 -7
  102. data/lib/merge_ats_client/models/application.rb +15 -11
  103. data/lib/merge_ats_client/models/application_endpoint_request.rb +237 -0
  104. data/lib/merge_ats_client/models/application_request.rb +56 -12
  105. data/lib/merge_ats_client/models/application_response.rb +266 -0
  106. data/lib/merge_ats_client/models/attachment.rb +15 -6
  107. data/lib/merge_ats_client/models/attachment_endpoint_request.rb +237 -0
  108. data/lib/merge_ats_client/models/attachment_request.rb +31 -7
  109. data/lib/merge_ats_client/models/attachment_response.rb +266 -0
  110. data/lib/merge_ats_client/models/attachment_type_enum.rb +0 -2
  111. data/lib/merge_ats_client/models/available_actions.rb +1 -1
  112. data/lib/merge_ats_client/models/candidate.rb +15 -6
  113. data/lib/merge_ats_client/models/candidate_endpoint_request.rb +237 -0
  114. data/lib/merge_ats_client/models/candidate_request.rb +56 -7
  115. data/lib/merge_ats_client/models/candidate_response.rb +266 -0
  116. data/lib/merge_ats_client/models/categories_enum.rb +2 -0
  117. data/lib/merge_ats_client/models/category_enum.rb +2 -0
  118. data/lib/merge_ats_client/models/data_passthrough_request.rb +67 -4
  119. data/lib/merge_ats_client/models/debug_mode_log.rb +251 -0
  120. data/lib/merge_ats_client/models/{data_passthrough.rb → debug_model_log_summary.rb} +30 -41
  121. data/lib/merge_ats_client/models/department.rb +17 -7
  122. data/lib/merge_ats_client/models/eeoc.rb +16 -7
  123. data/lib/merge_ats_client/models/email_address.rb +2 -2
  124. data/lib/merge_ats_client/models/email_address_request.rb +2 -2
  125. data/lib/merge_ats_client/models/encoding_enum.rb +35 -0
  126. data/lib/merge_ats_client/models/end_user_details_request.rb +147 -28
  127. data/lib/merge_ats_client/models/error_validation_problem.rb +260 -0
  128. data/lib/merge_ats_client/models/generate_remote_key_request.rb +20 -1
  129. data/lib/merge_ats_client/models/{remote_user_request.rb → ignore_common_model.rb} +30 -85
  130. data/lib/merge_ats_client/models/ignore_common_model_request.rb +256 -0
  131. data/lib/merge_ats_client/models/issue.rb +1 -1
  132. data/lib/merge_ats_client/models/job.rb +28 -6
  133. data/lib/merge_ats_client/models/job_interview_stage.rb +16 -7
  134. data/lib/merge_ats_client/models/link_token.rb +1 -1
  135. data/lib/merge_ats_client/models/linked_account_status.rb +237 -0
  136. data/lib/merge_ats_client/models/{scorecard_request.rb → meta_response.rb} +45 -70
  137. data/lib/merge_ats_client/models/model_operation.rb +1 -1
  138. data/lib/merge_ats_client/models/{scheduled_interview_request.rb → multipart_form_field_request.rb} +115 -106
  139. data/lib/merge_ats_client/models/offer.rb +16 -8
  140. data/lib/merge_ats_client/models/office.rb +17 -7
  141. data/lib/merge_ats_client/models/paginated_activity_list.rb +1 -1
  142. data/lib/merge_ats_client/models/paginated_application_list.rb +1 -1
  143. data/lib/merge_ats_client/models/paginated_attachment_list.rb +1 -1
  144. data/lib/merge_ats_client/models/paginated_candidate_list.rb +1 -1
  145. data/lib/merge_ats_client/models/paginated_department_list.rb +1 -1
  146. data/lib/merge_ats_client/models/paginated_eeoc_list.rb +1 -1
  147. data/lib/merge_ats_client/models/paginated_issue_list.rb +1 -1
  148. data/lib/merge_ats_client/models/paginated_job_interview_stage_list.rb +1 -1
  149. data/lib/merge_ats_client/models/paginated_job_list.rb +1 -1
  150. data/lib/merge_ats_client/models/paginated_offer_list.rb +1 -1
  151. data/lib/merge_ats_client/models/paginated_office_list.rb +1 -1
  152. data/lib/merge_ats_client/models/paginated_reject_reason_list.rb +1 -1
  153. data/lib/merge_ats_client/models/paginated_remote_user_list.rb +1 -1
  154. data/lib/merge_ats_client/models/paginated_scheduled_interview_list.rb +1 -1
  155. data/lib/merge_ats_client/models/paginated_scorecard_list.rb +1 -1
  156. data/lib/merge_ats_client/models/paginated_sync_status_list.rb +1 -1
  157. data/lib/merge_ats_client/models/paginated_tag_list.rb +1 -1
  158. data/lib/merge_ats_client/models/phone_number.rb +2 -2
  159. data/lib/merge_ats_client/models/phone_number_request.rb +2 -2
  160. data/lib/merge_ats_client/models/reason_enum.rb +36 -0
  161. data/lib/merge_ats_client/models/reject_reason.rb +17 -7
  162. data/lib/merge_ats_client/models/remote_data.rb +1 -1
  163. data/lib/merge_ats_client/models/remote_data_request.rb +20 -1
  164. data/lib/merge_ats_client/models/remote_key.rb +1 -1
  165. data/lib/merge_ats_client/models/remote_key_for_regeneration_request.rb +20 -1
  166. data/lib/merge_ats_client/models/remote_response.rb +1 -1
  167. data/lib/merge_ats_client/models/remote_user.rb +17 -7
  168. data/lib/merge_ats_client/models/request_format_enum.rb +1 -0
  169. data/lib/merge_ats_client/models/scheduled_interview.rb +16 -9
  170. data/lib/merge_ats_client/models/scorecard.rb +16 -9
  171. data/lib/merge_ats_client/models/sync_status.rb +1 -1
  172. data/lib/merge_ats_client/models/sync_status_status_enum.rb +1 -2
  173. data/lib/merge_ats_client/models/tag.rb +17 -7
  174. data/lib/merge_ats_client/models/url.rb +2 -2
  175. data/lib/merge_ats_client/models/url_request.rb +2 -2
  176. data/lib/merge_ats_client/models/{remote_key_for_regeneration.rb → validation_problem_source.rb} +15 -16
  177. data/lib/merge_ats_client/models/warning_validation_problem.rb +260 -0
  178. data/lib/merge_ats_client/models/webhook_receiver.rb +246 -0
  179. data/lib/merge_ats_client/models/{end_user_details.rb → webhook_receiver_request.rb} +60 -69
  180. data/lib/merge_ats_client/version.rb +1 -1
  181. data/lib/merge_ats_client.rb +22 -3
  182. data/spec/api/account_details_api_spec.rb +1 -0
  183. data/spec/api/account_token_api_spec.rb +1 -1
  184. data/spec/api/activities_api_spec.rb +4 -1
  185. data/spec/api/applications_api_spec.rb +31 -1
  186. data/spec/api/attachments_api_spec.rb +31 -1
  187. data/spec/api/available_actions_api_spec.rb +1 -1
  188. data/spec/api/candidates_api_spec.rb +44 -1
  189. data/spec/api/departments_api_spec.rb +4 -1
  190. data/spec/api/eeocs_api_spec.rb +4 -1
  191. data/spec/api/force_resync_api_spec.rb +46 -0
  192. data/spec/api/interviews_api_spec.rb +4 -1
  193. data/spec/api/issues_api_spec.rb +9 -5
  194. data/spec/api/job_interview_stages_api_spec.rb +4 -1
  195. data/spec/api/jobs_api_spec.rb +6 -1
  196. data/spec/api/link_token_api_spec.rb +2 -2
  197. data/spec/api/linked_accounts_api_spec.rb +10 -10
  198. data/spec/api/offers_api_spec.rb +4 -1
  199. data/spec/api/offices_api_spec.rb +4 -1
  200. data/spec/api/passthrough_api_spec.rb +2 -2
  201. data/spec/api/regenerate_key_api_spec.rb +3 -5
  202. data/spec/api/reject_reasons_api_spec.rb +4 -1
  203. data/spec/api/scorecards_api_spec.rb +4 -1
  204. data/spec/api/sync_status_api_spec.rb +8 -5
  205. data/spec/api/tags_api_spec.rb +3 -1
  206. data/spec/api/users_api_spec.rb +5 -1
  207. data/spec/api/webhook_receivers_api_spec.rb +58 -0
  208. data/spec/models/access_role_enum_spec.rb +1 -1
  209. data/spec/models/account_details_and_actions_spec.rb +12 -0
  210. data/spec/models/account_details_spec.rb +12 -0
  211. data/spec/models/account_integration_spec.rb +7 -1
  212. data/spec/models/account_token_spec.rb +7 -1
  213. data/spec/models/activity_spec.rb +13 -1
  214. data/spec/models/activity_type_enum_spec.rb +1 -1
  215. data/spec/models/application_endpoint_request_spec.rb +40 -0
  216. data/spec/models/application_request_spec.rb +25 -1
  217. data/spec/models/{end_user_details_spec.rb → application_response_spec.rb} +11 -15
  218. data/spec/models/application_spec.rb +19 -7
  219. data/spec/models/attachment_endpoint_request_spec.rb +40 -0
  220. data/spec/models/attachment_request_spec.rb +12 -0
  221. data/spec/models/attachment_response_spec.rb +52 -0
  222. data/spec/models/attachment_spec.rb +25 -1
  223. data/spec/models/available_actions_spec.rb +1 -1
  224. data/spec/models/candidate_endpoint_request_spec.rb +40 -0
  225. data/spec/models/candidate_request_spec.rb +37 -1
  226. data/spec/models/{data_passthrough_spec.rb → candidate_response_spec.rb} +11 -11
  227. data/spec/models/candidate_spec.rb +19 -1
  228. data/spec/models/data_passthrough_request_spec.rb +13 -1
  229. data/spec/models/debug_mode_log_spec.rb +46 -0
  230. data/spec/models/debug_model_log_summary_spec.rb +46 -0
  231. data/spec/models/department_spec.rb +13 -1
  232. data/spec/models/disability_status_enum_spec.rb +1 -1
  233. data/spec/models/eeoc_spec.rb +13 -1
  234. data/spec/models/email_address_request_spec.rb +1 -1
  235. data/spec/models/email_address_spec.rb +1 -1
  236. data/spec/models/email_address_type_enum_spec.rb +1 -1
  237. data/spec/models/encoding_enum_spec.rb +28 -0
  238. data/spec/models/end_user_details_request_spec.rb +13 -5
  239. data/spec/models/error_validation_problem_spec.rb +52 -0
  240. data/spec/models/gender_enum_spec.rb +1 -1
  241. data/spec/models/ignore_common_model_request_spec.rb +40 -0
  242. data/spec/models/ignore_common_model_spec.rb +40 -0
  243. data/spec/models/job_interview_stage_spec.rb +13 -1
  244. data/spec/models/job_spec.rb +31 -1
  245. data/spec/models/job_status_enum_spec.rb +1 -1
  246. data/spec/models/link_token_spec.rb +1 -1
  247. data/spec/models/linked_account_status_spec.rb +40 -0
  248. data/spec/models/meta_response_spec.rb +52 -0
  249. data/spec/models/method_enum_spec.rb +1 -1
  250. data/spec/models/model_operation_spec.rb +13 -1
  251. data/spec/models/{remote_user_request_spec.rb → multipart_form_field_request_spec.rb} +11 -23
  252. data/spec/models/offer_spec.rb +13 -1
  253. data/spec/models/offer_status_enum_spec.rb +1 -1
  254. data/spec/models/office_spec.rb +13 -1
  255. data/spec/models/overall_recommendation_enum_spec.rb +1 -1
  256. data/spec/models/paginated_activity_list_spec.rb +1 -1
  257. data/spec/models/paginated_application_list_spec.rb +1 -1
  258. data/spec/models/paginated_attachment_list_spec.rb +1 -1
  259. data/spec/models/paginated_candidate_list_spec.rb +1 -1
  260. data/spec/models/paginated_department_list_spec.rb +1 -1
  261. data/spec/models/paginated_eeoc_list_spec.rb +1 -1
  262. data/spec/models/paginated_job_interview_stage_list_spec.rb +1 -1
  263. data/spec/models/paginated_job_list_spec.rb +1 -1
  264. data/spec/models/paginated_offer_list_spec.rb +1 -1
  265. data/spec/models/paginated_office_list_spec.rb +1 -1
  266. data/spec/models/paginated_reject_reason_list_spec.rb +1 -1
  267. data/spec/models/paginated_remote_user_list_spec.rb +1 -1
  268. data/spec/models/paginated_scheduled_interview_list_spec.rb +1 -1
  269. data/spec/models/paginated_scorecard_list_spec.rb +1 -1
  270. data/spec/models/paginated_tag_list_spec.rb +1 -1
  271. data/spec/models/phone_number_request_spec.rb +1 -1
  272. data/spec/models/phone_number_spec.rb +1 -1
  273. data/spec/models/phone_number_type_enum_spec.rb +1 -1
  274. data/spec/models/race_enum_spec.rb +1 -1
  275. data/spec/models/reason_enum_spec.rb +28 -0
  276. data/spec/models/reject_reason_spec.rb +13 -1
  277. data/spec/models/remote_data_spec.rb +1 -1
  278. data/spec/models/remote_key_for_regeneration_request_spec.rb +1 -1
  279. data/spec/models/remote_key_spec.rb +1 -1
  280. data/spec/models/remote_response_spec.rb +1 -1
  281. data/spec/models/remote_user_spec.rb +13 -1
  282. data/spec/models/scheduled_interview_spec.rb +13 -1
  283. data/spec/models/scheduled_interview_status_enum_spec.rb +1 -1
  284. data/spec/models/scorecard_spec.rb +13 -1
  285. data/spec/models/sync_status_spec.rb +1 -1
  286. data/spec/models/tag_spec.rb +13 -1
  287. data/spec/models/url_request_spec.rb +1 -1
  288. data/spec/models/url_spec.rb +1 -1
  289. data/spec/models/url_type_enum_spec.rb +1 -1
  290. data/spec/models/{remote_key_for_regeneration_spec.rb → validation_problem_source_spec.rb} +8 -8
  291. data/spec/models/veteran_status_enum_spec.rb +1 -1
  292. data/spec/models/visibility_enum_spec.rb +1 -1
  293. data/spec/models/warning_validation_problem_spec.rb +52 -0
  294. data/spec/models/webhook_receiver_request_spec.rb +46 -0
  295. data/spec/models/webhook_receiver_spec.rb +46 -0
  296. metadata +179 -123
  297. data/config.json +0 -2
  298. data/docs/DataPassthrough.md +0 -24
  299. data/docs/EndUserDetails.md +0 -24
  300. data/docs/PatchedApplicationRequest.md +0 -34
  301. data/docs/RemoteKeyForRegeneration.md +0 -18
  302. data/docs/RemoteUserRequest.md +0 -30
  303. data/docs/ScheduledInterviewRequest.md +0 -38
  304. data/docs/ScorecardRequest.md +0 -30
  305. data/lib/merge_ats_client/models/patched_application_request.rb +0 -309
  306. data/merge_ats_client-1.0.3.gem +0 -0
  307. data/spec/models/patched_application_request_spec.rb +0 -82
  308. data/spec/models/scheduled_interview_request_spec.rb +0 -94
  309. data/spec/models/scorecard_request_spec.rb +0 -70
  310. data/test_ats.rb +0 -22
  311. data/test_signature.rb +0 -32
@@ -0,0 +1,260 @@
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 ErrorValidationProblem
18
+ attr_accessor :source
19
+
20
+ attr_accessor :title
21
+
22
+ attr_accessor :detail
23
+
24
+ attr_accessor :problem_type
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'source' => :'source',
30
+ :'title' => :'title',
31
+ :'detail' => :'detail',
32
+ :'problem_type' => :'problem_type'
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
+ :'source' => :'ValidationProblemSource',
45
+ :'title' => :'String',
46
+ :'detail' => :'String',
47
+ :'problem_type' => :'String'
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::ErrorValidationProblem` 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::ErrorValidationProblem`. 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?(:'source')
73
+ self.source = attributes[:'source']
74
+ end
75
+
76
+ if attributes.key?(:'title')
77
+ self.title = attributes[:'title']
78
+ end
79
+
80
+ if attributes.key?(:'detail')
81
+ self.detail = attributes[:'detail']
82
+ end
83
+
84
+ if attributes.key?(:'problem_type')
85
+ self.problem_type = attributes[:'problem_type']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ invalid_properties = Array.new
93
+ if @title.nil?
94
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
95
+ end
96
+
97
+ if @detail.nil?
98
+ invalid_properties.push('invalid value for "detail", detail cannot be nil.')
99
+ end
100
+
101
+ if @problem_type.nil?
102
+ invalid_properties.push('invalid value for "problem_type", problem_type cannot be nil.')
103
+ end
104
+
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ return false if @title.nil?
112
+ return false if @detail.nil?
113
+ return false if @problem_type.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ source == o.source &&
123
+ title == o.title &&
124
+ detail == o.detail &&
125
+ problem_type == o.problem_type
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [source, title, detail, problem_type].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def self.build_from_hash(attributes)
144
+ new.build_from_hash(attributes)
145
+ end
146
+
147
+ # Builds the object from hash
148
+ # @param [Hash] attributes Model attributes in the form of hash
149
+ # @return [Object] Returns the model itself
150
+ def build_from_hash(attributes)
151
+ return nil unless attributes.is_a?(Hash)
152
+ self.class.openapi_types.each_pair do |key, type|
153
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
+ self.send("#{key}=", nil)
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :Time
176
+ Time.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ # models (e.g. Pet) or oneOf
207
+ klass = MergeATSClient.const_get(type)
208
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ # Returns the string representation of the object
213
+ # @return [String] String presentation of the object
214
+ def to_s
215
+ to_hash.to_s
216
+ end
217
+
218
+ # to_body is an alias to to_hash (backward compatibility)
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_body
221
+ to_hash
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ # Outputs non-array value in the form of hash
241
+ # For object, use to_hash. Otherwise, just return the value
242
+ # @param [Object] value Any valid value
243
+ # @return [Hash] Returns the value in the form of hash
244
+ def _to_hash(value)
245
+ if value.is_a?(Array)
246
+ value.compact.map { |v| _to_hash(v) }
247
+ elsif value.is_a?(Hash)
248
+ {}.tap do |hash|
249
+ value.each { |k, v| hash[k] = _to_hash(v) }
250
+ end
251
+ elsif value.respond_to? :to_hash
252
+ value.to_hash
253
+ else
254
+ value
255
+ end
256
+ end
257
+
258
+ end
259
+
260
+ end
@@ -71,6 +71,10 @@ module MergeATSClient
71
71
  invalid_properties.push('invalid value for "name", name cannot be nil.')
72
72
  end
73
73
 
74
+ if @name.to_s.length < 1
75
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
76
+ end
77
+
74
78
  invalid_properties
75
79
  end
76
80
 
@@ -78,9 +82,24 @@ module MergeATSClient
78
82
  # @return true if the model is valid
79
83
  def valid?
80
84
  return false if @name.nil?
85
+ return false if @name.to_s.length < 1
81
86
  true
82
87
  end
83
88
 
89
+ # Custom attribute writer method with validation
90
+ # @param [Object] name Value to be assigned
91
+ def name=(name)
92
+ if name.nil?
93
+ fail ArgumentError, 'name cannot be nil'
94
+ end
95
+
96
+ if name.to_s.length < 1
97
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
98
+ end
99
+
100
+ @name = name
101
+ end
102
+
84
103
  # Checks equality by comparing each attribute.
85
104
  # @param [Object] Object to be compared
86
105
  def ==(o)
@@ -141,7 +160,7 @@ module MergeATSClient
141
160
  when :Date
142
161
  Date.parse(value)
143
162
  when :String
144
- value.to_s
163
+ value
145
164
  when :Integer
146
165
  value.to_i
147
166
  when :Float
@@ -14,39 +14,16 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module MergeATSClient
17
- # # The RemoteUser Object ### Description The `RemoteUser` object is used to represent a third party user. ### Usage Example Fetch from the `LIST RemoteUsers` endpoint to show all users for a third party.
18
- class RemoteUserRequest
19
- # The third-party API ID of the matching object.
20
- attr_accessor :remote_id
17
+ class IgnoreCommonModel
18
+ attr_accessor :reason
21
19
 
22
- # The user's first name.
23
- attr_accessor :first_name
24
-
25
- # The user's last name.
26
- attr_accessor :last_name
27
-
28
- # The user's email.
29
- attr_accessor :email
30
-
31
- # Whether the user's account had been disabled.
32
- attr_accessor :disabled
33
-
34
- # When the third party's user was created.
35
- attr_accessor :remote_created_at
36
-
37
- # The user's role.
38
- attr_accessor :access_role
20
+ attr_accessor :message
39
21
 
40
22
  # Attribute mapping from ruby-style variable name to JSON key.
41
23
  def self.attribute_map
42
24
  {
43
- :'remote_id' => :'remote_id',
44
- :'first_name' => :'first_name',
45
- :'last_name' => :'last_name',
46
- :'email' => :'email',
47
- :'disabled' => :'disabled',
48
- :'remote_created_at' => :'remote_created_at',
49
- :'access_role' => :'access_role'
25
+ :'reason' => :'reason',
26
+ :'message' => :'message'
50
27
  }
51
28
  end
52
29
 
@@ -58,26 +35,14 @@ module MergeATSClient
58
35
  # Attribute type mapping.
59
36
  def self.openapi_types
60
37
  {
61
- :'remote_id' => :'String',
62
- :'first_name' => :'String',
63
- :'last_name' => :'String',
64
- :'email' => :'String',
65
- :'disabled' => :'Boolean',
66
- :'remote_created_at' => :'Time',
67
- :'access_role' => :'AccessRoleEnum'
38
+ :'reason' => :'ReasonEnum',
39
+ :'message' => :'String'
68
40
  }
69
41
  end
70
42
 
71
43
  # List of attributes with nullable: true
72
44
  def self.openapi_nullable
73
45
  Set.new([
74
- :'remote_id',
75
- :'first_name',
76
- :'last_name',
77
- :'email',
78
- :'disabled',
79
- :'remote_created_at',
80
- :'access_role'
81
46
  ])
82
47
  end
83
48
 
@@ -85,43 +50,23 @@ module MergeATSClient
85
50
  # @param [Hash] attributes Model attributes in the form of hash
86
51
  def initialize(attributes = {})
87
52
  if (!attributes.is_a?(Hash))
88
- fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::RemoteUserRequest` initialize method"
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeATSClient::IgnoreCommonModel` initialize method"
89
54
  end
90
55
 
91
56
  # check to see if the attribute exists and convert string to symbol for hash key
92
57
  attributes = attributes.each_with_object({}) { |(k, v), h|
93
58
  if (!self.class.attribute_map.key?(k.to_sym))
94
- fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::RemoteUserRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeATSClient::IgnoreCommonModel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
95
60
  end
96
61
  h[k.to_sym] = v
97
62
  }
98
63
 
99
- if attributes.key?(:'remote_id')
100
- self.remote_id = attributes[:'remote_id']
101
- end
102
-
103
- if attributes.key?(:'first_name')
104
- self.first_name = attributes[:'first_name']
105
- end
106
-
107
- if attributes.key?(:'last_name')
108
- self.last_name = attributes[:'last_name']
64
+ if attributes.key?(:'reason')
65
+ self.reason = attributes[:'reason']
109
66
  end
110
67
 
111
- if attributes.key?(:'email')
112
- self.email = attributes[:'email']
113
- end
114
-
115
- if attributes.key?(:'disabled')
116
- self.disabled = attributes[:'disabled']
117
- end
118
-
119
- if attributes.key?(:'remote_created_at')
120
- self.remote_created_at = attributes[:'remote_created_at']
121
- end
122
-
123
- if attributes.key?(:'access_role')
124
- self.access_role = attributes[:'access_role']
68
+ if attributes.key?(:'message')
69
+ self.message = attributes[:'message']
125
70
  end
126
71
  end
127
72
 
@@ -129,8 +74,12 @@ module MergeATSClient
129
74
  # @return Array for valid properties with the reasons
130
75
  def list_invalid_properties
131
76
  invalid_properties = Array.new
132
- if !@email.nil? && @email.to_s.length > 254
133
- invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 254.')
77
+ if @reason.nil?
78
+ invalid_properties.push('invalid value for "reason", reason cannot be nil.')
79
+ end
80
+
81
+ if !@message.nil? && @message.to_s.length > 256
82
+ invalid_properties.push('invalid value for "message", the character length must be smaller than or equal to 256.')
134
83
  end
135
84
 
136
85
  invalid_properties
@@ -139,18 +88,19 @@ module MergeATSClient
139
88
  # Check to see if the all the properties in the model are valid
140
89
  # @return true if the model is valid
141
90
  def valid?
142
- return false if !@email.nil? && @email.to_s.length > 254
91
+ return false if @reason.nil?
92
+ return false if !@message.nil? && @message.to_s.length > 256
143
93
  true
144
94
  end
145
95
 
146
96
  # Custom attribute writer method with validation
147
- # @param [Object] email Value to be assigned
148
- def email=(email)
149
- if !email.nil? && email.to_s.length > 254
150
- fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 254.'
97
+ # @param [Object] message Value to be assigned
98
+ def message=(message)
99
+ if !message.nil? && message.to_s.length > 256
100
+ fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 256.'
151
101
  end
152
102
 
153
- @email = email
103
+ @message = message
154
104
  end
155
105
 
156
106
  # Checks equality by comparing each attribute.
@@ -158,13 +108,8 @@ module MergeATSClient
158
108
  def ==(o)
159
109
  return true if self.equal?(o)
160
110
  self.class == o.class &&
161
- remote_id == o.remote_id &&
162
- first_name == o.first_name &&
163
- last_name == o.last_name &&
164
- email == o.email &&
165
- disabled == o.disabled &&
166
- remote_created_at == o.remote_created_at &&
167
- access_role == o.access_role
111
+ reason == o.reason &&
112
+ message == o.message
168
113
  end
169
114
 
170
115
  # @see the `==` method
@@ -176,7 +121,7 @@ module MergeATSClient
176
121
  # Calculates hash code according to all attributes.
177
122
  # @return [Integer] Hash code
178
123
  def hash
179
- [remote_id, first_name, last_name, email, disabled, remote_created_at, access_role].hash
124
+ [reason, message].hash
180
125
  end
181
126
 
182
127
  # Builds the object from hash
@@ -219,7 +164,7 @@ module MergeATSClient
219
164
  when :Date
220
165
  Date.parse(value)
221
166
  when :String
222
- value.to_s
167
+ value
223
168
  when :Integer
224
169
  value.to_i
225
170
  when :Float