gusto_embedded_client 0.2.7 → 0.2.8

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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gusto_embedded/client.rb +2 -1
  3. data/lib/gusto_embedded/companies_suspensions.rb +132 -0
  4. data/lib/gusto_embedded/models/operations/answers.rb +2 -2
  5. data/lib/gusto_embedded/models/operations/get_companies_company_uuid_suspensions_request.rb +27 -0
  6. data/lib/gusto_embedded/models/operations/get_companies_company_uuid_suspensions_response.rb +33 -0
  7. data/lib/gusto_embedded/models/operations/get_v1_companies_company_id_pay_schedules_pay_schedule_id_response.rb +4 -4
  8. data/lib/gusto_embedded/models/operations/get_v1_companies_company_id_pay_schedules_response.rb +2 -2
  9. data/lib/gusto_embedded/models/operations/leaving_for.rb +37 -0
  10. data/lib/gusto_embedded/models/operations/post_companies_company_uuid_suspensions_request.rb +30 -0
  11. data/lib/gusto_embedded/models/operations/post_companies_company_uuid_suspensions_requestbody.rb +43 -0
  12. data/lib/gusto_embedded/models/operations/post_companies_company_uuid_suspensions_response.rb +39 -0
  13. data/lib/gusto_embedded/models/operations/put_v1_companies_company_id_payrolls_requestbody.rb +11 -2
  14. data/lib/gusto_embedded/models/operations/put_v1_companies_company_id_payrolls_withholding_pay_period.rb +23 -0
  15. data/lib/gusto_embedded/models/operations/reason.rb +25 -0
  16. data/lib/gusto_embedded/models/operations/reconcile_tax_method.rb +18 -0
  17. data/lib/gusto_embedded/models/operations.rb +9 -0
  18. data/lib/gusto_embedded/models/shared/company_suspension.rb +57 -0
  19. data/lib/gusto_embedded/models/shared/{pay_schedule.rb → pay_schedule_list.rb} +6 -3
  20. data/lib/gusto_embedded/models/shared/pay_schedule_object.rb +54 -0
  21. data/lib/gusto_embedded/models/shared/reconcile_tax_method.rb +18 -0
  22. data/lib/gusto_embedded/models/shared/tax_refunds.rb +29 -0
  23. data/lib/gusto_embedded/models/shared.rb +5 -1
  24. data/lib/gusto_embedded/payschedules.rb +3 -3
  25. data/lib/gusto_embedded/sdkconfiguration.rb +2 -2
  26. data/lib/gusto_embedded/signatories.rb +1 -1
  27. data/lib/gusto_embedded_client.rb +1 -0
  28. metadata +17 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b1f96dfb5e07ffec42f81e655a4556aabc7ef9009bbf2d4816d7ca744546ef1
4
- data.tar.gz: 712a4e3e64565dd960046d989c5bbd8eefd8440f0c3aa64446bdaa7d511658b1
3
+ metadata.gz: d18abfae5a9ff03db895acd4ddfaf538485ddb2c27df38133cabc601e04d75ba
4
+ data.tar.gz: fdbca74343ad429c873536395489c49e68314aabd7eb7406c7a99bac1ce216b6
5
5
  SHA512:
6
- metadata.gz: ab5b0aed246e607fbe8278f1f03ce3d25fc4e676fb9db3cd7430368ab079c261edba393cbf24c628bdf0bb8897c52e2643e8e814e46ee10f43130e6579a7ddb0
7
- data.tar.gz: d08656092dab8db8f3d717c7527969ef160f07efe5efabdce3280e12ed8ef95bd67b3685a4ff12d5bb7cbc63221acb5b365e4b9aee0ebf8cbb3266a26df328a8
6
+ metadata.gz: b750abc7dfda27e98aa53edad8cd3bb6dc933e6c8c309c594707d6ca507ac4c5f567ca0b2b527e072fc812e7f18148e0df816b17005a0565a2d00e610d108809
7
+ data.tar.gz: 7f9aec71c1a5fa3c98d447d420d2aeb7e88062a998dd45cb22dcdec0e7545abaeace1b5a5b0f3567fc7eb418ff8dff4d29c20d3b5865095e4a18b3ccf1cb8fac
@@ -13,7 +13,7 @@ module GustoEmbedded
13
13
  class Client
14
14
  extend T::Sig
15
15
 
16
- attr_accessor :introspection, :companies, :invoices, :company_attachments, :company_attachment, :federal_tax_details, :industry_selection, :signatories, :flows, :locations, :bank_accounts, :external_payrolls, :payment_configs, :pay_schedules, :employees, :historical_employees, :departments, :employee_employments, :employee_addresses, :employee_tax_setup, :employee_payment_method, :employee_payment_methods, :jobs_and_compensations, :earning_types, :contractors, :contractor_payment_methods, :contractor_payment_method, :webhooks, :contractor_forms, :contractor_documents, :employee_forms, :payrolls, :time_off_policies, :contractor_payments, :contractor_payment_groups, :company_forms, :generated_documents, :reports, :company_benefits, :employee_benefits, :garnishments, :i9_verification, :tax_requirements, :holiday_pay_policies, :notifications, :events, :recovery_cases, :ach_transactions, :wire_in_requests
16
+ attr_accessor :introspection, :companies, :invoices, :company_attachments, :company_attachment, :federal_tax_details, :industry_selection, :signatories, :flows, :locations, :bank_accounts, :external_payrolls, :payment_configs, :pay_schedules, :employees, :historical_employees, :departments, :employee_employments, :employee_addresses, :employee_tax_setup, :employee_payment_method, :employee_payment_methods, :jobs_and_compensations, :earning_types, :contractors, :contractor_payment_methods, :contractor_payment_method, :webhooks, :contractor_forms, :contractor_documents, :employee_forms, :payrolls, :time_off_policies, :contractor_payments, :contractor_payment_groups, :company_forms, :generated_documents, :reports, :company_benefits, :employee_benefits, :garnishments, :i9_verification, :tax_requirements, :companies_suspensions, :holiday_pay_policies, :notifications, :events, :recovery_cases, :ach_transactions, :wire_in_requests
17
17
 
18
18
  sig do
19
19
  params(
@@ -105,6 +105,7 @@ module GustoEmbedded
105
105
  @garnishments = Garnishments.new(@sdk_configuration)
106
106
  @i9_verification = I9Verification.new(@sdk_configuration)
107
107
  @tax_requirements = TaxRequirements.new(@sdk_configuration)
108
+ @companies_suspensions = CompaniesSuspensions.new(@sdk_configuration)
108
109
  @holiday_pay_policies = HolidayPayPolicies.new(@sdk_configuration)
109
110
  @notifications = Notifications.new(@sdk_configuration)
110
111
  @events = Events.new(@sdk_configuration)
@@ -0,0 +1,132 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+ require 'faraday'
7
+ require 'faraday/multipart'
8
+ require 'sorbet-runtime'
9
+
10
+ module GustoEmbedded
11
+ extend T::Sig
12
+ class CompaniesSuspensions
13
+ extend T::Sig
14
+
15
+
16
+ sig { params(sdk_config: SDKConfiguration).void }
17
+ def initialize(sdk_config)
18
+ @sdk_configuration = sdk_config
19
+ end
20
+
21
+
22
+ sig { params(company_uuid: ::String, x_gusto_api_version: T.nilable(::GustoEmbedded::Shared::VersionHeader)).returns(::GustoEmbedded::Operations::GetCompaniesCompanyUuidSuspensionsResponse) }
23
+ def get(company_uuid, x_gusto_api_version = nil)
24
+ # get - Get suspensions for this company
25
+ # Get existing suspension records for this company. A company may have multiple suspension records if they have suspended their Gusto account more than once.
26
+ #
27
+ # > 📘 To check if company is already suspended
28
+ # >
29
+ # > To determine if a company is _currently_ suspended, use the `is_suspended` and `company_status` fields in the [Get a company](https://docs.gusto.com/embedded-payroll/reference/get-v1-companies) endpoint.
30
+ #
31
+ # scope: `company_suspensions:read`
32
+ request = ::GustoEmbedded::Operations::GetCompaniesCompanyUuidSuspensionsRequest.new(
33
+
34
+ company_uuid: company_uuid,
35
+ x_gusto_api_version: x_gusto_api_version
36
+ )
37
+ url, params = @sdk_configuration.get_server_details
38
+ base_url = Utils.template_url(url, params)
39
+ url = Utils.generate_url(
40
+ ::GustoEmbedded::Operations::GetCompaniesCompanyUuidSuspensionsRequest,
41
+ base_url,
42
+ '/v1/companies/{company_uuid}/suspensions',
43
+ request
44
+ )
45
+ headers = Utils.get_headers(request)
46
+ headers['Accept'] = 'application/json'
47
+ headers['user-agent'] = @sdk_configuration.user_agent
48
+
49
+ r = @sdk_configuration.client.get(url) do |req|
50
+ req.headers = headers
51
+ security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
52
+ Utils.configure_request_security(req, security) if !security.nil?
53
+ end
54
+
55
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
56
+
57
+ res = ::GustoEmbedded::Operations::GetCompaniesCompanyUuidSuspensionsResponse.new(
58
+ status_code: r.status, content_type: content_type, raw_response: r
59
+ )
60
+ if r.status == 200
61
+ if Utils.match_content_type(content_type, 'application/json')
62
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), T::Array[::GustoEmbedded::Shared::CompanySuspension])
63
+ res.company_suspension_list = out
64
+ end
65
+ elsif r.status == 404
66
+ end
67
+
68
+ res
69
+ end
70
+
71
+
72
+ sig { params(company_uuid: ::String, request_body: ::GustoEmbedded::Operations::PostCompaniesCompanyUuidSuspensionsRequestBody, x_gusto_api_version: T.nilable(::GustoEmbedded::Shared::VersionHeader)).returns(::GustoEmbedded::Operations::PostCompaniesCompanyUuidSuspensionsResponse) }
73
+ def suspend(company_uuid, request_body, x_gusto_api_version = nil)
74
+ # suspend - Suspend a company's account
75
+ # Use this endpoint to suspend a company. After suspension, company will no longer be able to run payroll but will retain access to their information, such as retrieving employee info or retrieving past payrolls.
76
+ #
77
+ # scope: `company_suspensions:write`
78
+ request = ::GustoEmbedded::Operations::PostCompaniesCompanyUuidSuspensionsRequest.new(
79
+
80
+ company_uuid: company_uuid,
81
+ request_body: request_body,
82
+ x_gusto_api_version: x_gusto_api_version
83
+ )
84
+ url, params = @sdk_configuration.get_server_details
85
+ base_url = Utils.template_url(url, params)
86
+ url = Utils.generate_url(
87
+ ::GustoEmbedded::Operations::PostCompaniesCompanyUuidSuspensionsRequest,
88
+ base_url,
89
+ '/v1/companies/{company_uuid}/suspensions',
90
+ request
91
+ )
92
+ headers = Utils.get_headers(request)
93
+ req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json)
94
+ headers['content-type'] = req_content_type
95
+ raise StandardError, 'request body is required' if data.nil? && form.nil?
96
+ headers['Accept'] = 'application/json'
97
+ headers['user-agent'] = @sdk_configuration.user_agent
98
+
99
+ r = @sdk_configuration.client.post(url) do |req|
100
+ req.headers = headers
101
+ security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
102
+ Utils.configure_request_security(req, security) if !security.nil?
103
+ if form
104
+ req.body = Utils.encode_form(form)
105
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
106
+ req.body = URI.encode_www_form(data)
107
+ else
108
+ req.body = data
109
+ end
110
+ end
111
+
112
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
113
+
114
+ res = ::GustoEmbedded::Operations::PostCompaniesCompanyUuidSuspensionsResponse.new(
115
+ status_code: r.status, content_type: content_type, raw_response: r
116
+ )
117
+ if r.status == 200
118
+ if Utils.match_content_type(content_type, 'application/json')
119
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::GustoEmbedded::Shared::CompanySuspension)
120
+ res.company_suspension = out
121
+ end
122
+ elsif r.status == 422
123
+ if Utils.match_content_type(content_type, 'application/json')
124
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::GustoEmbedded::Shared::UnprocessableEntityErrorObject)
125
+ res.unprocessable_entity_error_object = out
126
+ end
127
+ end
128
+
129
+ res
130
+ end
131
+ end
132
+ end
@@ -14,12 +14,12 @@ module GustoEmbedded
14
14
 
15
15
  field :valid_from, ::String, { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('valid_from') } }
16
16
 
17
- field :value, ::String, { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('value') } }
17
+ field :value, ::Object, { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('value') } }
18
18
 
19
19
  field :valid_up_to, T.nilable(::Object), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('valid_up_to') } }
20
20
 
21
21
 
22
- sig { params(valid_from: ::String, value: ::String, valid_up_to: T.nilable(::Object)).void }
22
+ sig { params(valid_from: ::String, value: ::Object, valid_up_to: T.nilable(::Object)).void }
23
23
  def initialize(valid_from: nil, value: nil, valid_up_to: nil)
24
24
  @valid_from = valid_from
25
25
  @value = value
@@ -0,0 +1,27 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Operations
9
+
10
+
11
+ class GetCompaniesCompanyUuidSuspensionsRequest < ::Crystalline::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The UUID of the company
15
+ field :company_uuid, ::String, { 'path_param': { 'field_name': 'company_uuid', 'style': 'simple', 'explode': false } }
16
+ # Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.
17
+ field :x_gusto_api_version, T.nilable(::GustoEmbedded::Shared::VersionHeader), { 'header': { 'field_name': 'X-Gusto-API-Version', 'style': 'simple', 'explode': false } }
18
+
19
+
20
+ sig { params(company_uuid: ::String, x_gusto_api_version: T.nilable(::GustoEmbedded::Shared::VersionHeader)).void }
21
+ def initialize(company_uuid: nil, x_gusto_api_version: nil)
22
+ @company_uuid = company_uuid
23
+ @x_gusto_api_version = x_gusto_api_version
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,33 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Operations
9
+
10
+
11
+ class GetCompaniesCompanyUuidSuspensionsResponse < ::Crystalline::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # HTTP response content type for this operation
15
+ field :content_type, ::String
16
+ # Raw HTTP response; suitable for custom response parsing
17
+ field :raw_response, ::Faraday::Response
18
+ # HTTP response status code for this operation
19
+ field :status_code, ::Integer
20
+ # Example response
21
+ field :company_suspension_list, T.nilable(T::Array[::GustoEmbedded::Shared::CompanySuspension])
22
+
23
+
24
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, company_suspension_list: T.nilable(T::Array[::GustoEmbedded::Shared::CompanySuspension])).void }
25
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, company_suspension_list: nil)
26
+ @content_type = content_type
27
+ @raw_response = raw_response
28
+ @status_code = status_code
29
+ @company_suspension_list = company_suspension_list
30
+ end
31
+ end
32
+ end
33
+ end
@@ -18,15 +18,15 @@ module GustoEmbedded
18
18
  # HTTP response status code for this operation
19
19
  field :status_code, ::Integer
20
20
  # Example response
21
- field :pay_schedule, T.nilable(::GustoEmbedded::Shared::PaySchedule)
21
+ field :pay_schedule_object, T.nilable(::GustoEmbedded::Shared::PayScheduleObject)
22
22
 
23
23
 
24
- sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, pay_schedule: T.nilable(::GustoEmbedded::Shared::PaySchedule)).void }
25
- def initialize(content_type: nil, raw_response: nil, status_code: nil, pay_schedule: nil)
24
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, pay_schedule_object: T.nilable(::GustoEmbedded::Shared::PayScheduleObject)).void }
25
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, pay_schedule_object: nil)
26
26
  @content_type = content_type
27
27
  @raw_response = raw_response
28
28
  @status_code = status_code
29
- @pay_schedule = pay_schedule
29
+ @pay_schedule_object = pay_schedule_object
30
30
  end
31
31
  end
32
32
  end
@@ -18,10 +18,10 @@ module GustoEmbedded
18
18
  # HTTP response status code for this operation
19
19
  field :status_code, ::Integer
20
20
  # Example response
21
- field :pay_schedule_list, T.nilable(T::Array[::GustoEmbedded::Shared::PaySchedule])
21
+ field :pay_schedule_list, T.nilable(T::Array[::GustoEmbedded::Shared::PayScheduleList])
22
22
 
23
23
 
24
- sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, pay_schedule_list: T.nilable(T::Array[::GustoEmbedded::Shared::PaySchedule])).void }
24
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, pay_schedule_list: T.nilable(T::Array[::GustoEmbedded::Shared::PayScheduleList])).void }
25
25
  def initialize(content_type: nil, raw_response: nil, status_code: nil, pay_schedule_list: nil)
26
26
  @content_type = content_type
27
27
  @raw_response = raw_response
@@ -0,0 +1,37 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Operations
9
+
10
+ # LeavingFor - Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`.
11
+ class LeavingFor < T::Enum
12
+ enums do
13
+ APD = new('apd')
14
+ ADP_TOTAL_SOURCE = new('adp_total_source')
15
+ ACCOUNTANT = new('accountant')
16
+ BAMBOO_HR = new('bamboo_hr')
17
+ BANK_OR_FINANCIAL_INSTITUTION = new('bank_or_financial_institution')
18
+ CHECK = new('check')
19
+ INSPERITY = new('insperity')
20
+ INTUIT_OR_QUICKBOOKS = new('intuit_or_quickbooks')
21
+ JUSTWORKS = new('justworks')
22
+ MANUAL = new('manual')
23
+ NAMELY = new('namely')
24
+ ONPAY = new('onpay')
25
+ OTHER = new('other')
26
+ PATRIOT = new('patriot')
27
+ PAYCOM = new('paycom')
28
+ PAYLOCITY = new('paylocity')
29
+ RIPPLING = new('rippling')
30
+ SQUARE = new('square')
31
+ SUREPAYROLL = new('surepayroll')
32
+ TRINET = new('trinet')
33
+ ZENEFITS = new('zenefits')
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,30 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Operations
9
+
10
+
11
+ class PostCompaniesCompanyUuidSuspensionsRequest < ::Crystalline::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The UUID of the company
15
+ field :company_uuid, ::String, { 'path_param': { 'field_name': 'company_uuid', 'style': 'simple', 'explode': false } }
16
+
17
+ field :request_body, ::GustoEmbedded::Operations::PostCompaniesCompanyUuidSuspensionsRequestBody, { 'request': { 'media_type': 'application/json' } }
18
+ # Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used.
19
+ field :x_gusto_api_version, T.nilable(::GustoEmbedded::Shared::VersionHeader), { 'header': { 'field_name': 'X-Gusto-API-Version', 'style': 'simple', 'explode': false } }
20
+
21
+
22
+ sig { params(company_uuid: ::String, request_body: ::GustoEmbedded::Operations::PostCompaniesCompanyUuidSuspensionsRequestBody, x_gusto_api_version: T.nilable(::GustoEmbedded::Shared::VersionHeader)).void }
23
+ def initialize(company_uuid: nil, request_body: nil, x_gusto_api_version: nil)
24
+ @company_uuid = company_uuid
25
+ @request_body = request_body
26
+ @x_gusto_api_version = x_gusto_api_version
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,43 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Operations
9
+
10
+
11
+ class PostCompaniesCompanyUuidSuspensionsRequestBody < ::Crystalline::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled.
15
+ field :file_quarterly_forms, T::Boolean, { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('file_quarterly_forms') } }
16
+ # Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company is suspending their account, and how taxes are being reconciled.
17
+ field :file_yearly_forms, T::Boolean, { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('file_yearly_forms') } }
18
+ # Explanation for why the company is suspending their account.
19
+ #
20
+ # > 🚧 FEIN or entity type changes require Customer Support
21
+ # >
22
+ # > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time.
23
+ field :reason, ::GustoEmbedded::Operations::Reason, { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('reason'), 'decoder': Utils.enum_from_string(::GustoEmbedded::Operations::Reason, false) } }
24
+ # How Gusto will handle taxes already collected.
25
+ field :reconcile_tax_method, ::GustoEmbedded::Operations::ReconcileTaxMethod, { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('reconcile_tax_method'), 'decoder': Utils.enum_from_string(::GustoEmbedded::Operations::ReconcileTaxMethod, false) } }
26
+ # User-supplied comments describing why they are suspending their account.
27
+ field :comments, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('comments') } }
28
+ # Which competitor the company is joining instead. Required if `reason` is `'switching_provider'`.
29
+ field :leaving_for, T.nilable(::GustoEmbedded::Operations::LeavingFor), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('leaving_for'), 'decoder': Utils.enum_from_string(::GustoEmbedded::Operations::LeavingFor, true) } }
30
+
31
+
32
+ sig { params(file_quarterly_forms: T::Boolean, file_yearly_forms: T::Boolean, reason: ::GustoEmbedded::Operations::Reason, reconcile_tax_method: ::GustoEmbedded::Operations::ReconcileTaxMethod, comments: T.nilable(::String), leaving_for: T.nilable(::GustoEmbedded::Operations::LeavingFor)).void }
33
+ def initialize(file_quarterly_forms: nil, file_yearly_forms: nil, reason: nil, reconcile_tax_method: nil, comments: nil, leaving_for: nil)
34
+ @file_quarterly_forms = file_quarterly_forms
35
+ @file_yearly_forms = file_yearly_forms
36
+ @reason = reason
37
+ @reconcile_tax_method = reconcile_tax_method
38
+ @comments = comments
39
+ @leaving_for = leaving_for
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,39 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Operations
9
+
10
+
11
+ class PostCompaniesCompanyUuidSuspensionsResponse < ::Crystalline::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # HTTP response content type for this operation
15
+ field :content_type, ::String
16
+ # Raw HTTP response; suitable for custom response parsing
17
+ field :raw_response, ::Faraday::Response
18
+ # HTTP response status code for this operation
19
+ field :status_code, ::Integer
20
+ # Example response
21
+ field :company_suspension, T.nilable(::GustoEmbedded::Shared::CompanySuspension)
22
+ # Unprocessable Entity
23
+ #
24
+ # This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details.
25
+ #
26
+ field :unprocessable_entity_error_object, T.nilable(::GustoEmbedded::Shared::UnprocessableEntityErrorObject)
27
+
28
+
29
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, company_suspension: T.nilable(::GustoEmbedded::Shared::CompanySuspension), unprocessable_entity_error_object: T.nilable(::GustoEmbedded::Shared::UnprocessableEntityErrorObject)).void }
30
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, company_suspension: nil, unprocessable_entity_error_object: nil)
31
+ @content_type = content_type
32
+ @raw_response = raw_response
33
+ @status_code = status_code
34
+ @company_suspension = company_suspension
35
+ @unprocessable_entity_error_object = unprocessable_entity_error_object
36
+ end
37
+ end
38
+ end
39
+ end
@@ -13,11 +13,20 @@ module GustoEmbedded
13
13
 
14
14
 
15
15
  field :employee_compensations, T::Array[::GustoEmbedded::Operations::EmployeeCompensations], { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('employee_compensations') } }
16
+ # Enable taxes to be withheld at the IRS's required rate of 22% for federal income taxes. State income taxes will be taxed at the state's supplemental tax rate. Otherwise, we'll sum the entirety of the employee's wages and withhold taxes on the entire amount at the rate for regular wages. Only relevant for off-cycle payrolls.
17
+ field :fixed_withholding_rate, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('fixed_withholding_rate') } }
18
+ # Block regular deductions and contributions for this payroll. Only relevant for off-cycle payrolls.
19
+ field :skip_regular_deductions, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('skip_regular_deductions') } }
20
+ # The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.
21
+ field :withholding_pay_period, T.nilable(::GustoEmbedded::Operations::PutV1CompaniesCompanyIdPayrollsWithholdingPayPeriod), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('withholding_pay_period'), 'decoder': Utils.enum_from_string(::GustoEmbedded::Operations::PutV1CompaniesCompanyIdPayrollsWithholdingPayPeriod, true) } }
16
22
 
17
23
 
18
- sig { params(employee_compensations: T::Array[::GustoEmbedded::Operations::EmployeeCompensations]).void }
19
- def initialize(employee_compensations: nil)
24
+ sig { params(employee_compensations: T::Array[::GustoEmbedded::Operations::EmployeeCompensations], fixed_withholding_rate: T.nilable(T::Boolean), skip_regular_deductions: T.nilable(T::Boolean), withholding_pay_period: T.nilable(::GustoEmbedded::Operations::PutV1CompaniesCompanyIdPayrollsWithholdingPayPeriod)).void }
25
+ def initialize(employee_compensations: nil, fixed_withholding_rate: nil, skip_regular_deductions: nil, withholding_pay_period: nil)
20
26
  @employee_compensations = employee_compensations
27
+ @fixed_withholding_rate = fixed_withholding_rate
28
+ @skip_regular_deductions = skip_regular_deductions
29
+ @withholding_pay_period = withholding_pay_period
21
30
  end
22
31
  end
23
32
  end
@@ -0,0 +1,23 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Operations
9
+
10
+ # PutV1CompaniesCompanyIdPayrollsWithholdingPayPeriod - The payment schedule tax rate the payroll is based on. Only relevant for off-cycle payrolls.
11
+ class PutV1CompaniesCompanyIdPayrollsWithholdingPayPeriod < T::Enum
12
+ enums do
13
+ EVERY_WEEK = new('Every week')
14
+ EVERY_OTHER_WEEK = new('Every other week')
15
+ TWICE_PER_MONTH = new('Twice per month')
16
+ MONTHLY = new('Monthly')
17
+ QUARTERLY = new('Quarterly')
18
+ SEMIANNUALLY = new('Semiannually')
19
+ ANNUALLY = new('Annually')
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,25 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Operations
9
+
10
+ # Reason - Explanation for why the company is suspending their account.
11
+ #
12
+ # > 🚧 FEIN or entity type changes require Customer Support
13
+ # >
14
+ # > If a company is switching FEIN or changing their entity type, this change must be performed by Gusto Customer Support and cannot be performed via the API at this time.
15
+ class Reason < T::Enum
16
+ enums do
17
+ SWITCHING_PROVIDER = new('switching_provider')
18
+ SHUTTING_DOWN = new('shutting_down')
19
+ ACQUIRED = new('acquired')
20
+ NO_MORE_EMPLOYEES = new('no_more_employees')
21
+ CHANGING_EIN_OR_ENTITY_TYPE = new('changing_ein_or_entity_type')
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,18 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Operations
9
+
10
+ # ReconcileTaxMethod - How Gusto will handle taxes already collected.
11
+ class ReconcileTaxMethod < T::Enum
12
+ enums do
13
+ PAY_TAXES = new('pay_taxes')
14
+ REFUND_TAXES = new('refund_taxes')
15
+ end
16
+ end
17
+ end
18
+ end
@@ -475,6 +475,7 @@ module GustoEmbedded
475
475
  autoload :HourlyCompensations, 'gusto_embedded/models/operations/hourly_compensations.rb'
476
476
  autoload :PaidTimeOff, 'gusto_embedded/models/operations/paid_time_off.rb'
477
477
  autoload :EmployeeCompensations, 'gusto_embedded/models/operations/employee_compensations.rb'
478
+ autoload :PutV1CompaniesCompanyIdPayrollsWithholdingPayPeriod, 'gusto_embedded/models/operations/put_v1_companies_company_id_payrolls_withholding_pay_period.rb'
478
479
  autoload :PutV1CompaniesCompanyIdPayrollsRequestBody, 'gusto_embedded/models/operations/put_v1_companies_company_id_payrolls_requestbody.rb'
479
480
  autoload :PutV1CompaniesCompanyIdPayrollsRequest, 'gusto_embedded/models/operations/put_v1_companies_company_id_payrolls_request.rb'
480
481
  autoload :PutV1CompaniesCompanyIdPayrollsResponse, 'gusto_embedded/models/operations/put_v1_companies_company_id_payrolls_response.rb'
@@ -698,6 +699,14 @@ module GustoEmbedded
698
699
  autoload :GetV1CompaniesCompanyUuidTaxRequirementsRequest, 'gusto_embedded/models/operations/get_v1_companies_company_uuid_tax_requirements_request.rb'
699
700
  autoload :ResponseBody, 'gusto_embedded/models/operations/responsebody.rb'
700
701
  autoload :GetV1CompaniesCompanyUuidTaxRequirementsResponse, 'gusto_embedded/models/operations/get_v1_companies_company_uuid_tax_requirements_response.rb'
702
+ autoload :GetCompaniesCompanyUuidSuspensionsRequest, 'gusto_embedded/models/operations/get_companies_company_uuid_suspensions_request.rb'
703
+ autoload :GetCompaniesCompanyUuidSuspensionsResponse, 'gusto_embedded/models/operations/get_companies_company_uuid_suspensions_response.rb'
704
+ autoload :ReconcileTaxMethod, 'gusto_embedded/models/operations/reconcile_tax_method.rb'
705
+ autoload :Reason, 'gusto_embedded/models/operations/reason.rb'
706
+ autoload :LeavingFor, 'gusto_embedded/models/operations/leaving_for.rb'
707
+ autoload :PostCompaniesCompanyUuidSuspensionsRequestBody, 'gusto_embedded/models/operations/post_companies_company_uuid_suspensions_requestbody.rb'
708
+ autoload :PostCompaniesCompanyUuidSuspensionsRequest, 'gusto_embedded/models/operations/post_companies_company_uuid_suspensions_request.rb'
709
+ autoload :PostCompaniesCompanyUuidSuspensionsResponse, 'gusto_embedded/models/operations/post_companies_company_uuid_suspensions_response.rb'
701
710
  autoload :GetCompaniesCompanyUuidHolidayPayPolicyRequest, 'gusto_embedded/models/operations/get_companies_company_uuid_holiday_pay_policy_request.rb'
702
711
  autoload :GetCompaniesCompanyUuidHolidayPayPolicyResponse, 'gusto_embedded/models/operations/get_companies_company_uuid_holiday_pay_policy_response.rb'
703
712
  autoload :NewYearsDay, 'gusto_embedded/models/operations/new_years_day.rb'
@@ -0,0 +1,57 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Shared
9
+
10
+ # Record representing the suspension of a company's Gusto account.
11
+ class CompanySuspension < ::Crystalline::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # User-supplied comments describing why then are suspending their account.
15
+ field :comments, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('comments') } }
16
+ # Unique identifier for the company which is suspended.
17
+ field :company_uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('company_uuid') } }
18
+ # Date that the suspension took effect.
19
+ field :effective_date, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('effective_date') } }
20
+ # Should Gusto file quarterly tax forms on behalf of the company? The correct answer can depend on why the company
21
+ # is suspending their account, and how taxes are being reconciled.
22
+ #
23
+ field :file_quarterly_forms, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('file_quarterly_forms') } }
24
+ # Should Gusto file yearly tax forms on behalf of the company? The correct answer can depend on why the company
25
+ # is suspending their account, and how taxes are being reconciled.
26
+ #
27
+ field :file_yearly_forms, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('file_yearly_forms') } }
28
+ # Which competitor the company is joining instead. Only required if `reason` is `'switching_provider'`.
29
+ field :leaving_for, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('leaving_for') } }
30
+ # Explanation for why the company's account was suspended.
31
+ field :reason, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('reason') } }
32
+ # How Gusto will handle taxes already collected.
33
+ field :reconcile_tax_method, T.nilable(::GustoEmbedded::Shared::ReconcileTaxMethod), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('reconcile_tax_method'), 'decoder': Utils.enum_from_string(::GustoEmbedded::Shared::ReconcileTaxMethod, true) } }
34
+ # Describes the taxes which are refundable to the company for this suspension. These may be refunded, or paid
35
+ # by Gusto, depending on the value in `reconcile_tax_method`.
36
+ #
37
+ field :tax_refunds, T.nilable(::GustoEmbedded::Shared::TaxRefunds), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('tax_refunds') } }
38
+ # Unique identifier for this suspension.
39
+ field :uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('uuid') } }
40
+
41
+
42
+ sig { params(comments: T.nilable(::String), company_uuid: T.nilable(::String), effective_date: T.nilable(::String), file_quarterly_forms: T.nilable(T::Boolean), file_yearly_forms: T.nilable(T::Boolean), leaving_for: T.nilable(::String), reason: T.nilable(::String), reconcile_tax_method: T.nilable(::GustoEmbedded::Shared::ReconcileTaxMethod), tax_refunds: T.nilable(::GustoEmbedded::Shared::TaxRefunds), uuid: T.nilable(::String)).void }
43
+ def initialize(comments: nil, company_uuid: nil, effective_date: nil, file_quarterly_forms: nil, file_yearly_forms: nil, leaving_for: nil, reason: nil, reconcile_tax_method: nil, tax_refunds: nil, uuid: nil)
44
+ @comments = comments
45
+ @company_uuid = company_uuid
46
+ @effective_date = effective_date
47
+ @file_quarterly_forms = file_quarterly_forms
48
+ @file_yearly_forms = file_yearly_forms
49
+ @leaving_for = leaving_for
50
+ @reason = reason
51
+ @reconcile_tax_method = reconcile_tax_method
52
+ @tax_refunds = tax_refunds
53
+ @uuid = uuid
54
+ end
55
+ end
56
+ end
57
+ end
@@ -8,11 +8,13 @@ module GustoEmbedded
8
8
  module Shared
9
9
 
10
10
  # The representation of a pay schedule.
11
- class PaySchedule < ::Crystalline::FieldAugmented
11
+ class PayScheduleList < ::Crystalline::FieldAugmented
12
12
  extend T::Sig
13
13
 
14
14
  # The unique identifier of the pay schedule in Gusto.
15
15
  field :uuid, ::String, { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('uuid') } }
16
+ # The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.
17
+ field :version, ::String, { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('version') } }
16
18
  # Whether this pay schedule is associated with any employees. A pay schedule is inactive when it's unassigned.
17
19
  field :active, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('active') } }
18
20
  # The last date of the first pay period. This can be the same date as the anchor pay date.
@@ -33,9 +35,10 @@ module GustoEmbedded
33
35
  field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('name') } }
34
36
 
35
37
 
36
- sig { params(uuid: ::String, active: T.nilable(T::Boolean), anchor_end_of_pay_period: T.nilable(::String), anchor_pay_date: T.nilable(::String), auto_pilot: T.nilable(T::Boolean), custom_name: T.nilable(::String), day_1: T.nilable(::Integer), day_2: T.nilable(::Integer), frequency: T.nilable(::GustoEmbedded::Shared::PayScheduleFrequency), name: T.nilable(::String)).void }
37
- def initialize(uuid: nil, active: nil, anchor_end_of_pay_period: nil, anchor_pay_date: nil, auto_pilot: nil, custom_name: nil, day_1: nil, day_2: nil, frequency: nil, name: nil)
38
+ sig { params(uuid: ::String, version: ::String, active: T.nilable(T::Boolean), anchor_end_of_pay_period: T.nilable(::String), anchor_pay_date: T.nilable(::String), auto_pilot: T.nilable(T::Boolean), custom_name: T.nilable(::String), day_1: T.nilable(::Integer), day_2: T.nilable(::Integer), frequency: T.nilable(::GustoEmbedded::Shared::PayScheduleFrequency), name: T.nilable(::String)).void }
39
+ def initialize(uuid: nil, version: nil, active: nil, anchor_end_of_pay_period: nil, anchor_pay_date: nil, auto_pilot: nil, custom_name: nil, day_1: nil, day_2: nil, frequency: nil, name: nil)
38
40
  @uuid = uuid
41
+ @version = version
39
42
  @active = active
40
43
  @anchor_end_of_pay_period = anchor_end_of_pay_period
41
44
  @anchor_pay_date = anchor_pay_date
@@ -0,0 +1,54 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Shared
9
+
10
+ # The representation of a pay schedule.
11
+ class PayScheduleObject < ::Crystalline::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The unique identifier of the pay schedule in Gusto.
15
+ field :uuid, ::String, { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('uuid') } }
16
+ # The current version of the object. See the [versioning guide](https://docs.gusto.com/embedded-payroll/docs/idempotency) for information on how to use this field.
17
+ field :version, ::String, { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('version') } }
18
+ # Whether this pay schedule is associated with any employees. A pay schedule is inactive when it's unassigned.
19
+ field :active, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('active') } }
20
+ # The last date of the first pay period. This can be the same date as the anchor pay date.
21
+ field :anchor_end_of_pay_period, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('anchor_end_of_pay_period') } }
22
+ # The first date that employees on this pay schedule are paid with Gusto.
23
+ field :anchor_pay_date, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('anchor_pay_date') } }
24
+ # With Autopilot® enabled, payroll will run automatically one day before your payroll deadlines.
25
+ field :auto_pilot, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('auto_pilot') } }
26
+ # A custom name for a pay schedule, defaults to the pay frequency description.
27
+ field :custom_name, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('custom_name') } }
28
+ # An integer between 1 and 31 indicating the first day of the month that employees are paid. This field is only relevant for pay schedules with the “Twice per month” and “Monthly” frequencies. It will be null for pay schedules with other frequencies.
29
+ field :day_1, T.nilable(::Integer), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('day_1') } }
30
+ # An integer between 1 and 31 indicating the second day of the month that employees are paid. This field is the second pay date for pay schedules with the "Twice per month" frequency. For semi-monthly pay schedules, this field should be set to 31. For months shorter than 31 days, we will set the second pay date to the last day of the month. It will be null for pay schedules with other frequencies.
31
+ field :day_2, T.nilable(::Integer), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('day_2') } }
32
+ # The frequency that employees on this pay schedule are paid with Gusto.
33
+ field :frequency, T.nilable(::GustoEmbedded::Shared::PayScheduleFrequency), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('frequency'), 'decoder': Utils.enum_from_string(::GustoEmbedded::Shared::PayScheduleFrequency, true) } }
34
+ # This field will be hourly when the pay schedule is for hourly employees, salaried when the pay schedule is for salaried employees, the department name if pay schedule is by department, and null when the pay schedule is for all employees.
35
+ field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('name') } }
36
+
37
+
38
+ sig { params(uuid: ::String, version: ::String, active: T.nilable(T::Boolean), anchor_end_of_pay_period: T.nilable(::String), anchor_pay_date: T.nilable(::String), auto_pilot: T.nilable(T::Boolean), custom_name: T.nilable(::String), day_1: T.nilable(::Integer), day_2: T.nilable(::Integer), frequency: T.nilable(::GustoEmbedded::Shared::PayScheduleFrequency), name: T.nilable(::String)).void }
39
+ def initialize(uuid: nil, version: nil, active: nil, anchor_end_of_pay_period: nil, anchor_pay_date: nil, auto_pilot: nil, custom_name: nil, day_1: nil, day_2: nil, frequency: nil, name: nil)
40
+ @uuid = uuid
41
+ @version = version
42
+ @active = active
43
+ @anchor_end_of_pay_period = anchor_end_of_pay_period
44
+ @anchor_pay_date = anchor_pay_date
45
+ @auto_pilot = auto_pilot
46
+ @custom_name = custom_name
47
+ @day_1 = day_1
48
+ @day_2 = day_2
49
+ @frequency = frequency
50
+ @name = name
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,18 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Shared
9
+
10
+ # ReconcileTaxMethod - How Gusto will handle taxes already collected.
11
+ class ReconcileTaxMethod < T::Enum
12
+ enums do
13
+ PAY_TAXES = new('pay_taxes')
14
+ REFUND_TAXES = new('refund_taxes')
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,29 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module GustoEmbedded
8
+ module Shared
9
+
10
+ # Describes the taxes which are refundable to the company for this suspension. These may be refunded, or paid
11
+ # by Gusto, depending on the value in `reconcile_tax_method`.
12
+ #
13
+ class TaxRefunds < ::Crystalline::FieldAugmented
14
+ extend T::Sig
15
+
16
+ # Dollar amount.
17
+ field :amount, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('amount') } }
18
+ # What kind of tax this is.
19
+ field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('description') } }
20
+
21
+
22
+ sig { params(amount: T.nilable(::String), description: T.nilable(::String)).void }
23
+ def initialize(amount: nil, description: nil)
24
+ @amount = amount
25
+ @description = description
26
+ end
27
+ end
28
+ end
29
+ end
@@ -67,8 +67,9 @@ module GustoEmbedded
67
67
  autoload :PaymentConfigs, 'gusto_embedded/models/shared/payment_configs.rb'
68
68
  autoload :PayScheduleCreateUpdate, 'gusto_embedded/models/shared/pay_schedule_create_update.rb'
69
69
  autoload :PayScheduleFrequencyCreateUpdate, 'gusto_embedded/models/shared/pay_schedule_frequency_create_update.rb'
70
- autoload :PaySchedule, 'gusto_embedded/models/shared/pay_schedule.rb'
70
+ autoload :PayScheduleList, 'gusto_embedded/models/shared/pay_schedule_list.rb'
71
71
  autoload :PayScheduleFrequency, 'gusto_embedded/models/shared/pay_schedule_frequency.rb'
72
+ autoload :PayScheduleObject, 'gusto_embedded/models/shared/pay_schedule_object.rb'
72
73
  autoload :PayrollType, 'gusto_embedded/models/shared/payroll_type.rb'
73
74
  autoload :PayPeriodPayroll, 'gusto_embedded/models/shared/pay_period_payroll.rb'
74
75
  autoload :PayPeriod, 'gusto_embedded/models/shared/pay_period.rb'
@@ -294,6 +295,9 @@ module GustoEmbedded
294
295
  autoload :TaxRequirementMetadataValidationType, 'gusto_embedded/models/shared/tax_requirement_metadata_validation_type.rb'
295
296
  autoload :Validation, 'gusto_embedded/models/shared/validation.rb'
296
297
  autoload :TaxRequirementMetadata, 'gusto_embedded/models/shared/tax_requirement_metadata.rb'
298
+ autoload :ReconcileTaxMethod, 'gusto_embedded/models/shared/reconcile_tax_method.rb'
299
+ autoload :TaxRefunds, 'gusto_embedded/models/shared/tax_refunds.rb'
300
+ autoload :CompanySuspension, 'gusto_embedded/models/shared/company_suspension.rb'
297
301
  autoload :NewYearsDay, 'gusto_embedded/models/shared/new_years_day.rb'
298
302
  autoload :MlkDay, 'gusto_embedded/models/shared/mlk_day.rb'
299
303
  autoload :PresidentsDay, 'gusto_embedded/models/shared/presidents_day.rb'
@@ -125,7 +125,7 @@ module GustoEmbedded
125
125
  )
126
126
  if r.status == 200
127
127
  if Utils.match_content_type(content_type, 'application/json')
128
- out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), T::Array[::GustoEmbedded::Shared::PaySchedule])
128
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), T::Array[::GustoEmbedded::Shared::PayScheduleList])
129
129
  res.pay_schedule_list = out
130
130
  end
131
131
  elsif r.status == 404
@@ -214,8 +214,8 @@ module GustoEmbedded
214
214
  )
215
215
  if r.status == 200
216
216
  if Utils.match_content_type(content_type, 'application/json')
217
- out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::GustoEmbedded::Shared::PaySchedule)
218
- res.pay_schedule = out
217
+ out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::GustoEmbedded::Shared::PayScheduleObject)
218
+ res.pay_schedule_object = out
219
219
  end
220
220
  elsif r.status == 404
221
221
  end
@@ -46,9 +46,9 @@ module GustoEmbedded
46
46
  end
47
47
  @language = 'ruby'
48
48
  @openapi_doc_version = '2024-04-01'
49
- @sdk_version = '0.2.7'
49
+ @sdk_version = '0.2.8'
50
50
  @gen_version = '2.545.4'
51
- @user_agent = 'speakeasy-sdk/ruby 0.2.7 2.545.4 2024-04-01 gusto_embedded_client'
51
+ @user_agent = 'speakeasy-sdk/ruby 0.2.8 2.545.4 2024-04-01 gusto_embedded_client'
52
52
  end
53
53
 
54
54
  sig { returns([String, T::Hash[Symbol, String]]) }
@@ -172,7 +172,7 @@ module GustoEmbedded
172
172
  res = ::GustoEmbedded::Operations::PostV1CompaniesCompanyUuidSignatoriesInviteResponse.new(
173
173
  status_code: r.status, content_type: content_type, raw_response: r
174
174
  )
175
- if r.status == 201
175
+ if r.status == 200
176
176
  if Utils.match_content_type(content_type, 'application/json')
177
177
  out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::GustoEmbedded::Shared::Signatory)
178
178
  res.signatory = out
@@ -50,6 +50,7 @@ module GustoEmbedded
50
50
  autoload :Garnishments, 'gusto_embedded/garnishments'
51
51
  autoload :I9Verification, 'gusto_embedded/i9verification'
52
52
  autoload :TaxRequirements, 'gusto_embedded/taxrequirements'
53
+ autoload :CompaniesSuspensions, 'gusto_embedded/companies_suspensions'
53
54
  autoload :HolidayPayPolicies, 'gusto_embedded/holidaypaypolicies'
54
55
  autoload :Notifications, 'gusto_embedded/notifications'
55
56
  autoload :Events, 'gusto_embedded/events'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gusto_embedded_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-10 00:00:00.000000000 Z
11
+ date: 2025-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -164,6 +164,7 @@ files:
164
164
  - lib/gusto_embedded/bankaccounts.rb
165
165
  - lib/gusto_embedded/client.rb
166
166
  - lib/gusto_embedded/companies.rb
167
+ - lib/gusto_embedded/companies_suspensions.rb
167
168
  - lib/gusto_embedded/companyattachment.rb
168
169
  - lib/gusto_embedded/companyattachments.rb
169
170
  - lib/gusto_embedded/companybenefits.rb
@@ -297,6 +298,8 @@ files:
297
298
  - lib/gusto_embedded/models/operations/get_companies_company_uuid_paid_holidays_response.rb
298
299
  - lib/gusto_embedded/models/operations/get_companies_company_uuid_report_templates_report_type_request.rb
299
300
  - lib/gusto_embedded/models/operations/get_companies_company_uuid_report_templates_report_type_response.rb
301
+ - lib/gusto_embedded/models/operations/get_companies_company_uuid_suspensions_request.rb
302
+ - lib/gusto_embedded/models/operations/get_companies_company_uuid_suspensions_response.rb
300
303
  - lib/gusto_embedded/models/operations/get_companies_company_uuid_time_off_policies_request.rb
301
304
  - lib/gusto_embedded/models/operations/get_companies_company_uuid_time_off_policies_response.rb
302
305
  - lib/gusto_embedded/models/operations/get_companies_company_uuid_wire_in_request_uuid_request.rb
@@ -544,6 +547,7 @@ files:
544
547
  - lib/gusto_embedded/models/operations/job.rb
545
548
  - lib/gusto_embedded/models/operations/juneteenth.rb
546
549
  - lib/gusto_embedded/models/operations/labor_day.rb
550
+ - lib/gusto_embedded/models/operations/leaving_for.rb
547
551
  - lib/gusto_embedded/models/operations/liability_selections.rb
548
552
  - lib/gusto_embedded/models/operations/limit_option.rb
549
553
  - lib/gusto_embedded/models/operations/memorial_day.rb
@@ -568,6 +572,9 @@ files:
568
572
  - lib/gusto_embedded/models/operations/post_companies_company_uuid_reports_request.rb
569
573
  - lib/gusto_embedded/models/operations/post_companies_company_uuid_reports_requestbody.rb
570
574
  - lib/gusto_embedded/models/operations/post_companies_company_uuid_reports_response.rb
575
+ - lib/gusto_embedded/models/operations/post_companies_company_uuid_suspensions_request.rb
576
+ - lib/gusto_embedded/models/operations/post_companies_company_uuid_suspensions_requestbody.rb
577
+ - lib/gusto_embedded/models/operations/post_companies_company_uuid_suspensions_response.rb
571
578
  - lib/gusto_embedded/models/operations/post_companies_company_uuid_time_off_policies_accrual_method.rb
572
579
  - lib/gusto_embedded/models/operations/post_companies_company_uuid_time_off_policies_request.rb
573
580
  - lib/gusto_embedded/models/operations/post_companies_company_uuid_time_off_policies_requestbody.rb
@@ -775,6 +782,7 @@ files:
775
782
  - lib/gusto_embedded/models/operations/put_v1_companies_company_id_payrolls_request.rb
776
783
  - lib/gusto_embedded/models/operations/put_v1_companies_company_id_payrolls_requestbody.rb
777
784
  - lib/gusto_embedded/models/operations/put_v1_companies_company_id_payrolls_response.rb
785
+ - lib/gusto_embedded/models/operations/put_v1_companies_company_id_payrolls_withholding_pay_period.rb
778
786
  - lib/gusto_embedded/models/operations/put_v1_companies_company_uuid_signatories_signatory_uuid_home_address.rb
779
787
  - lib/gusto_embedded/models/operations/put_v1_companies_company_uuid_signatories_signatory_uuid_request.rb
780
788
  - lib/gusto_embedded/models/operations/put_v1_companies_company_uuid_signatories_signatory_uuid_requestbody.rb
@@ -931,6 +939,8 @@ files:
931
939
  - lib/gusto_embedded/models/operations/queryparam_frequency.rb
932
940
  - lib/gusto_embedded/models/operations/queryparam_include.rb
933
941
  - lib/gusto_embedded/models/operations/questions.rb
942
+ - lib/gusto_embedded/models/operations/reason.rb
943
+ - lib/gusto_embedded/models/operations/reconcile_tax_method.rb
934
944
  - lib/gusto_embedded/models/operations/redebit_recovery_case_request.rb
935
945
  - lib/gusto_embedded/models/operations/redebit_recovery_case_response.rb
936
946
  - lib/gusto_embedded/models/operations/refresh_access_token_request.rb
@@ -1003,6 +1013,7 @@ files:
1003
1013
  - lib/gusto_embedded/models/shared/company_onboarding_status.rb
1004
1014
  - lib/gusto_embedded/models/shared/company_paid_time_off.rb
1005
1015
  - lib/gusto_embedded/models/shared/company_status.rb
1016
+ - lib/gusto_embedded/models/shared/company_suspension.rb
1006
1017
  - lib/gusto_embedded/models/shared/compensation.rb
1007
1018
  - lib/gusto_embedded/models/shared/compensations.rb
1008
1019
  - lib/gusto_embedded/models/shared/contractor.rb
@@ -1159,7 +1170,6 @@ files:
1159
1170
  - lib/gusto_embedded/models/shared/paid_time_off.rb
1160
1171
  - lib/gusto_embedded/models/shared/pay_period.rb
1161
1172
  - lib/gusto_embedded/models/shared/pay_period_payroll.rb
1162
- - lib/gusto_embedded/models/shared/pay_schedule.rb
1163
1173
  - lib/gusto_embedded/models/shared/pay_schedule_assignment.rb
1164
1174
  - lib/gusto_embedded/models/shared/pay_schedule_assignment_body.rb
1165
1175
  - lib/gusto_embedded/models/shared/pay_schedule_assignment_body_type.rb
@@ -1173,6 +1183,8 @@ files:
1173
1183
  - lib/gusto_embedded/models/shared/pay_schedule_create_update.rb
1174
1184
  - lib/gusto_embedded/models/shared/pay_schedule_frequency.rb
1175
1185
  - lib/gusto_embedded/models/shared/pay_schedule_frequency_create_update.rb
1186
+ - lib/gusto_embedded/models/shared/pay_schedule_list.rb
1187
+ - lib/gusto_embedded/models/shared/pay_schedule_object.rb
1176
1188
  - lib/gusto_embedded/models/shared/pay_schedule_type.rb
1177
1189
  - lib/gusto_embedded/models/shared/payment_configs.rb
1178
1190
  - lib/gusto_embedded/models/shared/payment_direction.rb
@@ -1221,6 +1233,7 @@ files:
1221
1233
  - lib/gusto_embedded/models/shared/primary_signatory.rb
1222
1234
  - lib/gusto_embedded/models/shared/rate_type.rb
1223
1235
  - lib/gusto_embedded/models/shared/recipient_type.rb
1236
+ - lib/gusto_embedded/models/shared/reconcile_tax_method.rb
1224
1237
  - lib/gusto_embedded/models/shared/recovery_case.rb
1225
1238
  - lib/gusto_embedded/models/shared/recovery_case_status.rb
1226
1239
  - lib/gusto_embedded/models/shared/rehire.rb
@@ -1242,6 +1255,7 @@ files:
1242
1255
  - lib/gusto_embedded/models/shared/subscription_types.rb
1243
1256
  - lib/gusto_embedded/models/shared/supported_benefit.rb
1244
1257
  - lib/gusto_embedded/models/shared/tax_liabilities_selections.rb
1258
+ - lib/gusto_embedded/models/shared/tax_refunds.rb
1245
1259
  - lib/gusto_embedded/models/shared/tax_requirement.rb
1246
1260
  - lib/gusto_embedded/models/shared/tax_requirement_metadata.rb
1247
1261
  - lib/gusto_embedded/models/shared/tax_requirement_metadata_options.rb