merge_hris_client 3.1.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -13
  3. data/docs/AsyncPassthroughApi.md +155 -0
  4. data/docs/AsyncPassthroughReciept.md +18 -0
  5. data/docs/BankInfo.md +2 -2
  6. data/docs/BankInfoApi.md +2 -2
  7. data/docs/Benefit.md +9 -3
  8. data/docs/BenefitPlanTypeEnum.md +15 -0
  9. data/docs/Company.md +2 -2
  10. data/docs/Deduction.md +2 -2
  11. data/docs/DeleteAccountApi.md +9 -9
  12. data/docs/Dependent.md +50 -0
  13. data/docs/DependentsApi.md +181 -0
  14. data/docs/Earning.md +2 -2
  15. data/docs/Employee.md +2 -2
  16. data/docs/EmployeePayrollRun.md +2 -2
  17. data/docs/EmployerBenefit.md +36 -0
  18. data/docs/EmployerBenefitsApi.md +177 -0
  19. data/docs/Employment.md +2 -2
  20. data/docs/EmploymentsApi.md +2 -2
  21. data/docs/EndUserDetailsRequest.md +1 -1
  22. data/docs/Group.md +2 -2
  23. data/docs/LinkedAccountsApi.md +2 -2
  24. data/docs/Location.md +3 -3
  25. data/docs/PaginatedDependentList.md +22 -0
  26. data/docs/PaginatedEmployerBenefitList.md +22 -0
  27. data/docs/PayGroup.md +2 -2
  28. data/docs/PayrollRun.md +2 -2
  29. data/docs/RelationshipEnum.md +15 -0
  30. data/docs/RemoteData.md +1 -1
  31. data/docs/SyncStatusApi.md +1 -1
  32. data/docs/Tax.md +2 -2
  33. data/docs/Team.md +2 -2
  34. data/docs/TimeOff.md +2 -2
  35. data/docs/TimeOffBalance.md +2 -2
  36. data/lib/merge_hris_client/api/async_passthrough_api.rb +160 -0
  37. data/lib/merge_hris_client/api/bank_info_api.rb +2 -2
  38. data/lib/merge_hris_client/api/delete_account_api.rb +7 -7
  39. data/lib/merge_hris_client/api/dependents_api.rb +188 -0
  40. data/lib/merge_hris_client/api/employer_benefits_api.rb +182 -0
  41. data/lib/merge_hris_client/api/employments_api.rb +2 -2
  42. data/lib/merge_hris_client/api/linked_accounts_api.rb +2 -2
  43. data/lib/merge_hris_client/api/sync_status_api.rb +2 -2
  44. data/lib/merge_hris_client/models/async_passthrough_reciept.rb +223 -0
  45. data/lib/merge_hris_client/models/bank_info.rb +10 -10
  46. data/lib/merge_hris_client/models/benefit.rb +42 -9
  47. data/lib/merge_hris_client/models/benefit_plan_type_enum.rb +48 -0
  48. data/lib/merge_hris_client/models/company.rb +10 -10
  49. data/lib/merge_hris_client/models/deduction.rb +10 -10
  50. data/lib/merge_hris_client/models/dependent.rb +470 -0
  51. data/lib/merge_hris_client/models/earning.rb +10 -10
  52. data/lib/merge_hris_client/models/employee.rb +10 -10
  53. data/lib/merge_hris_client/models/employee_payroll_run.rb +10 -10
  54. data/lib/merge_hris_client/models/employer_benefit.rb +363 -0
  55. data/lib/merge_hris_client/models/employment.rb +10 -10
  56. data/lib/merge_hris_client/models/end_user_details_request.rb +1 -1
  57. data/lib/merge_hris_client/models/group.rb +10 -10
  58. data/lib/merge_hris_client/models/location.rb +10 -10
  59. data/lib/merge_hris_client/models/paginated_dependent_list.rb +240 -0
  60. data/lib/merge_hris_client/models/paginated_employer_benefit_list.rb +240 -0
  61. data/lib/merge_hris_client/models/pay_group.rb +10 -10
  62. data/lib/merge_hris_client/models/payroll_run.rb +10 -10
  63. data/lib/merge_hris_client/models/relationship_enum.rb +46 -0
  64. data/lib/merge_hris_client/models/remote_data.rb +3 -4
  65. data/lib/merge_hris_client/models/sync_status_status_enum.rb +2 -1
  66. data/lib/merge_hris_client/models/tax.rb +10 -10
  67. data/lib/merge_hris_client/models/team.rb +10 -10
  68. data/lib/merge_hris_client/models/time_off.rb +10 -10
  69. data/lib/merge_hris_client/models/time_off_balance.rb +10 -10
  70. data/lib/merge_hris_client/version.rb +1 -1
  71. data/lib/merge_hris_client.rb +16 -2
  72. data/spec/api/async_passthrough_api_spec.rb +59 -0
  73. data/spec/api/bank_info_api_spec.rb +1 -1
  74. data/spec/api/delete_account_api_spec.rb +2 -2
  75. data/spec/api/dependents_api_spec.rb +70 -0
  76. data/spec/api/employer_benefits_api_spec.rb +68 -0
  77. data/spec/api/employments_api_spec.rb +1 -1
  78. data/spec/api/linked_accounts_api_spec.rb +1 -1
  79. data/spec/api/sync_status_api_spec.rb +1 -1
  80. data/spec/models/async_passthrough_reciept_spec.rb +34 -0
  81. data/spec/models/bank_info_spec.rb +2 -2
  82. data/spec/models/benefit_plan_type_enum_spec.rb +28 -0
  83. data/spec/models/benefit_spec.rb +19 -1
  84. data/spec/models/company_spec.rb +2 -2
  85. data/spec/models/deduction_spec.rb +2 -2
  86. data/spec/models/dependent_spec.rb +130 -0
  87. data/spec/models/earning_spec.rb +2 -2
  88. data/spec/models/employee_payroll_run_spec.rb +2 -2
  89. data/spec/models/employee_spec.rb +2 -2
  90. data/spec/models/employer_benefit_spec.rb +88 -0
  91. data/spec/models/employment_spec.rb +2 -2
  92. data/spec/models/group_spec.rb +2 -2
  93. data/spec/models/location_spec.rb +2 -2
  94. data/spec/models/paginated_dependent_list_spec.rb +46 -0
  95. data/spec/models/paginated_employer_benefit_list_spec.rb +46 -0
  96. data/spec/models/pay_group_spec.rb +2 -2
  97. data/spec/models/payroll_run_spec.rb +2 -2
  98. data/spec/models/relationship_enum_spec.rb +28 -0
  99. data/spec/models/tax_spec.rb +2 -2
  100. data/spec/models/team_spec.rb +2 -2
  101. data/spec/models/time_off_balance_spec.rb +2 -2
  102. data/spec/models/time_off_spec.rb +2 -2
  103. metadata +161 -121
@@ -0,0 +1,182 @@
1
+ =begin
2
+ #Merge HRIS API
3
+
4
+ #The unified API for building rich integrations with multiple HR Information 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 'cgi'
14
+
15
+ module MergeHRISClient
16
+ class EmployerBenefitsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Returns a list of `EmployerBenefit` objects.
23
+ # @param x_account_token [String] Token identifying the end user.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Time] :created_after If provided, will only return objects created after this datetime.
26
+ # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
27
+ # @option opts [String] :cursor The pagination cursor value.
28
+ # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
29
+ # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
30
+ # @option opts [Time] :modified_after If provided, only objects synced by Merge after this date time will be returned.
31
+ # @option opts [Time] :modified_before If provided, only objects synced by Merge before this date time will be returned.
32
+ # @option opts [Integer] :page_size Number of results to return per page.
33
+ # @option opts [String] :remote_id The API provider's ID for the given object.
34
+ # @return [PaginatedEmployerBenefitList]
35
+ def employer_benefits_list(x_account_token, opts = {})
36
+ data, _status_code, _headers = employer_benefits_list_with_http_info(x_account_token, opts)
37
+ data
38
+ end
39
+
40
+ # Returns a list of `EmployerBenefit` objects.
41
+ # @param x_account_token [String] Token identifying the end user.
42
+ # @param [Hash] opts the optional parameters
43
+ # @option opts [Time] :created_after If provided, will only return objects created after this datetime.
44
+ # @option opts [Time] :created_before If provided, will only return objects created before this datetime.
45
+ # @option opts [String] :cursor The pagination cursor value.
46
+ # @option opts [Boolean] :include_deleted_data Whether to include data that was marked as deleted by third party webhooks.
47
+ # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
48
+ # @option opts [Time] :modified_after If provided, only objects synced by Merge after this date time will be returned.
49
+ # @option opts [Time] :modified_before If provided, only objects synced by Merge before this date time will be returned.
50
+ # @option opts [Integer] :page_size Number of results to return per page.
51
+ # @option opts [String] :remote_id The API provider's ID for the given object.
52
+ # @return [Array<(PaginatedEmployerBenefitList, Integer, Hash)>] PaginatedEmployerBenefitList data, response status code and response headers
53
+ def employer_benefits_list_with_http_info(x_account_token, opts = {})
54
+ if @api_client.config.debugging
55
+ @api_client.config.logger.debug 'Calling API: EmployerBenefitsApi.employer_benefits_list ...'
56
+ end
57
+ # verify the required parameter 'x_account_token' is set
58
+ if @api_client.config.client_side_validation && x_account_token.nil?
59
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling EmployerBenefitsApi.employer_benefits_list"
60
+ end
61
+ # resource path
62
+ local_var_path = '/employer-benefits'
63
+
64
+ # query parameters
65
+ query_params = opts[:query_params] || {}
66
+ query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
67
+ query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
68
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
69
+ query_params[:'include_deleted_data'] = opts[:'include_deleted_data'] if !opts[:'include_deleted_data'].nil?
70
+ query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
71
+ query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
72
+ query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
73
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
74
+ query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
75
+
76
+ # header parameters
77
+ header_params = opts[:header_params] || {}
78
+ # HTTP header 'Accept' (if needed)
79
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
80
+ header_params[:'X-Account-Token'] = x_account_token
81
+
82
+ # form parameters
83
+ form_params = opts[:form_params] || {}
84
+
85
+ # http body (model)
86
+ post_body = opts[:debug_body]
87
+
88
+ # return_type
89
+ return_type = opts[:debug_return_type] || 'PaginatedEmployerBenefitList'
90
+
91
+ # auth_names
92
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
93
+
94
+ new_options = opts.merge(
95
+ :operation => :"EmployerBenefitsApi.employer_benefits_list",
96
+ :header_params => header_params,
97
+ :query_params => query_params,
98
+ :form_params => form_params,
99
+ :body => post_body,
100
+ :auth_names => auth_names,
101
+ :return_type => return_type
102
+ )
103
+
104
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug "API called: EmployerBenefitsApi#employer_benefits_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
107
+ end
108
+ return data, status_code, headers
109
+ end
110
+
111
+ # Returns an `EmployerBenefit` object with the given `id`.
112
+ # @param x_account_token [String] Token identifying the end user.
113
+ # @param id [String]
114
+ # @param [Hash] opts the optional parameters
115
+ # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
116
+ # @return [EmployerBenefit]
117
+ def employer_benefits_retrieve(x_account_token, id, opts = {})
118
+ data, _status_code, _headers = employer_benefits_retrieve_with_http_info(x_account_token, id, opts)
119
+ data
120
+ end
121
+
122
+ # Returns an &#x60;EmployerBenefit&#x60; object with the given &#x60;id&#x60;.
123
+ # @param x_account_token [String] Token identifying the end user.
124
+ # @param id [String]
125
+ # @param [Hash] opts the optional parameters
126
+ # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
127
+ # @return [Array<(EmployerBenefit, Integer, Hash)>] EmployerBenefit data, response status code and response headers
128
+ def employer_benefits_retrieve_with_http_info(x_account_token, id, opts = {})
129
+ if @api_client.config.debugging
130
+ @api_client.config.logger.debug 'Calling API: EmployerBenefitsApi.employer_benefits_retrieve ...'
131
+ end
132
+ # verify the required parameter 'x_account_token' is set
133
+ if @api_client.config.client_side_validation && x_account_token.nil?
134
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling EmployerBenefitsApi.employer_benefits_retrieve"
135
+ end
136
+ # verify the required parameter 'id' is set
137
+ if @api_client.config.client_side_validation && id.nil?
138
+ fail ArgumentError, "Missing the required parameter 'id' when calling EmployerBenefitsApi.employer_benefits_retrieve"
139
+ end
140
+ # resource path
141
+ local_var_path = '/employer-benefits/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
142
+
143
+ # query parameters
144
+ query_params = opts[:query_params] || {}
145
+ query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
146
+
147
+ # header parameters
148
+ header_params = opts[:header_params] || {}
149
+ # HTTP header 'Accept' (if needed)
150
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
151
+ header_params[:'X-Account-Token'] = x_account_token
152
+
153
+ # form parameters
154
+ form_params = opts[:form_params] || {}
155
+
156
+ # http body (model)
157
+ post_body = opts[:debug_body]
158
+
159
+ # return_type
160
+ return_type = opts[:debug_return_type] || 'EmployerBenefit'
161
+
162
+ # auth_names
163
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
164
+
165
+ new_options = opts.merge(
166
+ :operation => :"EmployerBenefitsApi.employer_benefits_retrieve",
167
+ :header_params => header_params,
168
+ :query_params => query_params,
169
+ :form_params => form_params,
170
+ :body => post_body,
171
+ :auth_names => auth_names,
172
+ :return_type => return_type
173
+ )
174
+
175
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug "API called: EmployerBenefitsApi#employer_benefits_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
178
+ end
179
+ return data, status_code, headers
180
+ end
181
+ end
182
+ end
@@ -31,7 +31,7 @@ module MergeHRISClient
31
31
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
32
32
  # @option opts [Time] :modified_after If provided, only objects synced by Merge after this date time will be returned.
33
33
  # @option opts [Time] :modified_before If provided, only objects synced by Merge before this date time will be returned.
34
- # @option opts [String] :order_by Overrides the default ordering for this endpoint.
34
+ # @option opts [String] :order_by Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date.
35
35
  # @option opts [Integer] :page_size Number of results to return per page.
36
36
  # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
37
37
  # @option opts [String] :remote_id The API provider&#39;s ID for the given object.
@@ -54,7 +54,7 @@ module MergeHRISClient
54
54
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
55
55
  # @option opts [Time] :modified_after If provided, only objects synced by Merge after this date time will be returned.
56
56
  # @option opts [Time] :modified_before If provided, only objects synced by Merge before this date time will be returned.
57
- # @option opts [String] :order_by Overrides the default ordering for this endpoint.
57
+ # @option opts [String] :order_by Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date.
58
58
  # @option opts [Integer] :page_size Number of results to return per page.
59
59
  # @option opts [String] :remote_fields Deprecated. Use show_enum_origins.
60
60
  # @option opts [String] :remote_id The API provider&#39;s ID for the given object.
@@ -21,7 +21,7 @@ module MergeHRISClient
21
21
  end
22
22
  # List linked accounts for your organization.
23
23
  # @param [Hash] opts the optional parameters
24
- # @option opts [String] :category * &#x60;hris&#x60; - hris * &#x60;ats&#x60; - ats * &#x60;accounting&#x60; - accounting * &#x60;ticketing&#x60; - ticketing * &#x60;crm&#x60; - crm * &#x60;mktg&#x60; - mktg * &#x60;filestorage&#x60; - filestorage * &#x60;hris&#x60; - hris * &#x60;ats&#x60; - ats * &#x60;accounting&#x60; - accounting * &#x60;ticketing&#x60; - ticketing * &#x60;crm&#x60; - crm * &#x60;mktg&#x60; - mktg * &#x60;filestorage&#x60; - filestorage
24
+ # @option opts [String] :category Options: (&#39;hris&#39;, &#39;ats&#39;, &#39;accounting&#39;, &#39;ticketing&#39;, &#39;crm&#39;, &#39;mktg&#39;, &#39;filestorage&#39;) * &#x60;hris&#x60; - hris * &#x60;ats&#x60; - ats * &#x60;accounting&#x60; - accounting * &#x60;ticketing&#x60; - ticketing * &#x60;crm&#x60; - crm * &#x60;mktg&#x60; - mktg * &#x60;filestorage&#x60; - filestorage
25
25
  # @option opts [String] :cursor The pagination cursor value.
26
26
  # @option opts [String] :end_user_email_address If provided, will only return linked accounts associated with the given email address.
27
27
  # @option opts [String] :end_user_organization_name If provided, will only return linked accounts associated with the given organization name.
@@ -42,7 +42,7 @@ module MergeHRISClient
42
42
 
43
43
  # List linked accounts for your organization.
44
44
  # @param [Hash] opts the optional parameters
45
- # @option opts [String] :category * &#x60;hris&#x60; - hris * &#x60;ats&#x60; - ats * &#x60;accounting&#x60; - accounting * &#x60;ticketing&#x60; - ticketing * &#x60;crm&#x60; - crm * &#x60;mktg&#x60; - mktg * &#x60;filestorage&#x60; - filestorage * &#x60;hris&#x60; - hris * &#x60;ats&#x60; - ats * &#x60;accounting&#x60; - accounting * &#x60;ticketing&#x60; - ticketing * &#x60;crm&#x60; - crm * &#x60;mktg&#x60; - mktg * &#x60;filestorage&#x60; - filestorage
45
+ # @option opts [String] :category Options: (&#39;hris&#39;, &#39;ats&#39;, &#39;accounting&#39;, &#39;ticketing&#39;, &#39;crm&#39;, &#39;mktg&#39;, &#39;filestorage&#39;) * &#x60;hris&#x60; - hris * &#x60;ats&#x60; - ats * &#x60;accounting&#x60; - accounting * &#x60;ticketing&#x60; - ticketing * &#x60;crm&#x60; - crm * &#x60;mktg&#x60; - mktg * &#x60;filestorage&#x60; - filestorage
46
46
  # @option opts [String] :cursor The pagination cursor value.
47
47
  # @option opts [String] :end_user_email_address If provided, will only return linked accounts associated with the given email address.
48
48
  # @option opts [String] :end_user_organization_name If provided, will only return linked accounts associated with the given organization name.
@@ -19,7 +19,7 @@ module MergeHRISClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PAUSED`, `SYNCING`
22
+ # Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`
23
23
  # @param x_account_token [String] Token identifying the end user.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @option opts [String] :cursor The pagination cursor value.
@@ -30,7 +30,7 @@ module MergeHRISClient
30
30
  data
31
31
  end
32
32
 
33
- # Get syncing status. Possible values: &#x60;DISABLED&#x60;, &#x60;DONE&#x60;, &#x60;FAILED&#x60;, &#x60;PAUSED&#x60;, &#x60;SYNCING&#x60;
33
+ # Get syncing status. Possible values: &#x60;DISABLED&#x60;, &#x60;DONE&#x60;, &#x60;FAILED&#x60;, &#x60;PARTIALLY_SYNCED&#x60;, &#x60;PAUSED&#x60;, &#x60;SYNCING&#x60;
34
34
  # @param x_account_token [String] Token identifying the end user.
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @option opts [String] :cursor The pagination cursor value.
@@ -0,0 +1,223 @@
1
+ =begin
2
+ #Merge HRIS API
3
+
4
+ #The unified API for building rich integrations with multiple HR Information 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 MergeHRISClient
17
+ class AsyncPassthroughReciept
18
+ attr_accessor :async_passthrough_receipt_id
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'async_passthrough_receipt_id' => :'async_passthrough_receipt_id'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'async_passthrough_receipt_id' => :'String'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MergeHRISClient::AsyncPassthroughReciept` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MergeHRISClient::AsyncPassthroughReciept`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'async_passthrough_receipt_id')
61
+ self.async_passthrough_receipt_id = attributes[:'async_passthrough_receipt_id']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ if @async_passthrough_receipt_id.nil?
70
+ invalid_properties.push('invalid value for "async_passthrough_receipt_id", async_passthrough_receipt_id cannot be nil.')
71
+ end
72
+
73
+ invalid_properties
74
+ end
75
+
76
+ # Check to see if the all the properties in the model are valid
77
+ # @return true if the model is valid
78
+ def valid?
79
+ return false if @async_passthrough_receipt_id.nil?
80
+ true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ async_passthrough_receipt_id == o.async_passthrough_receipt_id
89
+ end
90
+
91
+ # @see the `==` method
92
+ # @param [Object] Object to be compared
93
+ def eql?(o)
94
+ self == o
95
+ end
96
+
97
+ # Calculates hash code according to all attributes.
98
+ # @return [Integer] Hash code
99
+ def hash
100
+ [async_passthrough_receipt_id].hash
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def self.build_from_hash(attributes)
107
+ new.build_from_hash(attributes)
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+ self.class.openapi_types.each_pair do |key, type|
116
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
117
+ self.send("#{key}=", nil)
118
+ elsif type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
122
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
123
+ end
124
+ elsif !attributes[self.class.attribute_map[key]].nil?
125
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
126
+ end
127
+ end
128
+
129
+ self
130
+ end
131
+
132
+ # Deserializes the data based on type
133
+ # @param string type Data type
134
+ # @param string value Value to be deserialized
135
+ # @return [Object] Deserialized data
136
+ def _deserialize(type, value)
137
+ case type.to_sym
138
+ when :Time
139
+ Time.parse(value)
140
+ when :Date
141
+ Date.parse(value)
142
+ when :String
143
+ value
144
+ when :Integer
145
+ value.to_i
146
+ when :Float
147
+ value.to_f
148
+ when :Boolean
149
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
150
+ true
151
+ else
152
+ false
153
+ end
154
+ when :Object
155
+ # generic object (usually a Hash), return directly
156
+ value
157
+ when /\AArray<(?<inner_type>.+)>\z/
158
+ inner_type = Regexp.last_match[:inner_type]
159
+ value.map { |v| _deserialize(inner_type, v) }
160
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
161
+ k_type = Regexp.last_match[:k_type]
162
+ v_type = Regexp.last_match[:v_type]
163
+ {}.tap do |hash|
164
+ value.each do |k, v|
165
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
166
+ end
167
+ end
168
+ else # model
169
+ # models (e.g. Pet) or oneOf
170
+ klass = MergeHRISClient.const_get(type)
171
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
172
+ end
173
+ end
174
+
175
+ # Returns the string representation of the object
176
+ # @return [String] String presentation of the object
177
+ def to_s
178
+ to_hash.to_s
179
+ end
180
+
181
+ # to_body is an alias to to_hash (backward compatibility)
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_body
184
+ to_hash
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ if value.nil?
194
+ is_nullable = self.class.openapi_nullable.include?(attr)
195
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
+ end
197
+
198
+ hash[param] = _to_hash(value)
199
+ end
200
+ hash
201
+ end
202
+
203
+ # Outputs non-array value in the form of hash
204
+ # For object, use to_hash. Otherwise, just return the value
205
+ # @param [Object] value Any valid value
206
+ # @return [Hash] Returns the value in the form of hash
207
+ def _to_hash(value)
208
+ if value.is_a?(Array)
209
+ value.compact.map { |v| _to_hash(v) }
210
+ elsif value.is_a?(Hash)
211
+ {}.tap do |hash|
212
+ value.each { |k, v| hash[k] = _to_hash(v) }
213
+ end
214
+ elsif value.respond_to? :to_hash
215
+ value.to_hash
216
+ else
217
+ value
218
+ end
219
+ end
220
+
221
+ end
222
+
223
+ end
@@ -42,11 +42,11 @@ module MergeHRISClient
42
42
  # Indicates whether or not this object has been deleted by third party webhooks.
43
43
  attr_accessor :remote_was_deleted
44
44
 
45
- attr_accessor :field_mappings
46
-
47
45
  # This is the datetime that this object was last updated by Merge
48
46
  attr_accessor :modified_at
49
47
 
48
+ attr_accessor :field_mappings
49
+
50
50
  attr_accessor :remote_data
51
51
 
52
52
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -61,8 +61,8 @@ module MergeHRISClient
61
61
  :'account_type' => :'account_type',
62
62
  :'remote_created_at' => :'remote_created_at',
63
63
  :'remote_was_deleted' => :'remote_was_deleted',
64
- :'field_mappings' => :'field_mappings',
65
64
  :'modified_at' => :'modified_at',
65
+ :'field_mappings' => :'field_mappings',
66
66
  :'remote_data' => :'remote_data'
67
67
  }
68
68
  end
@@ -84,8 +84,8 @@ module MergeHRISClient
84
84
  :'account_type' => :'AccountTypeEnum',
85
85
  :'remote_created_at' => :'Time',
86
86
  :'remote_was_deleted' => :'Boolean',
87
- :'field_mappings' => :'Hash<String, Object>',
88
87
  :'modified_at' => :'Time',
88
+ :'field_mappings' => :'Hash<String, Object>',
89
89
  :'remote_data' => :'Array<RemoteData>'
90
90
  }
91
91
  end
@@ -156,16 +156,16 @@ module MergeHRISClient
156
156
  self.remote_was_deleted = attributes[:'remote_was_deleted']
157
157
  end
158
158
 
159
+ if attributes.key?(:'modified_at')
160
+ self.modified_at = attributes[:'modified_at']
161
+ end
162
+
159
163
  if attributes.key?(:'field_mappings')
160
164
  if (value = attributes[:'field_mappings']).is_a?(Hash)
161
165
  self.field_mappings = value
162
166
  end
163
167
  end
164
168
 
165
- if attributes.key?(:'modified_at')
166
- self.modified_at = attributes[:'modified_at']
167
- end
168
-
169
169
  if attributes.key?(:'remote_data')
170
170
  if (value = attributes[:'remote_data']).is_a?(Array)
171
171
  self.remote_data = value
@@ -215,8 +215,8 @@ module MergeHRISClient
215
215
  account_type == o.account_type &&
216
216
  remote_created_at == o.remote_created_at &&
217
217
  remote_was_deleted == o.remote_was_deleted &&
218
- field_mappings == o.field_mappings &&
219
218
  modified_at == o.modified_at &&
219
+ field_mappings == o.field_mappings &&
220
220
  remote_data == o.remote_data
221
221
  end
222
222
 
@@ -229,7 +229,7 @@ module MergeHRISClient
229
229
  # Calculates hash code according to all attributes.
230
230
  # @return [Integer] Hash code
231
231
  def hash
232
- [id, remote_id, employee, account_number, routing_number, bank_name, account_type, remote_created_at, remote_was_deleted, field_mappings, modified_at, remote_data].hash
232
+ [id, remote_id, employee, account_number, routing_number, bank_name, account_type, remote_created_at, remote_was_deleted, modified_at, field_mappings, remote_data].hash
233
233
  end
234
234
 
235
235
  # Builds the object from hash
@@ -36,14 +36,23 @@ module MergeHRISClient
36
36
  # The company's contribution.
37
37
  attr_accessor :company_contribution
38
38
 
39
+ # The day and time the benefit started.
40
+ attr_accessor :start_date
41
+
42
+ # The day and time the benefit ended.
43
+ attr_accessor :end_date
44
+
39
45
  # Indicates whether or not this object has been deleted by third party webhooks.
40
46
  attr_accessor :remote_was_deleted
41
47
 
42
- attr_accessor :field_mappings
48
+ # The employer benefit plan the employee is enrolled in.
49
+ attr_accessor :employer_benefit
43
50
 
44
51
  # This is the datetime that this object was last updated by Merge
45
52
  attr_accessor :modified_at
46
53
 
54
+ attr_accessor :field_mappings
55
+
47
56
  attr_accessor :remote_data
48
57
 
49
58
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -56,9 +65,12 @@ module MergeHRISClient
56
65
  :'benefit_plan_type' => :'benefit_plan_type',
57
66
  :'employee_contribution' => :'employee_contribution',
58
67
  :'company_contribution' => :'company_contribution',
68
+ :'start_date' => :'start_date',
69
+ :'end_date' => :'end_date',
59
70
  :'remote_was_deleted' => :'remote_was_deleted',
60
- :'field_mappings' => :'field_mappings',
71
+ :'employer_benefit' => :'employer_benefit',
61
72
  :'modified_at' => :'modified_at',
73
+ :'field_mappings' => :'field_mappings',
62
74
  :'remote_data' => :'remote_data'
63
75
  }
64
76
  end
@@ -78,9 +90,12 @@ module MergeHRISClient
78
90
  :'benefit_plan_type' => :'String',
79
91
  :'employee_contribution' => :'Float',
80
92
  :'company_contribution' => :'Float',
93
+ :'start_date' => :'Time',
94
+ :'end_date' => :'Time',
81
95
  :'remote_was_deleted' => :'Boolean',
82
- :'field_mappings' => :'Hash<String, Object>',
96
+ :'employer_benefit' => :'String',
83
97
  :'modified_at' => :'Time',
98
+ :'field_mappings' => :'Hash<String, Object>',
84
99
  :'remote_data' => :'Array<RemoteData>'
85
100
  }
86
101
  end
@@ -94,6 +109,9 @@ module MergeHRISClient
94
109
  :'benefit_plan_type',
95
110
  :'employee_contribution',
96
111
  :'company_contribution',
112
+ :'start_date',
113
+ :'end_date',
114
+ :'employer_benefit',
97
115
  :'field_mappings',
98
116
  :'remote_data'
99
117
  ])
@@ -142,20 +160,32 @@ module MergeHRISClient
142
160
  self.company_contribution = attributes[:'company_contribution']
143
161
  end
144
162
 
163
+ if attributes.key?(:'start_date')
164
+ self.start_date = attributes[:'start_date']
165
+ end
166
+
167
+ if attributes.key?(:'end_date')
168
+ self.end_date = attributes[:'end_date']
169
+ end
170
+
145
171
  if attributes.key?(:'remote_was_deleted')
146
172
  self.remote_was_deleted = attributes[:'remote_was_deleted']
147
173
  end
148
174
 
149
- if attributes.key?(:'field_mappings')
150
- if (value = attributes[:'field_mappings']).is_a?(Hash)
151
- self.field_mappings = value
152
- end
175
+ if attributes.key?(:'employer_benefit')
176
+ self.employer_benefit = attributes[:'employer_benefit']
153
177
  end
154
178
 
155
179
  if attributes.key?(:'modified_at')
156
180
  self.modified_at = attributes[:'modified_at']
157
181
  end
158
182
 
183
+ if attributes.key?(:'field_mappings')
184
+ if (value = attributes[:'field_mappings']).is_a?(Hash)
185
+ self.field_mappings = value
186
+ end
187
+ end
188
+
159
189
  if attributes.key?(:'remote_data')
160
190
  if (value = attributes[:'remote_data']).is_a?(Array)
161
191
  self.remote_data = value
@@ -188,9 +218,12 @@ module MergeHRISClient
188
218
  benefit_plan_type == o.benefit_plan_type &&
189
219
  employee_contribution == o.employee_contribution &&
190
220
  company_contribution == o.company_contribution &&
221
+ start_date == o.start_date &&
222
+ end_date == o.end_date &&
191
223
  remote_was_deleted == o.remote_was_deleted &&
192
- field_mappings == o.field_mappings &&
224
+ employer_benefit == o.employer_benefit &&
193
225
  modified_at == o.modified_at &&
226
+ field_mappings == o.field_mappings &&
194
227
  remote_data == o.remote_data
195
228
  end
196
229
 
@@ -203,7 +236,7 @@ module MergeHRISClient
203
236
  # Calculates hash code according to all attributes.
204
237
  # @return [Integer] Hash code
205
238
  def hash
206
- [id, remote_id, employee, provider_name, benefit_plan_type, employee_contribution, company_contribution, remote_was_deleted, field_mappings, modified_at, remote_data].hash
239
+ [id, remote_id, employee, provider_name, benefit_plan_type, employee_contribution, company_contribution, start_date, end_date, remote_was_deleted, employer_benefit, modified_at, field_mappings, remote_data].hash
207
240
  end
208
241
 
209
242
  # Builds the object from hash