fern_gusto 0.0.6.pre.alpha6
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 +7 -0
- data/lib/base_gusto.rb +175 -0
- data/lib/core/file_utilities.rb +27 -0
- data/lib/environment.rb +9 -0
- data/lib/fern_gusto/ach_transactions/client.rb +119 -0
- data/lib/fern_gusto/admins/types/admin.rb +82 -0
- data/lib/fern_gusto/companies/attachments/client.rb +335 -0
- data/lib/fern_gusto/companies/attachments/types/attachments_create_request_category.rb +15 -0
- data/lib/fern_gusto/companies/attachments/types/attachments_get_download_url_response.rb +56 -0
- data/lib/fern_gusto/companies/bank_accounts/client.rb +435 -0
- data/lib/fern_gusto/companies/bank_accounts/types/bank_accounts_create_request_account_type.rb +15 -0
- data/lib/fern_gusto/companies/benefits/client.rb +862 -0
- data/lib/fern_gusto/companies/client.rb +1104 -0
- data/lib/fern_gusto/companies/departments/client.rb +587 -0
- data/lib/fern_gusto/companies/departments/types/departments_add_people_request_contractors_item.rb +59 -0
- data/lib/fern_gusto/companies/departments/types/departments_add_people_request_employees_item.rb +59 -0
- data/lib/fern_gusto/companies/departments/types/departments_remove_people_request_contractors_item.rb +59 -0
- data/lib/fern_gusto/companies/departments/types/departments_remove_people_request_employees_item.rb +59 -0
- data/lib/fern_gusto/companies/employees/client.rb +376 -0
- data/lib/fern_gusto/companies/external_payrolls/client.rb +605 -0
- data/lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item.rb +98 -0
- data/lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_benefits_item.rb +79 -0
- data/lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_earnings_item.rb +87 -0
- data/lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_earnings_item_earning_type.rb +15 -0
- data/lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_taxes_item.rb +69 -0
- data/lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_tax_liabilities_request_liability_selections_item.rb +80 -0
- data/lib/fern_gusto/companies/federal_tax_details/client.rb +212 -0
- data/lib/fern_gusto/companies/federal_tax_details/types/federal_tax_details_update_request_tax_payer_type.rb +25 -0
- data/lib/fern_gusto/companies/forms/client.rb +345 -0
- data/lib/fern_gusto/companies/industry_selection/client.rb +207 -0
- data/lib/fern_gusto/companies/locations/client.rb +417 -0
- data/lib/fern_gusto/companies/pay_schedules/client.rb +377 -0
- data/lib/fern_gusto/companies/payment_configs/client.rb +198 -0
- data/lib/fern_gusto/companies/payment_configs/types/payment_configs_update_request_payment_speed.rb +19 -0
- data/lib/fern_gusto/companies/signatories/client.rb +513 -0
- data/lib/fern_gusto/companies/signatories/types/signatories_create_request_home_address.rb +89 -0
- data/lib/fern_gusto/companies/signatories/types/signatories_update_request_home_address.rb +88 -0
- data/lib/fern_gusto/companies/tax_requirements/client.rb +367 -0
- data/lib/fern_gusto/companies/tax_requirements/types/tax_requirements_list_response_item.rb +75 -0
- data/lib/fern_gusto/companies/tax_requirements/types/tax_requirements_update_state_request_requirement_sets_item.rb +88 -0
- data/lib/fern_gusto/companies/tax_requirements/types/tax_requirements_update_state_request_requirement_sets_item_requirements_item.rb +70 -0
- data/lib/fern_gusto/companies/types/companies_accept_terms_response.rb +56 -0
- data/lib/fern_gusto/companies/types/companies_create_request_company.rb +83 -0
- data/lib/fern_gusto/companies/types/companies_create_request_user.rb +81 -0
- data/lib/fern_gusto/companies/types/companies_create_response.rb +82 -0
- data/lib/fern_gusto/companies/types/companies_get_custom_fields_response.rb +59 -0
- data/lib/fern_gusto/companies/types/companies_migrate_to_embedded_payroll_response.rb +68 -0
- data/lib/fern_gusto/companies/types/companies_retrieve_terms_response.rb +56 -0
- data/lib/fern_gusto/companies/types/company.rb +223 -0
- data/lib/fern_gusto/companies/types/company_company_status.rb +21 -0
- data/lib/fern_gusto/companies/types/company_compensations.rb +85 -0
- data/lib/fern_gusto/companies/types/company_compensations_fixed_item.rb +55 -0
- data/lib/fern_gusto/companies/types/company_compensations_hourly_item.rb +65 -0
- data/lib/fern_gusto/companies/types/company_compensations_paid_time_off_item.rb +55 -0
- data/lib/fern_gusto/companies/types/company_entity_type.rb +23 -0
- data/lib/fern_gusto/companies/types/company_funding_type.rb +15 -0
- data/lib/fern_gusto/companies/types/company_onboarding_status.rb +77 -0
- data/lib/fern_gusto/companies/types/company_onboarding_status_onboarding_steps_item.rb +97 -0
- data/lib/fern_gusto/companies/types/company_pay_schedule_type.rb +15 -0
- data/lib/fern_gusto/companies/types/company_primary_payroll_admin.rb +80 -0
- data/lib/fern_gusto/companies/types/company_primary_signatory.rb +100 -0
- data/lib/fern_gusto/companies/types/company_primary_signatory_home_address.rb +93 -0
- data/lib/fern_gusto/companies/types/company_tier.rb +20 -0
- data/lib/fern_gusto/company_attachment/types/company_attachment.rb +81 -0
- data/lib/fern_gusto/company_attachment/types/company_attachment_category.rb +13 -0
- data/lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb +157 -0
- data/lib/fern_gusto/company_bank_accounts/types/company_bank_account_account_type.rb +13 -0
- data/lib/fern_gusto/company_bank_accounts/types/company_bank_account_plaid_status.rb +14 -0
- data/lib/fern_gusto/company_bank_accounts/types/company_bank_account_verification_status.rb +19 -0
- data/lib/fern_gusto/company_bank_accounts/types/company_bank_account_verification_type.rb +17 -0
- data/lib/fern_gusto/company_benefits/types/benefit_summary.rb +104 -0
- data/lib/fern_gusto/company_benefits/types/benefit_summary_employees.rb +113 -0
- data/lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb +107 -0
- data/lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits_pay_period.rb +67 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements.rb +156 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_catch_up.rb +86 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_catch_up_default_value.rb +67 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_company_contribution_annual_maximum.rb +88 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_company_contribution_annual_maximum_default_value.rb +68 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_contribution.rb +86 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_contribution_default_value.rb +67 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_coverage_amount.rb +87 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_coverage_amount_default_value.rb +67 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_coverage_salary_multiplier.rb +88 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_coverage_salary_multiplier_default_value.rb +67 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_deduct_as_percentage.rb +88 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_deduct_as_percentage_default_value.rb +67 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_employee_deduction.rb +88 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_employee_deduction_default_value.rb +67 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_limit_option.rb +86 -0
- data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_limit_option_default_value.rb +67 -0
- data/lib/fern_gusto/contractor/types/contractor_onboarding_info.rb +78 -0
- data/lib/fern_gusto/contractor/types/contractor_onboarding_status_onboarding_status.rb +14 -0
- data/lib/fern_gusto/contractor/types/contractor_onboarding_status_onboarding_steps_item.rb +88 -0
- data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_for_group.rb +145 -0
- data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_for_group_payment_method.rb +15 -0
- data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_for_group_status.rb +16 -0
- data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_for_group_wage_type.rb +13 -0
- data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_group.rb +127 -0
- data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_group_minimal.rb +116 -0
- data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_group_minimal_status.rb +16 -0
- data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_group_minimal_totals.rb +74 -0
- data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_group_status.rb +16 -0
- data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_group_totals.rb +74 -0
- data/lib/fern_gusto/contractor_payment_method/types/contractor_bank_account.rb +94 -0
- data/lib/fern_gusto/contractor_payment_method/types/contractor_bank_account_account_type.rb +13 -0
- data/lib/fern_gusto/contractor_payment_method/types/contractor_payment_method.rb +96 -0
- data/lib/fern_gusto/contractor_payment_method/types/contractor_payment_method_split_by.rb +15 -0
- data/lib/fern_gusto/contractor_payment_method/types/contractor_payment_method_type.rb +14 -0
- data/lib/fern_gusto/contractor_payments/types/contractor_payment.rb +146 -0
- data/lib/fern_gusto/contractor_payments/types/contractor_payment_payment_method.rb +15 -0
- data/lib/fern_gusto/contractor_payments/types/contractor_payment_status.rb +13 -0
- data/lib/fern_gusto/contractor_payments/types/contractor_payment_summary.rb +81 -0
- data/lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates.rb +81 -0
- data/lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_item.rb +93 -0
- data/lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_total.rb +67 -0
- data/lib/fern_gusto/contractor_payments/types/contractor_payment_summary_contractor_payments_item.rb +86 -0
- data/lib/fern_gusto/contractor_payments/types/contractor_payment_summary_total.rb +67 -0
- data/lib/fern_gusto/contractor_payments/types/contractor_payment_wage_type.rb +13 -0
- data/lib/fern_gusto/contractors/client.rb +1025 -0
- data/lib/fern_gusto/contractors/documents/client.rb +269 -0
- data/lib/fern_gusto/contractors/documents/types/documents_sign_request_fields_item.rb +67 -0
- data/lib/fern_gusto/contractors/forms/client.rb +343 -0
- data/lib/fern_gusto/contractors/payment_groups/client.rb +569 -0
- data/lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb +102 -0
- data/lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item_payment_method.rb +15 -0
- data/lib/fern_gusto/contractors/payment_groups/types/payment_groups_preview_request_contractor_payments_item.rb +102 -0
- data/lib/fern_gusto/contractors/payment_groups/types/payment_groups_preview_request_contractor_payments_item_payment_method.rb +15 -0
- data/lib/fern_gusto/contractors/payment_method/client.rb +369 -0
- data/lib/fern_gusto/contractors/payment_method/types/payment_method_create_bank_account_request_account_type.rb +14 -0
- data/lib/fern_gusto/contractors/payment_method/types/payment_method_update_request_type.rb +17 -0
- data/lib/fern_gusto/contractors/payments/client.rb +558 -0
- data/lib/fern_gusto/contractors/payments/types/payments_create_request_payment_method.rb +15 -0
- data/lib/fern_gusto/contractors/payments/types/payments_list_response.rb +62 -0
- data/lib/fern_gusto/contractors/types/contractor.rb +227 -0
- data/lib/fern_gusto/contractors/types/contractor_address.rb +94 -0
- data/lib/fern_gusto/contractors/types/contractor_onboarding_status.rb +18 -0
- data/lib/fern_gusto/contractors/types/contractor_type.rb +13 -0
- data/lib/fern_gusto/contractors/types/contractor_wage_type.rb +13 -0
- data/lib/fern_gusto/custom_fields/types/company_custom_field.rb +88 -0
- data/lib/fern_gusto/custom_fields/types/custom_field_type.rb +16 -0
- data/lib/fern_gusto/custom_fields/types/employee_custom_field.rb +104 -0
- data/lib/fern_gusto/documents/types/document.rb +167 -0
- data/lib/fern_gusto/documents/types/document_fields_item.rb +114 -0
- data/lib/fern_gusto/documents/types/document_pages_item.rb +65 -0
- data/lib/fern_gusto/documents/types/document_recipient_type.rb +15 -0
- data/lib/fern_gusto/documents/types/document_signed.rb +137 -0
- data/lib/fern_gusto/documents/types/document_signed_recipient_type.rb +15 -0
- data/lib/fern_gusto/earning_types/types/earning_type.rb +66 -0
- data/lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb +101 -0
- data/lib/fern_gusto/employee_payment_method/types/employee_bank_account.rb +94 -0
- data/lib/fern_gusto/employee_payment_method/types/employee_bank_account_account_type.rb +13 -0
- data/lib/fern_gusto/employee_payment_method/types/employee_payment_method_info.rb +96 -0
- data/lib/fern_gusto/employee_payment_method/types/employee_payment_method_split_by.rb +15 -0
- data/lib/fern_gusto/employee_payment_method/types/employee_payment_method_type.rb +14 -0
- data/lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb +144 -0
- data/lib/fern_gusto/employee_tax_setup/types/employee_federal_tax_w4data_type.rb +13 -0
- data/lib/fern_gusto/employee_tax_setup/types/employee_state_tax.rb +90 -0
- data/lib/fern_gusto/employee_tax_setup/types/employee_state_tax_answer.rb +74 -0
- data/lib/fern_gusto/employee_tax_setup/types/employee_state_tax_input_question_format.rb +69 -0
- data/lib/fern_gusto/employee_tax_setup/types/employee_state_tax_input_question_format_options_item.rb +67 -0
- data/lib/fern_gusto/employee_tax_setup/types/employee_state_tax_question.rb +96 -0
- data/lib/fern_gusto/employees/adresses/client.rb +885 -0
- data/lib/fern_gusto/employees/benefits/client.rb +656 -0
- data/lib/fern_gusto/employees/benefits/types/benefits_create_request_contribution.rb +93 -0
- data/lib/fern_gusto/employees/benefits/types/benefits_create_request_contribution_type.rb +23 -0
- data/lib/fern_gusto/employees/benefits/types/benefits_create_request_contribution_value.rb +67 -0
- data/lib/fern_gusto/employees/benefits/types/benefits_create_request_contribution_value_item.rb +80 -0
- data/lib/fern_gusto/employees/benefits/types/benefits_create_request_deduction_reduces_taxable_income.rb +18 -0
- data/lib/fern_gusto/employees/benefits/types/benefits_update_request_contribution.rb +93 -0
- data/lib/fern_gusto/employees/benefits/types/benefits_update_request_contribution_type.rb +23 -0
- data/lib/fern_gusto/employees/benefits/types/benefits_update_request_contribution_value.rb +67 -0
- data/lib/fern_gusto/employees/benefits/types/benefits_update_request_contribution_value_item.rb +80 -0
- data/lib/fern_gusto/employees/benefits/types/benefits_update_request_deduction_reduces_taxable_income.rb +18 -0
- data/lib/fern_gusto/employees/client.rb +822 -0
- data/lib/fern_gusto/employees/employments/client.rb +799 -0
- data/lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb +95 -0
- data/lib/fern_gusto/employees/employments/types/employments_get_history_response_item_employment_status.rb +20 -0
- data/lib/fern_gusto/employees/forms/client.rb +433 -0
- data/lib/fern_gusto/employees/forms/types/forms_generate_w2response.rb +132 -0
- data/lib/fern_gusto/employees/garnishments/client.rb +558 -0
- data/lib/fern_gusto/employees/garnishments/types/garnishments_create_request_garnishment_type.rb +20 -0
- data/lib/fern_gusto/employees/jobs_and_compensations/client.rb +938 -0
- data/lib/fern_gusto/employees/jobs_and_compensations/types/jobs_and_compensations_create_compensation_request_minimum_wages_item.rb +62 -0
- data/lib/fern_gusto/employees/jobs_and_compensations/types/jobs_and_compensations_create_compensation_request_payment_unit.rb +19 -0
- data/lib/fern_gusto/employees/jobs_and_compensations/types/jobs_and_compensations_update_compensation_request_minimum_wages_item.rb +62 -0
- data/lib/fern_gusto/employees/jobs_and_compensations/types/jobs_and_compensations_update_compensation_request_payment_unit.rb +19 -0
- data/lib/fern_gusto/employees/payment_method/client.rb +484 -0
- data/lib/fern_gusto/employees/payment_method/types/payment_method_create_bank_account_request_account_type.rb +14 -0
- data/lib/fern_gusto/employees/payment_method/types/payment_method_update_bank_account_request_account_type.rb +14 -0
- data/lib/fern_gusto/employees/payment_method/types/payment_method_update_request_split_by.rb +17 -0
- data/lib/fern_gusto/employees/payment_method/types/payment_method_update_request_splits_item.rb +83 -0
- data/lib/fern_gusto/employees/payment_method/types/payment_method_update_request_type.rb +16 -0
- data/lib/fern_gusto/employees/tax_setup/client.rb +422 -0
- data/lib/fern_gusto/employees/tax_setup/types/tax_setup_update_state_taxes_request_states_item.rb +73 -0
- data/lib/fern_gusto/employees/tax_setup/types/tax_setup_update_state_taxes_request_states_item_questions_item.rb +73 -0
- data/lib/fern_gusto/employees/tax_setup/types/tax_setup_update_state_taxes_request_states_item_questions_item_answers_item.rb +77 -0
- data/lib/fern_gusto/employees/types/employee.rb +281 -0
- data/lib/fern_gusto/employees/types/employee_current_employment_status.rb +20 -0
- data/lib/fern_gusto/employees/types/employee_onboarding_info.rb +77 -0
- data/lib/fern_gusto/employees/types/employee_onboarding_status.rb +19 -0
- data/lib/fern_gusto/employees/types/employee_onboarding_status_onboarding_steps_item.rb +88 -0
- data/lib/fern_gusto/employees/types/employee_payment_method.rb +13 -0
- data/lib/fern_gusto/employees/types/employees_get_custom_fields_response.rb +59 -0
- data/lib/fern_gusto/employees/types/employees_get_request_include.rb +12 -0
- data/lib/fern_gusto/events/client.rb +144 -0
- data/lib/fern_gusto/events/types/events_list_request_sort_order.rb +12 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll.rb +158 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_applicable_benefits_item.rb +73 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_applicable_earnings_item.rb +87 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_applicable_taxes_item.rb +85 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb +101 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_basic_status.rb +16 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_external_payroll_items_item.rb +93 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_external_payroll_items_item_benefits_item.rb +74 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_external_payroll_items_item_earnings_item.rb +81 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_external_payroll_items_item_taxes_item.rb +67 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_metadata.rb +56 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_status.rb +16 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_tax_suggestions.rb +72 -0
- data/lib/fern_gusto/external_payrolls/types/external_payroll_tax_suggestions_tax_suggestions.rb +68 -0
- data/lib/fern_gusto/external_payrolls/types/tax_liabilities_selections.rb +86 -0
- data/lib/fern_gusto/external_payrolls/types/tax_liabilities_selections_possible_liabilities.rb +75 -0
- data/lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb +140 -0
- data/lib/fern_gusto/flows/client.rb +113 -0
- data/lib/fern_gusto/flows/types/flow.rb +66 -0
- data/lib/fern_gusto/flows/types/flows_create_request_entity_type.rb +14 -0
- data/lib/fern_gusto/forms/types/form.rb +123 -0
- data/lib/fern_gusto/forms/types/form1099.rb +126 -0
- data/lib/fern_gusto/generated_documents/client.rb +106 -0
- data/lib/fern_gusto/holiday_pay_policies/client.rb +599 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_add_employees_request_employees_item.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays.rb +198 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_christmas_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_columbus_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_independence_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_juneteenth.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_labor_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_memorial_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_mlk_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_new_years_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_presidents_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_thanksgiving.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_veterans_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_remove_employees_request_employees_item.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays.rb +198 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_christmas_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_columbus_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_independence_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_juneteenth.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_labor_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_memorial_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_mlk_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_new_years_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_presidents_day.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_thanksgiving.rb +57 -0
- data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_veterans_day.rb +57 -0
- data/lib/fern_gusto/industry/types/industry.rb +87 -0
- data/lib/fern_gusto/invoices/client.rb +132 -0
- data/lib/fern_gusto/jobs_and_compensations/types/compensation.rb +120 -0
- data/lib/fern_gusto/jobs_and_compensations/types/compensation_payment_unit.rb +17 -0
- data/lib/fern_gusto/jobs_and_compensations/types/job.rb +161 -0
- data/lib/fern_gusto/locations/types/company_address.rb +103 -0
- data/lib/fern_gusto/locations/types/location.rb +171 -0
- data/lib/fern_gusto/notifications/client.rb +120 -0
- data/lib/fern_gusto/pay_schedules/types/pay_schedule.rb +151 -0
- data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment.rb +103 -0
- data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_department.rb +65 -0
- data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_employee.rb +65 -0
- data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_employee_change.rb +105 -0
- data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_pay_period.rb +80 -0
- data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_preview.rb +71 -0
- data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_preview_type.rb +15 -0
- data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_transition_pay_period.rb +68 -0
- data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_type.rb +15 -0
- data/lib/fern_gusto/pay_schedules/types/pay_schedule_frequency.rb +17 -0
- data/lib/fern_gusto/payment_configs/types/payment_configs.rb +79 -0
- data/lib/fern_gusto/payroll/client.rb +1644 -0
- data/lib/fern_gusto/payroll/earning_types/client.rb +350 -0
- data/lib/fern_gusto/payroll/earning_types/types/earning_types_get_response.rb +74 -0
- data/lib/fern_gusto/payroll/external_payrolls/client.rb +199 -0
- data/lib/fern_gusto/payroll/pay_schedules/client.rb +584 -0
- data/lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_create_request_frequency.rb +17 -0
- data/lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_request_frequency.rb +16 -0
- data/lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response.rb +72 -0
- data/lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response_pay_periods_item.rb +83 -0
- data/lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_update_request_frequency.rb +17 -0
- data/lib/fern_gusto/payroll/types/payroll_create_request_off_cycle_reason.rb +15 -0
- data/lib/fern_gusto/payroll/types/payroll_create_request_withholding_pay_period.rb +18 -0
- data/lib/fern_gusto/payroll/types/payroll_get_request_include_item.rb +14 -0
- data/lib/fern_gusto/payroll/types/payroll_list_request_include_item.rb +13 -0
- data/lib/fern_gusto/payroll/types/payroll_list_request_payroll_types_item.rb +13 -0
- data/lib/fern_gusto/payroll/types/payroll_list_request_processing_statuses_item.rb +12 -0
- data/lib/fern_gusto/payroll/types/payroll_list_request_sort_order.rb +12 -0
- data/lib/fern_gusto/payroll/types/payroll_skip_payroll_request_payroll_type.rb +15 -0
- data/lib/fern_gusto/payroll/types/payroll_submit_request_submission_blockers_item.rb +67 -0
- data/lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb +133 -0
- data/lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_fixed_compensations_item.rb +79 -0
- data/lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_hourly_compensations_item.rb +79 -0
- data/lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_paid_time_off_item.rb +85 -0
- data/lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_payment_method.rb +13 -0
- data/lib/fern_gusto/payrolls/types/employee_pay_stub.rb +94 -0
- data/lib/fern_gusto/payrolls/types/paid_time_off.rb +123 -0
- data/lib/fern_gusto/payrolls/types/paid_time_off_name.rb +14 -0
- data/lib/fern_gusto/payrolls/types/pay_period.rb +86 -0
- data/lib/fern_gusto/payrolls/types/pay_period_payroll.rb +107 -0
- data/lib/fern_gusto/payrolls/types/pay_period_payroll_payroll_type.rb +13 -0
- data/lib/fern_gusto/payrolls/types/payroll.rb +285 -0
- data/lib/fern_gusto/payrolls/types/payroll_minimal.rb +250 -0
- data/lib/fern_gusto/payrolls/types/payroll_prepared.rb +250 -0
- data/lib/fern_gusto/recovery_cases/client.rb +198 -0
- data/lib/fern_gusto/reports/client.rb +306 -0
- data/lib/fern_gusto/reports/types/reports_create_request_columns_item.rb +91 -0
- data/lib/fern_gusto/reports/types/reports_create_request_employment_status.rb +18 -0
- data/lib/fern_gusto/reports/types/reports_create_request_employment_type.rb +16 -0
- data/lib/fern_gusto/reports/types/reports_create_request_file_type.rb +13 -0
- data/lib/fern_gusto/reports/types/reports_create_request_groupings_item.rb +14 -0
- data/lib/fern_gusto/reports/types/reports_create_request_payment_method.rb +13 -0
- data/lib/fern_gusto/signatories/types/signatory.rb +175 -0
- data/lib/fern_gusto/signatories/types/signatory_home_address.rb +93 -0
- data/lib/fern_gusto/signatories/types/signatory_identity_verification_status.rb +28 -0
- data/lib/fern_gusto/terminations/types/termination.rb +109 -0
- data/lib/fern_gusto/time_off_policies/client.rb +863 -0
- data/lib/fern_gusto/time_off_policies/types/time_off_policies_add_employees_request_employees_item.rb +67 -0
- data/lib/fern_gusto/time_off_policies/types/time_off_policies_create_request_accrual_method.rb +19 -0
- data/lib/fern_gusto/time_off_policies/types/time_off_policies_remove_employees_request_employees_item.rb +57 -0
- data/lib/fern_gusto/time_off_policies/types/time_off_policies_update_balance_request_employees_item.rb +67 -0
- data/lib/fern_gusto/time_off_policies/types/time_off_policies_update_request_accrual_method.rb +19 -0
- data/lib/fern_gusto/time_off_requests/types/time_off_request.rb +141 -0
- data/lib/fern_gusto/time_off_requests/types/time_off_request_approver.rb +66 -0
- data/lib/fern_gusto/time_off_requests/types/time_off_request_employee.rb +66 -0
- data/lib/fern_gusto/time_off_requests/types/time_off_request_initiator.rb +66 -0
- data/lib/fern_gusto/time_off_requests/types/time_off_request_request_type.rb +13 -0
- data/lib/fern_gusto/time_off_requests/types/time_off_request_status.rb +14 -0
- data/lib/fern_gusto/token/client.rb +270 -0
- data/lib/fern_gusto/token/types/token_get_info_response.rb +85 -0
- data/lib/fern_gusto/token/types/token_get_info_response_resource.rb +64 -0
- data/lib/fern_gusto/token/types/token_get_info_response_resource_owner.rb +65 -0
- data/lib/fern_gusto/token/types/token_get_info_response_resource_owner_type.rb +13 -0
- data/lib/fern_gusto/token/types/token_get_system_access_token_response.rb +77 -0
- data/lib/fern_gusto/types/accruing_time_off_hour.rb +64 -0
- data/lib/fern_gusto/types/ach_transaction.rb +162 -0
- data/lib/fern_gusto/types/ach_transaction_payment_direction.rb +11 -0
- data/lib/fern_gusto/types/ach_transaction_payment_event_type.rb +11 -0
- data/lib/fern_gusto/types/ach_transaction_payment_status.rb +13 -0
- data/lib/fern_gusto/types/ach_transaction_recipient_type.rb +11 -0
- data/lib/fern_gusto/types/address.rb +111 -0
- data/lib/fern_gusto/types/authentication.rb +96 -0
- data/lib/fern_gusto/types/child_support_data.rb +58 -0
- data/lib/fern_gusto/types/child_support_data_agencies_item.rb +104 -0
- data/lib/fern_gusto/types/child_support_data_agencies_item_fips_codes_item.rb +67 -0
- data/lib/fern_gusto/types/child_support_data_agencies_item_required_attributes_item.rb +70 -0
- data/lib/fern_gusto/types/child_support_data_agencies_item_required_attributes_item_key.rb +14 -0
- data/lib/fern_gusto/types/company_benefit.rb +135 -0
- data/lib/fern_gusto/types/company_benefit_with_employee_benefits.rb +148 -0
- data/lib/fern_gusto/types/company_benefit_with_employee_benefits_employee_benefits_item.rb +115 -0
- data/lib/fern_gusto/types/company_benefit_with_employee_benefits_employee_benefits_item_contribution.rb +91 -0
- data/lib/fern_gusto/types/company_benefit_with_employee_benefits_employee_benefits_item_contribution_value.rb +61 -0
- data/lib/fern_gusto/types/company_benefit_with_employee_benefits_employee_benefits_item_contribution_value_tiers.rb +60 -0
- data/lib/fern_gusto/types/company_benefit_with_employee_benefits_employee_benefits_item_contribution_value_tiers_tiers_item.rb +86 -0
- data/lib/fern_gusto/types/contractor_address_info.rb +118 -0
- data/lib/fern_gusto/types/contractor_body.rb +200 -0
- data/lib/fern_gusto/types/contractor_body_type.rb +11 -0
- data/lib/fern_gusto/types/contractor_body_wage_type.rb +11 -0
- data/lib/fern_gusto/types/contractor_payment_receipt.rb +161 -0
- data/lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb +120 -0
- data/lib/fern_gusto/types/contractor_payment_receipt_licensee.rb +92 -0
- data/lib/fern_gusto/types/contractor_payment_receipt_totals.rb +54 -0
- data/lib/fern_gusto/types/create_report.rb +77 -0
- data/lib/fern_gusto/types/department.rb +103 -0
- data/lib/fern_gusto/types/department_contractors_item.rb +53 -0
- data/lib/fern_gusto/types/department_employees_item.rb +53 -0
- data/lib/fern_gusto/types/document_pdf.rb +63 -0
- data/lib/fern_gusto/types/employee_address.rb +139 -0
- data/lib/fern_gusto/types/employee_benefit.rb +220 -0
- data/lib/fern_gusto/types/employee_benefit_base_object.rb +199 -0
- data/lib/fern_gusto/types/employee_benefit_base_object_contribution.rb +89 -0
- data/lib/fern_gusto/types/employee_benefit_base_object_contribution_value.rb +61 -0
- data/lib/fern_gusto/types/employee_benefit_base_object_contribution_value_tiers.rb +59 -0
- data/lib/fern_gusto/types/employee_benefit_base_object_contribution_value_tiers_tiers_item.rb +85 -0
- data/lib/fern_gusto/types/employee_benefit_base_object_deduction_reduces_taxable_income.rb +14 -0
- data/lib/fern_gusto/types/employee_benefit_for_company_benefit.rb +220 -0
- data/lib/fern_gusto/types/employee_work_address.rb +137 -0
- data/lib/fern_gusto/types/entity_error_object.rb +102 -0
- data/lib/fern_gusto/types/entity_error_object_errors_item.rb +89 -0
- data/lib/fern_gusto/types/event.rb +99 -0
- data/lib/fern_gusto/types/flsa_status_type.rb +23 -0
- data/lib/fern_gusto/types/form_pdf.rb +63 -0
- data/lib/fern_gusto/types/garnishment.rb +172 -0
- data/lib/fern_gusto/types/garnishment_child_support.rb +113 -0
- data/lib/fern_gusto/types/garnishment_child_support_payment_period.rb +14 -0
- data/lib/fern_gusto/types/garnishment_garnishment_type.rb +16 -0
- data/lib/fern_gusto/types/generated_document.rb +70 -0
- data/lib/fern_gusto/types/gross_up_pay.rb +53 -0
- data/lib/fern_gusto/types/historical_employee_body.rb +156 -0
- data/lib/fern_gusto/types/historical_employee_body_employee_state_taxes.rb +80 -0
- data/lib/fern_gusto/types/historical_employee_body_home_address.rb +84 -0
- data/lib/fern_gusto/types/historical_employee_body_job.rb +53 -0
- data/lib/fern_gusto/types/historical_employee_body_termination.rb +53 -0
- data/lib/fern_gusto/types/historical_employee_body_work_address.rb +53 -0
- data/lib/fern_gusto/types/holiday_pay_policy.rb +88 -0
- data/lib/fern_gusto/types/holiday_pay_policy_employees_item.rb +53 -0
- data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb +179 -0
- data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_columbus_day.rb +72 -0
- data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_independence_day.rb +72 -0
- data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_juneteenth.rb +72 -0
- data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_labor_day.rb +72 -0
- data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_memorial_day.rb +72 -0
- data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_mlk_day.rb +72 -0
- data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_new_years_day.rb +72 -0
- data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_presidents_day.rb +72 -0
- data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_thanksgiving.rb +72 -0
- data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_veterans_day.rb +72 -0
- data/lib/fern_gusto/types/invoice_data.rb +58 -0
- data/lib/fern_gusto/types/invoice_data_active_companies_item.rb +91 -0
- data/lib/fern_gusto/types/minimum_wage.rb +96 -0
- data/lib/fern_gusto/types/notification.rb +125 -0
- data/lib/fern_gusto/types/notification_resources_item.rb +85 -0
- data/lib/fern_gusto/types/off_cycle_reason_type.rb +19 -0
- data/lib/fern_gusto/types/paid_holidays.rb +61 -0
- data/lib/fern_gusto/types/paid_holidays_schema.rb +77 -0
- data/lib/fern_gusto/types/pay_schedule_assignment_body.rb +111 -0
- data/lib/fern_gusto/types/pay_schedule_assignment_body_departments_item.rb +65 -0
- data/lib/fern_gusto/types/pay_schedule_assignment_body_employees_item.rb +64 -0
- data/lib/fern_gusto/types/pay_schedule_assignment_body_type.rb +13 -0
- data/lib/fern_gusto/types/payment_method_bank_account.rb +87 -0
- data/lib/fern_gusto/types/payroll_blocker.rb +63 -0
- data/lib/fern_gusto/types/payroll_blockers_error.rb +60 -0
- data/lib/fern_gusto/types/payroll_blockers_error_errors_item.rb +83 -0
- data/lib/fern_gusto/types/payroll_blockers_error_errors_item_metadata.rb +54 -0
- data/lib/fern_gusto/types/payroll_check.rb +84 -0
- data/lib/fern_gusto/types/payroll_company_taxes_type.rb +6 -0
- data/lib/fern_gusto/types/payroll_company_taxes_type_item.rb +70 -0
- data/lib/fern_gusto/types/payroll_credit_blockers_type.rb +6 -0
- data/lib/fern_gusto/types/payroll_credit_blockers_type_item.rb +89 -0
- data/lib/fern_gusto/types/payroll_credit_blockers_type_item_status.rb +13 -0
- data/lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb +72 -0
- data/lib/fern_gusto/types/payroll_employee_compensations_type.rb +6 -0
- data/lib/fern_gusto/types/payroll_employee_compensations_type_item.rb +216 -0
- data/lib/fern_gusto/types/payroll_employee_compensations_type_item_benefits_item.rb +79 -0
- data/lib/fern_gusto/types/payroll_employee_compensations_type_item_deductions_item.rb +65 -0
- data/lib/fern_gusto/types/payroll_employee_compensations_type_item_fixed_compensations_item.rb +74 -0
- data/lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb +92 -0
- data/lib/fern_gusto/types/payroll_employee_compensations_type_item_paid_time_off_item.rb +76 -0
- data/lib/fern_gusto/types/payroll_employee_compensations_type_item_payment_method.rb +11 -0
- data/lib/fern_gusto/types/payroll_employee_compensations_type_item_taxes_item.rb +70 -0
- data/lib/fern_gusto/types/payroll_fixed_compensation_types_type.rb +6 -0
- data/lib/fern_gusto/types/payroll_fixed_compensation_types_type_item.rb +54 -0
- data/lib/fern_gusto/types/payroll_pay_period_type.rb +70 -0
- data/lib/fern_gusto/types/payroll_payment_speed_changed_type.rb +86 -0
- data/lib/fern_gusto/types/payroll_payroll_status_meta_type.rb +92 -0
- data/lib/fern_gusto/types/payroll_processing_request.rb +68 -0
- data/lib/fern_gusto/types/payroll_processing_request_status.rb +14 -0
- data/lib/fern_gusto/types/payroll_receipt.rb +177 -0
- data/lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb +116 -0
- data/lib/fern_gusto/types/payroll_receipt_licensee.rb +92 -0
- data/lib/fern_gusto/types/payroll_receipt_taxes_item.rb +63 -0
- data/lib/fern_gusto/types/payroll_receipt_totals.rb +85 -0
- data/lib/fern_gusto/types/payroll_reversal.rb +91 -0
- data/lib/fern_gusto/types/payroll_submission_blockers_type.rb +6 -0
- data/lib/fern_gusto/types/payroll_submission_blockers_type_item.rb +89 -0
- data/lib/fern_gusto/types/payroll_submission_blockers_type_item_status.rb +11 -0
- data/lib/fern_gusto/types/payroll_submission_blockers_type_item_unblock_options_item.rb +72 -0
- data/lib/fern_gusto/types/payroll_totals_type.rb +199 -0
- data/lib/fern_gusto/types/payroll_withholding_pay_period_type.rb +17 -0
- data/lib/fern_gusto/types/recovery_case.rb +131 -0
- data/lib/fern_gusto/types/recovery_case_status.rb +14 -0
- data/lib/fern_gusto/types/rehire.rb +116 -0
- data/lib/fern_gusto/types/rehire_body.rb +91 -0
- data/lib/fern_gusto/types/rehire_body_employment_status.rb +16 -0
- data/lib/fern_gusto/types/rehire_employment_status.rb +16 -0
- data/lib/fern_gusto/types/report.rb +72 -0
- data/lib/fern_gusto/types/report_template.rb +77 -0
- data/lib/fern_gusto/types/supported_benefit.rb +122 -0
- data/lib/fern_gusto/types/tax_requirement.rb +111 -0
- data/lib/fern_gusto/types/tax_requirement_applicable_if_item.rb +69 -0
- data/lib/fern_gusto/types/tax_requirement_applicable_if_item_value.rb +72 -0
- data/lib/fern_gusto/types/tax_requirement_effective_from.rb +5 -0
- data/lib/fern_gusto/types/tax_requirement_metadata.rb +182 -0
- data/lib/fern_gusto/types/tax_requirement_metadata_options_item.rb +70 -0
- data/lib/fern_gusto/types/tax_requirement_metadata_rate_type.rb +13 -0
- data/lib/fern_gusto/types/tax_requirement_metadata_type.rb +31 -0
- data/lib/fern_gusto/types/tax_requirement_metadata_validation.rb +81 -0
- data/lib/fern_gusto/types/tax_requirement_metadata_validation_type.rb +11 -0
- data/lib/fern_gusto/types/tax_requirement_set.rb +90 -0
- data/lib/fern_gusto/types/tax_requirements_state.rb +75 -0
- data/lib/fern_gusto/types/time_off_activity.rb +107 -0
- data/lib/fern_gusto/types/time_off_activity_time_off_type.rb +11 -0
- data/lib/fern_gusto/types/time_off_policy.rb +183 -0
- data/lib/fern_gusto/types/time_off_policy_employees_item.rb +53 -0
- data/lib/fern_gusto/types/time_off_policy_policy_type.rb +11 -0
- data/lib/fern_gusto/types/unprocessable_entity_error_body.rb +59 -0
- data/lib/fern_gusto/types/unprocessable_entity_error_body_errors.rb +57 -0
- data/lib/fern_gusto/types/unprocessable_entity_error_body_errors_base_item.rb +72 -0
- data/lib/fern_gusto/types/unprocessable_entity_error_body_item.rb +65 -0
- data/lib/fern_gusto/types/unprocessable_entity_error_body_item_questions_item.rb +69 -0
- data/lib/fern_gusto/types/unprocessable_entity_error_body_item_questions_item_answers_item.rb +72 -0
- data/lib/fern_gusto/types/unprocessable_entity_error_object.rb +63 -0
- data/lib/fern_gusto/types/versionable.rb +57 -0
- data/lib/fern_gusto/types/versionable_required.rb +55 -0
- data/lib/fern_gusto/types/wire_in_request.rb +170 -0
- data/lib/fern_gusto/types/wire_in_request_status.rb +14 -0
- data/lib/fern_gusto/webhooks/client.rb +627 -0
- data/lib/fern_gusto/webhooks/types/webhook_subscription.rb +82 -0
- data/lib/fern_gusto/webhooks/types/webhook_subscription_status.rb +14 -0
- data/lib/fern_gusto/webhooks/types/webhook_subscription_subscription_types_item.rb +25 -0
- data/lib/fern_gusto/webhooks/types/webhooks_create_request_subscription_types_item.rb +25 -0
- data/lib/fern_gusto/webhooks/types/webhooks_update_request_subscription_types_item.rb +25 -0
- data/lib/fern_gusto/wire_in_requests/client.rb +273 -0
- data/lib/fern_gusto.rb +310 -0
- data/lib/gemconfig.rb +13 -0
- data/lib/gusto_legacy.rb +19 -0
- data/lib/requests.rb +206 -0
- data/lib/types_export.rb +461 -0
- metadata +671 -0
@@ -0,0 +1,1104 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative "../../requests"
|
3
|
+
require_relative "attachments/client"
|
4
|
+
require_relative "federal_tax_details/client"
|
5
|
+
require_relative "industry_selection/client"
|
6
|
+
require_relative "signatories/client"
|
7
|
+
require_relative "locations/client"
|
8
|
+
require_relative "bank_accounts/client"
|
9
|
+
require_relative "external_payrolls/client"
|
10
|
+
require_relative "payment_configs/client"
|
11
|
+
require_relative "pay_schedules/client"
|
12
|
+
require_relative "employees/client"
|
13
|
+
require_relative "departments/client"
|
14
|
+
require_relative "forms/client"
|
15
|
+
require_relative "benefits/client"
|
16
|
+
require_relative "tax_requirements/client"
|
17
|
+
require_relative "types/companies_create_request_user"
|
18
|
+
require_relative "types/companies_create_request_company"
|
19
|
+
require_relative "types/companies_create_response"
|
20
|
+
require_relative "types/company"
|
21
|
+
require_relative "types/companies_migrate_to_embedded_payroll_response"
|
22
|
+
require_relative "types/companies_accept_terms_response"
|
23
|
+
require_relative "types/companies_retrieve_terms_response"
|
24
|
+
require_relative "../admins/types/admin"
|
25
|
+
require "json"
|
26
|
+
require_relative "types/company_onboarding_status"
|
27
|
+
require_relative "types/companies_get_custom_fields_response"
|
28
|
+
require "async"
|
29
|
+
require "async"
|
30
|
+
require "async"
|
31
|
+
require "async"
|
32
|
+
require "async"
|
33
|
+
require "async"
|
34
|
+
require "async"
|
35
|
+
require "async"
|
36
|
+
require "async"
|
37
|
+
require "async"
|
38
|
+
require "async"
|
39
|
+
require_relative "../../requests"
|
40
|
+
|
41
|
+
module Gusto
|
42
|
+
class CompaniesClient
|
43
|
+
# @return [Gusto::RequestClient]
|
44
|
+
attr_reader :request_client
|
45
|
+
# @return [Gusto::Companies::AttachmentsClient]
|
46
|
+
attr_reader :attachments
|
47
|
+
# @return [Gusto::Companies::FederalTaxDetailsClient]
|
48
|
+
attr_reader :federal_tax_details
|
49
|
+
# @return [Gusto::Companies::IndustrySelectionClient]
|
50
|
+
attr_reader :industry_selection
|
51
|
+
# @return [Gusto::Companies::SignatoriesClient]
|
52
|
+
attr_reader :signatories
|
53
|
+
# @return [Gusto::Companies::LocationsClient]
|
54
|
+
attr_reader :locations
|
55
|
+
# @return [Gusto::Companies::BankAccountsClient]
|
56
|
+
attr_reader :bank_accounts
|
57
|
+
# @return [Gusto::Companies::ExternalPayrollsClient]
|
58
|
+
attr_reader :external_payrolls
|
59
|
+
# @return [Gusto::Companies::PaymentConfigsClient]
|
60
|
+
attr_reader :payment_configs
|
61
|
+
# @return [Gusto::Companies::PaySchedulesClient]
|
62
|
+
attr_reader :pay_schedules
|
63
|
+
# @return [Gusto::Companies::EmployeesClient]
|
64
|
+
attr_reader :employees
|
65
|
+
# @return [Gusto::Companies::DepartmentsClient]
|
66
|
+
attr_reader :departments
|
67
|
+
# @return [Gusto::Companies::FormsClient]
|
68
|
+
attr_reader :forms
|
69
|
+
# @return [Gusto::Companies::BenefitsClient]
|
70
|
+
attr_reader :benefits
|
71
|
+
# @return [Gusto::Companies::TaxRequirementsClient]
|
72
|
+
attr_reader :tax_requirements
|
73
|
+
|
74
|
+
|
75
|
+
# @param request_client [Gusto::RequestClient]
|
76
|
+
# @return [Gusto::CompaniesClient]
|
77
|
+
def initialize(request_client:)
|
78
|
+
@request_client = request_client
|
79
|
+
@attachments = Gusto::Companies::AttachmentsClient.new(request_client: request_client)
|
80
|
+
@federal_tax_details = Gusto::Companies::FederalTaxDetailsClient.new(request_client: request_client)
|
81
|
+
@industry_selection = Gusto::Companies::IndustrySelectionClient.new(request_client: request_client)
|
82
|
+
@signatories = Gusto::Companies::SignatoriesClient.new(request_client: request_client)
|
83
|
+
@locations = Gusto::Companies::LocationsClient.new(request_client: request_client)
|
84
|
+
@bank_accounts = Gusto::Companies::BankAccountsClient.new(request_client: request_client)
|
85
|
+
@external_payrolls = Gusto::Companies::ExternalPayrollsClient.new(request_client: request_client)
|
86
|
+
@payment_configs = Gusto::Companies::PaymentConfigsClient.new(request_client: request_client)
|
87
|
+
@pay_schedules = Gusto::Companies::PaySchedulesClient.new(request_client: request_client)
|
88
|
+
@employees = Gusto::Companies::EmployeesClient.new(request_client: request_client)
|
89
|
+
@departments = Gusto::Companies::DepartmentsClient.new(request_client: request_client)
|
90
|
+
@forms = Gusto::Companies::FormsClient.new(request_client: request_client)
|
91
|
+
@benefits = Gusto::Companies::BenefitsClient.new(request_client: request_client)
|
92
|
+
@tax_requirements = Gusto::Companies::TaxRequirementsClient.new(request_client: request_client)
|
93
|
+
end
|
94
|
+
# Create a partner managed company. When you successfully call the API, it does
|
95
|
+
# the following:
|
96
|
+
# - Creates a new company in Gusto
|
97
|
+
# - Creates a new user using the provided email if the user does not already
|
98
|
+
# exist.
|
99
|
+
# - Makes the user the primary payroll administrator of the new company.
|
100
|
+
# In response, you will receive oauth access tokens for the created company.
|
101
|
+
# IMPORTANT: the returned access and refresh tokens are reserved for this company
|
102
|
+
# only. They cannot be used to access other companies AND previously granted
|
103
|
+
# tokens cannot be used to access this company.
|
104
|
+
# > 📘 System Access Authentication
|
105
|
+
# >
|
106
|
+
# > this endpoint uses the [Bearer Auth scheme with the system-level access token
|
107
|
+
# in the HTTP Authorization
|
108
|
+
# header](https://docs.gusto.com/embedded-payroll/docs/system-access)
|
109
|
+
#
|
110
|
+
# @param user [Hash] Information for the user who will be the primary payroll administrator for the
|
111
|
+
# new company.Request of type Gusto::Companies::CompaniesCreateRequestUser, as a Hash
|
112
|
+
# * :first_name (String)
|
113
|
+
# * :last_name (String)
|
114
|
+
# * :email (String)
|
115
|
+
# * :phone (String)
|
116
|
+
# @param company [Hash] Request of type Gusto::Companies::CompaniesCreateRequestCompany, as a Hash
|
117
|
+
# * :name (String)
|
118
|
+
# * :trade_name (String)
|
119
|
+
# * :ein (String)
|
120
|
+
# * :contractor_only (Boolean)
|
121
|
+
# @param request_options [Gusto::RequestOptions]
|
122
|
+
# @return [Gusto::Companies::CompaniesCreateResponse]
|
123
|
+
# @example
|
124
|
+
# api = Gusto::Client.new(
|
125
|
+
# base_url: "https://api.example.com",
|
126
|
+
# environment: Gusto::Environment::DEMO,
|
127
|
+
# token: "YOUR_AUTH_TOKEN"
|
128
|
+
# )
|
129
|
+
# api.companies.create(user: { first_name: "Frank", last_name: "Ocean", email: "frank@example.com", phone: "2345558899" }, company: { name: "Frank's Ocean, LLC", trade_name: "Frank’s Ocean", ein: "123456789", contractor_only: false })
|
130
|
+
def create(user:, company:, request_options: nil)
|
131
|
+
response = @request_client.conn.post do | req |
|
132
|
+
unless request_options&.timeout_in_seconds.nil?
|
133
|
+
req.options.timeout = request_options.timeout_in_seconds
|
134
|
+
end
|
135
|
+
unless request_options&.token.nil?
|
136
|
+
req.headers["Authorization"] = request_options.token
|
137
|
+
end
|
138
|
+
unless request_options&.gusto_api_version.nil?
|
139
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
140
|
+
end
|
141
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
142
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
143
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
144
|
+
end
|
145
|
+
req.body = { **(request_options&.additional_body_parameters || {}), user: user, company: company }.compact
|
146
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/partner_managed_companies"
|
147
|
+
end
|
148
|
+
Gusto::Companies::CompaniesCreateResponse.from_json(json_object: response.body)
|
149
|
+
end
|
150
|
+
# Get a company.
|
151
|
+
# The employees:read scope is required to return home_address and non-work
|
152
|
+
# locations.
|
153
|
+
# The company_admin:read scope is required to return primary_payroll_admin.
|
154
|
+
# The signatories:read scope is required to return primary_signatory.
|
155
|
+
# scope: `companies:read`
|
156
|
+
#
|
157
|
+
# @param company_id [String] The UUID of the company
|
158
|
+
# @param request_options [Gusto::RequestOptions]
|
159
|
+
# @return [Gusto::Companies::Company]
|
160
|
+
# @example
|
161
|
+
# api = Gusto::Client.new(
|
162
|
+
# base_url: "https://api.example.com",
|
163
|
+
# environment: Gusto::Environment::DEMO,
|
164
|
+
# token: "YOUR_AUTH_TOKEN"
|
165
|
+
# )
|
166
|
+
# api.companies.get(company_id: "company_id")
|
167
|
+
def get(company_id:, request_options: nil)
|
168
|
+
response = @request_client.conn.get do | req |
|
169
|
+
unless request_options&.timeout_in_seconds.nil?
|
170
|
+
req.options.timeout = request_options.timeout_in_seconds
|
171
|
+
end
|
172
|
+
unless request_options&.token.nil?
|
173
|
+
req.headers["Authorization"] = request_options.token
|
174
|
+
end
|
175
|
+
unless request_options&.gusto_api_version.nil?
|
176
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
177
|
+
end
|
178
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
179
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
180
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
181
|
+
end
|
182
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
183
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
184
|
+
end
|
185
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}"
|
186
|
+
end
|
187
|
+
Gusto::Companies::Company.from_json(json_object: response.body)
|
188
|
+
end
|
189
|
+
# Update a company.
|
190
|
+
# scope: `companies:write`
|
191
|
+
#
|
192
|
+
# @param company_id [String] The UUID of the company
|
193
|
+
# @param contractor_only [Boolean] Whether the company only supports contractors. Must be updated in order for the
|
194
|
+
# company to start supporting W-2 employees. Can only be updated from true to
|
195
|
+
# false. Note that updating this value will require additional onboarding steps to
|
196
|
+
# be completed in order for the company to support W-2 employees.
|
197
|
+
# @param request_options [Gusto::RequestOptions]
|
198
|
+
# @return [Gusto::Companies::Company]
|
199
|
+
# @example
|
200
|
+
# api = Gusto::Client.new(
|
201
|
+
# base_url: "https://api.example.com",
|
202
|
+
# environment: Gusto::Environment::DEMO,
|
203
|
+
# token: "YOUR_AUTH_TOKEN"
|
204
|
+
# )
|
205
|
+
# api.companies.update(company_id: "company_id", contractor_only: false)
|
206
|
+
def update(company_id:, contractor_only:, request_options: nil)
|
207
|
+
response = @request_client.conn.put do | req |
|
208
|
+
unless request_options&.timeout_in_seconds.nil?
|
209
|
+
req.options.timeout = request_options.timeout_in_seconds
|
210
|
+
end
|
211
|
+
unless request_options&.token.nil?
|
212
|
+
req.headers["Authorization"] = request_options.token
|
213
|
+
end
|
214
|
+
unless request_options&.gusto_api_version.nil?
|
215
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
216
|
+
end
|
217
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
218
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
219
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
220
|
+
end
|
221
|
+
req.body = { **(request_options&.additional_body_parameters || {}), contractor_only: contractor_only }.compact
|
222
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}"
|
223
|
+
end
|
224
|
+
Gusto::Companies::Company.from_json(json_object: response.body)
|
225
|
+
end
|
226
|
+
# Migrate an existing Gusto customer to your embedded payroll product.
|
227
|
+
# To use this endpoint, the customer will need to connect their Gusto account to
|
228
|
+
# your application using
|
229
|
+
# [OAuth2](https://docs.gusto.com/embedded-payroll/docs/oauth2) then view and
|
230
|
+
# [accept the Embedded Payroll Terms of
|
231
|
+
# /reference/post-partner-managed-companies-company_uuid-accept_terms_of_service).
|
232
|
+
# scope: `partner_managed_companies:write`
|
233
|
+
#
|
234
|
+
# @param company_uuid [String] The UUID of the company
|
235
|
+
# @param email [String] Email of the company signatory who is authorized to accept our [Terms of
|
236
|
+
# Service](https://flows.gusto.com/terms) and migration decision. You can retrieve
|
237
|
+
# the signatory email from the `GET /v/1/companies/{company_id}/signatories`
|
238
|
+
# endpoint.
|
239
|
+
# @param ip_address [String] The IP address of the signatory who viewed and accepted the Terms of Service.
|
240
|
+
# @param external_user_id [String] The signatory's user ID on your platform.
|
241
|
+
# @param request_options [Gusto::RequestOptions]
|
242
|
+
# @return [Gusto::Companies::CompaniesMigrateToEmbeddedPayrollResponse]
|
243
|
+
# @example
|
244
|
+
# api = Gusto::Client.new(
|
245
|
+
# base_url: "https://api.example.com",
|
246
|
+
# environment: Gusto::Environment::DEMO,
|
247
|
+
# token: "YOUR_AUTH_TOKEN"
|
248
|
+
# )
|
249
|
+
# api.companies.migrate_to_embedded_payroll(
|
250
|
+
# company_uuid: "company_uuid",
|
251
|
+
# email: "email",
|
252
|
+
# ip_address: "ip_address",
|
253
|
+
# external_user_id: "external_user_id"
|
254
|
+
# )
|
255
|
+
def migrate_to_embedded_payroll(company_uuid:, email:, ip_address:, external_user_id:, request_options: nil)
|
256
|
+
response = @request_client.conn.put do | req |
|
257
|
+
unless request_options&.timeout_in_seconds.nil?
|
258
|
+
req.options.timeout = request_options.timeout_in_seconds
|
259
|
+
end
|
260
|
+
unless request_options&.token.nil?
|
261
|
+
req.headers["Authorization"] = request_options.token
|
262
|
+
end
|
263
|
+
unless request_options&.gusto_api_version.nil?
|
264
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
265
|
+
end
|
266
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
267
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
268
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
269
|
+
end
|
270
|
+
req.body = { **(request_options&.additional_body_parameters || {}), email: email, ip_address: ip_address, external_user_id: external_user_id }.compact
|
271
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/partner_managed_companies/#{company_uuid}/migrate"
|
272
|
+
end
|
273
|
+
Gusto::Companies::CompaniesMigrateToEmbeddedPayrollResponse.from_json(json_object: response.body)
|
274
|
+
end
|
275
|
+
# Accept the Gusto Embedded Payroll's [Terms of
|
276
|
+
# Service](https://flows.gusto.com/terms).
|
277
|
+
# The user must have a role in the company in order to accept the Terms of
|
278
|
+
# Service.
|
279
|
+
# scope: `terms_of_services:write`
|
280
|
+
#
|
281
|
+
# @param company_uuid [String] The UUID of the company
|
282
|
+
# @param email [String] The user's email address on Gusto. You can retrieve the user's email via
|
283
|
+
# company's `/admins`, `/employees`, `/signatories`, and `/contractors` endpoints.
|
284
|
+
# @param ip_address [String] The IP address of the user who viewed and accepted the Terms of Service.
|
285
|
+
# @param external_user_id [String] The user ID on your platform.
|
286
|
+
# @param request_options [Gusto::RequestOptions]
|
287
|
+
# @return [Gusto::Companies::CompaniesAcceptTermsResponse]
|
288
|
+
# @example
|
289
|
+
# api = Gusto::Client.new(
|
290
|
+
# base_url: "https://api.example.com",
|
291
|
+
# environment: Gusto::Environment::DEMO,
|
292
|
+
# token: "YOUR_AUTH_TOKEN"
|
293
|
+
# )
|
294
|
+
# api.companies.accept_terms(
|
295
|
+
# company_uuid: "company_uuid",
|
296
|
+
# email: "email",
|
297
|
+
# ip_address: "ip_address",
|
298
|
+
# external_user_id: "external_user_id"
|
299
|
+
# )
|
300
|
+
def accept_terms(company_uuid:, email:, ip_address:, external_user_id:, request_options: nil)
|
301
|
+
response = @request_client.conn.post do | req |
|
302
|
+
unless request_options&.timeout_in_seconds.nil?
|
303
|
+
req.options.timeout = request_options.timeout_in_seconds
|
304
|
+
end
|
305
|
+
unless request_options&.token.nil?
|
306
|
+
req.headers["Authorization"] = request_options.token
|
307
|
+
end
|
308
|
+
unless request_options&.gusto_api_version.nil?
|
309
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
310
|
+
end
|
311
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
312
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
313
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
314
|
+
end
|
315
|
+
req.body = { **(request_options&.additional_body_parameters || {}), email: email, ip_address: ip_address, external_user_id: external_user_id }.compact
|
316
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/partner_managed_companies/#{company_uuid}/accept_terms_of_service"
|
317
|
+
end
|
318
|
+
Gusto::Companies::CompaniesAcceptTermsResponse.from_json(json_object: response.body)
|
319
|
+
end
|
320
|
+
# Retrieve the user acceptance status of the Gusto Embedded Payroll's [Terms of
|
321
|
+
# Service](https://flows.gusto.com/terms).
|
322
|
+
# scope: `terms_of_services:read`
|
323
|
+
#
|
324
|
+
# @param company_uuid [String] The UUID of the company
|
325
|
+
# @param email [String] The user's email address on Gusto. You can retrieve the user's email via
|
326
|
+
# company's `/admins`, `/employees`, `/signatories`, and `/contractors` endpoints.
|
327
|
+
# @param request_options [Gusto::RequestOptions]
|
328
|
+
# @return [Gusto::Companies::CompaniesRetrieveTermsResponse]
|
329
|
+
# @example
|
330
|
+
# api = Gusto::Client.new(
|
331
|
+
# base_url: "https://api.example.com",
|
332
|
+
# environment: Gusto::Environment::DEMO,
|
333
|
+
# token: "YOUR_AUTH_TOKEN"
|
334
|
+
# )
|
335
|
+
# api.companies.retrieve_terms(company_uuid: "company_uuid", email: "email")
|
336
|
+
def retrieve_terms(company_uuid:, email:, request_options: nil)
|
337
|
+
response = @request_client.conn.post do | req |
|
338
|
+
unless request_options&.timeout_in_seconds.nil?
|
339
|
+
req.options.timeout = request_options.timeout_in_seconds
|
340
|
+
end
|
341
|
+
unless request_options&.token.nil?
|
342
|
+
req.headers["Authorization"] = request_options.token
|
343
|
+
end
|
344
|
+
unless request_options&.gusto_api_version.nil?
|
345
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
346
|
+
end
|
347
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
348
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
349
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
350
|
+
end
|
351
|
+
req.body = { **(request_options&.additional_body_parameters || {}), email: email }.compact
|
352
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/partner_managed_companies/#{company_uuid}/retrieve_terms_of_service"
|
353
|
+
end
|
354
|
+
Gusto::Companies::CompaniesRetrieveTermsResponse.from_json(json_object: response.body)
|
355
|
+
end
|
356
|
+
# Returns a list of all the admins at a company
|
357
|
+
# scope: `company_admin:read`
|
358
|
+
#
|
359
|
+
# @param company_id [String] The UUID of the company
|
360
|
+
# @param page [Float] The page that is requested. When unspecified, will load all objects unless
|
361
|
+
# endpoint forces pagination.
|
362
|
+
# @param per [Float] Number of objects per page. For majority of endpoints will default to 25
|
363
|
+
# @param request_options [Gusto::RequestOptions]
|
364
|
+
# @return [Array<Gusto::Admins::Admin>]
|
365
|
+
# @example
|
366
|
+
# api = Gusto::Client.new(
|
367
|
+
# base_url: "https://api.example.com",
|
368
|
+
# environment: Gusto::Environment::DEMO,
|
369
|
+
# token: "YOUR_AUTH_TOKEN"
|
370
|
+
# )
|
371
|
+
# api.companies.get_all_admins(company_id: "company_id")
|
372
|
+
def get_all_admins(company_id:, page: nil, per: nil, request_options: nil)
|
373
|
+
response = @request_client.conn.get do | req |
|
374
|
+
unless request_options&.timeout_in_seconds.nil?
|
375
|
+
req.options.timeout = request_options.timeout_in_seconds
|
376
|
+
end
|
377
|
+
unless request_options&.token.nil?
|
378
|
+
req.headers["Authorization"] = request_options.token
|
379
|
+
end
|
380
|
+
unless request_options&.gusto_api_version.nil?
|
381
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
382
|
+
end
|
383
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
384
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "per": per }.compact
|
385
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
386
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
387
|
+
end
|
388
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}/admins"
|
389
|
+
end
|
390
|
+
parsed_json = JSON.parse(response.body)
|
391
|
+
parsed_json&.map do | item |
|
392
|
+
item = item.to_json
|
393
|
+
Gusto::Admins::Admin.from_json(json_object: item)
|
394
|
+
end
|
395
|
+
end
|
396
|
+
# Creates a new admin for a company.
|
397
|
+
# If the email matches an existing user, this will create an admin account for the
|
398
|
+
# current user. Otherwise, this will create a new user.
|
399
|
+
# scope: `company_admin:write`
|
400
|
+
#
|
401
|
+
# @param company_id [String] The UUID of the company
|
402
|
+
# @param first_name [String] The first name of the admin.
|
403
|
+
# @param last_name [String] The last name of the admin.
|
404
|
+
# @param email [String] The email of the admin for Gusto's system. If the email matches an existing
|
405
|
+
# user, this will create an admin account for them.
|
406
|
+
# @param request_options [Gusto::RequestOptions]
|
407
|
+
# @return [Gusto::Admins::Admin]
|
408
|
+
# @example
|
409
|
+
# api = Gusto::Client.new(
|
410
|
+
# base_url: "https://api.example.com",
|
411
|
+
# environment: Gusto::Environment::DEMO,
|
412
|
+
# token: "YOUR_AUTH_TOKEN"
|
413
|
+
# )
|
414
|
+
# api.companies.create_admin(
|
415
|
+
# company_id: "company_id",
|
416
|
+
# first_name: "John",
|
417
|
+
# last_name: "Smith",
|
418
|
+
# email: "jsmith99@gmail.com"
|
419
|
+
# )
|
420
|
+
def create_admin(company_id:, first_name:, last_name:, email:, request_options: nil)
|
421
|
+
response = @request_client.conn.post do | req |
|
422
|
+
unless request_options&.timeout_in_seconds.nil?
|
423
|
+
req.options.timeout = request_options.timeout_in_seconds
|
424
|
+
end
|
425
|
+
unless request_options&.token.nil?
|
426
|
+
req.headers["Authorization"] = request_options.token
|
427
|
+
end
|
428
|
+
unless request_options&.gusto_api_version.nil?
|
429
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
430
|
+
end
|
431
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
432
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
433
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
434
|
+
end
|
435
|
+
req.body = { **(request_options&.additional_body_parameters || {}), first_name: first_name, last_name: last_name, email: email }.compact
|
436
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}/admins"
|
437
|
+
end
|
438
|
+
Gusto::Admins::Admin.from_json(json_object: response.body)
|
439
|
+
end
|
440
|
+
# Get company's onboarding status.
|
441
|
+
# The data returned helps inform the required onboarding steps and respective
|
442
|
+
# completion status.
|
443
|
+
# scope: `company_onboarding_status:read`
|
444
|
+
#
|
445
|
+
# @param company_uuid [String] The UUID of the company
|
446
|
+
# @param request_options [Gusto::RequestOptions]
|
447
|
+
# @return [Gusto::Companies::CompanyOnboardingStatus]
|
448
|
+
# @example
|
449
|
+
# api = Gusto::Client.new(
|
450
|
+
# base_url: "https://api.example.com",
|
451
|
+
# environment: Gusto::Environment::DEMO,
|
452
|
+
# token: "YOUR_AUTH_TOKEN"
|
453
|
+
# )
|
454
|
+
# api.companies.get_onboarding_status(company_uuid: "company_uuid")
|
455
|
+
def get_onboarding_status(company_uuid:, request_options: nil)
|
456
|
+
response = @request_client.conn.get do | req |
|
457
|
+
unless request_options&.timeout_in_seconds.nil?
|
458
|
+
req.options.timeout = request_options.timeout_in_seconds
|
459
|
+
end
|
460
|
+
unless request_options&.token.nil?
|
461
|
+
req.headers["Authorization"] = request_options.token
|
462
|
+
end
|
463
|
+
unless request_options&.gusto_api_version.nil?
|
464
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
465
|
+
end
|
466
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
467
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
468
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
469
|
+
end
|
470
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
471
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
472
|
+
end
|
473
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_uuid}/onboarding_status"
|
474
|
+
end
|
475
|
+
Gusto::Companies::CompanyOnboardingStatus.from_json(json_object: response.body)
|
476
|
+
end
|
477
|
+
# Finalize a given company's onboarding process.
|
478
|
+
# ### Approve a company in demo
|
479
|
+
# After a company is finished onboarding, Gusto requires an additional step to
|
480
|
+
# review and approve that company. The company onboarding status is
|
481
|
+
# `"onboarding_completed": false`, until the API call is made to finish company
|
482
|
+
# onboarding.
|
483
|
+
# In production environments, this step is required for risk-analysis purposes.
|
484
|
+
# We provide the endpoint `PUT '/v1/companies/{company_uuid}/approve'` to
|
485
|
+
# facilitate company approvals in the demo environment.
|
486
|
+
# ```shell
|
487
|
+
# PUT '/v1/companies/89771af8-b964-472e-8064-554dfbcb56d9/approve'
|
488
|
+
# # Response: Company object, with company_status: 'Approved'
|
489
|
+
# ```
|
490
|
+
# scope: `companies:write`
|
491
|
+
#
|
492
|
+
# @param company_uuid [String] The UUID of the company
|
493
|
+
# @param request_options [Gusto::RequestOptions]
|
494
|
+
# @return [Gusto::Companies::CompanyOnboardingStatus]
|
495
|
+
# @example
|
496
|
+
# api = Gusto::Client.new(
|
497
|
+
# base_url: "https://api.example.com",
|
498
|
+
# environment: Gusto::Environment::DEMO,
|
499
|
+
# token: "YOUR_AUTH_TOKEN"
|
500
|
+
# )
|
501
|
+
# api.companies.finish_onboarding(company_uuid: "company_uuid")
|
502
|
+
def finish_onboarding(company_uuid:, request_options: nil)
|
503
|
+
response = @request_client.conn.put do | req |
|
504
|
+
unless request_options&.timeout_in_seconds.nil?
|
505
|
+
req.options.timeout = request_options.timeout_in_seconds
|
506
|
+
end
|
507
|
+
unless request_options&.token.nil?
|
508
|
+
req.headers["Authorization"] = request_options.token
|
509
|
+
end
|
510
|
+
unless request_options&.gusto_api_version.nil?
|
511
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
512
|
+
end
|
513
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
514
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
515
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
516
|
+
end
|
517
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
518
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
519
|
+
end
|
520
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_uuid}/finish_onboarding"
|
521
|
+
end
|
522
|
+
Gusto::Companies::CompanyOnboardingStatus.from_json(json_object: response.body)
|
523
|
+
end
|
524
|
+
# Returns a list of the custom fields of the company. Useful when you need to know
|
525
|
+
# the schema of custom fields for an entire company
|
526
|
+
# scope: `companies:read`
|
527
|
+
#
|
528
|
+
# @param company_id [String] The UUID of the company
|
529
|
+
# @param page [Float] The page that is requested. When unspecified, will load all objects unless
|
530
|
+
# endpoint forces pagination.
|
531
|
+
# @param per [Float] Number of objects per page. For majority of endpoints will default to 25
|
532
|
+
# @param request_options [Gusto::RequestOptions]
|
533
|
+
# @return [Gusto::Companies::CompaniesGetCustomFieldsResponse]
|
534
|
+
# @example
|
535
|
+
# api = Gusto::Client.new(
|
536
|
+
# base_url: "https://api.example.com",
|
537
|
+
# environment: Gusto::Environment::DEMO,
|
538
|
+
# token: "YOUR_AUTH_TOKEN"
|
539
|
+
# )
|
540
|
+
# api.companies.get_custom_fields(company_id: "company_id")
|
541
|
+
def get_custom_fields(company_id:, page: nil, per: nil, request_options: nil)
|
542
|
+
response = @request_client.conn.get do | req |
|
543
|
+
unless request_options&.timeout_in_seconds.nil?
|
544
|
+
req.options.timeout = request_options.timeout_in_seconds
|
545
|
+
end
|
546
|
+
unless request_options&.token.nil?
|
547
|
+
req.headers["Authorization"] = request_options.token
|
548
|
+
end
|
549
|
+
unless request_options&.gusto_api_version.nil?
|
550
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
551
|
+
end
|
552
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
553
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "per": per }.compact
|
554
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
555
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
556
|
+
end
|
557
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}/custom_fields"
|
558
|
+
end
|
559
|
+
Gusto::Companies::CompaniesGetCustomFieldsResponse.from_json(json_object: response.body)
|
560
|
+
end
|
561
|
+
end
|
562
|
+
class AsyncCompaniesClient
|
563
|
+
# @return [Gusto::AsyncRequestClient]
|
564
|
+
attr_reader :request_client
|
565
|
+
# @return [Gusto::Companies::AttachmentsClient]
|
566
|
+
attr_reader :attachments
|
567
|
+
# @return [Gusto::Companies::FederalTaxDetailsClient]
|
568
|
+
attr_reader :federal_tax_details
|
569
|
+
# @return [Gusto::Companies::IndustrySelectionClient]
|
570
|
+
attr_reader :industry_selection
|
571
|
+
# @return [Gusto::Companies::SignatoriesClient]
|
572
|
+
attr_reader :signatories
|
573
|
+
# @return [Gusto::Companies::LocationsClient]
|
574
|
+
attr_reader :locations
|
575
|
+
# @return [Gusto::Companies::BankAccountsClient]
|
576
|
+
attr_reader :bank_accounts
|
577
|
+
# @return [Gusto::Companies::ExternalPayrollsClient]
|
578
|
+
attr_reader :external_payrolls
|
579
|
+
# @return [Gusto::Companies::PaymentConfigsClient]
|
580
|
+
attr_reader :payment_configs
|
581
|
+
# @return [Gusto::Companies::PaySchedulesClient]
|
582
|
+
attr_reader :pay_schedules
|
583
|
+
# @return [Gusto::Companies::EmployeesClient]
|
584
|
+
attr_reader :employees
|
585
|
+
# @return [Gusto::Companies::DepartmentsClient]
|
586
|
+
attr_reader :departments
|
587
|
+
# @return [Gusto::Companies::FormsClient]
|
588
|
+
attr_reader :forms
|
589
|
+
# @return [Gusto::Companies::BenefitsClient]
|
590
|
+
attr_reader :benefits
|
591
|
+
# @return [Gusto::Companies::TaxRequirementsClient]
|
592
|
+
attr_reader :tax_requirements
|
593
|
+
|
594
|
+
|
595
|
+
# @param request_client [Gusto::RequestClient]
|
596
|
+
# @return [Gusto::AsyncCompaniesClient]
|
597
|
+
def initialize(request_client:)
|
598
|
+
@request_client = request_client
|
599
|
+
@attachments = Gusto::Companies::AsyncAttachmentsClient.new(request_client: request_client)
|
600
|
+
@federal_tax_details = Gusto::Companies::AsyncFederalTaxDetailsClient.new(request_client: request_client)
|
601
|
+
@industry_selection = Gusto::Companies::AsyncIndustrySelectionClient.new(request_client: request_client)
|
602
|
+
@signatories = Gusto::Companies::AsyncSignatoriesClient.new(request_client: request_client)
|
603
|
+
@locations = Gusto::Companies::AsyncLocationsClient.new(request_client: request_client)
|
604
|
+
@bank_accounts = Gusto::Companies::AsyncBankAccountsClient.new(request_client: request_client)
|
605
|
+
@external_payrolls = Gusto::Companies::AsyncExternalPayrollsClient.new(request_client: request_client)
|
606
|
+
@payment_configs = Gusto::Companies::AsyncPaymentConfigsClient.new(request_client: request_client)
|
607
|
+
@pay_schedules = Gusto::Companies::AsyncPaySchedulesClient.new(request_client: request_client)
|
608
|
+
@employees = Gusto::Companies::AsyncEmployeesClient.new(request_client: request_client)
|
609
|
+
@departments = Gusto::Companies::AsyncDepartmentsClient.new(request_client: request_client)
|
610
|
+
@forms = Gusto::Companies::AsyncFormsClient.new(request_client: request_client)
|
611
|
+
@benefits = Gusto::Companies::AsyncBenefitsClient.new(request_client: request_client)
|
612
|
+
@tax_requirements = Gusto::Companies::AsyncTaxRequirementsClient.new(request_client: request_client)
|
613
|
+
end
|
614
|
+
# Create a partner managed company. When you successfully call the API, it does
|
615
|
+
# the following:
|
616
|
+
# - Creates a new company in Gusto
|
617
|
+
# - Creates a new user using the provided email if the user does not already
|
618
|
+
# exist.
|
619
|
+
# - Makes the user the primary payroll administrator of the new company.
|
620
|
+
# In response, you will receive oauth access tokens for the created company.
|
621
|
+
# IMPORTANT: the returned access and refresh tokens are reserved for this company
|
622
|
+
# only. They cannot be used to access other companies AND previously granted
|
623
|
+
# tokens cannot be used to access this company.
|
624
|
+
# > 📘 System Access Authentication
|
625
|
+
# >
|
626
|
+
# > this endpoint uses the [Bearer Auth scheme with the system-level access token
|
627
|
+
# in the HTTP Authorization
|
628
|
+
# header](https://docs.gusto.com/embedded-payroll/docs/system-access)
|
629
|
+
#
|
630
|
+
# @param user [Hash] Information for the user who will be the primary payroll administrator for the
|
631
|
+
# new company.Request of type Gusto::Companies::CompaniesCreateRequestUser, as a Hash
|
632
|
+
# * :first_name (String)
|
633
|
+
# * :last_name (String)
|
634
|
+
# * :email (String)
|
635
|
+
# * :phone (String)
|
636
|
+
# @param company [Hash] Request of type Gusto::Companies::CompaniesCreateRequestCompany, as a Hash
|
637
|
+
# * :name (String)
|
638
|
+
# * :trade_name (String)
|
639
|
+
# * :ein (String)
|
640
|
+
# * :contractor_only (Boolean)
|
641
|
+
# @param request_options [Gusto::RequestOptions]
|
642
|
+
# @return [Gusto::Companies::CompaniesCreateResponse]
|
643
|
+
# @example
|
644
|
+
# api = Gusto::Client.new(
|
645
|
+
# base_url: "https://api.example.com",
|
646
|
+
# environment: Gusto::Environment::DEMO,
|
647
|
+
# token: "YOUR_AUTH_TOKEN"
|
648
|
+
# )
|
649
|
+
# api.companies.create(user: { first_name: "Frank", last_name: "Ocean", email: "frank@example.com", phone: "2345558899" }, company: { name: "Frank's Ocean, LLC", trade_name: "Frank’s Ocean", ein: "123456789", contractor_only: false })
|
650
|
+
def create(user:, company:, request_options: nil)
|
651
|
+
Async do
|
652
|
+
response = @request_client.conn.post do | req |
|
653
|
+
unless request_options&.timeout_in_seconds.nil?
|
654
|
+
req.options.timeout = request_options.timeout_in_seconds
|
655
|
+
end
|
656
|
+
unless request_options&.token.nil?
|
657
|
+
req.headers["Authorization"] = request_options.token
|
658
|
+
end
|
659
|
+
unless request_options&.gusto_api_version.nil?
|
660
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
661
|
+
end
|
662
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
663
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
664
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
665
|
+
end
|
666
|
+
req.body = { **(request_options&.additional_body_parameters || {}), user: user, company: company }.compact
|
667
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/partner_managed_companies"
|
668
|
+
end
|
669
|
+
Gusto::Companies::CompaniesCreateResponse.from_json(json_object: response.body)
|
670
|
+
end
|
671
|
+
end
|
672
|
+
# Get a company.
|
673
|
+
# The employees:read scope is required to return home_address and non-work
|
674
|
+
# locations.
|
675
|
+
# The company_admin:read scope is required to return primary_payroll_admin.
|
676
|
+
# The signatories:read scope is required to return primary_signatory.
|
677
|
+
# scope: `companies:read`
|
678
|
+
#
|
679
|
+
# @param company_id [String] The UUID of the company
|
680
|
+
# @param request_options [Gusto::RequestOptions]
|
681
|
+
# @return [Gusto::Companies::Company]
|
682
|
+
# @example
|
683
|
+
# api = Gusto::Client.new(
|
684
|
+
# base_url: "https://api.example.com",
|
685
|
+
# environment: Gusto::Environment::DEMO,
|
686
|
+
# token: "YOUR_AUTH_TOKEN"
|
687
|
+
# )
|
688
|
+
# api.companies.get(company_id: "company_id")
|
689
|
+
def get(company_id:, request_options: nil)
|
690
|
+
Async do
|
691
|
+
response = @request_client.conn.get do | req |
|
692
|
+
unless request_options&.timeout_in_seconds.nil?
|
693
|
+
req.options.timeout = request_options.timeout_in_seconds
|
694
|
+
end
|
695
|
+
unless request_options&.token.nil?
|
696
|
+
req.headers["Authorization"] = request_options.token
|
697
|
+
end
|
698
|
+
unless request_options&.gusto_api_version.nil?
|
699
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
700
|
+
end
|
701
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
702
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
703
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
704
|
+
end
|
705
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
706
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
707
|
+
end
|
708
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}"
|
709
|
+
end
|
710
|
+
Gusto::Companies::Company.from_json(json_object: response.body)
|
711
|
+
end
|
712
|
+
end
|
713
|
+
# Update a company.
|
714
|
+
# scope: `companies:write`
|
715
|
+
#
|
716
|
+
# @param company_id [String] The UUID of the company
|
717
|
+
# @param contractor_only [Boolean] Whether the company only supports contractors. Must be updated in order for the
|
718
|
+
# company to start supporting W-2 employees. Can only be updated from true to
|
719
|
+
# false. Note that updating this value will require additional onboarding steps to
|
720
|
+
# be completed in order for the company to support W-2 employees.
|
721
|
+
# @param request_options [Gusto::RequestOptions]
|
722
|
+
# @return [Gusto::Companies::Company]
|
723
|
+
# @example
|
724
|
+
# api = Gusto::Client.new(
|
725
|
+
# base_url: "https://api.example.com",
|
726
|
+
# environment: Gusto::Environment::DEMO,
|
727
|
+
# token: "YOUR_AUTH_TOKEN"
|
728
|
+
# )
|
729
|
+
# api.companies.update(company_id: "company_id", contractor_only: false)
|
730
|
+
def update(company_id:, contractor_only:, request_options: nil)
|
731
|
+
Async do
|
732
|
+
response = @request_client.conn.put do | req |
|
733
|
+
unless request_options&.timeout_in_seconds.nil?
|
734
|
+
req.options.timeout = request_options.timeout_in_seconds
|
735
|
+
end
|
736
|
+
unless request_options&.token.nil?
|
737
|
+
req.headers["Authorization"] = request_options.token
|
738
|
+
end
|
739
|
+
unless request_options&.gusto_api_version.nil?
|
740
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
741
|
+
end
|
742
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
743
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
744
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
745
|
+
end
|
746
|
+
req.body = { **(request_options&.additional_body_parameters || {}), contractor_only: contractor_only }.compact
|
747
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}"
|
748
|
+
end
|
749
|
+
Gusto::Companies::Company.from_json(json_object: response.body)
|
750
|
+
end
|
751
|
+
end
|
752
|
+
# Migrate an existing Gusto customer to your embedded payroll product.
|
753
|
+
# To use this endpoint, the customer will need to connect their Gusto account to
|
754
|
+
# your application using
|
755
|
+
# [OAuth2](https://docs.gusto.com/embedded-payroll/docs/oauth2) then view and
|
756
|
+
# [accept the Embedded Payroll Terms of
|
757
|
+
# /reference/post-partner-managed-companies-company_uuid-accept_terms_of_service).
|
758
|
+
# scope: `partner_managed_companies:write`
|
759
|
+
#
|
760
|
+
# @param company_uuid [String] The UUID of the company
|
761
|
+
# @param email [String] Email of the company signatory who is authorized to accept our [Terms of
|
762
|
+
# Service](https://flows.gusto.com/terms) and migration decision. You can retrieve
|
763
|
+
# the signatory email from the `GET /v/1/companies/{company_id}/signatories`
|
764
|
+
# endpoint.
|
765
|
+
# @param ip_address [String] The IP address of the signatory who viewed and accepted the Terms of Service.
|
766
|
+
# @param external_user_id [String] The signatory's user ID on your platform.
|
767
|
+
# @param request_options [Gusto::RequestOptions]
|
768
|
+
# @return [Gusto::Companies::CompaniesMigrateToEmbeddedPayrollResponse]
|
769
|
+
# @example
|
770
|
+
# api = Gusto::Client.new(
|
771
|
+
# base_url: "https://api.example.com",
|
772
|
+
# environment: Gusto::Environment::DEMO,
|
773
|
+
# token: "YOUR_AUTH_TOKEN"
|
774
|
+
# )
|
775
|
+
# api.companies.migrate_to_embedded_payroll(
|
776
|
+
# company_uuid: "company_uuid",
|
777
|
+
# email: "email",
|
778
|
+
# ip_address: "ip_address",
|
779
|
+
# external_user_id: "external_user_id"
|
780
|
+
# )
|
781
|
+
def migrate_to_embedded_payroll(company_uuid:, email:, ip_address:, external_user_id:, request_options: nil)
|
782
|
+
Async do
|
783
|
+
response = @request_client.conn.put do | req |
|
784
|
+
unless request_options&.timeout_in_seconds.nil?
|
785
|
+
req.options.timeout = request_options.timeout_in_seconds
|
786
|
+
end
|
787
|
+
unless request_options&.token.nil?
|
788
|
+
req.headers["Authorization"] = request_options.token
|
789
|
+
end
|
790
|
+
unless request_options&.gusto_api_version.nil?
|
791
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
792
|
+
end
|
793
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
794
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
795
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
796
|
+
end
|
797
|
+
req.body = { **(request_options&.additional_body_parameters || {}), email: email, ip_address: ip_address, external_user_id: external_user_id }.compact
|
798
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/partner_managed_companies/#{company_uuid}/migrate"
|
799
|
+
end
|
800
|
+
Gusto::Companies::CompaniesMigrateToEmbeddedPayrollResponse.from_json(json_object: response.body)
|
801
|
+
end
|
802
|
+
end
|
803
|
+
# Accept the Gusto Embedded Payroll's [Terms of
|
804
|
+
# Service](https://flows.gusto.com/terms).
|
805
|
+
# The user must have a role in the company in order to accept the Terms of
|
806
|
+
# Service.
|
807
|
+
# scope: `terms_of_services:write`
|
808
|
+
#
|
809
|
+
# @param company_uuid [String] The UUID of the company
|
810
|
+
# @param email [String] The user's email address on Gusto. You can retrieve the user's email via
|
811
|
+
# company's `/admins`, `/employees`, `/signatories`, and `/contractors` endpoints.
|
812
|
+
# @param ip_address [String] The IP address of the user who viewed and accepted the Terms of Service.
|
813
|
+
# @param external_user_id [String] The user ID on your platform.
|
814
|
+
# @param request_options [Gusto::RequestOptions]
|
815
|
+
# @return [Gusto::Companies::CompaniesAcceptTermsResponse]
|
816
|
+
# @example
|
817
|
+
# api = Gusto::Client.new(
|
818
|
+
# base_url: "https://api.example.com",
|
819
|
+
# environment: Gusto::Environment::DEMO,
|
820
|
+
# token: "YOUR_AUTH_TOKEN"
|
821
|
+
# )
|
822
|
+
# api.companies.accept_terms(
|
823
|
+
# company_uuid: "company_uuid",
|
824
|
+
# email: "email",
|
825
|
+
# ip_address: "ip_address",
|
826
|
+
# external_user_id: "external_user_id"
|
827
|
+
# )
|
828
|
+
def accept_terms(company_uuid:, email:, ip_address:, external_user_id:, request_options: nil)
|
829
|
+
Async do
|
830
|
+
response = @request_client.conn.post do | req |
|
831
|
+
unless request_options&.timeout_in_seconds.nil?
|
832
|
+
req.options.timeout = request_options.timeout_in_seconds
|
833
|
+
end
|
834
|
+
unless request_options&.token.nil?
|
835
|
+
req.headers["Authorization"] = request_options.token
|
836
|
+
end
|
837
|
+
unless request_options&.gusto_api_version.nil?
|
838
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
839
|
+
end
|
840
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
841
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
842
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
843
|
+
end
|
844
|
+
req.body = { **(request_options&.additional_body_parameters || {}), email: email, ip_address: ip_address, external_user_id: external_user_id }.compact
|
845
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/partner_managed_companies/#{company_uuid}/accept_terms_of_service"
|
846
|
+
end
|
847
|
+
Gusto::Companies::CompaniesAcceptTermsResponse.from_json(json_object: response.body)
|
848
|
+
end
|
849
|
+
end
|
850
|
+
# Retrieve the user acceptance status of the Gusto Embedded Payroll's [Terms of
|
851
|
+
# Service](https://flows.gusto.com/terms).
|
852
|
+
# scope: `terms_of_services:read`
|
853
|
+
#
|
854
|
+
# @param company_uuid [String] The UUID of the company
|
855
|
+
# @param email [String] The user's email address on Gusto. You can retrieve the user's email via
|
856
|
+
# company's `/admins`, `/employees`, `/signatories`, and `/contractors` endpoints.
|
857
|
+
# @param request_options [Gusto::RequestOptions]
|
858
|
+
# @return [Gusto::Companies::CompaniesRetrieveTermsResponse]
|
859
|
+
# @example
|
860
|
+
# api = Gusto::Client.new(
|
861
|
+
# base_url: "https://api.example.com",
|
862
|
+
# environment: Gusto::Environment::DEMO,
|
863
|
+
# token: "YOUR_AUTH_TOKEN"
|
864
|
+
# )
|
865
|
+
# api.companies.retrieve_terms(company_uuid: "company_uuid", email: "email")
|
866
|
+
def retrieve_terms(company_uuid:, email:, request_options: nil)
|
867
|
+
Async do
|
868
|
+
response = @request_client.conn.post do | req |
|
869
|
+
unless request_options&.timeout_in_seconds.nil?
|
870
|
+
req.options.timeout = request_options.timeout_in_seconds
|
871
|
+
end
|
872
|
+
unless request_options&.token.nil?
|
873
|
+
req.headers["Authorization"] = request_options.token
|
874
|
+
end
|
875
|
+
unless request_options&.gusto_api_version.nil?
|
876
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
877
|
+
end
|
878
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
879
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
880
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
881
|
+
end
|
882
|
+
req.body = { **(request_options&.additional_body_parameters || {}), email: email }.compact
|
883
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/partner_managed_companies/#{company_uuid}/retrieve_terms_of_service"
|
884
|
+
end
|
885
|
+
Gusto::Companies::CompaniesRetrieveTermsResponse.from_json(json_object: response.body)
|
886
|
+
end
|
887
|
+
end
|
888
|
+
# Returns a list of all the admins at a company
|
889
|
+
# scope: `company_admin:read`
|
890
|
+
#
|
891
|
+
# @param company_id [String] The UUID of the company
|
892
|
+
# @param page [Float] The page that is requested. When unspecified, will load all objects unless
|
893
|
+
# endpoint forces pagination.
|
894
|
+
# @param per [Float] Number of objects per page. For majority of endpoints will default to 25
|
895
|
+
# @param request_options [Gusto::RequestOptions]
|
896
|
+
# @return [Array<Gusto::Admins::Admin>]
|
897
|
+
# @example
|
898
|
+
# api = Gusto::Client.new(
|
899
|
+
# base_url: "https://api.example.com",
|
900
|
+
# environment: Gusto::Environment::DEMO,
|
901
|
+
# token: "YOUR_AUTH_TOKEN"
|
902
|
+
# )
|
903
|
+
# api.companies.get_all_admins(company_id: "company_id")
|
904
|
+
def get_all_admins(company_id:, page: nil, per: nil, request_options: nil)
|
905
|
+
Async do
|
906
|
+
response = @request_client.conn.get do | req |
|
907
|
+
unless request_options&.timeout_in_seconds.nil?
|
908
|
+
req.options.timeout = request_options.timeout_in_seconds
|
909
|
+
end
|
910
|
+
unless request_options&.token.nil?
|
911
|
+
req.headers["Authorization"] = request_options.token
|
912
|
+
end
|
913
|
+
unless request_options&.gusto_api_version.nil?
|
914
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
915
|
+
end
|
916
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
917
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "per": per }.compact
|
918
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
919
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
920
|
+
end
|
921
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}/admins"
|
922
|
+
end
|
923
|
+
parsed_json = JSON.parse(response.body)
|
924
|
+
parsed_json&.map do | item |
|
925
|
+
item = item.to_json
|
926
|
+
Gusto::Admins::Admin.from_json(json_object: item)
|
927
|
+
end
|
928
|
+
end
|
929
|
+
end
|
930
|
+
# Creates a new admin for a company.
|
931
|
+
# If the email matches an existing user, this will create an admin account for the
|
932
|
+
# current user. Otherwise, this will create a new user.
|
933
|
+
# scope: `company_admin:write`
|
934
|
+
#
|
935
|
+
# @param company_id [String] The UUID of the company
|
936
|
+
# @param first_name [String] The first name of the admin.
|
937
|
+
# @param last_name [String] The last name of the admin.
|
938
|
+
# @param email [String] The email of the admin for Gusto's system. If the email matches an existing
|
939
|
+
# user, this will create an admin account for them.
|
940
|
+
# @param request_options [Gusto::RequestOptions]
|
941
|
+
# @return [Gusto::Admins::Admin]
|
942
|
+
# @example
|
943
|
+
# api = Gusto::Client.new(
|
944
|
+
# base_url: "https://api.example.com",
|
945
|
+
# environment: Gusto::Environment::DEMO,
|
946
|
+
# token: "YOUR_AUTH_TOKEN"
|
947
|
+
# )
|
948
|
+
# api.companies.create_admin(
|
949
|
+
# company_id: "company_id",
|
950
|
+
# first_name: "John",
|
951
|
+
# last_name: "Smith",
|
952
|
+
# email: "jsmith99@gmail.com"
|
953
|
+
# )
|
954
|
+
def create_admin(company_id:, first_name:, last_name:, email:, request_options: nil)
|
955
|
+
Async do
|
956
|
+
response = @request_client.conn.post do | req |
|
957
|
+
unless request_options&.timeout_in_seconds.nil?
|
958
|
+
req.options.timeout = request_options.timeout_in_seconds
|
959
|
+
end
|
960
|
+
unless request_options&.token.nil?
|
961
|
+
req.headers["Authorization"] = request_options.token
|
962
|
+
end
|
963
|
+
unless request_options&.gusto_api_version.nil?
|
964
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
965
|
+
end
|
966
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
967
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
968
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
969
|
+
end
|
970
|
+
req.body = { **(request_options&.additional_body_parameters || {}), first_name: first_name, last_name: last_name, email: email }.compact
|
971
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}/admins"
|
972
|
+
end
|
973
|
+
Gusto::Admins::Admin.from_json(json_object: response.body)
|
974
|
+
end
|
975
|
+
end
|
976
|
+
# Get company's onboarding status.
|
977
|
+
# The data returned helps inform the required onboarding steps and respective
|
978
|
+
# completion status.
|
979
|
+
# scope: `company_onboarding_status:read`
|
980
|
+
#
|
981
|
+
# @param company_uuid [String] The UUID of the company
|
982
|
+
# @param request_options [Gusto::RequestOptions]
|
983
|
+
# @return [Gusto::Companies::CompanyOnboardingStatus]
|
984
|
+
# @example
|
985
|
+
# api = Gusto::Client.new(
|
986
|
+
# base_url: "https://api.example.com",
|
987
|
+
# environment: Gusto::Environment::DEMO,
|
988
|
+
# token: "YOUR_AUTH_TOKEN"
|
989
|
+
# )
|
990
|
+
# api.companies.get_onboarding_status(company_uuid: "company_uuid")
|
991
|
+
def get_onboarding_status(company_uuid:, request_options: nil)
|
992
|
+
Async do
|
993
|
+
response = @request_client.conn.get do | req |
|
994
|
+
unless request_options&.timeout_in_seconds.nil?
|
995
|
+
req.options.timeout = request_options.timeout_in_seconds
|
996
|
+
end
|
997
|
+
unless request_options&.token.nil?
|
998
|
+
req.headers["Authorization"] = request_options.token
|
999
|
+
end
|
1000
|
+
unless request_options&.gusto_api_version.nil?
|
1001
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
1002
|
+
end
|
1003
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
1004
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
1005
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
1006
|
+
end
|
1007
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
1008
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
1009
|
+
end
|
1010
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_uuid}/onboarding_status"
|
1011
|
+
end
|
1012
|
+
Gusto::Companies::CompanyOnboardingStatus.from_json(json_object: response.body)
|
1013
|
+
end
|
1014
|
+
end
|
1015
|
+
# Finalize a given company's onboarding process.
|
1016
|
+
# ### Approve a company in demo
|
1017
|
+
# After a company is finished onboarding, Gusto requires an additional step to
|
1018
|
+
# review and approve that company. The company onboarding status is
|
1019
|
+
# `"onboarding_completed": false`, until the API call is made to finish company
|
1020
|
+
# onboarding.
|
1021
|
+
# In production environments, this step is required for risk-analysis purposes.
|
1022
|
+
# We provide the endpoint `PUT '/v1/companies/{company_uuid}/approve'` to
|
1023
|
+
# facilitate company approvals in the demo environment.
|
1024
|
+
# ```shell
|
1025
|
+
# PUT '/v1/companies/89771af8-b964-472e-8064-554dfbcb56d9/approve'
|
1026
|
+
# # Response: Company object, with company_status: 'Approved'
|
1027
|
+
# ```
|
1028
|
+
# scope: `companies:write`
|
1029
|
+
#
|
1030
|
+
# @param company_uuid [String] The UUID of the company
|
1031
|
+
# @param request_options [Gusto::RequestOptions]
|
1032
|
+
# @return [Gusto::Companies::CompanyOnboardingStatus]
|
1033
|
+
# @example
|
1034
|
+
# api = Gusto::Client.new(
|
1035
|
+
# base_url: "https://api.example.com",
|
1036
|
+
# environment: Gusto::Environment::DEMO,
|
1037
|
+
# token: "YOUR_AUTH_TOKEN"
|
1038
|
+
# )
|
1039
|
+
# api.companies.finish_onboarding(company_uuid: "company_uuid")
|
1040
|
+
def finish_onboarding(company_uuid:, request_options: nil)
|
1041
|
+
Async do
|
1042
|
+
response = @request_client.conn.put do | req |
|
1043
|
+
unless request_options&.timeout_in_seconds.nil?
|
1044
|
+
req.options.timeout = request_options.timeout_in_seconds
|
1045
|
+
end
|
1046
|
+
unless request_options&.token.nil?
|
1047
|
+
req.headers["Authorization"] = request_options.token
|
1048
|
+
end
|
1049
|
+
unless request_options&.gusto_api_version.nil?
|
1050
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
1051
|
+
end
|
1052
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
1053
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
1054
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
1055
|
+
end
|
1056
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
1057
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
1058
|
+
end
|
1059
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_uuid}/finish_onboarding"
|
1060
|
+
end
|
1061
|
+
Gusto::Companies::CompanyOnboardingStatus.from_json(json_object: response.body)
|
1062
|
+
end
|
1063
|
+
end
|
1064
|
+
# Returns a list of the custom fields of the company. Useful when you need to know
|
1065
|
+
# the schema of custom fields for an entire company
|
1066
|
+
# scope: `companies:read`
|
1067
|
+
#
|
1068
|
+
# @param company_id [String] The UUID of the company
|
1069
|
+
# @param page [Float] The page that is requested. When unspecified, will load all objects unless
|
1070
|
+
# endpoint forces pagination.
|
1071
|
+
# @param per [Float] Number of objects per page. For majority of endpoints will default to 25
|
1072
|
+
# @param request_options [Gusto::RequestOptions]
|
1073
|
+
# @return [Gusto::Companies::CompaniesGetCustomFieldsResponse]
|
1074
|
+
# @example
|
1075
|
+
# api = Gusto::Client.new(
|
1076
|
+
# base_url: "https://api.example.com",
|
1077
|
+
# environment: Gusto::Environment::DEMO,
|
1078
|
+
# token: "YOUR_AUTH_TOKEN"
|
1079
|
+
# )
|
1080
|
+
# api.companies.get_custom_fields(company_id: "company_id")
|
1081
|
+
def get_custom_fields(company_id:, page: nil, per: nil, request_options: nil)
|
1082
|
+
Async do
|
1083
|
+
response = @request_client.conn.get do | req |
|
1084
|
+
unless request_options&.timeout_in_seconds.nil?
|
1085
|
+
req.options.timeout = request_options.timeout_in_seconds
|
1086
|
+
end
|
1087
|
+
unless request_options&.token.nil?
|
1088
|
+
req.headers["Authorization"] = request_options.token
|
1089
|
+
end
|
1090
|
+
unless request_options&.gusto_api_version.nil?
|
1091
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
1092
|
+
end
|
1093
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
1094
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "per": per }.compact
|
1095
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
1096
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
1097
|
+
end
|
1098
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}/custom_fields"
|
1099
|
+
end
|
1100
|
+
Gusto::Companies::CompaniesGetCustomFieldsResponse.from_json(json_object: response.body)
|
1101
|
+
end
|
1102
|
+
end
|
1103
|
+
end
|
1104
|
+
end
|