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,938 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative "../../../requests"
|
3
|
+
require_relative "../../jobs_and_compensations/types/job"
|
4
|
+
require "json"
|
5
|
+
require_relative "../../jobs_and_compensations/types/compensation"
|
6
|
+
require_relative "types/jobs_and_compensations_create_compensation_request_payment_unit"
|
7
|
+
require_relative "../../types/flsa_status_type"
|
8
|
+
require_relative "types/jobs_and_compensations_create_compensation_request_minimum_wages_item"
|
9
|
+
require_relative "types/jobs_and_compensations_update_compensation_request_payment_unit"
|
10
|
+
require_relative "types/jobs_and_compensations_update_compensation_request_minimum_wages_item"
|
11
|
+
require "async"
|
12
|
+
require "async"
|
13
|
+
require "async"
|
14
|
+
require "async"
|
15
|
+
require "async"
|
16
|
+
require "async"
|
17
|
+
require "async"
|
18
|
+
require "async"
|
19
|
+
require "async"
|
20
|
+
require "async"
|
21
|
+
require_relative "../../../requests"
|
22
|
+
|
23
|
+
module Gusto
|
24
|
+
module Employees
|
25
|
+
class JobsAndCompensationsClient
|
26
|
+
# @return [Gusto::RequestClient]
|
27
|
+
attr_reader :request_client
|
28
|
+
|
29
|
+
|
30
|
+
# @param request_client [Gusto::RequestClient]
|
31
|
+
# @return [Gusto::Employees::JobsAndCompensationsClient]
|
32
|
+
def initialize(request_client:)
|
33
|
+
@request_client = request_client
|
34
|
+
end
|
35
|
+
# Get all of the jobs that an employee holds.
|
36
|
+
# scope: `jobs:read`
|
37
|
+
#
|
38
|
+
# @param employee_id [String] The UUID of the employee
|
39
|
+
# @param page [Float] The page that is requested. When unspecified, will load all objects unless
|
40
|
+
# endpoint forces pagination.
|
41
|
+
# @param per [Float] Number of objects per page. For majority of endpoints will default to 25
|
42
|
+
# @param include [String] Available options:
|
43
|
+
# - all_compensations: Include all effective dated compensations for each job
|
44
|
+
# instead of only the current compensation
|
45
|
+
# @param request_options [Gusto::RequestOptions]
|
46
|
+
# @return [Array<Gusto::JobsAndCompensations::Job>]
|
47
|
+
# @example
|
48
|
+
# api = Gusto::Client.new(
|
49
|
+
# base_url: "https://api.example.com",
|
50
|
+
# environment: Gusto::Environment::DEMO,
|
51
|
+
# token: "YOUR_AUTH_TOKEN"
|
52
|
+
# )
|
53
|
+
# api.employees.jobs_and_compensations.get_jobs(employee_id: "employee_id")
|
54
|
+
def get_jobs(employee_id:, page: nil, per: nil, include: nil, request_options: nil)
|
55
|
+
response = @request_client.conn.get do | req |
|
56
|
+
unless request_options&.timeout_in_seconds.nil?
|
57
|
+
req.options.timeout = request_options.timeout_in_seconds
|
58
|
+
end
|
59
|
+
unless request_options&.token.nil?
|
60
|
+
req.headers["Authorization"] = request_options.token
|
61
|
+
end
|
62
|
+
unless request_options&.gusto_api_version.nil?
|
63
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
64
|
+
end
|
65
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
66
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "per": per, "include": include }.compact
|
67
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
68
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
69
|
+
end
|
70
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/employees/#{employee_id}/jobs"
|
71
|
+
end
|
72
|
+
parsed_json = JSON.parse(response.body)
|
73
|
+
parsed_json&.map do | item |
|
74
|
+
item = item.to_json
|
75
|
+
Gusto::JobsAndCompensations::Job.from_json(json_object: item)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
# Create a job.
|
79
|
+
# scope: `jobs:write`
|
80
|
+
#
|
81
|
+
# @param employee_id [String] The UUID of the employee
|
82
|
+
# @param title [String] The job title
|
83
|
+
# @param hire_date [String] The date when the employee was hired or rehired for the job.
|
84
|
+
# @param two_percent_shareholder [Boolean] Whether the employee owns at least 2% of the company.
|
85
|
+
# @param state_wc_covered [Boolean] Whether this job is eligible for workers' compensation coverage in the state of
|
86
|
+
# Washington (WA).
|
87
|
+
# @param state_wc_class_code [String] The risk class code for workers' compensation in Washington state. Please visit
|
88
|
+
# [Washington state's Risk Class
|
89
|
+
# ce/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/)
|
90
|
+
# to learn more.
|
91
|
+
# @param request_options [Gusto::RequestOptions]
|
92
|
+
# @return [Gusto::JobsAndCompensations::Job]
|
93
|
+
# @example
|
94
|
+
# api = Gusto::Client.new(
|
95
|
+
# base_url: "https://api.example.com",
|
96
|
+
# environment: Gusto::Environment::DEMO,
|
97
|
+
# token: "YOUR_AUTH_TOKEN"
|
98
|
+
# )
|
99
|
+
# api.employees.jobs_and_compensations.create_job(
|
100
|
+
# employee_id: "employee_id",
|
101
|
+
# title: "Regional Manager",
|
102
|
+
# hire_date: "2020-12-21"
|
103
|
+
# )
|
104
|
+
def create_job(employee_id:, title:, hire_date:, two_percent_shareholder: nil, state_wc_covered: nil, state_wc_class_code: nil, request_options: nil)
|
105
|
+
response = @request_client.conn.post do | req |
|
106
|
+
unless request_options&.timeout_in_seconds.nil?
|
107
|
+
req.options.timeout = request_options.timeout_in_seconds
|
108
|
+
end
|
109
|
+
unless request_options&.token.nil?
|
110
|
+
req.headers["Authorization"] = request_options.token
|
111
|
+
end
|
112
|
+
unless request_options&.gusto_api_version.nil?
|
113
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
114
|
+
end
|
115
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
116
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
117
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
118
|
+
end
|
119
|
+
req.body = { **(request_options&.additional_body_parameters || {}), title: title, hire_date: hire_date, two_percent_shareholder: two_percent_shareholder, state_wc_covered: state_wc_covered, state_wc_class_code: state_wc_class_code }.compact
|
120
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/employees/#{employee_id}/jobs"
|
121
|
+
end
|
122
|
+
Gusto::JobsAndCompensations::Job.from_json(json_object: response.body)
|
123
|
+
end
|
124
|
+
# Get a job.
|
125
|
+
# scope: `jobs:read`
|
126
|
+
#
|
127
|
+
# @param job_id [String] The UUID of the job
|
128
|
+
# @param include [String] Available options:
|
129
|
+
# - all_compensations: Include all effective dated compensations for the job
|
130
|
+
# instead of only the current compensation
|
131
|
+
# @param request_options [Gusto::RequestOptions]
|
132
|
+
# @return [Gusto::JobsAndCompensations::Job]
|
133
|
+
# @example
|
134
|
+
# api = Gusto::Client.new(
|
135
|
+
# base_url: "https://api.example.com",
|
136
|
+
# environment: Gusto::Environment::DEMO,
|
137
|
+
# token: "YOUR_AUTH_TOKEN"
|
138
|
+
# )
|
139
|
+
# api.employees.jobs_and_compensations.get_job(job_id: "job_id")
|
140
|
+
def get_job(job_id:, include: nil, request_options: nil)
|
141
|
+
response = @request_client.conn.get do | req |
|
142
|
+
unless request_options&.timeout_in_seconds.nil?
|
143
|
+
req.options.timeout = request_options.timeout_in_seconds
|
144
|
+
end
|
145
|
+
unless request_options&.token.nil?
|
146
|
+
req.headers["Authorization"] = request_options.token
|
147
|
+
end
|
148
|
+
unless request_options&.gusto_api_version.nil?
|
149
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
150
|
+
end
|
151
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
152
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "include": include }.compact
|
153
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
154
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
155
|
+
end
|
156
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/jobs/#{job_id}"
|
157
|
+
end
|
158
|
+
Gusto::JobsAndCompensations::Job.from_json(json_object: response.body)
|
159
|
+
end
|
160
|
+
# Update a job.
|
161
|
+
# scope: `jobs:write`
|
162
|
+
#
|
163
|
+
# @param job_id [String] The UUID of the job
|
164
|
+
# @param version [String] The current version of the object. See the [versioning
|
165
|
+
# guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for
|
166
|
+
# information on how to use this field.
|
167
|
+
# @param title [String] The job title
|
168
|
+
# @param hire_date [String] The date when the employee was hired or rehired for the job.
|
169
|
+
# @param two_percent_shareholder [Boolean] Whether the employee owns at least 2% of the company.
|
170
|
+
# @param state_wc_covered [Boolean] Whether this job is eligible for workers' compensation coverage in the state of
|
171
|
+
# Washington (WA).
|
172
|
+
# @param state_wc_class_code [String] The risk class code for workers' compensation in Washington state. Please visit
|
173
|
+
# [Washington state's Risk Class
|
174
|
+
# ce/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/)
|
175
|
+
# to learn more.
|
176
|
+
# @param request_options [Gusto::RequestOptions]
|
177
|
+
# @return [Gusto::JobsAndCompensations::Job]
|
178
|
+
# @example
|
179
|
+
# api = Gusto::Client.new(
|
180
|
+
# base_url: "https://api.example.com",
|
181
|
+
# environment: Gusto::Environment::DEMO,
|
182
|
+
# token: "YOUR_AUTH_TOKEN"
|
183
|
+
# )
|
184
|
+
# api.employees.jobs_and_compensations.update_job(
|
185
|
+
# job_id: "job_id",
|
186
|
+
# version: "gr78930htutrz444kuytr3s5hgxykuveb523fwl8sir",
|
187
|
+
# title: "Regional Manager",
|
188
|
+
# hire_date: "2020-12-21"
|
189
|
+
# )
|
190
|
+
def update_job(job_id:, version:, title: nil, hire_date: nil, two_percent_shareholder: nil, state_wc_covered: nil, state_wc_class_code: nil, request_options: nil)
|
191
|
+
response = @request_client.conn.put do | req |
|
192
|
+
unless request_options&.timeout_in_seconds.nil?
|
193
|
+
req.options.timeout = request_options.timeout_in_seconds
|
194
|
+
end
|
195
|
+
unless request_options&.token.nil?
|
196
|
+
req.headers["Authorization"] = request_options.token
|
197
|
+
end
|
198
|
+
unless request_options&.gusto_api_version.nil?
|
199
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
200
|
+
end
|
201
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
202
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
203
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
204
|
+
end
|
205
|
+
req.body = { **(request_options&.additional_body_parameters || {}), version: version, title: title, hire_date: hire_date, two_percent_shareholder: two_percent_shareholder, state_wc_covered: state_wc_covered, state_wc_class_code: state_wc_class_code }.compact
|
206
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/jobs/#{job_id}"
|
207
|
+
end
|
208
|
+
Gusto::JobsAndCompensations::Job.from_json(json_object: response.body)
|
209
|
+
end
|
210
|
+
# Deletes a specific job that an employee holds.
|
211
|
+
# scope: `jobs:write`
|
212
|
+
#
|
213
|
+
# @param job_id [String] The UUID of the job
|
214
|
+
# @param request_options [Gusto::RequestOptions]
|
215
|
+
# @return [Void]
|
216
|
+
# @example
|
217
|
+
# api = Gusto::Client.new(
|
218
|
+
# base_url: "https://api.example.com",
|
219
|
+
# environment: Gusto::Environment::DEMO,
|
220
|
+
# token: "YOUR_AUTH_TOKEN"
|
221
|
+
# )
|
222
|
+
# api.employees.jobs_and_compensations.delete_job(job_id: "job_id")
|
223
|
+
def delete_job(job_id:, request_options: nil)
|
224
|
+
response = @request_client.conn.delete do | req |
|
225
|
+
unless request_options&.timeout_in_seconds.nil?
|
226
|
+
req.options.timeout = request_options.timeout_in_seconds
|
227
|
+
end
|
228
|
+
unless request_options&.token.nil?
|
229
|
+
req.headers["Authorization"] = request_options.token
|
230
|
+
end
|
231
|
+
unless request_options&.gusto_api_version.nil?
|
232
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
233
|
+
end
|
234
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
235
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
236
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
237
|
+
end
|
238
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
239
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
240
|
+
end
|
241
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/jobs/#{job_id}"
|
242
|
+
end
|
243
|
+
end
|
244
|
+
# Compensations contain information on how much is paid out for a job. Jobs may
|
245
|
+
# have many compensations, but only one that is active. The current compensation
|
246
|
+
# is the one with the most recent `effective_date`. By default the API returns
|
247
|
+
# only the current compensation - see the `include` query parameter for retrieving
|
248
|
+
# all compensations.
|
249
|
+
# Note: Currently the API does not support creating multiple compensations per job
|
250
|
+
# - creating a compensation with the same `job_uuid` as another will fail with a
|
251
|
+
# relevant error.
|
252
|
+
# Use `flsa_status` to determine if an employee is eligible for overtime.
|
253
|
+
# scope: `jobs:read`
|
254
|
+
#
|
255
|
+
# @param job_id [String] The UUID of the job
|
256
|
+
# @param page [Float] The page that is requested. When unspecified, will load all objects unless
|
257
|
+
# endpoint forces pagination.
|
258
|
+
# @param per [Float] Number of objects per page. For majority of endpoints will default to 25
|
259
|
+
# @param include [String] Available options:
|
260
|
+
# - all_compensations: Include all effective dated compensations for each job
|
261
|
+
# instead of only the current compensation
|
262
|
+
# @param request_options [Gusto::RequestOptions]
|
263
|
+
# @return [Array<Gusto::JobsAndCompensations::Compensation>]
|
264
|
+
# @example
|
265
|
+
# api = Gusto::Client.new(
|
266
|
+
# base_url: "https://api.example.com",
|
267
|
+
# environment: Gusto::Environment::DEMO,
|
268
|
+
# token: "YOUR_AUTH_TOKEN"
|
269
|
+
# )
|
270
|
+
# api.employees.jobs_and_compensations.get_compensations(job_id: "job_id")
|
271
|
+
def get_compensations(job_id:, page: nil, per: nil, include: nil, request_options: nil)
|
272
|
+
response = @request_client.conn.get do | req |
|
273
|
+
unless request_options&.timeout_in_seconds.nil?
|
274
|
+
req.options.timeout = request_options.timeout_in_seconds
|
275
|
+
end
|
276
|
+
unless request_options&.token.nil?
|
277
|
+
req.headers["Authorization"] = request_options.token
|
278
|
+
end
|
279
|
+
unless request_options&.gusto_api_version.nil?
|
280
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
281
|
+
end
|
282
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
283
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "per": per, "include": include }.compact
|
284
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
285
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
286
|
+
end
|
287
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/jobs/#{job_id}/compensations"
|
288
|
+
end
|
289
|
+
parsed_json = JSON.parse(response.body)
|
290
|
+
parsed_json&.map do | item |
|
291
|
+
item = item.to_json
|
292
|
+
Gusto::JobsAndCompensations::Compensation.from_json(json_object: item)
|
293
|
+
end
|
294
|
+
end
|
295
|
+
# Compensations contain information on how much is paid out for a job. Jobs may
|
296
|
+
# have many compensations, but only one that is active. The current compensation
|
297
|
+
# is the one with the most recent `effective_date`.
|
298
|
+
# scope: `jobs:write`
|
299
|
+
#
|
300
|
+
# @param job_id [String] The UUID of the job
|
301
|
+
# @param rate [String] The dollar amount paid per payment unit.
|
302
|
+
# @param payment_unit [Gusto::Employees::JobsAndCompensations::JobsAndCompensationsCreateCompensationRequestPaymentUnit] The unit accompanying the compensation rate. If the employee is an owner, rate
|
303
|
+
# should be 'Paycheck'.
|
304
|
+
# @param effective_date [String] The date when the compensation takes effect.
|
305
|
+
# @param flsa_status [Gusto::FlsaStatusType]
|
306
|
+
# @param adjust_for_minimum_wage [Boolean] Determines whether the compensation should be adjusted for minimum wage. Only
|
307
|
+
# applies to Nonexempt employees.
|
308
|
+
# @param minimum_wages [Array<Hash>] Request of type Array<Gusto::Employees::JobsAndCompensations::JobsAndCompensationsCreateCompensationRequestMinimumWagesItem>, as a Hash
|
309
|
+
# * :uuid (String)
|
310
|
+
# @param request_options [Gusto::RequestOptions]
|
311
|
+
# @return [Gusto::JobsAndCompensations::Compensation]
|
312
|
+
# @example
|
313
|
+
# api = Gusto::Client.new(
|
314
|
+
# base_url: "https://api.example.com",
|
315
|
+
# environment: Gusto::Environment::DEMO,
|
316
|
+
# token: "YOUR_AUTH_TOKEN"
|
317
|
+
# )
|
318
|
+
# api.employees.jobs_and_compensations.create_compensation(
|
319
|
+
# job_id: "job_id",
|
320
|
+
# rate: "60000.00",
|
321
|
+
# payment_unit: YEAR,
|
322
|
+
# flsa_status: EXEMPT
|
323
|
+
# )
|
324
|
+
def create_compensation(job_id:, rate: nil, payment_unit:, effective_date: nil, flsa_status:, adjust_for_minimum_wage: nil, minimum_wages: nil, request_options: nil)
|
325
|
+
response = @request_client.conn.post do | req |
|
326
|
+
unless request_options&.timeout_in_seconds.nil?
|
327
|
+
req.options.timeout = request_options.timeout_in_seconds
|
328
|
+
end
|
329
|
+
unless request_options&.token.nil?
|
330
|
+
req.headers["Authorization"] = request_options.token
|
331
|
+
end
|
332
|
+
unless request_options&.gusto_api_version.nil?
|
333
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
334
|
+
end
|
335
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
336
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
337
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
338
|
+
end
|
339
|
+
req.body = { **(request_options&.additional_body_parameters || {}), rate: rate, payment_unit: payment_unit, effective_date: effective_date, flsa_status: flsa_status, adjust_for_minimum_wage: adjust_for_minimum_wage, minimum_wages: minimum_wages }.compact
|
340
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/jobs/#{job_id}/compensations"
|
341
|
+
end
|
342
|
+
Gusto::JobsAndCompensations::Compensation.from_json(json_object: response.body)
|
343
|
+
end
|
344
|
+
# Compensations contain information on how much is paid out for a job. Jobs may
|
345
|
+
# have many compensations, but only one that is active. The current compensation
|
346
|
+
# is the one with the most recent `effective_date`.
|
347
|
+
# scope: `jobs:read`
|
348
|
+
#
|
349
|
+
# @param compensation_id [String] The UUID of the compensation
|
350
|
+
# @param request_options [Gusto::RequestOptions]
|
351
|
+
# @return [Gusto::JobsAndCompensations::Compensation]
|
352
|
+
# @example
|
353
|
+
# api = Gusto::Client.new(
|
354
|
+
# base_url: "https://api.example.com",
|
355
|
+
# environment: Gusto::Environment::DEMO,
|
356
|
+
# token: "YOUR_AUTH_TOKEN"
|
357
|
+
# )
|
358
|
+
# api.employees.jobs_and_compensations.get_compensation(compensation_id: "compensation_id")
|
359
|
+
def get_compensation(compensation_id:, request_options: nil)
|
360
|
+
response = @request_client.conn.get do | req |
|
361
|
+
unless request_options&.timeout_in_seconds.nil?
|
362
|
+
req.options.timeout = request_options.timeout_in_seconds
|
363
|
+
end
|
364
|
+
unless request_options&.token.nil?
|
365
|
+
req.headers["Authorization"] = request_options.token
|
366
|
+
end
|
367
|
+
unless request_options&.gusto_api_version.nil?
|
368
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
369
|
+
end
|
370
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
371
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
372
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
373
|
+
end
|
374
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
375
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
376
|
+
end
|
377
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/compensations/#{compensation_id}"
|
378
|
+
end
|
379
|
+
Gusto::JobsAndCompensations::Compensation.from_json(json_object: response.body)
|
380
|
+
end
|
381
|
+
# Compensations contain information on how much is paid out for a job. Jobs may
|
382
|
+
# have many compensations, but only one that is active. The current compensation
|
383
|
+
# is the one with the most recent `effective_date`.
|
384
|
+
# scope: `jobs:write`
|
385
|
+
#
|
386
|
+
# @param compensation_id [String] The UUID of the compensation
|
387
|
+
# @param version [String] The current version of the object. See the [versioning
|
388
|
+
# guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for
|
389
|
+
# information on how to use this field.
|
390
|
+
# @param rate [String] The dollar amount paid per payment unit.
|
391
|
+
# @param payment_unit [Gusto::Employees::JobsAndCompensations::JobsAndCompensationsUpdateCompensationRequestPaymentUnit] The unit accompanying the compensation rate. If the employee is an owner, rate
|
392
|
+
# should be 'Paycheck'.
|
393
|
+
# @param flsa_status [Gusto::FlsaStatusType]
|
394
|
+
# @param adjust_for_minimum_wage [Boolean] Determines whether the compensation should be adjusted for minimum wage. Only
|
395
|
+
# applies to Nonexempt employees.
|
396
|
+
# @param minimum_wages [Array<Hash>] Request of type Array<Gusto::Employees::JobsAndCompensations::JobsAndCompensationsUpdateCompensationRequestMinimumWagesItem>, as a Hash
|
397
|
+
# * :uuid (String)
|
398
|
+
# @param request_options [Gusto::RequestOptions]
|
399
|
+
# @return [Gusto::JobsAndCompensations::Compensation]
|
400
|
+
# @example
|
401
|
+
# api = Gusto::Client.new(
|
402
|
+
# base_url: "https://api.example.com",
|
403
|
+
# environment: Gusto::Environment::DEMO,
|
404
|
+
# token: "YOUR_AUTH_TOKEN"
|
405
|
+
# )
|
406
|
+
# api.employees.jobs_and_compensations.update_compensation(
|
407
|
+
# compensation_id: "compensation_id",
|
408
|
+
# version: "98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872",
|
409
|
+
# rate: "60000.00",
|
410
|
+
# payment_unit: YEAR,
|
411
|
+
# flsa_status: EXEMPT
|
412
|
+
# )
|
413
|
+
def update_compensation(compensation_id:, version:, rate: nil, payment_unit: nil, flsa_status: nil, adjust_for_minimum_wage: nil, minimum_wages: nil, request_options: nil)
|
414
|
+
response = @request_client.conn.put do | req |
|
415
|
+
unless request_options&.timeout_in_seconds.nil?
|
416
|
+
req.options.timeout = request_options.timeout_in_seconds
|
417
|
+
end
|
418
|
+
unless request_options&.token.nil?
|
419
|
+
req.headers["Authorization"] = request_options.token
|
420
|
+
end
|
421
|
+
unless request_options&.gusto_api_version.nil?
|
422
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
423
|
+
end
|
424
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
425
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
426
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
427
|
+
end
|
428
|
+
req.body = { **(request_options&.additional_body_parameters || {}), version: version, rate: rate, payment_unit: payment_unit, flsa_status: flsa_status, adjust_for_minimum_wage: adjust_for_minimum_wage, minimum_wages: minimum_wages }.compact
|
429
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/compensations/#{compensation_id}"
|
430
|
+
end
|
431
|
+
Gusto::JobsAndCompensations::Compensation.from_json(json_object: response.body)
|
432
|
+
end
|
433
|
+
# Compensations contain information on how much is paid out for a job. Jobs may
|
434
|
+
# have many compensations, but only one that is active. The current compensation
|
435
|
+
# is the one with the most recent `effective_date`. This endpoint deletes a
|
436
|
+
# compensation for a job that hasn't been processed on payroll.
|
437
|
+
# scope: `jobs:write`
|
438
|
+
#
|
439
|
+
# @param compensation_id [String] The UUID of the compensation
|
440
|
+
# @param request_options [Gusto::RequestOptions]
|
441
|
+
# @return [Void]
|
442
|
+
# @example
|
443
|
+
# api = Gusto::Client.new(
|
444
|
+
# base_url: "https://api.example.com",
|
445
|
+
# environment: Gusto::Environment::DEMO,
|
446
|
+
# token: "YOUR_AUTH_TOKEN"
|
447
|
+
# )
|
448
|
+
# api.employees.jobs_and_compensations.delete_compensation(compensation_id: "compensation_id")
|
449
|
+
def delete_compensation(compensation_id:, request_options: nil)
|
450
|
+
response = @request_client.conn.delete do | req |
|
451
|
+
unless request_options&.timeout_in_seconds.nil?
|
452
|
+
req.options.timeout = request_options.timeout_in_seconds
|
453
|
+
end
|
454
|
+
unless request_options&.token.nil?
|
455
|
+
req.headers["Authorization"] = request_options.token
|
456
|
+
end
|
457
|
+
unless request_options&.gusto_api_version.nil?
|
458
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
459
|
+
end
|
460
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
461
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
462
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
463
|
+
end
|
464
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
465
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
466
|
+
end
|
467
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/compensations/#{compensation_id}"
|
468
|
+
end
|
469
|
+
end
|
470
|
+
end
|
471
|
+
class AsyncJobsAndCompensationsClient
|
472
|
+
# @return [Gusto::AsyncRequestClient]
|
473
|
+
attr_reader :request_client
|
474
|
+
|
475
|
+
|
476
|
+
# @param request_client [Gusto::RequestClient]
|
477
|
+
# @return [Gusto::Employees::AsyncJobsAndCompensationsClient]
|
478
|
+
def initialize(request_client:)
|
479
|
+
@request_client = request_client
|
480
|
+
end
|
481
|
+
# Get all of the jobs that an employee holds.
|
482
|
+
# scope: `jobs:read`
|
483
|
+
#
|
484
|
+
# @param employee_id [String] The UUID of the employee
|
485
|
+
# @param page [Float] The page that is requested. When unspecified, will load all objects unless
|
486
|
+
# endpoint forces pagination.
|
487
|
+
# @param per [Float] Number of objects per page. For majority of endpoints will default to 25
|
488
|
+
# @param include [String] Available options:
|
489
|
+
# - all_compensations: Include all effective dated compensations for each job
|
490
|
+
# instead of only the current compensation
|
491
|
+
# @param request_options [Gusto::RequestOptions]
|
492
|
+
# @return [Array<Gusto::JobsAndCompensations::Job>]
|
493
|
+
# @example
|
494
|
+
# api = Gusto::Client.new(
|
495
|
+
# base_url: "https://api.example.com",
|
496
|
+
# environment: Gusto::Environment::DEMO,
|
497
|
+
# token: "YOUR_AUTH_TOKEN"
|
498
|
+
# )
|
499
|
+
# api.employees.jobs_and_compensations.get_jobs(employee_id: "employee_id")
|
500
|
+
def get_jobs(employee_id:, page: nil, per: nil, include: nil, request_options: nil)
|
501
|
+
Async do
|
502
|
+
response = @request_client.conn.get do | req |
|
503
|
+
unless request_options&.timeout_in_seconds.nil?
|
504
|
+
req.options.timeout = request_options.timeout_in_seconds
|
505
|
+
end
|
506
|
+
unless request_options&.token.nil?
|
507
|
+
req.headers["Authorization"] = request_options.token
|
508
|
+
end
|
509
|
+
unless request_options&.gusto_api_version.nil?
|
510
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
511
|
+
end
|
512
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
513
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "per": per, "include": include }.compact
|
514
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
515
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
516
|
+
end
|
517
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/employees/#{employee_id}/jobs"
|
518
|
+
end
|
519
|
+
parsed_json = JSON.parse(response.body)
|
520
|
+
parsed_json&.map do | item |
|
521
|
+
item = item.to_json
|
522
|
+
Gusto::JobsAndCompensations::Job.from_json(json_object: item)
|
523
|
+
end
|
524
|
+
end
|
525
|
+
end
|
526
|
+
# Create a job.
|
527
|
+
# scope: `jobs:write`
|
528
|
+
#
|
529
|
+
# @param employee_id [String] The UUID of the employee
|
530
|
+
# @param title [String] The job title
|
531
|
+
# @param hire_date [String] The date when the employee was hired or rehired for the job.
|
532
|
+
# @param two_percent_shareholder [Boolean] Whether the employee owns at least 2% of the company.
|
533
|
+
# @param state_wc_covered [Boolean] Whether this job is eligible for workers' compensation coverage in the state of
|
534
|
+
# Washington (WA).
|
535
|
+
# @param state_wc_class_code [String] The risk class code for workers' compensation in Washington state. Please visit
|
536
|
+
# [Washington state's Risk Class
|
537
|
+
# ce/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/)
|
538
|
+
# to learn more.
|
539
|
+
# @param request_options [Gusto::RequestOptions]
|
540
|
+
# @return [Gusto::JobsAndCompensations::Job]
|
541
|
+
# @example
|
542
|
+
# api = Gusto::Client.new(
|
543
|
+
# base_url: "https://api.example.com",
|
544
|
+
# environment: Gusto::Environment::DEMO,
|
545
|
+
# token: "YOUR_AUTH_TOKEN"
|
546
|
+
# )
|
547
|
+
# api.employees.jobs_and_compensations.create_job(
|
548
|
+
# employee_id: "employee_id",
|
549
|
+
# title: "Regional Manager",
|
550
|
+
# hire_date: "2020-12-21"
|
551
|
+
# )
|
552
|
+
def create_job(employee_id:, title:, hire_date:, two_percent_shareholder: nil, state_wc_covered: nil, state_wc_class_code: nil, request_options: nil)
|
553
|
+
Async do
|
554
|
+
response = @request_client.conn.post do | req |
|
555
|
+
unless request_options&.timeout_in_seconds.nil?
|
556
|
+
req.options.timeout = request_options.timeout_in_seconds
|
557
|
+
end
|
558
|
+
unless request_options&.token.nil?
|
559
|
+
req.headers["Authorization"] = request_options.token
|
560
|
+
end
|
561
|
+
unless request_options&.gusto_api_version.nil?
|
562
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
563
|
+
end
|
564
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
565
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
566
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
567
|
+
end
|
568
|
+
req.body = { **(request_options&.additional_body_parameters || {}), title: title, hire_date: hire_date, two_percent_shareholder: two_percent_shareholder, state_wc_covered: state_wc_covered, state_wc_class_code: state_wc_class_code }.compact
|
569
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/employees/#{employee_id}/jobs"
|
570
|
+
end
|
571
|
+
Gusto::JobsAndCompensations::Job.from_json(json_object: response.body)
|
572
|
+
end
|
573
|
+
end
|
574
|
+
# Get a job.
|
575
|
+
# scope: `jobs:read`
|
576
|
+
#
|
577
|
+
# @param job_id [String] The UUID of the job
|
578
|
+
# @param include [String] Available options:
|
579
|
+
# - all_compensations: Include all effective dated compensations for the job
|
580
|
+
# instead of only the current compensation
|
581
|
+
# @param request_options [Gusto::RequestOptions]
|
582
|
+
# @return [Gusto::JobsAndCompensations::Job]
|
583
|
+
# @example
|
584
|
+
# api = Gusto::Client.new(
|
585
|
+
# base_url: "https://api.example.com",
|
586
|
+
# environment: Gusto::Environment::DEMO,
|
587
|
+
# token: "YOUR_AUTH_TOKEN"
|
588
|
+
# )
|
589
|
+
# api.employees.jobs_and_compensations.get_job(job_id: "job_id")
|
590
|
+
def get_job(job_id:, include: nil, request_options: nil)
|
591
|
+
Async do
|
592
|
+
response = @request_client.conn.get do | req |
|
593
|
+
unless request_options&.timeout_in_seconds.nil?
|
594
|
+
req.options.timeout = request_options.timeout_in_seconds
|
595
|
+
end
|
596
|
+
unless request_options&.token.nil?
|
597
|
+
req.headers["Authorization"] = request_options.token
|
598
|
+
end
|
599
|
+
unless request_options&.gusto_api_version.nil?
|
600
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
601
|
+
end
|
602
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
603
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "include": include }.compact
|
604
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
605
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
606
|
+
end
|
607
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/jobs/#{job_id}"
|
608
|
+
end
|
609
|
+
Gusto::JobsAndCompensations::Job.from_json(json_object: response.body)
|
610
|
+
end
|
611
|
+
end
|
612
|
+
# Update a job.
|
613
|
+
# scope: `jobs:write`
|
614
|
+
#
|
615
|
+
# @param job_id [String] The UUID of the job
|
616
|
+
# @param version [String] The current version of the object. See the [versioning
|
617
|
+
# guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for
|
618
|
+
# information on how to use this field.
|
619
|
+
# @param title [String] The job title
|
620
|
+
# @param hire_date [String] The date when the employee was hired or rehired for the job.
|
621
|
+
# @param two_percent_shareholder [Boolean] Whether the employee owns at least 2% of the company.
|
622
|
+
# @param state_wc_covered [Boolean] Whether this job is eligible for workers' compensation coverage in the state of
|
623
|
+
# Washington (WA).
|
624
|
+
# @param state_wc_class_code [String] The risk class code for workers' compensation in Washington state. Please visit
|
625
|
+
# [Washington state's Risk Class
|
626
|
+
# ce/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/)
|
627
|
+
# to learn more.
|
628
|
+
# @param request_options [Gusto::RequestOptions]
|
629
|
+
# @return [Gusto::JobsAndCompensations::Job]
|
630
|
+
# @example
|
631
|
+
# api = Gusto::Client.new(
|
632
|
+
# base_url: "https://api.example.com",
|
633
|
+
# environment: Gusto::Environment::DEMO,
|
634
|
+
# token: "YOUR_AUTH_TOKEN"
|
635
|
+
# )
|
636
|
+
# api.employees.jobs_and_compensations.update_job(
|
637
|
+
# job_id: "job_id",
|
638
|
+
# version: "gr78930htutrz444kuytr3s5hgxykuveb523fwl8sir",
|
639
|
+
# title: "Regional Manager",
|
640
|
+
# hire_date: "2020-12-21"
|
641
|
+
# )
|
642
|
+
def update_job(job_id:, version:, title: nil, hire_date: nil, two_percent_shareholder: nil, state_wc_covered: nil, state_wc_class_code: nil, request_options: nil)
|
643
|
+
Async do
|
644
|
+
response = @request_client.conn.put do | req |
|
645
|
+
unless request_options&.timeout_in_seconds.nil?
|
646
|
+
req.options.timeout = request_options.timeout_in_seconds
|
647
|
+
end
|
648
|
+
unless request_options&.token.nil?
|
649
|
+
req.headers["Authorization"] = request_options.token
|
650
|
+
end
|
651
|
+
unless request_options&.gusto_api_version.nil?
|
652
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
653
|
+
end
|
654
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
655
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
656
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
657
|
+
end
|
658
|
+
req.body = { **(request_options&.additional_body_parameters || {}), version: version, title: title, hire_date: hire_date, two_percent_shareholder: two_percent_shareholder, state_wc_covered: state_wc_covered, state_wc_class_code: state_wc_class_code }.compact
|
659
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/jobs/#{job_id}"
|
660
|
+
end
|
661
|
+
Gusto::JobsAndCompensations::Job.from_json(json_object: response.body)
|
662
|
+
end
|
663
|
+
end
|
664
|
+
# Deletes a specific job that an employee holds.
|
665
|
+
# scope: `jobs:write`
|
666
|
+
#
|
667
|
+
# @param job_id [String] The UUID of the job
|
668
|
+
# @param request_options [Gusto::RequestOptions]
|
669
|
+
# @return [Void]
|
670
|
+
# @example
|
671
|
+
# api = Gusto::Client.new(
|
672
|
+
# base_url: "https://api.example.com",
|
673
|
+
# environment: Gusto::Environment::DEMO,
|
674
|
+
# token: "YOUR_AUTH_TOKEN"
|
675
|
+
# )
|
676
|
+
# api.employees.jobs_and_compensations.delete_job(job_id: "job_id")
|
677
|
+
def delete_job(job_id:, request_options: nil)
|
678
|
+
Async do
|
679
|
+
response = @request_client.conn.delete do | req |
|
680
|
+
unless request_options&.timeout_in_seconds.nil?
|
681
|
+
req.options.timeout = request_options.timeout_in_seconds
|
682
|
+
end
|
683
|
+
unless request_options&.token.nil?
|
684
|
+
req.headers["Authorization"] = request_options.token
|
685
|
+
end
|
686
|
+
unless request_options&.gusto_api_version.nil?
|
687
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
688
|
+
end
|
689
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
690
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
691
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
692
|
+
end
|
693
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
694
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
695
|
+
end
|
696
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/jobs/#{job_id}"
|
697
|
+
end
|
698
|
+
end
|
699
|
+
end
|
700
|
+
# Compensations contain information on how much is paid out for a job. Jobs may
|
701
|
+
# have many compensations, but only one that is active. The current compensation
|
702
|
+
# is the one with the most recent `effective_date`. By default the API returns
|
703
|
+
# only the current compensation - see the `include` query parameter for retrieving
|
704
|
+
# all compensations.
|
705
|
+
# Note: Currently the API does not support creating multiple compensations per job
|
706
|
+
# - creating a compensation with the same `job_uuid` as another will fail with a
|
707
|
+
# relevant error.
|
708
|
+
# Use `flsa_status` to determine if an employee is eligible for overtime.
|
709
|
+
# scope: `jobs:read`
|
710
|
+
#
|
711
|
+
# @param job_id [String] The UUID of the job
|
712
|
+
# @param page [Float] The page that is requested. When unspecified, will load all objects unless
|
713
|
+
# endpoint forces pagination.
|
714
|
+
# @param per [Float] Number of objects per page. For majority of endpoints will default to 25
|
715
|
+
# @param include [String] Available options:
|
716
|
+
# - all_compensations: Include all effective dated compensations for each job
|
717
|
+
# instead of only the current compensation
|
718
|
+
# @param request_options [Gusto::RequestOptions]
|
719
|
+
# @return [Array<Gusto::JobsAndCompensations::Compensation>]
|
720
|
+
# @example
|
721
|
+
# api = Gusto::Client.new(
|
722
|
+
# base_url: "https://api.example.com",
|
723
|
+
# environment: Gusto::Environment::DEMO,
|
724
|
+
# token: "YOUR_AUTH_TOKEN"
|
725
|
+
# )
|
726
|
+
# api.employees.jobs_and_compensations.get_compensations(job_id: "job_id")
|
727
|
+
def get_compensations(job_id:, page: nil, per: nil, include: nil, request_options: nil)
|
728
|
+
Async do
|
729
|
+
response = @request_client.conn.get do | req |
|
730
|
+
unless request_options&.timeout_in_seconds.nil?
|
731
|
+
req.options.timeout = request_options.timeout_in_seconds
|
732
|
+
end
|
733
|
+
unless request_options&.token.nil?
|
734
|
+
req.headers["Authorization"] = request_options.token
|
735
|
+
end
|
736
|
+
unless request_options&.gusto_api_version.nil?
|
737
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
738
|
+
end
|
739
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
740
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "per": per, "include": include }.compact
|
741
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
742
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
743
|
+
end
|
744
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/jobs/#{job_id}/compensations"
|
745
|
+
end
|
746
|
+
parsed_json = JSON.parse(response.body)
|
747
|
+
parsed_json&.map do | item |
|
748
|
+
item = item.to_json
|
749
|
+
Gusto::JobsAndCompensations::Compensation.from_json(json_object: item)
|
750
|
+
end
|
751
|
+
end
|
752
|
+
end
|
753
|
+
# Compensations contain information on how much is paid out for a job. Jobs may
|
754
|
+
# have many compensations, but only one that is active. The current compensation
|
755
|
+
# is the one with the most recent `effective_date`.
|
756
|
+
# scope: `jobs:write`
|
757
|
+
#
|
758
|
+
# @param job_id [String] The UUID of the job
|
759
|
+
# @param rate [String] The dollar amount paid per payment unit.
|
760
|
+
# @param payment_unit [Gusto::Employees::JobsAndCompensations::JobsAndCompensationsCreateCompensationRequestPaymentUnit] The unit accompanying the compensation rate. If the employee is an owner, rate
|
761
|
+
# should be 'Paycheck'.
|
762
|
+
# @param effective_date [String] The date when the compensation takes effect.
|
763
|
+
# @param flsa_status [Gusto::FlsaStatusType]
|
764
|
+
# @param adjust_for_minimum_wage [Boolean] Determines whether the compensation should be adjusted for minimum wage. Only
|
765
|
+
# applies to Nonexempt employees.
|
766
|
+
# @param minimum_wages [Array<Hash>] Request of type Array<Gusto::Employees::JobsAndCompensations::JobsAndCompensationsCreateCompensationRequestMinimumWagesItem>, as a Hash
|
767
|
+
# * :uuid (String)
|
768
|
+
# @param request_options [Gusto::RequestOptions]
|
769
|
+
# @return [Gusto::JobsAndCompensations::Compensation]
|
770
|
+
# @example
|
771
|
+
# api = Gusto::Client.new(
|
772
|
+
# base_url: "https://api.example.com",
|
773
|
+
# environment: Gusto::Environment::DEMO,
|
774
|
+
# token: "YOUR_AUTH_TOKEN"
|
775
|
+
# )
|
776
|
+
# api.employees.jobs_and_compensations.create_compensation(
|
777
|
+
# job_id: "job_id",
|
778
|
+
# rate: "60000.00",
|
779
|
+
# payment_unit: YEAR,
|
780
|
+
# flsa_status: EXEMPT
|
781
|
+
# )
|
782
|
+
def create_compensation(job_id:, rate: nil, payment_unit:, effective_date: nil, flsa_status:, adjust_for_minimum_wage: nil, minimum_wages: nil, request_options: nil)
|
783
|
+
Async do
|
784
|
+
response = @request_client.conn.post do | req |
|
785
|
+
unless request_options&.timeout_in_seconds.nil?
|
786
|
+
req.options.timeout = request_options.timeout_in_seconds
|
787
|
+
end
|
788
|
+
unless request_options&.token.nil?
|
789
|
+
req.headers["Authorization"] = request_options.token
|
790
|
+
end
|
791
|
+
unless request_options&.gusto_api_version.nil?
|
792
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
793
|
+
end
|
794
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
795
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
796
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
797
|
+
end
|
798
|
+
req.body = { **(request_options&.additional_body_parameters || {}), rate: rate, payment_unit: payment_unit, effective_date: effective_date, flsa_status: flsa_status, adjust_for_minimum_wage: adjust_for_minimum_wage, minimum_wages: minimum_wages }.compact
|
799
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/jobs/#{job_id}/compensations"
|
800
|
+
end
|
801
|
+
Gusto::JobsAndCompensations::Compensation.from_json(json_object: response.body)
|
802
|
+
end
|
803
|
+
end
|
804
|
+
# Compensations contain information on how much is paid out for a job. Jobs may
|
805
|
+
# have many compensations, but only one that is active. The current compensation
|
806
|
+
# is the one with the most recent `effective_date`.
|
807
|
+
# scope: `jobs:read`
|
808
|
+
#
|
809
|
+
# @param compensation_id [String] The UUID of the compensation
|
810
|
+
# @param request_options [Gusto::RequestOptions]
|
811
|
+
# @return [Gusto::JobsAndCompensations::Compensation]
|
812
|
+
# @example
|
813
|
+
# api = Gusto::Client.new(
|
814
|
+
# base_url: "https://api.example.com",
|
815
|
+
# environment: Gusto::Environment::DEMO,
|
816
|
+
# token: "YOUR_AUTH_TOKEN"
|
817
|
+
# )
|
818
|
+
# api.employees.jobs_and_compensations.get_compensation(compensation_id: "compensation_id")
|
819
|
+
def get_compensation(compensation_id:, request_options: nil)
|
820
|
+
Async do
|
821
|
+
response = @request_client.conn.get do | req |
|
822
|
+
unless request_options&.timeout_in_seconds.nil?
|
823
|
+
req.options.timeout = request_options.timeout_in_seconds
|
824
|
+
end
|
825
|
+
unless request_options&.token.nil?
|
826
|
+
req.headers["Authorization"] = request_options.token
|
827
|
+
end
|
828
|
+
unless request_options&.gusto_api_version.nil?
|
829
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
830
|
+
end
|
831
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
832
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
833
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
834
|
+
end
|
835
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
836
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
837
|
+
end
|
838
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/compensations/#{compensation_id}"
|
839
|
+
end
|
840
|
+
Gusto::JobsAndCompensations::Compensation.from_json(json_object: response.body)
|
841
|
+
end
|
842
|
+
end
|
843
|
+
# Compensations contain information on how much is paid out for a job. Jobs may
|
844
|
+
# have many compensations, but only one that is active. The current compensation
|
845
|
+
# is the one with the most recent `effective_date`.
|
846
|
+
# scope: `jobs:write`
|
847
|
+
#
|
848
|
+
# @param compensation_id [String] The UUID of the compensation
|
849
|
+
# @param version [String] The current version of the object. See the [versioning
|
850
|
+
# guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for
|
851
|
+
# information on how to use this field.
|
852
|
+
# @param rate [String] The dollar amount paid per payment unit.
|
853
|
+
# @param payment_unit [Gusto::Employees::JobsAndCompensations::JobsAndCompensationsUpdateCompensationRequestPaymentUnit] The unit accompanying the compensation rate. If the employee is an owner, rate
|
854
|
+
# should be 'Paycheck'.
|
855
|
+
# @param flsa_status [Gusto::FlsaStatusType]
|
856
|
+
# @param adjust_for_minimum_wage [Boolean] Determines whether the compensation should be adjusted for minimum wage. Only
|
857
|
+
# applies to Nonexempt employees.
|
858
|
+
# @param minimum_wages [Array<Hash>] Request of type Array<Gusto::Employees::JobsAndCompensations::JobsAndCompensationsUpdateCompensationRequestMinimumWagesItem>, as a Hash
|
859
|
+
# * :uuid (String)
|
860
|
+
# @param request_options [Gusto::RequestOptions]
|
861
|
+
# @return [Gusto::JobsAndCompensations::Compensation]
|
862
|
+
# @example
|
863
|
+
# api = Gusto::Client.new(
|
864
|
+
# base_url: "https://api.example.com",
|
865
|
+
# environment: Gusto::Environment::DEMO,
|
866
|
+
# token: "YOUR_AUTH_TOKEN"
|
867
|
+
# )
|
868
|
+
# api.employees.jobs_and_compensations.update_compensation(
|
869
|
+
# compensation_id: "compensation_id",
|
870
|
+
# version: "98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872",
|
871
|
+
# rate: "60000.00",
|
872
|
+
# payment_unit: YEAR,
|
873
|
+
# flsa_status: EXEMPT
|
874
|
+
# )
|
875
|
+
def update_compensation(compensation_id:, version:, rate: nil, payment_unit: nil, flsa_status: nil, adjust_for_minimum_wage: nil, minimum_wages: nil, request_options: nil)
|
876
|
+
Async do
|
877
|
+
response = @request_client.conn.put do | req |
|
878
|
+
unless request_options&.timeout_in_seconds.nil?
|
879
|
+
req.options.timeout = request_options.timeout_in_seconds
|
880
|
+
end
|
881
|
+
unless request_options&.token.nil?
|
882
|
+
req.headers["Authorization"] = request_options.token
|
883
|
+
end
|
884
|
+
unless request_options&.gusto_api_version.nil?
|
885
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
886
|
+
end
|
887
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
888
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
889
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
890
|
+
end
|
891
|
+
req.body = { **(request_options&.additional_body_parameters || {}), version: version, rate: rate, payment_unit: payment_unit, flsa_status: flsa_status, adjust_for_minimum_wage: adjust_for_minimum_wage, minimum_wages: minimum_wages }.compact
|
892
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/compensations/#{compensation_id}"
|
893
|
+
end
|
894
|
+
Gusto::JobsAndCompensations::Compensation.from_json(json_object: response.body)
|
895
|
+
end
|
896
|
+
end
|
897
|
+
# Compensations contain information on how much is paid out for a job. Jobs may
|
898
|
+
# have many compensations, but only one that is active. The current compensation
|
899
|
+
# is the one with the most recent `effective_date`. This endpoint deletes a
|
900
|
+
# compensation for a job that hasn't been processed on payroll.
|
901
|
+
# scope: `jobs:write`
|
902
|
+
#
|
903
|
+
# @param compensation_id [String] The UUID of the compensation
|
904
|
+
# @param request_options [Gusto::RequestOptions]
|
905
|
+
# @return [Void]
|
906
|
+
# @example
|
907
|
+
# api = Gusto::Client.new(
|
908
|
+
# base_url: "https://api.example.com",
|
909
|
+
# environment: Gusto::Environment::DEMO,
|
910
|
+
# token: "YOUR_AUTH_TOKEN"
|
911
|
+
# )
|
912
|
+
# api.employees.jobs_and_compensations.delete_compensation(compensation_id: "compensation_id")
|
913
|
+
def delete_compensation(compensation_id:, request_options: nil)
|
914
|
+
Async do
|
915
|
+
response = @request_client.conn.delete do | req |
|
916
|
+
unless request_options&.timeout_in_seconds.nil?
|
917
|
+
req.options.timeout = request_options.timeout_in_seconds
|
918
|
+
end
|
919
|
+
unless request_options&.token.nil?
|
920
|
+
req.headers["Authorization"] = request_options.token
|
921
|
+
end
|
922
|
+
unless request_options&.gusto_api_version.nil?
|
923
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
924
|
+
end
|
925
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
926
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
927
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
928
|
+
end
|
929
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
930
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
931
|
+
end
|
932
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/compensations/#{compensation_id}"
|
933
|
+
end
|
934
|
+
end
|
935
|
+
end
|
936
|
+
end
|
937
|
+
end
|
938
|
+
end
|