gusto_embedded_client 0.3.0 → 0.3.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.
- checksums.yaml +4 -4
- data/lib/gusto_embedded/client.rb +2 -1
- data/lib/gusto_embedded/companybenefits.rb +30 -2
- data/lib/gusto_embedded/contractorpayments.rb +16 -2
- data/lib/gusto_embedded/earningtypes.rb +16 -2
- data/lib/gusto_embedded/employeebenefits.rb +30 -2
- data/lib/gusto_embedded/employeepaymentmethod.rb +30 -2
- data/lib/gusto_embedded/externalpayrolls.rb +60 -4
- data/lib/gusto_embedded/information_requests.rb +6 -3
- data/lib/gusto_embedded/models/errors/payroll_digest_conflict_error.rb +32 -0
- data/lib/gusto_embedded/models/errors/payroll_digest_conflict_error.rbi +13 -0
- data/lib/gusto_embedded/models/errors/payroll_digest_conflict_error_errors.rb +44 -0
- data/lib/gusto_embedded/models/errors/payroll_digest_conflict_error_errors.rbi +19 -0
- data/lib/gusto_embedded/models/errors/payroll_digest_conflict_error_metadata.rb +32 -0
- data/lib/gusto_embedded/models/errors/payroll_digest_conflict_error_metadata.rbi +13 -0
- data/lib/gusto_embedded/models/errors.rb +3 -0
- data/lib/gusto_embedded/models/operations/get_information_requests_request.rb +6 -2
- data/lib/gusto_embedded/models/operations/get_information_requests_request.rbi +2 -0
- data/lib/gusto_embedded/models/operations/get_v1_companies_company_id_payrolls_payroll_id_request.rb +3 -3
- data/lib/gusto_embedded/models/operations/get_v1_companies_company_uuid_contractors_request.rb +1 -1
- data/lib/gusto_embedded/models/operations/get_v1_company_forms_request.rb +3 -3
- data/lib/gusto_embedded/models/operations/get_v1_payroll_digests_payroll_digest_uuid_header_x_gusto_api_version.rb +18 -0
- data/lib/gusto_embedded/models/operations/get_v1_payroll_digests_payroll_digest_uuid_header_x_gusto_api_version.rbi +11 -0
- data/lib/gusto_embedded/models/operations/get_v1_payroll_digests_payroll_digest_uuid_request.rb +36 -0
- data/lib/gusto_embedded/models/operations/get_v1_payroll_digests_payroll_digest_uuid_request.rbi +15 -0
- data/lib/gusto_embedded/models/operations/get_v1_payroll_digests_payroll_digest_uuid_response.rb +44 -0
- data/lib/gusto_embedded/models/operations/get_v1_payroll_digests_payroll_digest_uuid_response.rbi +19 -0
- data/lib/gusto_embedded/models/operations/get_v1_payroll_digests_payroll_digest_uuid_security.rb +32 -0
- data/lib/gusto_embedded/models/operations/get_v1_payroll_digests_payroll_digest_uuid_security.rbi +13 -0
- data/lib/gusto_embedded/models/operations/post_v1_companies_company_id_reports_employees_annual_fica_wage_response.rb +5 -5
- data/lib/gusto_embedded/models/operations/post_v1_companies_company_id_reports_employees_annual_fica_wage_response.rbi +2 -2
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_batch.rb +36 -0
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_batch.rbi +15 -0
- data/lib/gusto_embedded/models/operations/{sort_by.rb → post_v1_payroll_digests_batch_action.rb} +3 -4
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_batch_action.rbi +11 -0
- data/lib/gusto_embedded/models/operations/{queryparam_sort_by.rb → post_v1_payroll_digests_entity_type.rb} +3 -4
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_entity_type.rbi +11 -0
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_header_x_gusto_api_version.rb +18 -0
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_header_x_gusto_api_version.rbi +11 -0
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_request.rb +36 -0
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_request.rbi +15 -0
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_requestbody.rb +40 -0
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_requestbody.rbi +17 -0
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_response.rb +44 -0
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_response.rbi +19 -0
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_security.rb +32 -0
- data/lib/gusto_embedded/models/operations/post_v1_payroll_digests_security.rbi +13 -0
- data/lib/gusto_embedded/models/operations/put_v1_companies_company_id_payrolls_payroll_id_prepare_request.rb +3 -3
- data/lib/gusto_embedded/models/operations/split_by.rb +1 -1
- data/lib/gusto_embedded/models/operations.rb +12 -4
- data/lib/gusto_embedded/models/shared/ach_transaction_recipient_type.rb +1 -1
- data/lib/gusto_embedded/models/shared/batch_action.rb +18 -0
- data/lib/gusto_embedded/models/{operations/sort_by.rbi → shared/batch_action.rbi} +2 -2
- data/lib/gusto_embedded/models/shared/blockers.rb +36 -0
- data/lib/gusto_embedded/models/shared/blockers.rbi +15 -0
- data/lib/gusto_embedded/models/shared/columns.rb +2 -0
- data/lib/gusto_embedded/models/shared/deduction_reduces_taxable_income.rb +1 -1
- data/lib/gusto_embedded/models/shared/employee_benefit.rb +6 -6
- data/lib/gusto_embedded/models/shared/employee_benefit.rbi +2 -2
- data/lib/gusto_embedded/models/shared/employee_benefit_create_request_deduction_reduces_taxable_income.rb +1 -1
- data/lib/gusto_embedded/models/shared/employee_benefit_create_request_limit_option.rb +1 -6
- data/lib/gusto_embedded/models/shared/employee_benefit_for_company_benefit.rb +6 -6
- data/lib/gusto_embedded/models/shared/employee_benefit_for_company_benefit.rbi +2 -2
- data/lib/gusto_embedded/models/shared/employee_benefit_for_company_benefit_deduction_reduces_taxable_income.rb +1 -1
- data/lib/gusto_embedded/models/shared/employee_benefit_update_request.rb +6 -6
- data/lib/gusto_embedded/models/shared/employee_benefit_update_request.rbi +2 -2
- data/lib/gusto_embedded/models/shared/employee_benefit_update_request_deduction_reduces_taxable_income.rb +1 -1
- data/lib/gusto_embedded/models/shared/employee_benefit_update_request_limit_option.rb +1 -6
- data/lib/gusto_embedded/models/shared/employee_state_taxes_list.rb +6 -2
- data/lib/gusto_embedded/models/shared/employee_state_taxes_list.rbi +2 -0
- data/lib/gusto_embedded/models/{operations/post_v1_companies_company_id_reports_employees_annual_fica_wage_responsebody.rb → shared/employees_annual_fica_wage_report_acceptance.rb} +6 -6
- data/lib/gusto_embedded/models/{operations/post_v1_companies_company_id_reports_employees_annual_fica_wage_responsebody.rbi → shared/employees_annual_fica_wage_report_acceptance.rbi} +2 -2
- data/lib/gusto_embedded/models/shared/entity_type.rb +1 -1
- data/lib/gusto_embedded/models/shared/funding_type.rb +4 -2
- data/lib/gusto_embedded/models/shared/garnishment_request_garnishment_type.rb +1 -1
- data/lib/gusto_embedded/models/shared/information_request_type.rb +1 -1
- data/lib/gusto_embedded/models/shared/integration_type.rb +1 -1
- data/lib/gusto_embedded/models/shared/name.rb +1 -1
- data/lib/gusto_embedded/models/shared/pay_schedule.rb +40 -0
- data/lib/gusto_embedded/models/shared/pay_schedule.rbi +17 -0
- data/lib/gusto_embedded/models/shared/payroll_digest.rb +44 -0
- data/lib/gusto_embedded/models/shared/payroll_digest.rbi +19 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results.rb +68 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results.rbi +31 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_category.rb +21 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_category.rbi +11 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_entity_type.rb +18 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_entity_type.rbi +11 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_exclusions.rb +52 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_exclusions.rbi +23 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_exclusions_entity_type.rb +18 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_exclusions_entity_type.rbi +11 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_exclusions_status.rb +18 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_exclusions_status.rbi +11 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_pay_period.rb +44 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_pay_period.rbi +19 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_results.rb +56 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_results.rbi +25 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_results_status.rb +20 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_results_status.rbi +11 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_status.rb +21 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_status.rbi +11 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_totals.rb +40 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_results_totals.rbi +17 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_status.rb +21 -0
- data/lib/gusto_embedded/models/shared/payroll_digest_status.rbi +11 -0
- data/lib/gusto_embedded/models/shared/payroll_employee_compensations_type_payment_method.rb +1 -1
- data/lib/gusto_embedded/models/shared/payroll_show_payment_method.rb +1 -1
- data/lib/gusto_embedded/models/shared/payroll_unprocessed_employee_compensations_type_payment_method.rb +1 -1
- data/lib/gusto_embedded/models/shared/payrolls.rb +60 -0
- data/lib/gusto_embedded/models/shared/payrolls.rbi +27 -0
- data/lib/gusto_embedded/models/shared/update_garnishment_request_garnishment_type.rb +1 -1
- data/lib/gusto_embedded/models/shared.rb +18 -0
- data/lib/gusto_embedded/payroll_digests.rb +342 -0
- data/lib/gusto_embedded/reports.rb +2 -2
- data/lib/gusto_embedded/sdkconfiguration.rb +3 -3
- data/lib/gusto_embedded/time_off_requests.rb +30 -2
- data/lib/gusto_embedded_client.rb +1 -0
- metadata +69 -10
- data/lib/gusto_embedded/models/operations/get_v1_company_forms_queryparam_sort_by.rb +0 -23
- data/lib/gusto_embedded/models/operations/get_v1_company_forms_queryparam_sort_by.rbi +0 -11
- data/lib/gusto_embedded/models/operations/queryparam_sort_by.rbi +0 -11
|
@@ -0,0 +1,40 @@
|
|
|
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 Models
|
|
9
|
+
module Shared
|
|
10
|
+
# Pay totals. `null` when the payroll has not been calculated, or when the calculation is stale (the partner edited hours/earnings after the last calculation).
|
|
11
|
+
class PayrollDigestResultsTotals
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# Total amount debited from the company bank account (string-formatted decimal).
|
|
16
|
+
field :total_debit_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('total_debit_amount') } }
|
|
17
|
+
# Total net pay across all employees on this payroll (string-formatted decimal).
|
|
18
|
+
field :net_pay, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('net_pay') } }
|
|
19
|
+
# Total employer cost including taxes and benefits (string-formatted decimal).
|
|
20
|
+
field :total_employer_cost, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('total_employer_cost') } }
|
|
21
|
+
|
|
22
|
+
sig { params(total_debit_amount: T.nilable(::String), net_pay: T.nilable(::String), total_employer_cost: T.nilable(::String)).void }
|
|
23
|
+
def initialize(total_debit_amount: nil, net_pay: nil, total_employer_cost: nil)
|
|
24
|
+
@total_debit_amount = total_debit_amount
|
|
25
|
+
@net_pay = net_pay
|
|
26
|
+
@total_employer_cost = total_employer_cost
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
30
|
+
def ==(other)
|
|
31
|
+
return false unless other.is_a? self.class
|
|
32
|
+
return false unless @total_debit_amount == other.total_debit_amount
|
|
33
|
+
return false unless @net_pay == other.net_pay
|
|
34
|
+
return false unless @total_employer_cost == other.total_employer_cost
|
|
35
|
+
true
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class GustoEmbedded::Models::Shared::PayrollDigestResultsTotals
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GustoEmbedded::Models::Shared::PayrollDigestResultsTotals
|
|
11
|
+
def total_debit_amount(); end
|
|
12
|
+
def total_debit_amount=(str_); end
|
|
13
|
+
def net_pay(); end
|
|
14
|
+
def net_pay=(str_); end
|
|
15
|
+
def total_employer_cost(); end
|
|
16
|
+
def total_employer_cost=(str_); end
|
|
17
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
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 Models
|
|
9
|
+
module Shared
|
|
10
|
+
# PayrollDigestStatus - The lifecycle status of the batch request itself. Terminal values are `completed` (processing finished — inspect `results` and `exclusions` for per-company outcomes) and `failed` (request failed; can be retried). This is distinct from the per-company `status` returned inside `results[]` and `exclusions[]`.
|
|
11
|
+
class PayrollDigestStatus < T::Enum
|
|
12
|
+
enums do
|
|
13
|
+
PENDING = new('pending')
|
|
14
|
+
PROCESSING = new('processing')
|
|
15
|
+
COMPLETED = new('completed')
|
|
16
|
+
FAILED = new('failed')
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
module GustoEmbedded
|
|
8
8
|
module Models
|
|
9
9
|
module Shared
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
class PayrollEmployeeCompensationsTypePaymentMethod < T::Enum
|
|
12
12
|
enums do
|
|
13
13
|
DIRECT_DEPOSIT = new('Direct Deposit')
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
module GustoEmbedded
|
|
8
8
|
module Models
|
|
9
9
|
module Shared
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
class PayrollShowPaymentMethod < T::Enum
|
|
12
12
|
enums do
|
|
13
13
|
DIRECT_DEPOSIT = new('Direct Deposit')
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
module GustoEmbedded
|
|
8
8
|
module Models
|
|
9
9
|
module Shared
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
class PayrollUnprocessedEmployeeCompensationsTypePaymentMethod < T::Enum
|
|
12
12
|
enums do
|
|
13
13
|
DIRECT_DEPOSIT = new('Direct Deposit')
|
|
@@ -0,0 +1,60 @@
|
|
|
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 Models
|
|
9
|
+
module Shared
|
|
10
|
+
|
|
11
|
+
class Payrolls
|
|
12
|
+
extend T::Sig
|
|
13
|
+
include Crystalline::MetadataFields
|
|
14
|
+
|
|
15
|
+
# The type of payroll (e.g. `regular`, `new_hire`, `termination`, `transition`, `bonus`, `correction`).
|
|
16
|
+
field :payroll_type, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('payroll_type') } }
|
|
17
|
+
# Partner-facing display title for this payroll (e.g. "Run biweekly payroll").
|
|
18
|
+
field :display_title, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('display_title') } }
|
|
19
|
+
# Whether the company has auto-payroll enabled for this pay schedule.
|
|
20
|
+
field :auto_payroll, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('auto_payroll') } }
|
|
21
|
+
# The lifecycle status of the payroll (e.g. `ready_to_start`, `in_progress`, `submitted`, `completed`, `failed`).
|
|
22
|
+
field :status, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('status') } }
|
|
23
|
+
|
|
24
|
+
field :pay_period, Crystalline::Nilable.new(Models::Shared::PayrollDigestResultsPayPeriod), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('pay_period') } }
|
|
25
|
+
# UUID of the payroll. `null` for upcoming pay periods that have not been started yet (the `payrolls` API has not yet created a payroll record). Once a payroll is created, subsequent digest requests will include the real `payroll_uuid`.
|
|
26
|
+
field :payroll_uuid, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('payroll_uuid') } }
|
|
27
|
+
|
|
28
|
+
field :pay_schedule, Crystalline::Nilable.new(Models::Shared::PaySchedule), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('pay_schedule') } }
|
|
29
|
+
# Pay totals. `null` when the payroll has not been calculated, or when the calculation is stale (the partner edited hours/earnings after the last calculation).
|
|
30
|
+
field :totals, Crystalline::Nilable.new(Models::Shared::PayrollDigestResultsTotals), { 'format_json': { 'letter_case': ::GustoEmbedded::Utils.field_name('totals') } }
|
|
31
|
+
|
|
32
|
+
sig { params(payroll_type: T.nilable(::String), display_title: T.nilable(::String), auto_payroll: T.nilable(T::Boolean), status: T.nilable(::String), pay_period: T.nilable(Models::Shared::PayrollDigestResultsPayPeriod), payroll_uuid: T.nilable(::String), pay_schedule: T.nilable(Models::Shared::PaySchedule), totals: T.nilable(Models::Shared::PayrollDigestResultsTotals)).void }
|
|
33
|
+
def initialize(payroll_type: nil, display_title: nil, auto_payroll: nil, status: nil, pay_period: nil, payroll_uuid: nil, pay_schedule: nil, totals: nil)
|
|
34
|
+
@payroll_type = payroll_type
|
|
35
|
+
@display_title = display_title
|
|
36
|
+
@auto_payroll = auto_payroll
|
|
37
|
+
@status = status
|
|
38
|
+
@pay_period = pay_period
|
|
39
|
+
@payroll_uuid = payroll_uuid
|
|
40
|
+
@pay_schedule = pay_schedule
|
|
41
|
+
@totals = totals
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
45
|
+
def ==(other)
|
|
46
|
+
return false unless other.is_a? self.class
|
|
47
|
+
return false unless @payroll_type == other.payroll_type
|
|
48
|
+
return false unless @display_title == other.display_title
|
|
49
|
+
return false unless @auto_payroll == other.auto_payroll
|
|
50
|
+
return false unless @status == other.status
|
|
51
|
+
return false unless @pay_period == other.pay_period
|
|
52
|
+
return false unless @payroll_uuid == other.payroll_uuid
|
|
53
|
+
return false unless @pay_schedule == other.pay_schedule
|
|
54
|
+
return false unless @totals == other.totals
|
|
55
|
+
true
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class GustoEmbedded::Models::Shared::Payrolls
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GustoEmbedded::Models::Shared::Payrolls
|
|
11
|
+
def payroll_type(); end
|
|
12
|
+
def payroll_type=(str_); end
|
|
13
|
+
def display_title(); end
|
|
14
|
+
def display_title=(str_); end
|
|
15
|
+
def auto_payroll(); end
|
|
16
|
+
def auto_payroll=(str_); end
|
|
17
|
+
def status(); end
|
|
18
|
+
def status=(str_); end
|
|
19
|
+
def pay_period(); end
|
|
20
|
+
def pay_period=(str_); end
|
|
21
|
+
def payroll_uuid(); end
|
|
22
|
+
def payroll_uuid=(str_); end
|
|
23
|
+
def pay_schedule(); end
|
|
24
|
+
def pay_schedule=(str_); end
|
|
25
|
+
def totals(); end
|
|
26
|
+
def totals=(str_); end
|
|
27
|
+
end
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
module GustoEmbedded
|
|
8
8
|
module Models
|
|
9
9
|
module Shared
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
class UpdateGarnishmentRequestGarnishmentType < T::Enum
|
|
12
12
|
enums do
|
|
13
13
|
CHILD_SUPPORT = new('child_support')
|
|
@@ -227,6 +227,7 @@ module GustoEmbedded
|
|
|
227
227
|
autoload :EmployeeOnboardingStatus1, 'gusto_embedded/models/shared/employee_onboarding_status1.rb'
|
|
228
228
|
autoload :EmployeePaymentMethod1, 'gusto_embedded/models/shared/employee_payment_method1.rb'
|
|
229
229
|
autoload :EmployeeStatus, 'gusto_embedded/models/shared/employee_status.rb'
|
|
230
|
+
autoload :EmployeesAnnualFicaWageReportAcceptance, 'gusto_embedded/models/shared/employees_annual_fica_wage_report_acceptance.rb'
|
|
230
231
|
autoload :EmploymentHistoryList, 'gusto_embedded/models/shared/employment_history_list.rb'
|
|
231
232
|
autoload :EmploymentHistoryListEmploymentStatus, 'gusto_embedded/models/shared/employment_history_list_employment_status.rb'
|
|
232
233
|
autoload :EntityErrorObject, 'gusto_embedded/models/shared/entity_error_object.rb'
|
|
@@ -366,6 +367,19 @@ module GustoEmbedded
|
|
|
366
367
|
autoload :PayrollCreditBlockerUnblockOptionWaitForReverseWire, 'gusto_embedded/models/shared/payroll_credit_blocker_unblock_option_wait_for_reverse_wire.rb'
|
|
367
368
|
autoload :PayrollCreditBlockerUnblockOptionWaitForReverseWireMetadata, 'gusto_embedded/models/shared/payroll_credit_blocker_unblock_option_wait_for_reverse_wire_metadata.rb'
|
|
368
369
|
autoload :PayrollCreditBlockerUnblockOptionWaitForReverseWireUnblockType, 'gusto_embedded/models/shared/payroll_credit_blocker_unblock_option_wait_for_reverse_wire_unblock_type.rb'
|
|
370
|
+
autoload :PayrollDigest, 'gusto_embedded/models/shared/payroll_digest.rb'
|
|
371
|
+
autoload :PayrollDigestResults, 'gusto_embedded/models/shared/payroll_digest_results.rb'
|
|
372
|
+
autoload :PayrollDigestResultsCategory, 'gusto_embedded/models/shared/payroll_digest_results_category.rb'
|
|
373
|
+
autoload :PayrollDigestResultsEntityType, 'gusto_embedded/models/shared/payroll_digest_results_entity_type.rb'
|
|
374
|
+
autoload :PayrollDigestResultsExclusions, 'gusto_embedded/models/shared/payroll_digest_results_exclusions.rb'
|
|
375
|
+
autoload :PayrollDigestResultsExclusionsEntityType, 'gusto_embedded/models/shared/payroll_digest_results_exclusions_entity_type.rb'
|
|
376
|
+
autoload :PayrollDigestResultsExclusionsStatus, 'gusto_embedded/models/shared/payroll_digest_results_exclusions_status.rb'
|
|
377
|
+
autoload :PayrollDigestResultsPayPeriod, 'gusto_embedded/models/shared/payroll_digest_results_pay_period.rb'
|
|
378
|
+
autoload :PayrollDigestResultsResults, 'gusto_embedded/models/shared/payroll_digest_results_results.rb'
|
|
379
|
+
autoload :PayrollDigestResultsResultsStatus, 'gusto_embedded/models/shared/payroll_digest_results_results_status.rb'
|
|
380
|
+
autoload :PayrollDigestResultsStatus, 'gusto_embedded/models/shared/payroll_digest_results_status.rb'
|
|
381
|
+
autoload :PayrollDigestResultsTotals, 'gusto_embedded/models/shared/payroll_digest_results_totals.rb'
|
|
382
|
+
autoload :PayrollDigestStatus, 'gusto_embedded/models/shared/payroll_digest_status.rb'
|
|
369
383
|
autoload :PayrollEmployeeCompensationsType, 'gusto_embedded/models/shared/payroll_employee_compensations_type.rb'
|
|
370
384
|
autoload :PayrollEmployeeCompensationsTypeFixedCompensations, 'gusto_embedded/models/shared/payroll_employee_compensations_type_fixed_compensations.rb'
|
|
371
385
|
autoload :PayrollEmployeeCompensationsTypeHourlyCompensations, 'gusto_embedded/models/shared/payroll_employee_compensations_type_hourly_compensations.rb'
|
|
@@ -503,8 +517,10 @@ module GustoEmbedded
|
|
|
503
517
|
autoload :Approver, 'gusto_embedded/models/shared/approver.rb'
|
|
504
518
|
autoload :AuthorizationStatus, 'gusto_embedded/models/shared/authorization_status.rb'
|
|
505
519
|
autoload :Balances, 'gusto_embedded/models/shared/balances.rb'
|
|
520
|
+
autoload :BatchAction, 'gusto_embedded/models/shared/batch_action.rb'
|
|
506
521
|
autoload :Benefits, 'gusto_embedded/models/shared/benefits.rb'
|
|
507
522
|
autoload :BlockerType, 'gusto_embedded/models/shared/blocker_type.rb'
|
|
523
|
+
autoload :Blockers, 'gusto_embedded/models/shared/blockers.rb'
|
|
508
524
|
autoload :CatchUp, 'gusto_embedded/models/shared/catch_up.rb'
|
|
509
525
|
autoload :CatchUpType, 'gusto_embedded/models/shared/catch_up_type.rb'
|
|
510
526
|
autoload :Category, 'gusto_embedded/models/shared/category.rb'
|
|
@@ -584,6 +600,7 @@ module GustoEmbedded
|
|
|
584
600
|
autoload :Options, 'gusto_embedded/models/shared/options.rb'
|
|
585
601
|
autoload :OwnerType, 'gusto_embedded/models/shared/owner_type.rb'
|
|
586
602
|
autoload :Pages, 'gusto_embedded/models/shared/pages.rb'
|
|
603
|
+
autoload :PaySchedule, 'gusto_embedded/models/shared/pay_schedule.rb'
|
|
587
604
|
autoload :PayScheduleType, 'gusto_embedded/models/shared/pay_schedule_type.rb'
|
|
588
605
|
autoload :PaymentDirection, 'gusto_embedded/models/shared/payment_direction.rb'
|
|
589
606
|
autoload :PaymentEventType, 'gusto_embedded/models/shared/payment_event_type.rb'
|
|
@@ -595,6 +612,7 @@ module GustoEmbedded
|
|
|
595
612
|
autoload :PaymentUnit, 'gusto_embedded/models/shared/payment_unit.rb'
|
|
596
613
|
autoload :PayrollBenefits, 'gusto_embedded/models/shared/payroll_benefits.rb'
|
|
597
614
|
autoload :PayrollType, 'gusto_embedded/models/shared/payroll_type.rb'
|
|
615
|
+
autoload :Payrolls, 'gusto_embedded/models/shared/payrolls.rb'
|
|
598
616
|
autoload :PlaidStatus, 'gusto_embedded/models/shared/plaid_status.rb'
|
|
599
617
|
autoload :PolicyType, 'gusto_embedded/models/shared/policy_type.rb'
|
|
600
618
|
autoload :PossibleLiabilities, 'gusto_embedded/models/shared/possible_liabilities.rb'
|
|
@@ -0,0 +1,342 @@
|
|
|
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 'faraday/retry'
|
|
9
|
+
require 'sorbet-runtime'
|
|
10
|
+
require_relative 'sdk_hooks/hooks'
|
|
11
|
+
require_relative 'utils/retries'
|
|
12
|
+
|
|
13
|
+
module GustoEmbedded
|
|
14
|
+
extend T::Sig
|
|
15
|
+
class PayrollDigests
|
|
16
|
+
extend T::Sig
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
sig { params(sdk_config: SDKConfiguration).void }
|
|
21
|
+
def initialize(sdk_config)
|
|
22
|
+
@sdk_configuration = sdk_config
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) }
|
|
27
|
+
def get_url(base_url:, url_variables: nil)
|
|
28
|
+
sd_base_url, sd_options = @sdk_configuration.get_server_details
|
|
29
|
+
|
|
30
|
+
if base_url.nil?
|
|
31
|
+
base_url = sd_base_url
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
if url_variables.nil?
|
|
35
|
+
url_variables = sd_options
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
return Utils.template_url base_url, url_variables
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
sig { params(security: Models::Operations::PostV1PayrollDigestsSecurity, request_body: Models::Operations::PostV1PayrollDigestsRequestBody, x_gusto_api_version: T.nilable(Models::Operations::PostV1PayrollDigestsHeaderXGustoAPIVersion), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::PostV1PayrollDigestsResponse) }
|
|
45
|
+
def post_v1_payroll_digests(security:, request_body:, x_gusto_api_version: nil, timeout_ms: nil, http_headers: nil)
|
|
46
|
+
# post_v1_payroll_digests - Create a payroll digest batch
|
|
47
|
+
# Triggers an asynchronous computation of payroll digest data (statuses, blockers, pay periods, totals) across up to 25 companies that the partner is mapped to.
|
|
48
|
+
#
|
|
49
|
+
# The batch is processed asynchronously. Use the returned batch UUID to poll `GET /v1/payroll_digests/{payroll_digest_uuid}` for status and results.
|
|
50
|
+
#
|
|
51
|
+
# Idempotency is scoped per `(partner, idempotency_key)`. A duplicate POST with the same `idempotency_key` returns a 409 Conflict referencing the existing batch UUID — no duplicate computation occurs.
|
|
52
|
+
#
|
|
53
|
+
# 📘 System Access Authentication
|
|
54
|
+
#
|
|
55
|
+
# This endpoint uses the [Bearer Auth scheme with the system-level access token in the HTTP Authorization header](https://docs.gusto.com/embedded-payroll/docs/system-access)
|
|
56
|
+
#
|
|
57
|
+
# scope: `payroll_digests:write`
|
|
58
|
+
request = Models::Operations::PostV1PayrollDigestsRequest.new(
|
|
59
|
+
request_body: request_body,
|
|
60
|
+
x_gusto_api_version: x_gusto_api_version
|
|
61
|
+
)
|
|
62
|
+
url, params = @sdk_configuration.get_server_details
|
|
63
|
+
base_url = Utils.template_url(url, params)
|
|
64
|
+
url = "#{base_url}/v1/payroll_digests"
|
|
65
|
+
headers = Utils.get_headers(request)
|
|
66
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
67
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :request_body, :json)
|
|
68
|
+
headers['content-type'] = req_content_type
|
|
69
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
70
|
+
|
|
71
|
+
if form && !form.empty?
|
|
72
|
+
body = Utils.encode_form(form)
|
|
73
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
74
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
75
|
+
else
|
|
76
|
+
body = data
|
|
77
|
+
end
|
|
78
|
+
headers['Accept'] = 'application/json'
|
|
79
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
80
|
+
|
|
81
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
82
|
+
timeout ||= @sdk_configuration.timeout
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
connection = @sdk_configuration.client
|
|
86
|
+
|
|
87
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
88
|
+
config: @sdk_configuration,
|
|
89
|
+
base_url: base_url,
|
|
90
|
+
oauth2_scopes: nil,
|
|
91
|
+
operation_id: 'post-v1-payroll_digests',
|
|
92
|
+
security_source: -> { security }
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
96
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
begin
|
|
100
|
+
http_response = T.must(connection).post(url) do |req|
|
|
101
|
+
req.body = body
|
|
102
|
+
req.headers.merge!(headers)
|
|
103
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
104
|
+
Utils.configure_request_security(req, security)
|
|
105
|
+
http_headers&.each do |key, value|
|
|
106
|
+
req.headers[key.to_s] = value
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
@sdk_configuration.hooks.before_request(
|
|
110
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
111
|
+
hook_ctx: hook_ctx
|
|
112
|
+
),
|
|
113
|
+
request: req
|
|
114
|
+
)
|
|
115
|
+
end
|
|
116
|
+
rescue StandardError => e
|
|
117
|
+
error = e
|
|
118
|
+
ensure
|
|
119
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
120
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
121
|
+
error: error,
|
|
122
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
123
|
+
hook_ctx: hook_ctx
|
|
124
|
+
),
|
|
125
|
+
response: http_response
|
|
126
|
+
)
|
|
127
|
+
else
|
|
128
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
129
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
130
|
+
hook_ctx: hook_ctx
|
|
131
|
+
),
|
|
132
|
+
response: http_response
|
|
133
|
+
)
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if http_response.nil?
|
|
137
|
+
raise error if !error.nil?
|
|
138
|
+
raise 'no response'
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
143
|
+
if Utils.match_status_code(http_response.status, ['201'])
|
|
144
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
145
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
146
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
147
|
+
hook_ctx: hook_ctx
|
|
148
|
+
),
|
|
149
|
+
response: http_response
|
|
150
|
+
)
|
|
151
|
+
response_data = http_response.env.response_body
|
|
152
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::PayrollDigest)
|
|
153
|
+
response = Models::Operations::PostV1PayrollDigestsResponse.new(
|
|
154
|
+
status_code: http_response.status,
|
|
155
|
+
content_type: content_type,
|
|
156
|
+
raw_response: http_response,
|
|
157
|
+
payroll_digest: T.unsafe(obj)
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
return response
|
|
161
|
+
else
|
|
162
|
+
raise ::GustoEmbedded::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
163
|
+
end
|
|
164
|
+
elsif Utils.match_status_code(http_response.status, ['409'])
|
|
165
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
166
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
167
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
168
|
+
hook_ctx: hook_ctx
|
|
169
|
+
),
|
|
170
|
+
response: http_response
|
|
171
|
+
)
|
|
172
|
+
response_data = http_response.env.response_body
|
|
173
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PayrollDigestConflictError)
|
|
174
|
+
raise obj
|
|
175
|
+
else
|
|
176
|
+
raise ::GustoEmbedded::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
177
|
+
end
|
|
178
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
|
179
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
180
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
181
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
182
|
+
hook_ctx: hook_ctx
|
|
183
|
+
),
|
|
184
|
+
response: http_response
|
|
185
|
+
)
|
|
186
|
+
response_data = http_response.env.response_body
|
|
187
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::UnprocessableEntityError)
|
|
188
|
+
raise obj
|
|
189
|
+
else
|
|
190
|
+
raise ::GustoEmbedded::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
191
|
+
end
|
|
192
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
193
|
+
raise ::GustoEmbedded::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
194
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
195
|
+
raise ::GustoEmbedded::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
196
|
+
else
|
|
197
|
+
raise ::GustoEmbedded::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
198
|
+
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
sig { params(security: Models::Operations::GetV1PayrollDigestsPayrollDigestUuidSecurity, payroll_digest_uuid: ::String, x_gusto_api_version: T.nilable(Models::Operations::GetV1PayrollDigestsPayrollDigestUuidHeaderXGustoAPIVersion), timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::GetV1PayrollDigestsPayrollDigestUuidResponse) }
|
|
204
|
+
def get_v1_payroll_digests_payroll_digest_uuid(security:, payroll_digest_uuid:, x_gusto_api_version: nil, timeout_ms: nil, http_headers: nil)
|
|
205
|
+
# get_v1_payroll_digests_payroll_digest_uuid - Get a payroll digest batch
|
|
206
|
+
# Returns the status and results of a payroll digest batch.
|
|
207
|
+
#
|
|
208
|
+
# Poll this endpoint until the batch `status` reaches a terminal value (`completed` or `failed`). Once terminal, the response includes the full `results` array (one entry per attempted company, each with its own per-company `status` — `success`, `partial_success`, or `failed`) and the `exclusions` array (one entry per company that could not be looked up or processed).
|
|
209
|
+
#
|
|
210
|
+
# Note that the top-level batch `status` (`pending` / `processing` / `completed` / `failed`) is distinct from the per-company `status` returned inside `results[]` and `exclusions[]`. A `completed` batch does not imply every company succeeded — inspect the arrays for per-company outcomes.
|
|
211
|
+
#
|
|
212
|
+
# Results are stored in Redis with a short TTL after completion. If the partner polls after results have expired, this endpoint returns 410 Gone — partners should re-submit a new batch to fetch fresh data.
|
|
213
|
+
#
|
|
214
|
+
# 📘 System Access Authentication
|
|
215
|
+
#
|
|
216
|
+
# This endpoint uses the [Bearer Auth scheme with the system-level access token in the HTTP Authorization header](https://docs.gusto.com/embedded-payroll/docs/system-access)
|
|
217
|
+
#
|
|
218
|
+
# scope: `payroll_digests:read`
|
|
219
|
+
request = Models::Operations::GetV1PayrollDigestsPayrollDigestUuidRequest.new(
|
|
220
|
+
payroll_digest_uuid: payroll_digest_uuid,
|
|
221
|
+
x_gusto_api_version: x_gusto_api_version
|
|
222
|
+
)
|
|
223
|
+
url, params = @sdk_configuration.get_server_details
|
|
224
|
+
base_url = Utils.template_url(url, params)
|
|
225
|
+
url = Utils.generate_url(
|
|
226
|
+
Models::Operations::GetV1PayrollDigestsPayrollDigestUuidRequest,
|
|
227
|
+
base_url,
|
|
228
|
+
'/v1/payroll_digests/{payroll_digest_uuid}',
|
|
229
|
+
request
|
|
230
|
+
)
|
|
231
|
+
headers = Utils.get_headers(request)
|
|
232
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
233
|
+
headers['Accept'] = 'application/json'
|
|
234
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
235
|
+
|
|
236
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
237
|
+
timeout ||= @sdk_configuration.timeout
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
connection = @sdk_configuration.client
|
|
241
|
+
|
|
242
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
243
|
+
config: @sdk_configuration,
|
|
244
|
+
base_url: base_url,
|
|
245
|
+
oauth2_scopes: nil,
|
|
246
|
+
operation_id: 'get-v1-payroll_digests-payroll_digest_uuid',
|
|
247
|
+
security_source: -> { security }
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
251
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
begin
|
|
255
|
+
http_response = T.must(connection).get(url) do |req|
|
|
256
|
+
req.headers.merge!(headers)
|
|
257
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
258
|
+
Utils.configure_request_security(req, security)
|
|
259
|
+
http_headers&.each do |key, value|
|
|
260
|
+
req.headers[key.to_s] = value
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
@sdk_configuration.hooks.before_request(
|
|
264
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
265
|
+
hook_ctx: hook_ctx
|
|
266
|
+
),
|
|
267
|
+
request: req
|
|
268
|
+
)
|
|
269
|
+
end
|
|
270
|
+
rescue StandardError => e
|
|
271
|
+
error = e
|
|
272
|
+
ensure
|
|
273
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
274
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
275
|
+
error: error,
|
|
276
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
277
|
+
hook_ctx: hook_ctx
|
|
278
|
+
),
|
|
279
|
+
response: http_response
|
|
280
|
+
)
|
|
281
|
+
else
|
|
282
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
283
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
284
|
+
hook_ctx: hook_ctx
|
|
285
|
+
),
|
|
286
|
+
response: http_response
|
|
287
|
+
)
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
if http_response.nil?
|
|
291
|
+
raise error if !error.nil?
|
|
292
|
+
raise 'no response'
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
297
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
298
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
299
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
300
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
301
|
+
hook_ctx: hook_ctx
|
|
302
|
+
),
|
|
303
|
+
response: http_response
|
|
304
|
+
)
|
|
305
|
+
response_data = http_response.env.response_body
|
|
306
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::PayrollDigestResults)
|
|
307
|
+
response = Models::Operations::GetV1PayrollDigestsPayrollDigestUuidResponse.new(
|
|
308
|
+
status_code: http_response.status,
|
|
309
|
+
content_type: content_type,
|
|
310
|
+
raw_response: http_response,
|
|
311
|
+
payroll_digest_results: T.unsafe(obj)
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
return response
|
|
315
|
+
else
|
|
316
|
+
raise ::GustoEmbedded::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
317
|
+
end
|
|
318
|
+
elsif Utils.match_status_code(http_response.status, ['404', '410'])
|
|
319
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
320
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
321
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
322
|
+
hook_ctx: hook_ctx
|
|
323
|
+
),
|
|
324
|
+
response: http_response
|
|
325
|
+
)
|
|
326
|
+
response_data = http_response.env.response_body
|
|
327
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundErrorObject)
|
|
328
|
+
raise obj
|
|
329
|
+
else
|
|
330
|
+
raise ::GustoEmbedded::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
331
|
+
end
|
|
332
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
333
|
+
raise ::GustoEmbedded::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
334
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
335
|
+
raise ::GustoEmbedded::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
336
|
+
else
|
|
337
|
+
raise ::GustoEmbedded::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
338
|
+
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
end
|
|
@@ -764,12 +764,12 @@ module GustoEmbedded
|
|
|
764
764
|
response: http_response
|
|
765
765
|
)
|
|
766
766
|
response_data = http_response.env.response_body
|
|
767
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::
|
|
767
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::EmployeesAnnualFicaWageReportAcceptance)
|
|
768
768
|
response = Models::Operations::PostV1CompaniesCompanyIdReportsEmployeesAnnualFicaWageResponse.new(
|
|
769
769
|
status_code: http_response.status,
|
|
770
770
|
content_type: content_type,
|
|
771
771
|
raw_response: http_response,
|
|
772
|
-
|
|
772
|
+
employees_annual_fica_wage_report_acceptance: T.unsafe(obj)
|
|
773
773
|
)
|
|
774
774
|
|
|
775
775
|
return response
|
|
@@ -91,9 +91,9 @@ module GustoEmbedded
|
|
|
91
91
|
end
|
|
92
92
|
@language = 'ruby'
|
|
93
93
|
@openapi_doc_version = '2025-06-15'
|
|
94
|
-
@sdk_version = '0.3.
|
|
95
|
-
@gen_version = '2.
|
|
96
|
-
@user_agent = 'speakeasy-sdk/ruby 0.3.
|
|
94
|
+
@sdk_version = '0.3.1'
|
|
95
|
+
@gen_version = '2.889.1'
|
|
96
|
+
@user_agent = 'speakeasy-sdk/ruby 0.3.1 2.889.1 2025-06-15 gusto_embedded_client'
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
sig { returns([String, T::Hash[Symbol, String]]) }
|