merge_hris_client 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -2
  3. data/docs/AccountToken.md +3 -1
  4. data/docs/AvailableActions.md +1 -1
  5. data/docs/BenefitRequest.md +28 -0
  6. data/docs/BenefitsApi.md +78 -0
  7. data/docs/DeleteAccountApi.md +77 -0
  8. data/docs/Employee.md +8 -6
  9. data/docs/EmployeeRequest.md +62 -0
  10. data/docs/EmployeesApi.md +83 -1
  11. data/docs/EmploymentRequest.md +34 -0
  12. data/docs/EmploymentsApi.md +78 -0
  13. data/docs/EndUserDetailsRequest.md +1 -1
  14. data/docs/Issue.md +30 -0
  15. data/docs/IssueStatusEnum.md +15 -0
  16. data/docs/IssuesApi.md +167 -0
  17. data/docs/Location.md +1 -1
  18. data/docs/ModelOperation.md +3 -1
  19. data/docs/PaginatedIssueList.md +22 -0
  20. data/docs/PaginatedSyncStatusList.md +22 -0
  21. data/docs/PaginatedTimeOffBalanceList.md +22 -0
  22. data/docs/RemoteDataRequest.md +20 -0
  23. data/docs/SyncStatus.md +1 -1
  24. data/docs/SyncStatusApi.md +89 -11
  25. data/docs/SyncStatusStatusEnum.md +15 -0
  26. data/docs/Team.md +2 -0
  27. data/docs/TeamsApi.md +2 -0
  28. data/docs/TimeOff.md +4 -0
  29. data/docs/TimeOffBalance.md +28 -0
  30. data/docs/TimeOffBalanceApi.md +181 -0
  31. data/lib/merge_hris_client.rb +15 -4
  32. data/lib/merge_hris_client/api/account_token_api.rb +1 -1
  33. data/lib/merge_hris_client/api/available_actions_api.rb +1 -1
  34. data/lib/merge_hris_client/api/benefits_api.rb +70 -1
  35. data/lib/merge_hris_client/api/companies_api.rb +1 -1
  36. data/lib/merge_hris_client/api/delete_account_api.rb +82 -0
  37. data/lib/merge_hris_client/api/employee_payroll_runs_api.rb +1 -1
  38. data/lib/merge_hris_client/api/employees_api.rb +76 -1
  39. data/lib/merge_hris_client/api/employments_api.rb +70 -1
  40. data/lib/merge_hris_client/api/generate_key_api.rb +1 -1
  41. data/lib/merge_hris_client/api/issues_api.rb +169 -0
  42. data/lib/merge_hris_client/api/link_token_api.rb +1 -1
  43. data/lib/merge_hris_client/api/locations_api.rb +1 -1
  44. data/lib/merge_hris_client/api/passthrough_api.rb +1 -1
  45. data/lib/merge_hris_client/api/payroll_runs_api.rb +1 -1
  46. data/lib/merge_hris_client/api/regenerate_key_api.rb +1 -1
  47. data/lib/merge_hris_client/api/sync_status_api.rb +79 -11
  48. data/lib/merge_hris_client/api/teams_api.rb +4 -1
  49. data/lib/merge_hris_client/api/time_off_api.rb +1 -1
  50. data/lib/merge_hris_client/api/time_off_balance_api.rb +196 -0
  51. data/lib/merge_hris_client/api_client.rb +2 -2
  52. data/lib/merge_hris_client/api_error.rb +1 -1
  53. data/lib/merge_hris_client/configuration.rb +1 -1
  54. data/lib/merge_hris_client/models/account_integration.rb +1 -1
  55. data/lib/merge_hris_client/models/account_token.rb +19 -5
  56. data/lib/merge_hris_client/models/available_actions.rb +1 -1
  57. data/lib/merge_hris_client/models/benefit.rb +1 -1
  58. data/lib/merge_hris_client/models/benefit_plan_type_enum.rb +1 -1
  59. data/lib/merge_hris_client/models/benefit_request.rb +276 -0
  60. data/lib/merge_hris_client/models/company.rb +1 -1
  61. data/lib/merge_hris_client/models/country_enum.rb +1 -1
  62. data/lib/merge_hris_client/models/data_passthrough_request.rb +2 -1
  63. data/lib/merge_hris_client/models/deduction.rb +1 -1
  64. data/lib/merge_hris_client/models/earning.rb +1 -1
  65. data/lib/merge_hris_client/models/employee.rb +32 -20
  66. data/lib/merge_hris_client/models/employee_payroll_run.rb +1 -1
  67. data/lib/merge_hris_client/models/employee_request.rb +523 -0
  68. data/lib/merge_hris_client/models/employment.rb +1 -1
  69. data/lib/merge_hris_client/models/employment_request.rb +309 -0
  70. data/lib/merge_hris_client/models/employment_status_enum.rb +1 -1
  71. data/lib/merge_hris_client/models/employment_type_enum.rb +1 -1
  72. data/lib/merge_hris_client/models/end_user_details_request.rb +2 -6
  73. data/lib/merge_hris_client/models/ethnicity_enum.rb +1 -1
  74. data/lib/merge_hris_client/models/flsa_status_enum.rb +1 -1
  75. data/lib/merge_hris_client/models/gender_enum.rb +1 -1
  76. data/lib/merge_hris_client/models/generate_remote_key_request.rb +1 -1
  77. data/lib/merge_hris_client/models/issue.rb +281 -0
  78. data/lib/merge_hris_client/models/issue_status_enum.rb +36 -0
  79. data/lib/merge_hris_client/models/link_token.rb +1 -1
  80. data/lib/merge_hris_client/models/location.rb +4 -4
  81. data/lib/merge_hris_client/models/method_enum.rb +1 -1
  82. data/lib/merge_hris_client/models/model_operation.rb +21 -5
  83. data/lib/merge_hris_client/models/paginated_benefit_list.rb +1 -1
  84. data/lib/merge_hris_client/models/paginated_company_list.rb +1 -1
  85. data/lib/merge_hris_client/models/paginated_employee_list.rb +1 -1
  86. data/lib/merge_hris_client/models/paginated_employee_payroll_run_list.rb +1 -1
  87. data/lib/merge_hris_client/models/paginated_employment_list.rb +1 -1
  88. data/lib/merge_hris_client/models/paginated_issue_list.rb +240 -0
  89. data/lib/merge_hris_client/models/paginated_location_list.rb +1 -1
  90. data/lib/merge_hris_client/models/paginated_payroll_run_list.rb +1 -1
  91. data/lib/merge_hris_client/models/paginated_sync_status_list.rb +240 -0
  92. data/lib/merge_hris_client/models/paginated_team_list.rb +1 -1
  93. data/lib/merge_hris_client/models/paginated_time_off_balance_list.rb +240 -0
  94. data/lib/merge_hris_client/models/paginated_time_off_list.rb +1 -1
  95. data/lib/merge_hris_client/models/pay_currency_enum.rb +1 -1
  96. data/lib/merge_hris_client/models/pay_frequency_enum.rb +1 -1
  97. data/lib/merge_hris_client/models/pay_period_enum.rb +1 -1
  98. data/lib/merge_hris_client/models/payroll_run.rb +1 -1
  99. data/lib/merge_hris_client/models/remote_data.rb +1 -1
  100. data/lib/merge_hris_client/models/remote_data_request.rb +234 -0
  101. data/lib/merge_hris_client/models/remote_key.rb +1 -1
  102. data/lib/merge_hris_client/models/remote_key_for_regeneration_request.rb +1 -1
  103. data/lib/merge_hris_client/models/remote_response.rb +1 -1
  104. data/lib/merge_hris_client/models/request_type_enum.rb +1 -1
  105. data/lib/merge_hris_client/models/run_state_enum.rb +1 -1
  106. data/lib/merge_hris_client/models/run_type_enum.rb +1 -1
  107. data/lib/merge_hris_client/models/sync_status.rb +2 -2
  108. data/lib/merge_hris_client/models/sync_status_status_enum.rb +37 -0
  109. data/lib/merge_hris_client/models/tax.rb +1 -1
  110. data/lib/merge_hris_client/models/team.rb +13 -2
  111. data/lib/merge_hris_client/models/time_off.rb +24 -2
  112. data/lib/merge_hris_client/models/time_off_balance.rb +275 -0
  113. data/lib/merge_hris_client/models/time_off_status_enum.rb +1 -1
  114. data/lib/merge_hris_client/models/type_enum.rb +1 -1
  115. data/lib/merge_hris_client/models/units_enum.rb +1 -1
  116. data/lib/merge_hris_client/version.rb +2 -2
  117. data/merge_hris_client-1.0.1.gem +0 -0
  118. data/merge_hris_client.gemspec +1 -1
  119. data/spec/api/delete_account_api_spec.rb +46 -0
  120. data/spec/api/generate_key_api_spec.rb +46 -0
  121. data/spec/api/issues_api_spec.rb +65 -0
  122. data/spec/api/sync_status_api_spec.rb +59 -0
  123. data/spec/api/time_off_balance_api_spec.rb +70 -0
  124. data/spec/api_client_spec.rb +1 -1
  125. data/spec/configuration_spec.rb +1 -1
  126. data/spec/models/benefit_request_spec.rb +64 -0
  127. data/spec/models/employee_request_spec.rb +160 -0
  128. data/spec/models/employment_request_spec.rb +82 -0
  129. data/spec/models/generate_remote_key_request_spec.rb +34 -0
  130. data/spec/models/issue_spec.rb +70 -0
  131. data/spec/models/issue_status_enum_spec.rb +28 -0
  132. data/spec/models/paginated_issue_list_spec.rb +46 -0
  133. data/spec/models/paginated_sync_status_list_spec.rb +46 -0
  134. data/spec/models/paginated_time_off_balance_list_spec.rb +46 -0
  135. data/spec/models/remote_data_request_spec.rb +40 -0
  136. data/spec/models/sync_status_spec.rb +64 -0
  137. data/spec/models/sync_status_status_enum_spec.rb +28 -0
  138. data/spec/models/time_off_balance_spec.rb +64 -0
  139. data/spec/spec_helper.rb +1 -1
  140. data/test_ruby.rb +14 -11
  141. metadata +67 -2
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -22,23 +22,26 @@ require 'merge_hris_client/models/account_token'
22
22
  require 'merge_hris_client/models/available_actions'
23
23
  require 'merge_hris_client/models/benefit'
24
24
  require 'merge_hris_client/models/benefit_plan_type_enum'
25
+ require 'merge_hris_client/models/benefit_request'
25
26
  require 'merge_hris_client/models/company'
26
27
  require 'merge_hris_client/models/country_enum'
27
- require 'merge_hris_client/models/data_passthrough'
28
28
  require 'merge_hris_client/models/data_passthrough_request'
29
29
  require 'merge_hris_client/models/deduction'
30
30
  require 'merge_hris_client/models/earning'
31
31
  require 'merge_hris_client/models/employee'
32
32
  require 'merge_hris_client/models/employee_payroll_run'
33
+ require 'merge_hris_client/models/employee_request'
33
34
  require 'merge_hris_client/models/employment'
35
+ require 'merge_hris_client/models/employment_request'
34
36
  require 'merge_hris_client/models/employment_status_enum'
35
37
  require 'merge_hris_client/models/employment_type_enum'
36
- require 'merge_hris_client/models/end_user_details'
37
38
  require 'merge_hris_client/models/end_user_details_request'
38
39
  require 'merge_hris_client/models/ethnicity_enum'
39
40
  require 'merge_hris_client/models/flsa_status_enum'
40
41
  require 'merge_hris_client/models/gender_enum'
41
42
  require 'merge_hris_client/models/generate_remote_key_request'
43
+ require 'merge_hris_client/models/issue'
44
+ require 'merge_hris_client/models/issue_status_enum'
42
45
  require 'merge_hris_client/models/link_token'
43
46
  require 'merge_hris_client/models/location'
44
47
  require 'merge_hris_client/models/marital_status_enum'
@@ -49,26 +52,31 @@ require 'merge_hris_client/models/paginated_company_list'
49
52
  require 'merge_hris_client/models/paginated_employee_list'
50
53
  require 'merge_hris_client/models/paginated_employee_payroll_run_list'
51
54
  require 'merge_hris_client/models/paginated_employment_list'
55
+ require 'merge_hris_client/models/paginated_issue_list'
52
56
  require 'merge_hris_client/models/paginated_location_list'
53
57
  require 'merge_hris_client/models/paginated_payroll_run_list'
58
+ require 'merge_hris_client/models/paginated_sync_status_list'
54
59
  require 'merge_hris_client/models/paginated_team_list'
60
+ require 'merge_hris_client/models/paginated_time_off_balance_list'
55
61
  require 'merge_hris_client/models/paginated_time_off_list'
56
62
  require 'merge_hris_client/models/pay_currency_enum'
57
63
  require 'merge_hris_client/models/pay_frequency_enum'
58
64
  require 'merge_hris_client/models/pay_period_enum'
59
65
  require 'merge_hris_client/models/payroll_run'
60
66
  require 'merge_hris_client/models/remote_data'
67
+ require 'merge_hris_client/models/remote_data_request'
61
68
  require 'merge_hris_client/models/remote_key'
62
69
  require 'merge_hris_client/models/remote_key_for_regeneration_request'
63
70
  require 'merge_hris_client/models/remote_response'
64
71
  require 'merge_hris_client/models/request_type_enum'
65
72
  require 'merge_hris_client/models/run_state_enum'
66
73
  require 'merge_hris_client/models/run_type_enum'
67
- require 'merge_hris_client/models/state_enum'
68
74
  require 'merge_hris_client/models/sync_status'
75
+ require 'merge_hris_client/models/sync_status_status_enum'
69
76
  require 'merge_hris_client/models/tax'
70
77
  require 'merge_hris_client/models/team'
71
78
  require 'merge_hris_client/models/time_off'
79
+ require 'merge_hris_client/models/time_off_balance'
72
80
  require 'merge_hris_client/models/time_off_status_enum'
73
81
  require 'merge_hris_client/models/type_enum'
74
82
  require 'merge_hris_client/models/units_enum'
@@ -78,10 +86,12 @@ require 'merge_hris_client/api/account_token_api'
78
86
  require 'merge_hris_client/api/available_actions_api'
79
87
  require 'merge_hris_client/api/benefits_api'
80
88
  require 'merge_hris_client/api/companies_api'
89
+ require 'merge_hris_client/api/delete_account_api'
81
90
  require 'merge_hris_client/api/employee_payroll_runs_api'
82
91
  require 'merge_hris_client/api/employees_api'
83
92
  require 'merge_hris_client/api/employments_api'
84
93
  require 'merge_hris_client/api/generate_key_api'
94
+ require 'merge_hris_client/api/issues_api'
85
95
  require 'merge_hris_client/api/link_token_api'
86
96
  require 'merge_hris_client/api/locations_api'
87
97
  require 'merge_hris_client/api/passthrough_api'
@@ -90,6 +100,7 @@ require 'merge_hris_client/api/regenerate_key_api'
90
100
  require 'merge_hris_client/api/sync_status_api'
91
101
  require 'merge_hris_client/api/teams_api'
92
102
  require 'merge_hris_client/api/time_off_api'
103
+ require 'merge_hris_client/api/time_off_balance_api'
93
104
 
94
105
  module MergeHRISClient
95
106
  class << self
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -19,6 +19,75 @@ module MergeHRISClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Creates a `Benefit` object with the given values.
23
+ # @param x_account_token [String] Token identifying the end user.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
26
+ # @option opts [BenefitRequest] :benefit_request
27
+ # @return [Benefit]
28
+ def benefits_create(x_account_token, opts = {})
29
+ data, _status_code, _headers = benefits_create_with_http_info(x_account_token, opts)
30
+ data
31
+ end
32
+
33
+ # Creates a &#x60;Benefit&#x60; object with the given values.
34
+ # @param x_account_token [String] Token identifying the end user.
35
+ # @param [Hash] opts the optional parameters
36
+ # @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
37
+ # @option opts [BenefitRequest] :benefit_request
38
+ # @return [Array<(Benefit, Integer, Hash)>] Benefit data, response status code and response headers
39
+ def benefits_create_with_http_info(x_account_token, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: BenefitsApi.benefits_create ...'
42
+ end
43
+ # verify the required parameter 'x_account_token' is set
44
+ if @api_client.config.client_side_validation && x_account_token.nil?
45
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling BenefitsApi.benefits_create"
46
+ end
47
+ # resource path
48
+ local_var_path = '/benefits'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+ query_params[:'run_async'] = opts[:'run_async'] if !opts[:'run_async'].nil?
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+ # HTTP header 'Content-Type'
59
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
60
+ header_params[:'X-Account-Token'] = x_account_token
61
+
62
+ # form parameters
63
+ form_params = opts[:form_params] || {}
64
+
65
+ # http body (model)
66
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'benefit_request'])
67
+
68
+ # return_type
69
+ return_type = opts[:debug_return_type] || 'Benefit'
70
+
71
+ # auth_names
72
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
73
+
74
+ new_options = opts.merge(
75
+ :operation => :"BenefitsApi.benefits_create",
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => return_type
82
+ )
83
+
84
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: BenefitsApi#benefits_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
22
91
  # Returns a list of `Benefit` objects.
23
92
  # @param x_account_token [String] Token identifying the end user.
24
93
  # @param [Hash] opts the optional parameters
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -0,0 +1,82 @@
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 DeleteAccountApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a linked account.
23
+ # @param x_account_token [String] Token identifying the end user.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [nil]
26
+ def delete_account_create(x_account_token, opts = {})
27
+ delete_account_create_with_http_info(x_account_token, opts)
28
+ nil
29
+ end
30
+
31
+ # Delete a linked account.
32
+ # @param x_account_token [String] Token identifying the end user.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
35
+ def delete_account_create_with_http_info(x_account_token, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: DeleteAccountApi.delete_account_create ...'
38
+ end
39
+ # verify the required parameter 'x_account_token' is set
40
+ if @api_client.config.client_side_validation && x_account_token.nil?
41
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling DeleteAccountApi.delete_account_create"
42
+ end
43
+ # resource path
44
+ local_var_path = '/delete-account'
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ header_params[:'X-Account-Token'] = x_account_token
52
+
53
+ # form parameters
54
+ form_params = opts[:form_params] || {}
55
+
56
+ # http body (model)
57
+ post_body = opts[:debug_body]
58
+
59
+ # return_type
60
+ return_type = opts[:debug_return_type]
61
+
62
+ # auth_names
63
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
64
+
65
+ new_options = opts.merge(
66
+ :operation => :"DeleteAccountApi.delete_account_create",
67
+ :header_params => header_params,
68
+ :query_params => query_params,
69
+ :form_params => form_params,
70
+ :body => post_body,
71
+ :auth_names => auth_names,
72
+ :return_type => return_type
73
+ )
74
+
75
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
76
+ if @api_client.config.debugging
77
+ @api_client.config.logger.debug "API called: DeleteAccountApi#delete_account_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
+ end
79
+ return data, status_code, headers
80
+ end
81
+ end
82
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -19,6 +19,75 @@ module MergeHRISClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Creates an `Employee` object with the given values.
23
+ # @param x_account_token [String] Token identifying the end user.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
26
+ # @option opts [EmployeeRequest] :employee_request
27
+ # @return [Employee]
28
+ def employees_create(x_account_token, opts = {})
29
+ data, _status_code, _headers = employees_create_with_http_info(x_account_token, opts)
30
+ data
31
+ end
32
+
33
+ # Creates an &#x60;Employee&#x60; object with the given values.
34
+ # @param x_account_token [String] Token identifying the end user.
35
+ # @param [Hash] opts the optional parameters
36
+ # @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
37
+ # @option opts [EmployeeRequest] :employee_request
38
+ # @return [Array<(Employee, Integer, Hash)>] Employee data, response status code and response headers
39
+ def employees_create_with_http_info(x_account_token, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: EmployeesApi.employees_create ...'
42
+ end
43
+ # verify the required parameter 'x_account_token' is set
44
+ if @api_client.config.client_side_validation && x_account_token.nil?
45
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling EmployeesApi.employees_create"
46
+ end
47
+ # resource path
48
+ local_var_path = '/employees'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+ query_params[:'run_async'] = opts[:'run_async'] if !opts[:'run_async'].nil?
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+ # HTTP header 'Content-Type'
59
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
60
+ header_params[:'X-Account-Token'] = x_account_token
61
+
62
+ # form parameters
63
+ form_params = opts[:form_params] || {}
64
+
65
+ # http body (model)
66
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'employee_request'])
67
+
68
+ # return_type
69
+ return_type = opts[:debug_return_type] || 'Employee'
70
+
71
+ # auth_names
72
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
73
+
74
+ new_options = opts.merge(
75
+ :operation => :"EmployeesApi.employees_create",
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => return_type
82
+ )
83
+
84
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: EmployeesApi#employees_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
22
91
  # Returns a list of `Employee` objects.
23
92
  # @param x_account_token [String] Token identifying the end user.
24
93
  # @param [Hash] opts the optional parameters
@@ -28,6 +97,7 @@ module MergeHRISClient
28
97
  # @option opts [String] :cursor The pagination cursor value.
29
98
  # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
30
99
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
100
+ # @option opts [Boolean] :include_sensitive_fields Whether to include sensetive fields (such as social security numbers) in the response.
31
101
  # @option opts [String] :manager_id If provided, will only return employees for this manager.
32
102
  # @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
33
103
  # @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
@@ -50,6 +120,7 @@ module MergeHRISClient
50
120
  # @option opts [String] :cursor The pagination cursor value.
51
121
  # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
52
122
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
123
+ # @option opts [Boolean] :include_sensitive_fields Whether to include sensetive fields (such as social security numbers) in the response.
53
124
  # @option opts [String] :manager_id If provided, will only return employees for this manager.
54
125
  # @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
55
126
  # @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
@@ -81,6 +152,7 @@ module MergeHRISClient
81
152
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
82
153
  query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
83
154
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
155
+ query_params[:'include_sensitive_fields'] = opts[:'include_sensitive_fields'] if !opts[:'include_sensitive_fields'].nil?
84
156
  query_params[:'manager_id'] = opts[:'manager_id'] if !opts[:'manager_id'].nil?
85
157
  query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
86
158
  query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
@@ -130,6 +202,7 @@ module MergeHRISClient
130
202
  # @param [Hash] opts the optional parameters
131
203
  # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
132
204
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
205
+ # @option opts [Boolean] :include_sensitive_fields Whether to include sensetive fields (such as social security numbers) in the response.
133
206
  # @return [Employee]
134
207
  def employees_retrieve(x_account_token, id, opts = {})
135
208
  data, _status_code, _headers = employees_retrieve_with_http_info(x_account_token, id, opts)
@@ -142,6 +215,7 @@ module MergeHRISClient
142
215
  # @param [Hash] opts the optional parameters
143
216
  # @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
144
217
  # @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
218
+ # @option opts [Boolean] :include_sensitive_fields Whether to include sensetive fields (such as social security numbers) in the response.
145
219
  # @return [Array<(Employee, Integer, Hash)>] Employee data, response status code and response headers
146
220
  def employees_retrieve_with_http_info(x_account_token, id, opts = {})
147
221
  if @api_client.config.debugging
@@ -166,6 +240,7 @@ module MergeHRISClient
166
240
  query_params = opts[:query_params] || {}
167
241
  query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
168
242
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
243
+ query_params[:'include_sensitive_fields'] = opts[:'include_sensitive_fields'] if !opts[:'include_sensitive_fields'].nil?
169
244
 
170
245
  # header parameters
171
246
  header_params = opts[:header_params] || {}
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: hello@merge.dev
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.1.1
10
10
 
11
11
  =end
12
12
 
@@ -19,6 +19,75 @@ module MergeHRISClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Creates an `Employment` object with the given values.
23
+ # @param x_account_token [String] Token identifying the end user.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
26
+ # @option opts [EmploymentRequest] :employment_request
27
+ # @return [Employment]
28
+ def employments_create(x_account_token, opts = {})
29
+ data, _status_code, _headers = employments_create_with_http_info(x_account_token, opts)
30
+ data
31
+ end
32
+
33
+ # Creates an &#x60;Employment&#x60; object with the given values.
34
+ # @param x_account_token [String] Token identifying the end user.
35
+ # @param [Hash] opts the optional parameters
36
+ # @option opts [Boolean] :run_async Whether or not third-party updates should be run asynchronously.
37
+ # @option opts [EmploymentRequest] :employment_request
38
+ # @return [Array<(Employment, Integer, Hash)>] Employment data, response status code and response headers
39
+ def employments_create_with_http_info(x_account_token, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: EmploymentsApi.employments_create ...'
42
+ end
43
+ # verify the required parameter 'x_account_token' is set
44
+ if @api_client.config.client_side_validation && x_account_token.nil?
45
+ fail ArgumentError, "Missing the required parameter 'x_account_token' when calling EmploymentsApi.employments_create"
46
+ end
47
+ # resource path
48
+ local_var_path = '/employments'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+ query_params[:'run_async'] = opts[:'run_async'] if !opts[:'run_async'].nil?
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+ # HTTP header 'Content-Type'
59
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
60
+ header_params[:'X-Account-Token'] = x_account_token
61
+
62
+ # form parameters
63
+ form_params = opts[:form_params] || {}
64
+
65
+ # http body (model)
66
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'employment_request'])
67
+
68
+ # return_type
69
+ return_type = opts[:debug_return_type] || 'Employment'
70
+
71
+ # auth_names
72
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
73
+
74
+ new_options = opts.merge(
75
+ :operation => :"EmploymentsApi.employments_create",
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => return_type
82
+ )
83
+
84
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: EmploymentsApi#employments_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
22
91
  # Returns a list of `Employment` objects.
23
92
  # @param x_account_token [String] Token identifying the end user.
24
93
  # @param [Hash] opts the optional parameters