From ad611e73a0a96566301f52211ec976143b76d7f1 Mon Sep 17 00:00:00 2001 From: bhr-sdk-bot Date: Mon, 31 Aug 2026 22:34:51 +0000 Subject: [PATCH] =?UTF-8?q?[auto]=20SDK=20update=20=E2=80=94=20spec=205874?= =?UTF-8?q?27a4ec8e29f25ff12a4b7a49d7a1261c4013?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .openapi-generator/FILES | 1016 +- README.md | 1092 +- bamboohr_sdk/__init__.py | 2212 +- bamboohr_sdk/api/__init__.py | 20 +- bamboohr_sdk/api/account_information_api.py | 3777 +- bamboohr_sdk/api/alerts_api.py | 1197 + bamboohr_sdk/api/applicant_tracking_api.py | 2714 +- bamboohr_sdk/api/benefits_api.py | 2125 +- bamboohr_sdk/api/calendar_events_api.py | 440 + bamboohr_sdk/api/change_tracking_api.py | 573 + bamboohr_sdk/api/company_api.py | 276 + bamboohr_sdk/api/company_files_api.py | 1083 +- bamboohr_sdk/api/company_profile_api.py | 654 +- bamboohr_sdk/api/compensation_api.py | 675 + .../api/compensation_benchmarking_api.py | 2635 ++ bamboohr_sdk/api/compensation_planning_api.py | 6877 +++ bamboohr_sdk/api/custom_fields_api.py | 3047 ++ bamboohr_sdk/api/custom_reports_api.py | 874 +- bamboohr_sdk/api/datasets_api.py | 1953 +- bamboohr_sdk/api/employee_files_api.py | 1249 +- ...lar_data_api.py => employee_tables_api.py} | 1685 +- bamboohr_sdk/api/employee_verification_api.py | 1270 + bamboohr_sdk/api/employees_api.py | 1547 +- bamboohr_sdk/api/goals_api.py | 5826 ++- bamboohr_sdk/api/holidays_api.py | 2237 + bamboohr_sdk/api/hours_api.py | 896 +- .../api/last_change_information_api.py | 334 - bamboohr_sdk/api/locations_api.py | 1406 + bamboohr_sdk/api/login_api.py | 264 +- bamboohr_sdk/api/manual_api.py | 72 +- bamboohr_sdk/api/meal_rest_breaks_api.py | 5171 +++ bamboohr_sdk/api/onboarding_api.py | 2842 ++ bamboohr_sdk/api/pay_grades_bands_api.py | 3075 ++ bamboohr_sdk/api/photos_api.py | 475 +- bamboohr_sdk/api/reports_api.py | 598 +- bamboohr_sdk/api/scheduling_api.py | 3931 ++ bamboohr_sdk/api/time_off_api.py | 3425 +- bamboohr_sdk/api/time_tracking_api.py | 14399 ++++-- bamboohr_sdk/api/total_rewards_api.py | 1972 + bamboohr_sdk/api/training_api.py | 2365 +- bamboohr_sdk/api/webhook_events_api.py | 986 +- bamboohr_sdk/api/webhooks_api.py | 1539 +- bamboohr_sdk/api_client.py | 329 +- bamboohr_sdk/api_error_helper.py | 54 +- bamboohr_sdk/api_helper.py | 43 +- bamboohr_sdk/api_response.py | 14 +- bamboohr_sdk/client/bamboohr_client.py | 125 +- bamboohr_sdk/configuration.py | 359 +- bamboohr_sdk/exceptions.py | 159 +- bamboohr_sdk/models/__init__.py | 853 +- ...5b6d5f564f805d688ff2c1e37c3990_request.py} | 65 +- ...=> add_custom_field_list_value_request.py} | 54 +- .../add_custom_field_list_value_response.py | 157 + ...field_list_value_response_one_of_inner.py} | 57 +- .../models/add_cycle_admins_response.py | 107 + ... add_cycle_admins_response_added_inner.py} | 65 +- ...dd_cycle_admins_response_skipped_inner.py} | 68 +- .../add_total_rewards_employees_request.py | 82 + .../models/adjust_time_off_balance.py | 68 +- .../adjust_time_tracking_request_schema.py | 90 +- bamboohr_sdk/models/alert_configuration_v1.py | 266 + .../models/alert_configuration_write_v1.py | 219 + .../models/alert_template_list_response_v1.py | 98 + ..._template_list_response_v1_alerts_inner.py | 91 + .../models/alignment_options_response.py | 65 +- ...ions_response_aligns_with_options_inner.py | 48 +- bamboohr_sdk/models/applicant_status.py | 83 +- bamboohr_sdk/models/application_details.py | 218 +- .../models/application_details_applicant.py | 145 +- .../application_details_applicant_address.py | 127 - ...application_details_applicant_education.py | 98 - .../application_details_attachments_inner.py | 51 +- .../models/application_details_job.py | 71 +- .../application_details_job_hiring_lead.py | 104 - .../models/application_details_job_title.py | 50 +- ...ion_details_questions_and_answers_inner.py | 110 +- ...ails_questions_and_answers_inner_answer.py | 48 +- ...ls_questions_and_answers_inner_question.py | 48 +- .../models/application_details_status.py | 74 +- ...lication_details_status_changed_by_user.py | 104 - bamboohr_sdk/models/applications_list.py | 72 +- .../applications_list_applications_inner.py | 94 +- ...tions_list_applications_inner_applicant.py | 71 +- ...pplications_list_applications_inner_job.py | 60 +- ...tions_list_applications_inner_job_title.py | 50 +- ...ications_list_applications_inner_status.py | 48 +- .../models/approve_timesheet_request.py | 85 + .../models/archive_custom_field_response.py | 80 + .../archived_custom_fields_list_response.py | 113 + ...ssign_employees_to_break_policy_request.py | 48 +- ...ign_time_off_policies_v1_request_inner.py} | 64 +- .../models/assigned_time_off_policy.py | 65 +- .../models/assigned_time_off_policy_v11.py | 65 +- bamboohr_sdk/models/available_action.py | 68 +- .../{bad_request.py => bad_request_v1.py} | 60 +- ...roject_task.py => bad_request_v1_error.py} | 56 +- ..._summary_department.py => bank_holiday.py} | 58 +- .../models/benefit_coverages_response.py | 62 +- ...erages_response_benefit_coverages_inner.py | 75 +- .../models/benefit_deduction_sub_type.py | 144 +- bamboohr_sdk/models/benefit_deduction_type.py | 169 +- .../models/benefit_deduction_type_id.py | 64 +- .../budget_breakdown_import_response.py | 85 + bamboohr_sdk/models/budget_guidelines_view.py | 128 + .../models/budget_guidelines_warnings.py | 96 + ...79f9c5950f983e59d2626faa30c00a1_request.py | 81 + ...7c32ed5278ac67e2e518bf7484a75dc_request.py | 85 + .../calendar_anniversary_calendar_event_v1.py | 104 + .../calendar_birthday_calendar_event_v1.py | 102 + .../calendar_calendar_event_person_v1.py | 106 + ...lendar_calendar_events_list_response_v1.py | 131 + ...ndar_events_list_response_v1_data_inner.py | 201 + ..._calendar_events_list_response_v1_links.py | 103 + ...ndar_events_list_response_v1_links_next.py | 85 + ...ndar_events_list_response_v1_links_prev.py | 85 + ...r_calendar_events_list_response_v1_meta.py | 90 + .../calendar_holiday_calendar_event_v1.py | 102 + .../calendar_time_off_calendar_event_v1.py | 109 + .../models/can_create_goals_response.py | 49 +- ...f87b8e09a001b6fb81dfce6c20ab9e3_request.py | 81 + .../change_custom_field_list_value_request.py | 85 + .../models/changed_employee_ids_response.py | 69 +- ...d_employee_ids_response_employees_value.py | 61 +- .../changed_employee_table_data_response.py | 70 +- ...yee_table_data_response_employees_value.py | 71 +- ...sponse_employees_value_rows_inner_value.py | 111 +- ...ees_value_rows_inner_value_any_of_inner.py | 81 +- bamboohr_sdk/models/clock_entries_schema.py | 57 +- ...ock_entry_clock_entry_location_input_v1.py | 102 + .../clock_entry_create_clock_entry_v1.py | 152 + bamboohr_sdk/models/clock_entry_ids_schema.py | 48 +- bamboohr_sdk/models/clock_entry_schema.py | 113 +- .../models/clock_in_request_schema.py | 114 +- .../models/clock_out_request_schema.py | 62 +- bamboohr_sdk/models/close_goal_request.py | 85 + .../models/company_benefit_summary.py | 147 +- .../models/company_benefits_list_response.py | 58 +- .../models/company_deleted_webhook_payload.py | 72 +- bamboohr_sdk/models/company_file_update.py | 65 +- bamboohr_sdk/models/company_files_response.py | 58 +- ...company_files_response_categories_inner.py | 82 +- ...s_response_categories_inner_files_inner.py | 119 +- .../models/company_industry_data_object.py | 102 + bamboohr_sdk/models/company_information.py | 70 +- .../models/company_information_address.py | 65 +- ...ny_integrations_updated_webhook_payload.py | 72 +- ...tegrations_updated_webhook_payload_data.py | 45 +- bamboohr_sdk/models/company_profile_data.py | 157 + .../models/company_profile_data_address.py | 117 + .../models/company_profile_integrations.py | 47 +- .../models/company_updated_webhook_payload.py | 72 +- .../compensation_benchmark_detail_employee.py | 212 + ...on_benchmark_detail_employee_job_title.py} | 72 +- ...sation_benchmark_detail_employee_salary.py | 81 + .../models/compensation_benchmark_details.py | 175 + ...enchmark_details_benchmark_values_inner.py | 179 + ...nsation_benchmark_job_location_employee.py | 171 + ..._benchmark_job_location_employee_salary.py | 91 + ...ompensation_benchmark_job_location_pair.py | 147 + ...enchmark_job_location_pair_job_details.py} | 66 +- .../models/compensation_benchmark_overview.py | 126 + .../compensation_benchmark_overview_values.py | 147 + .../models/compensation_benchmark_source.py | 109 + .../compensation_benchmarking_column_map.py | 88 + .../models/compensation_benchmarks_list.py | 125 + .../compensation_equity_settings_response.py | 222 + ...ity_settings_response_company_valuation.py | 151 + ...on_equity_settings_response_disclaimers.py | 140 + ...ty_settings_response_outstanding_shares.py | 151 + ...quity_settings_response_price_per_share.py | 140 + ...ion_equity_settings_response_slider_min.py | 140 + ...ty_settings_response_vesting_conditions.py | 151 + ...ensation_equity_settings_update_request.py | 222 + ...ensation_planning_cycle_admins_response.py | 105 + ...ning_cycle_admins_response_admins_inner.py | 141 + ...sation_planning_cycle_complete_response.py | 120 + ...g_cycle_complete_response_errors_inner.py} | 65 +- .../models/compensation_tools_data_object.py | 112 + .../models/compensation_tools_response.py | 102 + .../models/compensation_upsell_data.py | 101 + ...eted_questions_and_response_data_object.py | 117 + .../models/conversion_rate_data_object.py | 94 + .../models/countries_options_response.py | 152 + bamboohr_sdk/models/country.py | 51 +- bamboohr_sdk/models/country_schema.py | 71 +- .../create_application_comment_request.py | 46 +- .../models/create_candidate_response.py | 50 +- .../models/create_comment_response.py | 48 +- .../create_compensation_benchmark_request.py | 218 + ...e_compensation_benchmark_source_request.py | 85 + ...create_employee_training_record_request.py | 76 +- ...e_employee_training_record_request_cost.py | 48 +- ...uest.py => create_goal_comment_request.py} | 51 +- bamboohr_sdk/models/create_goal_request.py | 139 + ...> create_goal_request_milestones_inner.py} | 53 +- .../models/create_job_opening_response.py | 50 +- .../models/create_location_request.py | 95 + .../models/create_location_request_address.py | 147 + .../create_training_category_request.py | 43 +- .../models/create_training_type_request.py | 116 +- .../create_training_type_request_category.py | 48 +- ...raining_type_request_due_from_hire_date.py | 140 - .../create_webhook_bad_request_response.py | 65 +- .../models/created_compensation_benchmark.py | 100 + ..._compensation_benchmark_saved_benchmark.py | 249 + ... created_compensation_benchmark_source.py} | 61 +- .../models/created_time_off_request.py | 214 + .../models/created_time_off_request_amount.py | 91 + .../models/created_time_off_request_notes.py | 81 + .../models/created_time_off_request_status.py | 96 + ...sk.py => created_time_off_request_type.py} | 56 +- .../models/currency_conversions_response.py | 100 + .../models/cursor_paged_response_metadata.py | 54 +- bamboohr_sdk/models/cursor_pages_response.py | 59 +- .../models/cursor_pagination_query_object.py | 92 - ...custom_field_definition_response_object.py | 234 + ...definition_response_object_values_inner.py | 82 + bamboohr_sdk/models/custom_field_request.py | 100 + .../models/custom_field_type_view_object.py | 82 + .../models/custom_field_view_object.py | 113 + .../models/custom_fields_list_response.py | 113 + bamboohr_sdk/models/custom_report_response.py | 117 + .../custom_report_response_fields_inner.py | 86 + ...acd313af2106213fc4696175941ce65_request.py | 94 + bamboohr_sdk/models/data_request.py | 104 +- .../models/data_request_aggregations.py | 105 + bamboohr_sdk/models/data_request_filters.py | 79 +- .../data_request_filters_filters_inner.py | 86 +- .../models/data_request_sort_by_inner.py | 69 +- .../models/dataset_data_response_v2.py | 110 + .../dataset_data_response_v2_data_inner.py | 99 + ...ta_response_v2_data_inner_fields_value.py} | 87 +- .../models/dataset_data_response_v2_links.py | 91 + .../models/dataset_data_response_v2_meta.py | 110 + .../models/dataset_fields_response.py | 76 +- ...set_response.py => dataset_response_v1.py} | 66 +- bamboohr_sdk/models/dataset_v1.py | 84 + ...s_response.py => datasets_response_v12.py} | 66 +- .../datasets_response_v12_datasets_inner.py | 84 + ...e_compensation_benchmark_source_request.py | 80 + ..._compensation_benchmark_source_response.py | 85 + ...etails_and_currency_request_data_object.py | 161 + ...c1ba8e76f33960b018d0d7518fe97b5_request.py | 135 + bamboohr_sdk/models/employee.py | 156 +- .../models/employee_benefit_filters.py | 61 +- .../employee_benefit_filters_filters.py | 70 +- .../models/employee_benefits_list_response.py | 63 +- ...s_list_response_employee_benefits_inner.py | 75 +- ...e_benefits_inner_employee_benefit_inner.py | 217 +- .../employee_created_webhook_payload.py | 70 +- .../employee_created_webhook_payload_data.py | 50 +- ...employee_cursor_pagination_query_object.py | 96 + .../employee_deleted_webhook_payload.py | 70 +- .../employee_deleted_webhook_payload_data.py | 50 +- bamboohr_sdk/models/employee_dependent.py | 181 +- .../models/employee_dependents_response.py | 63 +- ...ents_response_employee_dependents_inner.py | 189 +- bamboohr_sdk/models/employee_file_update.py | 81 +- .../models/employee_optional_field.py | 156 + .../models/employee_photo_json_response.py | 87 + bamboohr_sdk/models/employee_response.py | 66 +- .../employee_response_aggregations_inner.py | 61 +- .../employee_string_code_error_response_v1.py | 91 + ...yee_string_code_error_response_v1_error.py | 81 + bamboohr_sdk/models/employee_table_row.py | 57 +- .../models/employee_table_row_value.py | 213 - .../employee_time_off_policy_assignment.py | 67 +- ...employee_time_off_policy_assignment_v11.py | 67 +- ...ime_off_request_approver_response_inner.py | 95 + .../employee_timesheet_entry_transformer.py | 141 +- .../employee_updated_webhook_payload.py | 70 +- .../employee_updated_webhook_payload_data.py | 63 +- bamboohr_sdk/models/employee_value.py | 80 +- .../models/employee_value_any_of_inner.py | 75 +- .../employee_verification_integration.py | 86 + ...loyee_verification_integration_response.py | 91 + ...ation_lifecycle_email_accepted_response.py | 97 + ...employee_verification_public_api_record.py | 154 + .../employee_verification_update_response.py | 91 + .../employee_verifications_list_response.py | 115 + .../employees_directory_json_response.py | 103 + ...es_directory_json_response_fields_inner.py | 87 + ...py => employees_directory_xml_response.py} | 74 +- ...oyees_directory_xml_response_employees.py} | 68 +- ...y_xml_response_employees_employee_inner.py | 108 + ...se_employees_employee_inner_field_inner.py | 81 + ...loyees_directory_xml_response_fieldset.py} | 66 +- ...ctory_xml_response_fieldset_field_inner.py | 86 + .../{invalid_request.py => error_response.py} | 60 +- bamboohr_sdk/models/error_response_error.py | 81 + ...3883a522dadbe9e11b34f8b656e3adb_request.py | 132 + bamboohr_sdk/models/field1.py | 69 +- bamboohr_sdk/models/field1_id.py | 64 +- .../models/field_list_fields_inner.py | 96 - .../models/field_options_request_schema.py | 84 +- ...est_schema_dependent_fields_value_inner.py | 48 +- .../models/field_options_transformer.py | 58 +- .../models/field_options_transformer_id.py | 151 + bamboohr_sdk/models/forbidden_v1.py | 87 + ...request_error.py => forbidden_v1_error.py} | 56 +- .../get_break_policy_suggestions_request.py | 82 + .../models/get_company_report_response.py | 75 +- ...company_report_response_employees_inner.py | 96 + .../get_data_from_dataset_v2_request.py | 108 + bamboohr_sdk/models/get_employee_response.py | 490 + .../get_employees_employee_base_response.py | 142 + .../models/get_employees_employee_response.py | 1132 +- ..._employee_response_all_of_overtime_rate.py | 81 + ...oyees_employee_response_all_of_pay_rate.py | 81 + ...mployees_employee_response_all_of_teams.py | 81 + .../get_employees_filter_request_object.py | 645 +- .../models/get_employees_response_object.py | 70 +- .../get_employees_response_object_links.py | 72 +- ...et_employees_response_object_links_next.py | 45 +- ...et_employees_response_object_links_prev.py | 45 +- ...et_employees_response_object_links_self.py | 45 +- .../global_holiday_global_holiday_v1.py | 122 + bamboohr_sdk/models/goal.py | 101 - bamboohr_sdk/models/goal_aggregate.py | 105 +- ...oal_aggregate_aligns_with_options_inner.py | 52 +- .../models/goal_aggregate_comments_inner.py | 73 +- .../models/goal_aggregate_persons_inner.py | 71 +- bamboohr_sdk/models/goal_comment_response.py | 77 +- bamboohr_sdk/models/goal_comments_response.py | 58 +- .../goal_comments_response_comments_inner.py | 77 +- bamboohr_sdk/models/goal_filters_v1.py | 58 +- bamboohr_sdk/models/goal_filters_v11.py | 58 +- .../models/goal_filters_v11_filters_inner.py | 78 +- .../goal_filters_v11_filters_inner_actions.py | 83 +- .../models/goal_filters_v1_filters_inner.py | 59 +- bamboohr_sdk/models/goal_response.py | 87 + bamboohr_sdk/models/goals_aggregate_v1.py | 108 +- bamboohr_sdk/models/goals_aggregate_v11.py | 110 +- .../goals_aggregate_v11_comments_inner.py | 52 +- bamboohr_sdk/models/goals_aggregate_v12.py | 108 +- .../goals_aggregate_v12_comments_inner.py | 54 +- .../goals_aggregate_v1_comments_inner.py | 52 +- .../goals_aggregate_v1_persons_inner.py | 71 +- bamboohr_sdk/models/goals_list.py | 56 +- bamboohr_sdk/models/hiring_lead.py | 56 +- ...ay_bulk_insert_company_holiday_error_v1.py | 100 + ...y_bulk_insert_company_holiday_record_v1.py | 104 + ...rt_company_holidays_failure_response_v1.py | 153 + ...ulk_insert_company_holidays_response_v1.py | 143 + ...oliday_catalog_holiday_list_response_v1.py | 111 + ..._catalog_holiday_list_response_v1_links.py | 91 + .../holiday_company_holiday_audience_v1.py | 124 + ...oliday_company_holiday_list_response_v1.py | 111 + ..._company_holiday_list_response_v1_links.py | 91 + ...y_company_holiday_list_response_v1_meta.py | 90 + ...ay_company_holiday_pay_status_hours_v1.py} | 62 +- .../models/holiday_company_holiday_v1.py | 173 + ...liday_create_company_holiday_request_v1.py | 150 + ...liday_update_company_holiday_request_v1.py | 133 + .../models/hour_entries_request_schema.py | 56 +- .../models/hour_entry_create_hour_entry_v1.py | 110 + bamboohr_sdk/models/hour_entry_ids_schema.py | 48 +- .../models/hour_entry_patch_hour_entry_v1.py | 114 + bamboohr_sdk/models/hour_entry_schema.py | 86 +- ...import_compensation_benchmarks_response.py | 103 + bamboohr_sdk/models/industry.py | 81 + bamboohr_sdk/models/inline_object.py | 85 + bamboohr_sdk/models/inline_object1.py | 101 + .../models/inline_object1_employees_inner.py | 81 + bamboohr_sdk/models/inline_object1_status.py | 80 + bamboohr_sdk/models/inline_object2.py | 235 + bamboohr_sdk/models/inline_object2_inner.py | 107 + bamboohr_sdk/models/invalid_request_error.py | 89 - bamboohr_sdk/models/job_summary.py | 147 +- .../models/job_summary_hiring_lead.py | 105 - bamboohr_sdk/models/job_summary_status.py | 48 +- .../models/json_directory_employee.py | 97 - bamboohr_sdk/models/json_employee_files.py | 64 +- .../json_employee_files_categories_inner.py | 116 +- ...oyee_files_categories_inner_files_inner.py | 132 +- .../models/json_employee_files_employee.py | 45 +- .../legacy_report_field_map_response.py | 97 + ...eport_field_map_response_mappings_inner.py | 122 + .../models/legacy_report_id_map_response.py | 95 + ...y_report_id_map_response_mappings_inner.py | 103 + .../models/levels_and_bands_column_map.py | 88 + .../levels_and_bands_group_status_counts.py | 88 + .../levels_and_bands_job_title_assignment.py | 81 + ...and_bands_job_title_assignments_request.py | 97 + .../models/levels_and_bands_pay_band_value.py | 89 + .../levels_and_bands_upload_response.py | 101 + bamboohr_sdk/models/list_field_detail.py | 109 +- bamboohr_sdk/models/list_field_option.py | 116 +- bamboohr_sdk/models/list_field_values.py | 58 +- .../models/list_field_values_options_inner.py | 78 +- bamboohr_sdk/models/list_field_values_xml.py | 97 + .../list_field_values_xml_option_inner.py | 107 + .../models/list_users_response_value.py | 92 +- .../models/list_users_xml_response.py | 56 +- .../list_users_xml_response_user_inner.py | 89 +- ...ion_level.py => list_value_view_object.py} | 57 +- bamboohr_sdk/models/location.py | 107 +- .../models/location_response_object.py | 114 + .../location_response_object_address.py | 163 + ...ocation_response_object_address_country.py | 82 + .../location_response_object_address_state.py | 84 + bamboohr_sdk/models/login_failure_response.py | 43 +- .../models/login_failure_xml_response.py | 45 +- bamboohr_sdk/models/login_response.py | 59 +- bamboohr_sdk/models/login_xml_response.py | 71 +- bamboohr_sdk/models/member_benefit_event.py | 66 +- .../member_benefit_event_coverages_inner.py | 65 +- ...efit_event_coverages_inner_events_inner.py | 77 +- .../models/member_benefit_events_response.py | 58 +- ...benefits_get_permission_denied_response.py | 48 +- .../member_benefits_get_success_response.py | 76 +- ...enefits_get_success_response_data_inner.py | 76 +- ...success_response_data_inner_plans_inner.py | 67 +- ...ata_inner_plans_inner_date_ranges_inner.py | 67 +- ...ber_benefits_get_success_response_links.py | 70 +- ...enefits_get_success_response_links_next.py | 48 +- ...enefits_get_success_response_links_prev.py | 48 +- ...mber_benefits_get_success_response_meta.py | 65 +- ..._benefits_get_validation_error_response.py | 48 +- .../meta_company_properties_response.py | 97 + .../models/meta_currency_type_item.py | 108 + ...d1fc0f164cb51973a0206b8e2fb2d2d_request.py | 102 + ...e2fb2d2d_request_budget_breakdown_inner.py | 117 + ...ee192568adbd5e3179a91e6e2_request_inner.py | 110 + ...91e6e2_request_inner_budget_allocations.py | 99 + ...88aa996aba16d7a495c62321ea999a9_request.py | 111 + ...495c62321ea999a9_request_sent_date_time.py | 151 + ...958585c861325ea7a2cd30a8c74f042_request.py | 82 + ...9a5068111ec499135c7d6e9a53d5a30_request.py | 82 + bamboohr_sdk/models/model_field.py | 76 +- .../{field_list.py => monitor_field_list.py} | 68 +- ....py => monitor_field_list_fields_inner.py} | 62 +- ...hire_packet_gtky_answer_visibility_item.py | 89 + ...e_packet_gtky_answer_visibility_request.py | 88 + ..._packet_gtky_answer_visibility_response.py | 97 + .../models/new_hire_packet_public_api.py | 251 + ...ew_hire_packet_public_api_writable_body.py | 152 + .../models/new_hire_packets_list_response.py | 121 + bamboohr_sdk/models/new_hire_widget_item.py | 153 + .../models/new_hire_widget_response.py | 98 + bamboohr_sdk/models/new_web_hook.py | 99 +- .../onboarding_experience_public_api.py | 131 + .../onboarding_experiences_list_response.py | 117 + .../models/paged_location_response.py | 115 + bamboohr_sdk/models/paged_response.py | 76 +- bamboohr_sdk/models/pagination.py | 75 +- bamboohr_sdk/models/pagination_meta_data.py | 65 +- ...any_profile_company_information_request.py | 103 + ...ile_company_information_request_address.py | 104 + ...y_grades_and_bands_configuration_status.py | 123 + ...d_bands_configuration_status_job_titles.py | 110 + ...ration_status_job_titles_warnings_inner.py | 81 + ...s_and_bands_configuration_status_levels.py | 118 + ...onfiguration_status_levels_errors_inner.py | 85 + ...nd_bands_configuration_status_pay_bands.py | 120 + ...s_and_bands_configuration_status_review.py | 118 + ...rades_and_bands_delete_groups_response.py} | 53 +- ...grades_and_bands_delete_hierarchy_group.py | 115 + ...es_and_bands_delete_hierarchy_job_title.py | 81 + ...grades_and_bands_delete_hierarchy_level.py | 181 + ..._grades_and_bands_delete_level_response.py | 97 + .../pay_grades_and_bands_delete_response.py | 151 + ...s_and_bands_job_title_assignments_group.py | 117 + ...d_bands_job_title_assignments_job_title.py | 81 + ...s_and_bands_job_title_assignments_level.py | 185 + ...nd_bands_job_title_assignments_response.py | 100 + ...pay_grades_and_bands_job_title_employee.py | 84 + ...ades_and_bands_job_title_with_employees.py | 102 + .../models/pay_grades_and_bands_level.py | 181 + .../pay_grades_and_bands_level_job_title.py | 81 + .../pay_grades_and_bands_levels_group.py | 113 + .../pay_grades_and_bands_levels_response.py | 98 + ...pay_grades_and_bands_pay_band_job_title.py | 81 + .../pay_grades_and_bands_pay_band_level.py | 181 + .../pay_grades_and_bands_pay_bands_group.py | 115 + ...pay_grades_and_bands_pay_bands_response.py | 98 + ... pay_grades_and_bands_publish_response.py} | 55 +- .../pay_grades_and_bands_published_group.py | 108 + ...ay_grades_and_bands_published_job_title.py | 81 + .../pay_grades_and_bands_published_level.py | 170 + ...pay_grades_and_bands_published_response.py | 97 + .../pay_grades_and_bands_review_group.py | 115 + .../pay_grades_and_bands_review_job_title.py | 81 + .../pay_grades_and_bands_review_level.py | 181 + .../pay_grades_and_bands_review_response.py | 97 + ...y_grades_and_bands_save_levels_response.py | 80 + ...es_and_bands_update_job_titles_response.py | 80 + .../pay_grades_and_bands_update_level.py | 156 + ...ay_grades_and_bands_update_levels_group.py | 111 + ..._grades_and_bands_update_levels_request.py | 97 + ...y_grades_and_bands_update_pay_band_item.py | 147 + ...des_and_bands_update_pay_bands_response.py | 80 + .../models/person_info_api_transformer.py | 71 +- bamboohr_sdk/models/post_goal_request.py | 126 - bamboohr_sdk/models/post_new_employee.py | 76 +- .../models/problem_details_response.py | 77 +- .../models/problem_details_response_v2.py | 100 + .../models/project_create_request_schema.py | 112 +- ...ct_create_time_tracking_project_task_v1.py | 86 + ...project_create_time_tracking_project_v1.py | 126 + ...te_time_tracking_project_v1_tasks_inner.py | 83 + .../models/project_info_api_transformer.py | 69 +- .../project_info_api_transformer_project.py | 48 +- .../project_legacy_error_response_v1.py | 91 + .../project_legacy_error_response_v1_error.py | 81 + .../project_paginated_response_data_v1.py | 101 + ...project_paginated_response_data_v1_meta.py | 90 + .../project_paginated_tasks_response_v1.py | 111 + ...oject_paginated_tasks_response_v1_links.py | 91 + ...roject_paginated_tasks_response_v1_meta.py | 90 + ...ated_time_tracking_projects_response_v1.py | 115 + .../project_standard_api_error_response_v1.py | 82 + .../project_time_tracking_project_v1.py | 159 + .../models/project_time_tracking_task_v1.py | 125 + ...ct_update_time_tracking_project_task_v1.py | 83 + ...project_update_time_tracking_project_v1.py | 120 + bamboohr_sdk/models/province_item.py | 94 + .../public_custom_field_types_response.py | 95 + ...t_values_custom_field_settings_response.py | 135 + ...om_field_settings_response_values_inner.py | 90 + .../put_company_industry_codes_request.py | 83 + ...ut_company_profile_display_name_request.py | 83 + bamboohr_sdk/models/put_goal_v11_request.py | 125 - .../remove_cycle_admin_self_response.py | 85 + .../remove_total_rewards_employees_request.py | 82 + bamboohr_sdk/models/report.py | 50 +- bamboohr_sdk/models/reports_response.py | 62 +- bamboohr_sdk/models/request.py | 50 +- bamboohr_sdk/models/request_custom_report.py | 83 +- .../models/request_custom_report_filters.py | 64 +- ...uest_custom_report_filters_last_changed.py | 73 +- .../models/request_custom_report_response.py | 73 +- ..._custom_report_response_employees_inner.py | 52 +- ...est_custom_report_response_fields_inner.py | 51 +- .../save_change_comm_template_response.py | 85 + .../scheduling_create_schedule_request_v1.py | 169 + ...ling_create_scheduling_shift_request_v1.py | 170 + .../scheduling_publish_shifts_failure_v1.py | 81 + .../scheduling_publish_shifts_request.py | 82 + .../scheduling_publish_shifts_result_v1.py | 109 + .../scheduling_schedule_list_response_v1.py | 111 + ...eduling_schedule_list_response_v1_links.py | 91 + ...heduling_schedule_list_response_v1_meta.py | 86 + bamboohr_sdk/models/scheduling_schedule_v1.py | 222 + ...heduling_scheduling_shift_assessment_v1.py | 159 + ...cheduling_shift_assessment_violation_v1.py | 113 + .../models/scheduling_scheduling_shift_v1.py | 226 + ...uling_shift_assessment_list_response_v1.py | 115 + ..._shift_assessment_list_response_v1_meta.py | 86 + .../scheduling_shift_list_response_v1.py | 111 + ...scheduling_shift_list_response_v1_links.py | 99 + ...uling_shift_list_response_v1_links_next.py | 85 + ...uling_shift_list_response_v1_links_prev.py | 85 + .../scheduling_shift_list_response_v1_meta.py | 86 + .../scheduling_timezone_list_response_v1.py | 111 + ...heduling_timezone_list_response_v1_meta.py | 86 + bamboohr_sdk/models/scheduling_timezone_v1.py | 81 + .../scheduling_update_schedule_request_v1.py | 168 + ...ling_update_scheduling_shift_request_v1.py | 180 + ...ication_lifecycle_email_by_user_request.py | 90 + .../models/send_recommendations_response.py | 85 + .../set_break_policy_employees_request.py | 48 +- ...total_rewards_custom_disclaimer_request.py | 80 + ...t_total_rewards_onboarding_step_request.py | 80 + bamboohr_sdk/models/share_options_response.py | 58 +- ...ate_time_tracking_shift_differential_v1.py | 129 + ...cking_shift_differential_v1_times_inner.py | 108 + ...differential_paginated_response_data_v1.py | 103 + ...rential_paginated_response_data_v1_meta.py | 90 + ...racking_shift_differentials_response_v1.py | 119 + ...ime_tracking_shift_differential_time_v1.py | 121 + ...ial_time_tracking_shift_differential_v1.py | 183 + ...ate_time_tracking_shift_differential_v1.py | 147 + .../models/standard_api_error_response.py | 82 + bamboohr_sdk/models/state.py | 56 +- .../models/state_province_response_schema.py | 61 +- bamboohr_sdk/models/state_province_schema.py | 63 +- .../models/table_row_delete_response.py | 52 +- bamboohr_sdk/models/table_row_update.py | 86 +- bamboohr_sdk/models/tabular_field.py | 62 +- .../models/tabular_field_fields_inner.py | 56 +- bamboohr_sdk/models/task_create_schema.py | 54 +- bamboohr_sdk/models/time_off_balance_entry.py | 105 +- bamboohr_sdk/models/time_off_history.py | 89 +- bamboohr_sdk/models/time_off_policy.py | 75 +- bamboohr_sdk/models/time_off_request.py | 113 +- bamboohr_sdk/models/time_off_request1.py | 125 +- .../models/time_off_request1_actions.py | 69 +- .../models/time_off_request1_amount.py | 52 +- .../models/time_off_request1_notes.py | 48 +- .../models/time_off_request1_status.py | 65 +- bamboohr_sdk/models/time_off_request1_type.py | 53 +- .../models/time_off_request_dates_inner.py | 50 +- .../models/time_off_request_notes_inner.py | 52 +- .../time_off_types_and_default_hours.py | 74 +- ...s_and_default_hours_default_hours_inner.py | 44 +- ..._and_default_hours_time_off_types_inner.py | 77 +- ...eak_policy_employee_collection_v1_inner.py | 55 +- ...ng_break_policy_suggestions_response_v1.py | 102 + ...ns_response_v1_suggested_policies_inner.py | 121 + ...1_suggested_policies_inner_breaks_inner.py | 121 + .../time_tracking_bulk_response_schema.py | 60 +- ..._tracking_bulk_response_schema_response.py | 50 +- ...employee_time_tracking_data_accepted_v1.py | 84 + ...t_employee_time_tracking_data_record_v1.py | 103 + .../time_tracking_clock_entry_location_v1.py | 100 + ..._clock_entry_paginated_response_data_v1.py | 103 + ...k_entry_paginated_response_data_v1_meta.py | 90 + .../models/time_tracking_clock_entry_v1.py | 254 + ...onfiguration_paginated_response_data_v1.py | 103 + ...ration_paginated_response_data_v1_links.py | 103 + ...n_paginated_response_data_v1_links_next.py | 80 + ...n_paginated_response_data_v1_links_prev.py | 80 + ...uration_paginated_response_data_v1_meta.py | 90 + .../time_tracking_create_clock_in_v1.py | 93 + .../time_tracking_create_clock_out_v1.py | 88 + ...e_time_tracking_break_without_policy_v1.py | 115 +- ...ng_create_time_tracking_break_policy_v1.py | 85 +- ..._tracking_create_time_tracking_break_v1.py | 115 +- ...g_create_time_tracking_configuration_v1.py | 213 + .../time_tracking_delete_response_schema.py | 50 +- ...e_enrollment_paginated_response_data_v1.py | 103 + ...tracking_employee_time_tracking_data_v1.py | 151 + ...g_hour_entry_paginated_response_data_v1.py | 103 + .../models/time_tracking_hour_entry_v1.py | 137 + .../time_tracking_id_response_schema.py | 45 +- ...cking_offset_paginated_response_data_v1.py | 70 +- ...offset_paginated_response_data_v1_links.py | 66 +- ...t_paginated_response_data_v1_links_next.py | 87 - ...t_paginated_response_data_v1_links_prev.py | 87 - ..._offset_paginated_response_data_v1_meta.py | 47 +- ...racking_page_paginated_response_data_v1.py | 101 + ...paginated_break_assessments_response_v1.py | 84 +- ...ng_paginated_break_policies_response_v1.py | 82 +- ...ated_break_policy_employees_response_v1.py | 84 +- ...e_tracking_paginated_breaks_response_v1.py | 82 +- ...ing_paginated_clock_entries_response_v1.py | 117 + ...employee_time_tracking_data_response_v1.py | 117 + ...king_paginated_hour_entries_response_v1.py | 117 + ...ime_tracking_configurations_response_v1.py | 117 + ...inated_time_tracking_kiosks_response_v1.py | 115 + ...d_time_tracking_time_clocks_response_v1.py | 115 + ...acking_paginated_timesheets_response_v1.py | 112 + ...g_paginated_timesheets_response_v1_meta.py | 90 + ...ing_project_with_tasks_and_employee_ids.py | 72 +- bamboohr_sdk/models/time_tracking_record.py | 131 +- .../models/time_tracking_record_schema.py | 205 +- .../time_tracking_record_schema_project.py | 95 - ...king_sync_time_tracking_break_policy_v1.py | 87 +- bamboohr_sdk/models/time_tracking_task.py | 48 +- ...cking_time_tracking_break_assessment_v1.py | 184 +- ..._tracking_break_assessment_violation_v1.py | 99 +- ...ing_time_tracking_break_availability_v1.py | 195 +- ..._tracking_time_tracking_break_policy_v1.py | 108 +- ...tracking_break_policy_with_relations_v1.py | 129 +- .../time_tracking_time_tracking_break_v1.py | 154 +- ...tracking_time_tracking_configuration_v1.py | 284 + ...me_tracking_time_tracking_hour_entry_v1.py | 143 + .../time_tracking_time_tracking_kiosk_v1.py | 131 + ...me_tracking_time_tracking_time_clock_v1.py | 164 + .../models/time_tracking_timesheet_v1.py | 180 + .../time_tracking_update_clock_entry_v1.py | 138 + ...g_update_employee_time_tracking_data_v1.py | 101 + ...ng_update_time_tracking_break_policy_v1.py | 63 +- ..._tracking_update_time_tracking_break_v1.py | 115 +- ...g_update_time_tracking_configuration_v1.py | 222 + ..._tracking_update_time_tracking_kiosk_v1.py | 82 + ...king_update_time_tracking_time_clock_v1.py | 85 + .../timesheet_entry_info_api_transformer.py | 131 +- .../timesheet_timesheet_daily_entry_v1.py | 102 + .../timesheet_timesheet_daily_summary_v1.py | 100 + bamboohr_sdk/models/timezone_list_response.py | 77 +- bamboohr_sdk/models/timezone_resource.py | 63 +- .../total_rewards_benefit_details_values.py | 123 + .../total_rewards_benefit_section_values.py | 107 + .../total_rewards_calendar_section_values.py | 116 + .../total_rewards_comp_summary_values.py | 105 + .../total_rewards_custom_disclaimer_info.py | 90 + .../total_rewards_employee_statement.py | 240 + .../total_rewards_equity_details_values.py | 228 + ...wards_equity_estimated_valuation_values.py | 127 + .../total_rewards_equity_growth_chart_item.py | 116 + .../total_rewards_equity_growth_estimation.py | 119 + .../total_rewards_equity_section_values.py | 141 + .../total_rewards_extra_pay_details_values.py | 117 + .../total_rewards_extra_pay_section_values.py | 111 + .../models/total_rewards_holiday_value.py | 89 + .../models/total_rewards_onboarding_step.py | 81 + .../total_rewards_overview_section_values.py | 103 + .../total_rewards_time_off_policy_value.py | 100 + .../models/total_rewards_timeline_item.py | 105 + .../total_rewards_timeline_item_label.py | 151 + .../total_rewards_timeline_section_values.py | 114 + bamboohr_sdk/models/training_category.py | 48 +- bamboohr_sdk/models/training_record.py | 112 +- bamboohr_sdk/models/training_record_map.py | 70 +- bamboohr_sdk/models/training_record_type.py | 62 +- bamboohr_sdk/models/training_type.py | 126 +- bamboohr_sdk/models/training_type_category.py | 68 +- .../training_type_due_from_hire_date.py | 141 - ...training_type_due_from_hire_date_one_of.py | 89 - .../transformed_api_employee_goal_details.py | 56 +- ...nsformed_api_employee_goal_details_goal.py | 140 +- bamboohr_sdk/models/transformed_api_goal.py | 140 +- .../models/transformed_api_goal_actions.py | 89 - .../transformed_api_goal_milestones_inner.py | 107 +- .../models/unarchive_custom_fields_request.py | 89 + .../unarchive_custom_fields_response.py | 80 + ...ign_employees_from_break_policy_request.py | 48 +- .../models/update_applicant_status_request.py | 47 +- .../update_applicant_status_response.py | 48 +- ...date_company_industry_codes400_response.py | 85 + ...date_company_industry_codes403_response.py | 85 + ...date_company_industry_codes404_response.py | 85 + ...date_company_industry_codes500_response.py | 85 + .../update_company_industry_codes_response.py | 97 + ...pdate_company_name_bad_request_response.py | 91 + ...company_name_bad_request_response_error.py | 85 + .../update_company_name_forbidden_response.py | 91 + ...e_company_name_forbidden_response_error.py | 80 + ...te_company_name_internal_error_response.py | 91 + .../update_company_name_success_response.py | 80 + .../update_compensation_benchmark_request.py | 211 + ...date_compensation_benchmark_source_item.py | 82 + ..._compensation_benchmark_sources_request.py | 97 + ...compensation_benchmark_sources_response.py | 85 + ...update_employee_training_record_request.py | 78 +- ...ployee_verification_integration_request.py | 80 + .../update_employee_verification_request.py | 155 + ...uest.py => update_goal_comment_request.py} | 51 +- ...update_goal_milestone_progress_request.py} | 51 +- ...est.py => update_goal_progress_request.py} | 65 +- ...uest.py => update_goal_sharing_request.py} | 57 +- bamboohr_sdk/models/update_goal_v1.py | 125 + .../models/update_goal_v11_request.py | 151 + ...pdate_goal_v11_request_milestones_inner.py | 80 + .../models/update_location_request.py | 95 + .../models/update_location_request_address.py | 142 + .../models/update_pay_bands_request.py | 114 + .../update_training_category_request.py | 43 +- .../models/update_training_type_request.py | 117 +- .../update_training_type_request_category.py | 48 +- .../update_webhook_bad_request_response.py | 65 +- .../models/updated_compensation_benchmark.py | 100 + ..._compensation_benchmark_saved_benchmark.py | 259 + .../models/upload_employee_photo_request1.py | 83 + bamboohr_sdk/models/user_permission_data.py | 94 + .../models/web_hook_post_field_data_object.py | 78 +- .../web_hook_post_field_page_data_object.py | 44 +- .../web_hook_post_field_response_object.py | 72 +- .../web_hook_post_field_table_data_object.py | 44 +- bamboohr_sdk/models/web_hook_response.py | 131 +- bamboohr_sdk/models/webhook.py | 128 +- bamboohr_sdk/models/webhook_bad_request.py | 56 +- .../webhook_bad_request_errors_inner.py | 48 +- bamboohr_sdk/models/webhook_error.py | 68 +- bamboohr_sdk/models/webhook_error_errors.py | 65 +- bamboohr_sdk/models/webhook_event_type.py | 37 +- bamboohr_sdk/models/webhook_log_entry.py | 97 +- .../models/webhook_log_list_response.py | 65 +- .../models/webhook_log_rate_limit_response.py | 56 +- .../webhook_log_rate_limit_response_error.py | 48 +- .../models/webhook_sub_error_property.py | 108 +- ...sub_error_property_monitor_fields_inner.py | 62 +- ..._error_property_monitor_fields_inner_id.py | 64 +- ...sub_error_property_unknown_fields_inner.py | 64 +- ..._error_property_unknown_fields_inner_id.py | 66 +- bamboohr_sdk/models/webhooks_list.py | 56 +- .../models/webhooks_list_webhooks_inner.py | 69 +- bamboohr_sdk/models/whos_out_entry.py | 87 +- .../models/whos_out_list_response_v1.py | 121 + .../models/whos_out_list_response_v1_links.py | 95 + .../whos_out_list_response_v1_links_next.py | 85 + .../whos_out_list_response_v1_links_prev.py | 85 + .../models/whos_out_list_response_v1_meta.py | 110 + bamboohr_sdk/models/whos_out_person_v1.py | 113 + bamboohr_sdk/models/whos_out_v1.py | 108 + ...ctory_employee_employees_employee_inner.py | 97 - ...directory_employee_fieldset_field_inner.py | 89 - bamboohr_sdk/models/xml_employee_files.py | 62 +- .../xml_employee_files_category_inner.py | 113 +- ...mployee_files_category_inner_file_inner.py | 135 +- bamboohr_sdk/rest.py | 123 +- ...A05b6d5f564f805d688ff2c1e37c3990Request.md | 31 + docs/AccountInformationApi.md | 856 +- docs/AddCustomFieldListValueRequest.md | 30 + docs/AddCustomFieldListValueResponse.md | 31 + ...dCustomFieldListValueResponseOneOfInner.md | 31 + docs/AddCycleAdminsResponse.md | 30 + docs/AddCycleAdminsResponseAddedInner.md | 30 + docs/AddCycleAdminsResponseSkippedInner.md | 30 + docs/AddTotalRewardsEmployeesRequest.md | 29 + docs/AdjustTimeTrackingRequestSchema.md | 8 +- docs/AlertConfigurationV1.md | 52 + docs/AlertConfigurationWriteV1.md | 45 + docs/AlertTemplateListResponseV1.md | 29 + .../AlertTemplateListResponseV1AlertsInner.md | 31 + docs/AlertsApi.md | 436 + docs/ApplicantStatus.md | 4 +- docs/ApplicantTrackingApi.md | 63 +- docs/ApplicationDetails.md | 20 +- docs/ApplicationDetailsApplicant.md | 18 +- docs/ApplicationDetailsApplicantAddress.md | 35 - docs/ApplicationDetailsApplicantEducation.md | 31 - ...plicationDetailsApplicantEducationLevel.md | 31 - docs/ApplicationDetailsJob.md | 2 +- docs/ApplicationDetailsJobHiringLead.md | 34 - ...ApplicationDetailsJobHiringLeadJobTitle.md | 31 - docs/ApplicationDetailsJobTitle.md | 2 +- ...licationDetailsQuestionsAndAnswersInner.md | 10 +- docs/ApplicationDetailsStatus.md | 2 +- docs/ApplicationDetailsStatusChangedByUser.md | 34 - ...ationDetailsStatusChangedByUserJobTitle.md | 31 - docs/ApplicationsList.md | 2 +- docs/ApplicationsListApplicationsInner.md | 2 +- ...licationsListApplicationsInnerApplicant.md | 2 +- ...plicationsListApplicationsInnerJobTitle.md | 2 +- docs/ApproveTimesheetRequest.md | 30 + docs/ArchiveCustomFieldResponse.md | 29 + docs/ArchivedCustomFieldsListResponse.md | 31 + docs/AssignEmployeesToBreakPolicyRequest.md | 2 +- docs/AssignTimeOffPoliciesRequestInner.md | 30 - docs/AssignTimeOffPoliciesV1RequestInner.md | 30 + docs/AssignedTimeOffPolicyV11.md | 2 +- docs/AvailableAction.md | 3 +- docs/BadRequestV1.md | 29 + docs/BadRequestV1Error.md | 30 + docs/BankHoliday.md | 31 + ...tCoveragesResponseBenefitCoveragesInner.md | 6 +- docs/BenefitDeductionSubType.md | 6 +- docs/BenefitDeductionType.md | 4 +- docs/BenefitsApi.md | 228 +- docs/BudgetBreakdownImportResponse.md | 29 + docs/BudgetGuidelinesView.md | 34 + docs/BudgetGuidelinesWarnings.md | 31 + ...C79f9c5950f983e59d2626faa30c00a1Request.md | 30 + ...C7c32ed5278ac67e2e518bf7484a75dcRequest.md | 30 + docs/CalendarAnniversaryCalendarEventV1.md | 35 + docs/CalendarBirthdayCalendarEventV1.md | 34 + docs/CalendarCalendarEventPersonV1.md | 35 + docs/CalendarCalendarEventsListResponseV1.md | 32 + ...arCalendarEventsListResponseV1DataInner.md | 36 + ...lendarCalendarEventsListResponseV1Links.md | 31 + ...arCalendarEventsListResponseV1LinksNext.md | 30 + ...arCalendarEventsListResponseV1LinksPrev.md | 30 + ...alendarCalendarEventsListResponseV1Meta.md | 33 + docs/CalendarEventsApi.md | 108 + docs/CalendarHolidayCalendarEventV1.md | 34 + docs/CalendarTimeOffCalendarEventV1.md | 35 + docs/CanCreateGoalsResponse.md | 2 +- ...Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md | 30 + docs/ChangeCustomFieldListValueRequest.md | 30 + docs/ChangeTrackingApi.md | 185 + docs/ClockEntryClockEntryLocationInputV1.md | 33 + docs/ClockEntryCreateClockEntryV1.md | 38 + docs/ClockEntrySchema.md | 2 +- docs/ClockInRequestSchema.md | 14 +- docs/CloseGoalRequest.md | 29 + docs/CompanyApi.md | 92 + docs/CompanyBenefitSummary.md | 16 +- docs/CompanyFilesApi.md | 28 +- docs/CompanyIndustryDataObject.md | 33 + docs/CompanyProfileApi.md | 167 + docs/CompanyProfileData.md | 37 + docs/CompanyProfileDataAddress.md | 33 + docs/CompanyProfileIntegrations.md | 2 +- docs/CompensationApi.md | 242 + docs/CompensationBenchmarkDetailEmployee.md | 44 + ...ensationBenchmarkDetailEmployeeJobTitle.md | 31 + ...mpensationBenchmarkDetailEmployeeSalary.md | 30 + docs/CompensationBenchmarkDetails.md | 37 + ...ionBenchmarkDetailsBenchmarkValuesInner.md | 40 + ...ompensationBenchmarkJobLocationEmployee.md | 39 + ...ationBenchmarkJobLocationEmployeeSalary.md | 30 + docs/CompensationBenchmarkJobLocationPair.md | 34 + ...ationBenchmarkJobLocationPairJobDetails.md | 30 + docs/CompensationBenchmarkOverview.md | 34 + docs/CompensationBenchmarkOverviewValues.md | 36 + docs/CompensationBenchmarkSource.md | 33 + docs/CompensationBenchmarkingApi.md | 894 + docs/CompensationBenchmarkingColumnMap.md | 31 + docs/CompensationBenchmarksList.md | 32 + docs/CompensationEquitySettingsResponse.md | 37 + ...nEquitySettingsResponseCompanyValuation.md | 28 + ...sationEquitySettingsResponseDisclaimers.md | 28 + ...EquitySettingsResponseOutstandingShares.md | 28 + ...tionEquitySettingsResponsePricePerShare.md | 28 + ...ensationEquitySettingsResponseSliderMin.md | 28 + ...EquitySettingsResponseVestingConditions.md | 28 + ...CompensationEquitySettingsUpdateRequest.md | 37 + docs/CompensationPlanningApi.md | 2303 + ...CompensationPlanningCycleAdminsResponse.md | 30 + ...nPlanningCycleAdminsResponseAdminsInner.md | 38 + ...mpensationPlanningCycleCompleteResponse.md | 32 + ...lanningCycleCompleteResponseErrorsInner.md | 30 + docs/CompensationToolsDataObject.md | 34 + docs/CompensationToolsResponse.md | 31 + docs/CompensationUpsellData.md | 32 + ...CompletedQuestionsAndResponseDataObject.md | 37 + docs/ConversionRateDataObject.md | 32 + docs/CountriesOptionsResponse.md | 31 + docs/CountrySchema.md | 8 +- docs/CreateCompensationBenchmarkRequest.md | 49 + ...reateCompensationBenchmarkSourceRequest.md | 30 + docs/CreateGoalCommentRequest.md | 29 + docs/CreateGoalRequest.md | 36 + docs/CreateGoalRequestMilestonesInner.md | 29 + docs/CreateLocationRequest.md | 31 + docs/CreateLocationRequestAddress.md | 37 + docs/CreateTrainingTypeRequest.md | 2 +- ...reateTrainingTypeRequestDueFromHireDate.md | 31 - ...TrainingTypeRequestDueFromHireDateOneOf.md | 30 - docs/CreatedCompensationBenchmark.md | 30 + ...atedCompensationBenchmarkSavedBenchmark.md | 50 + docs/CreatedCompensationBenchmarkSource.md | 30 + docs/CreatedTimeOffRequest.md | 46 + docs/CreatedTimeOffRequestAmount.md | 31 + docs/CreatedTimeOffRequestNotes.md | 31 + docs/CreatedTimeOffRequestStatus.md | 32 + docs/CreatedTimeOffRequestType.md | 31 + docs/CurrencyConversionsResponse.md | 32 + docs/CursorPagesResponse.md | 6 +- docs/CustomFieldDefinitionResponseObject.md | 47 + ...ieldDefinitionResponseObjectValuesInner.md | 31 + docs/CustomFieldRequest.md | 35 + docs/CustomFieldTypeViewObject.md | 31 + docs/CustomFieldViewObject.md | 36 + docs/CustomFieldsApi.md | 1022 + docs/CustomFieldsListResponse.md | 31 + docs/CustomReportResponse.md | 33 + docs/CustomReportResponseFieldsInner.md | 30 + docs/CustomReportsApi.md | 235 +- ...Dacd313af2106213fc4696175941ce65Request.md | 31 + docs/DataRequest.md | 10 +- docs/DataRequestAggregations.md | 31 + docs/DataRequestAggregationsInner.md | 30 - docs/DataRequestFilters.md | 5 +- docs/DataRequestFiltersFiltersInner.md | 4 +- docs/DataRequestSortByInner.md | 5 +- docs/Dataset.md | 30 - docs/DatasetDataResponseV2.md | 31 + docs/DatasetDataResponseV2DataInner.md | 29 + ...tasetDataResponseV2DataInnerFieldsValue.md | 28 + docs/DatasetDataResponseV2Links.md | 31 + docs/DatasetDataResponseV2Meta.md | 33 + docs/DatasetFieldsResponse.md | 6 +- docs/DatasetResponse.md | 29 - docs/DatasetResponseV1.md | 29 + docs/DatasetV1.md | 30 + docs/DatasetsApi.md | 449 +- docs/DatasetsResponse.md | 29 - docs/DatasetsResponseDatasetsInner.md | 30 - docs/DatasetsResponseV12.md | 29 + docs/DatasetsResponseV12DatasetsInner.md | 30 + ...eleteCompensationBenchmarkSourceRequest.md | 29 + ...leteCompensationBenchmarkSourceResponse.md | 29 + docs/DetailsAndCurrencyRequestDataObject.md | 42 + ...Ec1ba8e76f33960b018d0d7518fe97b5Request.md | 40 + docs/Employee.md | 13 +- docs/EmployeeBenefitFiltersFilters.md | 8 +- ...nefitsListResponseEmployeeBenefitsInner.md | 4 +- ...ployeeBenefitsInnerEmployeeBenefitInner.md | 32 +- ...=> EmployeeCursorPaginationQueryObject.md} | 18 +- docs/EmployeeDependent.md | 2 +- ...pendentsResponseEmployeeDependentsInner.md | 26 +- docs/EmployeeFilesApi.md | 78 +- docs/EmployeeOptionalField.md | 257 + docs/EmployeePhotoJsonResponse.md | 30 + docs/EmployeeStringCodeErrorResponseV1.md | 30 + .../EmployeeStringCodeErrorResponseV1Error.md | 30 + docs/EmployeeTableRow.md | 2 +- docs/EmployeeTableRowValue.md | 28 - docs/EmployeeTableRowValueAnyOfInner.md | 28 - ...TabularDataApi.md => EmployeeTablesApi.md} | 207 +- docs/EmployeeTimeOffPolicyAssignment.md | 2 +- docs/EmployeeTimeOffPolicyAssignmentV11.md | 4 +- ...oyeeTimeOffRequestApproverResponseInner.md | 32 + docs/EmployeeTimesheetEntryTransformer.md | 14 +- docs/EmployeeUpdatedWebhookPayloadData.md | 2 +- docs/EmployeeVerificationApi.md | 417 + docs/EmployeeVerificationIntegration.md | 31 + ...EmployeeVerificationIntegrationResponse.md | 29 + ...ificationLifecycleEmailAcceptedResponse.md | 30 + docs/EmployeeVerificationPublicApiRecord.md | 43 + docs/EmployeeVerificationUpdateResponse.md | 29 + docs/EmployeeVerificationsListResponse.md | 29 + docs/EmployeesApi.md | 259 +- docs/EmployeesDirectoryJsonResponse.md | 30 + ...ployeesDirectoryJsonResponseFieldsInner.md | 31 + docs/EmployeesDirectoryXmlResponse.md | 30 + .../EmployeesDirectoryXmlResponseEmployees.md | 30 + ...ectoryXmlResponseEmployeesEmployeeInner.md | 30 + ...esponseEmployeesEmployeeInnerFieldInner.md | 30 + docs/EmployeesDirectoryXmlResponseFieldset.md | 30 + ...sDirectoryXmlResponseFieldsetFieldInner.md | 30 + docs/ErrorResponse.md | 30 + docs/ErrorResponseError.md | 30 + ...F3883a522dadbe9e11b34f8b656e3adbRequest.md | 35 + docs/FieldList.md | 29 - docs/FieldListFieldsInner.md | 31 - docs/FieldOptionsRequestSchema.md | 4 +- docs/FieldOptionsTransformer.md | 4 +- docs/FieldOptionsTransformerId.md | 29 + docs/ForbiddenV1.md | 29 + ...BadRequestError.md => ForbiddenV1Error.md} | 16 +- docs/GetBreakPolicySuggestionsRequest.md | 29 + docs/GetCompanyReportResponse.md | 2 +- .../GetCompanyReportResponseEmployeesInner.md | 29 + docs/GetDataFromDatasetV2Request.md | 33 + docs/GetEmployeeResponse.md | 77 + docs/GetEmployeesEmployeeBaseResponse.md | 37 + docs/GetEmployeesEmployeeResponse.md | 156 +- ...loyeesEmployeeResponseAllOfOvertimeRate.md | 31 + ...etEmployeesEmployeeResponseAllOfPayRate.md | 31 + .../GetEmployeesEmployeeResponseAllOfTeams.md | 30 + docs/GetEmployeesFilterRequestObject.md | 112 +- docs/GlobalHolidayGlobalHolidayV1.md | 36 + docs/Goal.md | 36 - docs/GoalAggregateCommentsInner.md | 4 +- docs/GoalAggregatePersonsInner.md | 2 +- docs/GoalCommentResponse.md | 4 +- docs/GoalCommentsResponseCommentsInner.md | 4 +- docs/GoalResponse.md | 29 + docs/GoalsAggregateV12CommentsInner.md | 2 +- docs/GoalsAggregateV1PersonsInner.md | 2 +- docs/GoalsApi.md | 838 +- docs/HiringLead.md | 2 +- .../HolidayBulkInsertCompanyHolidayErrorV1.md | 35 + ...HolidayBulkInsertCompanyHolidayRecordV1.md | 33 + ...kInsertCompanyHolidaysFailureResponseV1.md | 41 + ...idayBulkInsertCompanyHolidaysResponseV1.md | 36 + docs/HolidayCatalogHolidayListResponseV1.md | 31 + ...olidayCatalogHolidayListResponseV1Links.md | 31 + docs/HolidayCompanyHolidayAudienceV1.md | 34 + docs/HolidayCompanyHolidayListResponseV1.md | 31 + ...olidayCompanyHolidayListResponseV1Links.md | 31 + ...HolidayCompanyHolidayListResponseV1Meta.md | 33 + docs/HolidayCompanyHolidayPayStatusHoursV1.md | 31 + docs/HolidayCompanyHolidayV1.md | 41 + docs/HolidayCreateCompanyHolidayRequestV1.md | 37 + docs/HolidayUpdateCompanyHolidayRequestV1.md | 36 + docs/HolidaysApi.md | 744 + docs/HourEntryCreateHourEntryV1.md | 35 + docs/HourEntryPatchHourEntryV1.md | 34 + docs/HoursApi.md | 10 + docs/ImportCompensationBenchmarksResponse.md | 30 + docs/{Forbidden.md => Industry.md} | 19 +- docs/{BadRequest.md => InlineObject.md} | 18 +- docs/InlineObject1.md | 30 + docs/InlineObject1EmployeesInner.md | 31 + docs/InlineObject1Status.md | 30 + docs/InlineObject2.md | 45 + docs/InlineObject2Inner.md | 33 + docs/InvalidRequest.md | 29 - docs/InvalidRequestError.md | 31 - docs/JobSummary.md | 8 +- docs/JobSummaryDepartment.md | 31 - docs/JobSummaryHiringLead.md | 34 - docs/JobSummaryLocation.md | 32 - docs/JsonDirectoryEmployee.md | 30 - docs/JsonDirectoryEmployeeFieldsInner.md | 31 - ...nEmployeeFilesCategoriesInnerFilesInner.md | 2 +- docs/LastChangeInformationApi.md | 94 - docs/LegacyReportFieldMapResponse.md | 29 + ...gacyReportFieldMapResponseMappingsInner.md | 34 + docs/LegacyReportIDMapResponse.md | 29 + .../LegacyReportIDMapResponseMappingsInner.md | 31 + docs/LevelsAndBandsColumnMap.md | 31 + docs/LevelsAndBandsGroupStatusCounts.md | 32 + docs/LevelsAndBandsJobTitleAssignment.md | 31 + ...evelsAndBandsJobTitleAssignmentsRequest.md | 30 + docs/LevelsAndBandsPayBandValue.md | 32 + docs/LevelsAndBandsUploadResponse.md | 31 + docs/ListFieldDetail.md | 9 +- docs/ListFieldOption.md | 10 +- docs/ListFieldValuesOptionsInner.md | 6 +- docs/ListFieldValuesXml.md | 30 + docs/ListFieldValuesXmlOptionInner.md | 32 + docs/ListValueViewObject.md | 31 + docs/LocationResponseObject.md | 36 + docs/LocationResponseObjectAddress.md | 39 + docs/LocationResponseObjectAddressCountry.md | 32 + docs/LocationResponseObjectAddressState.md | 32 + docs/LocationsApi.md | 434 + docs/LoginApi.md | 6 +- docs/LoginResponse.md | 2 +- docs/MealRestBreaksApi.md | 1806 + ...erBenefitEventCoveragesInnerEventsInner.md | 4 +- ...ponseDataInnerPlansInnerDateRangesInner.md | 2 +- docs/MetaCompanyPropertiesResponse.md | 32 + docs/MetaCurrencyTypeItem.md | 33 + ...1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md | 29 + ...06b8e2fb2d2dRequestBudgetBreakdownInner.md | 33 + ...02ee192568adbd5e3179a91e6e2RequestInner.md | 31 + ...179a91e6e2RequestInnerBudgetAllocations.md | 31 + ...288aa996aba16d7a495c62321ea999a9Request.md | 29 + ...6d7a495c62321ea999a9RequestSentDateTime.md | 29 + ...3958585c861325ea7a2cd30a8c74f042Request.md | 29 + ...89a5068111ec499135c7d6e9a53d5a30Request.md | 29 + docs/ModelField.md | 10 +- docs/MonitorFieldList.md | 29 + docs/MonitorFieldListFieldsInner.md | 31 + docs/NewHirePacketGtkyAnswerVisibilityItem.md | 31 + ...ewHirePacketGtkyAnswerVisibilityRequest.md | 30 + ...wHirePacketGtkyAnswerVisibilityResponse.md | 29 + docs/NewHirePacketPublicApi.md | 53 + docs/NewHirePacketPublicApiWritableBody.md | 40 + docs/NewHirePacketsListResponse.md | 32 + docs/NewHireWidgetItem.md | 38 + docs/NewHireWidgetResponse.md | 29 + docs/OnboardingApi.md | 992 + docs/OnboardingExperiencePublicApi.md | 35 + docs/OnboardingExperiencesListResponse.md | 29 + docs/PagedLocationResponse.md | 31 + docs/PagedResponse.md | 2 +- ...CompanyProfileCompanyInformationRequest.md | 31 + ...ProfileCompanyInformationRequestAddress.md | 34 + docs/PayGradesAndBandsConfigurationStatus.md | 32 + ...desAndBandsConfigurationStatusJobTitles.md | 31 + ...nfigurationStatusJobTitlesWarningsInner.md | 30 + ...GradesAndBandsConfigurationStatusLevels.md | 31 + ...ndsConfigurationStatusLevelsErrorsInner.md | 30 + ...adesAndBandsConfigurationStatusPayBands.md | 31 + ...GradesAndBandsConfigurationStatusReview.md | 31 + docs/PayGradesAndBandsDeleteGroupsResponse.md | 30 + docs/PayGradesAndBandsDeleteHierarchyGroup.md | 33 + ...ayGradesAndBandsDeleteHierarchyJobTitle.md | 30 + docs/PayGradesAndBandsDeleteHierarchyLevel.md | 39 + docs/PayGradesAndBandsDeleteLevelResponse.md | 30 + docs/PayGradesAndBandsDeleteResponse.md | 30 + ...yGradesAndBandsJobTitleAssignmentsGroup.md | 33 + ...adesAndBandsJobTitleAssignmentsJobTitle.md | 30 + ...yGradesAndBandsJobTitleAssignmentsLevel.md | 39 + ...adesAndBandsJobTitleAssignmentsResponse.md | 29 + docs/PayGradesAndBandsJobTitleEmployee.md | 30 + .../PayGradesAndBandsJobTitleWithEmployees.md | 31 + docs/PayGradesAndBandsLevel.md | 39 + docs/PayGradesAndBandsLevelJobTitle.md | 30 + docs/PayGradesAndBandsLevelsGroup.md | 33 + docs/PayGradesAndBandsLevelsResponse.md | 29 + docs/PayGradesAndBandsPayBandJobTitle.md | 30 + docs/PayGradesAndBandsPayBandLevel.md | 39 + docs/PayGradesAndBandsPayBandsGroup.md | 33 + docs/PayGradesAndBandsPayBandsResponse.md | 29 + docs/PayGradesAndBandsPublishResponse.md | 29 + docs/PayGradesAndBandsPublishedGroup.md | 31 + docs/PayGradesAndBandsPublishedJobTitle.md | 30 + docs/PayGradesAndBandsPublishedLevel.md | 37 + docs/PayGradesAndBandsPublishedResponse.md | 29 + docs/PayGradesAndBandsReviewGroup.md | 33 + docs/PayGradesAndBandsReviewJobTitle.md | 30 + docs/PayGradesAndBandsReviewLevel.md | 39 + docs/PayGradesAndBandsReviewResponse.md | 29 + docs/PayGradesAndBandsSaveLevelsResponse.md | 29 + ...ayGradesAndBandsUpdateJobTitlesResponse.md | 29 + docs/PayGradesAndBandsUpdateLevel.md | 36 + docs/PayGradesAndBandsUpdateLevelsGroup.md | 31 + docs/PayGradesAndBandsUpdateLevelsRequest.md | 29 + docs/PayGradesAndBandsUpdatePayBandItem.md | 35 + ...PayGradesAndBandsUpdatePayBandsResponse.md | 29 + docs/PayGradesBandsApi.md | 1102 + docs/PersonInfoApiTransformer.md | 4 +- docs/PhotosApi.md | 33 +- docs/PostGoalCommentRequest.md | 29 - docs/PostGoalRequest.md | 36 - docs/PostGoalRequestMilestonesInner.md | 29 - docs/PostNewEmployee.md | 2 +- docs/ProblemDetailsResponseV2.md | 36 + docs/ProjectCreateRequestSchema.md | 11 +- .../ProjectCreateTimeTrackingProjectTaskV1.md | 31 + docs/ProjectCreateTimeTrackingProjectV1.md | 35 + ...ctCreateTimeTrackingProjectV1TasksInner.md | 30 + docs/ProjectInfoApiTransformer.md | 2 +- docs/ProjectInfoApiTransformerTask.md | 31 - docs/ProjectLegacyErrorResponseV1.md | 30 + docs/ProjectLegacyErrorResponseV1Error.md | 30 + docs/ProjectPaginatedResponseDataV1.md | 31 + docs/ProjectPaginatedResponseDataV1Meta.md | 33 + docs/ProjectPaginatedTasksResponseV1.md | 31 + docs/ProjectPaginatedTasksResponseV1Links.md | 30 + docs/ProjectPaginatedTasksResponseV1Meta.md | 32 + ...PaginatedTimeTrackingProjectsResponseV1.md | 31 + docs/ProjectStandardApiErrorResponseV1.md | 32 + docs/ProjectTimeTrackingProjectV1.md | 40 + docs/ProjectTimeTrackingTaskV1.md | 36 + .../ProjectUpdateTimeTrackingProjectTaskV1.md | 31 + docs/ProjectUpdateTimeTrackingProjectV1.md | 36 + docs/ProvinceItem.md | 33 + docs/PublicCustomFieldTypesResponse.md | 29 + ...icListValuesCustomFieldSettingsResponse.md | 37 + ...sCustomFieldSettingsResponseValuesInner.md | 32 + docs/PutCompanyIndustryCodesRequest.md | 29 + docs/PutCompanyProfileDisplayNameRequest.md | 29 + docs/PutGoalCommentRequest.md | 29 - docs/PutGoalMilestoneProgressRequest.md | 29 - docs/PutGoalProgressRequest.md | 30 - docs/PutGoalSharedWithRequest.md | 29 - docs/PutGoalV11Request.md | 38 - docs/PutGoalV11RequestMilestonesInner.md | 29 - docs/RemoveCycleAdminSelfResponse.md | 29 + docs/RemoveTotalRewardsEmployeesRequest.md | 29 + docs/Report.md | 2 +- docs/ReportsApi.md | 32 +- docs/RequestCustomReportFilters.md | 2 +- docs/RequestCustomReportFiltersLastChanged.md | 1 - ...questCustomReportResponseEmployeesInner.md | 2 +- docs/SaveChangeCommTemplateResponse.md | 29 + docs/SchedulingApi.md | 1280 + docs/SchedulingCreateScheduleRequestV1.md | 41 + ...chedulingCreateSchedulingShiftRequestV1.md | 42 + docs/SchedulingPublishShiftsFailureV1.md | 31 + docs/SchedulingPublishShiftsRequest.md | 29 + docs/SchedulingPublishShiftsResultV1.md | 31 + docs/SchedulingScheduleListResponseV1.md | 31 + docs/SchedulingScheduleListResponseV1Links.md | 30 + docs/SchedulingScheduleListResponseV1Meta.md | 31 + docs/SchedulingScheduleV1.md | 47 + docs/SchedulingSchedulingShiftAssessmentV1.md | 37 + ...ingSchedulingShiftAssessmentViolationV1.md | 33 + docs/SchedulingSchedulingShiftV1.md | 48 + ...SchedulingShiftAssessmentListResponseV1.md | 31 + ...dulingShiftAssessmentListResponseV1Meta.md | 31 + docs/SchedulingShiftListResponseV1.md | 31 + docs/SchedulingShiftListResponseV1Links.md | 30 + .../SchedulingShiftListResponseV1LinksNext.md | 30 + .../SchedulingShiftListResponseV1LinksPrev.md | 30 + docs/SchedulingShiftListResponseV1Meta.md | 31 + docs/SchedulingTimezoneListResponseV1.md | 31 + docs/SchedulingTimezoneListResponseV1Meta.md | 31 + docs/SchedulingTimezoneV1.md | 31 + docs/SchedulingUpdateScheduleRequestV1.md | 41 + ...chedulingUpdateSchedulingShiftRequestV1.md | 42 + ...VerificationLifecycleEmailByUserRequest.md | 29 + docs/SendRecommendationsResponse.md | 29 + docs/SetBreakPolicyEmployeesRequest.md | 2 +- .../SetTotalRewardsCustomDisclaimerRequest.md | 29 + docs/SetTotalRewardsOnboardingStepRequest.md | 29 + ...alCreateTimeTrackingShiftDifferentialV1.md | 35 + ...meTrackingShiftDifferentialV1TimesInner.md | 32 + ...hiftDifferentialPaginatedResponseDataV1.md | 31 + ...DifferentialPaginatedResponseDataV1Meta.md | 33 + ...imeTrackingShiftDifferentialsResponseV1.md | 31 + ...tialTimeTrackingShiftDifferentialTimeV1.md | 34 + ...erentialTimeTrackingShiftDifferentialV1.md | 40 + ...alUpdateTimeTrackingShiftDifferentialV1.md | 36 + docs/StandardApiErrorResponse.md | 32 + docs/StateProvinceResponseSchema.md | 4 +- docs/StateProvinceSchema.md | 8 +- docs/TableRowDeleteResponse.md | 1 + docs/TaskCreateSchema.md | 2 +- docs/TimeOffApi.md | 306 +- docs/TimeOffPolicy.md | 2 +- docs/TimeOffRequest.md | 4 +- docs/TimeOffRequest1.md | 6 +- docs/TimeOffRequest1Status.md | 2 +- docs/TimeOffRequest1Type.md | 2 +- ...ffTypesAndDefaultHoursTimeOffTypesInner.md | 6 +- docs/TimeTrackingApi.md | 3732 +- ...ingBreakPolicyEmployeeCollectionV1Inner.md | 6 +- ...rackingBreakPolicySuggestionsResponseV1.md | 29 + ...estionsResponseV1SuggestedPoliciesInner.md | 32 + ...onseV1SuggestedPoliciesInnerBreaksInner.md | 33 + .../TimeTrackingBulkResponseSchemaResponse.md | 2 +- ...psertEmployeeTimeTrackingDataAcceptedV1.md | 31 + ...kUpsertEmployeeTimeTrackingDataRecordV1.md | 33 + docs/TimeTrackingClockEntryLocationV1.md | 33 + ...ackingClockEntryPaginatedResponseDataV1.md | 31 + ...ngClockEntryPaginatedResponseDataV1Meta.md | 33 + docs/TimeTrackingClockEntryV1.md | 49 + ...ingConfigurationPaginatedResponseDataV1.md | 31 + ...nfigurationPaginatedResponseDataV1Links.md | 31 + ...urationPaginatedResponseDataV1LinksNext.md | 30 + ...urationPaginatedResponseDataV1LinksPrev.md | 30 + ...onfigurationPaginatedResponseDataV1Meta.md | 33 + docs/TimeTrackingCreateClockInV1.md | 32 + docs/TimeTrackingCreateClockOutV1.md | 31 + ...rUpdateTimeTrackingBreakWithoutPolicyV1.md | 10 +- ...TrackingCreateTimeTrackingBreakPolicyV1.md | 2 +- docs/TimeTrackingCreateTimeTrackingBreakV1.md | 8 +- ...ackingCreateTimeTrackingConfigurationV1.md | 44 + ...ployeeEnrollmentPaginatedResponseDataV1.md | 31 + .../TimeTrackingEmployeeTimeTrackingDataV1.md | 38 + ...rackingHourEntryPaginatedResponseDataV1.md | 31 + docs/TimeTrackingHourEntryV1.md | 39 + ...ckingOffsetPaginatedResponseDataV1Links.md | 4 +- ...gOffsetPaginatedResponseDataV1LinksNext.md | 30 - ...gOffsetPaginatedResponseDataV1LinksPrev.md | 30 - ...TimeTrackingPagePaginatedResponseDataV1.md | 31 + ...TrackingPaginatedClockEntriesResponseV1.md | 31 + ...natedEmployeeTimeTrackingDataResponseV1.md | 31 + ...eTrackingPaginatedHourEntriesResponseV1.md | 31 + ...tedTimeTrackingConfigurationsResponseV1.md | 31 + ...ngPaginatedTimeTrackingKiosksResponseV1.md | 31 + ...ginatedTimeTrackingTimeClocksResponseV1.md | 31 + ...meTrackingPaginatedTimesheetsResponseV1.md | 31 + ...ackingPaginatedTimesheetsResponseV1Meta.md | 32 + ...eTrackingProjectWithTasksAndEmployeeIds.md | 8 +- docs/TimeTrackingRecordSchema.md | 24 +- docs/TimeTrackingRecordSchemaProject.md | 32 - docs/TimeTrackingRecordSchemaProjectTask.md | 30 - ...meTrackingRecordSchemaShiftDifferential.md | 31 - ...meTrackingSyncTimeTrackingBreakPolicyV1.md | 2 +- ...meTrackingTimeTrackingBreakAssessmentV1.md | 12 +- ...gTimeTrackingBreakAssessmentViolationV1.md | 4 +- ...TrackingTimeTrackingBreakAvailabilityV1.md | 10 +- docs/TimeTrackingTimeTrackingBreakPolicyV1.md | 6 +- ...gTimeTrackingBreakPolicyWithRelationsV1.md | 6 +- docs/TimeTrackingTimeTrackingBreakV1.md | 12 +- ...TimeTrackingTimeTrackingConfigurationV1.md | 50 + docs/TimeTrackingTimeTrackingHourEntryV1.md | 39 + docs/TimeTrackingTimeTrackingKioskV1.md | 35 + docs/TimeTrackingTimeTrackingTimeClockV1.md | 38 + docs/TimeTrackingTimesheetV1.md | 42 + docs/TimeTrackingUpdateClockEntryV1.md | 37 + ...rackingUpdateEmployeeTimeTrackingDataV1.md | 32 + ...TrackingUpdateTimeTrackingBreakPolicyV1.md | 2 +- docs/TimeTrackingUpdateTimeTrackingBreakV1.md | 8 +- ...ackingUpdateTimeTrackingConfigurationV1.md | 44 + docs/TimeTrackingUpdateTimeTrackingKioskV1.md | 30 + ...meTrackingUpdateTimeTrackingTimeClockV1.md | 31 + docs/TimesheetEntryInfoApiTransformer.md | 12 +- ...mesheetEntryInfoApiTransformerBreakInfo.md | 31 - docs/TimesheetTimesheetDailyEntryV1.md | 34 + docs/TimesheetTimesheetDailySummaryV1.md | 31 + docs/TimezoneListResponse.md | 2 +- docs/TotalRewardsApi.md | 641 + docs/TotalRewardsBenefitDetailsValues.md | 35 + docs/TotalRewardsBenefitSectionValues.md | 31 + docs/TotalRewardsCalendarSectionValues.md | 32 + docs/TotalRewardsCompSummaryValues.md | 33 + docs/TotalRewardsCustomDisclaimerInfo.md | 31 + docs/TotalRewardsEmployeeStatement.md | 46 + docs/TotalRewardsEquityDetailsValues.md | 50 + ...alRewardsEquityEstimatedValuationValues.md | 34 + docs/TotalRewardsEquityGrowthChartItem.md | 35 + docs/TotalRewardsEquityGrowthEstimation.md | 36 + docs/TotalRewardsEquitySectionValues.md | 34 + docs/TotalRewardsExtraPayDetailsValues.md | 36 + docs/TotalRewardsExtraPaySectionValues.md | 32 + docs/TotalRewardsHolidayValue.md | 32 + docs/TotalRewardsOnboardingStep.md | 30 + docs/TotalRewardsOverviewSectionValues.md | 32 + docs/TotalRewardsTimeOffPolicyValue.md | 33 + docs/TotalRewardsTimelineItem.md | 32 + docs/TotalRewardsTimelineItemLabel.md | 29 + docs/TotalRewardsTimelineSectionValues.md | 32 + docs/TrainingApi.md | 56 +- docs/TrainingRecord.md | 12 +- docs/TrainingType.md | 8 +- docs/TrainingTypeDueFromHireDate.md | 31 - docs/TrainingTypeDueFromHireDateOneOf.md | 30 - docs/TransformedApiEmployeeGoalDetailsGoal.md | 8 +- docs/TransformedApiGoal.md | 10 +- docs/TransformedApiGoalActions.md | 31 - docs/TransformedApiGoalMilestonesInner.md | 6 +- docs/UnarchiveCustomFieldsRequest.md | 31 + docs/UnarchiveCustomFieldsResponse.md | 29 + ...UnassignEmployeesFromBreakPolicyRequest.md | 2 +- docs/UpdateCompanyIndustryCodes400Response.md | 29 + docs/UpdateCompanyIndustryCodes403Response.md | 29 + docs/UpdateCompanyIndustryCodes404Response.md | 29 + docs/UpdateCompanyIndustryCodes500Response.md | 29 + docs/UpdateCompanyIndustryCodesResponse.md | 29 + docs/UpdateCompanyNameBadRequestResponse.md | 29 + ...pdateCompanyNameBadRequestResponseError.md | 29 + docs/UpdateCompanyNameForbiddenResponse.md | 29 + ...UpdateCompanyNameForbiddenResponseError.md | 29 + .../UpdateCompanyNameInternalErrorResponse.md | 29 + docs/UpdateCompanyNameSuccessResponse.md | 29 + docs/UpdateCompensationBenchmarkRequest.md | 48 + docs/UpdateCompensationBenchmarkSourceItem.md | 31 + ...dateCompensationBenchmarkSourcesRequest.md | 29 + ...ateCompensationBenchmarkSourcesResponse.md | 29 + ...eEmployeeVerificationIntegrationRequest.md | 29 + docs/UpdateEmployeeVerificationRequest.md | 33 + docs/UpdateGoalCommentRequest.md | 29 + docs/UpdateGoalMilestoneProgressRequest.md | 29 + docs/UpdateGoalProgressRequest.md | 30 + docs/UpdateGoalSharingRequest.md | 29 + docs/UpdateGoalV1.md | 35 + docs/UpdateGoalV11Request.md | 38 + docs/UpdateGoalV11RequestMilestonesInner.md | 29 + docs/UpdateLocationRequest.md | 31 + docs/UpdateLocationRequestAddress.md | 37 + docs/UpdatePayBandsRequest.md | 30 + docs/UpdateTrainingTypeRequest.md | 2 +- docs/UpdatedCompensationBenchmark.md | 30 + ...atedCompensationBenchmarkSavedBenchmark.md | 50 + docs/UploadEmployeePhotoRequest1.md | 29 + docs/UserPermissionData.md | 33 + docs/WebHookPostFieldDataObject.md | 6 +- docs/WebHookResponse.md | 2 +- docs/Webhook.md | 2 +- docs/WebhookLogEntry.md | 2 +- docs/WebhooksApi.md | 164 +- docs/WebhooksListWebhooksInner.md | 2 +- docs/WhosOutEntry.md | 6 +- docs/WhosOutListResponseV1.md | 32 + docs/WhosOutListResponseV1Links.md | 30 + docs/WhosOutListResponseV1LinksNext.md | 30 + docs/WhosOutListResponseV1LinksPrev.md | 30 + docs/WhosOutListResponseV1Meta.md | 32 + docs/WhosOutPersonV1.md | 35 + docs/WhosOutV1.md | 34 + docs/XmlDirectoryEmployee.md | 30 - docs/XmlDirectoryEmployeeEmployees.md | 30 - ...DirectoryEmployeeEmployeesEmployeeInner.md | 30 - ...mployeeEmployeesEmployeeInnerFieldInner.md | 30 - docs/XmlDirectoryEmployeeFieldset.md | 30 - .../XmlDirectoryEmployeeFieldsetFieldInner.md | 30 - docs/XmlEmployeeFiles.md | 2 +- docs/XmlEmployeeFilesCategoryInner.md | 2 +- .../XmlEmployeeFilesCategoryInnerFileInner.md | 4 +- specs/public.yaml | 38467 +++++++++++----- specs/spec-source.json | 6 +- test/test_alerts_api.py | 75 + test/test_calendar_events_api.py | 47 + test/test_change_tracking_api.py | 54 + test/test_company_api.py | 47 + test/test_compensation_api.py | 61 + test/test_compensation_benchmarking_api.py | 117 + test/test_compensation_planning_api.py | 236 + test/test_custom_fields_api.py | 124 + test/test_employee_tables_api.py | 82 + test/test_employee_verification_api.py | 75 + test/test_holidays_api.py | 96 + test/test_locations_api.py | 75 + test/test_meal_rest_breaks_api.py | 180 + test/test_onboarding_api.py | 124 + test/test_pay_grades_bands_api.py | 138 + test/test_scheduling_api.py | 138 + test/test_total_rewards_api.py | 96 + 1432 files changed, 191589 insertions(+), 51742 deletions(-) create mode 100644 bamboohr_sdk/api/alerts_api.py create mode 100644 bamboohr_sdk/api/calendar_events_api.py create mode 100644 bamboohr_sdk/api/change_tracking_api.py create mode 100644 bamboohr_sdk/api/company_api.py create mode 100644 bamboohr_sdk/api/compensation_api.py create mode 100644 bamboohr_sdk/api/compensation_benchmarking_api.py create mode 100644 bamboohr_sdk/api/compensation_planning_api.py create mode 100644 bamboohr_sdk/api/custom_fields_api.py rename bamboohr_sdk/api/{tabular_data_api.py => employee_tables_api.py} (52%) create mode 100644 bamboohr_sdk/api/employee_verification_api.py create mode 100644 bamboohr_sdk/api/holidays_api.py delete mode 100644 bamboohr_sdk/api/last_change_information_api.py create mode 100644 bamboohr_sdk/api/locations_api.py create mode 100644 bamboohr_sdk/api/meal_rest_breaks_api.py create mode 100644 bamboohr_sdk/api/onboarding_api.py create mode 100644 bamboohr_sdk/api/pay_grades_bands_api.py create mode 100644 bamboohr_sdk/api/scheduling_api.py create mode 100644 bamboohr_sdk/api/total_rewards_api.py rename bamboohr_sdk/models/{job_summary_location.py => a05b6d5f564f805d688ff2c1e37c3990_request.py} (51%) rename bamboohr_sdk/models/{post_goal_request_milestones_inner.py => add_custom_field_list_value_request.py} (59%) create mode 100644 bamboohr_sdk/models/add_custom_field_list_value_response.py rename bamboohr_sdk/models/{time_tracking_record_schema_shift_differential.py => add_custom_field_list_value_response_one_of_inner.py} (54%) create mode 100644 bamboohr_sdk/models/add_cycle_admins_response.py rename bamboohr_sdk/models/{json_directory_employee_fields_inner.py => add_cycle_admins_response_added_inner.py} (53%) rename bamboohr_sdk/models/{data_request_aggregations_inner.py => add_cycle_admins_response_skipped_inner.py} (53%) create mode 100644 bamboohr_sdk/models/add_total_rewards_employees_request.py create mode 100644 bamboohr_sdk/models/alert_configuration_v1.py create mode 100644 bamboohr_sdk/models/alert_configuration_write_v1.py create mode 100644 bamboohr_sdk/models/alert_template_list_response_v1.py create mode 100644 bamboohr_sdk/models/alert_template_list_response_v1_alerts_inner.py delete mode 100644 bamboohr_sdk/models/application_details_applicant_address.py delete mode 100644 bamboohr_sdk/models/application_details_applicant_education.py delete mode 100644 bamboohr_sdk/models/application_details_job_hiring_lead.py delete mode 100644 bamboohr_sdk/models/application_details_status_changed_by_user.py create mode 100644 bamboohr_sdk/models/approve_timesheet_request.py create mode 100644 bamboohr_sdk/models/archive_custom_field_response.py create mode 100644 bamboohr_sdk/models/archived_custom_fields_list_response.py rename bamboohr_sdk/models/{assign_time_off_policies_request_inner.py => assign_time_off_policies_v1_request_inner.py} (54%) rename bamboohr_sdk/models/{bad_request.py => bad_request_v1.py} (58%) rename bamboohr_sdk/models/{time_tracking_record_schema_project_task.py => bad_request_v1_error.py} (57%) rename bamboohr_sdk/models/{job_summary_department.py => bank_holiday.py} (56%) create mode 100644 bamboohr_sdk/models/budget_breakdown_import_response.py create mode 100644 bamboohr_sdk/models/budget_guidelines_view.py create mode 100644 bamboohr_sdk/models/budget_guidelines_warnings.py create mode 100644 bamboohr_sdk/models/c79f9c5950f983e59d2626faa30c00a1_request.py create mode 100644 bamboohr_sdk/models/c7c32ed5278ac67e2e518bf7484a75dc_request.py create mode 100644 bamboohr_sdk/models/calendar_anniversary_calendar_event_v1.py create mode 100644 bamboohr_sdk/models/calendar_birthday_calendar_event_v1.py create mode 100644 bamboohr_sdk/models/calendar_calendar_event_person_v1.py create mode 100644 bamboohr_sdk/models/calendar_calendar_events_list_response_v1.py create mode 100644 bamboohr_sdk/models/calendar_calendar_events_list_response_v1_data_inner.py create mode 100644 bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links.py create mode 100644 bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links_next.py create mode 100644 bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links_prev.py create mode 100644 bamboohr_sdk/models/calendar_calendar_events_list_response_v1_meta.py create mode 100644 bamboohr_sdk/models/calendar_holiday_calendar_event_v1.py create mode 100644 bamboohr_sdk/models/calendar_time_off_calendar_event_v1.py create mode 100644 bamboohr_sdk/models/cf87b8e09a001b6fb81dfce6c20ab9e3_request.py create mode 100644 bamboohr_sdk/models/change_custom_field_list_value_request.py create mode 100644 bamboohr_sdk/models/clock_entry_clock_entry_location_input_v1.py create mode 100644 bamboohr_sdk/models/clock_entry_create_clock_entry_v1.py create mode 100644 bamboohr_sdk/models/close_goal_request.py create mode 100644 bamboohr_sdk/models/company_industry_data_object.py create mode 100644 bamboohr_sdk/models/company_profile_data.py create mode 100644 bamboohr_sdk/models/company_profile_data_address.py create mode 100644 bamboohr_sdk/models/compensation_benchmark_detail_employee.py rename bamboohr_sdk/models/{application_details_status_changed_by_user_job_title.py => compensation_benchmark_detail_employee_job_title.py} (51%) create mode 100644 bamboohr_sdk/models/compensation_benchmark_detail_employee_salary.py create mode 100644 bamboohr_sdk/models/compensation_benchmark_details.py create mode 100644 bamboohr_sdk/models/compensation_benchmark_details_benchmark_values_inner.py create mode 100644 bamboohr_sdk/models/compensation_benchmark_job_location_employee.py create mode 100644 bamboohr_sdk/models/compensation_benchmark_job_location_employee_salary.py create mode 100644 bamboohr_sdk/models/compensation_benchmark_job_location_pair.py rename bamboohr_sdk/models/{application_details_job_hiring_lead_job_title.py => compensation_benchmark_job_location_pair_job_details.py} (54%) create mode 100644 bamboohr_sdk/models/compensation_benchmark_overview.py create mode 100644 bamboohr_sdk/models/compensation_benchmark_overview_values.py create mode 100644 bamboohr_sdk/models/compensation_benchmark_source.py create mode 100644 bamboohr_sdk/models/compensation_benchmarking_column_map.py create mode 100644 bamboohr_sdk/models/compensation_benchmarks_list.py create mode 100644 bamboohr_sdk/models/compensation_equity_settings_response.py create mode 100644 bamboohr_sdk/models/compensation_equity_settings_response_company_valuation.py create mode 100644 bamboohr_sdk/models/compensation_equity_settings_response_disclaimers.py create mode 100644 bamboohr_sdk/models/compensation_equity_settings_response_outstanding_shares.py create mode 100644 bamboohr_sdk/models/compensation_equity_settings_response_price_per_share.py create mode 100644 bamboohr_sdk/models/compensation_equity_settings_response_slider_min.py create mode 100644 bamboohr_sdk/models/compensation_equity_settings_response_vesting_conditions.py create mode 100644 bamboohr_sdk/models/compensation_equity_settings_update_request.py create mode 100644 bamboohr_sdk/models/compensation_planning_cycle_admins_response.py create mode 100644 bamboohr_sdk/models/compensation_planning_cycle_admins_response_admins_inner.py create mode 100644 bamboohr_sdk/models/compensation_planning_cycle_complete_response.py rename bamboohr_sdk/models/{xml_directory_employee_employees_employee_inner_field_inner.py => compensation_planning_cycle_complete_response_errors_inner.py} (51%) create mode 100644 bamboohr_sdk/models/compensation_tools_data_object.py create mode 100644 bamboohr_sdk/models/compensation_tools_response.py create mode 100644 bamboohr_sdk/models/compensation_upsell_data.py create mode 100644 bamboohr_sdk/models/completed_questions_and_response_data_object.py create mode 100644 bamboohr_sdk/models/conversion_rate_data_object.py create mode 100644 bamboohr_sdk/models/countries_options_response.py create mode 100644 bamboohr_sdk/models/create_compensation_benchmark_request.py create mode 100644 bamboohr_sdk/models/create_compensation_benchmark_source_request.py rename bamboohr_sdk/models/{post_goal_comment_request.py => create_goal_comment_request.py} (62%) create mode 100644 bamboohr_sdk/models/create_goal_request.py rename bamboohr_sdk/models/{put_goal_v11_request_milestones_inner.py => create_goal_request_milestones_inner.py} (59%) create mode 100644 bamboohr_sdk/models/create_location_request.py create mode 100644 bamboohr_sdk/models/create_location_request_address.py delete mode 100644 bamboohr_sdk/models/create_training_type_request_due_from_hire_date.py create mode 100644 bamboohr_sdk/models/created_compensation_benchmark.py create mode 100644 bamboohr_sdk/models/created_compensation_benchmark_saved_benchmark.py rename bamboohr_sdk/models/{timesheet_entry_info_api_transformer_break_info.py => created_compensation_benchmark_source.py} (55%) create mode 100644 bamboohr_sdk/models/created_time_off_request.py create mode 100644 bamboohr_sdk/models/created_time_off_request_amount.py create mode 100644 bamboohr_sdk/models/created_time_off_request_notes.py create mode 100644 bamboohr_sdk/models/created_time_off_request_status.py rename bamboohr_sdk/models/{project_info_api_transformer_task.py => created_time_off_request_type.py} (56%) create mode 100644 bamboohr_sdk/models/currency_conversions_response.py delete mode 100644 bamboohr_sdk/models/cursor_pagination_query_object.py create mode 100644 bamboohr_sdk/models/custom_field_definition_response_object.py create mode 100644 bamboohr_sdk/models/custom_field_definition_response_object_values_inner.py create mode 100644 bamboohr_sdk/models/custom_field_request.py create mode 100644 bamboohr_sdk/models/custom_field_type_view_object.py create mode 100644 bamboohr_sdk/models/custom_field_view_object.py create mode 100644 bamboohr_sdk/models/custom_fields_list_response.py create mode 100644 bamboohr_sdk/models/custom_report_response.py create mode 100644 bamboohr_sdk/models/custom_report_response_fields_inner.py create mode 100644 bamboohr_sdk/models/dacd313af2106213fc4696175941ce65_request.py create mode 100644 bamboohr_sdk/models/data_request_aggregations.py create mode 100644 bamboohr_sdk/models/dataset_data_response_v2.py create mode 100644 bamboohr_sdk/models/dataset_data_response_v2_data_inner.py rename bamboohr_sdk/models/{employee_table_row_value_any_of_inner.py => dataset_data_response_v2_data_inner_fields_value.py} (69%) create mode 100644 bamboohr_sdk/models/dataset_data_response_v2_links.py create mode 100644 bamboohr_sdk/models/dataset_data_response_v2_meta.py rename bamboohr_sdk/models/{dataset_response.py => dataset_response_v1.py} (59%) create mode 100644 bamboohr_sdk/models/dataset_v1.py rename bamboohr_sdk/models/{datasets_response.py => datasets_response_v12.py} (57%) create mode 100644 bamboohr_sdk/models/datasets_response_v12_datasets_inner.py create mode 100644 bamboohr_sdk/models/delete_compensation_benchmark_source_request.py create mode 100644 bamboohr_sdk/models/delete_compensation_benchmark_source_response.py create mode 100644 bamboohr_sdk/models/details_and_currency_request_data_object.py create mode 100644 bamboohr_sdk/models/ec1ba8e76f33960b018d0d7518fe97b5_request.py create mode 100644 bamboohr_sdk/models/employee_cursor_pagination_query_object.py create mode 100644 bamboohr_sdk/models/employee_optional_field.py create mode 100644 bamboohr_sdk/models/employee_photo_json_response.py create mode 100644 bamboohr_sdk/models/employee_string_code_error_response_v1.py create mode 100644 bamboohr_sdk/models/employee_string_code_error_response_v1_error.py delete mode 100644 bamboohr_sdk/models/employee_table_row_value.py create mode 100644 bamboohr_sdk/models/employee_time_off_request_approver_response_inner.py create mode 100644 bamboohr_sdk/models/employee_verification_integration.py create mode 100644 bamboohr_sdk/models/employee_verification_integration_response.py create mode 100644 bamboohr_sdk/models/employee_verification_lifecycle_email_accepted_response.py create mode 100644 bamboohr_sdk/models/employee_verification_public_api_record.py create mode 100644 bamboohr_sdk/models/employee_verification_update_response.py create mode 100644 bamboohr_sdk/models/employee_verifications_list_response.py create mode 100644 bamboohr_sdk/models/employees_directory_json_response.py create mode 100644 bamboohr_sdk/models/employees_directory_json_response_fields_inner.py rename bamboohr_sdk/models/{xml_directory_employee.py => employees_directory_xml_response.py} (50%) rename bamboohr_sdk/models/{xml_directory_employee_employees.py => employees_directory_xml_response_employees.py} (56%) create mode 100644 bamboohr_sdk/models/employees_directory_xml_response_employees_employee_inner.py create mode 100644 bamboohr_sdk/models/employees_directory_xml_response_employees_employee_inner_field_inner.py rename bamboohr_sdk/models/{xml_directory_employee_fieldset.py => employees_directory_xml_response_fieldset.py} (56%) create mode 100644 bamboohr_sdk/models/employees_directory_xml_response_fieldset_field_inner.py rename bamboohr_sdk/models/{invalid_request.py => error_response.py} (57%) create mode 100644 bamboohr_sdk/models/error_response_error.py create mode 100644 bamboohr_sdk/models/f3883a522dadbe9e11b34f8b656e3adb_request.py delete mode 100644 bamboohr_sdk/models/field_list_fields_inner.py create mode 100644 bamboohr_sdk/models/field_options_transformer_id.py create mode 100644 bamboohr_sdk/models/forbidden_v1.py rename bamboohr_sdk/models/{bad_request_error.py => forbidden_v1_error.py} (58%) create mode 100644 bamboohr_sdk/models/get_break_policy_suggestions_request.py create mode 100644 bamboohr_sdk/models/get_company_report_response_employees_inner.py create mode 100644 bamboohr_sdk/models/get_data_from_dataset_v2_request.py create mode 100644 bamboohr_sdk/models/get_employee_response.py create mode 100644 bamboohr_sdk/models/get_employees_employee_base_response.py create mode 100644 bamboohr_sdk/models/get_employees_employee_response_all_of_overtime_rate.py create mode 100644 bamboohr_sdk/models/get_employees_employee_response_all_of_pay_rate.py create mode 100644 bamboohr_sdk/models/get_employees_employee_response_all_of_teams.py create mode 100644 bamboohr_sdk/models/global_holiday_global_holiday_v1.py delete mode 100644 bamboohr_sdk/models/goal.py create mode 100644 bamboohr_sdk/models/goal_response.py create mode 100644 bamboohr_sdk/models/holiday_bulk_insert_company_holiday_error_v1.py create mode 100644 bamboohr_sdk/models/holiday_bulk_insert_company_holiday_record_v1.py create mode 100644 bamboohr_sdk/models/holiday_bulk_insert_company_holidays_failure_response_v1.py create mode 100644 bamboohr_sdk/models/holiday_bulk_insert_company_holidays_response_v1.py create mode 100644 bamboohr_sdk/models/holiday_catalog_holiday_list_response_v1.py create mode 100644 bamboohr_sdk/models/holiday_catalog_holiday_list_response_v1_links.py create mode 100644 bamboohr_sdk/models/holiday_company_holiday_audience_v1.py create mode 100644 bamboohr_sdk/models/holiday_company_holiday_list_response_v1.py create mode 100644 bamboohr_sdk/models/holiday_company_holiday_list_response_v1_links.py create mode 100644 bamboohr_sdk/models/holiday_company_holiday_list_response_v1_meta.py rename bamboohr_sdk/models/{create_training_type_request_due_from_hire_date_one_of.py => holiday_company_holiday_pay_status_hours_v1.py} (53%) create mode 100644 bamboohr_sdk/models/holiday_company_holiday_v1.py create mode 100644 bamboohr_sdk/models/holiday_create_company_holiday_request_v1.py create mode 100644 bamboohr_sdk/models/holiday_update_company_holiday_request_v1.py create mode 100644 bamboohr_sdk/models/hour_entry_create_hour_entry_v1.py create mode 100644 bamboohr_sdk/models/hour_entry_patch_hour_entry_v1.py create mode 100644 bamboohr_sdk/models/import_compensation_benchmarks_response.py create mode 100644 bamboohr_sdk/models/industry.py create mode 100644 bamboohr_sdk/models/inline_object.py create mode 100644 bamboohr_sdk/models/inline_object1.py create mode 100644 bamboohr_sdk/models/inline_object1_employees_inner.py create mode 100644 bamboohr_sdk/models/inline_object1_status.py create mode 100644 bamboohr_sdk/models/inline_object2.py create mode 100644 bamboohr_sdk/models/inline_object2_inner.py delete mode 100644 bamboohr_sdk/models/invalid_request_error.py delete mode 100644 bamboohr_sdk/models/job_summary_hiring_lead.py delete mode 100644 bamboohr_sdk/models/json_directory_employee.py create mode 100644 bamboohr_sdk/models/legacy_report_field_map_response.py create mode 100644 bamboohr_sdk/models/legacy_report_field_map_response_mappings_inner.py create mode 100644 bamboohr_sdk/models/legacy_report_id_map_response.py create mode 100644 bamboohr_sdk/models/legacy_report_id_map_response_mappings_inner.py create mode 100644 bamboohr_sdk/models/levels_and_bands_column_map.py create mode 100644 bamboohr_sdk/models/levels_and_bands_group_status_counts.py create mode 100644 bamboohr_sdk/models/levels_and_bands_job_title_assignment.py create mode 100644 bamboohr_sdk/models/levels_and_bands_job_title_assignments_request.py create mode 100644 bamboohr_sdk/models/levels_and_bands_pay_band_value.py create mode 100644 bamboohr_sdk/models/levels_and_bands_upload_response.py create mode 100644 bamboohr_sdk/models/list_field_values_xml.py create mode 100644 bamboohr_sdk/models/list_field_values_xml_option_inner.py rename bamboohr_sdk/models/{application_details_applicant_education_level.py => list_value_view_object.py} (55%) create mode 100644 bamboohr_sdk/models/location_response_object.py create mode 100644 bamboohr_sdk/models/location_response_object_address.py create mode 100644 bamboohr_sdk/models/location_response_object_address_country.py create mode 100644 bamboohr_sdk/models/location_response_object_address_state.py create mode 100644 bamboohr_sdk/models/meta_company_properties_response.py create mode 100644 bamboohr_sdk/models/meta_currency_type_item.py create mode 100644 bamboohr_sdk/models/model1d1fc0f164cb51973a0206b8e2fb2d2d_request.py create mode 100644 bamboohr_sdk/models/model1d1fc0f164cb51973a0206b8e2fb2d2d_request_budget_breakdown_inner.py create mode 100644 bamboohr_sdk/models/model1d64402ee192568adbd5e3179a91e6e2_request_inner.py create mode 100644 bamboohr_sdk/models/model1d64402ee192568adbd5e3179a91e6e2_request_inner_budget_allocations.py create mode 100644 bamboohr_sdk/models/model288aa996aba16d7a495c62321ea999a9_request.py create mode 100644 bamboohr_sdk/models/model288aa996aba16d7a495c62321ea999a9_request_sent_date_time.py create mode 100644 bamboohr_sdk/models/model3958585c861325ea7a2cd30a8c74f042_request.py create mode 100644 bamboohr_sdk/models/model89a5068111ec499135c7d6e9a53d5a30_request.py rename bamboohr_sdk/models/{field_list.py => monitor_field_list.py} (57%) rename bamboohr_sdk/models/{datasets_response_datasets_inner.py => monitor_field_list_fields_inner.py} (54%) create mode 100644 bamboohr_sdk/models/new_hire_packet_gtky_answer_visibility_item.py create mode 100644 bamboohr_sdk/models/new_hire_packet_gtky_answer_visibility_request.py create mode 100644 bamboohr_sdk/models/new_hire_packet_gtky_answer_visibility_response.py create mode 100644 bamboohr_sdk/models/new_hire_packet_public_api.py create mode 100644 bamboohr_sdk/models/new_hire_packet_public_api_writable_body.py create mode 100644 bamboohr_sdk/models/new_hire_packets_list_response.py create mode 100644 bamboohr_sdk/models/new_hire_widget_item.py create mode 100644 bamboohr_sdk/models/new_hire_widget_response.py create mode 100644 bamboohr_sdk/models/onboarding_experience_public_api.py create mode 100644 bamboohr_sdk/models/onboarding_experiences_list_response.py create mode 100644 bamboohr_sdk/models/paged_location_response.py create mode 100644 bamboohr_sdk/models/patch_company_profile_company_information_request.py create mode 100644 bamboohr_sdk/models/patch_company_profile_company_information_request_address.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_configuration_status.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_configuration_status_job_titles.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_configuration_status_job_titles_warnings_inner.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_configuration_status_levels.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_configuration_status_levels_errors_inner.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_configuration_status_pay_bands.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_configuration_status_review.py rename bamboohr_sdk/models/{forbidden.py => pay_grades_and_bands_delete_groups_response.py} (61%) create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_delete_hierarchy_group.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_delete_hierarchy_job_title.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_delete_hierarchy_level.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_delete_level_response.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_delete_response.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_job_title_assignments_group.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_job_title_assignments_job_title.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_job_title_assignments_level.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_job_title_assignments_response.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_job_title_employee.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_job_title_with_employees.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_level.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_level_job_title.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_levels_group.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_levels_response.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_pay_band_job_title.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_pay_band_level.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_pay_bands_group.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_pay_bands_response.py rename bamboohr_sdk/models/{dataset.py => pay_grades_and_bands_publish_response.py} (59%) create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_published_group.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_published_job_title.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_published_level.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_published_response.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_review_group.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_review_job_title.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_review_level.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_review_response.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_save_levels_response.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_update_job_titles_response.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_update_level.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_update_levels_group.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_update_levels_request.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_update_pay_band_item.py create mode 100644 bamboohr_sdk/models/pay_grades_and_bands_update_pay_bands_response.py delete mode 100644 bamboohr_sdk/models/post_goal_request.py create mode 100644 bamboohr_sdk/models/problem_details_response_v2.py create mode 100644 bamboohr_sdk/models/project_create_time_tracking_project_task_v1.py create mode 100644 bamboohr_sdk/models/project_create_time_tracking_project_v1.py create mode 100644 bamboohr_sdk/models/project_create_time_tracking_project_v1_tasks_inner.py create mode 100644 bamboohr_sdk/models/project_legacy_error_response_v1.py create mode 100644 bamboohr_sdk/models/project_legacy_error_response_v1_error.py create mode 100644 bamboohr_sdk/models/project_paginated_response_data_v1.py create mode 100644 bamboohr_sdk/models/project_paginated_response_data_v1_meta.py create mode 100644 bamboohr_sdk/models/project_paginated_tasks_response_v1.py create mode 100644 bamboohr_sdk/models/project_paginated_tasks_response_v1_links.py create mode 100644 bamboohr_sdk/models/project_paginated_tasks_response_v1_meta.py create mode 100644 bamboohr_sdk/models/project_paginated_time_tracking_projects_response_v1.py create mode 100644 bamboohr_sdk/models/project_standard_api_error_response_v1.py create mode 100644 bamboohr_sdk/models/project_time_tracking_project_v1.py create mode 100644 bamboohr_sdk/models/project_time_tracking_task_v1.py create mode 100644 bamboohr_sdk/models/project_update_time_tracking_project_task_v1.py create mode 100644 bamboohr_sdk/models/project_update_time_tracking_project_v1.py create mode 100644 bamboohr_sdk/models/province_item.py create mode 100644 bamboohr_sdk/models/public_custom_field_types_response.py create mode 100644 bamboohr_sdk/models/public_list_values_custom_field_settings_response.py create mode 100644 bamboohr_sdk/models/public_list_values_custom_field_settings_response_values_inner.py create mode 100644 bamboohr_sdk/models/put_company_industry_codes_request.py create mode 100644 bamboohr_sdk/models/put_company_profile_display_name_request.py delete mode 100644 bamboohr_sdk/models/put_goal_v11_request.py create mode 100644 bamboohr_sdk/models/remove_cycle_admin_self_response.py create mode 100644 bamboohr_sdk/models/remove_total_rewards_employees_request.py create mode 100644 bamboohr_sdk/models/save_change_comm_template_response.py create mode 100644 bamboohr_sdk/models/scheduling_create_schedule_request_v1.py create mode 100644 bamboohr_sdk/models/scheduling_create_scheduling_shift_request_v1.py create mode 100644 bamboohr_sdk/models/scheduling_publish_shifts_failure_v1.py create mode 100644 bamboohr_sdk/models/scheduling_publish_shifts_request.py create mode 100644 bamboohr_sdk/models/scheduling_publish_shifts_result_v1.py create mode 100644 bamboohr_sdk/models/scheduling_schedule_list_response_v1.py create mode 100644 bamboohr_sdk/models/scheduling_schedule_list_response_v1_links.py create mode 100644 bamboohr_sdk/models/scheduling_schedule_list_response_v1_meta.py create mode 100644 bamboohr_sdk/models/scheduling_schedule_v1.py create mode 100644 bamboohr_sdk/models/scheduling_scheduling_shift_assessment_v1.py create mode 100644 bamboohr_sdk/models/scheduling_scheduling_shift_assessment_violation_v1.py create mode 100644 bamboohr_sdk/models/scheduling_scheduling_shift_v1.py create mode 100644 bamboohr_sdk/models/scheduling_shift_assessment_list_response_v1.py create mode 100644 bamboohr_sdk/models/scheduling_shift_assessment_list_response_v1_meta.py create mode 100644 bamboohr_sdk/models/scheduling_shift_list_response_v1.py create mode 100644 bamboohr_sdk/models/scheduling_shift_list_response_v1_links.py create mode 100644 bamboohr_sdk/models/scheduling_shift_list_response_v1_links_next.py create mode 100644 bamboohr_sdk/models/scheduling_shift_list_response_v1_links_prev.py create mode 100644 bamboohr_sdk/models/scheduling_shift_list_response_v1_meta.py create mode 100644 bamboohr_sdk/models/scheduling_timezone_list_response_v1.py create mode 100644 bamboohr_sdk/models/scheduling_timezone_list_response_v1_meta.py create mode 100644 bamboohr_sdk/models/scheduling_timezone_v1.py create mode 100644 bamboohr_sdk/models/scheduling_update_schedule_request_v1.py create mode 100644 bamboohr_sdk/models/scheduling_update_scheduling_shift_request_v1.py create mode 100644 bamboohr_sdk/models/send_employee_verification_lifecycle_email_by_user_request.py create mode 100644 bamboohr_sdk/models/send_recommendations_response.py create mode 100644 bamboohr_sdk/models/set_total_rewards_custom_disclaimer_request.py create mode 100644 bamboohr_sdk/models/set_total_rewards_onboarding_step_request.py create mode 100644 bamboohr_sdk/models/shift_differential_create_time_tracking_shift_differential_v1.py create mode 100644 bamboohr_sdk/models/shift_differential_create_time_tracking_shift_differential_v1_times_inner.py create mode 100644 bamboohr_sdk/models/shift_differential_paginated_response_data_v1.py create mode 100644 bamboohr_sdk/models/shift_differential_paginated_response_data_v1_meta.py create mode 100644 bamboohr_sdk/models/shift_differential_paginated_time_tracking_shift_differentials_response_v1.py create mode 100644 bamboohr_sdk/models/shift_differential_time_tracking_shift_differential_time_v1.py create mode 100644 bamboohr_sdk/models/shift_differential_time_tracking_shift_differential_v1.py create mode 100644 bamboohr_sdk/models/shift_differential_update_time_tracking_shift_differential_v1.py create mode 100644 bamboohr_sdk/models/standard_api_error_response.py create mode 100644 bamboohr_sdk/models/time_tracking_break_policy_suggestions_response_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_break_policy_suggestions_response_v1_suggested_policies_inner.py create mode 100644 bamboohr_sdk/models/time_tracking_break_policy_suggestions_response_v1_suggested_policies_inner_breaks_inner.py create mode 100644 bamboohr_sdk/models/time_tracking_bulk_upsert_employee_time_tracking_data_accepted_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_bulk_upsert_employee_time_tracking_data_record_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_clock_entry_location_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_clock_entry_paginated_response_data_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_clock_entry_paginated_response_data_v1_meta.py create mode 100644 bamboohr_sdk/models/time_tracking_clock_entry_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_configuration_paginated_response_data_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_configuration_paginated_response_data_v1_links.py create mode 100644 bamboohr_sdk/models/time_tracking_configuration_paginated_response_data_v1_links_next.py create mode 100644 bamboohr_sdk/models/time_tracking_configuration_paginated_response_data_v1_links_prev.py create mode 100644 bamboohr_sdk/models/time_tracking_configuration_paginated_response_data_v1_meta.py create mode 100644 bamboohr_sdk/models/time_tracking_create_clock_in_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_create_clock_out_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_create_time_tracking_configuration_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_employee_enrollment_paginated_response_data_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_employee_time_tracking_data_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_hour_entry_paginated_response_data_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_hour_entry_v1.py delete mode 100644 bamboohr_sdk/models/time_tracking_offset_paginated_response_data_v1_links_next.py delete mode 100644 bamboohr_sdk/models/time_tracking_offset_paginated_response_data_v1_links_prev.py create mode 100644 bamboohr_sdk/models/time_tracking_page_paginated_response_data_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_paginated_clock_entries_response_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_paginated_employee_time_tracking_data_response_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_paginated_hour_entries_response_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_paginated_time_tracking_configurations_response_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_paginated_time_tracking_kiosks_response_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_paginated_time_tracking_time_clocks_response_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_paginated_timesheets_response_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_paginated_timesheets_response_v1_meta.py delete mode 100644 bamboohr_sdk/models/time_tracking_record_schema_project.py create mode 100644 bamboohr_sdk/models/time_tracking_time_tracking_configuration_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_time_tracking_hour_entry_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_time_tracking_kiosk_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_time_tracking_time_clock_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_timesheet_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_update_clock_entry_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_update_employee_time_tracking_data_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_update_time_tracking_configuration_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_update_time_tracking_kiosk_v1.py create mode 100644 bamboohr_sdk/models/time_tracking_update_time_tracking_time_clock_v1.py create mode 100644 bamboohr_sdk/models/timesheet_timesheet_daily_entry_v1.py create mode 100644 bamboohr_sdk/models/timesheet_timesheet_daily_summary_v1.py create mode 100644 bamboohr_sdk/models/total_rewards_benefit_details_values.py create mode 100644 bamboohr_sdk/models/total_rewards_benefit_section_values.py create mode 100644 bamboohr_sdk/models/total_rewards_calendar_section_values.py create mode 100644 bamboohr_sdk/models/total_rewards_comp_summary_values.py create mode 100644 bamboohr_sdk/models/total_rewards_custom_disclaimer_info.py create mode 100644 bamboohr_sdk/models/total_rewards_employee_statement.py create mode 100644 bamboohr_sdk/models/total_rewards_equity_details_values.py create mode 100644 bamboohr_sdk/models/total_rewards_equity_estimated_valuation_values.py create mode 100644 bamboohr_sdk/models/total_rewards_equity_growth_chart_item.py create mode 100644 bamboohr_sdk/models/total_rewards_equity_growth_estimation.py create mode 100644 bamboohr_sdk/models/total_rewards_equity_section_values.py create mode 100644 bamboohr_sdk/models/total_rewards_extra_pay_details_values.py create mode 100644 bamboohr_sdk/models/total_rewards_extra_pay_section_values.py create mode 100644 bamboohr_sdk/models/total_rewards_holiday_value.py create mode 100644 bamboohr_sdk/models/total_rewards_onboarding_step.py create mode 100644 bamboohr_sdk/models/total_rewards_overview_section_values.py create mode 100644 bamboohr_sdk/models/total_rewards_time_off_policy_value.py create mode 100644 bamboohr_sdk/models/total_rewards_timeline_item.py create mode 100644 bamboohr_sdk/models/total_rewards_timeline_item_label.py create mode 100644 bamboohr_sdk/models/total_rewards_timeline_section_values.py delete mode 100644 bamboohr_sdk/models/training_type_due_from_hire_date.py delete mode 100644 bamboohr_sdk/models/training_type_due_from_hire_date_one_of.py delete mode 100644 bamboohr_sdk/models/transformed_api_goal_actions.py create mode 100644 bamboohr_sdk/models/unarchive_custom_fields_request.py create mode 100644 bamboohr_sdk/models/unarchive_custom_fields_response.py create mode 100644 bamboohr_sdk/models/update_company_industry_codes400_response.py create mode 100644 bamboohr_sdk/models/update_company_industry_codes403_response.py create mode 100644 bamboohr_sdk/models/update_company_industry_codes404_response.py create mode 100644 bamboohr_sdk/models/update_company_industry_codes500_response.py create mode 100644 bamboohr_sdk/models/update_company_industry_codes_response.py create mode 100644 bamboohr_sdk/models/update_company_name_bad_request_response.py create mode 100644 bamboohr_sdk/models/update_company_name_bad_request_response_error.py create mode 100644 bamboohr_sdk/models/update_company_name_forbidden_response.py create mode 100644 bamboohr_sdk/models/update_company_name_forbidden_response_error.py create mode 100644 bamboohr_sdk/models/update_company_name_internal_error_response.py create mode 100644 bamboohr_sdk/models/update_company_name_success_response.py create mode 100644 bamboohr_sdk/models/update_compensation_benchmark_request.py create mode 100644 bamboohr_sdk/models/update_compensation_benchmark_source_item.py create mode 100644 bamboohr_sdk/models/update_compensation_benchmark_sources_request.py create mode 100644 bamboohr_sdk/models/update_compensation_benchmark_sources_response.py create mode 100644 bamboohr_sdk/models/update_employee_verification_integration_request.py create mode 100644 bamboohr_sdk/models/update_employee_verification_request.py rename bamboohr_sdk/models/{put_goal_comment_request.py => update_goal_comment_request.py} (62%) rename bamboohr_sdk/models/{put_goal_milestone_progress_request.py => update_goal_milestone_progress_request.py} (61%) rename bamboohr_sdk/models/{put_goal_progress_request.py => update_goal_progress_request.py} (55%) rename bamboohr_sdk/models/{put_goal_shared_with_request.py => update_goal_sharing_request.py} (58%) create mode 100644 bamboohr_sdk/models/update_goal_v1.py create mode 100644 bamboohr_sdk/models/update_goal_v11_request.py create mode 100644 bamboohr_sdk/models/update_goal_v11_request_milestones_inner.py create mode 100644 bamboohr_sdk/models/update_location_request.py create mode 100644 bamboohr_sdk/models/update_location_request_address.py create mode 100644 bamboohr_sdk/models/update_pay_bands_request.py create mode 100644 bamboohr_sdk/models/updated_compensation_benchmark.py create mode 100644 bamboohr_sdk/models/updated_compensation_benchmark_saved_benchmark.py create mode 100644 bamboohr_sdk/models/upload_employee_photo_request1.py create mode 100644 bamboohr_sdk/models/user_permission_data.py create mode 100644 bamboohr_sdk/models/whos_out_list_response_v1.py create mode 100644 bamboohr_sdk/models/whos_out_list_response_v1_links.py create mode 100644 bamboohr_sdk/models/whos_out_list_response_v1_links_next.py create mode 100644 bamboohr_sdk/models/whos_out_list_response_v1_links_prev.py create mode 100644 bamboohr_sdk/models/whos_out_list_response_v1_meta.py create mode 100644 bamboohr_sdk/models/whos_out_person_v1.py create mode 100644 bamboohr_sdk/models/whos_out_v1.py delete mode 100644 bamboohr_sdk/models/xml_directory_employee_employees_employee_inner.py delete mode 100644 bamboohr_sdk/models/xml_directory_employee_fieldset_field_inner.py create mode 100644 docs/A05b6d5f564f805d688ff2c1e37c3990Request.md create mode 100644 docs/AddCustomFieldListValueRequest.md create mode 100644 docs/AddCustomFieldListValueResponse.md create mode 100644 docs/AddCustomFieldListValueResponseOneOfInner.md create mode 100644 docs/AddCycleAdminsResponse.md create mode 100644 docs/AddCycleAdminsResponseAddedInner.md create mode 100644 docs/AddCycleAdminsResponseSkippedInner.md create mode 100644 docs/AddTotalRewardsEmployeesRequest.md create mode 100644 docs/AlertConfigurationV1.md create mode 100644 docs/AlertConfigurationWriteV1.md create mode 100644 docs/AlertTemplateListResponseV1.md create mode 100644 docs/AlertTemplateListResponseV1AlertsInner.md create mode 100644 docs/AlertsApi.md delete mode 100644 docs/ApplicationDetailsApplicantAddress.md delete mode 100644 docs/ApplicationDetailsApplicantEducation.md delete mode 100644 docs/ApplicationDetailsApplicantEducationLevel.md delete mode 100644 docs/ApplicationDetailsJobHiringLead.md delete mode 100644 docs/ApplicationDetailsJobHiringLeadJobTitle.md delete mode 100644 docs/ApplicationDetailsStatusChangedByUser.md delete mode 100644 docs/ApplicationDetailsStatusChangedByUserJobTitle.md create mode 100644 docs/ApproveTimesheetRequest.md create mode 100644 docs/ArchiveCustomFieldResponse.md create mode 100644 docs/ArchivedCustomFieldsListResponse.md delete mode 100644 docs/AssignTimeOffPoliciesRequestInner.md create mode 100644 docs/AssignTimeOffPoliciesV1RequestInner.md create mode 100644 docs/BadRequestV1.md create mode 100644 docs/BadRequestV1Error.md create mode 100644 docs/BankHoliday.md create mode 100644 docs/BudgetBreakdownImportResponse.md create mode 100644 docs/BudgetGuidelinesView.md create mode 100644 docs/BudgetGuidelinesWarnings.md create mode 100644 docs/C79f9c5950f983e59d2626faa30c00a1Request.md create mode 100644 docs/C7c32ed5278ac67e2e518bf7484a75dcRequest.md create mode 100644 docs/CalendarAnniversaryCalendarEventV1.md create mode 100644 docs/CalendarBirthdayCalendarEventV1.md create mode 100644 docs/CalendarCalendarEventPersonV1.md create mode 100644 docs/CalendarCalendarEventsListResponseV1.md create mode 100644 docs/CalendarCalendarEventsListResponseV1DataInner.md create mode 100644 docs/CalendarCalendarEventsListResponseV1Links.md create mode 100644 docs/CalendarCalendarEventsListResponseV1LinksNext.md create mode 100644 docs/CalendarCalendarEventsListResponseV1LinksPrev.md create mode 100644 docs/CalendarCalendarEventsListResponseV1Meta.md create mode 100644 docs/CalendarEventsApi.md create mode 100644 docs/CalendarHolidayCalendarEventV1.md create mode 100644 docs/CalendarTimeOffCalendarEventV1.md create mode 100644 docs/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md create mode 100644 docs/ChangeCustomFieldListValueRequest.md create mode 100644 docs/ChangeTrackingApi.md create mode 100644 docs/ClockEntryClockEntryLocationInputV1.md create mode 100644 docs/ClockEntryCreateClockEntryV1.md create mode 100644 docs/CloseGoalRequest.md create mode 100644 docs/CompanyApi.md create mode 100644 docs/CompanyIndustryDataObject.md create mode 100644 docs/CompanyProfileData.md create mode 100644 docs/CompanyProfileDataAddress.md create mode 100644 docs/CompensationApi.md create mode 100644 docs/CompensationBenchmarkDetailEmployee.md create mode 100644 docs/CompensationBenchmarkDetailEmployeeJobTitle.md create mode 100644 docs/CompensationBenchmarkDetailEmployeeSalary.md create mode 100644 docs/CompensationBenchmarkDetails.md create mode 100644 docs/CompensationBenchmarkDetailsBenchmarkValuesInner.md create mode 100644 docs/CompensationBenchmarkJobLocationEmployee.md create mode 100644 docs/CompensationBenchmarkJobLocationEmployeeSalary.md create mode 100644 docs/CompensationBenchmarkJobLocationPair.md create mode 100644 docs/CompensationBenchmarkJobLocationPairJobDetails.md create mode 100644 docs/CompensationBenchmarkOverview.md create mode 100644 docs/CompensationBenchmarkOverviewValues.md create mode 100644 docs/CompensationBenchmarkSource.md create mode 100644 docs/CompensationBenchmarkingApi.md create mode 100644 docs/CompensationBenchmarkingColumnMap.md create mode 100644 docs/CompensationBenchmarksList.md create mode 100644 docs/CompensationEquitySettingsResponse.md create mode 100644 docs/CompensationEquitySettingsResponseCompanyValuation.md create mode 100644 docs/CompensationEquitySettingsResponseDisclaimers.md create mode 100644 docs/CompensationEquitySettingsResponseOutstandingShares.md create mode 100644 docs/CompensationEquitySettingsResponsePricePerShare.md create mode 100644 docs/CompensationEquitySettingsResponseSliderMin.md create mode 100644 docs/CompensationEquitySettingsResponseVestingConditions.md create mode 100644 docs/CompensationEquitySettingsUpdateRequest.md create mode 100644 docs/CompensationPlanningApi.md create mode 100644 docs/CompensationPlanningCycleAdminsResponse.md create mode 100644 docs/CompensationPlanningCycleAdminsResponseAdminsInner.md create mode 100644 docs/CompensationPlanningCycleCompleteResponse.md create mode 100644 docs/CompensationPlanningCycleCompleteResponseErrorsInner.md create mode 100644 docs/CompensationToolsDataObject.md create mode 100644 docs/CompensationToolsResponse.md create mode 100644 docs/CompensationUpsellData.md create mode 100644 docs/CompletedQuestionsAndResponseDataObject.md create mode 100644 docs/ConversionRateDataObject.md create mode 100644 docs/CountriesOptionsResponse.md create mode 100644 docs/CreateCompensationBenchmarkRequest.md create mode 100644 docs/CreateCompensationBenchmarkSourceRequest.md create mode 100644 docs/CreateGoalCommentRequest.md create mode 100644 docs/CreateGoalRequest.md create mode 100644 docs/CreateGoalRequestMilestonesInner.md create mode 100644 docs/CreateLocationRequest.md create mode 100644 docs/CreateLocationRequestAddress.md delete mode 100644 docs/CreateTrainingTypeRequestDueFromHireDate.md delete mode 100644 docs/CreateTrainingTypeRequestDueFromHireDateOneOf.md create mode 100644 docs/CreatedCompensationBenchmark.md create mode 100644 docs/CreatedCompensationBenchmarkSavedBenchmark.md create mode 100644 docs/CreatedCompensationBenchmarkSource.md create mode 100644 docs/CreatedTimeOffRequest.md create mode 100644 docs/CreatedTimeOffRequestAmount.md create mode 100644 docs/CreatedTimeOffRequestNotes.md create mode 100644 docs/CreatedTimeOffRequestStatus.md create mode 100644 docs/CreatedTimeOffRequestType.md create mode 100644 docs/CurrencyConversionsResponse.md create mode 100644 docs/CustomFieldDefinitionResponseObject.md create mode 100644 docs/CustomFieldDefinitionResponseObjectValuesInner.md create mode 100644 docs/CustomFieldRequest.md create mode 100644 docs/CustomFieldTypeViewObject.md create mode 100644 docs/CustomFieldViewObject.md create mode 100644 docs/CustomFieldsApi.md create mode 100644 docs/CustomFieldsListResponse.md create mode 100644 docs/CustomReportResponse.md create mode 100644 docs/CustomReportResponseFieldsInner.md create mode 100644 docs/Dacd313af2106213fc4696175941ce65Request.md create mode 100644 docs/DataRequestAggregations.md delete mode 100644 docs/DataRequestAggregationsInner.md delete mode 100644 docs/Dataset.md create mode 100644 docs/DatasetDataResponseV2.md create mode 100644 docs/DatasetDataResponseV2DataInner.md create mode 100644 docs/DatasetDataResponseV2DataInnerFieldsValue.md create mode 100644 docs/DatasetDataResponseV2Links.md create mode 100644 docs/DatasetDataResponseV2Meta.md delete mode 100644 docs/DatasetResponse.md create mode 100644 docs/DatasetResponseV1.md create mode 100644 docs/DatasetV1.md delete mode 100644 docs/DatasetsResponse.md delete mode 100644 docs/DatasetsResponseDatasetsInner.md create mode 100644 docs/DatasetsResponseV12.md create mode 100644 docs/DatasetsResponseV12DatasetsInner.md create mode 100644 docs/DeleteCompensationBenchmarkSourceRequest.md create mode 100644 docs/DeleteCompensationBenchmarkSourceResponse.md create mode 100644 docs/DetailsAndCurrencyRequestDataObject.md create mode 100644 docs/Ec1ba8e76f33960b018d0d7518fe97b5Request.md rename docs/{CursorPaginationQueryObject.md => EmployeeCursorPaginationQueryObject.md} (52%) create mode 100644 docs/EmployeeOptionalField.md create mode 100644 docs/EmployeePhotoJsonResponse.md create mode 100644 docs/EmployeeStringCodeErrorResponseV1.md create mode 100644 docs/EmployeeStringCodeErrorResponseV1Error.md delete mode 100644 docs/EmployeeTableRowValue.md delete mode 100644 docs/EmployeeTableRowValueAnyOfInner.md rename docs/{TabularDataApi.md => EmployeeTablesApi.md} (68%) create mode 100644 docs/EmployeeTimeOffRequestApproverResponseInner.md create mode 100644 docs/EmployeeVerificationApi.md create mode 100644 docs/EmployeeVerificationIntegration.md create mode 100644 docs/EmployeeVerificationIntegrationResponse.md create mode 100644 docs/EmployeeVerificationLifecycleEmailAcceptedResponse.md create mode 100644 docs/EmployeeVerificationPublicApiRecord.md create mode 100644 docs/EmployeeVerificationUpdateResponse.md create mode 100644 docs/EmployeeVerificationsListResponse.md create mode 100644 docs/EmployeesDirectoryJsonResponse.md create mode 100644 docs/EmployeesDirectoryJsonResponseFieldsInner.md create mode 100644 docs/EmployeesDirectoryXmlResponse.md create mode 100644 docs/EmployeesDirectoryXmlResponseEmployees.md create mode 100644 docs/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.md create mode 100644 docs/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.md create mode 100644 docs/EmployeesDirectoryXmlResponseFieldset.md create mode 100644 docs/EmployeesDirectoryXmlResponseFieldsetFieldInner.md create mode 100644 docs/ErrorResponse.md create mode 100644 docs/ErrorResponseError.md create mode 100644 docs/F3883a522dadbe9e11b34f8b656e3adbRequest.md delete mode 100644 docs/FieldList.md delete mode 100644 docs/FieldListFieldsInner.md create mode 100644 docs/FieldOptionsTransformerId.md create mode 100644 docs/ForbiddenV1.md rename docs/{BadRequestError.md => ForbiddenV1Error.md} (53%) create mode 100644 docs/GetBreakPolicySuggestionsRequest.md create mode 100644 docs/GetCompanyReportResponseEmployeesInner.md create mode 100644 docs/GetDataFromDatasetV2Request.md create mode 100644 docs/GetEmployeeResponse.md create mode 100644 docs/GetEmployeesEmployeeBaseResponse.md create mode 100644 docs/GetEmployeesEmployeeResponseAllOfOvertimeRate.md create mode 100644 docs/GetEmployeesEmployeeResponseAllOfPayRate.md create mode 100644 docs/GetEmployeesEmployeeResponseAllOfTeams.md create mode 100644 docs/GlobalHolidayGlobalHolidayV1.md delete mode 100644 docs/Goal.md create mode 100644 docs/GoalResponse.md create mode 100644 docs/HolidayBulkInsertCompanyHolidayErrorV1.md create mode 100644 docs/HolidayBulkInsertCompanyHolidayRecordV1.md create mode 100644 docs/HolidayBulkInsertCompanyHolidaysFailureResponseV1.md create mode 100644 docs/HolidayBulkInsertCompanyHolidaysResponseV1.md create mode 100644 docs/HolidayCatalogHolidayListResponseV1.md create mode 100644 docs/HolidayCatalogHolidayListResponseV1Links.md create mode 100644 docs/HolidayCompanyHolidayAudienceV1.md create mode 100644 docs/HolidayCompanyHolidayListResponseV1.md create mode 100644 docs/HolidayCompanyHolidayListResponseV1Links.md create mode 100644 docs/HolidayCompanyHolidayListResponseV1Meta.md create mode 100644 docs/HolidayCompanyHolidayPayStatusHoursV1.md create mode 100644 docs/HolidayCompanyHolidayV1.md create mode 100644 docs/HolidayCreateCompanyHolidayRequestV1.md create mode 100644 docs/HolidayUpdateCompanyHolidayRequestV1.md create mode 100644 docs/HolidaysApi.md create mode 100644 docs/HourEntryCreateHourEntryV1.md create mode 100644 docs/HourEntryPatchHourEntryV1.md create mode 100644 docs/ImportCompensationBenchmarksResponse.md rename docs/{Forbidden.md => Industry.md} (50%) rename docs/{BadRequest.md => InlineObject.md} (50%) create mode 100644 docs/InlineObject1.md create mode 100644 docs/InlineObject1EmployeesInner.md create mode 100644 docs/InlineObject1Status.md create mode 100644 docs/InlineObject2.md create mode 100644 docs/InlineObject2Inner.md delete mode 100644 docs/InvalidRequest.md delete mode 100644 docs/InvalidRequestError.md delete mode 100644 docs/JobSummaryDepartment.md delete mode 100644 docs/JobSummaryHiringLead.md delete mode 100644 docs/JobSummaryLocation.md delete mode 100644 docs/JsonDirectoryEmployee.md delete mode 100644 docs/JsonDirectoryEmployeeFieldsInner.md delete mode 100644 docs/LastChangeInformationApi.md create mode 100644 docs/LegacyReportFieldMapResponse.md create mode 100644 docs/LegacyReportFieldMapResponseMappingsInner.md create mode 100644 docs/LegacyReportIDMapResponse.md create mode 100644 docs/LegacyReportIDMapResponseMappingsInner.md create mode 100644 docs/LevelsAndBandsColumnMap.md create mode 100644 docs/LevelsAndBandsGroupStatusCounts.md create mode 100644 docs/LevelsAndBandsJobTitleAssignment.md create mode 100644 docs/LevelsAndBandsJobTitleAssignmentsRequest.md create mode 100644 docs/LevelsAndBandsPayBandValue.md create mode 100644 docs/LevelsAndBandsUploadResponse.md create mode 100644 docs/ListFieldValuesXml.md create mode 100644 docs/ListFieldValuesXmlOptionInner.md create mode 100644 docs/ListValueViewObject.md create mode 100644 docs/LocationResponseObject.md create mode 100644 docs/LocationResponseObjectAddress.md create mode 100644 docs/LocationResponseObjectAddressCountry.md create mode 100644 docs/LocationResponseObjectAddressState.md create mode 100644 docs/LocationsApi.md create mode 100644 docs/MealRestBreaksApi.md create mode 100644 docs/MetaCompanyPropertiesResponse.md create mode 100644 docs/MetaCurrencyTypeItem.md create mode 100644 docs/Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md create mode 100644 docs/Model1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.md create mode 100644 docs/Model1d64402ee192568adbd5e3179a91e6e2RequestInner.md create mode 100644 docs/Model1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.md create mode 100644 docs/Model288aa996aba16d7a495c62321ea999a9Request.md create mode 100644 docs/Model288aa996aba16d7a495c62321ea999a9RequestSentDateTime.md create mode 100644 docs/Model3958585c861325ea7a2cd30a8c74f042Request.md create mode 100644 docs/Model89a5068111ec499135c7d6e9a53d5a30Request.md create mode 100644 docs/MonitorFieldList.md create mode 100644 docs/MonitorFieldListFieldsInner.md create mode 100644 docs/NewHirePacketGtkyAnswerVisibilityItem.md create mode 100644 docs/NewHirePacketGtkyAnswerVisibilityRequest.md create mode 100644 docs/NewHirePacketGtkyAnswerVisibilityResponse.md create mode 100644 docs/NewHirePacketPublicApi.md create mode 100644 docs/NewHirePacketPublicApiWritableBody.md create mode 100644 docs/NewHirePacketsListResponse.md create mode 100644 docs/NewHireWidgetItem.md create mode 100644 docs/NewHireWidgetResponse.md create mode 100644 docs/OnboardingApi.md create mode 100644 docs/OnboardingExperiencePublicApi.md create mode 100644 docs/OnboardingExperiencesListResponse.md create mode 100644 docs/PagedLocationResponse.md create mode 100644 docs/PatchCompanyProfileCompanyInformationRequest.md create mode 100644 docs/PatchCompanyProfileCompanyInformationRequestAddress.md create mode 100644 docs/PayGradesAndBandsConfigurationStatus.md create mode 100644 docs/PayGradesAndBandsConfigurationStatusJobTitles.md create mode 100644 docs/PayGradesAndBandsConfigurationStatusJobTitlesWarningsInner.md create mode 100644 docs/PayGradesAndBandsConfigurationStatusLevels.md create mode 100644 docs/PayGradesAndBandsConfigurationStatusLevelsErrorsInner.md create mode 100644 docs/PayGradesAndBandsConfigurationStatusPayBands.md create mode 100644 docs/PayGradesAndBandsConfigurationStatusReview.md create mode 100644 docs/PayGradesAndBandsDeleteGroupsResponse.md create mode 100644 docs/PayGradesAndBandsDeleteHierarchyGroup.md create mode 100644 docs/PayGradesAndBandsDeleteHierarchyJobTitle.md create mode 100644 docs/PayGradesAndBandsDeleteHierarchyLevel.md create mode 100644 docs/PayGradesAndBandsDeleteLevelResponse.md create mode 100644 docs/PayGradesAndBandsDeleteResponse.md create mode 100644 docs/PayGradesAndBandsJobTitleAssignmentsGroup.md create mode 100644 docs/PayGradesAndBandsJobTitleAssignmentsJobTitle.md create mode 100644 docs/PayGradesAndBandsJobTitleAssignmentsLevel.md create mode 100644 docs/PayGradesAndBandsJobTitleAssignmentsResponse.md create mode 100644 docs/PayGradesAndBandsJobTitleEmployee.md create mode 100644 docs/PayGradesAndBandsJobTitleWithEmployees.md create mode 100644 docs/PayGradesAndBandsLevel.md create mode 100644 docs/PayGradesAndBandsLevelJobTitle.md create mode 100644 docs/PayGradesAndBandsLevelsGroup.md create mode 100644 docs/PayGradesAndBandsLevelsResponse.md create mode 100644 docs/PayGradesAndBandsPayBandJobTitle.md create mode 100644 docs/PayGradesAndBandsPayBandLevel.md create mode 100644 docs/PayGradesAndBandsPayBandsGroup.md create mode 100644 docs/PayGradesAndBandsPayBandsResponse.md create mode 100644 docs/PayGradesAndBandsPublishResponse.md create mode 100644 docs/PayGradesAndBandsPublishedGroup.md create mode 100644 docs/PayGradesAndBandsPublishedJobTitle.md create mode 100644 docs/PayGradesAndBandsPublishedLevel.md create mode 100644 docs/PayGradesAndBandsPublishedResponse.md create mode 100644 docs/PayGradesAndBandsReviewGroup.md create mode 100644 docs/PayGradesAndBandsReviewJobTitle.md create mode 100644 docs/PayGradesAndBandsReviewLevel.md create mode 100644 docs/PayGradesAndBandsReviewResponse.md create mode 100644 docs/PayGradesAndBandsSaveLevelsResponse.md create mode 100644 docs/PayGradesAndBandsUpdateJobTitlesResponse.md create mode 100644 docs/PayGradesAndBandsUpdateLevel.md create mode 100644 docs/PayGradesAndBandsUpdateLevelsGroup.md create mode 100644 docs/PayGradesAndBandsUpdateLevelsRequest.md create mode 100644 docs/PayGradesAndBandsUpdatePayBandItem.md create mode 100644 docs/PayGradesAndBandsUpdatePayBandsResponse.md create mode 100644 docs/PayGradesBandsApi.md delete mode 100644 docs/PostGoalCommentRequest.md delete mode 100644 docs/PostGoalRequest.md delete mode 100644 docs/PostGoalRequestMilestonesInner.md create mode 100644 docs/ProblemDetailsResponseV2.md create mode 100644 docs/ProjectCreateTimeTrackingProjectTaskV1.md create mode 100644 docs/ProjectCreateTimeTrackingProjectV1.md create mode 100644 docs/ProjectCreateTimeTrackingProjectV1TasksInner.md delete mode 100644 docs/ProjectInfoApiTransformerTask.md create mode 100644 docs/ProjectLegacyErrorResponseV1.md create mode 100644 docs/ProjectLegacyErrorResponseV1Error.md create mode 100644 docs/ProjectPaginatedResponseDataV1.md create mode 100644 docs/ProjectPaginatedResponseDataV1Meta.md create mode 100644 docs/ProjectPaginatedTasksResponseV1.md create mode 100644 docs/ProjectPaginatedTasksResponseV1Links.md create mode 100644 docs/ProjectPaginatedTasksResponseV1Meta.md create mode 100644 docs/ProjectPaginatedTimeTrackingProjectsResponseV1.md create mode 100644 docs/ProjectStandardApiErrorResponseV1.md create mode 100644 docs/ProjectTimeTrackingProjectV1.md create mode 100644 docs/ProjectTimeTrackingTaskV1.md create mode 100644 docs/ProjectUpdateTimeTrackingProjectTaskV1.md create mode 100644 docs/ProjectUpdateTimeTrackingProjectV1.md create mode 100644 docs/ProvinceItem.md create mode 100644 docs/PublicCustomFieldTypesResponse.md create mode 100644 docs/PublicListValuesCustomFieldSettingsResponse.md create mode 100644 docs/PublicListValuesCustomFieldSettingsResponseValuesInner.md create mode 100644 docs/PutCompanyIndustryCodesRequest.md create mode 100644 docs/PutCompanyProfileDisplayNameRequest.md delete mode 100644 docs/PutGoalCommentRequest.md delete mode 100644 docs/PutGoalMilestoneProgressRequest.md delete mode 100644 docs/PutGoalProgressRequest.md delete mode 100644 docs/PutGoalSharedWithRequest.md delete mode 100644 docs/PutGoalV11Request.md delete mode 100644 docs/PutGoalV11RequestMilestonesInner.md create mode 100644 docs/RemoveCycleAdminSelfResponse.md create mode 100644 docs/RemoveTotalRewardsEmployeesRequest.md create mode 100644 docs/SaveChangeCommTemplateResponse.md create mode 100644 docs/SchedulingApi.md create mode 100644 docs/SchedulingCreateScheduleRequestV1.md create mode 100644 docs/SchedulingCreateSchedulingShiftRequestV1.md create mode 100644 docs/SchedulingPublishShiftsFailureV1.md create mode 100644 docs/SchedulingPublishShiftsRequest.md create mode 100644 docs/SchedulingPublishShiftsResultV1.md create mode 100644 docs/SchedulingScheduleListResponseV1.md create mode 100644 docs/SchedulingScheduleListResponseV1Links.md create mode 100644 docs/SchedulingScheduleListResponseV1Meta.md create mode 100644 docs/SchedulingScheduleV1.md create mode 100644 docs/SchedulingSchedulingShiftAssessmentV1.md create mode 100644 docs/SchedulingSchedulingShiftAssessmentViolationV1.md create mode 100644 docs/SchedulingSchedulingShiftV1.md create mode 100644 docs/SchedulingShiftAssessmentListResponseV1.md create mode 100644 docs/SchedulingShiftAssessmentListResponseV1Meta.md create mode 100644 docs/SchedulingShiftListResponseV1.md create mode 100644 docs/SchedulingShiftListResponseV1Links.md create mode 100644 docs/SchedulingShiftListResponseV1LinksNext.md create mode 100644 docs/SchedulingShiftListResponseV1LinksPrev.md create mode 100644 docs/SchedulingShiftListResponseV1Meta.md create mode 100644 docs/SchedulingTimezoneListResponseV1.md create mode 100644 docs/SchedulingTimezoneListResponseV1Meta.md create mode 100644 docs/SchedulingTimezoneV1.md create mode 100644 docs/SchedulingUpdateScheduleRequestV1.md create mode 100644 docs/SchedulingUpdateSchedulingShiftRequestV1.md create mode 100644 docs/SendEmployeeVerificationLifecycleEmailByUserRequest.md create mode 100644 docs/SendRecommendationsResponse.md create mode 100644 docs/SetTotalRewardsCustomDisclaimerRequest.md create mode 100644 docs/SetTotalRewardsOnboardingStepRequest.md create mode 100644 docs/ShiftDifferentialCreateTimeTrackingShiftDifferentialV1.md create mode 100644 docs/ShiftDifferentialCreateTimeTrackingShiftDifferentialV1TimesInner.md create mode 100644 docs/ShiftDifferentialPaginatedResponseDataV1.md create mode 100644 docs/ShiftDifferentialPaginatedResponseDataV1Meta.md create mode 100644 docs/ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1.md create mode 100644 docs/ShiftDifferentialTimeTrackingShiftDifferentialTimeV1.md create mode 100644 docs/ShiftDifferentialTimeTrackingShiftDifferentialV1.md create mode 100644 docs/ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1.md create mode 100644 docs/StandardApiErrorResponse.md create mode 100644 docs/TimeTrackingBreakPolicySuggestionsResponseV1.md create mode 100644 docs/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.md create mode 100644 docs/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.md create mode 100644 docs/TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1.md create mode 100644 docs/TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1.md create mode 100644 docs/TimeTrackingClockEntryLocationV1.md create mode 100644 docs/TimeTrackingClockEntryPaginatedResponseDataV1.md create mode 100644 docs/TimeTrackingClockEntryPaginatedResponseDataV1Meta.md create mode 100644 docs/TimeTrackingClockEntryV1.md create mode 100644 docs/TimeTrackingConfigurationPaginatedResponseDataV1.md create mode 100644 docs/TimeTrackingConfigurationPaginatedResponseDataV1Links.md create mode 100644 docs/TimeTrackingConfigurationPaginatedResponseDataV1LinksNext.md create mode 100644 docs/TimeTrackingConfigurationPaginatedResponseDataV1LinksPrev.md create mode 100644 docs/TimeTrackingConfigurationPaginatedResponseDataV1Meta.md create mode 100644 docs/TimeTrackingCreateClockInV1.md create mode 100644 docs/TimeTrackingCreateClockOutV1.md create mode 100644 docs/TimeTrackingCreateTimeTrackingConfigurationV1.md create mode 100644 docs/TimeTrackingEmployeeEnrollmentPaginatedResponseDataV1.md create mode 100644 docs/TimeTrackingEmployeeTimeTrackingDataV1.md create mode 100644 docs/TimeTrackingHourEntryPaginatedResponseDataV1.md create mode 100644 docs/TimeTrackingHourEntryV1.md delete mode 100644 docs/TimeTrackingOffsetPaginatedResponseDataV1LinksNext.md delete mode 100644 docs/TimeTrackingOffsetPaginatedResponseDataV1LinksPrev.md create mode 100644 docs/TimeTrackingPagePaginatedResponseDataV1.md create mode 100644 docs/TimeTrackingPaginatedClockEntriesResponseV1.md create mode 100644 docs/TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1.md create mode 100644 docs/TimeTrackingPaginatedHourEntriesResponseV1.md create mode 100644 docs/TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1.md create mode 100644 docs/TimeTrackingPaginatedTimeTrackingKiosksResponseV1.md create mode 100644 docs/TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1.md create mode 100644 docs/TimeTrackingPaginatedTimesheetsResponseV1.md create mode 100644 docs/TimeTrackingPaginatedTimesheetsResponseV1Meta.md delete mode 100644 docs/TimeTrackingRecordSchemaProject.md delete mode 100644 docs/TimeTrackingRecordSchemaProjectTask.md delete mode 100644 docs/TimeTrackingRecordSchemaShiftDifferential.md create mode 100644 docs/TimeTrackingTimeTrackingConfigurationV1.md create mode 100644 docs/TimeTrackingTimeTrackingHourEntryV1.md create mode 100644 docs/TimeTrackingTimeTrackingKioskV1.md create mode 100644 docs/TimeTrackingTimeTrackingTimeClockV1.md create mode 100644 docs/TimeTrackingTimesheetV1.md create mode 100644 docs/TimeTrackingUpdateClockEntryV1.md create mode 100644 docs/TimeTrackingUpdateEmployeeTimeTrackingDataV1.md create mode 100644 docs/TimeTrackingUpdateTimeTrackingConfigurationV1.md create mode 100644 docs/TimeTrackingUpdateTimeTrackingKioskV1.md create mode 100644 docs/TimeTrackingUpdateTimeTrackingTimeClockV1.md delete mode 100644 docs/TimesheetEntryInfoApiTransformerBreakInfo.md create mode 100644 docs/TimesheetTimesheetDailyEntryV1.md create mode 100644 docs/TimesheetTimesheetDailySummaryV1.md create mode 100644 docs/TotalRewardsApi.md create mode 100644 docs/TotalRewardsBenefitDetailsValues.md create mode 100644 docs/TotalRewardsBenefitSectionValues.md create mode 100644 docs/TotalRewardsCalendarSectionValues.md create mode 100644 docs/TotalRewardsCompSummaryValues.md create mode 100644 docs/TotalRewardsCustomDisclaimerInfo.md create mode 100644 docs/TotalRewardsEmployeeStatement.md create mode 100644 docs/TotalRewardsEquityDetailsValues.md create mode 100644 docs/TotalRewardsEquityEstimatedValuationValues.md create mode 100644 docs/TotalRewardsEquityGrowthChartItem.md create mode 100644 docs/TotalRewardsEquityGrowthEstimation.md create mode 100644 docs/TotalRewardsEquitySectionValues.md create mode 100644 docs/TotalRewardsExtraPayDetailsValues.md create mode 100644 docs/TotalRewardsExtraPaySectionValues.md create mode 100644 docs/TotalRewardsHolidayValue.md create mode 100644 docs/TotalRewardsOnboardingStep.md create mode 100644 docs/TotalRewardsOverviewSectionValues.md create mode 100644 docs/TotalRewardsTimeOffPolicyValue.md create mode 100644 docs/TotalRewardsTimelineItem.md create mode 100644 docs/TotalRewardsTimelineItemLabel.md create mode 100644 docs/TotalRewardsTimelineSectionValues.md delete mode 100644 docs/TrainingTypeDueFromHireDate.md delete mode 100644 docs/TrainingTypeDueFromHireDateOneOf.md delete mode 100644 docs/TransformedApiGoalActions.md create mode 100644 docs/UnarchiveCustomFieldsRequest.md create mode 100644 docs/UnarchiveCustomFieldsResponse.md create mode 100644 docs/UpdateCompanyIndustryCodes400Response.md create mode 100644 docs/UpdateCompanyIndustryCodes403Response.md create mode 100644 docs/UpdateCompanyIndustryCodes404Response.md create mode 100644 docs/UpdateCompanyIndustryCodes500Response.md create mode 100644 docs/UpdateCompanyIndustryCodesResponse.md create mode 100644 docs/UpdateCompanyNameBadRequestResponse.md create mode 100644 docs/UpdateCompanyNameBadRequestResponseError.md create mode 100644 docs/UpdateCompanyNameForbiddenResponse.md create mode 100644 docs/UpdateCompanyNameForbiddenResponseError.md create mode 100644 docs/UpdateCompanyNameInternalErrorResponse.md create mode 100644 docs/UpdateCompanyNameSuccessResponse.md create mode 100644 docs/UpdateCompensationBenchmarkRequest.md create mode 100644 docs/UpdateCompensationBenchmarkSourceItem.md create mode 100644 docs/UpdateCompensationBenchmarkSourcesRequest.md create mode 100644 docs/UpdateCompensationBenchmarkSourcesResponse.md create mode 100644 docs/UpdateEmployeeVerificationIntegrationRequest.md create mode 100644 docs/UpdateEmployeeVerificationRequest.md create mode 100644 docs/UpdateGoalCommentRequest.md create mode 100644 docs/UpdateGoalMilestoneProgressRequest.md create mode 100644 docs/UpdateGoalProgressRequest.md create mode 100644 docs/UpdateGoalSharingRequest.md create mode 100644 docs/UpdateGoalV1.md create mode 100644 docs/UpdateGoalV11Request.md create mode 100644 docs/UpdateGoalV11RequestMilestonesInner.md create mode 100644 docs/UpdateLocationRequest.md create mode 100644 docs/UpdateLocationRequestAddress.md create mode 100644 docs/UpdatePayBandsRequest.md create mode 100644 docs/UpdatedCompensationBenchmark.md create mode 100644 docs/UpdatedCompensationBenchmarkSavedBenchmark.md create mode 100644 docs/UploadEmployeePhotoRequest1.md create mode 100644 docs/UserPermissionData.md create mode 100644 docs/WhosOutListResponseV1.md create mode 100644 docs/WhosOutListResponseV1Links.md create mode 100644 docs/WhosOutListResponseV1LinksNext.md create mode 100644 docs/WhosOutListResponseV1LinksPrev.md create mode 100644 docs/WhosOutListResponseV1Meta.md create mode 100644 docs/WhosOutPersonV1.md create mode 100644 docs/WhosOutV1.md delete mode 100644 docs/XmlDirectoryEmployee.md delete mode 100644 docs/XmlDirectoryEmployeeEmployees.md delete mode 100644 docs/XmlDirectoryEmployeeEmployeesEmployeeInner.md delete mode 100644 docs/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.md delete mode 100644 docs/XmlDirectoryEmployeeFieldset.md delete mode 100644 docs/XmlDirectoryEmployeeFieldsetFieldInner.md create mode 100644 test/test_alerts_api.py create mode 100644 test/test_calendar_events_api.py create mode 100644 test/test_change_tracking_api.py create mode 100644 test/test_company_api.py create mode 100644 test/test_compensation_api.py create mode 100644 test/test_compensation_benchmarking_api.py create mode 100644 test/test_compensation_planning_api.py create mode 100644 test/test_custom_fields_api.py create mode 100644 test/test_employee_tables_api.py create mode 100644 test/test_employee_verification_api.py create mode 100644 test/test_holidays_api.py create mode 100644 test/test_locations_api.py create mode 100644 test/test_meal_rest_breaks_api.py create mode 100644 test/test_onboarding_api.py create mode 100644 test/test_pay_grades_bands_api.py create mode 100644 test/test_scheduling_api.py create mode 100644 test/test_total_rewards_api.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index e9b1bcb..436acbd 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,26 +1,40 @@ -.github/workflows/python.yml .gitlab-ci.yml README.md bamboohr_sdk/__init__.py bamboohr_sdk/api/__init__.py bamboohr_sdk/api/account_information_api.py +bamboohr_sdk/api/alerts_api.py bamboohr_sdk/api/applicant_tracking_api.py bamboohr_sdk/api/benefits_api.py +bamboohr_sdk/api/calendar_events_api.py +bamboohr_sdk/api/change_tracking_api.py +bamboohr_sdk/api/company_api.py bamboohr_sdk/api/company_files_api.py bamboohr_sdk/api/company_profile_api.py +bamboohr_sdk/api/compensation_api.py +bamboohr_sdk/api/compensation_benchmarking_api.py +bamboohr_sdk/api/compensation_planning_api.py +bamboohr_sdk/api/custom_fields_api.py bamboohr_sdk/api/custom_reports_api.py bamboohr_sdk/api/datasets_api.py bamboohr_sdk/api/employee_files_api.py +bamboohr_sdk/api/employee_tables_api.py +bamboohr_sdk/api/employee_verification_api.py bamboohr_sdk/api/employees_api.py bamboohr_sdk/api/goals_api.py +bamboohr_sdk/api/holidays_api.py bamboohr_sdk/api/hours_api.py -bamboohr_sdk/api/last_change_information_api.py +bamboohr_sdk/api/locations_api.py bamboohr_sdk/api/login_api.py +bamboohr_sdk/api/meal_rest_breaks_api.py +bamboohr_sdk/api/onboarding_api.py +bamboohr_sdk/api/pay_grades_bands_api.py bamboohr_sdk/api/photos_api.py bamboohr_sdk/api/reports_api.py -bamboohr_sdk/api/tabular_data_api.py +bamboohr_sdk/api/scheduling_api.py bamboohr_sdk/api/time_off_api.py bamboohr_sdk/api/time_tracking_api.py +bamboohr_sdk/api/total_rewards_api.py bamboohr_sdk/api/training_api.py bamboohr_sdk/api/webhook_events_api.py bamboohr_sdk/api/webhooks_api.py @@ -29,46 +43,73 @@ bamboohr_sdk/api_response.py bamboohr_sdk/configuration.py bamboohr_sdk/exceptions.py bamboohr_sdk/models/__init__.py +bamboohr_sdk/models/a05b6d5f564f805d688ff2c1e37c3990_request.py +bamboohr_sdk/models/add_custom_field_list_value_request.py +bamboohr_sdk/models/add_custom_field_list_value_response.py +bamboohr_sdk/models/add_custom_field_list_value_response_one_of_inner.py +bamboohr_sdk/models/add_cycle_admins_response.py +bamboohr_sdk/models/add_cycle_admins_response_added_inner.py +bamboohr_sdk/models/add_cycle_admins_response_skipped_inner.py +bamboohr_sdk/models/add_total_rewards_employees_request.py bamboohr_sdk/models/adjust_time_off_balance.py bamboohr_sdk/models/adjust_time_tracking_request_schema.py +bamboohr_sdk/models/alert_configuration_v1.py +bamboohr_sdk/models/alert_configuration_write_v1.py +bamboohr_sdk/models/alert_template_list_response_v1.py +bamboohr_sdk/models/alert_template_list_response_v1_alerts_inner.py bamboohr_sdk/models/alignment_options_response.py bamboohr_sdk/models/alignment_options_response_aligns_with_options_inner.py bamboohr_sdk/models/applicant_status.py bamboohr_sdk/models/application_details.py bamboohr_sdk/models/application_details_applicant.py -bamboohr_sdk/models/application_details_applicant_address.py -bamboohr_sdk/models/application_details_applicant_education.py -bamboohr_sdk/models/application_details_applicant_education_level.py bamboohr_sdk/models/application_details_attachments_inner.py bamboohr_sdk/models/application_details_job.py -bamboohr_sdk/models/application_details_job_hiring_lead.py -bamboohr_sdk/models/application_details_job_hiring_lead_job_title.py bamboohr_sdk/models/application_details_job_title.py bamboohr_sdk/models/application_details_questions_and_answers_inner.py bamboohr_sdk/models/application_details_questions_and_answers_inner_answer.py bamboohr_sdk/models/application_details_questions_and_answers_inner_question.py bamboohr_sdk/models/application_details_status.py -bamboohr_sdk/models/application_details_status_changed_by_user.py -bamboohr_sdk/models/application_details_status_changed_by_user_job_title.py bamboohr_sdk/models/applications_list.py bamboohr_sdk/models/applications_list_applications_inner.py bamboohr_sdk/models/applications_list_applications_inner_applicant.py bamboohr_sdk/models/applications_list_applications_inner_job.py bamboohr_sdk/models/applications_list_applications_inner_job_title.py bamboohr_sdk/models/applications_list_applications_inner_status.py +bamboohr_sdk/models/approve_timesheet_request.py +bamboohr_sdk/models/archive_custom_field_response.py +bamboohr_sdk/models/archived_custom_fields_list_response.py bamboohr_sdk/models/assign_employees_to_break_policy_request.py -bamboohr_sdk/models/assign_time_off_policies_request_inner.py +bamboohr_sdk/models/assign_time_off_policies_v1_request_inner.py bamboohr_sdk/models/assigned_time_off_policy.py bamboohr_sdk/models/assigned_time_off_policy_v11.py bamboohr_sdk/models/available_action.py -bamboohr_sdk/models/bad_request.py -bamboohr_sdk/models/bad_request_error.py +bamboohr_sdk/models/bad_request_v1.py +bamboohr_sdk/models/bad_request_v1_error.py +bamboohr_sdk/models/bank_holiday.py bamboohr_sdk/models/benefit_coverages_response.py bamboohr_sdk/models/benefit_coverages_response_benefit_coverages_inner.py bamboohr_sdk/models/benefit_deduction_sub_type.py bamboohr_sdk/models/benefit_deduction_type.py bamboohr_sdk/models/benefit_deduction_type_id.py +bamboohr_sdk/models/budget_breakdown_import_response.py +bamboohr_sdk/models/budget_guidelines_view.py +bamboohr_sdk/models/budget_guidelines_warnings.py +bamboohr_sdk/models/c79f9c5950f983e59d2626faa30c00a1_request.py +bamboohr_sdk/models/c7c32ed5278ac67e2e518bf7484a75dc_request.py +bamboohr_sdk/models/calendar_anniversary_calendar_event_v1.py +bamboohr_sdk/models/calendar_birthday_calendar_event_v1.py +bamboohr_sdk/models/calendar_calendar_event_person_v1.py +bamboohr_sdk/models/calendar_calendar_events_list_response_v1.py +bamboohr_sdk/models/calendar_calendar_events_list_response_v1_data_inner.py +bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links.py +bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links_next.py +bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links_prev.py +bamboohr_sdk/models/calendar_calendar_events_list_response_v1_meta.py +bamboohr_sdk/models/calendar_holiday_calendar_event_v1.py +bamboohr_sdk/models/calendar_time_off_calendar_event_v1.py bamboohr_sdk/models/can_create_goals_response.py +bamboohr_sdk/models/cf87b8e09a001b6fb81dfce6c20ab9e3_request.py +bamboohr_sdk/models/change_custom_field_list_value_request.py bamboohr_sdk/models/changed_employee_ids_response.py bamboohr_sdk/models/changed_employee_ids_response_employees_value.py bamboohr_sdk/models/changed_employee_table_data_response.py @@ -76,10 +117,13 @@ bamboohr_sdk/models/changed_employee_table_data_response_employees_value.py bamboohr_sdk/models/changed_employee_table_data_response_employees_value_rows_inner_value.py bamboohr_sdk/models/changed_employee_table_data_response_employees_value_rows_inner_value_any_of_inner.py bamboohr_sdk/models/clock_entries_schema.py +bamboohr_sdk/models/clock_entry_clock_entry_location_input_v1.py +bamboohr_sdk/models/clock_entry_create_clock_entry_v1.py bamboohr_sdk/models/clock_entry_ids_schema.py bamboohr_sdk/models/clock_entry_schema.py bamboohr_sdk/models/clock_in_request_schema.py bamboohr_sdk/models/clock_out_request_schema.py +bamboohr_sdk/models/close_goal_request.py bamboohr_sdk/models/company_benefit_summary.py bamboohr_sdk/models/company_benefits_list_response.py bamboohr_sdk/models/company_deleted_webhook_payload.py @@ -87,39 +131,105 @@ bamboohr_sdk/models/company_file_update.py bamboohr_sdk/models/company_files_response.py bamboohr_sdk/models/company_files_response_categories_inner.py bamboohr_sdk/models/company_files_response_categories_inner_files_inner.py +bamboohr_sdk/models/company_industry_data_object.py bamboohr_sdk/models/company_information.py bamboohr_sdk/models/company_information_address.py bamboohr_sdk/models/company_integrations_updated_webhook_payload.py bamboohr_sdk/models/company_integrations_updated_webhook_payload_data.py +bamboohr_sdk/models/company_profile_data.py +bamboohr_sdk/models/company_profile_data_address.py bamboohr_sdk/models/company_profile_integrations.py bamboohr_sdk/models/company_updated_webhook_payload.py +bamboohr_sdk/models/compensation_benchmark_detail_employee.py +bamboohr_sdk/models/compensation_benchmark_detail_employee_job_title.py +bamboohr_sdk/models/compensation_benchmark_detail_employee_salary.py +bamboohr_sdk/models/compensation_benchmark_details.py +bamboohr_sdk/models/compensation_benchmark_details_benchmark_values_inner.py +bamboohr_sdk/models/compensation_benchmark_job_location_employee.py +bamboohr_sdk/models/compensation_benchmark_job_location_employee_salary.py +bamboohr_sdk/models/compensation_benchmark_job_location_pair.py +bamboohr_sdk/models/compensation_benchmark_job_location_pair_job_details.py +bamboohr_sdk/models/compensation_benchmark_overview.py +bamboohr_sdk/models/compensation_benchmark_overview_values.py +bamboohr_sdk/models/compensation_benchmark_source.py +bamboohr_sdk/models/compensation_benchmarking_column_map.py +bamboohr_sdk/models/compensation_benchmarks_list.py +bamboohr_sdk/models/compensation_equity_settings_response.py +bamboohr_sdk/models/compensation_equity_settings_response_company_valuation.py +bamboohr_sdk/models/compensation_equity_settings_response_disclaimers.py +bamboohr_sdk/models/compensation_equity_settings_response_outstanding_shares.py +bamboohr_sdk/models/compensation_equity_settings_response_price_per_share.py +bamboohr_sdk/models/compensation_equity_settings_response_slider_min.py +bamboohr_sdk/models/compensation_equity_settings_response_vesting_conditions.py +bamboohr_sdk/models/compensation_equity_settings_update_request.py +bamboohr_sdk/models/compensation_planning_cycle_admins_response.py +bamboohr_sdk/models/compensation_planning_cycle_admins_response_admins_inner.py +bamboohr_sdk/models/compensation_planning_cycle_complete_response.py +bamboohr_sdk/models/compensation_planning_cycle_complete_response_errors_inner.py +bamboohr_sdk/models/compensation_tools_data_object.py +bamboohr_sdk/models/compensation_tools_response.py +bamboohr_sdk/models/compensation_upsell_data.py +bamboohr_sdk/models/completed_questions_and_response_data_object.py +bamboohr_sdk/models/conversion_rate_data_object.py +bamboohr_sdk/models/countries_options_response.py bamboohr_sdk/models/country.py bamboohr_sdk/models/country_schema.py bamboohr_sdk/models/create_application_comment_request.py bamboohr_sdk/models/create_candidate_response.py bamboohr_sdk/models/create_comment_response.py +bamboohr_sdk/models/create_compensation_benchmark_request.py +bamboohr_sdk/models/create_compensation_benchmark_source_request.py bamboohr_sdk/models/create_employee_training_record_request.py bamboohr_sdk/models/create_employee_training_record_request_cost.py +bamboohr_sdk/models/create_goal_comment_request.py +bamboohr_sdk/models/create_goal_request.py +bamboohr_sdk/models/create_goal_request_milestones_inner.py bamboohr_sdk/models/create_job_opening_response.py +bamboohr_sdk/models/create_location_request.py +bamboohr_sdk/models/create_location_request_address.py bamboohr_sdk/models/create_training_category_request.py bamboohr_sdk/models/create_training_type_request.py bamboohr_sdk/models/create_training_type_request_category.py -bamboohr_sdk/models/create_training_type_request_due_from_hire_date.py -bamboohr_sdk/models/create_training_type_request_due_from_hire_date_one_of.py bamboohr_sdk/models/create_webhook_bad_request_response.py +bamboohr_sdk/models/created_compensation_benchmark.py +bamboohr_sdk/models/created_compensation_benchmark_saved_benchmark.py +bamboohr_sdk/models/created_compensation_benchmark_source.py +bamboohr_sdk/models/created_time_off_request.py +bamboohr_sdk/models/created_time_off_request_amount.py +bamboohr_sdk/models/created_time_off_request_notes.py +bamboohr_sdk/models/created_time_off_request_status.py +bamboohr_sdk/models/created_time_off_request_type.py +bamboohr_sdk/models/currency_conversions_response.py bamboohr_sdk/models/cursor_paged_response_metadata.py bamboohr_sdk/models/cursor_pages_response.py -bamboohr_sdk/models/cursor_pagination_query_object.py +bamboohr_sdk/models/custom_field_definition_response_object.py +bamboohr_sdk/models/custom_field_definition_response_object_values_inner.py +bamboohr_sdk/models/custom_field_request.py +bamboohr_sdk/models/custom_field_type_view_object.py +bamboohr_sdk/models/custom_field_view_object.py +bamboohr_sdk/models/custom_fields_list_response.py +bamboohr_sdk/models/custom_report_response.py +bamboohr_sdk/models/custom_report_response_fields_inner.py +bamboohr_sdk/models/dacd313af2106213fc4696175941ce65_request.py bamboohr_sdk/models/data_request.py -bamboohr_sdk/models/data_request_aggregations_inner.py +bamboohr_sdk/models/data_request_aggregations.py bamboohr_sdk/models/data_request_filters.py bamboohr_sdk/models/data_request_filters_filters_inner.py bamboohr_sdk/models/data_request_sort_by_inner.py -bamboohr_sdk/models/dataset.py +bamboohr_sdk/models/dataset_data_response_v2.py +bamboohr_sdk/models/dataset_data_response_v2_data_inner.py +bamboohr_sdk/models/dataset_data_response_v2_data_inner_fields_value.py +bamboohr_sdk/models/dataset_data_response_v2_links.py +bamboohr_sdk/models/dataset_data_response_v2_meta.py bamboohr_sdk/models/dataset_fields_response.py -bamboohr_sdk/models/dataset_response.py -bamboohr_sdk/models/datasets_response.py -bamboohr_sdk/models/datasets_response_datasets_inner.py +bamboohr_sdk/models/dataset_response_v1.py +bamboohr_sdk/models/dataset_v1.py +bamboohr_sdk/models/datasets_response_v12.py +bamboohr_sdk/models/datasets_response_v12_datasets_inner.py +bamboohr_sdk/models/delete_compensation_benchmark_source_request.py +bamboohr_sdk/models/delete_compensation_benchmark_source_response.py +bamboohr_sdk/models/details_and_currency_request_data_object.py +bamboohr_sdk/models/ec1ba8e76f33960b018d0d7518fe97b5_request.py bamboohr_sdk/models/employee.py bamboohr_sdk/models/employee_benefit_filters.py bamboohr_sdk/models/employee_benefit_filters_filters.py @@ -128,41 +238,70 @@ bamboohr_sdk/models/employee_benefits_list_response_employee_benefits_inner.py bamboohr_sdk/models/employee_benefits_list_response_employee_benefits_inner_employee_benefit_inner.py bamboohr_sdk/models/employee_created_webhook_payload.py bamboohr_sdk/models/employee_created_webhook_payload_data.py +bamboohr_sdk/models/employee_cursor_pagination_query_object.py bamboohr_sdk/models/employee_deleted_webhook_payload.py bamboohr_sdk/models/employee_deleted_webhook_payload_data.py bamboohr_sdk/models/employee_dependent.py bamboohr_sdk/models/employee_dependents_response.py bamboohr_sdk/models/employee_dependents_response_employee_dependents_inner.py bamboohr_sdk/models/employee_file_update.py +bamboohr_sdk/models/employee_optional_field.py +bamboohr_sdk/models/employee_photo_json_response.py bamboohr_sdk/models/employee_response.py bamboohr_sdk/models/employee_response_aggregations_inner.py +bamboohr_sdk/models/employee_string_code_error_response_v1.py +bamboohr_sdk/models/employee_string_code_error_response_v1_error.py bamboohr_sdk/models/employee_table_row.py -bamboohr_sdk/models/employee_table_row_value.py -bamboohr_sdk/models/employee_table_row_value_any_of_inner.py bamboohr_sdk/models/employee_time_off_policy_assignment.py bamboohr_sdk/models/employee_time_off_policy_assignment_v11.py +bamboohr_sdk/models/employee_time_off_request_approver_response_inner.py bamboohr_sdk/models/employee_timesheet_entry_transformer.py bamboohr_sdk/models/employee_updated_webhook_payload.py bamboohr_sdk/models/employee_updated_webhook_payload_data.py bamboohr_sdk/models/employee_value.py bamboohr_sdk/models/employee_value_any_of_inner.py +bamboohr_sdk/models/employee_verification_integration.py +bamboohr_sdk/models/employee_verification_integration_response.py +bamboohr_sdk/models/employee_verification_lifecycle_email_accepted_response.py +bamboohr_sdk/models/employee_verification_public_api_record.py +bamboohr_sdk/models/employee_verification_update_response.py +bamboohr_sdk/models/employee_verifications_list_response.py +bamboohr_sdk/models/employees_directory_json_response.py +bamboohr_sdk/models/employees_directory_json_response_fields_inner.py +bamboohr_sdk/models/employees_directory_xml_response.py +bamboohr_sdk/models/employees_directory_xml_response_employees.py +bamboohr_sdk/models/employees_directory_xml_response_employees_employee_inner.py +bamboohr_sdk/models/employees_directory_xml_response_employees_employee_inner_field_inner.py +bamboohr_sdk/models/employees_directory_xml_response_fieldset.py +bamboohr_sdk/models/employees_directory_xml_response_fieldset_field_inner.py +bamboohr_sdk/models/error_response.py +bamboohr_sdk/models/error_response_error.py +bamboohr_sdk/models/f3883a522dadbe9e11b34f8b656e3adb_request.py bamboohr_sdk/models/field1.py bamboohr_sdk/models/field1_id.py -bamboohr_sdk/models/field_list.py -bamboohr_sdk/models/field_list_fields_inner.py bamboohr_sdk/models/field_options_request_schema.py bamboohr_sdk/models/field_options_request_schema_dependent_fields_value_inner.py bamboohr_sdk/models/field_options_transformer.py -bamboohr_sdk/models/forbidden.py +bamboohr_sdk/models/field_options_transformer_id.py +bamboohr_sdk/models/forbidden_v1.py +bamboohr_sdk/models/forbidden_v1_error.py +bamboohr_sdk/models/get_break_policy_suggestions_request.py bamboohr_sdk/models/get_company_report_response.py +bamboohr_sdk/models/get_company_report_response_employees_inner.py +bamboohr_sdk/models/get_data_from_dataset_v2_request.py +bamboohr_sdk/models/get_employee_response.py +bamboohr_sdk/models/get_employees_employee_base_response.py bamboohr_sdk/models/get_employees_employee_response.py +bamboohr_sdk/models/get_employees_employee_response_all_of_overtime_rate.py +bamboohr_sdk/models/get_employees_employee_response_all_of_pay_rate.py +bamboohr_sdk/models/get_employees_employee_response_all_of_teams.py bamboohr_sdk/models/get_employees_filter_request_object.py bamboohr_sdk/models/get_employees_response_object.py bamboohr_sdk/models/get_employees_response_object_links.py bamboohr_sdk/models/get_employees_response_object_links_next.py bamboohr_sdk/models/get_employees_response_object_links_prev.py bamboohr_sdk/models/get_employees_response_object_links_self.py -bamboohr_sdk/models/goal.py +bamboohr_sdk/models/global_holiday_global_holiday_v1.py bamboohr_sdk/models/goal_aggregate.py bamboohr_sdk/models/goal_aggregate_aligns_with_options_inner.py bamboohr_sdk/models/goal_aggregate_comments_inner.py @@ -175,6 +314,7 @@ bamboohr_sdk/models/goal_filters_v11.py bamboohr_sdk/models/goal_filters_v11_filters_inner.py bamboohr_sdk/models/goal_filters_v11_filters_inner_actions.py bamboohr_sdk/models/goal_filters_v1_filters_inner.py +bamboohr_sdk/models/goal_response.py bamboohr_sdk/models/goals_aggregate_v1.py bamboohr_sdk/models/goals_aggregate_v11.py bamboohr_sdk/models/goals_aggregate_v11_comments_inner.py @@ -184,30 +324,64 @@ bamboohr_sdk/models/goals_aggregate_v1_comments_inner.py bamboohr_sdk/models/goals_aggregate_v1_persons_inner.py bamboohr_sdk/models/goals_list.py bamboohr_sdk/models/hiring_lead.py +bamboohr_sdk/models/holiday_bulk_insert_company_holiday_error_v1.py +bamboohr_sdk/models/holiday_bulk_insert_company_holiday_record_v1.py +bamboohr_sdk/models/holiday_bulk_insert_company_holidays_failure_response_v1.py +bamboohr_sdk/models/holiday_bulk_insert_company_holidays_response_v1.py +bamboohr_sdk/models/holiday_catalog_holiday_list_response_v1.py +bamboohr_sdk/models/holiday_catalog_holiday_list_response_v1_links.py +bamboohr_sdk/models/holiday_company_holiday_audience_v1.py +bamboohr_sdk/models/holiday_company_holiday_list_response_v1.py +bamboohr_sdk/models/holiday_company_holiday_list_response_v1_links.py +bamboohr_sdk/models/holiday_company_holiday_list_response_v1_meta.py +bamboohr_sdk/models/holiday_company_holiday_pay_status_hours_v1.py +bamboohr_sdk/models/holiday_company_holiday_v1.py +bamboohr_sdk/models/holiday_create_company_holiday_request_v1.py +bamboohr_sdk/models/holiday_update_company_holiday_request_v1.py bamboohr_sdk/models/hour_entries_request_schema.py +bamboohr_sdk/models/hour_entry_create_hour_entry_v1.py bamboohr_sdk/models/hour_entry_ids_schema.py +bamboohr_sdk/models/hour_entry_patch_hour_entry_v1.py bamboohr_sdk/models/hour_entry_schema.py -bamboohr_sdk/models/invalid_request.py -bamboohr_sdk/models/invalid_request_error.py +bamboohr_sdk/models/import_compensation_benchmarks_response.py +bamboohr_sdk/models/industry.py +bamboohr_sdk/models/inline_object.py +bamboohr_sdk/models/inline_object1.py +bamboohr_sdk/models/inline_object1_employees_inner.py +bamboohr_sdk/models/inline_object1_status.py +bamboohr_sdk/models/inline_object2.py +bamboohr_sdk/models/inline_object2_inner.py bamboohr_sdk/models/job_summary.py -bamboohr_sdk/models/job_summary_department.py -bamboohr_sdk/models/job_summary_hiring_lead.py -bamboohr_sdk/models/job_summary_location.py bamboohr_sdk/models/job_summary_status.py -bamboohr_sdk/models/json_directory_employee.py -bamboohr_sdk/models/json_directory_employee_fields_inner.py bamboohr_sdk/models/json_employee_files.py bamboohr_sdk/models/json_employee_files_categories_inner.py bamboohr_sdk/models/json_employee_files_categories_inner_files_inner.py bamboohr_sdk/models/json_employee_files_employee.py +bamboohr_sdk/models/legacy_report_field_map_response.py +bamboohr_sdk/models/legacy_report_field_map_response_mappings_inner.py +bamboohr_sdk/models/legacy_report_id_map_response.py +bamboohr_sdk/models/legacy_report_id_map_response_mappings_inner.py +bamboohr_sdk/models/levels_and_bands_column_map.py +bamboohr_sdk/models/levels_and_bands_group_status_counts.py +bamboohr_sdk/models/levels_and_bands_job_title_assignment.py +bamboohr_sdk/models/levels_and_bands_job_title_assignments_request.py +bamboohr_sdk/models/levels_and_bands_pay_band_value.py +bamboohr_sdk/models/levels_and_bands_upload_response.py bamboohr_sdk/models/list_field_detail.py bamboohr_sdk/models/list_field_option.py bamboohr_sdk/models/list_field_values.py bamboohr_sdk/models/list_field_values_options_inner.py +bamboohr_sdk/models/list_field_values_xml.py +bamboohr_sdk/models/list_field_values_xml_option_inner.py bamboohr_sdk/models/list_users_response_value.py bamboohr_sdk/models/list_users_xml_response.py bamboohr_sdk/models/list_users_xml_response_user_inner.py +bamboohr_sdk/models/list_value_view_object.py bamboohr_sdk/models/location.py +bamboohr_sdk/models/location_response_object.py +bamboohr_sdk/models/location_response_object_address.py +bamboohr_sdk/models/location_response_object_address_country.py +bamboohr_sdk/models/location_response_object_address_state.py bamboohr_sdk/models/login_failure_response.py bamboohr_sdk/models/login_failure_xml_response.py bamboohr_sdk/models/login_response.py @@ -226,27 +400,110 @@ bamboohr_sdk/models/member_benefits_get_success_response_links_next.py bamboohr_sdk/models/member_benefits_get_success_response_links_prev.py bamboohr_sdk/models/member_benefits_get_success_response_meta.py bamboohr_sdk/models/member_benefits_get_validation_error_response.py +bamboohr_sdk/models/meta_company_properties_response.py +bamboohr_sdk/models/meta_currency_type_item.py +bamboohr_sdk/models/model1d1fc0f164cb51973a0206b8e2fb2d2d_request.py +bamboohr_sdk/models/model1d1fc0f164cb51973a0206b8e2fb2d2d_request_budget_breakdown_inner.py +bamboohr_sdk/models/model1d64402ee192568adbd5e3179a91e6e2_request_inner.py +bamboohr_sdk/models/model1d64402ee192568adbd5e3179a91e6e2_request_inner_budget_allocations.py +bamboohr_sdk/models/model288aa996aba16d7a495c62321ea999a9_request.py +bamboohr_sdk/models/model288aa996aba16d7a495c62321ea999a9_request_sent_date_time.py +bamboohr_sdk/models/model3958585c861325ea7a2cd30a8c74f042_request.py +bamboohr_sdk/models/model89a5068111ec499135c7d6e9a53d5a30_request.py bamboohr_sdk/models/model_field.py +bamboohr_sdk/models/monitor_field_list.py +bamboohr_sdk/models/monitor_field_list_fields_inner.py +bamboohr_sdk/models/new_hire_packet_gtky_answer_visibility_item.py +bamboohr_sdk/models/new_hire_packet_gtky_answer_visibility_request.py +bamboohr_sdk/models/new_hire_packet_gtky_answer_visibility_response.py +bamboohr_sdk/models/new_hire_packet_public_api.py +bamboohr_sdk/models/new_hire_packet_public_api_writable_body.py +bamboohr_sdk/models/new_hire_packets_list_response.py +bamboohr_sdk/models/new_hire_widget_item.py +bamboohr_sdk/models/new_hire_widget_response.py bamboohr_sdk/models/new_web_hook.py +bamboohr_sdk/models/onboarding_experience_public_api.py +bamboohr_sdk/models/onboarding_experiences_list_response.py +bamboohr_sdk/models/paged_location_response.py bamboohr_sdk/models/paged_response.py bamboohr_sdk/models/pagination.py bamboohr_sdk/models/pagination_meta_data.py +bamboohr_sdk/models/patch_company_profile_company_information_request.py +bamboohr_sdk/models/patch_company_profile_company_information_request_address.py +bamboohr_sdk/models/pay_grades_and_bands_configuration_status.py +bamboohr_sdk/models/pay_grades_and_bands_configuration_status_job_titles.py +bamboohr_sdk/models/pay_grades_and_bands_configuration_status_job_titles_warnings_inner.py +bamboohr_sdk/models/pay_grades_and_bands_configuration_status_levels.py +bamboohr_sdk/models/pay_grades_and_bands_configuration_status_levels_errors_inner.py +bamboohr_sdk/models/pay_grades_and_bands_configuration_status_pay_bands.py +bamboohr_sdk/models/pay_grades_and_bands_configuration_status_review.py +bamboohr_sdk/models/pay_grades_and_bands_delete_groups_response.py +bamboohr_sdk/models/pay_grades_and_bands_delete_hierarchy_group.py +bamboohr_sdk/models/pay_grades_and_bands_delete_hierarchy_job_title.py +bamboohr_sdk/models/pay_grades_and_bands_delete_hierarchy_level.py +bamboohr_sdk/models/pay_grades_and_bands_delete_level_response.py +bamboohr_sdk/models/pay_grades_and_bands_delete_response.py +bamboohr_sdk/models/pay_grades_and_bands_job_title_assignments_group.py +bamboohr_sdk/models/pay_grades_and_bands_job_title_assignments_job_title.py +bamboohr_sdk/models/pay_grades_and_bands_job_title_assignments_level.py +bamboohr_sdk/models/pay_grades_and_bands_job_title_assignments_response.py +bamboohr_sdk/models/pay_grades_and_bands_job_title_employee.py +bamboohr_sdk/models/pay_grades_and_bands_job_title_with_employees.py +bamboohr_sdk/models/pay_grades_and_bands_level.py +bamboohr_sdk/models/pay_grades_and_bands_level_job_title.py +bamboohr_sdk/models/pay_grades_and_bands_levels_group.py +bamboohr_sdk/models/pay_grades_and_bands_levels_response.py +bamboohr_sdk/models/pay_grades_and_bands_pay_band_job_title.py +bamboohr_sdk/models/pay_grades_and_bands_pay_band_level.py +bamboohr_sdk/models/pay_grades_and_bands_pay_bands_group.py +bamboohr_sdk/models/pay_grades_and_bands_pay_bands_response.py +bamboohr_sdk/models/pay_grades_and_bands_publish_response.py +bamboohr_sdk/models/pay_grades_and_bands_published_group.py +bamboohr_sdk/models/pay_grades_and_bands_published_job_title.py +bamboohr_sdk/models/pay_grades_and_bands_published_level.py +bamboohr_sdk/models/pay_grades_and_bands_published_response.py +bamboohr_sdk/models/pay_grades_and_bands_review_group.py +bamboohr_sdk/models/pay_grades_and_bands_review_job_title.py +bamboohr_sdk/models/pay_grades_and_bands_review_level.py +bamboohr_sdk/models/pay_grades_and_bands_review_response.py +bamboohr_sdk/models/pay_grades_and_bands_save_levels_response.py +bamboohr_sdk/models/pay_grades_and_bands_update_job_titles_response.py +bamboohr_sdk/models/pay_grades_and_bands_update_level.py +bamboohr_sdk/models/pay_grades_and_bands_update_levels_group.py +bamboohr_sdk/models/pay_grades_and_bands_update_levels_request.py +bamboohr_sdk/models/pay_grades_and_bands_update_pay_band_item.py +bamboohr_sdk/models/pay_grades_and_bands_update_pay_bands_response.py bamboohr_sdk/models/person_info_api_transformer.py -bamboohr_sdk/models/post_goal_comment_request.py -bamboohr_sdk/models/post_goal_request.py -bamboohr_sdk/models/post_goal_request_milestones_inner.py bamboohr_sdk/models/post_new_employee.py bamboohr_sdk/models/problem_details_response.py +bamboohr_sdk/models/problem_details_response_v2.py bamboohr_sdk/models/project_create_request_schema.py +bamboohr_sdk/models/project_create_time_tracking_project_task_v1.py +bamboohr_sdk/models/project_create_time_tracking_project_v1.py +bamboohr_sdk/models/project_create_time_tracking_project_v1_tasks_inner.py bamboohr_sdk/models/project_info_api_transformer.py bamboohr_sdk/models/project_info_api_transformer_project.py -bamboohr_sdk/models/project_info_api_transformer_task.py -bamboohr_sdk/models/put_goal_comment_request.py -bamboohr_sdk/models/put_goal_milestone_progress_request.py -bamboohr_sdk/models/put_goal_progress_request.py -bamboohr_sdk/models/put_goal_shared_with_request.py -bamboohr_sdk/models/put_goal_v11_request.py -bamboohr_sdk/models/put_goal_v11_request_milestones_inner.py +bamboohr_sdk/models/project_legacy_error_response_v1.py +bamboohr_sdk/models/project_legacy_error_response_v1_error.py +bamboohr_sdk/models/project_paginated_response_data_v1.py +bamboohr_sdk/models/project_paginated_response_data_v1_meta.py +bamboohr_sdk/models/project_paginated_tasks_response_v1.py +bamboohr_sdk/models/project_paginated_tasks_response_v1_links.py +bamboohr_sdk/models/project_paginated_tasks_response_v1_meta.py +bamboohr_sdk/models/project_paginated_time_tracking_projects_response_v1.py +bamboohr_sdk/models/project_standard_api_error_response_v1.py +bamboohr_sdk/models/project_time_tracking_project_v1.py +bamboohr_sdk/models/project_time_tracking_task_v1.py +bamboohr_sdk/models/project_update_time_tracking_project_task_v1.py +bamboohr_sdk/models/project_update_time_tracking_project_v1.py +bamboohr_sdk/models/province_item.py +bamboohr_sdk/models/public_custom_field_types_response.py +bamboohr_sdk/models/public_list_values_custom_field_settings_response.py +bamboohr_sdk/models/public_list_values_custom_field_settings_response_values_inner.py +bamboohr_sdk/models/put_company_industry_codes_request.py +bamboohr_sdk/models/put_company_profile_display_name_request.py +bamboohr_sdk/models/remove_cycle_admin_self_response.py +bamboohr_sdk/models/remove_total_rewards_employees_request.py bamboohr_sdk/models/report.py bamboohr_sdk/models/reports_response.py bamboohr_sdk/models/request.py @@ -256,8 +513,46 @@ bamboohr_sdk/models/request_custom_report_filters_last_changed.py bamboohr_sdk/models/request_custom_report_response.py bamboohr_sdk/models/request_custom_report_response_employees_inner.py bamboohr_sdk/models/request_custom_report_response_fields_inner.py +bamboohr_sdk/models/save_change_comm_template_response.py +bamboohr_sdk/models/scheduling_create_schedule_request_v1.py +bamboohr_sdk/models/scheduling_create_scheduling_shift_request_v1.py +bamboohr_sdk/models/scheduling_publish_shifts_failure_v1.py +bamboohr_sdk/models/scheduling_publish_shifts_request.py +bamboohr_sdk/models/scheduling_publish_shifts_result_v1.py +bamboohr_sdk/models/scheduling_schedule_list_response_v1.py +bamboohr_sdk/models/scheduling_schedule_list_response_v1_links.py +bamboohr_sdk/models/scheduling_schedule_list_response_v1_meta.py +bamboohr_sdk/models/scheduling_schedule_v1.py +bamboohr_sdk/models/scheduling_scheduling_shift_assessment_v1.py +bamboohr_sdk/models/scheduling_scheduling_shift_assessment_violation_v1.py +bamboohr_sdk/models/scheduling_scheduling_shift_v1.py +bamboohr_sdk/models/scheduling_shift_assessment_list_response_v1.py +bamboohr_sdk/models/scheduling_shift_assessment_list_response_v1_meta.py +bamboohr_sdk/models/scheduling_shift_list_response_v1.py +bamboohr_sdk/models/scheduling_shift_list_response_v1_links.py +bamboohr_sdk/models/scheduling_shift_list_response_v1_links_next.py +bamboohr_sdk/models/scheduling_shift_list_response_v1_links_prev.py +bamboohr_sdk/models/scheduling_shift_list_response_v1_meta.py +bamboohr_sdk/models/scheduling_timezone_list_response_v1.py +bamboohr_sdk/models/scheduling_timezone_list_response_v1_meta.py +bamboohr_sdk/models/scheduling_timezone_v1.py +bamboohr_sdk/models/scheduling_update_schedule_request_v1.py +bamboohr_sdk/models/scheduling_update_scheduling_shift_request_v1.py +bamboohr_sdk/models/send_employee_verification_lifecycle_email_by_user_request.py +bamboohr_sdk/models/send_recommendations_response.py bamboohr_sdk/models/set_break_policy_employees_request.py +bamboohr_sdk/models/set_total_rewards_custom_disclaimer_request.py +bamboohr_sdk/models/set_total_rewards_onboarding_step_request.py bamboohr_sdk/models/share_options_response.py +bamboohr_sdk/models/shift_differential_create_time_tracking_shift_differential_v1.py +bamboohr_sdk/models/shift_differential_create_time_tracking_shift_differential_v1_times_inner.py +bamboohr_sdk/models/shift_differential_paginated_response_data_v1.py +bamboohr_sdk/models/shift_differential_paginated_response_data_v1_meta.py +bamboohr_sdk/models/shift_differential_paginated_time_tracking_shift_differentials_response_v1.py +bamboohr_sdk/models/shift_differential_time_tracking_shift_differential_time_v1.py +bamboohr_sdk/models/shift_differential_time_tracking_shift_differential_v1.py +bamboohr_sdk/models/shift_differential_update_time_tracking_shift_differential_v1.py +bamboohr_sdk/models/standard_api_error_response.py bamboohr_sdk/models/state.py bamboohr_sdk/models/state_province_response_schema.py bamboohr_sdk/models/state_province_schema.py @@ -282,28 +577,53 @@ bamboohr_sdk/models/time_off_types_and_default_hours.py bamboohr_sdk/models/time_off_types_and_default_hours_default_hours_inner.py bamboohr_sdk/models/time_off_types_and_default_hours_time_off_types_inner.py bamboohr_sdk/models/time_tracking_break_policy_employee_collection_v1_inner.py +bamboohr_sdk/models/time_tracking_break_policy_suggestions_response_v1.py +bamboohr_sdk/models/time_tracking_break_policy_suggestions_response_v1_suggested_policies_inner.py +bamboohr_sdk/models/time_tracking_break_policy_suggestions_response_v1_suggested_policies_inner_breaks_inner.py bamboohr_sdk/models/time_tracking_bulk_response_schema.py bamboohr_sdk/models/time_tracking_bulk_response_schema_response.py +bamboohr_sdk/models/time_tracking_bulk_upsert_employee_time_tracking_data_accepted_v1.py +bamboohr_sdk/models/time_tracking_bulk_upsert_employee_time_tracking_data_record_v1.py +bamboohr_sdk/models/time_tracking_clock_entry_location_v1.py +bamboohr_sdk/models/time_tracking_clock_entry_paginated_response_data_v1.py +bamboohr_sdk/models/time_tracking_clock_entry_paginated_response_data_v1_meta.py +bamboohr_sdk/models/time_tracking_clock_entry_v1.py +bamboohr_sdk/models/time_tracking_configuration_paginated_response_data_v1.py +bamboohr_sdk/models/time_tracking_configuration_paginated_response_data_v1_links.py +bamboohr_sdk/models/time_tracking_configuration_paginated_response_data_v1_links_next.py +bamboohr_sdk/models/time_tracking_configuration_paginated_response_data_v1_links_prev.py +bamboohr_sdk/models/time_tracking_configuration_paginated_response_data_v1_meta.py +bamboohr_sdk/models/time_tracking_create_clock_in_v1.py +bamboohr_sdk/models/time_tracking_create_clock_out_v1.py bamboohr_sdk/models/time_tracking_create_or_update_time_tracking_break_without_policy_v1.py bamboohr_sdk/models/time_tracking_create_time_tracking_break_policy_v1.py bamboohr_sdk/models/time_tracking_create_time_tracking_break_v1.py +bamboohr_sdk/models/time_tracking_create_time_tracking_configuration_v1.py bamboohr_sdk/models/time_tracking_delete_response_schema.py +bamboohr_sdk/models/time_tracking_employee_enrollment_paginated_response_data_v1.py +bamboohr_sdk/models/time_tracking_employee_time_tracking_data_v1.py +bamboohr_sdk/models/time_tracking_hour_entry_paginated_response_data_v1.py +bamboohr_sdk/models/time_tracking_hour_entry_v1.py bamboohr_sdk/models/time_tracking_id_response_schema.py bamboohr_sdk/models/time_tracking_offset_paginated_response_data_v1.py bamboohr_sdk/models/time_tracking_offset_paginated_response_data_v1_links.py -bamboohr_sdk/models/time_tracking_offset_paginated_response_data_v1_links_next.py -bamboohr_sdk/models/time_tracking_offset_paginated_response_data_v1_links_prev.py bamboohr_sdk/models/time_tracking_offset_paginated_response_data_v1_meta.py +bamboohr_sdk/models/time_tracking_page_paginated_response_data_v1.py bamboohr_sdk/models/time_tracking_paginated_break_assessments_response_v1.py bamboohr_sdk/models/time_tracking_paginated_break_policies_response_v1.py bamboohr_sdk/models/time_tracking_paginated_break_policy_employees_response_v1.py bamboohr_sdk/models/time_tracking_paginated_breaks_response_v1.py +bamboohr_sdk/models/time_tracking_paginated_clock_entries_response_v1.py +bamboohr_sdk/models/time_tracking_paginated_employee_time_tracking_data_response_v1.py +bamboohr_sdk/models/time_tracking_paginated_hour_entries_response_v1.py +bamboohr_sdk/models/time_tracking_paginated_time_tracking_configurations_response_v1.py +bamboohr_sdk/models/time_tracking_paginated_time_tracking_kiosks_response_v1.py +bamboohr_sdk/models/time_tracking_paginated_time_tracking_time_clocks_response_v1.py +bamboohr_sdk/models/time_tracking_paginated_timesheets_response_v1.py +bamboohr_sdk/models/time_tracking_paginated_timesheets_response_v1_meta.py bamboohr_sdk/models/time_tracking_project_with_tasks_and_employee_ids.py bamboohr_sdk/models/time_tracking_record.py bamboohr_sdk/models/time_tracking_record_schema.py -bamboohr_sdk/models/time_tracking_record_schema_project.py -bamboohr_sdk/models/time_tracking_record_schema_project_task.py -bamboohr_sdk/models/time_tracking_record_schema_shift_differential.py bamboohr_sdk/models/time_tracking_sync_time_tracking_break_policy_v1.py bamboohr_sdk/models/time_tracking_task.py bamboohr_sdk/models/time_tracking_time_tracking_break_assessment_v1.py @@ -312,33 +632,94 @@ bamboohr_sdk/models/time_tracking_time_tracking_break_availability_v1.py bamboohr_sdk/models/time_tracking_time_tracking_break_policy_v1.py bamboohr_sdk/models/time_tracking_time_tracking_break_policy_with_relations_v1.py bamboohr_sdk/models/time_tracking_time_tracking_break_v1.py +bamboohr_sdk/models/time_tracking_time_tracking_configuration_v1.py +bamboohr_sdk/models/time_tracking_time_tracking_hour_entry_v1.py +bamboohr_sdk/models/time_tracking_time_tracking_kiosk_v1.py +bamboohr_sdk/models/time_tracking_time_tracking_time_clock_v1.py +bamboohr_sdk/models/time_tracking_timesheet_v1.py +bamboohr_sdk/models/time_tracking_update_clock_entry_v1.py +bamboohr_sdk/models/time_tracking_update_employee_time_tracking_data_v1.py bamboohr_sdk/models/time_tracking_update_time_tracking_break_policy_v1.py bamboohr_sdk/models/time_tracking_update_time_tracking_break_v1.py +bamboohr_sdk/models/time_tracking_update_time_tracking_configuration_v1.py +bamboohr_sdk/models/time_tracking_update_time_tracking_kiosk_v1.py +bamboohr_sdk/models/time_tracking_update_time_tracking_time_clock_v1.py bamboohr_sdk/models/timesheet_entry_info_api_transformer.py -bamboohr_sdk/models/timesheet_entry_info_api_transformer_break_info.py +bamboohr_sdk/models/timesheet_timesheet_daily_entry_v1.py +bamboohr_sdk/models/timesheet_timesheet_daily_summary_v1.py bamboohr_sdk/models/timezone_list_response.py bamboohr_sdk/models/timezone_resource.py +bamboohr_sdk/models/total_rewards_benefit_details_values.py +bamboohr_sdk/models/total_rewards_benefit_section_values.py +bamboohr_sdk/models/total_rewards_calendar_section_values.py +bamboohr_sdk/models/total_rewards_comp_summary_values.py +bamboohr_sdk/models/total_rewards_custom_disclaimer_info.py +bamboohr_sdk/models/total_rewards_employee_statement.py +bamboohr_sdk/models/total_rewards_equity_details_values.py +bamboohr_sdk/models/total_rewards_equity_estimated_valuation_values.py +bamboohr_sdk/models/total_rewards_equity_growth_chart_item.py +bamboohr_sdk/models/total_rewards_equity_growth_estimation.py +bamboohr_sdk/models/total_rewards_equity_section_values.py +bamboohr_sdk/models/total_rewards_extra_pay_details_values.py +bamboohr_sdk/models/total_rewards_extra_pay_section_values.py +bamboohr_sdk/models/total_rewards_holiday_value.py +bamboohr_sdk/models/total_rewards_onboarding_step.py +bamboohr_sdk/models/total_rewards_overview_section_values.py +bamboohr_sdk/models/total_rewards_time_off_policy_value.py +bamboohr_sdk/models/total_rewards_timeline_item.py +bamboohr_sdk/models/total_rewards_timeline_item_label.py +bamboohr_sdk/models/total_rewards_timeline_section_values.py bamboohr_sdk/models/training_category.py bamboohr_sdk/models/training_record.py bamboohr_sdk/models/training_record_map.py bamboohr_sdk/models/training_record_type.py bamboohr_sdk/models/training_type.py bamboohr_sdk/models/training_type_category.py -bamboohr_sdk/models/training_type_due_from_hire_date.py -bamboohr_sdk/models/training_type_due_from_hire_date_one_of.py bamboohr_sdk/models/transformed_api_employee_goal_details.py bamboohr_sdk/models/transformed_api_employee_goal_details_goal.py bamboohr_sdk/models/transformed_api_goal.py -bamboohr_sdk/models/transformed_api_goal_actions.py bamboohr_sdk/models/transformed_api_goal_milestones_inner.py +bamboohr_sdk/models/unarchive_custom_fields_request.py +bamboohr_sdk/models/unarchive_custom_fields_response.py bamboohr_sdk/models/unassign_employees_from_break_policy_request.py bamboohr_sdk/models/update_applicant_status_request.py bamboohr_sdk/models/update_applicant_status_response.py +bamboohr_sdk/models/update_company_industry_codes400_response.py +bamboohr_sdk/models/update_company_industry_codes403_response.py +bamboohr_sdk/models/update_company_industry_codes404_response.py +bamboohr_sdk/models/update_company_industry_codes500_response.py +bamboohr_sdk/models/update_company_industry_codes_response.py +bamboohr_sdk/models/update_company_name_bad_request_response.py +bamboohr_sdk/models/update_company_name_bad_request_response_error.py +bamboohr_sdk/models/update_company_name_forbidden_response.py +bamboohr_sdk/models/update_company_name_forbidden_response_error.py +bamboohr_sdk/models/update_company_name_internal_error_response.py +bamboohr_sdk/models/update_company_name_success_response.py +bamboohr_sdk/models/update_compensation_benchmark_request.py +bamboohr_sdk/models/update_compensation_benchmark_source_item.py +bamboohr_sdk/models/update_compensation_benchmark_sources_request.py +bamboohr_sdk/models/update_compensation_benchmark_sources_response.py bamboohr_sdk/models/update_employee_training_record_request.py +bamboohr_sdk/models/update_employee_verification_integration_request.py +bamboohr_sdk/models/update_employee_verification_request.py +bamboohr_sdk/models/update_goal_comment_request.py +bamboohr_sdk/models/update_goal_milestone_progress_request.py +bamboohr_sdk/models/update_goal_progress_request.py +bamboohr_sdk/models/update_goal_sharing_request.py +bamboohr_sdk/models/update_goal_v1.py +bamboohr_sdk/models/update_goal_v11_request.py +bamboohr_sdk/models/update_goal_v11_request_milestones_inner.py +bamboohr_sdk/models/update_location_request.py +bamboohr_sdk/models/update_location_request_address.py +bamboohr_sdk/models/update_pay_bands_request.py bamboohr_sdk/models/update_training_category_request.py bamboohr_sdk/models/update_training_type_request.py bamboohr_sdk/models/update_training_type_request_category.py bamboohr_sdk/models/update_webhook_bad_request_response.py +bamboohr_sdk/models/updated_compensation_benchmark.py +bamboohr_sdk/models/updated_compensation_benchmark_saved_benchmark.py +bamboohr_sdk/models/upload_employee_photo_request1.py +bamboohr_sdk/models/user_permission_data.py bamboohr_sdk/models/web_hook_post_field_data_object.py bamboohr_sdk/models/web_hook_post_field_page_data_object.py bamboohr_sdk/models/web_hook_post_field_response_object.py @@ -362,60 +743,91 @@ bamboohr_sdk/models/webhook_sub_error_property_unknown_fields_inner_id.py bamboohr_sdk/models/webhooks_list.py bamboohr_sdk/models/webhooks_list_webhooks_inner.py bamboohr_sdk/models/whos_out_entry.py -bamboohr_sdk/models/xml_directory_employee.py -bamboohr_sdk/models/xml_directory_employee_employees.py -bamboohr_sdk/models/xml_directory_employee_employees_employee_inner.py -bamboohr_sdk/models/xml_directory_employee_employees_employee_inner_field_inner.py -bamboohr_sdk/models/xml_directory_employee_fieldset.py -bamboohr_sdk/models/xml_directory_employee_fieldset_field_inner.py +bamboohr_sdk/models/whos_out_list_response_v1.py +bamboohr_sdk/models/whos_out_list_response_v1_links.py +bamboohr_sdk/models/whos_out_list_response_v1_links_next.py +bamboohr_sdk/models/whos_out_list_response_v1_links_prev.py +bamboohr_sdk/models/whos_out_list_response_v1_meta.py +bamboohr_sdk/models/whos_out_person_v1.py +bamboohr_sdk/models/whos_out_v1.py bamboohr_sdk/models/xml_employee_files.py bamboohr_sdk/models/xml_employee_files_category_inner.py bamboohr_sdk/models/xml_employee_files_category_inner_file_inner.py bamboohr_sdk/py.typed bamboohr_sdk/rest.py +docs/A05b6d5f564f805d688ff2c1e37c3990Request.md docs/AccountInformationApi.md +docs/AddCustomFieldListValueRequest.md +docs/AddCustomFieldListValueResponse.md +docs/AddCustomFieldListValueResponseOneOfInner.md +docs/AddCycleAdminsResponse.md +docs/AddCycleAdminsResponseAddedInner.md +docs/AddCycleAdminsResponseSkippedInner.md +docs/AddTotalRewardsEmployeesRequest.md docs/AdjustTimeOffBalance.md docs/AdjustTimeTrackingRequestSchema.md +docs/AlertConfigurationV1.md +docs/AlertConfigurationWriteV1.md +docs/AlertTemplateListResponseV1.md +docs/AlertTemplateListResponseV1AlertsInner.md +docs/AlertsApi.md docs/AlignmentOptionsResponse.md docs/AlignmentOptionsResponseAlignsWithOptionsInner.md docs/ApplicantStatus.md docs/ApplicantTrackingApi.md docs/ApplicationDetails.md docs/ApplicationDetailsApplicant.md -docs/ApplicationDetailsApplicantAddress.md -docs/ApplicationDetailsApplicantEducation.md -docs/ApplicationDetailsApplicantEducationLevel.md docs/ApplicationDetailsAttachmentsInner.md docs/ApplicationDetailsJob.md -docs/ApplicationDetailsJobHiringLead.md -docs/ApplicationDetailsJobHiringLeadJobTitle.md docs/ApplicationDetailsJobTitle.md docs/ApplicationDetailsQuestionsAndAnswersInner.md docs/ApplicationDetailsQuestionsAndAnswersInnerAnswer.md docs/ApplicationDetailsQuestionsAndAnswersInnerQuestion.md docs/ApplicationDetailsStatus.md -docs/ApplicationDetailsStatusChangedByUser.md -docs/ApplicationDetailsStatusChangedByUserJobTitle.md docs/ApplicationsList.md docs/ApplicationsListApplicationsInner.md docs/ApplicationsListApplicationsInnerApplicant.md docs/ApplicationsListApplicationsInnerJob.md docs/ApplicationsListApplicationsInnerJobTitle.md docs/ApplicationsListApplicationsInnerStatus.md +docs/ApproveTimesheetRequest.md +docs/ArchiveCustomFieldResponse.md +docs/ArchivedCustomFieldsListResponse.md docs/AssignEmployeesToBreakPolicyRequest.md -docs/AssignTimeOffPoliciesRequestInner.md +docs/AssignTimeOffPoliciesV1RequestInner.md docs/AssignedTimeOffPolicy.md docs/AssignedTimeOffPolicyV11.md docs/AvailableAction.md -docs/BadRequest.md -docs/BadRequestError.md +docs/BadRequestV1.md +docs/BadRequestV1Error.md +docs/BankHoliday.md docs/BenefitCoveragesResponse.md docs/BenefitCoveragesResponseBenefitCoveragesInner.md docs/BenefitDeductionSubType.md docs/BenefitDeductionType.md docs/BenefitDeductionTypeId.md docs/BenefitsApi.md +docs/BudgetBreakdownImportResponse.md +docs/BudgetGuidelinesView.md +docs/BudgetGuidelinesWarnings.md +docs/C79f9c5950f983e59d2626faa30c00a1Request.md +docs/C7c32ed5278ac67e2e518bf7484a75dcRequest.md +docs/CalendarAnniversaryCalendarEventV1.md +docs/CalendarBirthdayCalendarEventV1.md +docs/CalendarCalendarEventPersonV1.md +docs/CalendarCalendarEventsListResponseV1.md +docs/CalendarCalendarEventsListResponseV1DataInner.md +docs/CalendarCalendarEventsListResponseV1Links.md +docs/CalendarCalendarEventsListResponseV1LinksNext.md +docs/CalendarCalendarEventsListResponseV1LinksPrev.md +docs/CalendarCalendarEventsListResponseV1Meta.md +docs/CalendarEventsApi.md +docs/CalendarHolidayCalendarEventV1.md +docs/CalendarTimeOffCalendarEventV1.md docs/CanCreateGoalsResponse.md +docs/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md +docs/ChangeCustomFieldListValueRequest.md +docs/ChangeTrackingApi.md docs/ChangedEmployeeIdsResponse.md docs/ChangedEmployeeIdsResponseEmployeesValue.md docs/ChangedEmployeeTableDataResponse.md @@ -423,10 +835,14 @@ docs/ChangedEmployeeTableDataResponseEmployeesValue.md docs/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.md docs/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.md docs/ClockEntriesSchema.md +docs/ClockEntryClockEntryLocationInputV1.md +docs/ClockEntryCreateClockEntryV1.md docs/ClockEntryIdsSchema.md docs/ClockEntrySchema.md docs/ClockInRequestSchema.md docs/ClockOutRequestSchema.md +docs/CloseGoalRequest.md +docs/CompanyApi.md docs/CompanyBenefitSummary.md docs/CompanyBenefitsListResponse.md docs/CompanyDeletedWebhookPayload.md @@ -435,42 +851,112 @@ docs/CompanyFilesApi.md docs/CompanyFilesResponse.md docs/CompanyFilesResponseCategoriesInner.md docs/CompanyFilesResponseCategoriesInnerFilesInner.md +docs/CompanyIndustryDataObject.md docs/CompanyInformation.md docs/CompanyInformationAddress.md docs/CompanyIntegrationsUpdatedWebhookPayload.md docs/CompanyIntegrationsUpdatedWebhookPayloadData.md docs/CompanyProfileApi.md +docs/CompanyProfileData.md +docs/CompanyProfileDataAddress.md docs/CompanyProfileIntegrations.md docs/CompanyUpdatedWebhookPayload.md +docs/CompensationApi.md +docs/CompensationBenchmarkDetailEmployee.md +docs/CompensationBenchmarkDetailEmployeeJobTitle.md +docs/CompensationBenchmarkDetailEmployeeSalary.md +docs/CompensationBenchmarkDetails.md +docs/CompensationBenchmarkDetailsBenchmarkValuesInner.md +docs/CompensationBenchmarkJobLocationEmployee.md +docs/CompensationBenchmarkJobLocationEmployeeSalary.md +docs/CompensationBenchmarkJobLocationPair.md +docs/CompensationBenchmarkJobLocationPairJobDetails.md +docs/CompensationBenchmarkOverview.md +docs/CompensationBenchmarkOverviewValues.md +docs/CompensationBenchmarkSource.md +docs/CompensationBenchmarkingApi.md +docs/CompensationBenchmarkingColumnMap.md +docs/CompensationBenchmarksList.md +docs/CompensationEquitySettingsResponse.md +docs/CompensationEquitySettingsResponseCompanyValuation.md +docs/CompensationEquitySettingsResponseDisclaimers.md +docs/CompensationEquitySettingsResponseOutstandingShares.md +docs/CompensationEquitySettingsResponsePricePerShare.md +docs/CompensationEquitySettingsResponseSliderMin.md +docs/CompensationEquitySettingsResponseVestingConditions.md +docs/CompensationEquitySettingsUpdateRequest.md +docs/CompensationPlanningApi.md +docs/CompensationPlanningCycleAdminsResponse.md +docs/CompensationPlanningCycleAdminsResponseAdminsInner.md +docs/CompensationPlanningCycleCompleteResponse.md +docs/CompensationPlanningCycleCompleteResponseErrorsInner.md +docs/CompensationToolsDataObject.md +docs/CompensationToolsResponse.md +docs/CompensationUpsellData.md +docs/CompletedQuestionsAndResponseDataObject.md +docs/ConversionRateDataObject.md +docs/CountriesOptionsResponse.md docs/Country.md docs/CountrySchema.md docs/CreateApplicationCommentRequest.md docs/CreateCandidateResponse.md docs/CreateCommentResponse.md +docs/CreateCompensationBenchmarkRequest.md +docs/CreateCompensationBenchmarkSourceRequest.md docs/CreateEmployeeTrainingRecordRequest.md docs/CreateEmployeeTrainingRecordRequestCost.md +docs/CreateGoalCommentRequest.md +docs/CreateGoalRequest.md +docs/CreateGoalRequestMilestonesInner.md docs/CreateJobOpeningResponse.md +docs/CreateLocationRequest.md +docs/CreateLocationRequestAddress.md docs/CreateTrainingCategoryRequest.md docs/CreateTrainingTypeRequest.md docs/CreateTrainingTypeRequestCategory.md -docs/CreateTrainingTypeRequestDueFromHireDate.md -docs/CreateTrainingTypeRequestDueFromHireDateOneOf.md docs/CreateWebhookBadRequestResponse.md +docs/CreatedCompensationBenchmark.md +docs/CreatedCompensationBenchmarkSavedBenchmark.md +docs/CreatedCompensationBenchmarkSource.md +docs/CreatedTimeOffRequest.md +docs/CreatedTimeOffRequestAmount.md +docs/CreatedTimeOffRequestNotes.md +docs/CreatedTimeOffRequestStatus.md +docs/CreatedTimeOffRequestType.md +docs/CurrencyConversionsResponse.md docs/CursorPagedResponseMetadata.md docs/CursorPagesResponse.md -docs/CursorPaginationQueryObject.md +docs/CustomFieldDefinitionResponseObject.md +docs/CustomFieldDefinitionResponseObjectValuesInner.md +docs/CustomFieldRequest.md +docs/CustomFieldTypeViewObject.md +docs/CustomFieldViewObject.md +docs/CustomFieldsApi.md +docs/CustomFieldsListResponse.md +docs/CustomReportResponse.md +docs/CustomReportResponseFieldsInner.md docs/CustomReportsApi.md +docs/Dacd313af2106213fc4696175941ce65Request.md docs/DataRequest.md -docs/DataRequestAggregationsInner.md +docs/DataRequestAggregations.md docs/DataRequestFilters.md docs/DataRequestFiltersFiltersInner.md docs/DataRequestSortByInner.md -docs/Dataset.md +docs/DatasetDataResponseV2.md +docs/DatasetDataResponseV2DataInner.md +docs/DatasetDataResponseV2DataInnerFieldsValue.md +docs/DatasetDataResponseV2Links.md +docs/DatasetDataResponseV2Meta.md docs/DatasetFieldsResponse.md -docs/DatasetResponse.md +docs/DatasetResponseV1.md +docs/DatasetV1.md docs/DatasetsApi.md -docs/DatasetsResponse.md -docs/DatasetsResponseDatasetsInner.md +docs/DatasetsResponseV12.md +docs/DatasetsResponseV12DatasetsInner.md +docs/DeleteCompensationBenchmarkSourceRequest.md +docs/DeleteCompensationBenchmarkSourceResponse.md +docs/DetailsAndCurrencyRequestDataObject.md +docs/Ec1ba8e76f33960b018d0d7518fe97b5Request.md docs/Employee.md docs/EmployeeBenefitFilters.md docs/EmployeeBenefitFiltersFilters.md @@ -479,6 +965,7 @@ docs/EmployeeBenefitsListResponseEmployeeBenefitsInner.md docs/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.md docs/EmployeeCreatedWebhookPayload.md docs/EmployeeCreatedWebhookPayloadData.md +docs/EmployeeCursorPaginationQueryObject.md docs/EmployeeDeletedWebhookPayload.md docs/EmployeeDeletedWebhookPayloadData.md docs/EmployeeDependent.md @@ -486,36 +973,66 @@ docs/EmployeeDependentsResponse.md docs/EmployeeDependentsResponseEmployeeDependentsInner.md docs/EmployeeFileUpdate.md docs/EmployeeFilesApi.md +docs/EmployeeOptionalField.md +docs/EmployeePhotoJsonResponse.md docs/EmployeeResponse.md docs/EmployeeResponseAggregationsInner.md +docs/EmployeeStringCodeErrorResponseV1.md +docs/EmployeeStringCodeErrorResponseV1Error.md docs/EmployeeTableRow.md -docs/EmployeeTableRowValue.md -docs/EmployeeTableRowValueAnyOfInner.md +docs/EmployeeTablesApi.md docs/EmployeeTimeOffPolicyAssignment.md docs/EmployeeTimeOffPolicyAssignmentV11.md +docs/EmployeeTimeOffRequestApproverResponseInner.md docs/EmployeeTimesheetEntryTransformer.md docs/EmployeeUpdatedWebhookPayload.md docs/EmployeeUpdatedWebhookPayloadData.md docs/EmployeeValue.md docs/EmployeeValueAnyOfInner.md +docs/EmployeeVerificationApi.md +docs/EmployeeVerificationIntegration.md +docs/EmployeeVerificationIntegrationResponse.md +docs/EmployeeVerificationLifecycleEmailAcceptedResponse.md +docs/EmployeeVerificationPublicApiRecord.md +docs/EmployeeVerificationUpdateResponse.md +docs/EmployeeVerificationsListResponse.md docs/EmployeesApi.md +docs/EmployeesDirectoryJsonResponse.md +docs/EmployeesDirectoryJsonResponseFieldsInner.md +docs/EmployeesDirectoryXmlResponse.md +docs/EmployeesDirectoryXmlResponseEmployees.md +docs/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.md +docs/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.md +docs/EmployeesDirectoryXmlResponseFieldset.md +docs/EmployeesDirectoryXmlResponseFieldsetFieldInner.md +docs/ErrorResponse.md +docs/ErrorResponseError.md +docs/F3883a522dadbe9e11b34f8b656e3adbRequest.md docs/Field1.md docs/Field1Id.md -docs/FieldList.md -docs/FieldListFieldsInner.md docs/FieldOptionsRequestSchema.md docs/FieldOptionsRequestSchemaDependentFieldsValueInner.md docs/FieldOptionsTransformer.md -docs/Forbidden.md +docs/FieldOptionsTransformerId.md +docs/ForbiddenV1.md +docs/ForbiddenV1Error.md +docs/GetBreakPolicySuggestionsRequest.md docs/GetCompanyReportResponse.md +docs/GetCompanyReportResponseEmployeesInner.md +docs/GetDataFromDatasetV2Request.md +docs/GetEmployeeResponse.md +docs/GetEmployeesEmployeeBaseResponse.md docs/GetEmployeesEmployeeResponse.md +docs/GetEmployeesEmployeeResponseAllOfOvertimeRate.md +docs/GetEmployeesEmployeeResponseAllOfPayRate.md +docs/GetEmployeesEmployeeResponseAllOfTeams.md docs/GetEmployeesFilterRequestObject.md docs/GetEmployeesResponseObject.md docs/GetEmployeesResponseObjectLinks.md docs/GetEmployeesResponseObjectLinksNext.md docs/GetEmployeesResponseObjectLinksPrev.md docs/GetEmployeesResponseObjectLinksSelf.md -docs/Goal.md +docs/GlobalHolidayGlobalHolidayV1.md docs/GoalAggregate.md docs/GoalAggregateAlignsWithOptionsInner.md docs/GoalAggregateCommentsInner.md @@ -528,6 +1045,7 @@ docs/GoalFiltersV11.md docs/GoalFiltersV11FiltersInner.md docs/GoalFiltersV11FiltersInnerActions.md docs/GoalFiltersV1FiltersInner.md +docs/GoalResponse.md docs/GoalsAggregateV1.md docs/GoalsAggregateV11.md docs/GoalsAggregateV11CommentsInner.md @@ -538,37 +1056,73 @@ docs/GoalsAggregateV1PersonsInner.md docs/GoalsApi.md docs/GoalsList.md docs/HiringLead.md +docs/HolidayBulkInsertCompanyHolidayErrorV1.md +docs/HolidayBulkInsertCompanyHolidayRecordV1.md +docs/HolidayBulkInsertCompanyHolidaysFailureResponseV1.md +docs/HolidayBulkInsertCompanyHolidaysResponseV1.md +docs/HolidayCatalogHolidayListResponseV1.md +docs/HolidayCatalogHolidayListResponseV1Links.md +docs/HolidayCompanyHolidayAudienceV1.md +docs/HolidayCompanyHolidayListResponseV1.md +docs/HolidayCompanyHolidayListResponseV1Links.md +docs/HolidayCompanyHolidayListResponseV1Meta.md +docs/HolidayCompanyHolidayPayStatusHoursV1.md +docs/HolidayCompanyHolidayV1.md +docs/HolidayCreateCompanyHolidayRequestV1.md +docs/HolidayUpdateCompanyHolidayRequestV1.md +docs/HolidaysApi.md docs/HourEntriesRequestSchema.md +docs/HourEntryCreateHourEntryV1.md docs/HourEntryIdsSchema.md +docs/HourEntryPatchHourEntryV1.md docs/HourEntrySchema.md docs/HoursApi.md -docs/InvalidRequest.md -docs/InvalidRequestError.md +docs/ImportCompensationBenchmarksResponse.md +docs/Industry.md +docs/InlineObject.md +docs/InlineObject1.md +docs/InlineObject1EmployeesInner.md +docs/InlineObject1Status.md +docs/InlineObject2.md +docs/InlineObject2Inner.md docs/JobSummary.md -docs/JobSummaryDepartment.md -docs/JobSummaryHiringLead.md -docs/JobSummaryLocation.md docs/JobSummaryStatus.md -docs/JsonDirectoryEmployee.md -docs/JsonDirectoryEmployeeFieldsInner.md docs/JsonEmployeeFiles.md docs/JsonEmployeeFilesCategoriesInner.md docs/JsonEmployeeFilesCategoriesInnerFilesInner.md docs/JsonEmployeeFilesEmployee.md -docs/LastChangeInformationApi.md +docs/LegacyReportFieldMapResponse.md +docs/LegacyReportFieldMapResponseMappingsInner.md +docs/LegacyReportIDMapResponse.md +docs/LegacyReportIDMapResponseMappingsInner.md +docs/LevelsAndBandsColumnMap.md +docs/LevelsAndBandsGroupStatusCounts.md +docs/LevelsAndBandsJobTitleAssignment.md +docs/LevelsAndBandsJobTitleAssignmentsRequest.md +docs/LevelsAndBandsPayBandValue.md +docs/LevelsAndBandsUploadResponse.md docs/ListFieldDetail.md docs/ListFieldOption.md docs/ListFieldValues.md docs/ListFieldValuesOptionsInner.md +docs/ListFieldValuesXml.md +docs/ListFieldValuesXmlOptionInner.md docs/ListUsersResponseValue.md docs/ListUsersXmlResponse.md docs/ListUsersXmlResponseUserInner.md +docs/ListValueViewObject.md docs/Location.md +docs/LocationResponseObject.md +docs/LocationResponseObjectAddress.md +docs/LocationResponseObjectAddressCountry.md +docs/LocationResponseObjectAddressState.md +docs/LocationsApi.md docs/LoginApi.md docs/LoginFailureResponse.md docs/LoginFailureXmlResponse.md docs/LoginResponse.md docs/LoginXmlResponse.md +docs/MealRestBreaksApi.md docs/MemberBenefitEvent.md docs/MemberBenefitEventCoveragesInner.md docs/MemberBenefitEventCoveragesInnerEventsInner.md @@ -583,28 +1137,113 @@ docs/MemberBenefitsGetSuccessResponseLinksNext.md docs/MemberBenefitsGetSuccessResponseLinksPrev.md docs/MemberBenefitsGetSuccessResponseMeta.md docs/MemberBenefitsGetValidationErrorResponse.md +docs/MetaCompanyPropertiesResponse.md +docs/MetaCurrencyTypeItem.md +docs/Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md +docs/Model1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.md +docs/Model1d64402ee192568adbd5e3179a91e6e2RequestInner.md +docs/Model1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.md +docs/Model288aa996aba16d7a495c62321ea999a9Request.md +docs/Model288aa996aba16d7a495c62321ea999a9RequestSentDateTime.md +docs/Model3958585c861325ea7a2cd30a8c74f042Request.md +docs/Model89a5068111ec499135c7d6e9a53d5a30Request.md docs/ModelField.md +docs/MonitorFieldList.md +docs/MonitorFieldListFieldsInner.md +docs/NewHirePacketGtkyAnswerVisibilityItem.md +docs/NewHirePacketGtkyAnswerVisibilityRequest.md +docs/NewHirePacketGtkyAnswerVisibilityResponse.md +docs/NewHirePacketPublicApi.md +docs/NewHirePacketPublicApiWritableBody.md +docs/NewHirePacketsListResponse.md +docs/NewHireWidgetItem.md +docs/NewHireWidgetResponse.md docs/NewWebHook.md +docs/OnboardingApi.md +docs/OnboardingExperiencePublicApi.md +docs/OnboardingExperiencesListResponse.md +docs/PagedLocationResponse.md docs/PagedResponse.md docs/Pagination.md docs/PaginationMetaData.md +docs/PatchCompanyProfileCompanyInformationRequest.md +docs/PatchCompanyProfileCompanyInformationRequestAddress.md +docs/PayGradesAndBandsConfigurationStatus.md +docs/PayGradesAndBandsConfigurationStatusJobTitles.md +docs/PayGradesAndBandsConfigurationStatusJobTitlesWarningsInner.md +docs/PayGradesAndBandsConfigurationStatusLevels.md +docs/PayGradesAndBandsConfigurationStatusLevelsErrorsInner.md +docs/PayGradesAndBandsConfigurationStatusPayBands.md +docs/PayGradesAndBandsConfigurationStatusReview.md +docs/PayGradesAndBandsDeleteGroupsResponse.md +docs/PayGradesAndBandsDeleteHierarchyGroup.md +docs/PayGradesAndBandsDeleteHierarchyJobTitle.md +docs/PayGradesAndBandsDeleteHierarchyLevel.md +docs/PayGradesAndBandsDeleteLevelResponse.md +docs/PayGradesAndBandsDeleteResponse.md +docs/PayGradesAndBandsJobTitleAssignmentsGroup.md +docs/PayGradesAndBandsJobTitleAssignmentsJobTitle.md +docs/PayGradesAndBandsJobTitleAssignmentsLevel.md +docs/PayGradesAndBandsJobTitleAssignmentsResponse.md +docs/PayGradesAndBandsJobTitleEmployee.md +docs/PayGradesAndBandsJobTitleWithEmployees.md +docs/PayGradesAndBandsLevel.md +docs/PayGradesAndBandsLevelJobTitle.md +docs/PayGradesAndBandsLevelsGroup.md +docs/PayGradesAndBandsLevelsResponse.md +docs/PayGradesAndBandsPayBandJobTitle.md +docs/PayGradesAndBandsPayBandLevel.md +docs/PayGradesAndBandsPayBandsGroup.md +docs/PayGradesAndBandsPayBandsResponse.md +docs/PayGradesAndBandsPublishResponse.md +docs/PayGradesAndBandsPublishedGroup.md +docs/PayGradesAndBandsPublishedJobTitle.md +docs/PayGradesAndBandsPublishedLevel.md +docs/PayGradesAndBandsPublishedResponse.md +docs/PayGradesAndBandsReviewGroup.md +docs/PayGradesAndBandsReviewJobTitle.md +docs/PayGradesAndBandsReviewLevel.md +docs/PayGradesAndBandsReviewResponse.md +docs/PayGradesAndBandsSaveLevelsResponse.md +docs/PayGradesAndBandsUpdateJobTitlesResponse.md +docs/PayGradesAndBandsUpdateLevel.md +docs/PayGradesAndBandsUpdateLevelsGroup.md +docs/PayGradesAndBandsUpdateLevelsRequest.md +docs/PayGradesAndBandsUpdatePayBandItem.md +docs/PayGradesAndBandsUpdatePayBandsResponse.md +docs/PayGradesBandsApi.md docs/PersonInfoApiTransformer.md docs/PhotosApi.md -docs/PostGoalCommentRequest.md -docs/PostGoalRequest.md -docs/PostGoalRequestMilestonesInner.md docs/PostNewEmployee.md docs/ProblemDetailsResponse.md +docs/ProblemDetailsResponseV2.md docs/ProjectCreateRequestSchema.md +docs/ProjectCreateTimeTrackingProjectTaskV1.md +docs/ProjectCreateTimeTrackingProjectV1.md +docs/ProjectCreateTimeTrackingProjectV1TasksInner.md docs/ProjectInfoApiTransformer.md docs/ProjectInfoApiTransformerProject.md -docs/ProjectInfoApiTransformerTask.md -docs/PutGoalCommentRequest.md -docs/PutGoalMilestoneProgressRequest.md -docs/PutGoalProgressRequest.md -docs/PutGoalSharedWithRequest.md -docs/PutGoalV11Request.md -docs/PutGoalV11RequestMilestonesInner.md +docs/ProjectLegacyErrorResponseV1.md +docs/ProjectLegacyErrorResponseV1Error.md +docs/ProjectPaginatedResponseDataV1.md +docs/ProjectPaginatedResponseDataV1Meta.md +docs/ProjectPaginatedTasksResponseV1.md +docs/ProjectPaginatedTasksResponseV1Links.md +docs/ProjectPaginatedTasksResponseV1Meta.md +docs/ProjectPaginatedTimeTrackingProjectsResponseV1.md +docs/ProjectStandardApiErrorResponseV1.md +docs/ProjectTimeTrackingProjectV1.md +docs/ProjectTimeTrackingTaskV1.md +docs/ProjectUpdateTimeTrackingProjectTaskV1.md +docs/ProjectUpdateTimeTrackingProjectV1.md +docs/ProvinceItem.md +docs/PublicCustomFieldTypesResponse.md +docs/PublicListValuesCustomFieldSettingsResponse.md +docs/PublicListValuesCustomFieldSettingsResponseValuesInner.md +docs/PutCompanyIndustryCodesRequest.md +docs/PutCompanyProfileDisplayNameRequest.md +docs/RemoveCycleAdminSelfResponse.md +docs/RemoveTotalRewardsEmployeesRequest.md docs/Report.md docs/ReportsApi.md docs/ReportsResponse.md @@ -615,14 +1254,52 @@ docs/RequestCustomReportFiltersLastChanged.md docs/RequestCustomReportResponse.md docs/RequestCustomReportResponseEmployeesInner.md docs/RequestCustomReportResponseFieldsInner.md +docs/SaveChangeCommTemplateResponse.md +docs/SchedulingApi.md +docs/SchedulingCreateScheduleRequestV1.md +docs/SchedulingCreateSchedulingShiftRequestV1.md +docs/SchedulingPublishShiftsFailureV1.md +docs/SchedulingPublishShiftsRequest.md +docs/SchedulingPublishShiftsResultV1.md +docs/SchedulingScheduleListResponseV1.md +docs/SchedulingScheduleListResponseV1Links.md +docs/SchedulingScheduleListResponseV1Meta.md +docs/SchedulingScheduleV1.md +docs/SchedulingSchedulingShiftAssessmentV1.md +docs/SchedulingSchedulingShiftAssessmentViolationV1.md +docs/SchedulingSchedulingShiftV1.md +docs/SchedulingShiftAssessmentListResponseV1.md +docs/SchedulingShiftAssessmentListResponseV1Meta.md +docs/SchedulingShiftListResponseV1.md +docs/SchedulingShiftListResponseV1Links.md +docs/SchedulingShiftListResponseV1LinksNext.md +docs/SchedulingShiftListResponseV1LinksPrev.md +docs/SchedulingShiftListResponseV1Meta.md +docs/SchedulingTimezoneListResponseV1.md +docs/SchedulingTimezoneListResponseV1Meta.md +docs/SchedulingTimezoneV1.md +docs/SchedulingUpdateScheduleRequestV1.md +docs/SchedulingUpdateSchedulingShiftRequestV1.md +docs/SendEmployeeVerificationLifecycleEmailByUserRequest.md +docs/SendRecommendationsResponse.md docs/SetBreakPolicyEmployeesRequest.md +docs/SetTotalRewardsCustomDisclaimerRequest.md +docs/SetTotalRewardsOnboardingStepRequest.md docs/ShareOptionsResponse.md +docs/ShiftDifferentialCreateTimeTrackingShiftDifferentialV1.md +docs/ShiftDifferentialCreateTimeTrackingShiftDifferentialV1TimesInner.md +docs/ShiftDifferentialPaginatedResponseDataV1.md +docs/ShiftDifferentialPaginatedResponseDataV1Meta.md +docs/ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1.md +docs/ShiftDifferentialTimeTrackingShiftDifferentialTimeV1.md +docs/ShiftDifferentialTimeTrackingShiftDifferentialV1.md +docs/ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1.md +docs/StandardApiErrorResponse.md docs/State.md docs/StateProvinceResponseSchema.md docs/StateProvinceSchema.md docs/TableRowDeleteResponse.md docs/TableRowUpdate.md -docs/TabularDataApi.md docs/TabularField.md docs/TabularFieldFieldsInner.md docs/TaskCreateSchema.md @@ -644,28 +1321,53 @@ docs/TimeOffTypesAndDefaultHoursDefaultHoursInner.md docs/TimeOffTypesAndDefaultHoursTimeOffTypesInner.md docs/TimeTrackingApi.md docs/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.md +docs/TimeTrackingBreakPolicySuggestionsResponseV1.md +docs/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.md +docs/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.md docs/TimeTrackingBulkResponseSchema.md docs/TimeTrackingBulkResponseSchemaResponse.md +docs/TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1.md +docs/TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1.md +docs/TimeTrackingClockEntryLocationV1.md +docs/TimeTrackingClockEntryPaginatedResponseDataV1.md +docs/TimeTrackingClockEntryPaginatedResponseDataV1Meta.md +docs/TimeTrackingClockEntryV1.md +docs/TimeTrackingConfigurationPaginatedResponseDataV1.md +docs/TimeTrackingConfigurationPaginatedResponseDataV1Links.md +docs/TimeTrackingConfigurationPaginatedResponseDataV1LinksNext.md +docs/TimeTrackingConfigurationPaginatedResponseDataV1LinksPrev.md +docs/TimeTrackingConfigurationPaginatedResponseDataV1Meta.md +docs/TimeTrackingCreateClockInV1.md +docs/TimeTrackingCreateClockOutV1.md docs/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md docs/TimeTrackingCreateTimeTrackingBreakPolicyV1.md docs/TimeTrackingCreateTimeTrackingBreakV1.md +docs/TimeTrackingCreateTimeTrackingConfigurationV1.md docs/TimeTrackingDeleteResponseSchema.md +docs/TimeTrackingEmployeeEnrollmentPaginatedResponseDataV1.md +docs/TimeTrackingEmployeeTimeTrackingDataV1.md +docs/TimeTrackingHourEntryPaginatedResponseDataV1.md +docs/TimeTrackingHourEntryV1.md docs/TimeTrackingIdResponseSchema.md docs/TimeTrackingOffsetPaginatedResponseDataV1.md docs/TimeTrackingOffsetPaginatedResponseDataV1Links.md -docs/TimeTrackingOffsetPaginatedResponseDataV1LinksNext.md -docs/TimeTrackingOffsetPaginatedResponseDataV1LinksPrev.md docs/TimeTrackingOffsetPaginatedResponseDataV1Meta.md +docs/TimeTrackingPagePaginatedResponseDataV1.md docs/TimeTrackingPaginatedBreakAssessmentsResponseV1.md docs/TimeTrackingPaginatedBreakPoliciesResponseV1.md docs/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.md docs/TimeTrackingPaginatedBreaksResponseV1.md +docs/TimeTrackingPaginatedClockEntriesResponseV1.md +docs/TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1.md +docs/TimeTrackingPaginatedHourEntriesResponseV1.md +docs/TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1.md +docs/TimeTrackingPaginatedTimeTrackingKiosksResponseV1.md +docs/TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1.md +docs/TimeTrackingPaginatedTimesheetsResponseV1.md +docs/TimeTrackingPaginatedTimesheetsResponseV1Meta.md docs/TimeTrackingProjectWithTasksAndEmployeeIds.md docs/TimeTrackingRecord.md docs/TimeTrackingRecordSchema.md -docs/TimeTrackingRecordSchemaProject.md -docs/TimeTrackingRecordSchemaProjectTask.md -docs/TimeTrackingRecordSchemaShiftDifferential.md docs/TimeTrackingSyncTimeTrackingBreakPolicyV1.md docs/TimeTrackingTask.md docs/TimeTrackingTimeTrackingBreakAssessmentV1.md @@ -674,12 +1376,44 @@ docs/TimeTrackingTimeTrackingBreakAvailabilityV1.md docs/TimeTrackingTimeTrackingBreakPolicyV1.md docs/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.md docs/TimeTrackingTimeTrackingBreakV1.md +docs/TimeTrackingTimeTrackingConfigurationV1.md +docs/TimeTrackingTimeTrackingHourEntryV1.md +docs/TimeTrackingTimeTrackingKioskV1.md +docs/TimeTrackingTimeTrackingTimeClockV1.md +docs/TimeTrackingTimesheetV1.md +docs/TimeTrackingUpdateClockEntryV1.md +docs/TimeTrackingUpdateEmployeeTimeTrackingDataV1.md docs/TimeTrackingUpdateTimeTrackingBreakPolicyV1.md docs/TimeTrackingUpdateTimeTrackingBreakV1.md +docs/TimeTrackingUpdateTimeTrackingConfigurationV1.md +docs/TimeTrackingUpdateTimeTrackingKioskV1.md +docs/TimeTrackingUpdateTimeTrackingTimeClockV1.md docs/TimesheetEntryInfoApiTransformer.md -docs/TimesheetEntryInfoApiTransformerBreakInfo.md +docs/TimesheetTimesheetDailyEntryV1.md +docs/TimesheetTimesheetDailySummaryV1.md docs/TimezoneListResponse.md docs/TimezoneResource.md +docs/TotalRewardsApi.md +docs/TotalRewardsBenefitDetailsValues.md +docs/TotalRewardsBenefitSectionValues.md +docs/TotalRewardsCalendarSectionValues.md +docs/TotalRewardsCompSummaryValues.md +docs/TotalRewardsCustomDisclaimerInfo.md +docs/TotalRewardsEmployeeStatement.md +docs/TotalRewardsEquityDetailsValues.md +docs/TotalRewardsEquityEstimatedValuationValues.md +docs/TotalRewardsEquityGrowthChartItem.md +docs/TotalRewardsEquityGrowthEstimation.md +docs/TotalRewardsEquitySectionValues.md +docs/TotalRewardsExtraPayDetailsValues.md +docs/TotalRewardsExtraPaySectionValues.md +docs/TotalRewardsHolidayValue.md +docs/TotalRewardsOnboardingStep.md +docs/TotalRewardsOverviewSectionValues.md +docs/TotalRewardsTimeOffPolicyValue.md +docs/TotalRewardsTimelineItem.md +docs/TotalRewardsTimelineItemLabel.md +docs/TotalRewardsTimelineSectionValues.md docs/TrainingApi.md docs/TrainingCategory.md docs/TrainingRecord.md @@ -687,21 +1421,51 @@ docs/TrainingRecordMap.md docs/TrainingRecordType.md docs/TrainingType.md docs/TrainingTypeCategory.md -docs/TrainingTypeDueFromHireDate.md -docs/TrainingTypeDueFromHireDateOneOf.md docs/TransformedApiEmployeeGoalDetails.md docs/TransformedApiEmployeeGoalDetailsGoal.md docs/TransformedApiGoal.md -docs/TransformedApiGoalActions.md docs/TransformedApiGoalMilestonesInner.md +docs/UnarchiveCustomFieldsRequest.md +docs/UnarchiveCustomFieldsResponse.md docs/UnassignEmployeesFromBreakPolicyRequest.md docs/UpdateApplicantStatusRequest.md docs/UpdateApplicantStatusResponse.md +docs/UpdateCompanyIndustryCodes400Response.md +docs/UpdateCompanyIndustryCodes403Response.md +docs/UpdateCompanyIndustryCodes404Response.md +docs/UpdateCompanyIndustryCodes500Response.md +docs/UpdateCompanyIndustryCodesResponse.md +docs/UpdateCompanyNameBadRequestResponse.md +docs/UpdateCompanyNameBadRequestResponseError.md +docs/UpdateCompanyNameForbiddenResponse.md +docs/UpdateCompanyNameForbiddenResponseError.md +docs/UpdateCompanyNameInternalErrorResponse.md +docs/UpdateCompanyNameSuccessResponse.md +docs/UpdateCompensationBenchmarkRequest.md +docs/UpdateCompensationBenchmarkSourceItem.md +docs/UpdateCompensationBenchmarkSourcesRequest.md +docs/UpdateCompensationBenchmarkSourcesResponse.md docs/UpdateEmployeeTrainingRecordRequest.md +docs/UpdateEmployeeVerificationIntegrationRequest.md +docs/UpdateEmployeeVerificationRequest.md +docs/UpdateGoalCommentRequest.md +docs/UpdateGoalMilestoneProgressRequest.md +docs/UpdateGoalProgressRequest.md +docs/UpdateGoalSharingRequest.md +docs/UpdateGoalV1.md +docs/UpdateGoalV11Request.md +docs/UpdateGoalV11RequestMilestonesInner.md +docs/UpdateLocationRequest.md +docs/UpdateLocationRequestAddress.md +docs/UpdatePayBandsRequest.md docs/UpdateTrainingCategoryRequest.md docs/UpdateTrainingTypeRequest.md docs/UpdateTrainingTypeRequestCategory.md docs/UpdateWebhookBadRequestResponse.md +docs/UpdatedCompensationBenchmark.md +docs/UpdatedCompensationBenchmarkSavedBenchmark.md +docs/UploadEmployeePhotoRequest1.md +docs/UserPermissionData.md docs/WebHookPostFieldDataObject.md docs/WebHookPostFieldPageDataObject.md docs/WebHookPostFieldResponseObject.md @@ -727,14 +1491,32 @@ docs/WebhooksApi.md docs/WebhooksList.md docs/WebhooksListWebhooksInner.md docs/WhosOutEntry.md -docs/XmlDirectoryEmployee.md -docs/XmlDirectoryEmployeeEmployees.md -docs/XmlDirectoryEmployeeEmployeesEmployeeInner.md -docs/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.md -docs/XmlDirectoryEmployeeFieldset.md -docs/XmlDirectoryEmployeeFieldsetFieldInner.md +docs/WhosOutListResponseV1.md +docs/WhosOutListResponseV1Links.md +docs/WhosOutListResponseV1LinksNext.md +docs/WhosOutListResponseV1LinksPrev.md +docs/WhosOutListResponseV1Meta.md +docs/WhosOutPersonV1.md +docs/WhosOutV1.md docs/XmlEmployeeFiles.md docs/XmlEmployeeFilesCategoryInner.md docs/XmlEmployeeFilesCategoryInnerFileInner.md test-requirements.txt test/__init__.py +test/test_alerts_api.py +test/test_calendar_events_api.py +test/test_change_tracking_api.py +test/test_company_api.py +test/test_compensation_api.py +test/test_compensation_benchmarking_api.py +test/test_compensation_planning_api.py +test/test_custom_fields_api.py +test/test_employee_tables_api.py +test/test_employee_verification_api.py +test/test_holidays_api.py +test/test_locations_api.py +test/test_meal_rest_breaks_api.py +test/test_onboarding_api.py +test/test_pay_grades_bands_api.py +test/test_scheduling_api.py +test/test_total_rewards_api.py diff --git a/README.md b/README.md index af5f9bd..3e5c43f 100644 --- a/README.md +++ b/README.md @@ -102,14 +102,28 @@ All URIs are relative to *https://companySubDomain.bamboohr.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AccountInformationApi* | [**baa7162824294d030115568d1d8e6ca7**](docs/AccountInformationApi.md#baa7162824294d030115568d1d8e6ca7) | **GET** /api/v1/meta/timezones/{id} | Get timezone by ID +*AccountInformationApi* | [**call_10d66d8561dd7dac50ff9c21ef63d83b**](docs/AccountInformationApi.md#call_10d66d8561dd7dac50ff9c21ef63d83b) | **GET** /api/v1/meta/timezones/by-zip/{zip} | Get timezone by ZIP code *AccountInformationApi* | [**call_5c5fb0f1211ae1c9451753f92f1053b6**](docs/AccountInformationApi.md#call_5c5fb0f1211ae1c9451753f92f1053b6) | **GET** /api/v1/meta/timezones | List timezones +*AccountInformationApi* | [**get_all_currency_types**](docs/AccountInformationApi.md#get_all_currency_types) | **GET** /api/v1/meta/currency/types | Get all currency types +*AccountInformationApi* | [**get_all_provinces**](docs/AccountInformationApi.md#get_all_provinces) | **GET** /api/v1/meta/provinces | Get All Provinces *AccountInformationApi* | [**get_countries_options**](docs/AccountInformationApi.md#get_countries_options) | **GET** /api/v1/meta/countries/options | Get Countries -*AccountInformationApi* | [**get_states_by_country_id**](docs/AccountInformationApi.md#get_states_by_country_id) | **GET** /api/v1/meta/provinces/{countryId} | Get States by Country ID +*AccountInformationApi* | [**get_country_by_id**](docs/AccountInformationApi.md#get_country_by_id) | **GET** /api/v1/meta/countries/{id} | Get Country by ID +*AccountInformationApi* | [**get_currency_conversions**](docs/AccountInformationApi.md#get_currency_conversions) | **GET** /api/v1/meta/currency-conversions | Get Currency Conversion Rates +*AccountInformationApi* | [**get_meta_company**](docs/AccountInformationApi.md#get_meta_company) | **GET** /api/v1/meta/company | Get company properties +*AccountInformationApi* | [**get_states_by_country_id**](docs/AccountInformationApi.md#get_states_by_country_id) | **GET** /api/v1/meta/provinces/{countryId} | List states and provinces for a country by Country ID +*AccountInformationApi* | [**list_bank_holidays**](docs/AccountInformationApi.md#list_bank_holidays) | **GET** /api/v1/meta/bank-holidays | List Bank Holidays *AccountInformationApi* | [**list_fields**](docs/AccountInformationApi.md#list_fields) | **GET** /api/v1/meta/fields | List Fields +*AccountInformationApi* | [**list_industries**](docs/AccountInformationApi.md#list_industries) | **GET** /api/v1/meta/industries | List Industries *AccountInformationApi* | [**list_list_fields**](docs/AccountInformationApi.md#list_list_fields) | **GET** /api/v1/meta/lists | List List Fields *AccountInformationApi* | [**list_tabular_fields**](docs/AccountInformationApi.md#list_tabular_fields) | **GET** /api/v1/meta/tables | List Tabular Fields *AccountInformationApi* | [**list_users**](docs/AccountInformationApi.md#list_users) | **GET** /api/v1/meta/users | List Users *AccountInformationApi* | [**update_list_field_values**](docs/AccountInformationApi.md#update_list_field_values) | **PUT** /api/v1/meta/lists/{listFieldId} | Update List Field Values +*AlertsApi* | [**create_alert_configuration**](docs/AlertsApi.md#create_alert_configuration) | **POST** /api/v1/alert-configurations | Create Alert Configuration +*AlertsApi* | [**get_alert_configuration**](docs/AlertsApi.md#get_alert_configuration) | **GET** /api/v1/alert-configurations/{id} | Get Alert Configuration +*AlertsApi* | [**list_alert_configurations**](docs/AlertsApi.md#list_alert_configurations) | **GET** /api/v1/alert-configurations | List Alert Configurations +*AlertsApi* | [**list_alert_templates**](docs/AlertsApi.md#list_alert_templates) | **GET** /api/v1/alerts | List Alert Templates +*AlertsApi* | [**replace_alert_configuration**](docs/AlertsApi.md#replace_alert_configuration) | **PUT** /api/v1/alert-configurations/{id} | Replace Alert Configuration *ApplicantTrackingApi* | [**create_application_comment**](docs/ApplicantTrackingApi.md#create_application_comment) | **POST** /api/v1/applicant_tracking/applications/{applicationId}/comments | Create Job Application Comment *ApplicantTrackingApi* | [**create_candidate**](docs/ApplicantTrackingApi.md#create_candidate) | **POST** /api/v1/applicant_tracking/application | Create Candidate *ApplicantTrackingApi* | [**create_job_opening**](docs/ApplicantTrackingApi.md#create_job_opening) | **POST** /api/v1/applicant_tracking/job_opening | Create Job Opening @@ -122,282 +136,650 @@ Class | Method | HTTP request | Description *ApplicantTrackingApi* | [**update_applicant_status**](docs/ApplicantTrackingApi.md#update_applicant_status) | **POST** /api/v1/applicant_tracking/applications/{applicationId}/status | Update Applicant Status *BenefitsApi* | [**create_employee_dependent**](docs/BenefitsApi.md#create_employee_dependent) | **POST** /api/v1/employeedependents | Create Employee Dependent *BenefitsApi* | [**get_employee_dependent**](docs/BenefitsApi.md#get_employee_dependent) | **GET** /api/v1/employeedependents/{id} | Get Employee Dependent -*BenefitsApi* | [**get_member_benefits**](docs/BenefitsApi.md#get_member_benefits) | **GET** /api/v1/benefits/member-benefits | Get Member Benefits *BenefitsApi* | [**list_benefit_coverages**](docs/BenefitsApi.md#list_benefit_coverages) | **GET** /api/v1/benefitcoverages | List Benefit Coverages *BenefitsApi* | [**list_benefit_deduction_types**](docs/BenefitsApi.md#list_benefit_deduction_types) | **GET** /api/v1/benefits/settings/deduction_types/all | List Benefit Deduction Types *BenefitsApi* | [**list_company_benefits**](docs/BenefitsApi.md#list_company_benefits) | **GET** /api/v1/benefit/company_benefit | List Company Benefits *BenefitsApi* | [**list_employee_benefits**](docs/BenefitsApi.md#list_employee_benefits) | **GET** /api/v1/benefit/employee_benefit | List Employee Benefits *BenefitsApi* | [**list_employee_dependents**](docs/BenefitsApi.md#list_employee_dependents) | **GET** /api/v1/employeedependents | List Employee Dependents *BenefitsApi* | [**list_member_benefit_events**](docs/BenefitsApi.md#list_member_benefit_events) | **GET** /api/v1/benefit/member_benefit | List Member Benefit Events +*BenefitsApi* | [**list_member_benefits**](docs/BenefitsApi.md#list_member_benefits) | **GET** /api/v1/benefits/member-benefits | List Member Benefits *BenefitsApi* | [**update_employee_dependent**](docs/BenefitsApi.md#update_employee_dependent) | **PUT** /api/v1/employeedependents/{id} | Update Employee Dependent -*CompanyFilesApi* | [**add_company_file_category**](docs/CompanyFilesApi.md#add_company_file_category) | **POST** /api/v1/files/categories | Create Company File Category +*CalendarEventsApi* | [**list_calendar_events**](docs/CalendarEventsApi.md#list_calendar_events) | **GET** /api/v1/calendar-events | List Calendar Events +*ChangeTrackingApi* | [**get_changed_employee_ids**](docs/ChangeTrackingApi.md#get_changed_employee_ids) | **GET** /api/v1/employees/changed | Get Changed Employee IDs +*ChangeTrackingApi* | [**get_changed_employee_table_data**](docs/ChangeTrackingApi.md#get_changed_employee_table_data) | **GET** /api/v1/employees/changed/tables/{table} | Get Changed Employee Table Data +*CompanyApi* | [**put_company_industry_codes**](docs/CompanyApi.md#put_company_industry_codes) | **PUT** /api/v1/company-profile-data/industry-codes | Update Company Industry Codes +*CompanyFilesApi* | [**create_company_file_category**](docs/CompanyFilesApi.md#create_company_file_category) | **POST** /api/v1/files/categories | Create Company File Category *CompanyFilesApi* | [**delete_company_file**](docs/CompanyFilesApi.md#delete_company_file) | **DELETE** /api/v1/files/{fileId} | Delete Company File *CompanyFilesApi* | [**get_company_file**](docs/CompanyFilesApi.md#get_company_file) | **GET** /api/v1/files/{fileId} | Get Company File *CompanyFilesApi* | [**list_company_files**](docs/CompanyFilesApi.md#list_company_files) | **GET** /api/v1/files/view | Get Company Files and Categories *CompanyFilesApi* | [**update_company_file**](docs/CompanyFilesApi.md#update_company_file) | **POST** /api/v1/files/{fileId} | Update Company File *CompanyFilesApi* | [**upload_company_file**](docs/CompanyFilesApi.md#upload_company_file) | **POST** /api/v1/files | Upload Company File *CompanyProfileApi* | [**get_company_profile_integrations**](docs/CompanyProfileApi.md#get_company_profile_integrations) | **GET** /api/v1/company-profile-integrations | Get Company Profile Integrations -*CustomReportsApi* | [**get_by_report_id**](docs/CustomReportsApi.md#get_by_report_id) | **GET** /api/v1/custom-reports/{reportId} | Get Report by ID +*CompanyProfileApi* | [**patch_company_profile_company_information**](docs/CompanyProfileApi.md#patch_company_profile_company_information) | **PATCH** /api/v1/company-profile-data/company-information | Update company information (phone, address, legal name) +*CompanyProfileApi* | [**put_company_profile_display_name**](docs/CompanyProfileApi.md#put_company_profile_display_name) | **PUT** /api/v1/company-profile-data/display-name | Update company display name +*CompensationApi* | [**c5880b509783cd9d7fce9ddf5d6af1be**](docs/CompensationApi.md#c5880b509783cd9d7fce9ddf5d6af1be) | **PUT** /api/v1/compensation/equity/settings | Update company equity settings +*CompensationApi* | [**call_9f398e2652ea47a6dc5121ce5184222a**](docs/CompensationApi.md#call_9f398e2652ea47a6dc5121ce5184222a) | **GET** /api/v1/compensation/tools | List available compensation tools +*CompensationApi* | [**db49fb29f9f04d59afad7c01ce860418**](docs/CompensationApi.md#db49fb29f9f04d59afad7c01ce860418) | **GET** /api/v1/compensation/equity/settings | Get company equity settings +*CompensationBenchmarkingApi* | [**create_compensation_benchmark**](docs/CompensationBenchmarkingApi.md#create_compensation_benchmark) | **POST** /api/v1/compensation/benchmarks | Create Compensation Benchmark +*CompensationBenchmarkingApi* | [**create_compensation_benchmark_source**](docs/CompensationBenchmarkingApi.md#create_compensation_benchmark_source) | **POST** /api/v1/compensation/benchmarks/sources | Create Compensation Benchmark Source +*CompensationBenchmarkingApi* | [**delete_compensation_benchmark**](docs/CompensationBenchmarkingApi.md#delete_compensation_benchmark) | **DELETE** /api/v1/compensation/benchmarks/{id} | Delete Compensation Benchmark +*CompensationBenchmarkingApi* | [**delete_compensation_benchmark_source**](docs/CompensationBenchmarkingApi.md#delete_compensation_benchmark_source) | **DELETE** /api/v1/compensation/benchmarks/sources | Delete Compensation Benchmark Source +*CompensationBenchmarkingApi* | [**export_compensation_benchmark_details**](docs/CompensationBenchmarkingApi.md#export_compensation_benchmark_details) | **GET** /api/v1/compensation/benchmarks/details/export | Export Compensation Benchmark Details +*CompensationBenchmarkingApi* | [**get_compensation_benchmark_details**](docs/CompensationBenchmarkingApi.md#get_compensation_benchmark_details) | **GET** /api/v1/compensation/benchmarks/details | Get Compensation Benchmark Details +*CompensationBenchmarkingApi* | [**import_compensation_benchmarks**](docs/CompensationBenchmarkingApi.md#import_compensation_benchmarks) | **POST** /api/v1/compensation/benchmarks/import | Import Compensation Benchmarks From CSV +*CompensationBenchmarkingApi* | [**list_compensation_benchmark_sources**](docs/CompensationBenchmarkingApi.md#list_compensation_benchmark_sources) | **GET** /api/v1/compensation/benchmarks/sources | List Compensation Benchmark Sources +*CompensationBenchmarkingApi* | [**list_compensation_benchmarks**](docs/CompensationBenchmarkingApi.md#list_compensation_benchmarks) | **GET** /api/v1/compensation/benchmarks | List Compensation Benchmarks +*CompensationBenchmarkingApi* | [**update_compensation_benchmark**](docs/CompensationBenchmarkingApi.md#update_compensation_benchmark) | **PUT** /api/v1/compensation/benchmarks | Update Compensation Benchmark +*CompensationBenchmarkingApi* | [**update_compensation_benchmark_sources**](docs/CompensationBenchmarkingApi.md#update_compensation_benchmark_sources) | **PUT** /api/v1/compensation/benchmarks/sources | Update Compensation Benchmark Sources +*CompensationPlanningApi* | [**a05b6d5f564f805d688ff2c1e37c3990**](docs/CompensationPlanningApi.md#a05b6d5f564f805d688ff2c1e37c3990) | **POST** /api/v1/compensation/planning_cycles/{id}/recommendations/send | Send recommendations to next stage +*CompensationPlanningApi* | [**a6b8da1348a3151fe95adc03aaf64447**](docs/CompensationPlanningApi.md#a6b8da1348a3151fe95adc03aaf64447) | **GET** /api/v1/compensation/planning_cycles/{id}/employees | List employees in compensation planning cycle +*CompensationPlanningApi* | [**b1e467e0eef72350eec61fcfeaf4e19d**](docs/CompensationPlanningApi.md#b1e467e0eef72350eec61fcfeaf4e19d) | **DELETE** /api/v1/compensation/planning_cycles/{id}/approvals/employee/{employeeId} | Remove from approval flow +*CompensationPlanningApi* | [**b3c51254de6918637a971fe4af382a53**](docs/CompensationPlanningApi.md#b3c51254de6918637a971fe4af382a53) | **GET** /api/v1/compensation/planning_cycles/{id}/admins | List compensation planning cycle admins +*CompensationPlanningApi* | [**b65f246186b41a9783a9397c11c703b4**](docs/CompensationPlanningApi.md#b65f246186b41a9783a9397c11c703b4) | **GET** /api/v1/compensation/planning_cycles | List compensation planning cycles +*CompensationPlanningApi* | [**c79f9c5950f983e59d2626faa30c00a1**](docs/CompensationPlanningApi.md#c79f9c5950f983e59d2626faa30c00a1) | **PUT** /api/v1/compensation/planning_cycles/{id}/change_comm/template | Save change comm template +*CompensationPlanningApi* | [**c7c32ed5278ac67e2e518bf7484a75dc**](docs/CompensationPlanningApi.md#c7c32ed5278ac67e2e518bf7484a75dc) | **POST** /api/v1/compensation/planning_cycles/{id}/admins | Add cycle admins +*CompensationPlanningApi* | [**call_100b0cf8c5207b35697ff10370fd5fe1**](docs/CompensationPlanningApi.md#call_100b0cf8c5207b35697ff10370fd5fe1) | **PUT** /api/v1/compensation/planning_cycles/{id} | Update compensation planning cycle +*CompensationPlanningApi* | [**call_1d1fc0f164cb51973a0206b8e2fb2d2d**](docs/CompensationPlanningApi.md#call_1d1fc0f164cb51973a0206b8e2fb2d2d) | **POST** /api/v1/compensation/planning_cycles/{id}/budgets/import | Import budget breakdown +*CompensationPlanningApi* | [**call_1d64402ee192568adbd5e3179a91e6e2**](docs/CompensationPlanningApi.md#call_1d64402ee192568adbd5e3179a91e6e2) | **PUT** /api/v1/compensation/planning_cycles/{id}/budgets/breakdown | Save budget breakdown +*CompensationPlanningApi* | [**call_22ad75be25455279e2987c80851af5fc**](docs/CompensationPlanningApi.md#call_22ad75be25455279e2987c80851af5fc) | **DELETE** /api/v1/compensation/planning_cycles/{id} | Delete compensation planning cycle +*CompensationPlanningApi* | [**call_329acecaa6df729733d0752aa9f6b204**](docs/CompensationPlanningApi.md#call_329acecaa6df729733d0752aa9f6b204) | **GET** /api/v1/compensation/planning_cycles/{id}/worksheet | Get compensation planning cycle worksheet +*CompensationPlanningApi* | [**call_3958585c861325ea7a2cd30a8c74f042**](docs/CompensationPlanningApi.md#call_3958585c861325ea7a2cd30a8c74f042) | **POST** /api/v1/compensation/planning_cycles/{id}/employees | Add employees to cycle +*CompensationPlanningApi* | [**call_3a19f07aa737dc826ba43b9a1c1cd257**](docs/CompensationPlanningApi.md#call_3a19f07aa737dc826ba43b9a1c1cd257) | **PUT** /api/v1/compensation/planning_cycles/{id}/launch | Launch compensation planning cycle +*CompensationPlanningApi* | [**call_4e886b18264480611f380805301c49c4**](docs/CompensationPlanningApi.md#call_4e886b18264480611f380805301c49c4) | **GET** /api/v1/compensation/planning_cycles/{id}/approvals | Get compensation planning approval flows +*CompensationPlanningApi* | [**call_593d5bff120edf2a218a92022a682728**](docs/CompensationPlanningApi.md#call_593d5bff120edf2a218a92022a682728) | **GET** /api/v1/compensation/planning_cycles/{id}/worksheet/export | Export compensation planning cycle worksheet to CSV +*CompensationPlanningApi* | [**call_5c2b55158b0950b1e9211655666645b6**](docs/CompensationPlanningApi.md#call_5c2b55158b0950b1e9211655666645b6) | **GET** /api/v1/compensation/planning_cycles/{id} | Get compensation planning cycle details +*CompensationPlanningApi* | [**call_5c4aab35a34f5760ec044104b5232bf5**](docs/CompensationPlanningApi.md#call_5c4aab35a34f5760ec044104b5232bf5) | **POST** /api/v1/compensation/planning_cycles/{id}/approvals/final_approver/{employeeId} | Set final approver +*CompensationPlanningApi* | [**call_7efceaee2c010f88244dd01ee81e6e7b**](docs/CompensationPlanningApi.md#call_7efceaee2c010f88244dd01ee81e6e7b) | **GET** /api/v1/compensation/planning_cycles/{id}/budgets | Get compensation planning cycle budgets +*CompensationPlanningApi* | [**call_89a5068111ec499135c7d6e9a53d5a30**](docs/CompensationPlanningApi.md#call_89a5068111ec499135c7d6e9a53d5a30) | **DELETE** /api/v1/compensation/planning_cycles/{id}/employees | Remove employees from cycle +*CompensationPlanningApi* | [**call_9bc279d788f6e86b4cd8b2e0d3de91b1**](docs/CompensationPlanningApi.md#call_9bc279d788f6e86b4cd8b2e0d3de91b1) | **GET** /api/v1/compensation/planning_cycles/{id}/summary | Get compensation planning cycle summary +*CompensationPlanningApi* | [**cf87b8e09a001b6fb81dfce6c20ab9e3**](docs/CompensationPlanningApi.md#cf87b8e09a001b6fb81dfce6c20ab9e3) | **PUT** /api/v1/compensation/planning_cycles/{id}/approvals/{templateId} | Update approval flow +*CompensationPlanningApi* | [**d6987e300672a00c7cfe59afebb64156**](docs/CompensationPlanningApi.md#d6987e300672a00c7cfe59afebb64156) | **GET** /api/v1/compensation/planning_cycles/{id}/change_comm | Get change communication letter details +*CompensationPlanningApi* | [**dacd313af2106213fc4696175941ce65**](docs/CompensationPlanningApi.md#dacd313af2106213fc4696175941ce65) | **PUT** /api/v1/compensation/planning_cycles/{id}/budgets/guidelines | Save budget guidelines +*CompensationPlanningApi* | [**e2ac4e1535f296cb8901f209e04caa83**](docs/CompensationPlanningApi.md#e2ac4e1535f296cb8901f209e04caa83) | **POST** /api/v1/compensation/planning_cycles | Create compensation planning cycle +*CompensationPlanningApi* | [**ef7619b0ee4c8dc079aaea870cfbe81b**](docs/CompensationPlanningApi.md#ef7619b0ee4c8dc079aaea870cfbe81b) | **DELETE** /api/v1/compensation/planning_cycles/{id}/admins/{employeeId} | Remove cycle admin +*CompensationPlanningApi* | [**f3883a522dadbe9e11b34f8b656e3adb**](docs/CompensationPlanningApi.md#f3883a522dadbe9e11b34f8b656e3adb) | **POST** /api/v1/compensation/planning_cycles/{id}/recommendations | Save recommendations +*CompensationPlanningApi* | [**f4b431363af6573af46750f32632e88b**](docs/CompensationPlanningApi.md#f4b431363af6573af46750f32632e88b) | **PUT** /api/v1/compensation/planning_cycles/{id}/complete | Complete compensation planning cycle +*CustomFieldsApi* | [**add_custom_field_list_value**](docs/CustomFieldsApi.md#add_custom_field_list_value) | **POST** /api/v1/hris/custom-fields/{customFieldId}/list-values | Add Custom Field List Value +*CustomFieldsApi* | [**archive_public_custom_field**](docs/CustomFieldsApi.md#archive_public_custom_field) | **DELETE** /api/v1/hris/custom-fields/{customFieldId} | Archive Custom Field +*CustomFieldsApi* | [**create_public_custom_field**](docs/CustomFieldsApi.md#create_public_custom_field) | **POST** /api/v1/hris/custom-fields | Create Custom Field +*CustomFieldsApi* | [**delete_custom_field_list_value**](docs/CustomFieldsApi.md#delete_custom_field_list_value) | **DELETE** /api/v1/hris/custom-fields/{customFieldId}/list-values/{listValueId} | Delete Custom Field List Value +*CustomFieldsApi* | [**edit_custom_field_list_value**](docs/CustomFieldsApi.md#edit_custom_field_list_value) | **PATCH** /api/v1/hris/custom-fields/{customFieldId}/list-values/{listValueId} | Edit Custom Field List Value +*CustomFieldsApi* | [**edit_public_custom_field**](docs/CustomFieldsApi.md#edit_public_custom_field) | **PUT** /api/v1/hris/custom-fields/{customFieldId} | Edit Custom Field +*CustomFieldsApi* | [**get_custom_field**](docs/CustomFieldsApi.md#get_custom_field) | **GET** /api/v1/hris/custom-fields/{customFieldId} | Get Custom Field +*CustomFieldsApi* | [**list_archived_custom_fields**](docs/CustomFieldsApi.md#list_archived_custom_fields) | **GET** /api/v1/hris/custom-fields/archived | List Archived Custom Fields +*CustomFieldsApi* | [**list_custom_field_list_values**](docs/CustomFieldsApi.md#list_custom_field_list_values) | **GET** /api/v1/hris/custom-fields/{customFieldId}/list-values | List Custom Field List Values +*CustomFieldsApi* | [**list_custom_field_types**](docs/CustomFieldsApi.md#list_custom_field_types) | **GET** /api/v1/hris/custom-fields/types | List Custom Field Types +*CustomFieldsApi* | [**list_custom_fields**](docs/CustomFieldsApi.md#list_custom_fields) | **GET** /api/v1/hris/custom-fields | List Custom Fields +*CustomFieldsApi* | [**unarchive_public_custom_fields**](docs/CustomFieldsApi.md#unarchive_public_custom_fields) | **POST** /api/v1/hris/custom-fields/unarchive | Unarchive Custom Fields +*CustomReportsApi* | [**get_legacy_report_field_map**](docs/CustomReportsApi.md#get_legacy_report_field_map) | **GET** /api/v1/custom-reports/legacy-field-map | Get Legacy Report Field Map +*CustomReportsApi* | [**get_legacy_report_id_map**](docs/CustomReportsApi.md#get_legacy_report_id_map) | **GET** /api/v1/custom-reports/legacy-id-map | Get Legacy Report ID Map +*CustomReportsApi* | [**get_report_by_id**](docs/CustomReportsApi.md#get_report_by_id) | **GET** /api/v1/custom-reports/{reportId} | Get Report by ID *CustomReportsApi* | [**list_reports**](docs/CustomReportsApi.md#list_reports) | **GET** /api/v1/custom-reports | List Reports -*DatasetsApi* | [**get_data_from_dataset**](docs/DatasetsApi.md#get_data_from_dataset) | **POST** /api/v1/datasets/{datasetName} | Get Data from Dataset -*DatasetsApi* | [**get_datasets**](docs/DatasetsApi.md#get_datasets) | **GET** /api/v1/datasets | Get Datasets -*DatasetsApi* | [**get_datasets_v12**](docs/DatasetsApi.md#get_datasets_v12) | **GET** /api/v1_2/datasets | Get Datasets v1.2 -*DatasetsApi* | [**get_field_options**](docs/DatasetsApi.md#get_field_options) | **POST** /api/v1/datasets/{datasetName}/field-options | Get Field Options -*DatasetsApi* | [**get_field_options_v12**](docs/DatasetsApi.md#get_field_options_v12) | **POST** /api/v1_2/datasets/{datasetName}/field-options | Get Field Options v1.2 -*DatasetsApi* | [**get_fields_from_dataset**](docs/DatasetsApi.md#get_fields_from_dataset) | **GET** /api/v1/datasets/{datasetName}/fields | Get Fields from Dataset -*DatasetsApi* | [**get_fields_from_dataset_v12**](docs/DatasetsApi.md#get_fields_from_dataset_v12) | **GET** /api/v1_2/datasets/{datasetName}/fields | Get Fields from Dataset v1.2 -*EmployeeFilesApi* | [**add_employee_file_category**](docs/EmployeeFilesApi.md#add_employee_file_category) | **POST** /api/v1/employees/files/categories | Create Employee File Category +*DatasetsApi* | [**get_data_from_dataset_v1**](docs/DatasetsApi.md#get_data_from_dataset_v1) | **POST** /api/v1/datasets/{datasetName} | Get Data from Dataset (v1) +*DatasetsApi* | [**get_data_from_dataset_v2**](docs/DatasetsApi.md#get_data_from_dataset_v2) | **POST** /api/v2/datasets/{datasetName}/data | Get Data from Dataset (v2) +*DatasetsApi* | [**get_field_options_v1**](docs/DatasetsApi.md#get_field_options_v1) | **POST** /api/v1/datasets/{datasetName}/field-options | Get Field Options (v1) +*DatasetsApi* | [**get_field_options_v12**](docs/DatasetsApi.md#get_field_options_v12) | **POST** /api/v1_2/datasets/{datasetName}/field-options | Get Field Options (v1.2) +*DatasetsApi* | [**get_fields_from_dataset_v1**](docs/DatasetsApi.md#get_fields_from_dataset_v1) | **GET** /api/v1/datasets/{datasetName}/fields | Get Fields from Dataset (v1) +*DatasetsApi* | [**get_fields_from_dataset_v12**](docs/DatasetsApi.md#get_fields_from_dataset_v12) | **GET** /api/v1_2/datasets/{datasetName}/fields | Get Fields from Dataset (v1.2) +*DatasetsApi* | [**list_datasets_v1**](docs/DatasetsApi.md#list_datasets_v1) | **GET** /api/v1/datasets | List Datasets (v1) +*DatasetsApi* | [**list_datasets_v12**](docs/DatasetsApi.md#list_datasets_v12) | **GET** /api/v1_2/datasets | List Datasets (v1.2) +*EmployeeFilesApi* | [**create_employee_file_category**](docs/EmployeeFilesApi.md#create_employee_file_category) | **POST** /api/v1/employees/files/categories | Create Employee File Category *EmployeeFilesApi* | [**delete_employee_file**](docs/EmployeeFilesApi.md#delete_employee_file) | **DELETE** /api/v1/employees/{id}/files/{fileId} | Delete Employee File *EmployeeFilesApi* | [**get_employee_file**](docs/EmployeeFilesApi.md#get_employee_file) | **GET** /api/v1/employees/{id}/files/{fileId} | Get Employee File *EmployeeFilesApi* | [**list_employee_files**](docs/EmployeeFilesApi.md#list_employee_files) | **GET** /api/v1/employees/{id}/files/view | List Employee Files *EmployeeFilesApi* | [**update_employee_file**](docs/EmployeeFilesApi.md#update_employee_file) | **POST** /api/v1/employees/{id}/files/{fileId} | Update Employee File *EmployeeFilesApi* | [**upload_employee_file**](docs/EmployeeFilesApi.md#upload_employee_file) | **POST** /api/v1/employees/{id}/files | Upload Employee File +*EmployeeTablesApi* | [**create_table_row_v1**](docs/EmployeeTablesApi.md#create_table_row_v1) | **POST** /api/v1/employees/{id}/tables/{table} | Create Table Row (v1) +*EmployeeTablesApi* | [**create_table_row_v11**](docs/EmployeeTablesApi.md#create_table_row_v11) | **POST** /api/v1_1/employees/{id}/tables/{table} | Create Table Row (v1.1) +*EmployeeTablesApi* | [**delete_employee_table_row**](docs/EmployeeTablesApi.md#delete_employee_table_row) | **DELETE** /api/v1/employees/{id}/tables/{table}/{rowId} | Delete Employee Table Row +*EmployeeTablesApi* | [**get_employee_table_data**](docs/EmployeeTablesApi.md#get_employee_table_data) | **GET** /api/v1/employees/{id}/tables/{table} | Get Employee Table Data +*EmployeeTablesApi* | [**update_table_row_v1**](docs/EmployeeTablesApi.md#update_table_row_v1) | **POST** /api/v1/employees/{id}/tables/{table}/{rowId} | Update Table Row (v1) +*EmployeeTablesApi* | [**update_table_row_v11**](docs/EmployeeTablesApi.md#update_table_row_v11) | **POST** /api/v1_1/employees/{id}/tables/{table}/{rowId} | Update Table Row (v1.1) +*EmployeeVerificationApi* | [**get_employee_verification_integration**](docs/EmployeeVerificationApi.md#get_employee_verification_integration) | **GET** /api/v1/employee-verifications/integration | Get employee verification integration status +*EmployeeVerificationApi* | [**list_employee_verifications_by_employee**](docs/EmployeeVerificationApi.md#list_employee_verifications_by_employee) | **GET** /api/v1/employee-verifications/employees/{employeeId} | List employee verification records for an employee +*EmployeeVerificationApi* | [**send_employee_verification_lifecycle_email_by_user**](docs/EmployeeVerificationApi.md#send_employee_verification_lifecycle_email_by_user) | **POST** /api/v1/employee-verifications/users/{userId}/send-email | Send employee verification lifecycle email by user and email type +*EmployeeVerificationApi* | [**update_employee_verification**](docs/EmployeeVerificationApi.md#update_employee_verification) | **PUT** /api/v1/employee-verifications/employees/{employeeId}/{verificationId} | Update an employee verification record +*EmployeeVerificationApi* | [**update_employee_verification_integration**](docs/EmployeeVerificationApi.md#update_employee_verification_integration) | **PUT** /api/v1/employee-verifications/integration | Enable or disable the employee verification integration *EmployeesApi* | [**create_employee**](docs/EmployeesApi.md#create_employee) | **POST** /api/v1/employees | Create Employee +*EmployeesApi* | [**delete_employee**](docs/EmployeesApi.md#delete_employee) | **DELETE** /api/v1/employees/{id} | Delete employee *EmployeesApi* | [**get_company_information**](docs/EmployeesApi.md#get_company_information) | **GET** /api/v1/company_information | Get Company Information *EmployeesApi* | [**get_employee**](docs/EmployeesApi.md#get_employee) | **GET** /api/v1/employees/{id} | Get Employee -*EmployeesApi* | [**get_employees_directory**](docs/EmployeesApi.md#get_employees_directory) | **GET** /api/v1/employees/directory | Get Employee Directory +*EmployeesApi* | [**get_employees_directory**](docs/EmployeesApi.md#get_employees_directory) | **GET** /api/v1/employees/directory | Get Employees Directory *EmployeesApi* | [**list_employees**](docs/EmployeesApi.md#list_employees) | **GET** /api/v1/employees | List Employees *EmployeesApi* | [**update_employee**](docs/EmployeesApi.md#update_employee) | **POST** /api/v1/employees/{id} | Update Employee +*GoalsApi* | [**close_goal**](docs/GoalsApi.md#close_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/close | Close Goal +*GoalsApi* | [**create_goal**](docs/GoalsApi.md#create_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals | Create Goal +*GoalsApi* | [**create_goal_comment**](docs/GoalsApi.md#create_goal_comment) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | Create Goal Comment *GoalsApi* | [**delete_goal**](docs/GoalsApi.md#delete_goal) | **DELETE** /api/v1/performance/employees/{employeeId}/goals/{goalId} | Delete Goal *GoalsApi* | [**delete_goal_comment**](docs/GoalsApi.md#delete_goal_comment) | **DELETE** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} | Delete Goal Comment -*GoalsApi* | [**get_can_create_goal**](docs/GoalsApi.md#get_can_create_goal) | **GET** /api/v1/performance/employees/{employeeId}/goals/canCreateGoals | Check Goal Creation Permission +*GoalsApi* | [**get_alignable_goal_options**](docs/GoalsApi.md#get_alignable_goal_options) | **GET** /api/v1/performance/employees/{employeeId}/goals/alignmentOptions | Get Alignable Goal Options *GoalsApi* | [**get_goal_aggregate**](docs/GoalsApi.md#get_goal_aggregate) | **GET** /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate | Get Goal Aggregate -*GoalsApi* | [**get_goal_comments**](docs/GoalsApi.md#get_goal_comments) | **GET** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | Get Goal Comments -*GoalsApi* | [**get_goals**](docs/GoalsApi.md#get_goals) | **GET** /api/v1/performance/employees/{employeeId}/goals | Get Goals -*GoalsApi* | [**get_goals_aggregate_v1**](docs/GoalsApi.md#get_goals_aggregate_v1) | **GET** /api/v1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate -*GoalsApi* | [**get_goals_aggregate_v1_1**](docs/GoalsApi.md#get_goals_aggregate_v1_1) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate v1.1 -*GoalsApi* | [**get_goals_aggregate_v1_2**](docs/GoalsApi.md#get_goals_aggregate_v1_2) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate v1.2 -*GoalsApi* | [**get_goals_alignment_options**](docs/GoalsApi.md#get_goals_alignment_options) | **GET** /api/v1/performance/employees/{employeeId}/goals/alignmentOptions | Get Alignable Goal Options -*GoalsApi* | [**get_goals_filters_v1**](docs/GoalsApi.md#get_goals_filters_v1) | **GET** /api/v1/performance/employees/{employeeId}/goals/filters | Get Goal Filters -*GoalsApi* | [**get_goals_filters_v1_1**](docs/GoalsApi.md#get_goals_filters_v1_1) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/filters | Get Goal Filters v1.1 -*GoalsApi* | [**get_goals_filters_v1_2**](docs/GoalsApi.md#get_goals_filters_v1_2) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/filters | Get Goal Status Counts v1.2 -*GoalsApi* | [**get_goals_share_options**](docs/GoalsApi.md#get_goals_share_options) | **GET** /api/v1/performance/employees/{employeeId}/goals/shareOptions | Get Available Goal Sharing Options -*GoalsApi* | [**post_close_goal**](docs/GoalsApi.md#post_close_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/close | Close Goal -*GoalsApi* | [**post_goal**](docs/GoalsApi.md#post_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals | Create Goal -*GoalsApi* | [**post_goal_comment**](docs/GoalsApi.md#post_goal_comment) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | Create Goal Comment -*GoalsApi* | [**post_reopen_goal**](docs/GoalsApi.md#post_reopen_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen | Reopen Goal -*GoalsApi* | [**put_goal_comment**](docs/GoalsApi.md#put_goal_comment) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} | Update Goal Comment -*GoalsApi* | [**put_goal_milestone_progress**](docs/GoalsApi.md#put_goal_milestone_progress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress | Update Milestone Progress -*GoalsApi* | [**put_goal_progress**](docs/GoalsApi.md#put_goal_progress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress | Update Goal Progress -*GoalsApi* | [**put_goal_shared_with**](docs/GoalsApi.md#put_goal_shared_with) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith | Update Goal Sharing -*GoalsApi* | [**put_goal_v1**](docs/GoalsApi.md#put_goal_v1) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId} | Update Goal -*GoalsApi* | [**put_goal_v1_1**](docs/GoalsApi.md#put_goal_v1_1) | **PUT** /api/v1_1/performance/employees/{employeeId}/goals/{goalId} | Update Goal v1.1 +*GoalsApi* | [**get_goal_creation_permission**](docs/GoalsApi.md#get_goal_creation_permission) | **GET** /api/v1/performance/employees/{employeeId}/goals/canCreateGoals | Get Goal Creation Permission +*GoalsApi* | [**get_goals_aggregate_v1**](docs/GoalsApi.md#get_goals_aggregate_v1) | **GET** /api/v1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate (v1) +*GoalsApi* | [**get_goals_aggregate_v11**](docs/GoalsApi.md#get_goals_aggregate_v11) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate (v1.1) +*GoalsApi* | [**get_goals_aggregate_v12**](docs/GoalsApi.md#get_goals_aggregate_v12) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate (v1.2) +*GoalsApi* | [**get_goals_filters_v1**](docs/GoalsApi.md#get_goals_filters_v1) | **GET** /api/v1/performance/employees/{employeeId}/goals/filters | Get Goal Filters (v1) +*GoalsApi* | [**get_goals_filters_v11**](docs/GoalsApi.md#get_goals_filters_v11) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/filters | Get Goal Filters (v1.1) +*GoalsApi* | [**get_goals_filters_v12**](docs/GoalsApi.md#get_goals_filters_v12) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/filters | Get Goal Filters (v1.2) +*GoalsApi* | [**list_goal_comments**](docs/GoalsApi.md#list_goal_comments) | **GET** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | List Goal Comments +*GoalsApi* | [**list_goal_share_options**](docs/GoalsApi.md#list_goal_share_options) | **GET** /api/v1/performance/employees/{employeeId}/goals/shareOptions | List Goal Sharing Options +*GoalsApi* | [**list_goals**](docs/GoalsApi.md#list_goals) | **GET** /api/v1/performance/employees/{employeeId}/goals | List Goals +*GoalsApi* | [**reopen_goal**](docs/GoalsApi.md#reopen_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen | Reopen Goal +*GoalsApi* | [**update_goal_comment**](docs/GoalsApi.md#update_goal_comment) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} | Update Goal Comment +*GoalsApi* | [**update_goal_milestone_progress**](docs/GoalsApi.md#update_goal_milestone_progress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress | Update Milestone Progress +*GoalsApi* | [**update_goal_progress**](docs/GoalsApi.md#update_goal_progress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress | Update Goal Progress +*GoalsApi* | [**update_goal_sharing**](docs/GoalsApi.md#update_goal_sharing) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith | Update Goal Sharing +*GoalsApi* | [**update_goal_v1**](docs/GoalsApi.md#update_goal_v1) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId} | Update Goal (v1) +*GoalsApi* | [**update_goal_v11**](docs/GoalsApi.md#update_goal_v11) | **PUT** /api/v1_1/performance/employees/{employeeId}/goals/{goalId} | Update Goal (v1.1) +*HolidaysApi* | [**bulk_insert_company_holidays**](docs/HolidaysApi.md#bulk_insert_company_holidays) | **POST** /api/v1/holidays/bulk-insert | Bulk Create Company Holidays +*HolidaysApi* | [**create_company_holiday**](docs/HolidaysApi.md#create_company_holiday) | **POST** /api/v1/holidays | Create Company Holiday +*HolidaysApi* | [**delete_company_holiday**](docs/HolidaysApi.md#delete_company_holiday) | **DELETE** /api/v1/holidays/{id} | Delete Company Holiday +*HolidaysApi* | [**get_catalog_holiday**](docs/HolidaysApi.md#get_catalog_holiday) | **GET** /api/v1/holidays/catalog/{uuid} | Get Catalog Holiday +*HolidaysApi* | [**get_company_holiday**](docs/HolidaysApi.md#get_company_holiday) | **GET** /api/v1/holidays/{id} | Get Company Holiday +*HolidaysApi* | [**list_catalog_holidays**](docs/HolidaysApi.md#list_catalog_holidays) | **GET** /api/v1/holidays/catalog | List Catalog Holidays +*HolidaysApi* | [**list_company_holidays**](docs/HolidaysApi.md#list_company_holidays) | **GET** /api/v1/holidays | List Company Holidays +*HolidaysApi* | [**update_company_holiday**](docs/HolidaysApi.md#update_company_holiday) | **PATCH** /api/v1/holidays/{id} | Update Company Holiday *HoursApi* | [**create_or_update_time_tracking_hour_records**](docs/HoursApi.md#create_or_update_time_tracking_hour_records) | **POST** /api/v1/timetracking/record | Create or Update Hour Records *HoursApi* | [**create_time_tracking_hour_record**](docs/HoursApi.md#create_time_tracking_hour_record) | **POST** /api/v1/timetracking/add | Create Hour Record *HoursApi* | [**delete_time_tracking_hour_record**](docs/HoursApi.md#delete_time_tracking_hour_record) | **DELETE** /api/v1/timetracking/delete/{id} | Delete Hour Record *HoursApi* | [**get_time_tracking_record**](docs/HoursApi.md#get_time_tracking_record) | **GET** /api/v1/timetracking/record/{id} | Get Time Tracking Record *HoursApi* | [**update_time_tracking_record**](docs/HoursApi.md#update_time_tracking_record) | **PUT** /api/v1/timetracking/adjust | Update Hour Record -*LastChangeInformationApi* | [**get_changed_employee_ids**](docs/LastChangeInformationApi.md#get_changed_employee_ids) | **GET** /api/v1/employees/changed | Get Changed Employee IDs +*LocationsApi* | [**create_location**](docs/LocationsApi.md#create_location) | **POST** /api/v1/hris/org/locations | Create a job location +*LocationsApi* | [**delete_location**](docs/LocationsApi.md#delete_location) | **DELETE** /api/v1/hris/org/locations/{id} | Delete a job location +*LocationsApi* | [**get_location**](docs/LocationsApi.md#get_location) | **GET** /api/v1/hris/org/locations/{id} | Get a job location +*LocationsApi* | [**get_locations**](docs/LocationsApi.md#get_locations) | **GET** /api/v1/hris/org/locations | List job locations +*LocationsApi* | [**update_location**](docs/LocationsApi.md#update_location) | **PUT** /api/v1/hris/org/locations/{id} | Update a job location *LoginApi* | [**login**](docs/LoginApi.md#login) | **POST** /api/v1/login | Login +*MealRestBreaksApi* | [**assign_employees_to_break_policy**](docs/MealRestBreaksApi.md#assign_employees_to_break_policy) | **POST** /api/v1/time-tracking/break-policies/{id}/assign | Assign Employees to Break Policy +*MealRestBreaksApi* | [**create_break**](docs/MealRestBreaksApi.md#create_break) | **POST** /api/v1/time-tracking/break-policies/{id}/breaks | Create Break +*MealRestBreaksApi* | [**create_break_policy**](docs/MealRestBreaksApi.md#create_break_policy) | **POST** /api/v1/time-tracking/break-policies | Create Break Policy +*MealRestBreaksApi* | [**delete_break**](docs/MealRestBreaksApi.md#delete_break) | **DELETE** /api/v1/time-tracking/breaks/{id} | Delete Break +*MealRestBreaksApi* | [**delete_break_policy**](docs/MealRestBreaksApi.md#delete_break_policy) | **DELETE** /api/v1/time-tracking/break-policies/{id} | Delete Break Policy +*MealRestBreaksApi* | [**get_break**](docs/MealRestBreaksApi.md#get_break) | **GET** /api/v1/time-tracking/breaks/{id} | Get Break +*MealRestBreaksApi* | [**get_break_policy**](docs/MealRestBreaksApi.md#get_break_policy) | **GET** /api/v1/time-tracking/break-policies/{id} | Get Break Policy +*MealRestBreaksApi* | [**get_break_policy_suggestions**](docs/MealRestBreaksApi.md#get_break_policy_suggestions) | **POST** /api/v1/time-tracking/break-policies/suggestions | Get Break Policy Suggestions +*MealRestBreaksApi* | [**list_break_assessments**](docs/MealRestBreaksApi.md#list_break_assessments) | **GET** /api/v1/time-tracking/break-assessments | List Break Assessments +*MealRestBreaksApi* | [**list_break_policies**](docs/MealRestBreaksApi.md#list_break_policies) | **GET** /api/v1/time-tracking/break-policies | List Break Policies +*MealRestBreaksApi* | [**list_break_policy_breaks**](docs/MealRestBreaksApi.md#list_break_policy_breaks) | **GET** /api/v1/time-tracking/break-policies/{id}/breaks | List Breaks for Break Policy +*MealRestBreaksApi* | [**list_break_policy_employees**](docs/MealRestBreaksApi.md#list_break_policy_employees) | **GET** /api/v1/time-tracking/break-policies/{id}/employees | List Break Policy Employees +*MealRestBreaksApi* | [**list_employee_break_availabilities**](docs/MealRestBreaksApi.md#list_employee_break_availabilities) | **GET** /api/v1/time-tracking/employees/{id}/break-availabilities | List Employee Break Availabilities +*MealRestBreaksApi* | [**list_employee_break_policies**](docs/MealRestBreaksApi.md#list_employee_break_policies) | **GET** /api/v1/time-tracking/employees/{id}/break-policies | List Employee Break Policies +*MealRestBreaksApi* | [**replace_breaks_for_break_policy**](docs/MealRestBreaksApi.md#replace_breaks_for_break_policy) | **PUT** /api/v1/time-tracking/break-policies/{id}/breaks | Replace Breaks for Break Policy +*MealRestBreaksApi* | [**set_break_policy_employees**](docs/MealRestBreaksApi.md#set_break_policy_employees) | **PUT** /api/v1/time-tracking/break-policies/{id}/assign | Set Employees for Break Policy +*MealRestBreaksApi* | [**sync_break_policy**](docs/MealRestBreaksApi.md#sync_break_policy) | **PUT** /api/v1/time-tracking/break-policies/{id}/sync | Sync Break Policy +*MealRestBreaksApi* | [**unassign_employees_from_break_policy**](docs/MealRestBreaksApi.md#unassign_employees_from_break_policy) | **POST** /api/v1/time-tracking/break-policies/{id}/unassign | Unassign Employees from Break Policy +*MealRestBreaksApi* | [**update_break**](docs/MealRestBreaksApi.md#update_break) | **PATCH** /api/v1/time-tracking/breaks/{id} | Update Break +*MealRestBreaksApi* | [**update_break_policy**](docs/MealRestBreaksApi.md#update_break_policy) | **PATCH** /api/v1/time-tracking/break-policies/{id} | Update Break Policy +*OnboardingApi* | [**caa7fc488bcfaef14125398f2ebb987d**](docs/OnboardingApi.md#caa7fc488bcfaef14125398f2ebb987d) | **DELETE** /api/v1/new-hire-packets/{id} | Delete new hire packet +*OnboardingApi* | [**call_0158de7cde2a4c4cf577f0b25070d809**](docs/OnboardingApi.md#call_0158de7cde2a4c4cf577f0b25070d809) | **GET** /api/v1/employees/{employeeId}/onboarding-experiences | List employee onboarding experiences +*OnboardingApi* | [**call_044949386f2d655c6a627ef53f9434b7**](docs/OnboardingApi.md#call_044949386f2d655c6a627ef53f9434b7) | **GET** /api/v1/onboarding/new-hire-widget | Get welcome new hires widget +*OnboardingApi* | [**call_19c7e26a1347ae7eb22919e9b0595c19**](docs/OnboardingApi.md#call_19c7e26a1347ae7eb22919e9b0595c19) | **POST** /api/v1/new-hire-packets/{id}/cancel | Cancel new hire packet +*OnboardingApi* | [**call_1ab0279d46023eb951a434f24df885f1**](docs/OnboardingApi.md#call_1ab0279d46023eb951a434f24df885f1) | **PUT** /api/v1/new-hire-packets/{id} | Update new hire packet +*OnboardingApi* | [**call_288aa996aba16d7a495c62321ea999a9**](docs/OnboardingApi.md#call_288aa996aba16d7a495c62321ea999a9) | **POST** /api/v1/employees/{employeeId}/onboarding-experiences | Create employee onboarding experience +*OnboardingApi* | [**call_696f0a229cdde60b733568e3c4d043d9**](docs/OnboardingApi.md#call_696f0a229cdde60b733568e3c4d043d9) | **GET** /api/v1/new-hire-packets/{id} | Get new hire packet by id +*OnboardingApi* | [**call_847dd061d1d1859e7ce8cb3adfc9faf2**](docs/OnboardingApi.md#call_847dd061d1d1859e7ce8cb3adfc9faf2) | **GET** /api/v1/employees/{employeeId}/onboarding-experiences/{onboardingExperienceId} | Get employee onboarding experience by id +*OnboardingApi* | [**ec1ba8e76f33960b018d0d7518fe97b5**](docs/OnboardingApi.md#ec1ba8e76f33960b018d0d7518fe97b5) | **POST** /api/v1/new-hire-packets | Create new hire packet +*OnboardingApi* | [**f44b802c30cdea2b9076b3f82f99c74d**](docs/OnboardingApi.md#f44b802c30cdea2b9076b3f82f99c74d) | **GET** /api/v1/new-hire-packets | List new hire packets +*OnboardingApi* | [**f49b0f1f2fb1ef2c408ba12916ee9baa**](docs/OnboardingApi.md#f49b0f1f2fb1ef2c408ba12916ee9baa) | **POST** /api/v1/new-hire-packets/{id}/send | Send new hire packet +*OnboardingApi* | [**update_new_hire_packet_gtky_answer_visibility**](docs/OnboardingApi.md#update_new_hire_packet_gtky_answer_visibility) | **PUT** /api/v1/new-hire-packets/{id}/question-visibility | Update GTKY answer visibility for a new hire packet +*PayGradesBandsApi* | [**delete_compensation_level_groups_or_level**](docs/PayGradesBandsApi.md#delete_compensation_level_groups_or_level) | **DELETE** /api/v1/pay-grades-and-bands/levels/{segment} | Delete Compensation Level Groups or Level +*PayGradesBandsApi* | [**get_compensation_level_group_status_counts**](docs/PayGradesBandsApi.md#get_compensation_level_group_status_counts) | **GET** /api/v1/pay-grades-and-bands/status-counts | Get Compensation Level Group Status Counts +*PayGradesBandsApi* | [**get_job_title_level_assignments**](docs/PayGradesBandsApi.md#get_job_title_level_assignments) | **GET** /api/v1/pay-grades-and-bands/job-titles | Get Job Titles and Level Assignments +*PayGradesBandsApi* | [**get_levels_and_bands_review**](docs/PayGradesBandsApi.md#get_levels_and_bands_review) | **GET** /api/v1/pay-grades-and-bands/review | Get Levels and Bands Review +*PayGradesBandsApi* | [**get_levels_and_bands_status**](docs/PayGradesBandsApi.md#get_levels_and_bands_status) | **GET** /api/v1/pay-grades-and-bands/status | Get Levels and Bands Status +*PayGradesBandsApi* | [**get_pay_bands**](docs/PayGradesBandsApi.md#get_pay_bands) | **GET** /api/v1/pay-grades-and-bands/pay-bands | Get Pay Bands +*PayGradesBandsApi* | [**get_published_levels_and_bands**](docs/PayGradesBandsApi.md#get_published_levels_and_bands) | **GET** /api/v1/pay-grades-and-bands | Get Published Levels and Bands +*PayGradesBandsApi* | [**list_compensation_level_groups_and_levels**](docs/PayGradesBandsApi.md#list_compensation_level_groups_and_levels) | **GET** /api/v1/pay-grades-and-bands/levels | List Compensation Level Groups and Levels +*PayGradesBandsApi* | [**list_job_titles_with_employees**](docs/PayGradesBandsApi.md#list_job_titles_with_employees) | **GET** /api/v1/pay-grades-and-bands/job-titles-with-employees | List Job Titles with Employees +*PayGradesBandsApi* | [**publish_draft_compensation_level_groups**](docs/PayGradesBandsApi.md#publish_draft_compensation_level_groups) | **POST** /api/v1/pay-grades-and-bands/publish | Publish Draft Compensation Level Groups +*PayGradesBandsApi* | [**replace_job_title_level_assignments**](docs/PayGradesBandsApi.md#replace_job_title_level_assignments) | **PUT** /api/v1/pay-grades-and-bands/job-titles | Replace Job Title Level Assignments +*PayGradesBandsApi* | [**update_compensation_level_groups_and_levels**](docs/PayGradesBandsApi.md#update_compensation_level_groups_and_levels) | **PUT** /api/v1/pay-grades-and-bands/levels | Update Compensation Level Groups and Levels +*PayGradesBandsApi* | [**update_pay_bands**](docs/PayGradesBandsApi.md#update_pay_bands) | **PUT** /api/v1/pay-grades-and-bands/pay-bands | Update Pay Bands +*PayGradesBandsApi* | [**upload_levels_and_bands_csv**](docs/PayGradesBandsApi.md#upload_levels_and_bands_csv) | **POST** /api/v1/pay-grades-and-bands/import | Upload Levels and Bands CSV *PhotosApi* | [**get_employee_photo**](docs/PhotosApi.md#get_employee_photo) | **GET** /api/v1/employees/{employeeId}/photo/{size} | Get Employee Photo *PhotosApi* | [**upload_employee_photo**](docs/PhotosApi.md#upload_employee_photo) | **POST** /api/v1/employees/{employeeId}/photo | Upload Employee Photo -*PublicAPIApi* | [**add_company_file_category**](docs/PublicAPIApi.md#add_company_file_category) | **POST** /api/v1/files/categories | Create Company File Category -*PublicAPIApi* | [**add_employee_file_category**](docs/PublicAPIApi.md#add_employee_file_category) | **POST** /api/v1/employees/files/categories | Create Employee File Category +*PublicAPIApi* | [**a05b6d5f564f805d688ff2c1e37c3990**](docs/PublicAPIApi.md#a05b6d5f564f805d688ff2c1e37c3990) | **POST** /api/v1/compensation/planning_cycles/{id}/recommendations/send | Send recommendations to next stage +*PublicAPIApi* | [**a6b8da1348a3151fe95adc03aaf64447**](docs/PublicAPIApi.md#a6b8da1348a3151fe95adc03aaf64447) | **GET** /api/v1/compensation/planning_cycles/{id}/employees | List employees in compensation planning cycle +*PublicAPIApi* | [**add_custom_field_list_value**](docs/PublicAPIApi.md#add_custom_field_list_value) | **POST** /api/v1/hris/custom-fields/{customFieldId}/list-values | Add Custom Field List Value +*PublicAPIApi* | [**add_total_rewards_employees**](docs/PublicAPIApi.md#add_total_rewards_employees) | **POST** /api/v1/compensation/total_rewards/employees | Add Employees to Total Rewards *PublicAPIApi* | [**adjust_time_off_balance**](docs/PublicAPIApi.md#adjust_time_off_balance) | **PUT** /api/v1/employees/{employeeId}/time_off/balance_adjustment | Adjust Time Off Balance +*PublicAPIApi* | [**approve_timesheet**](docs/PublicAPIApi.md#approve_timesheet) | **POST** /api/v1/time-tracking/timesheet-approvals | Approve Timesheet +*PublicAPIApi* | [**archive_public_custom_field**](docs/PublicAPIApi.md#archive_public_custom_field) | **DELETE** /api/v1/hris/custom-fields/{customFieldId} | Archive Custom Field *PublicAPIApi* | [**assign_employees_to_break_policy**](docs/PublicAPIApi.md#assign_employees_to_break_policy) | **POST** /api/v1/time-tracking/break-policies/{id}/assign | Assign Employees to Break Policy -*PublicAPIApi* | [**assign_time_off_policies**](docs/PublicAPIApi.md#assign_time_off_policies) | **PUT** /api/v1/employees/{employeeId}/time_off/policies | Assign Time Off Policies -*PublicAPIApi* | [**assign_time_off_policies_v1_1**](docs/PublicAPIApi.md#assign_time_off_policies_v1_1) | **PUT** /api/v1_1/employees/{employeeId}/time_off/policies | Assign Time Off Policies v1.1 +*PublicAPIApi* | [**assign_time_off_policies_v1**](docs/PublicAPIApi.md#assign_time_off_policies_v1) | **PUT** /api/v1/employees/{employeeId}/time_off/policies | Assign Time Off Policies (v1) +*PublicAPIApi* | [**assign_time_off_policies_v11**](docs/PublicAPIApi.md#assign_time_off_policies_v11) | **PUT** /api/v1_1/employees/{employeeId}/time_off/policies | Assign Time Off Policies (v1.1) +*PublicAPIApi* | [**b1e467e0eef72350eec61fcfeaf4e19d**](docs/PublicAPIApi.md#b1e467e0eef72350eec61fcfeaf4e19d) | **DELETE** /api/v1/compensation/planning_cycles/{id}/approvals/employee/{employeeId} | Remove from approval flow +*PublicAPIApi* | [**b3c51254de6918637a971fe4af382a53**](docs/PublicAPIApi.md#b3c51254de6918637a971fe4af382a53) | **GET** /api/v1/compensation/planning_cycles/{id}/admins | List compensation planning cycle admins +*PublicAPIApi* | [**b65f246186b41a9783a9397c11c703b4**](docs/PublicAPIApi.md#b65f246186b41a9783a9397c11c703b4) | **GET** /api/v1/compensation/planning_cycles | List compensation planning cycles +*PublicAPIApi* | [**baa7162824294d030115568d1d8e6ca7**](docs/PublicAPIApi.md#baa7162824294d030115568d1d8e6ca7) | **GET** /api/v1/meta/timezones/{id} | Get timezone by ID +*PublicAPIApi* | [**bulk_insert_company_holidays**](docs/PublicAPIApi.md#bulk_insert_company_holidays) | **POST** /api/v1/holidays/bulk-insert | Bulk Create Company Holidays +*PublicAPIApi* | [**bulk_upsert_time_tracking_employee_enrollments**](docs/PublicAPIApi.md#bulk_upsert_time_tracking_employee_enrollments) | **POST** /api/v1/time-tracking/employees/bulk-upsert | Bulk Upsert Employee Enrollments +*PublicAPIApi* | [**c5880b509783cd9d7fce9ddf5d6af1be**](docs/PublicAPIApi.md#c5880b509783cd9d7fce9ddf5d6af1be) | **PUT** /api/v1/compensation/equity/settings | Update company equity settings +*PublicAPIApi* | [**c79f9c5950f983e59d2626faa30c00a1**](docs/PublicAPIApi.md#c79f9c5950f983e59d2626faa30c00a1) | **PUT** /api/v1/compensation/planning_cycles/{id}/change_comm/template | Save change comm template +*PublicAPIApi* | [**c7c32ed5278ac67e2e518bf7484a75dc**](docs/PublicAPIApi.md#c7c32ed5278ac67e2e518bf7484a75dc) | **POST** /api/v1/compensation/planning_cycles/{id}/admins | Add cycle admins +*PublicAPIApi* | [**caa7fc488bcfaef14125398f2ebb987d**](docs/PublicAPIApi.md#caa7fc488bcfaef14125398f2ebb987d) | **DELETE** /api/v1/new-hire-packets/{id} | Delete new hire packet +*PublicAPIApi* | [**call_0158de7cde2a4c4cf577f0b25070d809**](docs/PublicAPIApi.md#call_0158de7cde2a4c4cf577f0b25070d809) | **GET** /api/v1/employees/{employeeId}/onboarding-experiences | List employee onboarding experiences +*PublicAPIApi* | [**call_044949386f2d655c6a627ef53f9434b7**](docs/PublicAPIApi.md#call_044949386f2d655c6a627ef53f9434b7) | **GET** /api/v1/onboarding/new-hire-widget | Get welcome new hires widget +*PublicAPIApi* | [**call_100b0cf8c5207b35697ff10370fd5fe1**](docs/PublicAPIApi.md#call_100b0cf8c5207b35697ff10370fd5fe1) | **PUT** /api/v1/compensation/planning_cycles/{id} | Update compensation planning cycle +*PublicAPIApi* | [**call_10d66d8561dd7dac50ff9c21ef63d83b**](docs/PublicAPIApi.md#call_10d66d8561dd7dac50ff9c21ef63d83b) | **GET** /api/v1/meta/timezones/by-zip/{zip} | Get timezone by ZIP code +*PublicAPIApi* | [**call_19c7e26a1347ae7eb22919e9b0595c19**](docs/PublicAPIApi.md#call_19c7e26a1347ae7eb22919e9b0595c19) | **POST** /api/v1/new-hire-packets/{id}/cancel | Cancel new hire packet +*PublicAPIApi* | [**call_1ab0279d46023eb951a434f24df885f1**](docs/PublicAPIApi.md#call_1ab0279d46023eb951a434f24df885f1) | **PUT** /api/v1/new-hire-packets/{id} | Update new hire packet +*PublicAPIApi* | [**call_1d1fc0f164cb51973a0206b8e2fb2d2d**](docs/PublicAPIApi.md#call_1d1fc0f164cb51973a0206b8e2fb2d2d) | **POST** /api/v1/compensation/planning_cycles/{id}/budgets/import | Import budget breakdown +*PublicAPIApi* | [**call_1d64402ee192568adbd5e3179a91e6e2**](docs/PublicAPIApi.md#call_1d64402ee192568adbd5e3179a91e6e2) | **PUT** /api/v1/compensation/planning_cycles/{id}/budgets/breakdown | Save budget breakdown +*PublicAPIApi* | [**call_22ad75be25455279e2987c80851af5fc**](docs/PublicAPIApi.md#call_22ad75be25455279e2987c80851af5fc) | **DELETE** /api/v1/compensation/planning_cycles/{id} | Delete compensation planning cycle +*PublicAPIApi* | [**call_288aa996aba16d7a495c62321ea999a9**](docs/PublicAPIApi.md#call_288aa996aba16d7a495c62321ea999a9) | **POST** /api/v1/employees/{employeeId}/onboarding-experiences | Create employee onboarding experience +*PublicAPIApi* | [**call_329acecaa6df729733d0752aa9f6b204**](docs/PublicAPIApi.md#call_329acecaa6df729733d0752aa9f6b204) | **GET** /api/v1/compensation/planning_cycles/{id}/worksheet | Get compensation planning cycle worksheet +*PublicAPIApi* | [**call_3958585c861325ea7a2cd30a8c74f042**](docs/PublicAPIApi.md#call_3958585c861325ea7a2cd30a8c74f042) | **POST** /api/v1/compensation/planning_cycles/{id}/employees | Add employees to cycle +*PublicAPIApi* | [**call_3a19f07aa737dc826ba43b9a1c1cd257**](docs/PublicAPIApi.md#call_3a19f07aa737dc826ba43b9a1c1cd257) | **PUT** /api/v1/compensation/planning_cycles/{id}/launch | Launch compensation planning cycle +*PublicAPIApi* | [**call_4e886b18264480611f380805301c49c4**](docs/PublicAPIApi.md#call_4e886b18264480611f380805301c49c4) | **GET** /api/v1/compensation/planning_cycles/{id}/approvals | Get compensation planning approval flows +*PublicAPIApi* | [**call_593d5bff120edf2a218a92022a682728**](docs/PublicAPIApi.md#call_593d5bff120edf2a218a92022a682728) | **GET** /api/v1/compensation/planning_cycles/{id}/worksheet/export | Export compensation planning cycle worksheet to CSV +*PublicAPIApi* | [**call_5c2b55158b0950b1e9211655666645b6**](docs/PublicAPIApi.md#call_5c2b55158b0950b1e9211655666645b6) | **GET** /api/v1/compensation/planning_cycles/{id} | Get compensation planning cycle details +*PublicAPIApi* | [**call_5c4aab35a34f5760ec044104b5232bf5**](docs/PublicAPIApi.md#call_5c4aab35a34f5760ec044104b5232bf5) | **POST** /api/v1/compensation/planning_cycles/{id}/approvals/final_approver/{employeeId} | Set final approver *PublicAPIApi* | [**call_5c5fb0f1211ae1c9451753f92f1053b6**](docs/PublicAPIApi.md#call_5c5fb0f1211ae1c9451753f92f1053b6) | **GET** /api/v1/meta/timezones | List timezones +*PublicAPIApi* | [**call_696f0a229cdde60b733568e3c4d043d9**](docs/PublicAPIApi.md#call_696f0a229cdde60b733568e3c4d043d9) | **GET** /api/v1/new-hire-packets/{id} | Get new hire packet by id +*PublicAPIApi* | [**call_7efceaee2c010f88244dd01ee81e6e7b**](docs/PublicAPIApi.md#call_7efceaee2c010f88244dd01ee81e6e7b) | **GET** /api/v1/compensation/planning_cycles/{id}/budgets | Get compensation planning cycle budgets +*PublicAPIApi* | [**call_847dd061d1d1859e7ce8cb3adfc9faf2**](docs/PublicAPIApi.md#call_847dd061d1d1859e7ce8cb3adfc9faf2) | **GET** /api/v1/employees/{employeeId}/onboarding-experiences/{onboardingExperienceId} | Get employee onboarding experience by id +*PublicAPIApi* | [**call_89a5068111ec499135c7d6e9a53d5a30**](docs/PublicAPIApi.md#call_89a5068111ec499135c7d6e9a53d5a30) | **DELETE** /api/v1/compensation/planning_cycles/{id}/employees | Remove employees from cycle +*PublicAPIApi* | [**call_9bc279d788f6e86b4cd8b2e0d3de91b1**](docs/PublicAPIApi.md#call_9bc279d788f6e86b4cd8b2e0d3de91b1) | **GET** /api/v1/compensation/planning_cycles/{id}/summary | Get compensation planning cycle summary +*PublicAPIApi* | [**call_9f398e2652ea47a6dc5121ce5184222a**](docs/PublicAPIApi.md#call_9f398e2652ea47a6dc5121ce5184222a) | **GET** /api/v1/compensation/tools | List available compensation tools +*PublicAPIApi* | [**cf87b8e09a001b6fb81dfce6c20ab9e3**](docs/PublicAPIApi.md#cf87b8e09a001b6fb81dfce6c20ab9e3) | **PUT** /api/v1/compensation/planning_cycles/{id}/approvals/{templateId} | Update approval flow +*PublicAPIApi* | [**check_total_rewards_profile**](docs/PublicAPIApi.md#check_total_rewards_profile) | **GET** /api/v1/compensation/total_rewards/{employeeId} | Check Total Rewards Profile Availability +*PublicAPIApi* | [**clock_in**](docs/PublicAPIApi.md#clock_in) | **POST** /api/v1/time-tracking/clock-ins | Clock In +*PublicAPIApi* | [**clock_out**](docs/PublicAPIApi.md#clock_out) | **POST** /api/v1/time-tracking/clock-outs | Clock Out +*PublicAPIApi* | [**close_goal**](docs/PublicAPIApi.md#close_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/close | Close Goal +*PublicAPIApi* | [**create_alert_configuration**](docs/PublicAPIApi.md#create_alert_configuration) | **POST** /api/v1/alert-configurations | Create Alert Configuration *PublicAPIApi* | [**create_application_comment**](docs/PublicAPIApi.md#create_application_comment) | **POST** /api/v1/applicant_tracking/applications/{applicationId}/comments | Create Job Application Comment *PublicAPIApi* | [**create_break**](docs/PublicAPIApi.md#create_break) | **POST** /api/v1/time-tracking/break-policies/{id}/breaks | Create Break *PublicAPIApi* | [**create_break_policy**](docs/PublicAPIApi.md#create_break_policy) | **POST** /api/v1/time-tracking/break-policies | Create Break Policy *PublicAPIApi* | [**create_candidate**](docs/PublicAPIApi.md#create_candidate) | **POST** /api/v1/applicant_tracking/application | Create Candidate +*PublicAPIApi* | [**create_clock_entry**](docs/PublicAPIApi.md#create_clock_entry) | **POST** /api/v1/time-tracking/clock-entries | Create Clock Entry +*PublicAPIApi* | [**create_company_file_category**](docs/PublicAPIApi.md#create_company_file_category) | **POST** /api/v1/files/categories | Create Company File Category +*PublicAPIApi* | [**create_company_holiday**](docs/PublicAPIApi.md#create_company_holiday) | **POST** /api/v1/holidays | Create Company Holiday +*PublicAPIApi* | [**create_compensation_benchmark**](docs/PublicAPIApi.md#create_compensation_benchmark) | **POST** /api/v1/compensation/benchmarks | Create Compensation Benchmark +*PublicAPIApi* | [**create_compensation_benchmark_source**](docs/PublicAPIApi.md#create_compensation_benchmark_source) | **POST** /api/v1/compensation/benchmarks/sources | Create Compensation Benchmark Source *PublicAPIApi* | [**create_employee**](docs/PublicAPIApi.md#create_employee) | **POST** /api/v1/employees | Create Employee *PublicAPIApi* | [**create_employee_dependent**](docs/PublicAPIApi.md#create_employee_dependent) | **POST** /api/v1/employeedependents | Create Employee Dependent +*PublicAPIApi* | [**create_employee_file_category**](docs/PublicAPIApi.md#create_employee_file_category) | **POST** /api/v1/employees/files/categories | Create Employee File Category *PublicAPIApi* | [**create_employee_training_record**](docs/PublicAPIApi.md#create_employee_training_record) | **POST** /api/v1/training/record/employee/{employeeId} | Create Employee Training Record +*PublicAPIApi* | [**create_goal**](docs/PublicAPIApi.md#create_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals | Create Goal +*PublicAPIApi* | [**create_goal_comment**](docs/PublicAPIApi.md#create_goal_comment) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | Create Goal Comment +*PublicAPIApi* | [**create_hour_entry**](docs/PublicAPIApi.md#create_hour_entry) | **POST** /api/v1/time-tracking/hour-entries | Create Hour Entry *PublicAPIApi* | [**create_job_opening**](docs/PublicAPIApi.md#create_job_opening) | **POST** /api/v1/applicant_tracking/job_opening | Create Job Opening +*PublicAPIApi* | [**create_location**](docs/PublicAPIApi.md#create_location) | **POST** /api/v1/hris/org/locations | Create a job location *PublicAPIApi* | [**create_or_update_time_tracking_hour_records**](docs/PublicAPIApi.md#create_or_update_time_tracking_hour_records) | **POST** /api/v1/timetracking/record | Create or Update Hour Records *PublicAPIApi* | [**create_or_update_timesheet_clock_entries**](docs/PublicAPIApi.md#create_or_update_timesheet_clock_entries) | **POST** /api/v1/time_tracking/clock_entries/store | Create or Update Timesheet Clock Entries *PublicAPIApi* | [**create_or_update_timesheet_hour_entries**](docs/PublicAPIApi.md#create_or_update_timesheet_hour_entries) | **POST** /api/v1/time_tracking/hour_entries/store | Create or Update Timesheet Hour Entries -*PublicAPIApi* | [**create_table_row**](docs/PublicAPIApi.md#create_table_row) | **POST** /api/v1/employees/{id}/tables/{table} | Create Table Row -*PublicAPIApi* | [**create_table_row_v11**](docs/PublicAPIApi.md#create_table_row_v11) | **POST** /api/v1_1/employees/{id}/tables/{table} | Create Table Row v1.1 +*PublicAPIApi* | [**create_project_task**](docs/PublicAPIApi.md#create_project_task) | **POST** /api/v1/time-tracking/projects/{projectId}/tasks | Create Time Tracking Project Task +*PublicAPIApi* | [**create_public_custom_field**](docs/PublicAPIApi.md#create_public_custom_field) | **POST** /api/v1/hris/custom-fields | Create Custom Field +*PublicAPIApi* | [**create_shift_differential**](docs/PublicAPIApi.md#create_shift_differential) | **POST** /api/v1/time-tracking/shift-differentials | Create Time Tracking Shift Differential +*PublicAPIApi* | [**create_table_row_v1**](docs/PublicAPIApi.md#create_table_row_v1) | **POST** /api/v1/employees/{id}/tables/{table} | Create Table Row (v1) +*PublicAPIApi* | [**create_table_row_v11**](docs/PublicAPIApi.md#create_table_row_v11) | **POST** /api/v1_1/employees/{id}/tables/{table} | Create Table Row (v1.1) *PublicAPIApi* | [**create_time_off_history**](docs/PublicAPIApi.md#create_time_off_history) | **PUT** /api/v1/employees/{employeeId}/time_off/history | Create Time Off History Item *PublicAPIApi* | [**create_time_off_request**](docs/PublicAPIApi.md#create_time_off_request) | **PUT** /api/v1/employees/{employeeId}/time_off/request | Create Time Off Request +*PublicAPIApi* | [**create_time_tracking_configuration**](docs/PublicAPIApi.md#create_time_tracking_configuration) | **POST** /api/v1/time-tracking/configurations | Create Configuration *PublicAPIApi* | [**create_time_tracking_hour_record**](docs/PublicAPIApi.md#create_time_tracking_hour_record) | **POST** /api/v1/timetracking/add | Create Hour Record -*PublicAPIApi* | [**create_time_tracking_project**](docs/PublicAPIApi.md#create_time_tracking_project) | **POST** /api/v1/time_tracking/projects | Create Time Tracking Project +*PublicAPIApi* | [**create_time_tracking_project**](docs/PublicAPIApi.md#create_time_tracking_project) | **POST** /api/v1/time-tracking/projects | Create Time Tracking Project +*PublicAPIApi* | [**create_time_tracking_project_legacy**](docs/PublicAPIApi.md#create_time_tracking_project_legacy) | **POST** /api/v1/time_tracking/projects | Create Time Tracking Project (Legacy) *PublicAPIApi* | [**create_timesheet_clock_in_entry**](docs/PublicAPIApi.md#create_timesheet_clock_in_entry) | **POST** /api/v1/time_tracking/employees/{employeeId}/clock_in | Create Timesheet Clock-In Entry *PublicAPIApi* | [**create_timesheet_clock_out_entry**](docs/PublicAPIApi.md#create_timesheet_clock_out_entry) | **POST** /api/v1/time_tracking/employees/{employeeId}/clock_out | Create Timesheet Clock-Out Entry *PublicAPIApi* | [**create_training_category**](docs/PublicAPIApi.md#create_training_category) | **POST** /api/v1/training/category | Create Training Category *PublicAPIApi* | [**create_training_type**](docs/PublicAPIApi.md#create_training_type) | **POST** /api/v1/training/type | Create Training Type *PublicAPIApi* | [**create_webhook**](docs/PublicAPIApi.md#create_webhook) | **POST** /api/v1/webhooks | Create Webhook +*PublicAPIApi* | [**d6987e300672a00c7cfe59afebb64156**](docs/PublicAPIApi.md#d6987e300672a00c7cfe59afebb64156) | **GET** /api/v1/compensation/planning_cycles/{id}/change_comm | Get change communication letter details +*PublicAPIApi* | [**dacd313af2106213fc4696175941ce65**](docs/PublicAPIApi.md#dacd313af2106213fc4696175941ce65) | **PUT** /api/v1/compensation/planning_cycles/{id}/budgets/guidelines | Save budget guidelines +*PublicAPIApi* | [**db49fb29f9f04d59afad7c01ce860418**](docs/PublicAPIApi.md#db49fb29f9f04d59afad7c01ce860418) | **GET** /api/v1/compensation/equity/settings | Get company equity settings *PublicAPIApi* | [**delete_break**](docs/PublicAPIApi.md#delete_break) | **DELETE** /api/v1/time-tracking/breaks/{id} | Delete Break *PublicAPIApi* | [**delete_break_policy**](docs/PublicAPIApi.md#delete_break_policy) | **DELETE** /api/v1/time-tracking/break-policies/{id} | Delete Break Policy +*PublicAPIApi* | [**delete_clock_entry**](docs/PublicAPIApi.md#delete_clock_entry) | **DELETE** /api/v1/time-tracking/clock-entries/{id} | Delete Clock Entry *PublicAPIApi* | [**delete_company_file**](docs/PublicAPIApi.md#delete_company_file) | **DELETE** /api/v1/files/{fileId} | Delete Company File +*PublicAPIApi* | [**delete_company_holiday**](docs/PublicAPIApi.md#delete_company_holiday) | **DELETE** /api/v1/holidays/{id} | Delete Company Holiday +*PublicAPIApi* | [**delete_compensation_benchmark**](docs/PublicAPIApi.md#delete_compensation_benchmark) | **DELETE** /api/v1/compensation/benchmarks/{id} | Delete Compensation Benchmark +*PublicAPIApi* | [**delete_compensation_benchmark_source**](docs/PublicAPIApi.md#delete_compensation_benchmark_source) | **DELETE** /api/v1/compensation/benchmarks/sources | Delete Compensation Benchmark Source +*PublicAPIApi* | [**delete_compensation_level_groups_or_level**](docs/PublicAPIApi.md#delete_compensation_level_groups_or_level) | **DELETE** /api/v1/pay-grades-and-bands/levels/{segment} | Delete Compensation Level Groups or Level +*PublicAPIApi* | [**delete_custom_field_list_value**](docs/PublicAPIApi.md#delete_custom_field_list_value) | **DELETE** /api/v1/hris/custom-fields/{customFieldId}/list-values/{listValueId} | Delete Custom Field List Value +*PublicAPIApi* | [**delete_employee**](docs/PublicAPIApi.md#delete_employee) | **DELETE** /api/v1/employees/{id} | Delete employee *PublicAPIApi* | [**delete_employee_file**](docs/PublicAPIApi.md#delete_employee_file) | **DELETE** /api/v1/employees/{id}/files/{fileId} | Delete Employee File *PublicAPIApi* | [**delete_employee_table_row**](docs/PublicAPIApi.md#delete_employee_table_row) | **DELETE** /api/v1/employees/{id}/tables/{table}/{rowId} | Delete Employee Table Row *PublicAPIApi* | [**delete_employee_training_record**](docs/PublicAPIApi.md#delete_employee_training_record) | **DELETE** /api/v1/training/record/{employeeTrainingRecordId} | Delete Employee Training Record *PublicAPIApi* | [**delete_goal**](docs/PublicAPIApi.md#delete_goal) | **DELETE** /api/v1/performance/employees/{employeeId}/goals/{goalId} | Delete Goal *PublicAPIApi* | [**delete_goal_comment**](docs/PublicAPIApi.md#delete_goal_comment) | **DELETE** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} | Delete Goal Comment +*PublicAPIApi* | [**delete_hour_entry**](docs/PublicAPIApi.md#delete_hour_entry) | **DELETE** /api/v1/time-tracking/hour-entries/{id} | Delete Hour Entry +*PublicAPIApi* | [**delete_location**](docs/PublicAPIApi.md#delete_location) | **DELETE** /api/v1/hris/org/locations/{id} | Delete a job location +*PublicAPIApi* | [**delete_project**](docs/PublicAPIApi.md#delete_project) | **DELETE** /api/v1/time-tracking/projects/{id} | Delete Time Tracking Project +*PublicAPIApi* | [**delete_shift_differential**](docs/PublicAPIApi.md#delete_shift_differential) | **DELETE** /api/v1/time-tracking/shift-differentials/{id} | Delete Time Tracking Shift Differential +*PublicAPIApi* | [**delete_task**](docs/PublicAPIApi.md#delete_task) | **DELETE** /api/v1/time-tracking/tasks/{id} | Delete Time Tracking Task +*PublicAPIApi* | [**delete_time_tracking_configuration**](docs/PublicAPIApi.md#delete_time_tracking_configuration) | **DELETE** /api/v1/time-tracking/configurations/{id} | Delete Configuration *PublicAPIApi* | [**delete_time_tracking_hour_record**](docs/PublicAPIApi.md#delete_time_tracking_hour_record) | **DELETE** /api/v1/timetracking/delete/{id} | Delete Hour Record +*PublicAPIApi* | [**delete_time_tracking_kiosk**](docs/PublicAPIApi.md#delete_time_tracking_kiosk) | **DELETE** /api/v1/time-tracking/kiosks/{id} | Delete Time Tracking Kiosk *PublicAPIApi* | [**delete_timesheet_clock_entries_via_post**](docs/PublicAPIApi.md#delete_timesheet_clock_entries_via_post) | **POST** /api/v1/time_tracking/clock_entries/delete | Delete Timesheet Clock Entries *PublicAPIApi* | [**delete_timesheet_hour_entries_via_post**](docs/PublicAPIApi.md#delete_timesheet_hour_entries_via_post) | **POST** /api/v1/time_tracking/hour_entries/delete | Delete Timesheet Hour Entries *PublicAPIApi* | [**delete_training_category**](docs/PublicAPIApi.md#delete_training_category) | **DELETE** /api/v1/training/category/{trainingCategoryId} | Delete Training Category *PublicAPIApi* | [**delete_training_type**](docs/PublicAPIApi.md#delete_training_type) | **DELETE** /api/v1/training/type/{trainingTypeId} | Delete Training Type *PublicAPIApi* | [**delete_webhook**](docs/PublicAPIApi.md#delete_webhook) | **DELETE** /api/v1/webhooks/{id} | Delete Webhook +*PublicAPIApi* | [**e2ac4e1535f296cb8901f209e04caa83**](docs/PublicAPIApi.md#e2ac4e1535f296cb8901f209e04caa83) | **POST** /api/v1/compensation/planning_cycles | Create compensation planning cycle +*PublicAPIApi* | [**ec1ba8e76f33960b018d0d7518fe97b5**](docs/PublicAPIApi.md#ec1ba8e76f33960b018d0d7518fe97b5) | **POST** /api/v1/new-hire-packets | Create new hire packet +*PublicAPIApi* | [**edit_custom_field_list_value**](docs/PublicAPIApi.md#edit_custom_field_list_value) | **PATCH** /api/v1/hris/custom-fields/{customFieldId}/list-values/{listValueId} | Edit Custom Field List Value +*PublicAPIApi* | [**edit_public_custom_field**](docs/PublicAPIApi.md#edit_public_custom_field) | **PUT** /api/v1/hris/custom-fields/{customFieldId} | Edit Custom Field +*PublicAPIApi* | [**ef7619b0ee4c8dc079aaea870cfbe81b**](docs/PublicAPIApi.md#ef7619b0ee4c8dc079aaea870cfbe81b) | **DELETE** /api/v1/compensation/planning_cycles/{id}/admins/{employeeId} | Remove cycle admin +*PublicAPIApi* | [**export_compensation_benchmark_details**](docs/PublicAPIApi.md#export_compensation_benchmark_details) | **GET** /api/v1/compensation/benchmarks/details/export | Export Compensation Benchmark Details +*PublicAPIApi* | [**f3883a522dadbe9e11b34f8b656e3adb**](docs/PublicAPIApi.md#f3883a522dadbe9e11b34f8b656e3adb) | **POST** /api/v1/compensation/planning_cycles/{id}/recommendations | Save recommendations +*PublicAPIApi* | [**f44b802c30cdea2b9076b3f82f99c74d**](docs/PublicAPIApi.md#f44b802c30cdea2b9076b3f82f99c74d) | **GET** /api/v1/new-hire-packets | List new hire packets +*PublicAPIApi* | [**f49b0f1f2fb1ef2c408ba12916ee9baa**](docs/PublicAPIApi.md#f49b0f1f2fb1ef2c408ba12916ee9baa) | **POST** /api/v1/new-hire-packets/{id}/send | Send new hire packet +*PublicAPIApi* | [**f4b431363af6573af46750f32632e88b**](docs/PublicAPIApi.md#f4b431363af6573af46750f32632e88b) | **PUT** /api/v1/compensation/planning_cycles/{id}/complete | Complete compensation planning cycle +*PublicAPIApi* | [**get_alert_configuration**](docs/PublicAPIApi.md#get_alert_configuration) | **GET** /api/v1/alert-configurations/{id} | Get Alert Configuration +*PublicAPIApi* | [**get_alignable_goal_options**](docs/PublicAPIApi.md#get_alignable_goal_options) | **GET** /api/v1/performance/employees/{employeeId}/goals/alignmentOptions | Get Alignable Goal Options +*PublicAPIApi* | [**get_all_currency_types**](docs/PublicAPIApi.md#get_all_currency_types) | **GET** /api/v1/meta/currency/types | Get all currency types +*PublicAPIApi* | [**get_all_provinces**](docs/PublicAPIApi.md#get_all_provinces) | **GET** /api/v1/meta/provinces | Get All Provinces *PublicAPIApi* | [**get_application_details**](docs/PublicAPIApi.md#get_application_details) | **GET** /api/v1/applicant_tracking/applications/{applicationId} | Get Job Application Details *PublicAPIApi* | [**get_applications**](docs/PublicAPIApi.md#get_applications) | **GET** /api/v1/applicant_tracking/applications | Get Job Applications *PublicAPIApi* | [**get_break**](docs/PublicAPIApi.md#get_break) | **GET** /api/v1/time-tracking/breaks/{id} | Get Break *PublicAPIApi* | [**get_break_policy**](docs/PublicAPIApi.md#get_break_policy) | **GET** /api/v1/time-tracking/break-policies/{id} | Get Break Policy -*PublicAPIApi* | [**get_by_report_id**](docs/PublicAPIApi.md#get_by_report_id) | **GET** /api/v1/custom-reports/{reportId} | Get Report by ID -*PublicAPIApi* | [**get_can_create_goal**](docs/PublicAPIApi.md#get_can_create_goal) | **GET** /api/v1/performance/employees/{employeeId}/goals/canCreateGoals | Check Goal Creation Permission +*PublicAPIApi* | [**get_break_policy_suggestions**](docs/PublicAPIApi.md#get_break_policy_suggestions) | **POST** /api/v1/time-tracking/break-policies/suggestions | Get Break Policy Suggestions +*PublicAPIApi* | [**get_catalog_holiday**](docs/PublicAPIApi.md#get_catalog_holiday) | **GET** /api/v1/holidays/catalog/{uuid} | Get Catalog Holiday *PublicAPIApi* | [**get_changed_employee_ids**](docs/PublicAPIApi.md#get_changed_employee_ids) | **GET** /api/v1/employees/changed | Get Changed Employee IDs *PublicAPIApi* | [**get_changed_employee_table_data**](docs/PublicAPIApi.md#get_changed_employee_table_data) | **GET** /api/v1/employees/changed/tables/{table} | Get Changed Employee Table Data +*PublicAPIApi* | [**get_clock_entry**](docs/PublicAPIApi.md#get_clock_entry) | **GET** /api/v1/time-tracking/clock-entries/{id} | Get Clock Entry *PublicAPIApi* | [**get_company_file**](docs/PublicAPIApi.md#get_company_file) | **GET** /api/v1/files/{fileId} | Get Company File +*PublicAPIApi* | [**get_company_holiday**](docs/PublicAPIApi.md#get_company_holiday) | **GET** /api/v1/holidays/{id} | Get Company Holiday *PublicAPIApi* | [**get_company_information**](docs/PublicAPIApi.md#get_company_information) | **GET** /api/v1/company_information | Get Company Information *PublicAPIApi* | [**get_company_locations**](docs/PublicAPIApi.md#get_company_locations) | **GET** /api/v1/applicant_tracking/locations | Get Company Locations *PublicAPIApi* | [**get_company_profile_integrations**](docs/PublicAPIApi.md#get_company_profile_integrations) | **GET** /api/v1/company-profile-integrations | Get Company Profile Integrations *PublicAPIApi* | [**get_company_report**](docs/PublicAPIApi.md#get_company_report) | **GET** /api/v1/reports/{id} | Get Company Report +*PublicAPIApi* | [**get_compensation_benchmark_details**](docs/PublicAPIApi.md#get_compensation_benchmark_details) | **GET** /api/v1/compensation/benchmarks/details | Get Compensation Benchmark Details +*PublicAPIApi* | [**get_compensation_level_group_status_counts**](docs/PublicAPIApi.md#get_compensation_level_group_status_counts) | **GET** /api/v1/pay-grades-and-bands/status-counts | Get Compensation Level Group Status Counts *PublicAPIApi* | [**get_countries_options**](docs/PublicAPIApi.md#get_countries_options) | **GET** /api/v1/meta/countries/options | Get Countries -*PublicAPIApi* | [**get_data_from_dataset**](docs/PublicAPIApi.md#get_data_from_dataset) | **POST** /api/v1/datasets/{datasetName} | Get Data from Dataset -*PublicAPIApi* | [**get_datasets**](docs/PublicAPIApi.md#get_datasets) | **GET** /api/v1/datasets | Get Datasets -*PublicAPIApi* | [**get_datasets_v12**](docs/PublicAPIApi.md#get_datasets_v12) | **GET** /api/v1_2/datasets | Get Datasets v1.2 +*PublicAPIApi* | [**get_country_by_id**](docs/PublicAPIApi.md#get_country_by_id) | **GET** /api/v1/meta/countries/{id} | Get Country by ID +*PublicAPIApi* | [**get_currency_conversions**](docs/PublicAPIApi.md#get_currency_conversions) | **GET** /api/v1/meta/currency-conversions | Get Currency Conversion Rates +*PublicAPIApi* | [**get_custom_field**](docs/PublicAPIApi.md#get_custom_field) | **GET** /api/v1/hris/custom-fields/{customFieldId} | Get Custom Field +*PublicAPIApi* | [**get_data_from_dataset_v1**](docs/PublicAPIApi.md#get_data_from_dataset_v1) | **POST** /api/v1/datasets/{datasetName} | Get Data from Dataset (v1) +*PublicAPIApi* | [**get_data_from_dataset_v2**](docs/PublicAPIApi.md#get_data_from_dataset_v2) | **POST** /api/v2/datasets/{datasetName}/data | Get Data from Dataset (v2) *PublicAPIApi* | [**get_employee**](docs/PublicAPIApi.md#get_employee) | **GET** /api/v1/employees/{id} | Get Employee *PublicAPIApi* | [**get_employee_dependent**](docs/PublicAPIApi.md#get_employee_dependent) | **GET** /api/v1/employeedependents/{id} | Get Employee Dependent *PublicAPIApi* | [**get_employee_file**](docs/PublicAPIApi.md#get_employee_file) | **GET** /api/v1/employees/{id}/files/{fileId} | Get Employee File *PublicAPIApi* | [**get_employee_photo**](docs/PublicAPIApi.md#get_employee_photo) | **GET** /api/v1/employees/{employeeId}/photo/{size} | Get Employee Photo *PublicAPIApi* | [**get_employee_table_data**](docs/PublicAPIApi.md#get_employee_table_data) | **GET** /api/v1/employees/{id}/tables/{table} | Get Employee Table Data -*PublicAPIApi* | [**get_employees_directory**](docs/PublicAPIApi.md#get_employees_directory) | **GET** /api/v1/employees/directory | Get Employee Directory -*PublicAPIApi* | [**get_field_options**](docs/PublicAPIApi.md#get_field_options) | **POST** /api/v1/datasets/{datasetName}/field-options | Get Field Options -*PublicAPIApi* | [**get_field_options_v12**](docs/PublicAPIApi.md#get_field_options_v12) | **POST** /api/v1_2/datasets/{datasetName}/field-options | Get Field Options v1.2 -*PublicAPIApi* | [**get_fields_from_dataset**](docs/PublicAPIApi.md#get_fields_from_dataset) | **GET** /api/v1/datasets/{datasetName}/fields | Get Fields from Dataset -*PublicAPIApi* | [**get_fields_from_dataset_v12**](docs/PublicAPIApi.md#get_fields_from_dataset_v12) | **GET** /api/v1_2/datasets/{datasetName}/fields | Get Fields from Dataset v1.2 +*PublicAPIApi* | [**get_employee_verification_integration**](docs/PublicAPIApi.md#get_employee_verification_integration) | **GET** /api/v1/employee-verifications/integration | Get employee verification integration status +*PublicAPIApi* | [**get_employees_directory**](docs/PublicAPIApi.md#get_employees_directory) | **GET** /api/v1/employees/directory | Get Employees Directory +*PublicAPIApi* | [**get_field_options_v1**](docs/PublicAPIApi.md#get_field_options_v1) | **POST** /api/v1/datasets/{datasetName}/field-options | Get Field Options (v1) +*PublicAPIApi* | [**get_field_options_v12**](docs/PublicAPIApi.md#get_field_options_v12) | **POST** /api/v1_2/datasets/{datasetName}/field-options | Get Field Options (v1.2) +*PublicAPIApi* | [**get_fields_from_dataset_v1**](docs/PublicAPIApi.md#get_fields_from_dataset_v1) | **GET** /api/v1/datasets/{datasetName}/fields | Get Fields from Dataset (v1) +*PublicAPIApi* | [**get_fields_from_dataset_v12**](docs/PublicAPIApi.md#get_fields_from_dataset_v12) | **GET** /api/v1_2/datasets/{datasetName}/fields | Get Fields from Dataset (v1.2) *PublicAPIApi* | [**get_goal_aggregate**](docs/PublicAPIApi.md#get_goal_aggregate) | **GET** /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate | Get Goal Aggregate -*PublicAPIApi* | [**get_goal_comments**](docs/PublicAPIApi.md#get_goal_comments) | **GET** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | Get Goal Comments -*PublicAPIApi* | [**get_goals**](docs/PublicAPIApi.md#get_goals) | **GET** /api/v1/performance/employees/{employeeId}/goals | Get Goals -*PublicAPIApi* | [**get_goals_aggregate_v1**](docs/PublicAPIApi.md#get_goals_aggregate_v1) | **GET** /api/v1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate -*PublicAPIApi* | [**get_goals_aggregate_v1_1**](docs/PublicAPIApi.md#get_goals_aggregate_v1_1) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate v1.1 -*PublicAPIApi* | [**get_goals_aggregate_v1_2**](docs/PublicAPIApi.md#get_goals_aggregate_v1_2) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate v1.2 -*PublicAPIApi* | [**get_goals_alignment_options**](docs/PublicAPIApi.md#get_goals_alignment_options) | **GET** /api/v1/performance/employees/{employeeId}/goals/alignmentOptions | Get Alignable Goal Options -*PublicAPIApi* | [**get_goals_filters_v1**](docs/PublicAPIApi.md#get_goals_filters_v1) | **GET** /api/v1/performance/employees/{employeeId}/goals/filters | Get Goal Filters -*PublicAPIApi* | [**get_goals_filters_v1_1**](docs/PublicAPIApi.md#get_goals_filters_v1_1) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/filters | Get Goal Filters v1.1 -*PublicAPIApi* | [**get_goals_filters_v1_2**](docs/PublicAPIApi.md#get_goals_filters_v1_2) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/filters | Get Goal Status Counts v1.2 -*PublicAPIApi* | [**get_goals_share_options**](docs/PublicAPIApi.md#get_goals_share_options) | **GET** /api/v1/performance/employees/{employeeId}/goals/shareOptions | Get Available Goal Sharing Options +*PublicAPIApi* | [**get_goal_creation_permission**](docs/PublicAPIApi.md#get_goal_creation_permission) | **GET** /api/v1/performance/employees/{employeeId}/goals/canCreateGoals | Get Goal Creation Permission +*PublicAPIApi* | [**get_goals_aggregate_v1**](docs/PublicAPIApi.md#get_goals_aggregate_v1) | **GET** /api/v1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate (v1) +*PublicAPIApi* | [**get_goals_aggregate_v11**](docs/PublicAPIApi.md#get_goals_aggregate_v11) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate (v1.1) +*PublicAPIApi* | [**get_goals_aggregate_v12**](docs/PublicAPIApi.md#get_goals_aggregate_v12) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/aggregate | Get Goals Aggregate (v1.2) +*PublicAPIApi* | [**get_goals_filters_v1**](docs/PublicAPIApi.md#get_goals_filters_v1) | **GET** /api/v1/performance/employees/{employeeId}/goals/filters | Get Goal Filters (v1) +*PublicAPIApi* | [**get_goals_filters_v11**](docs/PublicAPIApi.md#get_goals_filters_v11) | **GET** /api/v1_1/performance/employees/{employeeId}/goals/filters | Get Goal Filters (v1.1) +*PublicAPIApi* | [**get_goals_filters_v12**](docs/PublicAPIApi.md#get_goals_filters_v12) | **GET** /api/v1_2/performance/employees/{employeeId}/goals/filters | Get Goal Filters (v1.2) *PublicAPIApi* | [**get_hiring_leads**](docs/PublicAPIApi.md#get_hiring_leads) | **GET** /api/v1/applicant_tracking/hiring_leads | Get Hiring Leads +*PublicAPIApi* | [**get_hour_entry**](docs/PublicAPIApi.md#get_hour_entry) | **GET** /api/v1/time-tracking/hour-entries/{id} | Get Hour Entry *PublicAPIApi* | [**get_job_summaries**](docs/PublicAPIApi.md#get_job_summaries) | **GET** /api/v1/applicant_tracking/jobs | Get Job Summaries -*PublicAPIApi* | [**get_member_benefits**](docs/PublicAPIApi.md#get_member_benefits) | **GET** /api/v1/benefits/member-benefits | Get Member Benefits -*PublicAPIApi* | [**get_monitor_fields**](docs/PublicAPIApi.md#get_monitor_fields) | **GET** /api/v1/webhooks/monitor_fields | Get Monitor Fields -*PublicAPIApi* | [**get_post_fields**](docs/PublicAPIApi.md#get_post_fields) | **GET** /api/v1/webhooks/post-fields | Get Post Fields -*PublicAPIApi* | [**get_states_by_country_id**](docs/PublicAPIApi.md#get_states_by_country_id) | **GET** /api/v1/meta/provinces/{countryId} | Get States by Country ID +*PublicAPIApi* | [**get_job_title_level_assignments**](docs/PublicAPIApi.md#get_job_title_level_assignments) | **GET** /api/v1/pay-grades-and-bands/job-titles | Get Job Titles and Level Assignments +*PublicAPIApi* | [**get_legacy_report_field_map**](docs/PublicAPIApi.md#get_legacy_report_field_map) | **GET** /api/v1/custom-reports/legacy-field-map | Get Legacy Report Field Map +*PublicAPIApi* | [**get_legacy_report_id_map**](docs/PublicAPIApi.md#get_legacy_report_id_map) | **GET** /api/v1/custom-reports/legacy-id-map | Get Legacy Report ID Map +*PublicAPIApi* | [**get_levels_and_bands_review**](docs/PublicAPIApi.md#get_levels_and_bands_review) | **GET** /api/v1/pay-grades-and-bands/review | Get Levels and Bands Review +*PublicAPIApi* | [**get_levels_and_bands_status**](docs/PublicAPIApi.md#get_levels_and_bands_status) | **GET** /api/v1/pay-grades-and-bands/status | Get Levels and Bands Status +*PublicAPIApi* | [**get_location**](docs/PublicAPIApi.md#get_location) | **GET** /api/v1/hris/org/locations/{id} | Get a job location +*PublicAPIApi* | [**get_locations**](docs/PublicAPIApi.md#get_locations) | **GET** /api/v1/hris/org/locations | List job locations +*PublicAPIApi* | [**get_meta_company**](docs/PublicAPIApi.md#get_meta_company) | **GET** /api/v1/meta/company | Get company properties +*PublicAPIApi* | [**get_pay_bands**](docs/PublicAPIApi.md#get_pay_bands) | **GET** /api/v1/pay-grades-and-bands/pay-bands | Get Pay Bands +*PublicAPIApi* | [**get_post_fields**](docs/PublicAPIApi.md#get_post_fields) | **GET** /api/v1/webhooks/post-fields | Get Webhook Post Fields +*PublicAPIApi* | [**get_project**](docs/PublicAPIApi.md#get_project) | **GET** /api/v1/time-tracking/projects/{id} | Get Time Tracking Project +*PublicAPIApi* | [**get_published_levels_and_bands**](docs/PublicAPIApi.md#get_published_levels_and_bands) | **GET** /api/v1/pay-grades-and-bands | Get Published Levels and Bands +*PublicAPIApi* | [**get_report_by_id**](docs/PublicAPIApi.md#get_report_by_id) | **GET** /api/v1/custom-reports/{reportId} | Get Report by ID +*PublicAPIApi* | [**get_shift_differential**](docs/PublicAPIApi.md#get_shift_differential) | **GET** /api/v1/time-tracking/shift-differentials/{id} | Get Time Tracking Shift Differential +*PublicAPIApi* | [**get_states_by_country_id**](docs/PublicAPIApi.md#get_states_by_country_id) | **GET** /api/v1/meta/provinces/{countryId} | List states and provinces for a country by Country ID *PublicAPIApi* | [**get_statuses**](docs/PublicAPIApi.md#get_statuses) | **GET** /api/v1/applicant_tracking/statuses | Get Applicant Statuses +*PublicAPIApi* | [**get_task**](docs/PublicAPIApi.md#get_task) | **GET** /api/v1/time-tracking/tasks/{id} | Get Time Tracking Task *PublicAPIApi* | [**get_time_off_balance**](docs/PublicAPIApi.md#get_time_off_balance) | **GET** /api/v1/employees/{employeeId}/time_off/calculator | Get Time Off Balance +*PublicAPIApi* | [**get_time_tracking_configuration**](docs/PublicAPIApi.md#get_time_tracking_configuration) | **GET** /api/v1/time-tracking/configurations/{id} | Get Configuration +*PublicAPIApi* | [**get_time_tracking_employee_enrollment**](docs/PublicAPIApi.md#get_time_tracking_employee_enrollment) | **GET** /api/v1/time-tracking/employees/{employeeId} | Get Employee Enrollment +*PublicAPIApi* | [**get_time_tracking_kiosk**](docs/PublicAPIApi.md#get_time_tracking_kiosk) | **GET** /api/v1/time-tracking/kiosks/{id} | Get Time Tracking Kiosk *PublicAPIApi* | [**get_time_tracking_record**](docs/PublicAPIApi.md#get_time_tracking_record) | **GET** /api/v1/timetracking/record/{id} | Get Time Tracking Record +*PublicAPIApi* | [**get_time_tracking_time_clock**](docs/PublicAPIApi.md#get_time_tracking_time_clock) | **GET** /api/v1/time-tracking/time-clocks/{id} | Get Time Tracking Time Clock +*PublicAPIApi* | [**get_timesheet**](docs/PublicAPIApi.md#get_timesheet) | **GET** /api/v1/time-tracking/timesheets/{id} | Get Timesheet +*PublicAPIApi* | [**get_timesheet_summary**](docs/PublicAPIApi.md#get_timesheet_summary) | **GET** /api/v1/time-tracking/timesheets/{id}/summary | Get Timesheet Summary +*PublicAPIApi* | [**get_total_rewards_printable_statement**](docs/PublicAPIApi.md#get_total_rewards_printable_statement) | **GET** /api/v1/compensation/total_rewards/{employeeId}/printable | Get Printable Total Rewards Statement +*PublicAPIApi* | [**get_total_rewards_statement**](docs/PublicAPIApi.md#get_total_rewards_statement) | **GET** /api/v1/compensation/total_rewards/{employeeId}/statement | Get Total Rewards Statement *PublicAPIApi* | [**get_webhook**](docs/PublicAPIApi.md#get_webhook) | **GET** /api/v1/webhooks/{id} | Get Webhook -*PublicAPIApi* | [**get_webhook_logs**](docs/PublicAPIApi.md#get_webhook_logs) | **GET** /api/v1/webhooks/{id}/log | Get Webhook Logs +*PublicAPIApi* | [**import_compensation_benchmarks**](docs/PublicAPIApi.md#import_compensation_benchmarks) | **POST** /api/v1/compensation/benchmarks/import | Import Compensation Benchmarks From CSV +*PublicAPIApi* | [**list_alert_configurations**](docs/PublicAPIApi.md#list_alert_configurations) | **GET** /api/v1/alert-configurations | List Alert Configurations +*PublicAPIApi* | [**list_alert_templates**](docs/PublicAPIApi.md#list_alert_templates) | **GET** /api/v1/alerts | List Alert Templates +*PublicAPIApi* | [**list_archived_custom_fields**](docs/PublicAPIApi.md#list_archived_custom_fields) | **GET** /api/v1/hris/custom-fields/archived | List Archived Custom Fields +*PublicAPIApi* | [**list_bank_holidays**](docs/PublicAPIApi.md#list_bank_holidays) | **GET** /api/v1/meta/bank-holidays | List Bank Holidays *PublicAPIApi* | [**list_benefit_coverages**](docs/PublicAPIApi.md#list_benefit_coverages) | **GET** /api/v1/benefitcoverages | List Benefit Coverages *PublicAPIApi* | [**list_benefit_deduction_types**](docs/PublicAPIApi.md#list_benefit_deduction_types) | **GET** /api/v1/benefits/settings/deduction_types/all | List Benefit Deduction Types *PublicAPIApi* | [**list_break_assessments**](docs/PublicAPIApi.md#list_break_assessments) | **GET** /api/v1/time-tracking/break-assessments | List Break Assessments *PublicAPIApi* | [**list_break_policies**](docs/PublicAPIApi.md#list_break_policies) | **GET** /api/v1/time-tracking/break-policies | List Break Policies *PublicAPIApi* | [**list_break_policy_breaks**](docs/PublicAPIApi.md#list_break_policy_breaks) | **GET** /api/v1/time-tracking/break-policies/{id}/breaks | List Breaks for Break Policy *PublicAPIApi* | [**list_break_policy_employees**](docs/PublicAPIApi.md#list_break_policy_employees) | **GET** /api/v1/time-tracking/break-policies/{id}/employees | List Break Policy Employees +*PublicAPIApi* | [**list_calendar_events**](docs/PublicAPIApi.md#list_calendar_events) | **GET** /api/v1/calendar-events | List Calendar Events +*PublicAPIApi* | [**list_catalog_holidays**](docs/PublicAPIApi.md#list_catalog_holidays) | **GET** /api/v1/holidays/catalog | List Catalog Holidays +*PublicAPIApi* | [**list_clock_entries**](docs/PublicAPIApi.md#list_clock_entries) | **GET** /api/v1/time-tracking/clock-entries | List Clock Entries *PublicAPIApi* | [**list_company_benefits**](docs/PublicAPIApi.md#list_company_benefits) | **GET** /api/v1/benefit/company_benefit | List Company Benefits *PublicAPIApi* | [**list_company_files**](docs/PublicAPIApi.md#list_company_files) | **GET** /api/v1/files/view | Get Company Files and Categories +*PublicAPIApi* | [**list_company_holidays**](docs/PublicAPIApi.md#list_company_holidays) | **GET** /api/v1/holidays | List Company Holidays +*PublicAPIApi* | [**list_compensation_benchmark_sources**](docs/PublicAPIApi.md#list_compensation_benchmark_sources) | **GET** /api/v1/compensation/benchmarks/sources | List Compensation Benchmark Sources +*PublicAPIApi* | [**list_compensation_benchmarks**](docs/PublicAPIApi.md#list_compensation_benchmarks) | **GET** /api/v1/compensation/benchmarks | List Compensation Benchmarks +*PublicAPIApi* | [**list_compensation_level_groups_and_levels**](docs/PublicAPIApi.md#list_compensation_level_groups_and_levels) | **GET** /api/v1/pay-grades-and-bands/levels | List Compensation Level Groups and Levels +*PublicAPIApi* | [**list_custom_field_list_values**](docs/PublicAPIApi.md#list_custom_field_list_values) | **GET** /api/v1/hris/custom-fields/{customFieldId}/list-values | List Custom Field List Values +*PublicAPIApi* | [**list_custom_field_types**](docs/PublicAPIApi.md#list_custom_field_types) | **GET** /api/v1/hris/custom-fields/types | List Custom Field Types +*PublicAPIApi* | [**list_custom_fields**](docs/PublicAPIApi.md#list_custom_fields) | **GET** /api/v1/hris/custom-fields | List Custom Fields +*PublicAPIApi* | [**list_datasets_v1**](docs/PublicAPIApi.md#list_datasets_v1) | **GET** /api/v1/datasets | List Datasets (v1) +*PublicAPIApi* | [**list_datasets_v12**](docs/PublicAPIApi.md#list_datasets_v12) | **GET** /api/v1_2/datasets | List Datasets (v1.2) *PublicAPIApi* | [**list_employee_benefits**](docs/PublicAPIApi.md#list_employee_benefits) | **GET** /api/v1/benefit/employee_benefit | List Employee Benefits *PublicAPIApi* | [**list_employee_break_availabilities**](docs/PublicAPIApi.md#list_employee_break_availabilities) | **GET** /api/v1/time-tracking/employees/{id}/break-availabilities | List Employee Break Availabilities *PublicAPIApi* | [**list_employee_break_policies**](docs/PublicAPIApi.md#list_employee_break_policies) | **GET** /api/v1/time-tracking/employees/{id}/break-policies | List Employee Break Policies *PublicAPIApi* | [**list_employee_dependents**](docs/PublicAPIApi.md#list_employee_dependents) | **GET** /api/v1/employeedependents | List Employee Dependents *PublicAPIApi* | [**list_employee_files**](docs/PublicAPIApi.md#list_employee_files) | **GET** /api/v1/employees/{id}/files/view | List Employee Files -*PublicAPIApi* | [**list_employee_time_off_policies**](docs/PublicAPIApi.md#list_employee_time_off_policies) | **GET** /api/v1/employees/{employeeId}/time_off/policies | List Employee Time Off Policies -*PublicAPIApi* | [**list_employee_time_off_policies_v1_1**](docs/PublicAPIApi.md#list_employee_time_off_policies_v1_1) | **GET** /api/v1_1/employees/{employeeId}/time_off/policies | List Employee Time Off Policies v1.1 +*PublicAPIApi* | [**list_employee_time_off_policies_v1**](docs/PublicAPIApi.md#list_employee_time_off_policies_v1) | **GET** /api/v1/employees/{employeeId}/time_off/policies | List Employee Time Off Policies (v1) +*PublicAPIApi* | [**list_employee_time_off_policies_v11**](docs/PublicAPIApi.md#list_employee_time_off_policies_v11) | **GET** /api/v1_1/employees/{employeeId}/time_off/policies | List Employee Time Off Policies (v1.1) *PublicAPIApi* | [**list_employee_trainings**](docs/PublicAPIApi.md#list_employee_trainings) | **GET** /api/v1/training/record/employee/{employeeId} | List Employee Training Records +*PublicAPIApi* | [**list_employee_verifications_by_employee**](docs/PublicAPIApi.md#list_employee_verifications_by_employee) | **GET** /api/v1/employee-verifications/employees/{employeeId} | List employee verification records for an employee *PublicAPIApi* | [**list_employees**](docs/PublicAPIApi.md#list_employees) | **GET** /api/v1/employees | List Employees *PublicAPIApi* | [**list_fields**](docs/PublicAPIApi.md#list_fields) | **GET** /api/v1/meta/fields | List Fields +*PublicAPIApi* | [**list_goal_comments**](docs/PublicAPIApi.md#list_goal_comments) | **GET** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | List Goal Comments +*PublicAPIApi* | [**list_goal_share_options**](docs/PublicAPIApi.md#list_goal_share_options) | **GET** /api/v1/performance/employees/{employeeId}/goals/shareOptions | List Goal Sharing Options +*PublicAPIApi* | [**list_goals**](docs/PublicAPIApi.md#list_goals) | **GET** /api/v1/performance/employees/{employeeId}/goals | List Goals +*PublicAPIApi* | [**list_hour_entries**](docs/PublicAPIApi.md#list_hour_entries) | **GET** /api/v1/time-tracking/hour-entries | List Hour Entries +*PublicAPIApi* | [**list_industries**](docs/PublicAPIApi.md#list_industries) | **GET** /api/v1/meta/industries | List Industries +*PublicAPIApi* | [**list_job_titles_with_employees**](docs/PublicAPIApi.md#list_job_titles_with_employees) | **GET** /api/v1/pay-grades-and-bands/job-titles-with-employees | List Job Titles with Employees *PublicAPIApi* | [**list_list_fields**](docs/PublicAPIApi.md#list_list_fields) | **GET** /api/v1/meta/lists | List List Fields *PublicAPIApi* | [**list_member_benefit_events**](docs/PublicAPIApi.md#list_member_benefit_events) | **GET** /api/v1/benefit/member_benefit | List Member Benefit Events +*PublicAPIApi* | [**list_member_benefits**](docs/PublicAPIApi.md#list_member_benefits) | **GET** /api/v1/benefits/member-benefits | List Member Benefits +*PublicAPIApi* | [**list_monitor_fields**](docs/PublicAPIApi.md#list_monitor_fields) | **GET** /api/v1/webhooks/monitor_fields | List Monitor Fields +*PublicAPIApi* | [**list_project_tasks**](docs/PublicAPIApi.md#list_project_tasks) | **GET** /api/v1/time-tracking/projects/{projectId}/tasks | List Time Tracking Project Tasks +*PublicAPIApi* | [**list_projects**](docs/PublicAPIApi.md#list_projects) | **GET** /api/v1/time-tracking/projects | List Time Tracking Projects *PublicAPIApi* | [**list_reports**](docs/PublicAPIApi.md#list_reports) | **GET** /api/v1/custom-reports | List Reports +*PublicAPIApi* | [**list_shift_differentials**](docs/PublicAPIApi.md#list_shift_differentials) | **GET** /api/v1/time-tracking/shift-differentials | List Time Tracking Shift Differentials *PublicAPIApi* | [**list_tabular_fields**](docs/PublicAPIApi.md#list_tabular_fields) | **GET** /api/v1/meta/tables | List Tabular Fields *PublicAPIApi* | [**list_time_off_policies**](docs/PublicAPIApi.md#list_time_off_policies) | **GET** /api/v1/meta/time_off/policies | List Time Off Policies *PublicAPIApi* | [**list_time_off_requests**](docs/PublicAPIApi.md#list_time_off_requests) | **GET** /api/v1/time_off/requests | List Time Off Requests *PublicAPIApi* | [**list_time_off_types**](docs/PublicAPIApi.md#list_time_off_types) | **GET** /api/v1/meta/time_off/types | List Time Off Types +*PublicAPIApi* | [**list_time_tracking_configurations**](docs/PublicAPIApi.md#list_time_tracking_configurations) | **GET** /api/v1/time-tracking/configurations | List Configurations +*PublicAPIApi* | [**list_time_tracking_employees**](docs/PublicAPIApi.md#list_time_tracking_employees) | **GET** /api/v1/time-tracking/employees | List Enrolled Employees +*PublicAPIApi* | [**list_time_tracking_kiosks**](docs/PublicAPIApi.md#list_time_tracking_kiosks) | **GET** /api/v1/time-tracking/kiosks | List Time Tracking Kiosks +*PublicAPIApi* | [**list_time_tracking_time_clocks**](docs/PublicAPIApi.md#list_time_tracking_time_clocks) | **GET** /api/v1/time-tracking/time-clocks | List Time Tracking Time Clocks *PublicAPIApi* | [**list_timesheet_entries**](docs/PublicAPIApi.md#list_timesheet_entries) | **GET** /api/v1/time_tracking/timesheet_entries | List Timesheet Entries +*PublicAPIApi* | [**list_timesheets**](docs/PublicAPIApi.md#list_timesheets) | **GET** /api/v1/time-tracking/timesheets | List Timesheets *PublicAPIApi* | [**list_training_categories**](docs/PublicAPIApi.md#list_training_categories) | **GET** /api/v1/training/category | List Training Categories *PublicAPIApi* | [**list_training_types**](docs/PublicAPIApi.md#list_training_types) | **GET** /api/v1/training/type | List Training Types *PublicAPIApi* | [**list_users**](docs/PublicAPIApi.md#list_users) | **GET** /api/v1/meta/users | List Users +*PublicAPIApi* | [**list_webhook_logs**](docs/PublicAPIApi.md#list_webhook_logs) | **GET** /api/v1/webhooks/{id}/log | List Webhook Logs *PublicAPIApi* | [**list_webhooks**](docs/PublicAPIApi.md#list_webhooks) | **GET** /api/v1/webhooks | List Webhooks *PublicAPIApi* | [**list_whos_out**](docs/PublicAPIApi.md#list_whos_out) | **GET** /api/v1/time_off/whos_out | List Who’s Out +*PublicAPIApi* | [**list_whos_out_v1**](docs/PublicAPIApi.md#list_whos_out_v1) | **GET** /api/v1/whos-out | List Who's Out *PublicAPIApi* | [**login**](docs/PublicAPIApi.md#login) | **POST** /api/v1/login | Login -*PublicAPIApi* | [**post_close_goal**](docs/PublicAPIApi.md#post_close_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/close | Close Goal -*PublicAPIApi* | [**post_goal**](docs/PublicAPIApi.md#post_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals | Create Goal -*PublicAPIApi* | [**post_goal_comment**](docs/PublicAPIApi.md#post_goal_comment) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments | Create Goal Comment -*PublicAPIApi* | [**post_reopen_goal**](docs/PublicAPIApi.md#post_reopen_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen | Reopen Goal -*PublicAPIApi* | [**put_goal_comment**](docs/PublicAPIApi.md#put_goal_comment) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} | Update Goal Comment -*PublicAPIApi* | [**put_goal_milestone_progress**](docs/PublicAPIApi.md#put_goal_milestone_progress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress | Update Milestone Progress -*PublicAPIApi* | [**put_goal_progress**](docs/PublicAPIApi.md#put_goal_progress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress | Update Goal Progress -*PublicAPIApi* | [**put_goal_shared_with**](docs/PublicAPIApi.md#put_goal_shared_with) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith | Update Goal Sharing -*PublicAPIApi* | [**put_goal_v1**](docs/PublicAPIApi.md#put_goal_v1) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId} | Update Goal -*PublicAPIApi* | [**put_goal_v1_1**](docs/PublicAPIApi.md#put_goal_v1_1) | **PUT** /api/v1_1/performance/employees/{employeeId}/goals/{goalId} | Update Goal v1.1 +*PublicAPIApi* | [**patch_company_profile_company_information**](docs/PublicAPIApi.md#patch_company_profile_company_information) | **PATCH** /api/v1/company-profile-data/company-information | Update company information (phone, address, legal name) +*PublicAPIApi* | [**publish_draft_compensation_level_groups**](docs/PublicAPIApi.md#publish_draft_compensation_level_groups) | **POST** /api/v1/pay-grades-and-bands/publish | Publish Draft Compensation Level Groups +*PublicAPIApi* | [**put_company_industry_codes**](docs/PublicAPIApi.md#put_company_industry_codes) | **PUT** /api/v1/company-profile-data/industry-codes | Update Company Industry Codes +*PublicAPIApi* | [**put_company_profile_display_name**](docs/PublicAPIApi.md#put_company_profile_display_name) | **PUT** /api/v1/company-profile-data/display-name | Update company display name +*PublicAPIApi* | [**remove_total_rewards_custom_disclaimer**](docs/PublicAPIApi.md#remove_total_rewards_custom_disclaimer) | **DELETE** /api/v1/compensation/total_rewards/custom_disclaimer | Remove Total Rewards Custom Disclaimer +*PublicAPIApi* | [**remove_total_rewards_employees**](docs/PublicAPIApi.md#remove_total_rewards_employees) | **DELETE** /api/v1/compensation/total_rewards/employees | Remove Employees from Total Rewards +*PublicAPIApi* | [**reopen_goal**](docs/PublicAPIApi.md#reopen_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen | Reopen Goal +*PublicAPIApi* | [**replace_alert_configuration**](docs/PublicAPIApi.md#replace_alert_configuration) | **PUT** /api/v1/alert-configurations/{id} | Replace Alert Configuration *PublicAPIApi* | [**replace_breaks_for_break_policy**](docs/PublicAPIApi.md#replace_breaks_for_break_policy) | **PUT** /api/v1/time-tracking/break-policies/{id}/breaks | Replace Breaks for Break Policy +*PublicAPIApi* | [**replace_job_title_level_assignments**](docs/PublicAPIApi.md#replace_job_title_level_assignments) | **PUT** /api/v1/pay-grades-and-bands/job-titles | Replace Job Title Level Assignments *PublicAPIApi* | [**request_custom_report**](docs/PublicAPIApi.md#request_custom_report) | **POST** /api/v1/reports/custom | Request Custom Report +*PublicAPIApi* | [**scheduling_create_schedule**](docs/PublicAPIApi.md#scheduling_create_schedule) | **POST** /api/v1/scheduling/schedules | Create Schedule +*PublicAPIApi* | [**scheduling_create_shift**](docs/PublicAPIApi.md#scheduling_create_shift) | **POST** /api/v1/scheduling/shifts | Create Shift +*PublicAPIApi* | [**scheduling_delete_schedule**](docs/PublicAPIApi.md#scheduling_delete_schedule) | **DELETE** /api/v1/scheduling/schedules/{id} | Delete Schedule +*PublicAPIApi* | [**scheduling_delete_shift**](docs/PublicAPIApi.md#scheduling_delete_shift) | **DELETE** /api/v1/scheduling/shifts/{id} | Delete Shift +*PublicAPIApi* | [**scheduling_get_schedule**](docs/PublicAPIApi.md#scheduling_get_schedule) | **GET** /api/v1/scheduling/schedules/{id} | Get Schedule +*PublicAPIApi* | [**scheduling_get_schedule_pdf**](docs/PublicAPIApi.md#scheduling_get_schedule_pdf) | **GET** /api/v1/scheduling/schedules/{id}/pdf | Get Schedule PDF +*PublicAPIApi* | [**scheduling_get_shift**](docs/PublicAPIApi.md#scheduling_get_shift) | **GET** /api/v1/scheduling/shifts/{id} | Get Shift +*PublicAPIApi* | [**scheduling_list_schedules**](docs/PublicAPIApi.md#scheduling_list_schedules) | **GET** /api/v1/scheduling/schedules | List Schedules +*PublicAPIApi* | [**scheduling_list_shift_assessments**](docs/PublicAPIApi.md#scheduling_list_shift_assessments) | **GET** /api/v1/scheduling/shift-assessments | List Shift Assessments +*PublicAPIApi* | [**scheduling_list_shifts**](docs/PublicAPIApi.md#scheduling_list_shifts) | **GET** /api/v1/scheduling/shifts | List Shifts +*PublicAPIApi* | [**scheduling_list_timezones**](docs/PublicAPIApi.md#scheduling_list_timezones) | **GET** /api/v1/scheduling/timezones | List Timezones +*PublicAPIApi* | [**scheduling_publish_shifts**](docs/PublicAPIApi.md#scheduling_publish_shifts) | **POST** /api/v1/scheduling/shifts/publish | Publish Shifts +*PublicAPIApi* | [**scheduling_update_schedule**](docs/PublicAPIApi.md#scheduling_update_schedule) | **PATCH** /api/v1/scheduling/schedules/{id} | Update Schedule +*PublicAPIApi* | [**scheduling_update_shift**](docs/PublicAPIApi.md#scheduling_update_shift) | **PATCH** /api/v1/scheduling/shifts/{id} | Update Shift +*PublicAPIApi* | [**send_employee_verification_lifecycle_email_by_user**](docs/PublicAPIApi.md#send_employee_verification_lifecycle_email_by_user) | **POST** /api/v1/employee-verifications/users/{userId}/send-email | Send employee verification lifecycle email by user and email type *PublicAPIApi* | [**set_break_policy_employees**](docs/PublicAPIApi.md#set_break_policy_employees) | **PUT** /api/v1/time-tracking/break-policies/{id}/assign | Set Employees for Break Policy +*PublicAPIApi* | [**set_total_rewards_custom_disclaimer**](docs/PublicAPIApi.md#set_total_rewards_custom_disclaimer) | **PUT** /api/v1/compensation/total_rewards/custom_disclaimer | Set Total Rewards Custom Disclaimer +*PublicAPIApi* | [**set_total_rewards_onboarding_step**](docs/PublicAPIApi.md#set_total_rewards_onboarding_step) | **PUT** /api/v1/compensation/total_rewards/onboarding/{stepName} | Set Total Rewards Onboarding Step Status *PublicAPIApi* | [**sync_break_policy**](docs/PublicAPIApi.md#sync_break_policy) | **PUT** /api/v1/time-tracking/break-policies/{id}/sync | Sync Break Policy +*PublicAPIApi* | [**unarchive_public_custom_fields**](docs/PublicAPIApi.md#unarchive_public_custom_fields) | **POST** /api/v1/hris/custom-fields/unarchive | Unarchive Custom Fields *PublicAPIApi* | [**unassign_employees_from_break_policy**](docs/PublicAPIApi.md#unassign_employees_from_break_policy) | **POST** /api/v1/time-tracking/break-policies/{id}/unassign | Unassign Employees from Break Policy *PublicAPIApi* | [**update_applicant_status**](docs/PublicAPIApi.md#update_applicant_status) | **POST** /api/v1/applicant_tracking/applications/{applicationId}/status | Update Applicant Status *PublicAPIApi* | [**update_break**](docs/PublicAPIApi.md#update_break) | **PATCH** /api/v1/time-tracking/breaks/{id} | Update Break *PublicAPIApi* | [**update_break_policy**](docs/PublicAPIApi.md#update_break_policy) | **PATCH** /api/v1/time-tracking/break-policies/{id} | Update Break Policy +*PublicAPIApi* | [**update_clock_entry**](docs/PublicAPIApi.md#update_clock_entry) | **PATCH** /api/v1/time-tracking/clock-entries/{id} | Update Clock Entry *PublicAPIApi* | [**update_company_file**](docs/PublicAPIApi.md#update_company_file) | **POST** /api/v1/files/{fileId} | Update Company File +*PublicAPIApi* | [**update_company_holiday**](docs/PublicAPIApi.md#update_company_holiday) | **PATCH** /api/v1/holidays/{id} | Update Company Holiday +*PublicAPIApi* | [**update_compensation_benchmark**](docs/PublicAPIApi.md#update_compensation_benchmark) | **PUT** /api/v1/compensation/benchmarks | Update Compensation Benchmark +*PublicAPIApi* | [**update_compensation_benchmark_sources**](docs/PublicAPIApi.md#update_compensation_benchmark_sources) | **PUT** /api/v1/compensation/benchmarks/sources | Update Compensation Benchmark Sources +*PublicAPIApi* | [**update_compensation_level_groups_and_levels**](docs/PublicAPIApi.md#update_compensation_level_groups_and_levels) | **PUT** /api/v1/pay-grades-and-bands/levels | Update Compensation Level Groups and Levels *PublicAPIApi* | [**update_employee**](docs/PublicAPIApi.md#update_employee) | **POST** /api/v1/employees/{id} | Update Employee *PublicAPIApi* | [**update_employee_dependent**](docs/PublicAPIApi.md#update_employee_dependent) | **PUT** /api/v1/employeedependents/{id} | Update Employee Dependent *PublicAPIApi* | [**update_employee_file**](docs/PublicAPIApi.md#update_employee_file) | **POST** /api/v1/employees/{id}/files/{fileId} | Update Employee File *PublicAPIApi* | [**update_employee_training_record**](docs/PublicAPIApi.md#update_employee_training_record) | **PUT** /api/v1/training/record/{employeeTrainingRecordId} | Update Employee Training Record +*PublicAPIApi* | [**update_employee_verification**](docs/PublicAPIApi.md#update_employee_verification) | **PUT** /api/v1/employee-verifications/employees/{employeeId}/{verificationId} | Update an employee verification record +*PublicAPIApi* | [**update_employee_verification_integration**](docs/PublicAPIApi.md#update_employee_verification_integration) | **PUT** /api/v1/employee-verifications/integration | Enable or disable the employee verification integration +*PublicAPIApi* | [**update_goal_comment**](docs/PublicAPIApi.md#update_goal_comment) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} | Update Goal Comment +*PublicAPIApi* | [**update_goal_milestone_progress**](docs/PublicAPIApi.md#update_goal_milestone_progress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress | Update Milestone Progress +*PublicAPIApi* | [**update_goal_progress**](docs/PublicAPIApi.md#update_goal_progress) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress | Update Goal Progress +*PublicAPIApi* | [**update_goal_sharing**](docs/PublicAPIApi.md#update_goal_sharing) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith | Update Goal Sharing +*PublicAPIApi* | [**update_goal_v1**](docs/PublicAPIApi.md#update_goal_v1) | **PUT** /api/v1/performance/employees/{employeeId}/goals/{goalId} | Update Goal (v1) +*PublicAPIApi* | [**update_goal_v11**](docs/PublicAPIApi.md#update_goal_v11) | **PUT** /api/v1_1/performance/employees/{employeeId}/goals/{goalId} | Update Goal (v1.1) +*PublicAPIApi* | [**update_hour_entry**](docs/PublicAPIApi.md#update_hour_entry) | **PATCH** /api/v1/time-tracking/hour-entries/{id} | Update Hour Entry *PublicAPIApi* | [**update_list_field_values**](docs/PublicAPIApi.md#update_list_field_values) | **PUT** /api/v1/meta/lists/{listFieldId} | Update List Field Values -*PublicAPIApi* | [**update_table_row**](docs/PublicAPIApi.md#update_table_row) | **POST** /api/v1/employees/{id}/tables/{table}/{rowId} | Update Table Row -*PublicAPIApi* | [**update_table_row_v11**](docs/PublicAPIApi.md#update_table_row_v11) | **POST** /api/v1_1/employees/{id}/tables/{table}/{rowId} | Update Table Row v1.1 +*PublicAPIApi* | [**update_location**](docs/PublicAPIApi.md#update_location) | **PUT** /api/v1/hris/org/locations/{id} | Update a job location +*PublicAPIApi* | [**update_new_hire_packet_gtky_answer_visibility**](docs/PublicAPIApi.md#update_new_hire_packet_gtky_answer_visibility) | **PUT** /api/v1/new-hire-packets/{id}/question-visibility | Update GTKY answer visibility for a new hire packet +*PublicAPIApi* | [**update_pay_bands**](docs/PublicAPIApi.md#update_pay_bands) | **PUT** /api/v1/pay-grades-and-bands/pay-bands | Update Pay Bands +*PublicAPIApi* | [**update_project**](docs/PublicAPIApi.md#update_project) | **PATCH** /api/v1/time-tracking/projects/{id} | Update Time Tracking Project +*PublicAPIApi* | [**update_shift_differential**](docs/PublicAPIApi.md#update_shift_differential) | **PATCH** /api/v1/time-tracking/shift-differentials/{id} | Update Time Tracking Shift Differential +*PublicAPIApi* | [**update_table_row_v1**](docs/PublicAPIApi.md#update_table_row_v1) | **POST** /api/v1/employees/{id}/tables/{table}/{rowId} | Update Table Row (v1) +*PublicAPIApi* | [**update_table_row_v11**](docs/PublicAPIApi.md#update_table_row_v11) | **POST** /api/v1_1/employees/{id}/tables/{table}/{rowId} | Update Table Row (v1.1) +*PublicAPIApi* | [**update_task**](docs/PublicAPIApi.md#update_task) | **PATCH** /api/v1/time-tracking/tasks/{id} | Update Time Tracking Task *PublicAPIApi* | [**update_time_off_request_status**](docs/PublicAPIApi.md#update_time_off_request_status) | **PUT** /api/v1/time_off/requests/{requestId}/status | Update Time Off Request Status +*PublicAPIApi* | [**update_time_tracking_configuration**](docs/PublicAPIApi.md#update_time_tracking_configuration) | **PATCH** /api/v1/time-tracking/configurations/{id} | Update Configuration +*PublicAPIApi* | [**update_time_tracking_employee_enrollment**](docs/PublicAPIApi.md#update_time_tracking_employee_enrollment) | **PATCH** /api/v1/time-tracking/employees/{employeeId} | Update Employee Enrollment +*PublicAPIApi* | [**update_time_tracking_kiosk**](docs/PublicAPIApi.md#update_time_tracking_kiosk) | **PATCH** /api/v1/time-tracking/kiosks/{id} | Update Time Tracking Kiosk *PublicAPIApi* | [**update_time_tracking_record**](docs/PublicAPIApi.md#update_time_tracking_record) | **PUT** /api/v1/timetracking/adjust | Update Hour Record +*PublicAPIApi* | [**update_time_tracking_time_clock**](docs/PublicAPIApi.md#update_time_tracking_time_clock) | **PATCH** /api/v1/time-tracking/time-clocks/{id} | Update Time Tracking Time Clock *PublicAPIApi* | [**update_training_category**](docs/PublicAPIApi.md#update_training_category) | **PUT** /api/v1/training/category/{trainingCategoryId} | Update Training Category *PublicAPIApi* | [**update_training_type**](docs/PublicAPIApi.md#update_training_type) | **PUT** /api/v1/training/type/{trainingTypeId} | Update Training Type *PublicAPIApi* | [**update_webhook**](docs/PublicAPIApi.md#update_webhook) | **PUT** /api/v1/webhooks/{id} | Update Webhook *PublicAPIApi* | [**upload_company_file**](docs/PublicAPIApi.md#upload_company_file) | **POST** /api/v1/files | Upload Company File *PublicAPIApi* | [**upload_employee_file**](docs/PublicAPIApi.md#upload_employee_file) | **POST** /api/v1/employees/{id}/files | Upload Employee File *PublicAPIApi* | [**upload_employee_photo**](docs/PublicAPIApi.md#upload_employee_photo) | **POST** /api/v1/employees/{employeeId}/photo | Upload Employee Photo +*PublicAPIApi* | [**upload_levels_and_bands_csv**](docs/PublicAPIApi.md#upload_levels_and_bands_csv) | **POST** /api/v1/pay-grades-and-bands/import | Upload Levels and Bands CSV *ReportsApi* | [**get_company_report**](docs/ReportsApi.md#get_company_report) | **GET** /api/v1/reports/{id} | Get Company Report *ReportsApi* | [**request_custom_report**](docs/ReportsApi.md#request_custom_report) | **POST** /api/v1/reports/custom | Request Custom Report -*TabularDataApi* | [**create_table_row**](docs/TabularDataApi.md#create_table_row) | **POST** /api/v1/employees/{id}/tables/{table} | Create Table Row -*TabularDataApi* | [**create_table_row_v11**](docs/TabularDataApi.md#create_table_row_v11) | **POST** /api/v1_1/employees/{id}/tables/{table} | Create Table Row v1.1 -*TabularDataApi* | [**delete_employee_table_row**](docs/TabularDataApi.md#delete_employee_table_row) | **DELETE** /api/v1/employees/{id}/tables/{table}/{rowId} | Delete Employee Table Row -*TabularDataApi* | [**get_changed_employee_table_data**](docs/TabularDataApi.md#get_changed_employee_table_data) | **GET** /api/v1/employees/changed/tables/{table} | Get Changed Employee Table Data -*TabularDataApi* | [**get_employee_table_data**](docs/TabularDataApi.md#get_employee_table_data) | **GET** /api/v1/employees/{id}/tables/{table} | Get Employee Table Data -*TabularDataApi* | [**update_table_row**](docs/TabularDataApi.md#update_table_row) | **POST** /api/v1/employees/{id}/tables/{table}/{rowId} | Update Table Row -*TabularDataApi* | [**update_table_row_v11**](docs/TabularDataApi.md#update_table_row_v11) | **POST** /api/v1_1/employees/{id}/tables/{table}/{rowId} | Update Table Row v1.1 +*SchedulingApi* | [**scheduling_create_schedule**](docs/SchedulingApi.md#scheduling_create_schedule) | **POST** /api/v1/scheduling/schedules | Create Schedule +*SchedulingApi* | [**scheduling_create_shift**](docs/SchedulingApi.md#scheduling_create_shift) | **POST** /api/v1/scheduling/shifts | Create Shift +*SchedulingApi* | [**scheduling_delete_schedule**](docs/SchedulingApi.md#scheduling_delete_schedule) | **DELETE** /api/v1/scheduling/schedules/{id} | Delete Schedule +*SchedulingApi* | [**scheduling_delete_shift**](docs/SchedulingApi.md#scheduling_delete_shift) | **DELETE** /api/v1/scheduling/shifts/{id} | Delete Shift +*SchedulingApi* | [**scheduling_get_schedule**](docs/SchedulingApi.md#scheduling_get_schedule) | **GET** /api/v1/scheduling/schedules/{id} | Get Schedule +*SchedulingApi* | [**scheduling_get_schedule_pdf**](docs/SchedulingApi.md#scheduling_get_schedule_pdf) | **GET** /api/v1/scheduling/schedules/{id}/pdf | Get Schedule PDF +*SchedulingApi* | [**scheduling_get_shift**](docs/SchedulingApi.md#scheduling_get_shift) | **GET** /api/v1/scheduling/shifts/{id} | Get Shift +*SchedulingApi* | [**scheduling_list_schedules**](docs/SchedulingApi.md#scheduling_list_schedules) | **GET** /api/v1/scheduling/schedules | List Schedules +*SchedulingApi* | [**scheduling_list_shift_assessments**](docs/SchedulingApi.md#scheduling_list_shift_assessments) | **GET** /api/v1/scheduling/shift-assessments | List Shift Assessments +*SchedulingApi* | [**scheduling_list_shifts**](docs/SchedulingApi.md#scheduling_list_shifts) | **GET** /api/v1/scheduling/shifts | List Shifts +*SchedulingApi* | [**scheduling_list_timezones**](docs/SchedulingApi.md#scheduling_list_timezones) | **GET** /api/v1/scheduling/timezones | List Timezones +*SchedulingApi* | [**scheduling_publish_shifts**](docs/SchedulingApi.md#scheduling_publish_shifts) | **POST** /api/v1/scheduling/shifts/publish | Publish Shifts +*SchedulingApi* | [**scheduling_update_schedule**](docs/SchedulingApi.md#scheduling_update_schedule) | **PATCH** /api/v1/scheduling/schedules/{id} | Update Schedule +*SchedulingApi* | [**scheduling_update_shift**](docs/SchedulingApi.md#scheduling_update_shift) | **PATCH** /api/v1/scheduling/shifts/{id} | Update Shift *TimeOffApi* | [**adjust_time_off_balance**](docs/TimeOffApi.md#adjust_time_off_balance) | **PUT** /api/v1/employees/{employeeId}/time_off/balance_adjustment | Adjust Time Off Balance -*TimeOffApi* | [**assign_time_off_policies**](docs/TimeOffApi.md#assign_time_off_policies) | **PUT** /api/v1/employees/{employeeId}/time_off/policies | Assign Time Off Policies -*TimeOffApi* | [**assign_time_off_policies_v1_1**](docs/TimeOffApi.md#assign_time_off_policies_v1_1) | **PUT** /api/v1_1/employees/{employeeId}/time_off/policies | Assign Time Off Policies v1.1 +*TimeOffApi* | [**assign_time_off_policies_v1**](docs/TimeOffApi.md#assign_time_off_policies_v1) | **PUT** /api/v1/employees/{employeeId}/time_off/policies | Assign Time Off Policies (v1) +*TimeOffApi* | [**assign_time_off_policies_v11**](docs/TimeOffApi.md#assign_time_off_policies_v11) | **PUT** /api/v1_1/employees/{employeeId}/time_off/policies | Assign Time Off Policies (v1.1) *TimeOffApi* | [**create_time_off_history**](docs/TimeOffApi.md#create_time_off_history) | **PUT** /api/v1/employees/{employeeId}/time_off/history | Create Time Off History Item *TimeOffApi* | [**create_time_off_request**](docs/TimeOffApi.md#create_time_off_request) | **PUT** /api/v1/employees/{employeeId}/time_off/request | Create Time Off Request *TimeOffApi* | [**get_time_off_balance**](docs/TimeOffApi.md#get_time_off_balance) | **GET** /api/v1/employees/{employeeId}/time_off/calculator | Get Time Off Balance -*TimeOffApi* | [**list_employee_time_off_policies**](docs/TimeOffApi.md#list_employee_time_off_policies) | **GET** /api/v1/employees/{employeeId}/time_off/policies | List Employee Time Off Policies -*TimeOffApi* | [**list_employee_time_off_policies_v1_1**](docs/TimeOffApi.md#list_employee_time_off_policies_v1_1) | **GET** /api/v1_1/employees/{employeeId}/time_off/policies | List Employee Time Off Policies v1.1 +*TimeOffApi* | [**list_employee_time_off_policies_v1**](docs/TimeOffApi.md#list_employee_time_off_policies_v1) | **GET** /api/v1/employees/{employeeId}/time_off/policies | List Employee Time Off Policies (v1) +*TimeOffApi* | [**list_employee_time_off_policies_v11**](docs/TimeOffApi.md#list_employee_time_off_policies_v11) | **GET** /api/v1_1/employees/{employeeId}/time_off/policies | List Employee Time Off Policies (v1.1) *TimeOffApi* | [**list_time_off_policies**](docs/TimeOffApi.md#list_time_off_policies) | **GET** /api/v1/meta/time_off/policies | List Time Off Policies *TimeOffApi* | [**list_time_off_requests**](docs/TimeOffApi.md#list_time_off_requests) | **GET** /api/v1/time_off/requests | List Time Off Requests *TimeOffApi* | [**list_time_off_types**](docs/TimeOffApi.md#list_time_off_types) | **GET** /api/v1/meta/time_off/types | List Time Off Types *TimeOffApi* | [**list_whos_out**](docs/TimeOffApi.md#list_whos_out) | **GET** /api/v1/time_off/whos_out | List Who’s Out +*TimeOffApi* | [**list_whos_out_v1**](docs/TimeOffApi.md#list_whos_out_v1) | **GET** /api/v1/whos-out | List Who's Out *TimeOffApi* | [**update_time_off_request_status**](docs/TimeOffApi.md#update_time_off_request_status) | **PUT** /api/v1/time_off/requests/{requestId}/status | Update Time Off Request Status -*TimeTrackingApi* | [**assign_employees_to_break_policy**](docs/TimeTrackingApi.md#assign_employees_to_break_policy) | **POST** /api/v1/time-tracking/break-policies/{id}/assign | Assign Employees to Break Policy -*TimeTrackingApi* | [**create_break**](docs/TimeTrackingApi.md#create_break) | **POST** /api/v1/time-tracking/break-policies/{id}/breaks | Create Break -*TimeTrackingApi* | [**create_break_policy**](docs/TimeTrackingApi.md#create_break_policy) | **POST** /api/v1/time-tracking/break-policies | Create Break Policy +*TimeTrackingApi* | [**approve_timesheet**](docs/TimeTrackingApi.md#approve_timesheet) | **POST** /api/v1/time-tracking/timesheet-approvals | Approve Timesheet +*TimeTrackingApi* | [**bulk_upsert_time_tracking_employee_enrollments**](docs/TimeTrackingApi.md#bulk_upsert_time_tracking_employee_enrollments) | **POST** /api/v1/time-tracking/employees/bulk-upsert | Bulk Upsert Employee Enrollments +*TimeTrackingApi* | [**clock_in**](docs/TimeTrackingApi.md#clock_in) | **POST** /api/v1/time-tracking/clock-ins | Clock In +*TimeTrackingApi* | [**clock_out**](docs/TimeTrackingApi.md#clock_out) | **POST** /api/v1/time-tracking/clock-outs | Clock Out +*TimeTrackingApi* | [**create_clock_entry**](docs/TimeTrackingApi.md#create_clock_entry) | **POST** /api/v1/time-tracking/clock-entries | Create Clock Entry +*TimeTrackingApi* | [**create_hour_entry**](docs/TimeTrackingApi.md#create_hour_entry) | **POST** /api/v1/time-tracking/hour-entries | Create Hour Entry *TimeTrackingApi* | [**create_or_update_timesheet_clock_entries**](docs/TimeTrackingApi.md#create_or_update_timesheet_clock_entries) | **POST** /api/v1/time_tracking/clock_entries/store | Create or Update Timesheet Clock Entries *TimeTrackingApi* | [**create_or_update_timesheet_hour_entries**](docs/TimeTrackingApi.md#create_or_update_timesheet_hour_entries) | **POST** /api/v1/time_tracking/hour_entries/store | Create or Update Timesheet Hour Entries -*TimeTrackingApi* | [**create_time_tracking_project**](docs/TimeTrackingApi.md#create_time_tracking_project) | **POST** /api/v1/time_tracking/projects | Create Time Tracking Project +*TimeTrackingApi* | [**create_project_task**](docs/TimeTrackingApi.md#create_project_task) | **POST** /api/v1/time-tracking/projects/{projectId}/tasks | Create Time Tracking Project Task +*TimeTrackingApi* | [**create_shift_differential**](docs/TimeTrackingApi.md#create_shift_differential) | **POST** /api/v1/time-tracking/shift-differentials | Create Time Tracking Shift Differential +*TimeTrackingApi* | [**create_time_tracking_configuration**](docs/TimeTrackingApi.md#create_time_tracking_configuration) | **POST** /api/v1/time-tracking/configurations | Create Configuration +*TimeTrackingApi* | [**create_time_tracking_project**](docs/TimeTrackingApi.md#create_time_tracking_project) | **POST** /api/v1/time-tracking/projects | Create Time Tracking Project +*TimeTrackingApi* | [**create_time_tracking_project_legacy**](docs/TimeTrackingApi.md#create_time_tracking_project_legacy) | **POST** /api/v1/time_tracking/projects | Create Time Tracking Project (Legacy) *TimeTrackingApi* | [**create_timesheet_clock_in_entry**](docs/TimeTrackingApi.md#create_timesheet_clock_in_entry) | **POST** /api/v1/time_tracking/employees/{employeeId}/clock_in | Create Timesheet Clock-In Entry *TimeTrackingApi* | [**create_timesheet_clock_out_entry**](docs/TimeTrackingApi.md#create_timesheet_clock_out_entry) | **POST** /api/v1/time_tracking/employees/{employeeId}/clock_out | Create Timesheet Clock-Out Entry -*TimeTrackingApi* | [**delete_break**](docs/TimeTrackingApi.md#delete_break) | **DELETE** /api/v1/time-tracking/breaks/{id} | Delete Break -*TimeTrackingApi* | [**delete_break_policy**](docs/TimeTrackingApi.md#delete_break_policy) | **DELETE** /api/v1/time-tracking/break-policies/{id} | Delete Break Policy +*TimeTrackingApi* | [**delete_clock_entry**](docs/TimeTrackingApi.md#delete_clock_entry) | **DELETE** /api/v1/time-tracking/clock-entries/{id} | Delete Clock Entry +*TimeTrackingApi* | [**delete_hour_entry**](docs/TimeTrackingApi.md#delete_hour_entry) | **DELETE** /api/v1/time-tracking/hour-entries/{id} | Delete Hour Entry +*TimeTrackingApi* | [**delete_project**](docs/TimeTrackingApi.md#delete_project) | **DELETE** /api/v1/time-tracking/projects/{id} | Delete Time Tracking Project +*TimeTrackingApi* | [**delete_shift_differential**](docs/TimeTrackingApi.md#delete_shift_differential) | **DELETE** /api/v1/time-tracking/shift-differentials/{id} | Delete Time Tracking Shift Differential +*TimeTrackingApi* | [**delete_task**](docs/TimeTrackingApi.md#delete_task) | **DELETE** /api/v1/time-tracking/tasks/{id} | Delete Time Tracking Task +*TimeTrackingApi* | [**delete_time_tracking_configuration**](docs/TimeTrackingApi.md#delete_time_tracking_configuration) | **DELETE** /api/v1/time-tracking/configurations/{id} | Delete Configuration +*TimeTrackingApi* | [**delete_time_tracking_kiosk**](docs/TimeTrackingApi.md#delete_time_tracking_kiosk) | **DELETE** /api/v1/time-tracking/kiosks/{id} | Delete Time Tracking Kiosk *TimeTrackingApi* | [**delete_timesheet_clock_entries_via_post**](docs/TimeTrackingApi.md#delete_timesheet_clock_entries_via_post) | **POST** /api/v1/time_tracking/clock_entries/delete | Delete Timesheet Clock Entries *TimeTrackingApi* | [**delete_timesheet_hour_entries_via_post**](docs/TimeTrackingApi.md#delete_timesheet_hour_entries_via_post) | **POST** /api/v1/time_tracking/hour_entries/delete | Delete Timesheet Hour Entries -*TimeTrackingApi* | [**get_break**](docs/TimeTrackingApi.md#get_break) | **GET** /api/v1/time-tracking/breaks/{id} | Get Break -*TimeTrackingApi* | [**get_break_policy**](docs/TimeTrackingApi.md#get_break_policy) | **GET** /api/v1/time-tracking/break-policies/{id} | Get Break Policy -*TimeTrackingApi* | [**list_break_assessments**](docs/TimeTrackingApi.md#list_break_assessments) | **GET** /api/v1/time-tracking/break-assessments | List Break Assessments -*TimeTrackingApi* | [**list_break_policies**](docs/TimeTrackingApi.md#list_break_policies) | **GET** /api/v1/time-tracking/break-policies | List Break Policies -*TimeTrackingApi* | [**list_break_policy_breaks**](docs/TimeTrackingApi.md#list_break_policy_breaks) | **GET** /api/v1/time-tracking/break-policies/{id}/breaks | List Breaks for Break Policy -*TimeTrackingApi* | [**list_break_policy_employees**](docs/TimeTrackingApi.md#list_break_policy_employees) | **GET** /api/v1/time-tracking/break-policies/{id}/employees | List Break Policy Employees -*TimeTrackingApi* | [**list_employee_break_availabilities**](docs/TimeTrackingApi.md#list_employee_break_availabilities) | **GET** /api/v1/time-tracking/employees/{id}/break-availabilities | List Employee Break Availabilities -*TimeTrackingApi* | [**list_employee_break_policies**](docs/TimeTrackingApi.md#list_employee_break_policies) | **GET** /api/v1/time-tracking/employees/{id}/break-policies | List Employee Break Policies +*TimeTrackingApi* | [**get_clock_entry**](docs/TimeTrackingApi.md#get_clock_entry) | **GET** /api/v1/time-tracking/clock-entries/{id} | Get Clock Entry +*TimeTrackingApi* | [**get_hour_entry**](docs/TimeTrackingApi.md#get_hour_entry) | **GET** /api/v1/time-tracking/hour-entries/{id} | Get Hour Entry +*TimeTrackingApi* | [**get_project**](docs/TimeTrackingApi.md#get_project) | **GET** /api/v1/time-tracking/projects/{id} | Get Time Tracking Project +*TimeTrackingApi* | [**get_shift_differential**](docs/TimeTrackingApi.md#get_shift_differential) | **GET** /api/v1/time-tracking/shift-differentials/{id} | Get Time Tracking Shift Differential +*TimeTrackingApi* | [**get_task**](docs/TimeTrackingApi.md#get_task) | **GET** /api/v1/time-tracking/tasks/{id} | Get Time Tracking Task +*TimeTrackingApi* | [**get_time_tracking_configuration**](docs/TimeTrackingApi.md#get_time_tracking_configuration) | **GET** /api/v1/time-tracking/configurations/{id} | Get Configuration +*TimeTrackingApi* | [**get_time_tracking_employee_enrollment**](docs/TimeTrackingApi.md#get_time_tracking_employee_enrollment) | **GET** /api/v1/time-tracking/employees/{employeeId} | Get Employee Enrollment +*TimeTrackingApi* | [**get_time_tracking_kiosk**](docs/TimeTrackingApi.md#get_time_tracking_kiosk) | **GET** /api/v1/time-tracking/kiosks/{id} | Get Time Tracking Kiosk +*TimeTrackingApi* | [**get_time_tracking_time_clock**](docs/TimeTrackingApi.md#get_time_tracking_time_clock) | **GET** /api/v1/time-tracking/time-clocks/{id} | Get Time Tracking Time Clock +*TimeTrackingApi* | [**get_timesheet**](docs/TimeTrackingApi.md#get_timesheet) | **GET** /api/v1/time-tracking/timesheets/{id} | Get Timesheet +*TimeTrackingApi* | [**get_timesheet_summary**](docs/TimeTrackingApi.md#get_timesheet_summary) | **GET** /api/v1/time-tracking/timesheets/{id}/summary | Get Timesheet Summary +*TimeTrackingApi* | [**list_clock_entries**](docs/TimeTrackingApi.md#list_clock_entries) | **GET** /api/v1/time-tracking/clock-entries | List Clock Entries +*TimeTrackingApi* | [**list_hour_entries**](docs/TimeTrackingApi.md#list_hour_entries) | **GET** /api/v1/time-tracking/hour-entries | List Hour Entries +*TimeTrackingApi* | [**list_project_tasks**](docs/TimeTrackingApi.md#list_project_tasks) | **GET** /api/v1/time-tracking/projects/{projectId}/tasks | List Time Tracking Project Tasks +*TimeTrackingApi* | [**list_projects**](docs/TimeTrackingApi.md#list_projects) | **GET** /api/v1/time-tracking/projects | List Time Tracking Projects +*TimeTrackingApi* | [**list_shift_differentials**](docs/TimeTrackingApi.md#list_shift_differentials) | **GET** /api/v1/time-tracking/shift-differentials | List Time Tracking Shift Differentials +*TimeTrackingApi* | [**list_time_tracking_configurations**](docs/TimeTrackingApi.md#list_time_tracking_configurations) | **GET** /api/v1/time-tracking/configurations | List Configurations +*TimeTrackingApi* | [**list_time_tracking_employees**](docs/TimeTrackingApi.md#list_time_tracking_employees) | **GET** /api/v1/time-tracking/employees | List Enrolled Employees +*TimeTrackingApi* | [**list_time_tracking_kiosks**](docs/TimeTrackingApi.md#list_time_tracking_kiosks) | **GET** /api/v1/time-tracking/kiosks | List Time Tracking Kiosks +*TimeTrackingApi* | [**list_time_tracking_time_clocks**](docs/TimeTrackingApi.md#list_time_tracking_time_clocks) | **GET** /api/v1/time-tracking/time-clocks | List Time Tracking Time Clocks *TimeTrackingApi* | [**list_timesheet_entries**](docs/TimeTrackingApi.md#list_timesheet_entries) | **GET** /api/v1/time_tracking/timesheet_entries | List Timesheet Entries -*TimeTrackingApi* | [**replace_breaks_for_break_policy**](docs/TimeTrackingApi.md#replace_breaks_for_break_policy) | **PUT** /api/v1/time-tracking/break-policies/{id}/breaks | Replace Breaks for Break Policy -*TimeTrackingApi* | [**set_break_policy_employees**](docs/TimeTrackingApi.md#set_break_policy_employees) | **PUT** /api/v1/time-tracking/break-policies/{id}/assign | Set Employees for Break Policy -*TimeTrackingApi* | [**sync_break_policy**](docs/TimeTrackingApi.md#sync_break_policy) | **PUT** /api/v1/time-tracking/break-policies/{id}/sync | Sync Break Policy -*TimeTrackingApi* | [**unassign_employees_from_break_policy**](docs/TimeTrackingApi.md#unassign_employees_from_break_policy) | **POST** /api/v1/time-tracking/break-policies/{id}/unassign | Unassign Employees from Break Policy -*TimeTrackingApi* | [**update_break**](docs/TimeTrackingApi.md#update_break) | **PATCH** /api/v1/time-tracking/breaks/{id} | Update Break -*TimeTrackingApi* | [**update_break_policy**](docs/TimeTrackingApi.md#update_break_policy) | **PATCH** /api/v1/time-tracking/break-policies/{id} | Update Break Policy +*TimeTrackingApi* | [**list_timesheets**](docs/TimeTrackingApi.md#list_timesheets) | **GET** /api/v1/time-tracking/timesheets | List Timesheets +*TimeTrackingApi* | [**update_clock_entry**](docs/TimeTrackingApi.md#update_clock_entry) | **PATCH** /api/v1/time-tracking/clock-entries/{id} | Update Clock Entry +*TimeTrackingApi* | [**update_hour_entry**](docs/TimeTrackingApi.md#update_hour_entry) | **PATCH** /api/v1/time-tracking/hour-entries/{id} | Update Hour Entry +*TimeTrackingApi* | [**update_project**](docs/TimeTrackingApi.md#update_project) | **PATCH** /api/v1/time-tracking/projects/{id} | Update Time Tracking Project +*TimeTrackingApi* | [**update_shift_differential**](docs/TimeTrackingApi.md#update_shift_differential) | **PATCH** /api/v1/time-tracking/shift-differentials/{id} | Update Time Tracking Shift Differential +*TimeTrackingApi* | [**update_task**](docs/TimeTrackingApi.md#update_task) | **PATCH** /api/v1/time-tracking/tasks/{id} | Update Time Tracking Task +*TimeTrackingApi* | [**update_time_tracking_configuration**](docs/TimeTrackingApi.md#update_time_tracking_configuration) | **PATCH** /api/v1/time-tracking/configurations/{id} | Update Configuration +*TimeTrackingApi* | [**update_time_tracking_employee_enrollment**](docs/TimeTrackingApi.md#update_time_tracking_employee_enrollment) | **PATCH** /api/v1/time-tracking/employees/{employeeId} | Update Employee Enrollment +*TimeTrackingApi* | [**update_time_tracking_kiosk**](docs/TimeTrackingApi.md#update_time_tracking_kiosk) | **PATCH** /api/v1/time-tracking/kiosks/{id} | Update Time Tracking Kiosk +*TimeTrackingApi* | [**update_time_tracking_time_clock**](docs/TimeTrackingApi.md#update_time_tracking_time_clock) | **PATCH** /api/v1/time-tracking/time-clocks/{id} | Update Time Tracking Time Clock +*TotalRewardsApi* | [**add_total_rewards_employees**](docs/TotalRewardsApi.md#add_total_rewards_employees) | **POST** /api/v1/compensation/total_rewards/employees | Add Employees to Total Rewards +*TotalRewardsApi* | [**check_total_rewards_profile**](docs/TotalRewardsApi.md#check_total_rewards_profile) | **GET** /api/v1/compensation/total_rewards/{employeeId} | Check Total Rewards Profile Availability +*TotalRewardsApi* | [**get_total_rewards_printable_statement**](docs/TotalRewardsApi.md#get_total_rewards_printable_statement) | **GET** /api/v1/compensation/total_rewards/{employeeId}/printable | Get Printable Total Rewards Statement +*TotalRewardsApi* | [**get_total_rewards_statement**](docs/TotalRewardsApi.md#get_total_rewards_statement) | **GET** /api/v1/compensation/total_rewards/{employeeId}/statement | Get Total Rewards Statement +*TotalRewardsApi* | [**remove_total_rewards_custom_disclaimer**](docs/TotalRewardsApi.md#remove_total_rewards_custom_disclaimer) | **DELETE** /api/v1/compensation/total_rewards/custom_disclaimer | Remove Total Rewards Custom Disclaimer +*TotalRewardsApi* | [**remove_total_rewards_employees**](docs/TotalRewardsApi.md#remove_total_rewards_employees) | **DELETE** /api/v1/compensation/total_rewards/employees | Remove Employees from Total Rewards +*TotalRewardsApi* | [**set_total_rewards_custom_disclaimer**](docs/TotalRewardsApi.md#set_total_rewards_custom_disclaimer) | **PUT** /api/v1/compensation/total_rewards/custom_disclaimer | Set Total Rewards Custom Disclaimer +*TotalRewardsApi* | [**set_total_rewards_onboarding_step**](docs/TotalRewardsApi.md#set_total_rewards_onboarding_step) | **PUT** /api/v1/compensation/total_rewards/onboarding/{stepName} | Set Total Rewards Onboarding Step Status *TrainingApi* | [**create_employee_training_record**](docs/TrainingApi.md#create_employee_training_record) | **POST** /api/v1/training/record/employee/{employeeId} | Create Employee Training Record *TrainingApi* | [**create_training_category**](docs/TrainingApi.md#create_training_category) | **POST** /api/v1/training/category | Create Training Category *TrainingApi* | [**create_training_type**](docs/TrainingApi.md#create_training_type) | **POST** /api/v1/training/type | Create Training Type @@ -412,56 +794,83 @@ Class | Method | HTTP request | Description *TrainingApi* | [**update_training_type**](docs/TrainingApi.md#update_training_type) | **PUT** /api/v1/training/type/{trainingTypeId} | Update Training Type *WebhooksApi* | [**create_webhook**](docs/WebhooksApi.md#create_webhook) | **POST** /api/v1/webhooks | Create Webhook *WebhooksApi* | [**delete_webhook**](docs/WebhooksApi.md#delete_webhook) | **DELETE** /api/v1/webhooks/{id} | Delete Webhook -*WebhooksApi* | [**get_monitor_fields**](docs/WebhooksApi.md#get_monitor_fields) | **GET** /api/v1/webhooks/monitor_fields | Get Monitor Fields -*WebhooksApi* | [**get_post_fields**](docs/WebhooksApi.md#get_post_fields) | **GET** /api/v1/webhooks/post-fields | Get Post Fields +*WebhooksApi* | [**get_post_fields**](docs/WebhooksApi.md#get_post_fields) | **GET** /api/v1/webhooks/post-fields | Get Webhook Post Fields *WebhooksApi* | [**get_webhook**](docs/WebhooksApi.md#get_webhook) | **GET** /api/v1/webhooks/{id} | Get Webhook -*WebhooksApi* | [**get_webhook_logs**](docs/WebhooksApi.md#get_webhook_logs) | **GET** /api/v1/webhooks/{id}/log | Get Webhook Logs +*WebhooksApi* | [**list_monitor_fields**](docs/WebhooksApi.md#list_monitor_fields) | **GET** /api/v1/webhooks/monitor_fields | List Monitor Fields +*WebhooksApi* | [**list_webhook_logs**](docs/WebhooksApi.md#list_webhook_logs) | **GET** /api/v1/webhooks/{id}/log | List Webhook Logs *WebhooksApi* | [**list_webhooks**](docs/WebhooksApi.md#list_webhooks) | **GET** /api/v1/webhooks | List Webhooks *WebhooksApi* | [**update_webhook**](docs/WebhooksApi.md#update_webhook) | **PUT** /api/v1/webhooks/{id} | Update Webhook ## Models +- [A05b6d5f564f805d688ff2c1e37c3990Request](docs/A05b6d5f564f805d688ff2c1e37c3990Request.md) +- [AddCustomFieldListValueRequest](docs/AddCustomFieldListValueRequest.md) +- [AddCustomFieldListValueResponse](docs/AddCustomFieldListValueResponse.md) +- [AddCustomFieldListValueResponseOneOfInner](docs/AddCustomFieldListValueResponseOneOfInner.md) +- [AddCycleAdminsResponse](docs/AddCycleAdminsResponse.md) +- [AddCycleAdminsResponseAddedInner](docs/AddCycleAdminsResponseAddedInner.md) +- [AddCycleAdminsResponseSkippedInner](docs/AddCycleAdminsResponseSkippedInner.md) +- [AddTotalRewardsEmployeesRequest](docs/AddTotalRewardsEmployeesRequest.md) - [AdjustTimeOffBalance](docs/AdjustTimeOffBalance.md) - [AdjustTimeTrackingRequestSchema](docs/AdjustTimeTrackingRequestSchema.md) +- [AlertConfigurationV1](docs/AlertConfigurationV1.md) +- [AlertConfigurationWriteV1](docs/AlertConfigurationWriteV1.md) +- [AlertTemplateListResponseV1](docs/AlertTemplateListResponseV1.md) +- [AlertTemplateListResponseV1AlertsInner](docs/AlertTemplateListResponseV1AlertsInner.md) - [AlignmentOptionsResponse](docs/AlignmentOptionsResponse.md) - [AlignmentOptionsResponseAlignsWithOptionsInner](docs/AlignmentOptionsResponseAlignsWithOptionsInner.md) - [ApplicantStatus](docs/ApplicantStatus.md) - [ApplicationDetails](docs/ApplicationDetails.md) - [ApplicationDetailsApplicant](docs/ApplicationDetailsApplicant.md) -- [ApplicationDetailsApplicantAddress](docs/ApplicationDetailsApplicantAddress.md) -- [ApplicationDetailsApplicantEducation](docs/ApplicationDetailsApplicantEducation.md) -- [ApplicationDetailsApplicantEducationLevel](docs/ApplicationDetailsApplicantEducationLevel.md) - [ApplicationDetailsAttachmentsInner](docs/ApplicationDetailsAttachmentsInner.md) - [ApplicationDetailsJob](docs/ApplicationDetailsJob.md) -- [ApplicationDetailsJobHiringLead](docs/ApplicationDetailsJobHiringLead.md) -- [ApplicationDetailsJobHiringLeadJobTitle](docs/ApplicationDetailsJobHiringLeadJobTitle.md) - [ApplicationDetailsJobTitle](docs/ApplicationDetailsJobTitle.md) - [ApplicationDetailsQuestionsAndAnswersInner](docs/ApplicationDetailsQuestionsAndAnswersInner.md) - [ApplicationDetailsQuestionsAndAnswersInnerAnswer](docs/ApplicationDetailsQuestionsAndAnswersInnerAnswer.md) - [ApplicationDetailsQuestionsAndAnswersInnerQuestion](docs/ApplicationDetailsQuestionsAndAnswersInnerQuestion.md) - [ApplicationDetailsStatus](docs/ApplicationDetailsStatus.md) -- [ApplicationDetailsStatusChangedByUser](docs/ApplicationDetailsStatusChangedByUser.md) -- [ApplicationDetailsStatusChangedByUserJobTitle](docs/ApplicationDetailsStatusChangedByUserJobTitle.md) - [ApplicationsList](docs/ApplicationsList.md) - [ApplicationsListApplicationsInner](docs/ApplicationsListApplicationsInner.md) - [ApplicationsListApplicationsInnerApplicant](docs/ApplicationsListApplicationsInnerApplicant.md) - [ApplicationsListApplicationsInnerJob](docs/ApplicationsListApplicationsInnerJob.md) - [ApplicationsListApplicationsInnerJobTitle](docs/ApplicationsListApplicationsInnerJobTitle.md) - [ApplicationsListApplicationsInnerStatus](docs/ApplicationsListApplicationsInnerStatus.md) +- [ApproveTimesheetRequest](docs/ApproveTimesheetRequest.md) +- [ArchiveCustomFieldResponse](docs/ArchiveCustomFieldResponse.md) +- [ArchivedCustomFieldsListResponse](docs/ArchivedCustomFieldsListResponse.md) - [AssignEmployeesToBreakPolicyRequest](docs/AssignEmployeesToBreakPolicyRequest.md) -- [AssignTimeOffPoliciesRequestInner](docs/AssignTimeOffPoliciesRequestInner.md) +- [AssignTimeOffPoliciesV1RequestInner](docs/AssignTimeOffPoliciesV1RequestInner.md) - [AssignedTimeOffPolicy](docs/AssignedTimeOffPolicy.md) - [AssignedTimeOffPolicyV11](docs/AssignedTimeOffPolicyV11.md) - [AvailableAction](docs/AvailableAction.md) -- [BadRequest](docs/BadRequest.md) -- [BadRequestError](docs/BadRequestError.md) +- [BadRequestV1](docs/BadRequestV1.md) +- [BadRequestV1Error](docs/BadRequestV1Error.md) +- [BankHoliday](docs/BankHoliday.md) - [BenefitCoveragesResponse](docs/BenefitCoveragesResponse.md) - [BenefitCoveragesResponseBenefitCoveragesInner](docs/BenefitCoveragesResponseBenefitCoveragesInner.md) - [BenefitDeductionSubType](docs/BenefitDeductionSubType.md) - [BenefitDeductionType](docs/BenefitDeductionType.md) - [BenefitDeductionTypeId](docs/BenefitDeductionTypeId.md) +- [BudgetBreakdownImportResponse](docs/BudgetBreakdownImportResponse.md) +- [BudgetGuidelinesView](docs/BudgetGuidelinesView.md) +- [BudgetGuidelinesWarnings](docs/BudgetGuidelinesWarnings.md) +- [C79f9c5950f983e59d2626faa30c00a1Request](docs/C79f9c5950f983e59d2626faa30c00a1Request.md) +- [C7c32ed5278ac67e2e518bf7484a75dcRequest](docs/C7c32ed5278ac67e2e518bf7484a75dcRequest.md) +- [CalendarAnniversaryCalendarEventV1](docs/CalendarAnniversaryCalendarEventV1.md) +- [CalendarBirthdayCalendarEventV1](docs/CalendarBirthdayCalendarEventV1.md) +- [CalendarCalendarEventPersonV1](docs/CalendarCalendarEventPersonV1.md) +- [CalendarCalendarEventsListResponseV1](docs/CalendarCalendarEventsListResponseV1.md) +- [CalendarCalendarEventsListResponseV1DataInner](docs/CalendarCalendarEventsListResponseV1DataInner.md) +- [CalendarCalendarEventsListResponseV1Links](docs/CalendarCalendarEventsListResponseV1Links.md) +- [CalendarCalendarEventsListResponseV1LinksNext](docs/CalendarCalendarEventsListResponseV1LinksNext.md) +- [CalendarCalendarEventsListResponseV1LinksPrev](docs/CalendarCalendarEventsListResponseV1LinksPrev.md) +- [CalendarCalendarEventsListResponseV1Meta](docs/CalendarCalendarEventsListResponseV1Meta.md) +- [CalendarHolidayCalendarEventV1](docs/CalendarHolidayCalendarEventV1.md) +- [CalendarTimeOffCalendarEventV1](docs/CalendarTimeOffCalendarEventV1.md) - [CanCreateGoalsResponse](docs/CanCreateGoalsResponse.md) +- [Cf87b8e09a001b6fb81dfce6c20ab9e3Request](docs/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md) +- [ChangeCustomFieldListValueRequest](docs/ChangeCustomFieldListValueRequest.md) - [ChangedEmployeeIdsResponse](docs/ChangedEmployeeIdsResponse.md) - [ChangedEmployeeIdsResponseEmployeesValue](docs/ChangedEmployeeIdsResponseEmployeesValue.md) - [ChangedEmployeeTableDataResponse](docs/ChangedEmployeeTableDataResponse.md) @@ -469,10 +878,13 @@ Class | Method | HTTP request | Description - [ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue](docs/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue.md) - [ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner](docs/ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner.md) - [ClockEntriesSchema](docs/ClockEntriesSchema.md) +- [ClockEntryClockEntryLocationInputV1](docs/ClockEntryClockEntryLocationInputV1.md) +- [ClockEntryCreateClockEntryV1](docs/ClockEntryCreateClockEntryV1.md) - [ClockEntryIdsSchema](docs/ClockEntryIdsSchema.md) - [ClockEntrySchema](docs/ClockEntrySchema.md) - [ClockInRequestSchema](docs/ClockInRequestSchema.md) - [ClockOutRequestSchema](docs/ClockOutRequestSchema.md) +- [CloseGoalRequest](docs/CloseGoalRequest.md) - [CompanyBenefitSummary](docs/CompanyBenefitSummary.md) - [CompanyBenefitsListResponse](docs/CompanyBenefitsListResponse.md) - [CompanyDeletedWebhookPayload](docs/CompanyDeletedWebhookPayload.md) @@ -480,39 +892,105 @@ Class | Method | HTTP request | Description - [CompanyFilesResponse](docs/CompanyFilesResponse.md) - [CompanyFilesResponseCategoriesInner](docs/CompanyFilesResponseCategoriesInner.md) - [CompanyFilesResponseCategoriesInnerFilesInner](docs/CompanyFilesResponseCategoriesInnerFilesInner.md) +- [CompanyIndustryDataObject](docs/CompanyIndustryDataObject.md) - [CompanyInformation](docs/CompanyInformation.md) - [CompanyInformationAddress](docs/CompanyInformationAddress.md) - [CompanyIntegrationsUpdatedWebhookPayload](docs/CompanyIntegrationsUpdatedWebhookPayload.md) - [CompanyIntegrationsUpdatedWebhookPayloadData](docs/CompanyIntegrationsUpdatedWebhookPayloadData.md) +- [CompanyProfileData](docs/CompanyProfileData.md) +- [CompanyProfileDataAddress](docs/CompanyProfileDataAddress.md) - [CompanyProfileIntegrations](docs/CompanyProfileIntegrations.md) - [CompanyUpdatedWebhookPayload](docs/CompanyUpdatedWebhookPayload.md) +- [CompensationBenchmarkDetailEmployee](docs/CompensationBenchmarkDetailEmployee.md) +- [CompensationBenchmarkDetailEmployeeJobTitle](docs/CompensationBenchmarkDetailEmployeeJobTitle.md) +- [CompensationBenchmarkDetailEmployeeSalary](docs/CompensationBenchmarkDetailEmployeeSalary.md) +- [CompensationBenchmarkDetails](docs/CompensationBenchmarkDetails.md) +- [CompensationBenchmarkDetailsBenchmarkValuesInner](docs/CompensationBenchmarkDetailsBenchmarkValuesInner.md) +- [CompensationBenchmarkJobLocationEmployee](docs/CompensationBenchmarkJobLocationEmployee.md) +- [CompensationBenchmarkJobLocationEmployeeSalary](docs/CompensationBenchmarkJobLocationEmployeeSalary.md) +- [CompensationBenchmarkJobLocationPair](docs/CompensationBenchmarkJobLocationPair.md) +- [CompensationBenchmarkJobLocationPairJobDetails](docs/CompensationBenchmarkJobLocationPairJobDetails.md) +- [CompensationBenchmarkOverview](docs/CompensationBenchmarkOverview.md) +- [CompensationBenchmarkOverviewValues](docs/CompensationBenchmarkOverviewValues.md) +- [CompensationBenchmarkSource](docs/CompensationBenchmarkSource.md) +- [CompensationBenchmarkingColumnMap](docs/CompensationBenchmarkingColumnMap.md) +- [CompensationBenchmarksList](docs/CompensationBenchmarksList.md) +- [CompensationEquitySettingsResponse](docs/CompensationEquitySettingsResponse.md) +- [CompensationEquitySettingsResponseCompanyValuation](docs/CompensationEquitySettingsResponseCompanyValuation.md) +- [CompensationEquitySettingsResponseDisclaimers](docs/CompensationEquitySettingsResponseDisclaimers.md) +- [CompensationEquitySettingsResponseOutstandingShares](docs/CompensationEquitySettingsResponseOutstandingShares.md) +- [CompensationEquitySettingsResponsePricePerShare](docs/CompensationEquitySettingsResponsePricePerShare.md) +- [CompensationEquitySettingsResponseSliderMin](docs/CompensationEquitySettingsResponseSliderMin.md) +- [CompensationEquitySettingsResponseVestingConditions](docs/CompensationEquitySettingsResponseVestingConditions.md) +- [CompensationEquitySettingsUpdateRequest](docs/CompensationEquitySettingsUpdateRequest.md) +- [CompensationPlanningCycleAdminsResponse](docs/CompensationPlanningCycleAdminsResponse.md) +- [CompensationPlanningCycleAdminsResponseAdminsInner](docs/CompensationPlanningCycleAdminsResponseAdminsInner.md) +- [CompensationPlanningCycleCompleteResponse](docs/CompensationPlanningCycleCompleteResponse.md) +- [CompensationPlanningCycleCompleteResponseErrorsInner](docs/CompensationPlanningCycleCompleteResponseErrorsInner.md) +- [CompensationToolsDataObject](docs/CompensationToolsDataObject.md) +- [CompensationToolsResponse](docs/CompensationToolsResponse.md) +- [CompensationUpsellData](docs/CompensationUpsellData.md) +- [CompletedQuestionsAndResponseDataObject](docs/CompletedQuestionsAndResponseDataObject.md) +- [ConversionRateDataObject](docs/ConversionRateDataObject.md) +- [CountriesOptionsResponse](docs/CountriesOptionsResponse.md) - [Country](docs/Country.md) - [CountrySchema](docs/CountrySchema.md) - [CreateApplicationCommentRequest](docs/CreateApplicationCommentRequest.md) - [CreateCandidateResponse](docs/CreateCandidateResponse.md) - [CreateCommentResponse](docs/CreateCommentResponse.md) +- [CreateCompensationBenchmarkRequest](docs/CreateCompensationBenchmarkRequest.md) +- [CreateCompensationBenchmarkSourceRequest](docs/CreateCompensationBenchmarkSourceRequest.md) - [CreateEmployeeTrainingRecordRequest](docs/CreateEmployeeTrainingRecordRequest.md) - [CreateEmployeeTrainingRecordRequestCost](docs/CreateEmployeeTrainingRecordRequestCost.md) +- [CreateGoalCommentRequest](docs/CreateGoalCommentRequest.md) +- [CreateGoalRequest](docs/CreateGoalRequest.md) +- [CreateGoalRequestMilestonesInner](docs/CreateGoalRequestMilestonesInner.md) - [CreateJobOpeningResponse](docs/CreateJobOpeningResponse.md) +- [CreateLocationRequest](docs/CreateLocationRequest.md) +- [CreateLocationRequestAddress](docs/CreateLocationRequestAddress.md) - [CreateTrainingCategoryRequest](docs/CreateTrainingCategoryRequest.md) - [CreateTrainingTypeRequest](docs/CreateTrainingTypeRequest.md) - [CreateTrainingTypeRequestCategory](docs/CreateTrainingTypeRequestCategory.md) -- [CreateTrainingTypeRequestDueFromHireDate](docs/CreateTrainingTypeRequestDueFromHireDate.md) -- [CreateTrainingTypeRequestDueFromHireDateOneOf](docs/CreateTrainingTypeRequestDueFromHireDateOneOf.md) - [CreateWebhookBadRequestResponse](docs/CreateWebhookBadRequestResponse.md) +- [CreatedCompensationBenchmark](docs/CreatedCompensationBenchmark.md) +- [CreatedCompensationBenchmarkSavedBenchmark](docs/CreatedCompensationBenchmarkSavedBenchmark.md) +- [CreatedCompensationBenchmarkSource](docs/CreatedCompensationBenchmarkSource.md) +- [CreatedTimeOffRequest](docs/CreatedTimeOffRequest.md) +- [CreatedTimeOffRequestAmount](docs/CreatedTimeOffRequestAmount.md) +- [CreatedTimeOffRequestNotes](docs/CreatedTimeOffRequestNotes.md) +- [CreatedTimeOffRequestStatus](docs/CreatedTimeOffRequestStatus.md) +- [CreatedTimeOffRequestType](docs/CreatedTimeOffRequestType.md) +- [CurrencyConversionsResponse](docs/CurrencyConversionsResponse.md) - [CursorPagedResponseMetadata](docs/CursorPagedResponseMetadata.md) - [CursorPagesResponse](docs/CursorPagesResponse.md) -- [CursorPaginationQueryObject](docs/CursorPaginationQueryObject.md) +- [CustomFieldDefinitionResponseObject](docs/CustomFieldDefinitionResponseObject.md) +- [CustomFieldDefinitionResponseObjectValuesInner](docs/CustomFieldDefinitionResponseObjectValuesInner.md) +- [CustomFieldRequest](docs/CustomFieldRequest.md) +- [CustomFieldTypeViewObject](docs/CustomFieldTypeViewObject.md) +- [CustomFieldViewObject](docs/CustomFieldViewObject.md) +- [CustomFieldsListResponse](docs/CustomFieldsListResponse.md) +- [CustomReportResponse](docs/CustomReportResponse.md) +- [CustomReportResponseFieldsInner](docs/CustomReportResponseFieldsInner.md) +- [Dacd313af2106213fc4696175941ce65Request](docs/Dacd313af2106213fc4696175941ce65Request.md) - [DataRequest](docs/DataRequest.md) -- [DataRequestAggregationsInner](docs/DataRequestAggregationsInner.md) +- [DataRequestAggregations](docs/DataRequestAggregations.md) - [DataRequestFilters](docs/DataRequestFilters.md) - [DataRequestFiltersFiltersInner](docs/DataRequestFiltersFiltersInner.md) - [DataRequestSortByInner](docs/DataRequestSortByInner.md) -- [Dataset](docs/Dataset.md) +- [DatasetDataResponseV2](docs/DatasetDataResponseV2.md) +- [DatasetDataResponseV2DataInner](docs/DatasetDataResponseV2DataInner.md) +- [DatasetDataResponseV2DataInnerFieldsValue](docs/DatasetDataResponseV2DataInnerFieldsValue.md) +- [DatasetDataResponseV2Links](docs/DatasetDataResponseV2Links.md) +- [DatasetDataResponseV2Meta](docs/DatasetDataResponseV2Meta.md) - [DatasetFieldsResponse](docs/DatasetFieldsResponse.md) -- [DatasetResponse](docs/DatasetResponse.md) -- [DatasetsResponse](docs/DatasetsResponse.md) -- [DatasetsResponseDatasetsInner](docs/DatasetsResponseDatasetsInner.md) +- [DatasetResponseV1](docs/DatasetResponseV1.md) +- [DatasetV1](docs/DatasetV1.md) +- [DatasetsResponseV12](docs/DatasetsResponseV12.md) +- [DatasetsResponseV12DatasetsInner](docs/DatasetsResponseV12DatasetsInner.md) +- [DeleteCompensationBenchmarkSourceRequest](docs/DeleteCompensationBenchmarkSourceRequest.md) +- [DeleteCompensationBenchmarkSourceResponse](docs/DeleteCompensationBenchmarkSourceResponse.md) +- [DetailsAndCurrencyRequestDataObject](docs/DetailsAndCurrencyRequestDataObject.md) +- [Ec1ba8e76f33960b018d0d7518fe97b5Request](docs/Ec1ba8e76f33960b018d0d7518fe97b5Request.md) - [Employee](docs/Employee.md) - [EmployeeBenefitFilters](docs/EmployeeBenefitFilters.md) - [EmployeeBenefitFiltersFilters](docs/EmployeeBenefitFiltersFilters.md) @@ -521,41 +999,70 @@ Class | Method | HTTP request | Description - [EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner](docs/EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.md) - [EmployeeCreatedWebhookPayload](docs/EmployeeCreatedWebhookPayload.md) - [EmployeeCreatedWebhookPayloadData](docs/EmployeeCreatedWebhookPayloadData.md) +- [EmployeeCursorPaginationQueryObject](docs/EmployeeCursorPaginationQueryObject.md) - [EmployeeDeletedWebhookPayload](docs/EmployeeDeletedWebhookPayload.md) - [EmployeeDeletedWebhookPayloadData](docs/EmployeeDeletedWebhookPayloadData.md) - [EmployeeDependent](docs/EmployeeDependent.md) - [EmployeeDependentsResponse](docs/EmployeeDependentsResponse.md) - [EmployeeDependentsResponseEmployeeDependentsInner](docs/EmployeeDependentsResponseEmployeeDependentsInner.md) - [EmployeeFileUpdate](docs/EmployeeFileUpdate.md) +- [EmployeeOptionalField](docs/EmployeeOptionalField.md) +- [EmployeePhotoJsonResponse](docs/EmployeePhotoJsonResponse.md) - [EmployeeResponse](docs/EmployeeResponse.md) - [EmployeeResponseAggregationsInner](docs/EmployeeResponseAggregationsInner.md) +- [EmployeeStringCodeErrorResponseV1](docs/EmployeeStringCodeErrorResponseV1.md) +- [EmployeeStringCodeErrorResponseV1Error](docs/EmployeeStringCodeErrorResponseV1Error.md) - [EmployeeTableRow](docs/EmployeeTableRow.md) -- [EmployeeTableRowValue](docs/EmployeeTableRowValue.md) -- [EmployeeTableRowValueAnyOfInner](docs/EmployeeTableRowValueAnyOfInner.md) - [EmployeeTimeOffPolicyAssignment](docs/EmployeeTimeOffPolicyAssignment.md) - [EmployeeTimeOffPolicyAssignmentV11](docs/EmployeeTimeOffPolicyAssignmentV11.md) +- [EmployeeTimeOffRequestApproverResponseInner](docs/EmployeeTimeOffRequestApproverResponseInner.md) - [EmployeeTimesheetEntryTransformer](docs/EmployeeTimesheetEntryTransformer.md) - [EmployeeUpdatedWebhookPayload](docs/EmployeeUpdatedWebhookPayload.md) - [EmployeeUpdatedWebhookPayloadData](docs/EmployeeUpdatedWebhookPayloadData.md) - [EmployeeValue](docs/EmployeeValue.md) - [EmployeeValueAnyOfInner](docs/EmployeeValueAnyOfInner.md) +- [EmployeeVerificationIntegration](docs/EmployeeVerificationIntegration.md) +- [EmployeeVerificationIntegrationResponse](docs/EmployeeVerificationIntegrationResponse.md) +- [EmployeeVerificationLifecycleEmailAcceptedResponse](docs/EmployeeVerificationLifecycleEmailAcceptedResponse.md) +- [EmployeeVerificationPublicApiRecord](docs/EmployeeVerificationPublicApiRecord.md) +- [EmployeeVerificationUpdateResponse](docs/EmployeeVerificationUpdateResponse.md) +- [EmployeeVerificationsListResponse](docs/EmployeeVerificationsListResponse.md) +- [EmployeesDirectoryJsonResponse](docs/EmployeesDirectoryJsonResponse.md) +- [EmployeesDirectoryJsonResponseFieldsInner](docs/EmployeesDirectoryJsonResponseFieldsInner.md) +- [EmployeesDirectoryXmlResponse](docs/EmployeesDirectoryXmlResponse.md) +- [EmployeesDirectoryXmlResponseEmployees](docs/EmployeesDirectoryXmlResponseEmployees.md) +- [EmployeesDirectoryXmlResponseEmployeesEmployeeInner](docs/EmployeesDirectoryXmlResponseEmployeesEmployeeInner.md) +- [EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner](docs/EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.md) +- [EmployeesDirectoryXmlResponseFieldset](docs/EmployeesDirectoryXmlResponseFieldset.md) +- [EmployeesDirectoryXmlResponseFieldsetFieldInner](docs/EmployeesDirectoryXmlResponseFieldsetFieldInner.md) +- [ErrorResponse](docs/ErrorResponse.md) +- [ErrorResponseError](docs/ErrorResponseError.md) +- [F3883a522dadbe9e11b34f8b656e3adbRequest](docs/F3883a522dadbe9e11b34f8b656e3adbRequest.md) - [Field1](docs/Field1.md) - [Field1Id](docs/Field1Id.md) -- [FieldList](docs/FieldList.md) -- [FieldListFieldsInner](docs/FieldListFieldsInner.md) - [FieldOptionsRequestSchema](docs/FieldOptionsRequestSchema.md) - [FieldOptionsRequestSchemaDependentFieldsValueInner](docs/FieldOptionsRequestSchemaDependentFieldsValueInner.md) - [FieldOptionsTransformer](docs/FieldOptionsTransformer.md) -- [Forbidden](docs/Forbidden.md) +- [FieldOptionsTransformerId](docs/FieldOptionsTransformerId.md) +- [ForbiddenV1](docs/ForbiddenV1.md) +- [ForbiddenV1Error](docs/ForbiddenV1Error.md) +- [GetBreakPolicySuggestionsRequest](docs/GetBreakPolicySuggestionsRequest.md) - [GetCompanyReportResponse](docs/GetCompanyReportResponse.md) +- [GetCompanyReportResponseEmployeesInner](docs/GetCompanyReportResponseEmployeesInner.md) +- [GetDataFromDatasetV2Request](docs/GetDataFromDatasetV2Request.md) +- [GetEmployeeResponse](docs/GetEmployeeResponse.md) +- [GetEmployeesEmployeeBaseResponse](docs/GetEmployeesEmployeeBaseResponse.md) - [GetEmployeesEmployeeResponse](docs/GetEmployeesEmployeeResponse.md) +- [GetEmployeesEmployeeResponseAllOfOvertimeRate](docs/GetEmployeesEmployeeResponseAllOfOvertimeRate.md) +- [GetEmployeesEmployeeResponseAllOfPayRate](docs/GetEmployeesEmployeeResponseAllOfPayRate.md) +- [GetEmployeesEmployeeResponseAllOfTeams](docs/GetEmployeesEmployeeResponseAllOfTeams.md) - [GetEmployeesFilterRequestObject](docs/GetEmployeesFilterRequestObject.md) - [GetEmployeesResponseObject](docs/GetEmployeesResponseObject.md) - [GetEmployeesResponseObjectLinks](docs/GetEmployeesResponseObjectLinks.md) - [GetEmployeesResponseObjectLinksNext](docs/GetEmployeesResponseObjectLinksNext.md) - [GetEmployeesResponseObjectLinksPrev](docs/GetEmployeesResponseObjectLinksPrev.md) - [GetEmployeesResponseObjectLinksSelf](docs/GetEmployeesResponseObjectLinksSelf.md) -- [Goal](docs/Goal.md) +- [GlobalHolidayGlobalHolidayV1](docs/GlobalHolidayGlobalHolidayV1.md) - [GoalAggregate](docs/GoalAggregate.md) - [GoalAggregateAlignsWithOptionsInner](docs/GoalAggregateAlignsWithOptionsInner.md) - [GoalAggregateCommentsInner](docs/GoalAggregateCommentsInner.md) @@ -568,6 +1075,7 @@ Class | Method | HTTP request | Description - [GoalFiltersV11FiltersInner](docs/GoalFiltersV11FiltersInner.md) - [GoalFiltersV11FiltersInnerActions](docs/GoalFiltersV11FiltersInnerActions.md) - [GoalFiltersV1FiltersInner](docs/GoalFiltersV1FiltersInner.md) +- [GoalResponse](docs/GoalResponse.md) - [GoalsAggregateV1](docs/GoalsAggregateV1.md) - [GoalsAggregateV11](docs/GoalsAggregateV11.md) - [GoalsAggregateV11CommentsInner](docs/GoalsAggregateV11CommentsInner.md) @@ -577,30 +1085,64 @@ Class | Method | HTTP request | Description - [GoalsAggregateV1PersonsInner](docs/GoalsAggregateV1PersonsInner.md) - [GoalsList](docs/GoalsList.md) - [HiringLead](docs/HiringLead.md) +- [HolidayBulkInsertCompanyHolidayErrorV1](docs/HolidayBulkInsertCompanyHolidayErrorV1.md) +- [HolidayBulkInsertCompanyHolidayRecordV1](docs/HolidayBulkInsertCompanyHolidayRecordV1.md) +- [HolidayBulkInsertCompanyHolidaysFailureResponseV1](docs/HolidayBulkInsertCompanyHolidaysFailureResponseV1.md) +- [HolidayBulkInsertCompanyHolidaysResponseV1](docs/HolidayBulkInsertCompanyHolidaysResponseV1.md) +- [HolidayCatalogHolidayListResponseV1](docs/HolidayCatalogHolidayListResponseV1.md) +- [HolidayCatalogHolidayListResponseV1Links](docs/HolidayCatalogHolidayListResponseV1Links.md) +- [HolidayCompanyHolidayAudienceV1](docs/HolidayCompanyHolidayAudienceV1.md) +- [HolidayCompanyHolidayListResponseV1](docs/HolidayCompanyHolidayListResponseV1.md) +- [HolidayCompanyHolidayListResponseV1Links](docs/HolidayCompanyHolidayListResponseV1Links.md) +- [HolidayCompanyHolidayListResponseV1Meta](docs/HolidayCompanyHolidayListResponseV1Meta.md) +- [HolidayCompanyHolidayPayStatusHoursV1](docs/HolidayCompanyHolidayPayStatusHoursV1.md) +- [HolidayCompanyHolidayV1](docs/HolidayCompanyHolidayV1.md) +- [HolidayCreateCompanyHolidayRequestV1](docs/HolidayCreateCompanyHolidayRequestV1.md) +- [HolidayUpdateCompanyHolidayRequestV1](docs/HolidayUpdateCompanyHolidayRequestV1.md) - [HourEntriesRequestSchema](docs/HourEntriesRequestSchema.md) +- [HourEntryCreateHourEntryV1](docs/HourEntryCreateHourEntryV1.md) - [HourEntryIdsSchema](docs/HourEntryIdsSchema.md) +- [HourEntryPatchHourEntryV1](docs/HourEntryPatchHourEntryV1.md) - [HourEntrySchema](docs/HourEntrySchema.md) -- [InvalidRequest](docs/InvalidRequest.md) -- [InvalidRequestError](docs/InvalidRequestError.md) +- [ImportCompensationBenchmarksResponse](docs/ImportCompensationBenchmarksResponse.md) +- [Industry](docs/Industry.md) +- [InlineObject](docs/InlineObject.md) +- [InlineObject1](docs/InlineObject1.md) +- [InlineObject1EmployeesInner](docs/InlineObject1EmployeesInner.md) +- [InlineObject1Status](docs/InlineObject1Status.md) +- [InlineObject2](docs/InlineObject2.md) +- [InlineObject2Inner](docs/InlineObject2Inner.md) - [JobSummary](docs/JobSummary.md) -- [JobSummaryDepartment](docs/JobSummaryDepartment.md) -- [JobSummaryHiringLead](docs/JobSummaryHiringLead.md) -- [JobSummaryLocation](docs/JobSummaryLocation.md) - [JobSummaryStatus](docs/JobSummaryStatus.md) -- [JsonDirectoryEmployee](docs/JsonDirectoryEmployee.md) -- [JsonDirectoryEmployeeFieldsInner](docs/JsonDirectoryEmployeeFieldsInner.md) - [JsonEmployeeFiles](docs/JsonEmployeeFiles.md) - [JsonEmployeeFilesCategoriesInner](docs/JsonEmployeeFilesCategoriesInner.md) - [JsonEmployeeFilesCategoriesInnerFilesInner](docs/JsonEmployeeFilesCategoriesInnerFilesInner.md) - [JsonEmployeeFilesEmployee](docs/JsonEmployeeFilesEmployee.md) +- [LegacyReportFieldMapResponse](docs/LegacyReportFieldMapResponse.md) +- [LegacyReportFieldMapResponseMappingsInner](docs/LegacyReportFieldMapResponseMappingsInner.md) +- [LegacyReportIDMapResponse](docs/LegacyReportIDMapResponse.md) +- [LegacyReportIDMapResponseMappingsInner](docs/LegacyReportIDMapResponseMappingsInner.md) +- [LevelsAndBandsColumnMap](docs/LevelsAndBandsColumnMap.md) +- [LevelsAndBandsGroupStatusCounts](docs/LevelsAndBandsGroupStatusCounts.md) +- [LevelsAndBandsJobTitleAssignment](docs/LevelsAndBandsJobTitleAssignment.md) +- [LevelsAndBandsJobTitleAssignmentsRequest](docs/LevelsAndBandsJobTitleAssignmentsRequest.md) +- [LevelsAndBandsPayBandValue](docs/LevelsAndBandsPayBandValue.md) +- [LevelsAndBandsUploadResponse](docs/LevelsAndBandsUploadResponse.md) - [ListFieldDetail](docs/ListFieldDetail.md) - [ListFieldOption](docs/ListFieldOption.md) - [ListFieldValues](docs/ListFieldValues.md) - [ListFieldValuesOptionsInner](docs/ListFieldValuesOptionsInner.md) +- [ListFieldValuesXml](docs/ListFieldValuesXml.md) +- [ListFieldValuesXmlOptionInner](docs/ListFieldValuesXmlOptionInner.md) - [ListUsersResponseValue](docs/ListUsersResponseValue.md) - [ListUsersXmlResponse](docs/ListUsersXmlResponse.md) - [ListUsersXmlResponseUserInner](docs/ListUsersXmlResponseUserInner.md) +- [ListValueViewObject](docs/ListValueViewObject.md) - [Location](docs/Location.md) +- [LocationResponseObject](docs/LocationResponseObject.md) +- [LocationResponseObjectAddress](docs/LocationResponseObjectAddress.md) +- [LocationResponseObjectAddressCountry](docs/LocationResponseObjectAddressCountry.md) +- [LocationResponseObjectAddressState](docs/LocationResponseObjectAddressState.md) - [LoginFailureResponse](docs/LoginFailureResponse.md) - [LoginFailureXmlResponse](docs/LoginFailureXmlResponse.md) - [LoginResponse](docs/LoginResponse.md) @@ -619,27 +1161,110 @@ Class | Method | HTTP request | Description - [MemberBenefitsGetSuccessResponseLinksPrev](docs/MemberBenefitsGetSuccessResponseLinksPrev.md) - [MemberBenefitsGetSuccessResponseMeta](docs/MemberBenefitsGetSuccessResponseMeta.md) - [MemberBenefitsGetValidationErrorResponse](docs/MemberBenefitsGetValidationErrorResponse.md) +- [MetaCompanyPropertiesResponse](docs/MetaCompanyPropertiesResponse.md) +- [MetaCurrencyTypeItem](docs/MetaCurrencyTypeItem.md) +- [Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest](docs/Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest.md) +- [Model1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner](docs/Model1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner.md) +- [Model1d64402ee192568adbd5e3179a91e6e2RequestInner](docs/Model1d64402ee192568adbd5e3179a91e6e2RequestInner.md) +- [Model1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations](docs/Model1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations.md) +- [Model288aa996aba16d7a495c62321ea999a9Request](docs/Model288aa996aba16d7a495c62321ea999a9Request.md) +- [Model288aa996aba16d7a495c62321ea999a9RequestSentDateTime](docs/Model288aa996aba16d7a495c62321ea999a9RequestSentDateTime.md) +- [Model3958585c861325ea7a2cd30a8c74f042Request](docs/Model3958585c861325ea7a2cd30a8c74f042Request.md) +- [Model89a5068111ec499135c7d6e9a53d5a30Request](docs/Model89a5068111ec499135c7d6e9a53d5a30Request.md) - [ModelField](docs/ModelField.md) +- [MonitorFieldList](docs/MonitorFieldList.md) +- [MonitorFieldListFieldsInner](docs/MonitorFieldListFieldsInner.md) +- [NewHirePacketGtkyAnswerVisibilityItem](docs/NewHirePacketGtkyAnswerVisibilityItem.md) +- [NewHirePacketGtkyAnswerVisibilityRequest](docs/NewHirePacketGtkyAnswerVisibilityRequest.md) +- [NewHirePacketGtkyAnswerVisibilityResponse](docs/NewHirePacketGtkyAnswerVisibilityResponse.md) +- [NewHirePacketPublicApi](docs/NewHirePacketPublicApi.md) +- [NewHirePacketPublicApiWritableBody](docs/NewHirePacketPublicApiWritableBody.md) +- [NewHirePacketsListResponse](docs/NewHirePacketsListResponse.md) +- [NewHireWidgetItem](docs/NewHireWidgetItem.md) +- [NewHireWidgetResponse](docs/NewHireWidgetResponse.md) - [NewWebHook](docs/NewWebHook.md) +- [OnboardingExperiencePublicApi](docs/OnboardingExperiencePublicApi.md) +- [OnboardingExperiencesListResponse](docs/OnboardingExperiencesListResponse.md) +- [PagedLocationResponse](docs/PagedLocationResponse.md) - [PagedResponse](docs/PagedResponse.md) - [Pagination](docs/Pagination.md) - [PaginationMetaData](docs/PaginationMetaData.md) +- [PatchCompanyProfileCompanyInformationRequest](docs/PatchCompanyProfileCompanyInformationRequest.md) +- [PatchCompanyProfileCompanyInformationRequestAddress](docs/PatchCompanyProfileCompanyInformationRequestAddress.md) +- [PayGradesAndBandsConfigurationStatus](docs/PayGradesAndBandsConfigurationStatus.md) +- [PayGradesAndBandsConfigurationStatusJobTitles](docs/PayGradesAndBandsConfigurationStatusJobTitles.md) +- [PayGradesAndBandsConfigurationStatusJobTitlesWarningsInner](docs/PayGradesAndBandsConfigurationStatusJobTitlesWarningsInner.md) +- [PayGradesAndBandsConfigurationStatusLevels](docs/PayGradesAndBandsConfigurationStatusLevels.md) +- [PayGradesAndBandsConfigurationStatusLevelsErrorsInner](docs/PayGradesAndBandsConfigurationStatusLevelsErrorsInner.md) +- [PayGradesAndBandsConfigurationStatusPayBands](docs/PayGradesAndBandsConfigurationStatusPayBands.md) +- [PayGradesAndBandsConfigurationStatusReview](docs/PayGradesAndBandsConfigurationStatusReview.md) +- [PayGradesAndBandsDeleteGroupsResponse](docs/PayGradesAndBandsDeleteGroupsResponse.md) +- [PayGradesAndBandsDeleteHierarchyGroup](docs/PayGradesAndBandsDeleteHierarchyGroup.md) +- [PayGradesAndBandsDeleteHierarchyJobTitle](docs/PayGradesAndBandsDeleteHierarchyJobTitle.md) +- [PayGradesAndBandsDeleteHierarchyLevel](docs/PayGradesAndBandsDeleteHierarchyLevel.md) +- [PayGradesAndBandsDeleteLevelResponse](docs/PayGradesAndBandsDeleteLevelResponse.md) +- [PayGradesAndBandsDeleteResponse](docs/PayGradesAndBandsDeleteResponse.md) +- [PayGradesAndBandsJobTitleAssignmentsGroup](docs/PayGradesAndBandsJobTitleAssignmentsGroup.md) +- [PayGradesAndBandsJobTitleAssignmentsJobTitle](docs/PayGradesAndBandsJobTitleAssignmentsJobTitle.md) +- [PayGradesAndBandsJobTitleAssignmentsLevel](docs/PayGradesAndBandsJobTitleAssignmentsLevel.md) +- [PayGradesAndBandsJobTitleAssignmentsResponse](docs/PayGradesAndBandsJobTitleAssignmentsResponse.md) +- [PayGradesAndBandsJobTitleEmployee](docs/PayGradesAndBandsJobTitleEmployee.md) +- [PayGradesAndBandsJobTitleWithEmployees](docs/PayGradesAndBandsJobTitleWithEmployees.md) +- [PayGradesAndBandsLevel](docs/PayGradesAndBandsLevel.md) +- [PayGradesAndBandsLevelJobTitle](docs/PayGradesAndBandsLevelJobTitle.md) +- [PayGradesAndBandsLevelsGroup](docs/PayGradesAndBandsLevelsGroup.md) +- [PayGradesAndBandsLevelsResponse](docs/PayGradesAndBandsLevelsResponse.md) +- [PayGradesAndBandsPayBandJobTitle](docs/PayGradesAndBandsPayBandJobTitle.md) +- [PayGradesAndBandsPayBandLevel](docs/PayGradesAndBandsPayBandLevel.md) +- [PayGradesAndBandsPayBandsGroup](docs/PayGradesAndBandsPayBandsGroup.md) +- [PayGradesAndBandsPayBandsResponse](docs/PayGradesAndBandsPayBandsResponse.md) +- [PayGradesAndBandsPublishResponse](docs/PayGradesAndBandsPublishResponse.md) +- [PayGradesAndBandsPublishedGroup](docs/PayGradesAndBandsPublishedGroup.md) +- [PayGradesAndBandsPublishedJobTitle](docs/PayGradesAndBandsPublishedJobTitle.md) +- [PayGradesAndBandsPublishedLevel](docs/PayGradesAndBandsPublishedLevel.md) +- [PayGradesAndBandsPublishedResponse](docs/PayGradesAndBandsPublishedResponse.md) +- [PayGradesAndBandsReviewGroup](docs/PayGradesAndBandsReviewGroup.md) +- [PayGradesAndBandsReviewJobTitle](docs/PayGradesAndBandsReviewJobTitle.md) +- [PayGradesAndBandsReviewLevel](docs/PayGradesAndBandsReviewLevel.md) +- [PayGradesAndBandsReviewResponse](docs/PayGradesAndBandsReviewResponse.md) +- [PayGradesAndBandsSaveLevelsResponse](docs/PayGradesAndBandsSaveLevelsResponse.md) +- [PayGradesAndBandsUpdateJobTitlesResponse](docs/PayGradesAndBandsUpdateJobTitlesResponse.md) +- [PayGradesAndBandsUpdateLevel](docs/PayGradesAndBandsUpdateLevel.md) +- [PayGradesAndBandsUpdateLevelsGroup](docs/PayGradesAndBandsUpdateLevelsGroup.md) +- [PayGradesAndBandsUpdateLevelsRequest](docs/PayGradesAndBandsUpdateLevelsRequest.md) +- [PayGradesAndBandsUpdatePayBandItem](docs/PayGradesAndBandsUpdatePayBandItem.md) +- [PayGradesAndBandsUpdatePayBandsResponse](docs/PayGradesAndBandsUpdatePayBandsResponse.md) - [PersonInfoApiTransformer](docs/PersonInfoApiTransformer.md) -- [PostGoalCommentRequest](docs/PostGoalCommentRequest.md) -- [PostGoalRequest](docs/PostGoalRequest.md) -- [PostGoalRequestMilestonesInner](docs/PostGoalRequestMilestonesInner.md) - [PostNewEmployee](docs/PostNewEmployee.md) - [ProblemDetailsResponse](docs/ProblemDetailsResponse.md) +- [ProblemDetailsResponseV2](docs/ProblemDetailsResponseV2.md) - [ProjectCreateRequestSchema](docs/ProjectCreateRequestSchema.md) +- [ProjectCreateTimeTrackingProjectTaskV1](docs/ProjectCreateTimeTrackingProjectTaskV1.md) +- [ProjectCreateTimeTrackingProjectV1](docs/ProjectCreateTimeTrackingProjectV1.md) +- [ProjectCreateTimeTrackingProjectV1TasksInner](docs/ProjectCreateTimeTrackingProjectV1TasksInner.md) - [ProjectInfoApiTransformer](docs/ProjectInfoApiTransformer.md) - [ProjectInfoApiTransformerProject](docs/ProjectInfoApiTransformerProject.md) -- [ProjectInfoApiTransformerTask](docs/ProjectInfoApiTransformerTask.md) -- [PutGoalCommentRequest](docs/PutGoalCommentRequest.md) -- [PutGoalMilestoneProgressRequest](docs/PutGoalMilestoneProgressRequest.md) -- [PutGoalProgressRequest](docs/PutGoalProgressRequest.md) -- [PutGoalSharedWithRequest](docs/PutGoalSharedWithRequest.md) -- [PutGoalV11Request](docs/PutGoalV11Request.md) -- [PutGoalV11RequestMilestonesInner](docs/PutGoalV11RequestMilestonesInner.md) +- [ProjectLegacyErrorResponseV1](docs/ProjectLegacyErrorResponseV1.md) +- [ProjectLegacyErrorResponseV1Error](docs/ProjectLegacyErrorResponseV1Error.md) +- [ProjectPaginatedResponseDataV1](docs/ProjectPaginatedResponseDataV1.md) +- [ProjectPaginatedResponseDataV1Meta](docs/ProjectPaginatedResponseDataV1Meta.md) +- [ProjectPaginatedTasksResponseV1](docs/ProjectPaginatedTasksResponseV1.md) +- [ProjectPaginatedTasksResponseV1Links](docs/ProjectPaginatedTasksResponseV1Links.md) +- [ProjectPaginatedTasksResponseV1Meta](docs/ProjectPaginatedTasksResponseV1Meta.md) +- [ProjectPaginatedTimeTrackingProjectsResponseV1](docs/ProjectPaginatedTimeTrackingProjectsResponseV1.md) +- [ProjectStandardApiErrorResponseV1](docs/ProjectStandardApiErrorResponseV1.md) +- [ProjectTimeTrackingProjectV1](docs/ProjectTimeTrackingProjectV1.md) +- [ProjectTimeTrackingTaskV1](docs/ProjectTimeTrackingTaskV1.md) +- [ProjectUpdateTimeTrackingProjectTaskV1](docs/ProjectUpdateTimeTrackingProjectTaskV1.md) +- [ProjectUpdateTimeTrackingProjectV1](docs/ProjectUpdateTimeTrackingProjectV1.md) +- [ProvinceItem](docs/ProvinceItem.md) +- [PublicCustomFieldTypesResponse](docs/PublicCustomFieldTypesResponse.md) +- [PublicListValuesCustomFieldSettingsResponse](docs/PublicListValuesCustomFieldSettingsResponse.md) +- [PublicListValuesCustomFieldSettingsResponseValuesInner](docs/PublicListValuesCustomFieldSettingsResponseValuesInner.md) +- [PutCompanyIndustryCodesRequest](docs/PutCompanyIndustryCodesRequest.md) +- [PutCompanyProfileDisplayNameRequest](docs/PutCompanyProfileDisplayNameRequest.md) +- [RemoveCycleAdminSelfResponse](docs/RemoveCycleAdminSelfResponse.md) +- [RemoveTotalRewardsEmployeesRequest](docs/RemoveTotalRewardsEmployeesRequest.md) - [Report](docs/Report.md) - [ReportsResponse](docs/ReportsResponse.md) - [Request](docs/Request.md) @@ -649,8 +1274,46 @@ Class | Method | HTTP request | Description - [RequestCustomReportResponse](docs/RequestCustomReportResponse.md) - [RequestCustomReportResponseEmployeesInner](docs/RequestCustomReportResponseEmployeesInner.md) - [RequestCustomReportResponseFieldsInner](docs/RequestCustomReportResponseFieldsInner.md) +- [SaveChangeCommTemplateResponse](docs/SaveChangeCommTemplateResponse.md) +- [SchedulingCreateScheduleRequestV1](docs/SchedulingCreateScheduleRequestV1.md) +- [SchedulingCreateSchedulingShiftRequestV1](docs/SchedulingCreateSchedulingShiftRequestV1.md) +- [SchedulingPublishShiftsFailureV1](docs/SchedulingPublishShiftsFailureV1.md) +- [SchedulingPublishShiftsRequest](docs/SchedulingPublishShiftsRequest.md) +- [SchedulingPublishShiftsResultV1](docs/SchedulingPublishShiftsResultV1.md) +- [SchedulingScheduleListResponseV1](docs/SchedulingScheduleListResponseV1.md) +- [SchedulingScheduleListResponseV1Links](docs/SchedulingScheduleListResponseV1Links.md) +- [SchedulingScheduleListResponseV1Meta](docs/SchedulingScheduleListResponseV1Meta.md) +- [SchedulingScheduleV1](docs/SchedulingScheduleV1.md) +- [SchedulingSchedulingShiftAssessmentV1](docs/SchedulingSchedulingShiftAssessmentV1.md) +- [SchedulingSchedulingShiftAssessmentViolationV1](docs/SchedulingSchedulingShiftAssessmentViolationV1.md) +- [SchedulingSchedulingShiftV1](docs/SchedulingSchedulingShiftV1.md) +- [SchedulingShiftAssessmentListResponseV1](docs/SchedulingShiftAssessmentListResponseV1.md) +- [SchedulingShiftAssessmentListResponseV1Meta](docs/SchedulingShiftAssessmentListResponseV1Meta.md) +- [SchedulingShiftListResponseV1](docs/SchedulingShiftListResponseV1.md) +- [SchedulingShiftListResponseV1Links](docs/SchedulingShiftListResponseV1Links.md) +- [SchedulingShiftListResponseV1LinksNext](docs/SchedulingShiftListResponseV1LinksNext.md) +- [SchedulingShiftListResponseV1LinksPrev](docs/SchedulingShiftListResponseV1LinksPrev.md) +- [SchedulingShiftListResponseV1Meta](docs/SchedulingShiftListResponseV1Meta.md) +- [SchedulingTimezoneListResponseV1](docs/SchedulingTimezoneListResponseV1.md) +- [SchedulingTimezoneListResponseV1Meta](docs/SchedulingTimezoneListResponseV1Meta.md) +- [SchedulingTimezoneV1](docs/SchedulingTimezoneV1.md) +- [SchedulingUpdateScheduleRequestV1](docs/SchedulingUpdateScheduleRequestV1.md) +- [SchedulingUpdateSchedulingShiftRequestV1](docs/SchedulingUpdateSchedulingShiftRequestV1.md) +- [SendEmployeeVerificationLifecycleEmailByUserRequest](docs/SendEmployeeVerificationLifecycleEmailByUserRequest.md) +- [SendRecommendationsResponse](docs/SendRecommendationsResponse.md) - [SetBreakPolicyEmployeesRequest](docs/SetBreakPolicyEmployeesRequest.md) +- [SetTotalRewardsCustomDisclaimerRequest](docs/SetTotalRewardsCustomDisclaimerRequest.md) +- [SetTotalRewardsOnboardingStepRequest](docs/SetTotalRewardsOnboardingStepRequest.md) - [ShareOptionsResponse](docs/ShareOptionsResponse.md) +- [ShiftDifferentialCreateTimeTrackingShiftDifferentialV1](docs/ShiftDifferentialCreateTimeTrackingShiftDifferentialV1.md) +- [ShiftDifferentialCreateTimeTrackingShiftDifferentialV1TimesInner](docs/ShiftDifferentialCreateTimeTrackingShiftDifferentialV1TimesInner.md) +- [ShiftDifferentialPaginatedResponseDataV1](docs/ShiftDifferentialPaginatedResponseDataV1.md) +- [ShiftDifferentialPaginatedResponseDataV1Meta](docs/ShiftDifferentialPaginatedResponseDataV1Meta.md) +- [ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1](docs/ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1.md) +- [ShiftDifferentialTimeTrackingShiftDifferentialTimeV1](docs/ShiftDifferentialTimeTrackingShiftDifferentialTimeV1.md) +- [ShiftDifferentialTimeTrackingShiftDifferentialV1](docs/ShiftDifferentialTimeTrackingShiftDifferentialV1.md) +- [ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1](docs/ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1.md) +- [StandardApiErrorResponse](docs/StandardApiErrorResponse.md) - [State](docs/State.md) - [StateProvinceResponseSchema](docs/StateProvinceResponseSchema.md) - [StateProvinceSchema](docs/StateProvinceSchema.md) @@ -675,28 +1338,53 @@ Class | Method | HTTP request | Description - [TimeOffTypesAndDefaultHoursDefaultHoursInner](docs/TimeOffTypesAndDefaultHoursDefaultHoursInner.md) - [TimeOffTypesAndDefaultHoursTimeOffTypesInner](docs/TimeOffTypesAndDefaultHoursTimeOffTypesInner.md) - [TimeTrackingBreakPolicyEmployeeCollectionV1Inner](docs/TimeTrackingBreakPolicyEmployeeCollectionV1Inner.md) +- [TimeTrackingBreakPolicySuggestionsResponseV1](docs/TimeTrackingBreakPolicySuggestionsResponseV1.md) +- [TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner](docs/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.md) +- [TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner](docs/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.md) - [TimeTrackingBulkResponseSchema](docs/TimeTrackingBulkResponseSchema.md) - [TimeTrackingBulkResponseSchemaResponse](docs/TimeTrackingBulkResponseSchemaResponse.md) +- [TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1](docs/TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1.md) +- [TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1](docs/TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1.md) +- [TimeTrackingClockEntryLocationV1](docs/TimeTrackingClockEntryLocationV1.md) +- [TimeTrackingClockEntryPaginatedResponseDataV1](docs/TimeTrackingClockEntryPaginatedResponseDataV1.md) +- [TimeTrackingClockEntryPaginatedResponseDataV1Meta](docs/TimeTrackingClockEntryPaginatedResponseDataV1Meta.md) +- [TimeTrackingClockEntryV1](docs/TimeTrackingClockEntryV1.md) +- [TimeTrackingConfigurationPaginatedResponseDataV1](docs/TimeTrackingConfigurationPaginatedResponseDataV1.md) +- [TimeTrackingConfigurationPaginatedResponseDataV1Links](docs/TimeTrackingConfigurationPaginatedResponseDataV1Links.md) +- [TimeTrackingConfigurationPaginatedResponseDataV1LinksNext](docs/TimeTrackingConfigurationPaginatedResponseDataV1LinksNext.md) +- [TimeTrackingConfigurationPaginatedResponseDataV1LinksPrev](docs/TimeTrackingConfigurationPaginatedResponseDataV1LinksPrev.md) +- [TimeTrackingConfigurationPaginatedResponseDataV1Meta](docs/TimeTrackingConfigurationPaginatedResponseDataV1Meta.md) +- [TimeTrackingCreateClockInV1](docs/TimeTrackingCreateClockInV1.md) +- [TimeTrackingCreateClockOutV1](docs/TimeTrackingCreateClockOutV1.md) - [TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1](docs/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md) - [TimeTrackingCreateTimeTrackingBreakPolicyV1](docs/TimeTrackingCreateTimeTrackingBreakPolicyV1.md) - [TimeTrackingCreateTimeTrackingBreakV1](docs/TimeTrackingCreateTimeTrackingBreakV1.md) +- [TimeTrackingCreateTimeTrackingConfigurationV1](docs/TimeTrackingCreateTimeTrackingConfigurationV1.md) - [TimeTrackingDeleteResponseSchema](docs/TimeTrackingDeleteResponseSchema.md) +- [TimeTrackingEmployeeEnrollmentPaginatedResponseDataV1](docs/TimeTrackingEmployeeEnrollmentPaginatedResponseDataV1.md) +- [TimeTrackingEmployeeTimeTrackingDataV1](docs/TimeTrackingEmployeeTimeTrackingDataV1.md) +- [TimeTrackingHourEntryPaginatedResponseDataV1](docs/TimeTrackingHourEntryPaginatedResponseDataV1.md) +- [TimeTrackingHourEntryV1](docs/TimeTrackingHourEntryV1.md) - [TimeTrackingIdResponseSchema](docs/TimeTrackingIdResponseSchema.md) - [TimeTrackingOffsetPaginatedResponseDataV1](docs/TimeTrackingOffsetPaginatedResponseDataV1.md) - [TimeTrackingOffsetPaginatedResponseDataV1Links](docs/TimeTrackingOffsetPaginatedResponseDataV1Links.md) -- [TimeTrackingOffsetPaginatedResponseDataV1LinksNext](docs/TimeTrackingOffsetPaginatedResponseDataV1LinksNext.md) -- [TimeTrackingOffsetPaginatedResponseDataV1LinksPrev](docs/TimeTrackingOffsetPaginatedResponseDataV1LinksPrev.md) - [TimeTrackingOffsetPaginatedResponseDataV1Meta](docs/TimeTrackingOffsetPaginatedResponseDataV1Meta.md) +- [TimeTrackingPagePaginatedResponseDataV1](docs/TimeTrackingPagePaginatedResponseDataV1.md) - [TimeTrackingPaginatedBreakAssessmentsResponseV1](docs/TimeTrackingPaginatedBreakAssessmentsResponseV1.md) - [TimeTrackingPaginatedBreakPoliciesResponseV1](docs/TimeTrackingPaginatedBreakPoliciesResponseV1.md) - [TimeTrackingPaginatedBreakPolicyEmployeesResponseV1](docs/TimeTrackingPaginatedBreakPolicyEmployeesResponseV1.md) - [TimeTrackingPaginatedBreaksResponseV1](docs/TimeTrackingPaginatedBreaksResponseV1.md) +- [TimeTrackingPaginatedClockEntriesResponseV1](docs/TimeTrackingPaginatedClockEntriesResponseV1.md) +- [TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1](docs/TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1.md) +- [TimeTrackingPaginatedHourEntriesResponseV1](docs/TimeTrackingPaginatedHourEntriesResponseV1.md) +- [TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1](docs/TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1.md) +- [TimeTrackingPaginatedTimeTrackingKiosksResponseV1](docs/TimeTrackingPaginatedTimeTrackingKiosksResponseV1.md) +- [TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1](docs/TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1.md) +- [TimeTrackingPaginatedTimesheetsResponseV1](docs/TimeTrackingPaginatedTimesheetsResponseV1.md) +- [TimeTrackingPaginatedTimesheetsResponseV1Meta](docs/TimeTrackingPaginatedTimesheetsResponseV1Meta.md) - [TimeTrackingProjectWithTasksAndEmployeeIds](docs/TimeTrackingProjectWithTasksAndEmployeeIds.md) - [TimeTrackingRecord](docs/TimeTrackingRecord.md) - [TimeTrackingRecordSchema](docs/TimeTrackingRecordSchema.md) -- [TimeTrackingRecordSchemaProject](docs/TimeTrackingRecordSchemaProject.md) -- [TimeTrackingRecordSchemaProjectTask](docs/TimeTrackingRecordSchemaProjectTask.md) -- [TimeTrackingRecordSchemaShiftDifferential](docs/TimeTrackingRecordSchemaShiftDifferential.md) - [TimeTrackingSyncTimeTrackingBreakPolicyV1](docs/TimeTrackingSyncTimeTrackingBreakPolicyV1.md) - [TimeTrackingTask](docs/TimeTrackingTask.md) - [TimeTrackingTimeTrackingBreakAssessmentV1](docs/TimeTrackingTimeTrackingBreakAssessmentV1.md) @@ -705,33 +1393,94 @@ Class | Method | HTTP request | Description - [TimeTrackingTimeTrackingBreakPolicyV1](docs/TimeTrackingTimeTrackingBreakPolicyV1.md) - [TimeTrackingTimeTrackingBreakPolicyWithRelationsV1](docs/TimeTrackingTimeTrackingBreakPolicyWithRelationsV1.md) - [TimeTrackingTimeTrackingBreakV1](docs/TimeTrackingTimeTrackingBreakV1.md) +- [TimeTrackingTimeTrackingConfigurationV1](docs/TimeTrackingTimeTrackingConfigurationV1.md) +- [TimeTrackingTimeTrackingHourEntryV1](docs/TimeTrackingTimeTrackingHourEntryV1.md) +- [TimeTrackingTimeTrackingKioskV1](docs/TimeTrackingTimeTrackingKioskV1.md) +- [TimeTrackingTimeTrackingTimeClockV1](docs/TimeTrackingTimeTrackingTimeClockV1.md) +- [TimeTrackingTimesheetV1](docs/TimeTrackingTimesheetV1.md) +- [TimeTrackingUpdateClockEntryV1](docs/TimeTrackingUpdateClockEntryV1.md) +- [TimeTrackingUpdateEmployeeTimeTrackingDataV1](docs/TimeTrackingUpdateEmployeeTimeTrackingDataV1.md) - [TimeTrackingUpdateTimeTrackingBreakPolicyV1](docs/TimeTrackingUpdateTimeTrackingBreakPolicyV1.md) - [TimeTrackingUpdateTimeTrackingBreakV1](docs/TimeTrackingUpdateTimeTrackingBreakV1.md) +- [TimeTrackingUpdateTimeTrackingConfigurationV1](docs/TimeTrackingUpdateTimeTrackingConfigurationV1.md) +- [TimeTrackingUpdateTimeTrackingKioskV1](docs/TimeTrackingUpdateTimeTrackingKioskV1.md) +- [TimeTrackingUpdateTimeTrackingTimeClockV1](docs/TimeTrackingUpdateTimeTrackingTimeClockV1.md) - [TimesheetEntryInfoApiTransformer](docs/TimesheetEntryInfoApiTransformer.md) -- [TimesheetEntryInfoApiTransformerBreakInfo](docs/TimesheetEntryInfoApiTransformerBreakInfo.md) +- [TimesheetTimesheetDailyEntryV1](docs/TimesheetTimesheetDailyEntryV1.md) +- [TimesheetTimesheetDailySummaryV1](docs/TimesheetTimesheetDailySummaryV1.md) - [TimezoneListResponse](docs/TimezoneListResponse.md) - [TimezoneResource](docs/TimezoneResource.md) +- [TotalRewardsBenefitDetailsValues](docs/TotalRewardsBenefitDetailsValues.md) +- [TotalRewardsBenefitSectionValues](docs/TotalRewardsBenefitSectionValues.md) +- [TotalRewardsCalendarSectionValues](docs/TotalRewardsCalendarSectionValues.md) +- [TotalRewardsCompSummaryValues](docs/TotalRewardsCompSummaryValues.md) +- [TotalRewardsCustomDisclaimerInfo](docs/TotalRewardsCustomDisclaimerInfo.md) +- [TotalRewardsEmployeeStatement](docs/TotalRewardsEmployeeStatement.md) +- [TotalRewardsEquityDetailsValues](docs/TotalRewardsEquityDetailsValues.md) +- [TotalRewardsEquityEstimatedValuationValues](docs/TotalRewardsEquityEstimatedValuationValues.md) +- [TotalRewardsEquityGrowthChartItem](docs/TotalRewardsEquityGrowthChartItem.md) +- [TotalRewardsEquityGrowthEstimation](docs/TotalRewardsEquityGrowthEstimation.md) +- [TotalRewardsEquitySectionValues](docs/TotalRewardsEquitySectionValues.md) +- [TotalRewardsExtraPayDetailsValues](docs/TotalRewardsExtraPayDetailsValues.md) +- [TotalRewardsExtraPaySectionValues](docs/TotalRewardsExtraPaySectionValues.md) +- [TotalRewardsHolidayValue](docs/TotalRewardsHolidayValue.md) +- [TotalRewardsOnboardingStep](docs/TotalRewardsOnboardingStep.md) +- [TotalRewardsOverviewSectionValues](docs/TotalRewardsOverviewSectionValues.md) +- [TotalRewardsTimeOffPolicyValue](docs/TotalRewardsTimeOffPolicyValue.md) +- [TotalRewardsTimelineItem](docs/TotalRewardsTimelineItem.md) +- [TotalRewardsTimelineItemLabel](docs/TotalRewardsTimelineItemLabel.md) +- [TotalRewardsTimelineSectionValues](docs/TotalRewardsTimelineSectionValues.md) - [TrainingCategory](docs/TrainingCategory.md) - [TrainingRecord](docs/TrainingRecord.md) - [TrainingRecordMap](docs/TrainingRecordMap.md) - [TrainingRecordType](docs/TrainingRecordType.md) - [TrainingType](docs/TrainingType.md) - [TrainingTypeCategory](docs/TrainingTypeCategory.md) -- [TrainingTypeDueFromHireDate](docs/TrainingTypeDueFromHireDate.md) -- [TrainingTypeDueFromHireDateOneOf](docs/TrainingTypeDueFromHireDateOneOf.md) - [TransformedApiEmployeeGoalDetails](docs/TransformedApiEmployeeGoalDetails.md) - [TransformedApiEmployeeGoalDetailsGoal](docs/TransformedApiEmployeeGoalDetailsGoal.md) - [TransformedApiGoal](docs/TransformedApiGoal.md) -- [TransformedApiGoalActions](docs/TransformedApiGoalActions.md) - [TransformedApiGoalMilestonesInner](docs/TransformedApiGoalMilestonesInner.md) +- [UnarchiveCustomFieldsRequest](docs/UnarchiveCustomFieldsRequest.md) +- [UnarchiveCustomFieldsResponse](docs/UnarchiveCustomFieldsResponse.md) - [UnassignEmployeesFromBreakPolicyRequest](docs/UnassignEmployeesFromBreakPolicyRequest.md) - [UpdateApplicantStatusRequest](docs/UpdateApplicantStatusRequest.md) - [UpdateApplicantStatusResponse](docs/UpdateApplicantStatusResponse.md) +- [UpdateCompanyIndustryCodes400Response](docs/UpdateCompanyIndustryCodes400Response.md) +- [UpdateCompanyIndustryCodes403Response](docs/UpdateCompanyIndustryCodes403Response.md) +- [UpdateCompanyIndustryCodes404Response](docs/UpdateCompanyIndustryCodes404Response.md) +- [UpdateCompanyIndustryCodes500Response](docs/UpdateCompanyIndustryCodes500Response.md) +- [UpdateCompanyIndustryCodesResponse](docs/UpdateCompanyIndustryCodesResponse.md) +- [UpdateCompanyNameBadRequestResponse](docs/UpdateCompanyNameBadRequestResponse.md) +- [UpdateCompanyNameBadRequestResponseError](docs/UpdateCompanyNameBadRequestResponseError.md) +- [UpdateCompanyNameForbiddenResponse](docs/UpdateCompanyNameForbiddenResponse.md) +- [UpdateCompanyNameForbiddenResponseError](docs/UpdateCompanyNameForbiddenResponseError.md) +- [UpdateCompanyNameInternalErrorResponse](docs/UpdateCompanyNameInternalErrorResponse.md) +- [UpdateCompanyNameSuccessResponse](docs/UpdateCompanyNameSuccessResponse.md) +- [UpdateCompensationBenchmarkRequest](docs/UpdateCompensationBenchmarkRequest.md) +- [UpdateCompensationBenchmarkSourceItem](docs/UpdateCompensationBenchmarkSourceItem.md) +- [UpdateCompensationBenchmarkSourcesRequest](docs/UpdateCompensationBenchmarkSourcesRequest.md) +- [UpdateCompensationBenchmarkSourcesResponse](docs/UpdateCompensationBenchmarkSourcesResponse.md) - [UpdateEmployeeTrainingRecordRequest](docs/UpdateEmployeeTrainingRecordRequest.md) +- [UpdateEmployeeVerificationIntegrationRequest](docs/UpdateEmployeeVerificationIntegrationRequest.md) +- [UpdateEmployeeVerificationRequest](docs/UpdateEmployeeVerificationRequest.md) +- [UpdateGoalCommentRequest](docs/UpdateGoalCommentRequest.md) +- [UpdateGoalMilestoneProgressRequest](docs/UpdateGoalMilestoneProgressRequest.md) +- [UpdateGoalProgressRequest](docs/UpdateGoalProgressRequest.md) +- [UpdateGoalSharingRequest](docs/UpdateGoalSharingRequest.md) +- [UpdateGoalV1](docs/UpdateGoalV1.md) +- [UpdateGoalV11Request](docs/UpdateGoalV11Request.md) +- [UpdateGoalV11RequestMilestonesInner](docs/UpdateGoalV11RequestMilestonesInner.md) +- [UpdateLocationRequest](docs/UpdateLocationRequest.md) +- [UpdateLocationRequestAddress](docs/UpdateLocationRequestAddress.md) +- [UpdatePayBandsRequest](docs/UpdatePayBandsRequest.md) - [UpdateTrainingCategoryRequest](docs/UpdateTrainingCategoryRequest.md) - [UpdateTrainingTypeRequest](docs/UpdateTrainingTypeRequest.md) - [UpdateTrainingTypeRequestCategory](docs/UpdateTrainingTypeRequestCategory.md) - [UpdateWebhookBadRequestResponse](docs/UpdateWebhookBadRequestResponse.md) +- [UpdatedCompensationBenchmark](docs/UpdatedCompensationBenchmark.md) +- [UpdatedCompensationBenchmarkSavedBenchmark](docs/UpdatedCompensationBenchmarkSavedBenchmark.md) +- [UploadEmployeePhotoRequest1](docs/UploadEmployeePhotoRequest1.md) +- [UserPermissionData](docs/UserPermissionData.md) - [WebHookPostFieldDataObject](docs/WebHookPostFieldDataObject.md) - [WebHookPostFieldPageDataObject](docs/WebHookPostFieldPageDataObject.md) - [WebHookPostFieldResponseObject](docs/WebHookPostFieldResponseObject.md) @@ -755,12 +1504,13 @@ Class | Method | HTTP request | Description - [WebhooksList](docs/WebhooksList.md) - [WebhooksListWebhooksInner](docs/WebhooksListWebhooksInner.md) - [WhosOutEntry](docs/WhosOutEntry.md) -- [XmlDirectoryEmployee](docs/XmlDirectoryEmployee.md) -- [XmlDirectoryEmployeeEmployees](docs/XmlDirectoryEmployeeEmployees.md) -- [XmlDirectoryEmployeeEmployeesEmployeeInner](docs/XmlDirectoryEmployeeEmployeesEmployeeInner.md) -- [XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner](docs/XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner.md) -- [XmlDirectoryEmployeeFieldset](docs/XmlDirectoryEmployeeFieldset.md) -- [XmlDirectoryEmployeeFieldsetFieldInner](docs/XmlDirectoryEmployeeFieldsetFieldInner.md) +- [WhosOutListResponseV1](docs/WhosOutListResponseV1.md) +- [WhosOutListResponseV1Links](docs/WhosOutListResponseV1Links.md) +- [WhosOutListResponseV1LinksNext](docs/WhosOutListResponseV1LinksNext.md) +- [WhosOutListResponseV1LinksPrev](docs/WhosOutListResponseV1LinksPrev.md) +- [WhosOutListResponseV1Meta](docs/WhosOutListResponseV1Meta.md) +- [WhosOutPersonV1](docs/WhosOutPersonV1.md) +- [WhosOutV1](docs/WhosOutV1.md) - [XmlEmployeeFiles](docs/XmlEmployeeFiles.md) - [XmlEmployeeFilesCategoryInner](docs/XmlEmployeeFilesCategoryInner.md) - [XmlEmployeeFilesCategoryInnerFileInner](docs/XmlEmployeeFilesCategoryInnerFileInner.md) diff --git a/bamboohr_sdk/__init__.py b/bamboohr_sdk/__init__.py index 35cd2d9..395f9e9 100644 --- a/bamboohr_sdk/__init__.py +++ b/bamboohr_sdk/__init__.py @@ -3,39 +3,53 @@ # flake8: noqa """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - __version__ = "1.0.0" # Define package exports __all__ = [ "AccountInformationApi", + "AlertsApi", "ApplicantTrackingApi", "BenefitsApi", + "CalendarEventsApi", + "ChangeTrackingApi", + "CompanyApi", "CompanyFilesApi", "CompanyProfileApi", + "CompensationApi", + "CompensationBenchmarkingApi", + "CompensationPlanningApi", + "CustomFieldsApi", "CustomReportsApi", "DatasetsApi", "EmployeeFilesApi", + "EmployeeTablesApi", + "EmployeeVerificationApi", "EmployeesApi", "GoalsApi", + "HolidaysApi", "HoursApi", - "LastChangeInformationApi", + "LocationsApi", "LoginApi", + "MealRestBreaksApi", + "OnboardingApi", + "PayGradesBandsApi", "PhotosApi", "ReportsApi", - "TabularDataApi", + "SchedulingApi", "TimeOffApi", "TimeTrackingApi", + "TotalRewardsApi", "TrainingApi", "WebhooksApi", "ApiResponse", @@ -47,46 +61,73 @@ "ApiKeyError", "ApiAttributeError", "ApiException", + "A05b6d5f564f805d688ff2c1e37c3990Request", + "AddCustomFieldListValueRequest", + "AddCustomFieldListValueResponse", + "AddCustomFieldListValueResponseOneOfInner", + "AddCycleAdminsResponse", + "AddCycleAdminsResponseAddedInner", + "AddCycleAdminsResponseSkippedInner", + "AddTotalRewardsEmployeesRequest", "AdjustTimeOffBalance", "AdjustTimeTrackingRequestSchema", + "AlertConfigurationV1", + "AlertConfigurationWriteV1", + "AlertTemplateListResponseV1", + "AlertTemplateListResponseV1AlertsInner", "AlignmentOptionsResponse", "AlignmentOptionsResponseAlignsWithOptionsInner", "ApplicantStatus", "ApplicationDetails", "ApplicationDetailsApplicant", - "ApplicationDetailsApplicantAddress", - "ApplicationDetailsApplicantEducation", - "ApplicationDetailsApplicantEducationLevel", "ApplicationDetailsAttachmentsInner", "ApplicationDetailsJob", - "ApplicationDetailsJobHiringLead", - "ApplicationDetailsJobHiringLeadJobTitle", "ApplicationDetailsJobTitle", "ApplicationDetailsQuestionsAndAnswersInner", "ApplicationDetailsQuestionsAndAnswersInnerAnswer", "ApplicationDetailsQuestionsAndAnswersInnerQuestion", "ApplicationDetailsStatus", - "ApplicationDetailsStatusChangedByUser", - "ApplicationDetailsStatusChangedByUserJobTitle", "ApplicationsList", "ApplicationsListApplicationsInner", "ApplicationsListApplicationsInnerApplicant", "ApplicationsListApplicationsInnerJob", "ApplicationsListApplicationsInnerJobTitle", "ApplicationsListApplicationsInnerStatus", + "ApproveTimesheetRequest", + "ArchiveCustomFieldResponse", + "ArchivedCustomFieldsListResponse", "AssignEmployeesToBreakPolicyRequest", - "AssignTimeOffPoliciesRequestInner", + "AssignTimeOffPoliciesV1RequestInner", "AssignedTimeOffPolicy", "AssignedTimeOffPolicyV11", "AvailableAction", - "BadRequest", - "BadRequestError", + "BadRequestV1", + "BadRequestV1Error", + "BankHoliday", "BenefitCoveragesResponse", "BenefitCoveragesResponseBenefitCoveragesInner", "BenefitDeductionSubType", "BenefitDeductionType", "BenefitDeductionTypeId", + "BudgetBreakdownImportResponse", + "BudgetGuidelinesView", + "BudgetGuidelinesWarnings", + "C79f9c5950f983e59d2626faa30c00a1Request", + "C7c32ed5278ac67e2e518bf7484a75dcRequest", + "CalendarAnniversaryCalendarEventV1", + "CalendarBirthdayCalendarEventV1", + "CalendarCalendarEventPersonV1", + "CalendarCalendarEventsListResponseV1", + "CalendarCalendarEventsListResponseV1DataInner", + "CalendarCalendarEventsListResponseV1Links", + "CalendarCalendarEventsListResponseV1LinksNext", + "CalendarCalendarEventsListResponseV1LinksPrev", + "CalendarCalendarEventsListResponseV1Meta", + "CalendarHolidayCalendarEventV1", + "CalendarTimeOffCalendarEventV1", "CanCreateGoalsResponse", + "Cf87b8e09a001b6fb81dfce6c20ab9e3Request", + "ChangeCustomFieldListValueRequest", "ChangedEmployeeIdsResponse", "ChangedEmployeeIdsResponseEmployeesValue", "ChangedEmployeeTableDataResponse", @@ -94,10 +135,13 @@ "ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue", "ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner", "ClockEntriesSchema", + "ClockEntryClockEntryLocationInputV1", + "ClockEntryCreateClockEntryV1", "ClockEntryIdsSchema", "ClockEntrySchema", "ClockInRequestSchema", "ClockOutRequestSchema", + "CloseGoalRequest", "CompanyBenefitSummary", "CompanyBenefitsListResponse", "CompanyDeletedWebhookPayload", @@ -105,39 +149,105 @@ "CompanyFilesResponse", "CompanyFilesResponseCategoriesInner", "CompanyFilesResponseCategoriesInnerFilesInner", + "CompanyIndustryDataObject", "CompanyInformation", "CompanyInformationAddress", "CompanyIntegrationsUpdatedWebhookPayload", "CompanyIntegrationsUpdatedWebhookPayloadData", + "CompanyProfileData", + "CompanyProfileDataAddress", "CompanyProfileIntegrations", "CompanyUpdatedWebhookPayload", + "CompensationBenchmarkDetailEmployee", + "CompensationBenchmarkDetailEmployeeJobTitle", + "CompensationBenchmarkDetailEmployeeSalary", + "CompensationBenchmarkDetails", + "CompensationBenchmarkDetailsBenchmarkValuesInner", + "CompensationBenchmarkJobLocationEmployee", + "CompensationBenchmarkJobLocationEmployeeSalary", + "CompensationBenchmarkJobLocationPair", + "CompensationBenchmarkJobLocationPairJobDetails", + "CompensationBenchmarkOverview", + "CompensationBenchmarkOverviewValues", + "CompensationBenchmarkSource", + "CompensationBenchmarkingColumnMap", + "CompensationBenchmarksList", + "CompensationEquitySettingsResponse", + "CompensationEquitySettingsResponseCompanyValuation", + "CompensationEquitySettingsResponseDisclaimers", + "CompensationEquitySettingsResponseOutstandingShares", + "CompensationEquitySettingsResponsePricePerShare", + "CompensationEquitySettingsResponseSliderMin", + "CompensationEquitySettingsResponseVestingConditions", + "CompensationEquitySettingsUpdateRequest", + "CompensationPlanningCycleAdminsResponse", + "CompensationPlanningCycleAdminsResponseAdminsInner", + "CompensationPlanningCycleCompleteResponse", + "CompensationPlanningCycleCompleteResponseErrorsInner", + "CompensationToolsDataObject", + "CompensationToolsResponse", + "CompensationUpsellData", + "CompletedQuestionsAndResponseDataObject", + "ConversionRateDataObject", + "CountriesOptionsResponse", "Country", "CountrySchema", "CreateApplicationCommentRequest", "CreateCandidateResponse", "CreateCommentResponse", + "CreateCompensationBenchmarkRequest", + "CreateCompensationBenchmarkSourceRequest", "CreateEmployeeTrainingRecordRequest", "CreateEmployeeTrainingRecordRequestCost", + "CreateGoalCommentRequest", + "CreateGoalRequest", + "CreateGoalRequestMilestonesInner", "CreateJobOpeningResponse", + "CreateLocationRequest", + "CreateLocationRequestAddress", "CreateTrainingCategoryRequest", "CreateTrainingTypeRequest", "CreateTrainingTypeRequestCategory", - "CreateTrainingTypeRequestDueFromHireDate", - "CreateTrainingTypeRequestDueFromHireDateOneOf", "CreateWebhookBadRequestResponse", + "CreatedCompensationBenchmark", + "CreatedCompensationBenchmarkSavedBenchmark", + "CreatedCompensationBenchmarkSource", + "CreatedTimeOffRequest", + "CreatedTimeOffRequestAmount", + "CreatedTimeOffRequestNotes", + "CreatedTimeOffRequestStatus", + "CreatedTimeOffRequestType", + "CurrencyConversionsResponse", "CursorPagedResponseMetadata", "CursorPagesResponse", - "CursorPaginationQueryObject", + "CustomFieldDefinitionResponseObject", + "CustomFieldDefinitionResponseObjectValuesInner", + "CustomFieldRequest", + "CustomFieldTypeViewObject", + "CustomFieldViewObject", + "CustomFieldsListResponse", + "CustomReportResponse", + "CustomReportResponseFieldsInner", + "Dacd313af2106213fc4696175941ce65Request", "DataRequest", - "DataRequestAggregationsInner", + "DataRequestAggregations", "DataRequestFilters", "DataRequestFiltersFiltersInner", "DataRequestSortByInner", - "Dataset", + "DatasetDataResponseV2", + "DatasetDataResponseV2DataInner", + "DatasetDataResponseV2DataInnerFieldsValue", + "DatasetDataResponseV2Links", + "DatasetDataResponseV2Meta", "DatasetFieldsResponse", - "DatasetResponse", - "DatasetsResponse", - "DatasetsResponseDatasetsInner", + "DatasetResponseV1", + "DatasetV1", + "DatasetsResponseV12", + "DatasetsResponseV12DatasetsInner", + "DeleteCompensationBenchmarkSourceRequest", + "DeleteCompensationBenchmarkSourceResponse", + "DetailsAndCurrencyRequestDataObject", + "Ec1ba8e76f33960b018d0d7518fe97b5Request", "Employee", "EmployeeBenefitFilters", "EmployeeBenefitFiltersFilters", @@ -146,41 +256,70 @@ "EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner", "EmployeeCreatedWebhookPayload", "EmployeeCreatedWebhookPayloadData", + "EmployeeCursorPaginationQueryObject", "EmployeeDeletedWebhookPayload", "EmployeeDeletedWebhookPayloadData", "EmployeeDependent", "EmployeeDependentsResponse", "EmployeeDependentsResponseEmployeeDependentsInner", "EmployeeFileUpdate", + "EmployeeOptionalField", + "EmployeePhotoJsonResponse", "EmployeeResponse", "EmployeeResponseAggregationsInner", + "EmployeeStringCodeErrorResponseV1", + "EmployeeStringCodeErrorResponseV1Error", "EmployeeTableRow", - "EmployeeTableRowValue", - "EmployeeTableRowValueAnyOfInner", "EmployeeTimeOffPolicyAssignment", "EmployeeTimeOffPolicyAssignmentV11", + "EmployeeTimeOffRequestApproverResponseInner", "EmployeeTimesheetEntryTransformer", "EmployeeUpdatedWebhookPayload", "EmployeeUpdatedWebhookPayloadData", "EmployeeValue", "EmployeeValueAnyOfInner", + "EmployeeVerificationIntegration", + "EmployeeVerificationIntegrationResponse", + "EmployeeVerificationLifecycleEmailAcceptedResponse", + "EmployeeVerificationPublicApiRecord", + "EmployeeVerificationUpdateResponse", + "EmployeeVerificationsListResponse", + "EmployeesDirectoryJsonResponse", + "EmployeesDirectoryJsonResponseFieldsInner", + "EmployeesDirectoryXmlResponse", + "EmployeesDirectoryXmlResponseEmployees", + "EmployeesDirectoryXmlResponseEmployeesEmployeeInner", + "EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner", + "EmployeesDirectoryXmlResponseFieldset", + "EmployeesDirectoryXmlResponseFieldsetFieldInner", + "ErrorResponse", + "ErrorResponseError", + "F3883a522dadbe9e11b34f8b656e3adbRequest", "Field1", "Field1Id", - "FieldList", - "FieldListFieldsInner", "FieldOptionsRequestSchema", "FieldOptionsRequestSchemaDependentFieldsValueInner", "FieldOptionsTransformer", - "Forbidden", + "FieldOptionsTransformerId", + "ForbiddenV1", + "ForbiddenV1Error", + "GetBreakPolicySuggestionsRequest", "GetCompanyReportResponse", + "GetCompanyReportResponseEmployeesInner", + "GetDataFromDatasetV2Request", + "GetEmployeeResponse", + "GetEmployeesEmployeeBaseResponse", "GetEmployeesEmployeeResponse", + "GetEmployeesEmployeeResponseAllOfOvertimeRate", + "GetEmployeesEmployeeResponseAllOfPayRate", + "GetEmployeesEmployeeResponseAllOfTeams", "GetEmployeesFilterRequestObject", "GetEmployeesResponseObject", "GetEmployeesResponseObjectLinks", "GetEmployeesResponseObjectLinksNext", "GetEmployeesResponseObjectLinksPrev", "GetEmployeesResponseObjectLinksSelf", - "Goal", + "GlobalHolidayGlobalHolidayV1", "GoalAggregate", "GoalAggregateAlignsWithOptionsInner", "GoalAggregateCommentsInner", @@ -193,6 +332,7 @@ "GoalFiltersV11FiltersInner", "GoalFiltersV11FiltersInnerActions", "GoalFiltersV1FiltersInner", + "GoalResponse", "GoalsAggregateV1", "GoalsAggregateV11", "GoalsAggregateV11CommentsInner", @@ -202,30 +342,64 @@ "GoalsAggregateV1PersonsInner", "GoalsList", "HiringLead", + "HolidayBulkInsertCompanyHolidayErrorV1", + "HolidayBulkInsertCompanyHolidayRecordV1", + "HolidayBulkInsertCompanyHolidaysFailureResponseV1", + "HolidayBulkInsertCompanyHolidaysResponseV1", + "HolidayCatalogHolidayListResponseV1", + "HolidayCatalogHolidayListResponseV1Links", + "HolidayCompanyHolidayAudienceV1", + "HolidayCompanyHolidayListResponseV1", + "HolidayCompanyHolidayListResponseV1Links", + "HolidayCompanyHolidayListResponseV1Meta", + "HolidayCompanyHolidayPayStatusHoursV1", + "HolidayCompanyHolidayV1", + "HolidayCreateCompanyHolidayRequestV1", + "HolidayUpdateCompanyHolidayRequestV1", "HourEntriesRequestSchema", + "HourEntryCreateHourEntryV1", "HourEntryIdsSchema", + "HourEntryPatchHourEntryV1", "HourEntrySchema", - "InvalidRequest", - "InvalidRequestError", + "ImportCompensationBenchmarksResponse", + "Industry", + "InlineObject", + "InlineObject1", + "InlineObject1EmployeesInner", + "InlineObject1Status", + "InlineObject2", + "InlineObject2Inner", "JobSummary", - "JobSummaryDepartment", - "JobSummaryHiringLead", - "JobSummaryLocation", "JobSummaryStatus", - "JsonDirectoryEmployee", - "JsonDirectoryEmployeeFieldsInner", "JsonEmployeeFiles", "JsonEmployeeFilesCategoriesInner", "JsonEmployeeFilesCategoriesInnerFilesInner", "JsonEmployeeFilesEmployee", + "LegacyReportFieldMapResponse", + "LegacyReportFieldMapResponseMappingsInner", + "LegacyReportIDMapResponse", + "LegacyReportIDMapResponseMappingsInner", + "LevelsAndBandsColumnMap", + "LevelsAndBandsGroupStatusCounts", + "LevelsAndBandsJobTitleAssignment", + "LevelsAndBandsJobTitleAssignmentsRequest", + "LevelsAndBandsPayBandValue", + "LevelsAndBandsUploadResponse", "ListFieldDetail", "ListFieldOption", "ListFieldValues", "ListFieldValuesOptionsInner", + "ListFieldValuesXml", + "ListFieldValuesXmlOptionInner", "ListUsersResponseValue", "ListUsersXmlResponse", "ListUsersXmlResponseUserInner", + "ListValueViewObject", "Location", + "LocationResponseObject", + "LocationResponseObjectAddress", + "LocationResponseObjectAddressCountry", + "LocationResponseObjectAddressState", "LoginFailureResponse", "LoginFailureXmlResponse", "LoginResponse", @@ -244,27 +418,110 @@ "MemberBenefitsGetSuccessResponseLinksPrev", "MemberBenefitsGetSuccessResponseMeta", "MemberBenefitsGetValidationErrorResponse", + "MetaCompanyPropertiesResponse", + "MetaCurrencyTypeItem", + "Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest", + "Model1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner", + "Model1d64402ee192568adbd5e3179a91e6e2RequestInner", + "Model1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations", + "Model288aa996aba16d7a495c62321ea999a9Request", + "Model288aa996aba16d7a495c62321ea999a9RequestSentDateTime", + "Model3958585c861325ea7a2cd30a8c74f042Request", + "Model89a5068111ec499135c7d6e9a53d5a30Request", "ModelField", + "MonitorFieldList", + "MonitorFieldListFieldsInner", + "NewHirePacketGtkyAnswerVisibilityItem", + "NewHirePacketGtkyAnswerVisibilityRequest", + "NewHirePacketGtkyAnswerVisibilityResponse", + "NewHirePacketPublicApi", + "NewHirePacketPublicApiWritableBody", + "NewHirePacketsListResponse", + "NewHireWidgetItem", + "NewHireWidgetResponse", "NewWebHook", + "OnboardingExperiencePublicApi", + "OnboardingExperiencesListResponse", + "PagedLocationResponse", "PagedResponse", "Pagination", "PaginationMetaData", + "PatchCompanyProfileCompanyInformationRequest", + "PatchCompanyProfileCompanyInformationRequestAddress", + "PayGradesAndBandsConfigurationStatus", + "PayGradesAndBandsConfigurationStatusJobTitles", + "PayGradesAndBandsConfigurationStatusJobTitlesWarningsInner", + "PayGradesAndBandsConfigurationStatusLevels", + "PayGradesAndBandsConfigurationStatusLevelsErrorsInner", + "PayGradesAndBandsConfigurationStatusPayBands", + "PayGradesAndBandsConfigurationStatusReview", + "PayGradesAndBandsDeleteGroupsResponse", + "PayGradesAndBandsDeleteHierarchyGroup", + "PayGradesAndBandsDeleteHierarchyJobTitle", + "PayGradesAndBandsDeleteHierarchyLevel", + "PayGradesAndBandsDeleteLevelResponse", + "PayGradesAndBandsDeleteResponse", + "PayGradesAndBandsJobTitleAssignmentsGroup", + "PayGradesAndBandsJobTitleAssignmentsJobTitle", + "PayGradesAndBandsJobTitleAssignmentsLevel", + "PayGradesAndBandsJobTitleAssignmentsResponse", + "PayGradesAndBandsJobTitleEmployee", + "PayGradesAndBandsJobTitleWithEmployees", + "PayGradesAndBandsLevel", + "PayGradesAndBandsLevelJobTitle", + "PayGradesAndBandsLevelsGroup", + "PayGradesAndBandsLevelsResponse", + "PayGradesAndBandsPayBandJobTitle", + "PayGradesAndBandsPayBandLevel", + "PayGradesAndBandsPayBandsGroup", + "PayGradesAndBandsPayBandsResponse", + "PayGradesAndBandsPublishResponse", + "PayGradesAndBandsPublishedGroup", + "PayGradesAndBandsPublishedJobTitle", + "PayGradesAndBandsPublishedLevel", + "PayGradesAndBandsPublishedResponse", + "PayGradesAndBandsReviewGroup", + "PayGradesAndBandsReviewJobTitle", + "PayGradesAndBandsReviewLevel", + "PayGradesAndBandsReviewResponse", + "PayGradesAndBandsSaveLevelsResponse", + "PayGradesAndBandsUpdateJobTitlesResponse", + "PayGradesAndBandsUpdateLevel", + "PayGradesAndBandsUpdateLevelsGroup", + "PayGradesAndBandsUpdateLevelsRequest", + "PayGradesAndBandsUpdatePayBandItem", + "PayGradesAndBandsUpdatePayBandsResponse", "PersonInfoApiTransformer", - "PostGoalCommentRequest", - "PostGoalRequest", - "PostGoalRequestMilestonesInner", "PostNewEmployee", "ProblemDetailsResponse", + "ProblemDetailsResponseV2", "ProjectCreateRequestSchema", + "ProjectCreateTimeTrackingProjectTaskV1", + "ProjectCreateTimeTrackingProjectV1", + "ProjectCreateTimeTrackingProjectV1TasksInner", "ProjectInfoApiTransformer", "ProjectInfoApiTransformerProject", - "ProjectInfoApiTransformerTask", - "PutGoalCommentRequest", - "PutGoalMilestoneProgressRequest", - "PutGoalProgressRequest", - "PutGoalSharedWithRequest", - "PutGoalV11Request", - "PutGoalV11RequestMilestonesInner", + "ProjectLegacyErrorResponseV1", + "ProjectLegacyErrorResponseV1Error", + "ProjectPaginatedResponseDataV1", + "ProjectPaginatedResponseDataV1Meta", + "ProjectPaginatedTasksResponseV1", + "ProjectPaginatedTasksResponseV1Links", + "ProjectPaginatedTasksResponseV1Meta", + "ProjectPaginatedTimeTrackingProjectsResponseV1", + "ProjectStandardApiErrorResponseV1", + "ProjectTimeTrackingProjectV1", + "ProjectTimeTrackingTaskV1", + "ProjectUpdateTimeTrackingProjectTaskV1", + "ProjectUpdateTimeTrackingProjectV1", + "ProvinceItem", + "PublicCustomFieldTypesResponse", + "PublicListValuesCustomFieldSettingsResponse", + "PublicListValuesCustomFieldSettingsResponseValuesInner", + "PutCompanyIndustryCodesRequest", + "PutCompanyProfileDisplayNameRequest", + "RemoveCycleAdminSelfResponse", + "RemoveTotalRewardsEmployeesRequest", "Report", "ReportsResponse", "Request", @@ -274,8 +531,46 @@ "RequestCustomReportResponse", "RequestCustomReportResponseEmployeesInner", "RequestCustomReportResponseFieldsInner", + "SaveChangeCommTemplateResponse", + "SchedulingCreateScheduleRequestV1", + "SchedulingCreateSchedulingShiftRequestV1", + "SchedulingPublishShiftsFailureV1", + "SchedulingPublishShiftsRequest", + "SchedulingPublishShiftsResultV1", + "SchedulingScheduleListResponseV1", + "SchedulingScheduleListResponseV1Links", + "SchedulingScheduleListResponseV1Meta", + "SchedulingScheduleV1", + "SchedulingSchedulingShiftAssessmentV1", + "SchedulingSchedulingShiftAssessmentViolationV1", + "SchedulingSchedulingShiftV1", + "SchedulingShiftAssessmentListResponseV1", + "SchedulingShiftAssessmentListResponseV1Meta", + "SchedulingShiftListResponseV1", + "SchedulingShiftListResponseV1Links", + "SchedulingShiftListResponseV1LinksNext", + "SchedulingShiftListResponseV1LinksPrev", + "SchedulingShiftListResponseV1Meta", + "SchedulingTimezoneListResponseV1", + "SchedulingTimezoneListResponseV1Meta", + "SchedulingTimezoneV1", + "SchedulingUpdateScheduleRequestV1", + "SchedulingUpdateSchedulingShiftRequestV1", + "SendEmployeeVerificationLifecycleEmailByUserRequest", + "SendRecommendationsResponse", "SetBreakPolicyEmployeesRequest", + "SetTotalRewardsCustomDisclaimerRequest", + "SetTotalRewardsOnboardingStepRequest", "ShareOptionsResponse", + "ShiftDifferentialCreateTimeTrackingShiftDifferentialV1", + "ShiftDifferentialCreateTimeTrackingShiftDifferentialV1TimesInner", + "ShiftDifferentialPaginatedResponseDataV1", + "ShiftDifferentialPaginatedResponseDataV1Meta", + "ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1", + "ShiftDifferentialTimeTrackingShiftDifferentialTimeV1", + "ShiftDifferentialTimeTrackingShiftDifferentialV1", + "ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1", + "StandardApiErrorResponse", "State", "StateProvinceResponseSchema", "StateProvinceSchema", @@ -300,28 +595,53 @@ "TimeOffTypesAndDefaultHoursDefaultHoursInner", "TimeOffTypesAndDefaultHoursTimeOffTypesInner", "TimeTrackingBreakPolicyEmployeeCollectionV1Inner", + "TimeTrackingBreakPolicySuggestionsResponseV1", + "TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner", + "TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner", "TimeTrackingBulkResponseSchema", "TimeTrackingBulkResponseSchemaResponse", + "TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1", + "TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1", + "TimeTrackingClockEntryLocationV1", + "TimeTrackingClockEntryPaginatedResponseDataV1", + "TimeTrackingClockEntryPaginatedResponseDataV1Meta", + "TimeTrackingClockEntryV1", + "TimeTrackingConfigurationPaginatedResponseDataV1", + "TimeTrackingConfigurationPaginatedResponseDataV1Links", + "TimeTrackingConfigurationPaginatedResponseDataV1LinksNext", + "TimeTrackingConfigurationPaginatedResponseDataV1LinksPrev", + "TimeTrackingConfigurationPaginatedResponseDataV1Meta", + "TimeTrackingCreateClockInV1", + "TimeTrackingCreateClockOutV1", "TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1", "TimeTrackingCreateTimeTrackingBreakPolicyV1", "TimeTrackingCreateTimeTrackingBreakV1", + "TimeTrackingCreateTimeTrackingConfigurationV1", "TimeTrackingDeleteResponseSchema", + "TimeTrackingEmployeeEnrollmentPaginatedResponseDataV1", + "TimeTrackingEmployeeTimeTrackingDataV1", + "TimeTrackingHourEntryPaginatedResponseDataV1", + "TimeTrackingHourEntryV1", "TimeTrackingIdResponseSchema", "TimeTrackingOffsetPaginatedResponseDataV1", "TimeTrackingOffsetPaginatedResponseDataV1Links", - "TimeTrackingOffsetPaginatedResponseDataV1LinksNext", - "TimeTrackingOffsetPaginatedResponseDataV1LinksPrev", "TimeTrackingOffsetPaginatedResponseDataV1Meta", + "TimeTrackingPagePaginatedResponseDataV1", "TimeTrackingPaginatedBreakAssessmentsResponseV1", "TimeTrackingPaginatedBreakPoliciesResponseV1", "TimeTrackingPaginatedBreakPolicyEmployeesResponseV1", "TimeTrackingPaginatedBreaksResponseV1", + "TimeTrackingPaginatedClockEntriesResponseV1", + "TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1", + "TimeTrackingPaginatedHourEntriesResponseV1", + "TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1", + "TimeTrackingPaginatedTimeTrackingKiosksResponseV1", + "TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1", + "TimeTrackingPaginatedTimesheetsResponseV1", + "TimeTrackingPaginatedTimesheetsResponseV1Meta", "TimeTrackingProjectWithTasksAndEmployeeIds", "TimeTrackingRecord", "TimeTrackingRecordSchema", - "TimeTrackingRecordSchemaProject", - "TimeTrackingRecordSchemaProjectTask", - "TimeTrackingRecordSchemaShiftDifferential", "TimeTrackingSyncTimeTrackingBreakPolicyV1", "TimeTrackingTask", "TimeTrackingTimeTrackingBreakAssessmentV1", @@ -330,33 +650,94 @@ "TimeTrackingTimeTrackingBreakPolicyV1", "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", "TimeTrackingTimeTrackingBreakV1", + "TimeTrackingTimeTrackingConfigurationV1", + "TimeTrackingTimeTrackingHourEntryV1", + "TimeTrackingTimeTrackingKioskV1", + "TimeTrackingTimeTrackingTimeClockV1", + "TimeTrackingTimesheetV1", + "TimeTrackingUpdateClockEntryV1", + "TimeTrackingUpdateEmployeeTimeTrackingDataV1", "TimeTrackingUpdateTimeTrackingBreakPolicyV1", "TimeTrackingUpdateTimeTrackingBreakV1", + "TimeTrackingUpdateTimeTrackingConfigurationV1", + "TimeTrackingUpdateTimeTrackingKioskV1", + "TimeTrackingUpdateTimeTrackingTimeClockV1", "TimesheetEntryInfoApiTransformer", - "TimesheetEntryInfoApiTransformerBreakInfo", + "TimesheetTimesheetDailyEntryV1", + "TimesheetTimesheetDailySummaryV1", "TimezoneListResponse", "TimezoneResource", + "TotalRewardsBenefitDetailsValues", + "TotalRewardsBenefitSectionValues", + "TotalRewardsCalendarSectionValues", + "TotalRewardsCompSummaryValues", + "TotalRewardsCustomDisclaimerInfo", + "TotalRewardsEmployeeStatement", + "TotalRewardsEquityDetailsValues", + "TotalRewardsEquityEstimatedValuationValues", + "TotalRewardsEquityGrowthChartItem", + "TotalRewardsEquityGrowthEstimation", + "TotalRewardsEquitySectionValues", + "TotalRewardsExtraPayDetailsValues", + "TotalRewardsExtraPaySectionValues", + "TotalRewardsHolidayValue", + "TotalRewardsOnboardingStep", + "TotalRewardsOverviewSectionValues", + "TotalRewardsTimeOffPolicyValue", + "TotalRewardsTimelineItem", + "TotalRewardsTimelineItemLabel", + "TotalRewardsTimelineSectionValues", "TrainingCategory", "TrainingRecord", "TrainingRecordMap", "TrainingRecordType", "TrainingType", "TrainingTypeCategory", - "TrainingTypeDueFromHireDate", - "TrainingTypeDueFromHireDateOneOf", "TransformedApiEmployeeGoalDetails", "TransformedApiEmployeeGoalDetailsGoal", "TransformedApiGoal", - "TransformedApiGoalActions", "TransformedApiGoalMilestonesInner", + "UnarchiveCustomFieldsRequest", + "UnarchiveCustomFieldsResponse", "UnassignEmployeesFromBreakPolicyRequest", "UpdateApplicantStatusRequest", "UpdateApplicantStatusResponse", + "UpdateCompanyIndustryCodes400Response", + "UpdateCompanyIndustryCodes403Response", + "UpdateCompanyIndustryCodes404Response", + "UpdateCompanyIndustryCodes500Response", + "UpdateCompanyIndustryCodesResponse", + "UpdateCompanyNameBadRequestResponse", + "UpdateCompanyNameBadRequestResponseError", + "UpdateCompanyNameForbiddenResponse", + "UpdateCompanyNameForbiddenResponseError", + "UpdateCompanyNameInternalErrorResponse", + "UpdateCompanyNameSuccessResponse", + "UpdateCompensationBenchmarkRequest", + "UpdateCompensationBenchmarkSourceItem", + "UpdateCompensationBenchmarkSourcesRequest", + "UpdateCompensationBenchmarkSourcesResponse", "UpdateEmployeeTrainingRecordRequest", + "UpdateEmployeeVerificationIntegrationRequest", + "UpdateEmployeeVerificationRequest", + "UpdateGoalCommentRequest", + "UpdateGoalMilestoneProgressRequest", + "UpdateGoalProgressRequest", + "UpdateGoalSharingRequest", + "UpdateGoalV1", + "UpdateGoalV11Request", + "UpdateGoalV11RequestMilestonesInner", + "UpdateLocationRequest", + "UpdateLocationRequestAddress", + "UpdatePayBandsRequest", "UpdateTrainingCategoryRequest", "UpdateTrainingTypeRequest", "UpdateTrainingTypeRequestCategory", "UpdateWebhookBadRequestResponse", + "UpdatedCompensationBenchmark", + "UpdatedCompensationBenchmarkSavedBenchmark", + "UploadEmployeePhotoRequest1", + "UserPermissionData", "WebHookPostFieldDataObject", "WebHookPostFieldPageDataObject", "WebHookPostFieldResponseObject", @@ -380,12 +761,13 @@ "WebhooksList", "WebhooksListWebhooksInner", "WhosOutEntry", - "XmlDirectoryEmployee", - "XmlDirectoryEmployeeEmployees", - "XmlDirectoryEmployeeEmployeesEmployeeInner", - "XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner", - "XmlDirectoryEmployeeFieldset", - "XmlDirectoryEmployeeFieldsetFieldInner", + "WhosOutListResponseV1", + "WhosOutListResponseV1Links", + "WhosOutListResponseV1LinksNext", + "WhosOutListResponseV1LinksPrev", + "WhosOutListResponseV1Meta", + "WhosOutPersonV1", + "WhosOutV1", "XmlEmployeeFiles", "XmlEmployeeFilesCategoryInner", "XmlEmployeeFilesCategoryInnerFileInner", @@ -393,23 +775,38 @@ # import apis into sdk package from bamboohr_sdk.api.account_information_api import AccountInformationApi as AccountInformationApi +from bamboohr_sdk.api.alerts_api import AlertsApi as AlertsApi from bamboohr_sdk.api.applicant_tracking_api import ApplicantTrackingApi as ApplicantTrackingApi from bamboohr_sdk.api.benefits_api import BenefitsApi as BenefitsApi +from bamboohr_sdk.api.calendar_events_api import CalendarEventsApi as CalendarEventsApi +from bamboohr_sdk.api.change_tracking_api import ChangeTrackingApi as ChangeTrackingApi +from bamboohr_sdk.api.company_api import CompanyApi as CompanyApi from bamboohr_sdk.api.company_files_api import CompanyFilesApi as CompanyFilesApi from bamboohr_sdk.api.company_profile_api import CompanyProfileApi as CompanyProfileApi +from bamboohr_sdk.api.compensation_api import CompensationApi as CompensationApi +from bamboohr_sdk.api.compensation_benchmarking_api import CompensationBenchmarkingApi as CompensationBenchmarkingApi +from bamboohr_sdk.api.compensation_planning_api import CompensationPlanningApi as CompensationPlanningApi +from bamboohr_sdk.api.custom_fields_api import CustomFieldsApi as CustomFieldsApi from bamboohr_sdk.api.custom_reports_api import CustomReportsApi as CustomReportsApi from bamboohr_sdk.api.datasets_api import DatasetsApi as DatasetsApi from bamboohr_sdk.api.employee_files_api import EmployeeFilesApi as EmployeeFilesApi +from bamboohr_sdk.api.employee_tables_api import EmployeeTablesApi as EmployeeTablesApi +from bamboohr_sdk.api.employee_verification_api import EmployeeVerificationApi as EmployeeVerificationApi from bamboohr_sdk.api.employees_api import EmployeesApi as EmployeesApi from bamboohr_sdk.api.goals_api import GoalsApi as GoalsApi +from bamboohr_sdk.api.holidays_api import HolidaysApi as HolidaysApi from bamboohr_sdk.api.hours_api import HoursApi as HoursApi -from bamboohr_sdk.api.last_change_information_api import LastChangeInformationApi as LastChangeInformationApi +from bamboohr_sdk.api.locations_api import LocationsApi as LocationsApi from bamboohr_sdk.api.login_api import LoginApi as LoginApi +from bamboohr_sdk.api.meal_rest_breaks_api import MealRestBreaksApi as MealRestBreaksApi +from bamboohr_sdk.api.onboarding_api import OnboardingApi as OnboardingApi +from bamboohr_sdk.api.pay_grades_bands_api import PayGradesBandsApi as PayGradesBandsApi from bamboohr_sdk.api.photos_api import PhotosApi as PhotosApi from bamboohr_sdk.api.reports_api import ReportsApi as ReportsApi -from bamboohr_sdk.api.tabular_data_api import TabularDataApi as TabularDataApi +from bamboohr_sdk.api.scheduling_api import SchedulingApi as SchedulingApi from bamboohr_sdk.api.time_off_api import TimeOffApi as TimeOffApi from bamboohr_sdk.api.time_tracking_api import TimeTrackingApi as TimeTrackingApi +from bamboohr_sdk.api.total_rewards_api import TotalRewardsApi as TotalRewardsApi from bamboohr_sdk.api.training_api import TrainingApi as TrainingApi from bamboohr_sdk.api.webhooks_api import WebhooksApi as WebhooksApi @@ -425,237 +822,1178 @@ from bamboohr_sdk.exceptions import ApiException as ApiException # import models into sdk package +from bamboohr_sdk.models.a05b6d5f564f805d688ff2c1e37c3990_request import ( + A05b6d5f564f805d688ff2c1e37c3990Request as A05b6d5f564f805d688ff2c1e37c3990Request, +) +from bamboohr_sdk.models.add_custom_field_list_value_request import ( + AddCustomFieldListValueRequest as AddCustomFieldListValueRequest, +) +from bamboohr_sdk.models.add_custom_field_list_value_response import ( + AddCustomFieldListValueResponse as AddCustomFieldListValueResponse, +) +from bamboohr_sdk.models.add_custom_field_list_value_response_one_of_inner import ( + AddCustomFieldListValueResponseOneOfInner as AddCustomFieldListValueResponseOneOfInner, +) +from bamboohr_sdk.models.add_cycle_admins_response import AddCycleAdminsResponse as AddCycleAdminsResponse +from bamboohr_sdk.models.add_cycle_admins_response_added_inner import ( + AddCycleAdminsResponseAddedInner as AddCycleAdminsResponseAddedInner, +) +from bamboohr_sdk.models.add_cycle_admins_response_skipped_inner import ( + AddCycleAdminsResponseSkippedInner as AddCycleAdminsResponseSkippedInner, +) +from bamboohr_sdk.models.add_total_rewards_employees_request import ( + AddTotalRewardsEmployeesRequest as AddTotalRewardsEmployeesRequest, +) from bamboohr_sdk.models.adjust_time_off_balance import AdjustTimeOffBalance as AdjustTimeOffBalance -from bamboohr_sdk.models.adjust_time_tracking_request_schema import AdjustTimeTrackingRequestSchema as AdjustTimeTrackingRequestSchema +from bamboohr_sdk.models.adjust_time_tracking_request_schema import ( + AdjustTimeTrackingRequestSchema as AdjustTimeTrackingRequestSchema, +) +from bamboohr_sdk.models.alert_configuration_v1 import AlertConfigurationV1 as AlertConfigurationV1 +from bamboohr_sdk.models.alert_configuration_write_v1 import AlertConfigurationWriteV1 as AlertConfigurationWriteV1 +from bamboohr_sdk.models.alert_template_list_response_v1 import ( + AlertTemplateListResponseV1 as AlertTemplateListResponseV1, +) +from bamboohr_sdk.models.alert_template_list_response_v1_alerts_inner import ( + AlertTemplateListResponseV1AlertsInner as AlertTemplateListResponseV1AlertsInner, +) from bamboohr_sdk.models.alignment_options_response import AlignmentOptionsResponse as AlignmentOptionsResponse -from bamboohr_sdk.models.alignment_options_response_aligns_with_options_inner import AlignmentOptionsResponseAlignsWithOptionsInner as AlignmentOptionsResponseAlignsWithOptionsInner +from bamboohr_sdk.models.alignment_options_response_aligns_with_options_inner import ( + AlignmentOptionsResponseAlignsWithOptionsInner as AlignmentOptionsResponseAlignsWithOptionsInner, +) from bamboohr_sdk.models.applicant_status import ApplicantStatus as ApplicantStatus from bamboohr_sdk.models.application_details import ApplicationDetails as ApplicationDetails from bamboohr_sdk.models.application_details_applicant import ApplicationDetailsApplicant as ApplicationDetailsApplicant -from bamboohr_sdk.models.application_details_applicant_address import ApplicationDetailsApplicantAddress as ApplicationDetailsApplicantAddress -from bamboohr_sdk.models.application_details_applicant_education import ApplicationDetailsApplicantEducation as ApplicationDetailsApplicantEducation -from bamboohr_sdk.models.application_details_applicant_education_level import ApplicationDetailsApplicantEducationLevel as ApplicationDetailsApplicantEducationLevel -from bamboohr_sdk.models.application_details_attachments_inner import ApplicationDetailsAttachmentsInner as ApplicationDetailsAttachmentsInner +from bamboohr_sdk.models.application_details_attachments_inner import ( + ApplicationDetailsAttachmentsInner as ApplicationDetailsAttachmentsInner, +) from bamboohr_sdk.models.application_details_job import ApplicationDetailsJob as ApplicationDetailsJob -from bamboohr_sdk.models.application_details_job_hiring_lead import ApplicationDetailsJobHiringLead as ApplicationDetailsJobHiringLead -from bamboohr_sdk.models.application_details_job_hiring_lead_job_title import ApplicationDetailsJobHiringLeadJobTitle as ApplicationDetailsJobHiringLeadJobTitle from bamboohr_sdk.models.application_details_job_title import ApplicationDetailsJobTitle as ApplicationDetailsJobTitle -from bamboohr_sdk.models.application_details_questions_and_answers_inner import ApplicationDetailsQuestionsAndAnswersInner as ApplicationDetailsQuestionsAndAnswersInner -from bamboohr_sdk.models.application_details_questions_and_answers_inner_answer import ApplicationDetailsQuestionsAndAnswersInnerAnswer as ApplicationDetailsQuestionsAndAnswersInnerAnswer -from bamboohr_sdk.models.application_details_questions_and_answers_inner_question import ApplicationDetailsQuestionsAndAnswersInnerQuestion as ApplicationDetailsQuestionsAndAnswersInnerQuestion +from bamboohr_sdk.models.application_details_questions_and_answers_inner import ( + ApplicationDetailsQuestionsAndAnswersInner as ApplicationDetailsQuestionsAndAnswersInner, +) +from bamboohr_sdk.models.application_details_questions_and_answers_inner_answer import ( + ApplicationDetailsQuestionsAndAnswersInnerAnswer as ApplicationDetailsQuestionsAndAnswersInnerAnswer, +) +from bamboohr_sdk.models.application_details_questions_and_answers_inner_question import ( + ApplicationDetailsQuestionsAndAnswersInnerQuestion as ApplicationDetailsQuestionsAndAnswersInnerQuestion, +) from bamboohr_sdk.models.application_details_status import ApplicationDetailsStatus as ApplicationDetailsStatus -from bamboohr_sdk.models.application_details_status_changed_by_user import ApplicationDetailsStatusChangedByUser as ApplicationDetailsStatusChangedByUser -from bamboohr_sdk.models.application_details_status_changed_by_user_job_title import ApplicationDetailsStatusChangedByUserJobTitle as ApplicationDetailsStatusChangedByUserJobTitle from bamboohr_sdk.models.applications_list import ApplicationsList as ApplicationsList -from bamboohr_sdk.models.applications_list_applications_inner import ApplicationsListApplicationsInner as ApplicationsListApplicationsInner -from bamboohr_sdk.models.applications_list_applications_inner_applicant import ApplicationsListApplicationsInnerApplicant as ApplicationsListApplicationsInnerApplicant -from bamboohr_sdk.models.applications_list_applications_inner_job import ApplicationsListApplicationsInnerJob as ApplicationsListApplicationsInnerJob -from bamboohr_sdk.models.applications_list_applications_inner_job_title import ApplicationsListApplicationsInnerJobTitle as ApplicationsListApplicationsInnerJobTitle -from bamboohr_sdk.models.applications_list_applications_inner_status import ApplicationsListApplicationsInnerStatus as ApplicationsListApplicationsInnerStatus -from bamboohr_sdk.models.assign_employees_to_break_policy_request import AssignEmployeesToBreakPolicyRequest as AssignEmployeesToBreakPolicyRequest -from bamboohr_sdk.models.assign_time_off_policies_request_inner import AssignTimeOffPoliciesRequestInner as AssignTimeOffPoliciesRequestInner +from bamboohr_sdk.models.applications_list_applications_inner import ( + ApplicationsListApplicationsInner as ApplicationsListApplicationsInner, +) +from bamboohr_sdk.models.applications_list_applications_inner_applicant import ( + ApplicationsListApplicationsInnerApplicant as ApplicationsListApplicationsInnerApplicant, +) +from bamboohr_sdk.models.applications_list_applications_inner_job import ( + ApplicationsListApplicationsInnerJob as ApplicationsListApplicationsInnerJob, +) +from bamboohr_sdk.models.applications_list_applications_inner_job_title import ( + ApplicationsListApplicationsInnerJobTitle as ApplicationsListApplicationsInnerJobTitle, +) +from bamboohr_sdk.models.applications_list_applications_inner_status import ( + ApplicationsListApplicationsInnerStatus as ApplicationsListApplicationsInnerStatus, +) +from bamboohr_sdk.models.approve_timesheet_request import ApproveTimesheetRequest as ApproveTimesheetRequest +from bamboohr_sdk.models.archive_custom_field_response import ArchiveCustomFieldResponse as ArchiveCustomFieldResponse +from bamboohr_sdk.models.archived_custom_fields_list_response import ( + ArchivedCustomFieldsListResponse as ArchivedCustomFieldsListResponse, +) +from bamboohr_sdk.models.assign_employees_to_break_policy_request import ( + AssignEmployeesToBreakPolicyRequest as AssignEmployeesToBreakPolicyRequest, +) +from bamboohr_sdk.models.assign_time_off_policies_v1_request_inner import ( + AssignTimeOffPoliciesV1RequestInner as AssignTimeOffPoliciesV1RequestInner, +) from bamboohr_sdk.models.assigned_time_off_policy import AssignedTimeOffPolicy as AssignedTimeOffPolicy from bamboohr_sdk.models.assigned_time_off_policy_v11 import AssignedTimeOffPolicyV11 as AssignedTimeOffPolicyV11 from bamboohr_sdk.models.available_action import AvailableAction as AvailableAction -from bamboohr_sdk.models.bad_request import BadRequest as BadRequest -from bamboohr_sdk.models.bad_request_error import BadRequestError as BadRequestError +from bamboohr_sdk.models.bad_request_v1 import BadRequestV1 as BadRequestV1 +from bamboohr_sdk.models.bad_request_v1_error import BadRequestV1Error as BadRequestV1Error +from bamboohr_sdk.models.bank_holiday import BankHoliday as BankHoliday from bamboohr_sdk.models.benefit_coverages_response import BenefitCoveragesResponse as BenefitCoveragesResponse -from bamboohr_sdk.models.benefit_coverages_response_benefit_coverages_inner import BenefitCoveragesResponseBenefitCoveragesInner as BenefitCoveragesResponseBenefitCoveragesInner +from bamboohr_sdk.models.benefit_coverages_response_benefit_coverages_inner import ( + BenefitCoveragesResponseBenefitCoveragesInner as BenefitCoveragesResponseBenefitCoveragesInner, +) from bamboohr_sdk.models.benefit_deduction_sub_type import BenefitDeductionSubType as BenefitDeductionSubType from bamboohr_sdk.models.benefit_deduction_type import BenefitDeductionType as BenefitDeductionType from bamboohr_sdk.models.benefit_deduction_type_id import BenefitDeductionTypeId as BenefitDeductionTypeId +from bamboohr_sdk.models.budget_breakdown_import_response import ( + BudgetBreakdownImportResponse as BudgetBreakdownImportResponse, +) +from bamboohr_sdk.models.budget_guidelines_view import BudgetGuidelinesView as BudgetGuidelinesView +from bamboohr_sdk.models.budget_guidelines_warnings import BudgetGuidelinesWarnings as BudgetGuidelinesWarnings +from bamboohr_sdk.models.c79f9c5950f983e59d2626faa30c00a1_request import ( + C79f9c5950f983e59d2626faa30c00a1Request as C79f9c5950f983e59d2626faa30c00a1Request, +) +from bamboohr_sdk.models.c7c32ed5278ac67e2e518bf7484a75dc_request import ( + C7c32ed5278ac67e2e518bf7484a75dcRequest as C7c32ed5278ac67e2e518bf7484a75dcRequest, +) +from bamboohr_sdk.models.calendar_anniversary_calendar_event_v1 import ( + CalendarAnniversaryCalendarEventV1 as CalendarAnniversaryCalendarEventV1, +) +from bamboohr_sdk.models.calendar_birthday_calendar_event_v1 import ( + CalendarBirthdayCalendarEventV1 as CalendarBirthdayCalendarEventV1, +) +from bamboohr_sdk.models.calendar_calendar_event_person_v1 import ( + CalendarCalendarEventPersonV1 as CalendarCalendarEventPersonV1, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1 import ( + CalendarCalendarEventsListResponseV1 as CalendarCalendarEventsListResponseV1, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_data_inner import ( + CalendarCalendarEventsListResponseV1DataInner as CalendarCalendarEventsListResponseV1DataInner, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_links import ( + CalendarCalendarEventsListResponseV1Links as CalendarCalendarEventsListResponseV1Links, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_links_next import ( + CalendarCalendarEventsListResponseV1LinksNext as CalendarCalendarEventsListResponseV1LinksNext, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_links_prev import ( + CalendarCalendarEventsListResponseV1LinksPrev as CalendarCalendarEventsListResponseV1LinksPrev, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_meta import ( + CalendarCalendarEventsListResponseV1Meta as CalendarCalendarEventsListResponseV1Meta, +) +from bamboohr_sdk.models.calendar_holiday_calendar_event_v1 import ( + CalendarHolidayCalendarEventV1 as CalendarHolidayCalendarEventV1, +) +from bamboohr_sdk.models.calendar_time_off_calendar_event_v1 import ( + CalendarTimeOffCalendarEventV1 as CalendarTimeOffCalendarEventV1, +) from bamboohr_sdk.models.can_create_goals_response import CanCreateGoalsResponse as CanCreateGoalsResponse +from bamboohr_sdk.models.cf87b8e09a001b6fb81dfce6c20ab9e3_request import ( + Cf87b8e09a001b6fb81dfce6c20ab9e3Request as Cf87b8e09a001b6fb81dfce6c20ab9e3Request, +) +from bamboohr_sdk.models.change_custom_field_list_value_request import ( + ChangeCustomFieldListValueRequest as ChangeCustomFieldListValueRequest, +) from bamboohr_sdk.models.changed_employee_ids_response import ChangedEmployeeIdsResponse as ChangedEmployeeIdsResponse -from bamboohr_sdk.models.changed_employee_ids_response_employees_value import ChangedEmployeeIdsResponseEmployeesValue as ChangedEmployeeIdsResponseEmployeesValue -from bamboohr_sdk.models.changed_employee_table_data_response import ChangedEmployeeTableDataResponse as ChangedEmployeeTableDataResponse -from bamboohr_sdk.models.changed_employee_table_data_response_employees_value import ChangedEmployeeTableDataResponseEmployeesValue as ChangedEmployeeTableDataResponseEmployeesValue -from bamboohr_sdk.models.changed_employee_table_data_response_employees_value_rows_inner_value import ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue as ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue -from bamboohr_sdk.models.changed_employee_table_data_response_employees_value_rows_inner_value_any_of_inner import ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner as ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner +from bamboohr_sdk.models.changed_employee_ids_response_employees_value import ( + ChangedEmployeeIdsResponseEmployeesValue as ChangedEmployeeIdsResponseEmployeesValue, +) +from bamboohr_sdk.models.changed_employee_table_data_response import ( + ChangedEmployeeTableDataResponse as ChangedEmployeeTableDataResponse, +) +from bamboohr_sdk.models.changed_employee_table_data_response_employees_value import ( + ChangedEmployeeTableDataResponseEmployeesValue as ChangedEmployeeTableDataResponseEmployeesValue, +) +from bamboohr_sdk.models.changed_employee_table_data_response_employees_value_rows_inner_value import ( + ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue as ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue, +) +from bamboohr_sdk.models.changed_employee_table_data_response_employees_value_rows_inner_value_any_of_inner import ( + ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner as ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner, +) from bamboohr_sdk.models.clock_entries_schema import ClockEntriesSchema as ClockEntriesSchema +from bamboohr_sdk.models.clock_entry_clock_entry_location_input_v1 import ( + ClockEntryClockEntryLocationInputV1 as ClockEntryClockEntryLocationInputV1, +) +from bamboohr_sdk.models.clock_entry_create_clock_entry_v1 import ( + ClockEntryCreateClockEntryV1 as ClockEntryCreateClockEntryV1, +) from bamboohr_sdk.models.clock_entry_ids_schema import ClockEntryIdsSchema as ClockEntryIdsSchema from bamboohr_sdk.models.clock_entry_schema import ClockEntrySchema as ClockEntrySchema from bamboohr_sdk.models.clock_in_request_schema import ClockInRequestSchema as ClockInRequestSchema from bamboohr_sdk.models.clock_out_request_schema import ClockOutRequestSchema as ClockOutRequestSchema +from bamboohr_sdk.models.close_goal_request import CloseGoalRequest as CloseGoalRequest from bamboohr_sdk.models.company_benefit_summary import CompanyBenefitSummary as CompanyBenefitSummary -from bamboohr_sdk.models.company_benefits_list_response import CompanyBenefitsListResponse as CompanyBenefitsListResponse -from bamboohr_sdk.models.company_deleted_webhook_payload import CompanyDeletedWebhookPayload as CompanyDeletedWebhookPayload +from bamboohr_sdk.models.company_benefits_list_response import ( + CompanyBenefitsListResponse as CompanyBenefitsListResponse, +) +from bamboohr_sdk.models.company_deleted_webhook_payload import ( + CompanyDeletedWebhookPayload as CompanyDeletedWebhookPayload, +) from bamboohr_sdk.models.company_file_update import CompanyFileUpdate as CompanyFileUpdate from bamboohr_sdk.models.company_files_response import CompanyFilesResponse as CompanyFilesResponse -from bamboohr_sdk.models.company_files_response_categories_inner import CompanyFilesResponseCategoriesInner as CompanyFilesResponseCategoriesInner -from bamboohr_sdk.models.company_files_response_categories_inner_files_inner import CompanyFilesResponseCategoriesInnerFilesInner as CompanyFilesResponseCategoriesInnerFilesInner +from bamboohr_sdk.models.company_files_response_categories_inner import ( + CompanyFilesResponseCategoriesInner as CompanyFilesResponseCategoriesInner, +) +from bamboohr_sdk.models.company_files_response_categories_inner_files_inner import ( + CompanyFilesResponseCategoriesInnerFilesInner as CompanyFilesResponseCategoriesInnerFilesInner, +) +from bamboohr_sdk.models.company_industry_data_object import CompanyIndustryDataObject as CompanyIndustryDataObject from bamboohr_sdk.models.company_information import CompanyInformation as CompanyInformation from bamboohr_sdk.models.company_information_address import CompanyInformationAddress as CompanyInformationAddress -from bamboohr_sdk.models.company_integrations_updated_webhook_payload import CompanyIntegrationsUpdatedWebhookPayload as CompanyIntegrationsUpdatedWebhookPayload -from bamboohr_sdk.models.company_integrations_updated_webhook_payload_data import CompanyIntegrationsUpdatedWebhookPayloadData as CompanyIntegrationsUpdatedWebhookPayloadData +from bamboohr_sdk.models.company_integrations_updated_webhook_payload import ( + CompanyIntegrationsUpdatedWebhookPayload as CompanyIntegrationsUpdatedWebhookPayload, +) +from bamboohr_sdk.models.company_integrations_updated_webhook_payload_data import ( + CompanyIntegrationsUpdatedWebhookPayloadData as CompanyIntegrationsUpdatedWebhookPayloadData, +) +from bamboohr_sdk.models.company_profile_data import CompanyProfileData as CompanyProfileData +from bamboohr_sdk.models.company_profile_data_address import CompanyProfileDataAddress as CompanyProfileDataAddress from bamboohr_sdk.models.company_profile_integrations import CompanyProfileIntegrations as CompanyProfileIntegrations -from bamboohr_sdk.models.company_updated_webhook_payload import CompanyUpdatedWebhookPayload as CompanyUpdatedWebhookPayload +from bamboohr_sdk.models.company_updated_webhook_payload import ( + CompanyUpdatedWebhookPayload as CompanyUpdatedWebhookPayload, +) +from bamboohr_sdk.models.compensation_benchmark_detail_employee import ( + CompensationBenchmarkDetailEmployee as CompensationBenchmarkDetailEmployee, +) +from bamboohr_sdk.models.compensation_benchmark_detail_employee_job_title import ( + CompensationBenchmarkDetailEmployeeJobTitle as CompensationBenchmarkDetailEmployeeJobTitle, +) +from bamboohr_sdk.models.compensation_benchmark_detail_employee_salary import ( + CompensationBenchmarkDetailEmployeeSalary as CompensationBenchmarkDetailEmployeeSalary, +) +from bamboohr_sdk.models.compensation_benchmark_details import ( + CompensationBenchmarkDetails as CompensationBenchmarkDetails, +) +from bamboohr_sdk.models.compensation_benchmark_details_benchmark_values_inner import ( + CompensationBenchmarkDetailsBenchmarkValuesInner as CompensationBenchmarkDetailsBenchmarkValuesInner, +) +from bamboohr_sdk.models.compensation_benchmark_job_location_employee import ( + CompensationBenchmarkJobLocationEmployee as CompensationBenchmarkJobLocationEmployee, +) +from bamboohr_sdk.models.compensation_benchmark_job_location_employee_salary import ( + CompensationBenchmarkJobLocationEmployeeSalary as CompensationBenchmarkJobLocationEmployeeSalary, +) +from bamboohr_sdk.models.compensation_benchmark_job_location_pair import ( + CompensationBenchmarkJobLocationPair as CompensationBenchmarkJobLocationPair, +) +from bamboohr_sdk.models.compensation_benchmark_job_location_pair_job_details import ( + CompensationBenchmarkJobLocationPairJobDetails as CompensationBenchmarkJobLocationPairJobDetails, +) +from bamboohr_sdk.models.compensation_benchmark_overview import ( + CompensationBenchmarkOverview as CompensationBenchmarkOverview, +) +from bamboohr_sdk.models.compensation_benchmark_overview_values import ( + CompensationBenchmarkOverviewValues as CompensationBenchmarkOverviewValues, +) +from bamboohr_sdk.models.compensation_benchmark_source import CompensationBenchmarkSource as CompensationBenchmarkSource +from bamboohr_sdk.models.compensation_benchmarking_column_map import ( + CompensationBenchmarkingColumnMap as CompensationBenchmarkingColumnMap, +) +from bamboohr_sdk.models.compensation_benchmarks_list import CompensationBenchmarksList as CompensationBenchmarksList +from bamboohr_sdk.models.compensation_equity_settings_response import ( + CompensationEquitySettingsResponse as CompensationEquitySettingsResponse, +) +from bamboohr_sdk.models.compensation_equity_settings_response_company_valuation import ( + CompensationEquitySettingsResponseCompanyValuation as CompensationEquitySettingsResponseCompanyValuation, +) +from bamboohr_sdk.models.compensation_equity_settings_response_disclaimers import ( + CompensationEquitySettingsResponseDisclaimers as CompensationEquitySettingsResponseDisclaimers, +) +from bamboohr_sdk.models.compensation_equity_settings_response_outstanding_shares import ( + CompensationEquitySettingsResponseOutstandingShares as CompensationEquitySettingsResponseOutstandingShares, +) +from bamboohr_sdk.models.compensation_equity_settings_response_price_per_share import ( + CompensationEquitySettingsResponsePricePerShare as CompensationEquitySettingsResponsePricePerShare, +) +from bamboohr_sdk.models.compensation_equity_settings_response_slider_min import ( + CompensationEquitySettingsResponseSliderMin as CompensationEquitySettingsResponseSliderMin, +) +from bamboohr_sdk.models.compensation_equity_settings_response_vesting_conditions import ( + CompensationEquitySettingsResponseVestingConditions as CompensationEquitySettingsResponseVestingConditions, +) +from bamboohr_sdk.models.compensation_equity_settings_update_request import ( + CompensationEquitySettingsUpdateRequest as CompensationEquitySettingsUpdateRequest, +) +from bamboohr_sdk.models.compensation_planning_cycle_admins_response import ( + CompensationPlanningCycleAdminsResponse as CompensationPlanningCycleAdminsResponse, +) +from bamboohr_sdk.models.compensation_planning_cycle_admins_response_admins_inner import ( + CompensationPlanningCycleAdminsResponseAdminsInner as CompensationPlanningCycleAdminsResponseAdminsInner, +) +from bamboohr_sdk.models.compensation_planning_cycle_complete_response import ( + CompensationPlanningCycleCompleteResponse as CompensationPlanningCycleCompleteResponse, +) +from bamboohr_sdk.models.compensation_planning_cycle_complete_response_errors_inner import ( + CompensationPlanningCycleCompleteResponseErrorsInner as CompensationPlanningCycleCompleteResponseErrorsInner, +) +from bamboohr_sdk.models.compensation_tools_data_object import ( + CompensationToolsDataObject as CompensationToolsDataObject, +) +from bamboohr_sdk.models.compensation_tools_response import CompensationToolsResponse as CompensationToolsResponse +from bamboohr_sdk.models.compensation_upsell_data import CompensationUpsellData as CompensationUpsellData +from bamboohr_sdk.models.completed_questions_and_response_data_object import ( + CompletedQuestionsAndResponseDataObject as CompletedQuestionsAndResponseDataObject, +) +from bamboohr_sdk.models.conversion_rate_data_object import ConversionRateDataObject as ConversionRateDataObject +from bamboohr_sdk.models.countries_options_response import CountriesOptionsResponse as CountriesOptionsResponse from bamboohr_sdk.models.country import Country as Country from bamboohr_sdk.models.country_schema import CountrySchema as CountrySchema -from bamboohr_sdk.models.create_application_comment_request import CreateApplicationCommentRequest as CreateApplicationCommentRequest +from bamboohr_sdk.models.create_application_comment_request import ( + CreateApplicationCommentRequest as CreateApplicationCommentRequest, +) from bamboohr_sdk.models.create_candidate_response import CreateCandidateResponse as CreateCandidateResponse from bamboohr_sdk.models.create_comment_response import CreateCommentResponse as CreateCommentResponse -from bamboohr_sdk.models.create_employee_training_record_request import CreateEmployeeTrainingRecordRequest as CreateEmployeeTrainingRecordRequest -from bamboohr_sdk.models.create_employee_training_record_request_cost import CreateEmployeeTrainingRecordRequestCost as CreateEmployeeTrainingRecordRequestCost +from bamboohr_sdk.models.create_compensation_benchmark_request import ( + CreateCompensationBenchmarkRequest as CreateCompensationBenchmarkRequest, +) +from bamboohr_sdk.models.create_compensation_benchmark_source_request import ( + CreateCompensationBenchmarkSourceRequest as CreateCompensationBenchmarkSourceRequest, +) +from bamboohr_sdk.models.create_employee_training_record_request import ( + CreateEmployeeTrainingRecordRequest as CreateEmployeeTrainingRecordRequest, +) +from bamboohr_sdk.models.create_employee_training_record_request_cost import ( + CreateEmployeeTrainingRecordRequestCost as CreateEmployeeTrainingRecordRequestCost, +) +from bamboohr_sdk.models.create_goal_comment_request import CreateGoalCommentRequest as CreateGoalCommentRequest +from bamboohr_sdk.models.create_goal_request import CreateGoalRequest as CreateGoalRequest +from bamboohr_sdk.models.create_goal_request_milestones_inner import ( + CreateGoalRequestMilestonesInner as CreateGoalRequestMilestonesInner, +) from bamboohr_sdk.models.create_job_opening_response import CreateJobOpeningResponse as CreateJobOpeningResponse -from bamboohr_sdk.models.create_training_category_request import CreateTrainingCategoryRequest as CreateTrainingCategoryRequest +from bamboohr_sdk.models.create_location_request import CreateLocationRequest as CreateLocationRequest +from bamboohr_sdk.models.create_location_request_address import ( + CreateLocationRequestAddress as CreateLocationRequestAddress, +) +from bamboohr_sdk.models.create_training_category_request import ( + CreateTrainingCategoryRequest as CreateTrainingCategoryRequest, +) from bamboohr_sdk.models.create_training_type_request import CreateTrainingTypeRequest as CreateTrainingTypeRequest -from bamboohr_sdk.models.create_training_type_request_category import CreateTrainingTypeRequestCategory as CreateTrainingTypeRequestCategory -from bamboohr_sdk.models.create_training_type_request_due_from_hire_date import CreateTrainingTypeRequestDueFromHireDate as CreateTrainingTypeRequestDueFromHireDate -from bamboohr_sdk.models.create_training_type_request_due_from_hire_date_one_of import CreateTrainingTypeRequestDueFromHireDateOneOf as CreateTrainingTypeRequestDueFromHireDateOneOf -from bamboohr_sdk.models.create_webhook_bad_request_response import CreateWebhookBadRequestResponse as CreateWebhookBadRequestResponse -from bamboohr_sdk.models.cursor_paged_response_metadata import CursorPagedResponseMetadata as CursorPagedResponseMetadata +from bamboohr_sdk.models.create_training_type_request_category import ( + CreateTrainingTypeRequestCategory as CreateTrainingTypeRequestCategory, +) +from bamboohr_sdk.models.create_webhook_bad_request_response import ( + CreateWebhookBadRequestResponse as CreateWebhookBadRequestResponse, +) +from bamboohr_sdk.models.created_compensation_benchmark import ( + CreatedCompensationBenchmark as CreatedCompensationBenchmark, +) +from bamboohr_sdk.models.created_compensation_benchmark_saved_benchmark import ( + CreatedCompensationBenchmarkSavedBenchmark as CreatedCompensationBenchmarkSavedBenchmark, +) +from bamboohr_sdk.models.created_compensation_benchmark_source import ( + CreatedCompensationBenchmarkSource as CreatedCompensationBenchmarkSource, +) +from bamboohr_sdk.models.created_time_off_request import CreatedTimeOffRequest as CreatedTimeOffRequest +from bamboohr_sdk.models.created_time_off_request_amount import ( + CreatedTimeOffRequestAmount as CreatedTimeOffRequestAmount, +) +from bamboohr_sdk.models.created_time_off_request_notes import CreatedTimeOffRequestNotes as CreatedTimeOffRequestNotes +from bamboohr_sdk.models.created_time_off_request_status import ( + CreatedTimeOffRequestStatus as CreatedTimeOffRequestStatus, +) +from bamboohr_sdk.models.created_time_off_request_type import CreatedTimeOffRequestType as CreatedTimeOffRequestType +from bamboohr_sdk.models.currency_conversions_response import CurrencyConversionsResponse as CurrencyConversionsResponse +from bamboohr_sdk.models.cursor_paged_response_metadata import ( + CursorPagedResponseMetadata as CursorPagedResponseMetadata, +) from bamboohr_sdk.models.cursor_pages_response import CursorPagesResponse as CursorPagesResponse -from bamboohr_sdk.models.cursor_pagination_query_object import CursorPaginationQueryObject as CursorPaginationQueryObject +from bamboohr_sdk.models.custom_field_definition_response_object import ( + CustomFieldDefinitionResponseObject as CustomFieldDefinitionResponseObject, +) +from bamboohr_sdk.models.custom_field_definition_response_object_values_inner import ( + CustomFieldDefinitionResponseObjectValuesInner as CustomFieldDefinitionResponseObjectValuesInner, +) +from bamboohr_sdk.models.custom_field_request import CustomFieldRequest as CustomFieldRequest +from bamboohr_sdk.models.custom_field_type_view_object import CustomFieldTypeViewObject as CustomFieldTypeViewObject +from bamboohr_sdk.models.custom_field_view_object import CustomFieldViewObject as CustomFieldViewObject +from bamboohr_sdk.models.custom_fields_list_response import CustomFieldsListResponse as CustomFieldsListResponse +from bamboohr_sdk.models.custom_report_response import CustomReportResponse as CustomReportResponse +from bamboohr_sdk.models.custom_report_response_fields_inner import ( + CustomReportResponseFieldsInner as CustomReportResponseFieldsInner, +) +from bamboohr_sdk.models.dacd313af2106213fc4696175941ce65_request import ( + Dacd313af2106213fc4696175941ce65Request as Dacd313af2106213fc4696175941ce65Request, +) from bamboohr_sdk.models.data_request import DataRequest as DataRequest -from bamboohr_sdk.models.data_request_aggregations_inner import DataRequestAggregationsInner as DataRequestAggregationsInner +from bamboohr_sdk.models.data_request_aggregations import DataRequestAggregations as DataRequestAggregations from bamboohr_sdk.models.data_request_filters import DataRequestFilters as DataRequestFilters -from bamboohr_sdk.models.data_request_filters_filters_inner import DataRequestFiltersFiltersInner as DataRequestFiltersFiltersInner +from bamboohr_sdk.models.data_request_filters_filters_inner import ( + DataRequestFiltersFiltersInner as DataRequestFiltersFiltersInner, +) from bamboohr_sdk.models.data_request_sort_by_inner import DataRequestSortByInner as DataRequestSortByInner -from bamboohr_sdk.models.dataset import Dataset as Dataset +from bamboohr_sdk.models.dataset_data_response_v2 import DatasetDataResponseV2 as DatasetDataResponseV2 +from bamboohr_sdk.models.dataset_data_response_v2_data_inner import ( + DatasetDataResponseV2DataInner as DatasetDataResponseV2DataInner, +) +from bamboohr_sdk.models.dataset_data_response_v2_data_inner_fields_value import ( + DatasetDataResponseV2DataInnerFieldsValue as DatasetDataResponseV2DataInnerFieldsValue, +) +from bamboohr_sdk.models.dataset_data_response_v2_links import DatasetDataResponseV2Links as DatasetDataResponseV2Links +from bamboohr_sdk.models.dataset_data_response_v2_meta import DatasetDataResponseV2Meta as DatasetDataResponseV2Meta from bamboohr_sdk.models.dataset_fields_response import DatasetFieldsResponse as DatasetFieldsResponse -from bamboohr_sdk.models.dataset_response import DatasetResponse as DatasetResponse -from bamboohr_sdk.models.datasets_response import DatasetsResponse as DatasetsResponse -from bamboohr_sdk.models.datasets_response_datasets_inner import DatasetsResponseDatasetsInner as DatasetsResponseDatasetsInner +from bamboohr_sdk.models.dataset_response_v1 import DatasetResponseV1 as DatasetResponseV1 +from bamboohr_sdk.models.dataset_v1 import DatasetV1 as DatasetV1 +from bamboohr_sdk.models.datasets_response_v12 import DatasetsResponseV12 as DatasetsResponseV12 +from bamboohr_sdk.models.datasets_response_v12_datasets_inner import ( + DatasetsResponseV12DatasetsInner as DatasetsResponseV12DatasetsInner, +) +from bamboohr_sdk.models.delete_compensation_benchmark_source_request import ( + DeleteCompensationBenchmarkSourceRequest as DeleteCompensationBenchmarkSourceRequest, +) +from bamboohr_sdk.models.delete_compensation_benchmark_source_response import ( + DeleteCompensationBenchmarkSourceResponse as DeleteCompensationBenchmarkSourceResponse, +) +from bamboohr_sdk.models.details_and_currency_request_data_object import ( + DetailsAndCurrencyRequestDataObject as DetailsAndCurrencyRequestDataObject, +) +from bamboohr_sdk.models.ec1ba8e76f33960b018d0d7518fe97b5_request import ( + Ec1ba8e76f33960b018d0d7518fe97b5Request as Ec1ba8e76f33960b018d0d7518fe97b5Request, +) from bamboohr_sdk.models.employee import Employee as Employee from bamboohr_sdk.models.employee_benefit_filters import EmployeeBenefitFilters as EmployeeBenefitFilters -from bamboohr_sdk.models.employee_benefit_filters_filters import EmployeeBenefitFiltersFilters as EmployeeBenefitFiltersFilters -from bamboohr_sdk.models.employee_benefits_list_response import EmployeeBenefitsListResponse as EmployeeBenefitsListResponse -from bamboohr_sdk.models.employee_benefits_list_response_employee_benefits_inner import EmployeeBenefitsListResponseEmployeeBenefitsInner as EmployeeBenefitsListResponseEmployeeBenefitsInner -from bamboohr_sdk.models.employee_benefits_list_response_employee_benefits_inner_employee_benefit_inner import EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner as EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner -from bamboohr_sdk.models.employee_created_webhook_payload import EmployeeCreatedWebhookPayload as EmployeeCreatedWebhookPayload -from bamboohr_sdk.models.employee_created_webhook_payload_data import EmployeeCreatedWebhookPayloadData as EmployeeCreatedWebhookPayloadData -from bamboohr_sdk.models.employee_deleted_webhook_payload import EmployeeDeletedWebhookPayload as EmployeeDeletedWebhookPayload -from bamboohr_sdk.models.employee_deleted_webhook_payload_data import EmployeeDeletedWebhookPayloadData as EmployeeDeletedWebhookPayloadData +from bamboohr_sdk.models.employee_benefit_filters_filters import ( + EmployeeBenefitFiltersFilters as EmployeeBenefitFiltersFilters, +) +from bamboohr_sdk.models.employee_benefits_list_response import ( + EmployeeBenefitsListResponse as EmployeeBenefitsListResponse, +) +from bamboohr_sdk.models.employee_benefits_list_response_employee_benefits_inner import ( + EmployeeBenefitsListResponseEmployeeBenefitsInner as EmployeeBenefitsListResponseEmployeeBenefitsInner, +) +from bamboohr_sdk.models.employee_benefits_list_response_employee_benefits_inner_employee_benefit_inner import ( + EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner as EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner, +) +from bamboohr_sdk.models.employee_created_webhook_payload import ( + EmployeeCreatedWebhookPayload as EmployeeCreatedWebhookPayload, +) +from bamboohr_sdk.models.employee_created_webhook_payload_data import ( + EmployeeCreatedWebhookPayloadData as EmployeeCreatedWebhookPayloadData, +) +from bamboohr_sdk.models.employee_cursor_pagination_query_object import ( + EmployeeCursorPaginationQueryObject as EmployeeCursorPaginationQueryObject, +) +from bamboohr_sdk.models.employee_deleted_webhook_payload import ( + EmployeeDeletedWebhookPayload as EmployeeDeletedWebhookPayload, +) +from bamboohr_sdk.models.employee_deleted_webhook_payload_data import ( + EmployeeDeletedWebhookPayloadData as EmployeeDeletedWebhookPayloadData, +) from bamboohr_sdk.models.employee_dependent import EmployeeDependent as EmployeeDependent from bamboohr_sdk.models.employee_dependents_response import EmployeeDependentsResponse as EmployeeDependentsResponse -from bamboohr_sdk.models.employee_dependents_response_employee_dependents_inner import EmployeeDependentsResponseEmployeeDependentsInner as EmployeeDependentsResponseEmployeeDependentsInner +from bamboohr_sdk.models.employee_dependents_response_employee_dependents_inner import ( + EmployeeDependentsResponseEmployeeDependentsInner as EmployeeDependentsResponseEmployeeDependentsInner, +) from bamboohr_sdk.models.employee_file_update import EmployeeFileUpdate as EmployeeFileUpdate +from bamboohr_sdk.models.employee_optional_field import EmployeeOptionalField as EmployeeOptionalField +from bamboohr_sdk.models.employee_photo_json_response import EmployeePhotoJsonResponse as EmployeePhotoJsonResponse from bamboohr_sdk.models.employee_response import EmployeeResponse as EmployeeResponse -from bamboohr_sdk.models.employee_response_aggregations_inner import EmployeeResponseAggregationsInner as EmployeeResponseAggregationsInner +from bamboohr_sdk.models.employee_response_aggregations_inner import ( + EmployeeResponseAggregationsInner as EmployeeResponseAggregationsInner, +) +from bamboohr_sdk.models.employee_string_code_error_response_v1 import ( + EmployeeStringCodeErrorResponseV1 as EmployeeStringCodeErrorResponseV1, +) +from bamboohr_sdk.models.employee_string_code_error_response_v1_error import ( + EmployeeStringCodeErrorResponseV1Error as EmployeeStringCodeErrorResponseV1Error, +) from bamboohr_sdk.models.employee_table_row import EmployeeTableRow as EmployeeTableRow -from bamboohr_sdk.models.employee_table_row_value import EmployeeTableRowValue as EmployeeTableRowValue -from bamboohr_sdk.models.employee_table_row_value_any_of_inner import EmployeeTableRowValueAnyOfInner as EmployeeTableRowValueAnyOfInner -from bamboohr_sdk.models.employee_time_off_policy_assignment import EmployeeTimeOffPolicyAssignment as EmployeeTimeOffPolicyAssignment -from bamboohr_sdk.models.employee_time_off_policy_assignment_v11 import EmployeeTimeOffPolicyAssignmentV11 as EmployeeTimeOffPolicyAssignmentV11 -from bamboohr_sdk.models.employee_timesheet_entry_transformer import EmployeeTimesheetEntryTransformer as EmployeeTimesheetEntryTransformer -from bamboohr_sdk.models.employee_updated_webhook_payload import EmployeeUpdatedWebhookPayload as EmployeeUpdatedWebhookPayload -from bamboohr_sdk.models.employee_updated_webhook_payload_data import EmployeeUpdatedWebhookPayloadData as EmployeeUpdatedWebhookPayloadData +from bamboohr_sdk.models.employee_time_off_policy_assignment import ( + EmployeeTimeOffPolicyAssignment as EmployeeTimeOffPolicyAssignment, +) +from bamboohr_sdk.models.employee_time_off_policy_assignment_v11 import ( + EmployeeTimeOffPolicyAssignmentV11 as EmployeeTimeOffPolicyAssignmentV11, +) +from bamboohr_sdk.models.employee_time_off_request_approver_response_inner import ( + EmployeeTimeOffRequestApproverResponseInner as EmployeeTimeOffRequestApproverResponseInner, +) +from bamboohr_sdk.models.employee_timesheet_entry_transformer import ( + EmployeeTimesheetEntryTransformer as EmployeeTimesheetEntryTransformer, +) +from bamboohr_sdk.models.employee_updated_webhook_payload import ( + EmployeeUpdatedWebhookPayload as EmployeeUpdatedWebhookPayload, +) +from bamboohr_sdk.models.employee_updated_webhook_payload_data import ( + EmployeeUpdatedWebhookPayloadData as EmployeeUpdatedWebhookPayloadData, +) from bamboohr_sdk.models.employee_value import EmployeeValue as EmployeeValue from bamboohr_sdk.models.employee_value_any_of_inner import EmployeeValueAnyOfInner as EmployeeValueAnyOfInner +from bamboohr_sdk.models.employee_verification_integration import ( + EmployeeVerificationIntegration as EmployeeVerificationIntegration, +) +from bamboohr_sdk.models.employee_verification_integration_response import ( + EmployeeVerificationIntegrationResponse as EmployeeVerificationIntegrationResponse, +) +from bamboohr_sdk.models.employee_verification_lifecycle_email_accepted_response import ( + EmployeeVerificationLifecycleEmailAcceptedResponse as EmployeeVerificationLifecycleEmailAcceptedResponse, +) +from bamboohr_sdk.models.employee_verification_public_api_record import ( + EmployeeVerificationPublicApiRecord as EmployeeVerificationPublicApiRecord, +) +from bamboohr_sdk.models.employee_verification_update_response import ( + EmployeeVerificationUpdateResponse as EmployeeVerificationUpdateResponse, +) +from bamboohr_sdk.models.employee_verifications_list_response import ( + EmployeeVerificationsListResponse as EmployeeVerificationsListResponse, +) +from bamboohr_sdk.models.employees_directory_json_response import ( + EmployeesDirectoryJsonResponse as EmployeesDirectoryJsonResponse, +) +from bamboohr_sdk.models.employees_directory_json_response_fields_inner import ( + EmployeesDirectoryJsonResponseFieldsInner as EmployeesDirectoryJsonResponseFieldsInner, +) +from bamboohr_sdk.models.employees_directory_xml_response import ( + EmployeesDirectoryXmlResponse as EmployeesDirectoryXmlResponse, +) +from bamboohr_sdk.models.employees_directory_xml_response_employees import ( + EmployeesDirectoryXmlResponseEmployees as EmployeesDirectoryXmlResponseEmployees, +) +from bamboohr_sdk.models.employees_directory_xml_response_employees_employee_inner import ( + EmployeesDirectoryXmlResponseEmployeesEmployeeInner as EmployeesDirectoryXmlResponseEmployeesEmployeeInner, +) +from bamboohr_sdk.models.employees_directory_xml_response_employees_employee_inner_field_inner import ( + EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner as EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner, +) +from bamboohr_sdk.models.employees_directory_xml_response_fieldset import ( + EmployeesDirectoryXmlResponseFieldset as EmployeesDirectoryXmlResponseFieldset, +) +from bamboohr_sdk.models.employees_directory_xml_response_fieldset_field_inner import ( + EmployeesDirectoryXmlResponseFieldsetFieldInner as EmployeesDirectoryXmlResponseFieldsetFieldInner, +) +from bamboohr_sdk.models.error_response import ErrorResponse as ErrorResponse +from bamboohr_sdk.models.error_response_error import ErrorResponseError as ErrorResponseError +from bamboohr_sdk.models.f3883a522dadbe9e11b34f8b656e3adb_request import ( + F3883a522dadbe9e11b34f8b656e3adbRequest as F3883a522dadbe9e11b34f8b656e3adbRequest, +) from bamboohr_sdk.models.field1 import Field1 as Field1 from bamboohr_sdk.models.field1_id import Field1Id as Field1Id -from bamboohr_sdk.models.field_list import FieldList as FieldList -from bamboohr_sdk.models.field_list_fields_inner import FieldListFieldsInner as FieldListFieldsInner from bamboohr_sdk.models.field_options_request_schema import FieldOptionsRequestSchema as FieldOptionsRequestSchema -from bamboohr_sdk.models.field_options_request_schema_dependent_fields_value_inner import FieldOptionsRequestSchemaDependentFieldsValueInner as FieldOptionsRequestSchemaDependentFieldsValueInner +from bamboohr_sdk.models.field_options_request_schema_dependent_fields_value_inner import ( + FieldOptionsRequestSchemaDependentFieldsValueInner as FieldOptionsRequestSchemaDependentFieldsValueInner, +) from bamboohr_sdk.models.field_options_transformer import FieldOptionsTransformer as FieldOptionsTransformer -from bamboohr_sdk.models.forbidden import Forbidden as Forbidden +from bamboohr_sdk.models.field_options_transformer_id import FieldOptionsTransformerId as FieldOptionsTransformerId +from bamboohr_sdk.models.forbidden_v1 import ForbiddenV1 as ForbiddenV1 +from bamboohr_sdk.models.forbidden_v1_error import ForbiddenV1Error as ForbiddenV1Error +from bamboohr_sdk.models.get_break_policy_suggestions_request import ( + GetBreakPolicySuggestionsRequest as GetBreakPolicySuggestionsRequest, +) from bamboohr_sdk.models.get_company_report_response import GetCompanyReportResponse as GetCompanyReportResponse -from bamboohr_sdk.models.get_employees_employee_response import GetEmployeesEmployeeResponse as GetEmployeesEmployeeResponse -from bamboohr_sdk.models.get_employees_filter_request_object import GetEmployeesFilterRequestObject as GetEmployeesFilterRequestObject +from bamboohr_sdk.models.get_company_report_response_employees_inner import ( + GetCompanyReportResponseEmployeesInner as GetCompanyReportResponseEmployeesInner, +) +from bamboohr_sdk.models.get_data_from_dataset_v2_request import ( + GetDataFromDatasetV2Request as GetDataFromDatasetV2Request, +) +from bamboohr_sdk.models.get_employee_response import GetEmployeeResponse as GetEmployeeResponse +from bamboohr_sdk.models.get_employees_employee_base_response import ( + GetEmployeesEmployeeBaseResponse as GetEmployeesEmployeeBaseResponse, +) +from bamboohr_sdk.models.get_employees_employee_response import ( + GetEmployeesEmployeeResponse as GetEmployeesEmployeeResponse, +) +from bamboohr_sdk.models.get_employees_employee_response_all_of_overtime_rate import ( + GetEmployeesEmployeeResponseAllOfOvertimeRate as GetEmployeesEmployeeResponseAllOfOvertimeRate, +) +from bamboohr_sdk.models.get_employees_employee_response_all_of_pay_rate import ( + GetEmployeesEmployeeResponseAllOfPayRate as GetEmployeesEmployeeResponseAllOfPayRate, +) +from bamboohr_sdk.models.get_employees_employee_response_all_of_teams import ( + GetEmployeesEmployeeResponseAllOfTeams as GetEmployeesEmployeeResponseAllOfTeams, +) +from bamboohr_sdk.models.get_employees_filter_request_object import ( + GetEmployeesFilterRequestObject as GetEmployeesFilterRequestObject, +) from bamboohr_sdk.models.get_employees_response_object import GetEmployeesResponseObject as GetEmployeesResponseObject -from bamboohr_sdk.models.get_employees_response_object_links import GetEmployeesResponseObjectLinks as GetEmployeesResponseObjectLinks -from bamboohr_sdk.models.get_employees_response_object_links_next import GetEmployeesResponseObjectLinksNext as GetEmployeesResponseObjectLinksNext -from bamboohr_sdk.models.get_employees_response_object_links_prev import GetEmployeesResponseObjectLinksPrev as GetEmployeesResponseObjectLinksPrev -from bamboohr_sdk.models.get_employees_response_object_links_self import GetEmployeesResponseObjectLinksSelf as GetEmployeesResponseObjectLinksSelf -from bamboohr_sdk.models.goal import Goal as Goal +from bamboohr_sdk.models.get_employees_response_object_links import ( + GetEmployeesResponseObjectLinks as GetEmployeesResponseObjectLinks, +) +from bamboohr_sdk.models.get_employees_response_object_links_next import ( + GetEmployeesResponseObjectLinksNext as GetEmployeesResponseObjectLinksNext, +) +from bamboohr_sdk.models.get_employees_response_object_links_prev import ( + GetEmployeesResponseObjectLinksPrev as GetEmployeesResponseObjectLinksPrev, +) +from bamboohr_sdk.models.get_employees_response_object_links_self import ( + GetEmployeesResponseObjectLinksSelf as GetEmployeesResponseObjectLinksSelf, +) +from bamboohr_sdk.models.global_holiday_global_holiday_v1 import ( + GlobalHolidayGlobalHolidayV1 as GlobalHolidayGlobalHolidayV1, +) from bamboohr_sdk.models.goal_aggregate import GoalAggregate as GoalAggregate -from bamboohr_sdk.models.goal_aggregate_aligns_with_options_inner import GoalAggregateAlignsWithOptionsInner as GoalAggregateAlignsWithOptionsInner +from bamboohr_sdk.models.goal_aggregate_aligns_with_options_inner import ( + GoalAggregateAlignsWithOptionsInner as GoalAggregateAlignsWithOptionsInner, +) from bamboohr_sdk.models.goal_aggregate_comments_inner import GoalAggregateCommentsInner as GoalAggregateCommentsInner from bamboohr_sdk.models.goal_aggregate_persons_inner import GoalAggregatePersonsInner as GoalAggregatePersonsInner from bamboohr_sdk.models.goal_comment_response import GoalCommentResponse as GoalCommentResponse from bamboohr_sdk.models.goal_comments_response import GoalCommentsResponse as GoalCommentsResponse -from bamboohr_sdk.models.goal_comments_response_comments_inner import GoalCommentsResponseCommentsInner as GoalCommentsResponseCommentsInner +from bamboohr_sdk.models.goal_comments_response_comments_inner import ( + GoalCommentsResponseCommentsInner as GoalCommentsResponseCommentsInner, +) from bamboohr_sdk.models.goal_filters_v1 import GoalFiltersV1 as GoalFiltersV1 from bamboohr_sdk.models.goal_filters_v11 import GoalFiltersV11 as GoalFiltersV11 from bamboohr_sdk.models.goal_filters_v11_filters_inner import GoalFiltersV11FiltersInner as GoalFiltersV11FiltersInner -from bamboohr_sdk.models.goal_filters_v11_filters_inner_actions import GoalFiltersV11FiltersInnerActions as GoalFiltersV11FiltersInnerActions +from bamboohr_sdk.models.goal_filters_v11_filters_inner_actions import ( + GoalFiltersV11FiltersInnerActions as GoalFiltersV11FiltersInnerActions, +) from bamboohr_sdk.models.goal_filters_v1_filters_inner import GoalFiltersV1FiltersInner as GoalFiltersV1FiltersInner +from bamboohr_sdk.models.goal_response import GoalResponse as GoalResponse from bamboohr_sdk.models.goals_aggregate_v1 import GoalsAggregateV1 as GoalsAggregateV1 from bamboohr_sdk.models.goals_aggregate_v11 import GoalsAggregateV11 as GoalsAggregateV11 -from bamboohr_sdk.models.goals_aggregate_v11_comments_inner import GoalsAggregateV11CommentsInner as GoalsAggregateV11CommentsInner +from bamboohr_sdk.models.goals_aggregate_v11_comments_inner import ( + GoalsAggregateV11CommentsInner as GoalsAggregateV11CommentsInner, +) from bamboohr_sdk.models.goals_aggregate_v12 import GoalsAggregateV12 as GoalsAggregateV12 -from bamboohr_sdk.models.goals_aggregate_v12_comments_inner import GoalsAggregateV12CommentsInner as GoalsAggregateV12CommentsInner -from bamboohr_sdk.models.goals_aggregate_v1_comments_inner import GoalsAggregateV1CommentsInner as GoalsAggregateV1CommentsInner -from bamboohr_sdk.models.goals_aggregate_v1_persons_inner import GoalsAggregateV1PersonsInner as GoalsAggregateV1PersonsInner +from bamboohr_sdk.models.goals_aggregate_v12_comments_inner import ( + GoalsAggregateV12CommentsInner as GoalsAggregateV12CommentsInner, +) +from bamboohr_sdk.models.goals_aggregate_v1_comments_inner import ( + GoalsAggregateV1CommentsInner as GoalsAggregateV1CommentsInner, +) +from bamboohr_sdk.models.goals_aggregate_v1_persons_inner import ( + GoalsAggregateV1PersonsInner as GoalsAggregateV1PersonsInner, +) from bamboohr_sdk.models.goals_list import GoalsList as GoalsList from bamboohr_sdk.models.hiring_lead import HiringLead as HiringLead +from bamboohr_sdk.models.holiday_bulk_insert_company_holiday_error_v1 import ( + HolidayBulkInsertCompanyHolidayErrorV1 as HolidayBulkInsertCompanyHolidayErrorV1, +) +from bamboohr_sdk.models.holiday_bulk_insert_company_holiday_record_v1 import ( + HolidayBulkInsertCompanyHolidayRecordV1 as HolidayBulkInsertCompanyHolidayRecordV1, +) +from bamboohr_sdk.models.holiday_bulk_insert_company_holidays_failure_response_v1 import ( + HolidayBulkInsertCompanyHolidaysFailureResponseV1 as HolidayBulkInsertCompanyHolidaysFailureResponseV1, +) +from bamboohr_sdk.models.holiday_bulk_insert_company_holidays_response_v1 import ( + HolidayBulkInsertCompanyHolidaysResponseV1 as HolidayBulkInsertCompanyHolidaysResponseV1, +) +from bamboohr_sdk.models.holiday_catalog_holiday_list_response_v1 import ( + HolidayCatalogHolidayListResponseV1 as HolidayCatalogHolidayListResponseV1, +) +from bamboohr_sdk.models.holiday_catalog_holiday_list_response_v1_links import ( + HolidayCatalogHolidayListResponseV1Links as HolidayCatalogHolidayListResponseV1Links, +) +from bamboohr_sdk.models.holiday_company_holiday_audience_v1 import ( + HolidayCompanyHolidayAudienceV1 as HolidayCompanyHolidayAudienceV1, +) +from bamboohr_sdk.models.holiday_company_holiday_list_response_v1 import ( + HolidayCompanyHolidayListResponseV1 as HolidayCompanyHolidayListResponseV1, +) +from bamboohr_sdk.models.holiday_company_holiday_list_response_v1_links import ( + HolidayCompanyHolidayListResponseV1Links as HolidayCompanyHolidayListResponseV1Links, +) +from bamboohr_sdk.models.holiday_company_holiday_list_response_v1_meta import ( + HolidayCompanyHolidayListResponseV1Meta as HolidayCompanyHolidayListResponseV1Meta, +) +from bamboohr_sdk.models.holiday_company_holiday_pay_status_hours_v1 import ( + HolidayCompanyHolidayPayStatusHoursV1 as HolidayCompanyHolidayPayStatusHoursV1, +) +from bamboohr_sdk.models.holiday_company_holiday_v1 import HolidayCompanyHolidayV1 as HolidayCompanyHolidayV1 +from bamboohr_sdk.models.holiday_create_company_holiday_request_v1 import ( + HolidayCreateCompanyHolidayRequestV1 as HolidayCreateCompanyHolidayRequestV1, +) +from bamboohr_sdk.models.holiday_update_company_holiday_request_v1 import ( + HolidayUpdateCompanyHolidayRequestV1 as HolidayUpdateCompanyHolidayRequestV1, +) from bamboohr_sdk.models.hour_entries_request_schema import HourEntriesRequestSchema as HourEntriesRequestSchema +from bamboohr_sdk.models.hour_entry_create_hour_entry_v1 import HourEntryCreateHourEntryV1 as HourEntryCreateHourEntryV1 from bamboohr_sdk.models.hour_entry_ids_schema import HourEntryIdsSchema as HourEntryIdsSchema +from bamboohr_sdk.models.hour_entry_patch_hour_entry_v1 import HourEntryPatchHourEntryV1 as HourEntryPatchHourEntryV1 from bamboohr_sdk.models.hour_entry_schema import HourEntrySchema as HourEntrySchema -from bamboohr_sdk.models.invalid_request import InvalidRequest as InvalidRequest -from bamboohr_sdk.models.invalid_request_error import InvalidRequestError as InvalidRequestError +from bamboohr_sdk.models.import_compensation_benchmarks_response import ( + ImportCompensationBenchmarksResponse as ImportCompensationBenchmarksResponse, +) +from bamboohr_sdk.models.industry import Industry as Industry +from bamboohr_sdk.models.inline_object import InlineObject as InlineObject +from bamboohr_sdk.models.inline_object1 import InlineObject1 as InlineObject1 +from bamboohr_sdk.models.inline_object1_employees_inner import ( + InlineObject1EmployeesInner as InlineObject1EmployeesInner, +) +from bamboohr_sdk.models.inline_object1_status import InlineObject1Status as InlineObject1Status +from bamboohr_sdk.models.inline_object2 import InlineObject2 as InlineObject2 +from bamboohr_sdk.models.inline_object2_inner import InlineObject2Inner as InlineObject2Inner from bamboohr_sdk.models.job_summary import JobSummary as JobSummary -from bamboohr_sdk.models.job_summary_department import JobSummaryDepartment as JobSummaryDepartment -from bamboohr_sdk.models.job_summary_hiring_lead import JobSummaryHiringLead as JobSummaryHiringLead -from bamboohr_sdk.models.job_summary_location import JobSummaryLocation as JobSummaryLocation from bamboohr_sdk.models.job_summary_status import JobSummaryStatus as JobSummaryStatus -from bamboohr_sdk.models.json_directory_employee import JsonDirectoryEmployee as JsonDirectoryEmployee -from bamboohr_sdk.models.json_directory_employee_fields_inner import JsonDirectoryEmployeeFieldsInner as JsonDirectoryEmployeeFieldsInner from bamboohr_sdk.models.json_employee_files import JsonEmployeeFiles as JsonEmployeeFiles -from bamboohr_sdk.models.json_employee_files_categories_inner import JsonEmployeeFilesCategoriesInner as JsonEmployeeFilesCategoriesInner -from bamboohr_sdk.models.json_employee_files_categories_inner_files_inner import JsonEmployeeFilesCategoriesInnerFilesInner as JsonEmployeeFilesCategoriesInnerFilesInner +from bamboohr_sdk.models.json_employee_files_categories_inner import ( + JsonEmployeeFilesCategoriesInner as JsonEmployeeFilesCategoriesInner, +) +from bamboohr_sdk.models.json_employee_files_categories_inner_files_inner import ( + JsonEmployeeFilesCategoriesInnerFilesInner as JsonEmployeeFilesCategoriesInnerFilesInner, +) from bamboohr_sdk.models.json_employee_files_employee import JsonEmployeeFilesEmployee as JsonEmployeeFilesEmployee +from bamboohr_sdk.models.legacy_report_field_map_response import ( + LegacyReportFieldMapResponse as LegacyReportFieldMapResponse, +) +from bamboohr_sdk.models.legacy_report_field_map_response_mappings_inner import ( + LegacyReportFieldMapResponseMappingsInner as LegacyReportFieldMapResponseMappingsInner, +) +from bamboohr_sdk.models.legacy_report_id_map_response import LegacyReportIDMapResponse as LegacyReportIDMapResponse +from bamboohr_sdk.models.legacy_report_id_map_response_mappings_inner import ( + LegacyReportIDMapResponseMappingsInner as LegacyReportIDMapResponseMappingsInner, +) +from bamboohr_sdk.models.levels_and_bands_column_map import LevelsAndBandsColumnMap as LevelsAndBandsColumnMap +from bamboohr_sdk.models.levels_and_bands_group_status_counts import ( + LevelsAndBandsGroupStatusCounts as LevelsAndBandsGroupStatusCounts, +) +from bamboohr_sdk.models.levels_and_bands_job_title_assignment import ( + LevelsAndBandsJobTitleAssignment as LevelsAndBandsJobTitleAssignment, +) +from bamboohr_sdk.models.levels_and_bands_job_title_assignments_request import ( + LevelsAndBandsJobTitleAssignmentsRequest as LevelsAndBandsJobTitleAssignmentsRequest, +) +from bamboohr_sdk.models.levels_and_bands_pay_band_value import LevelsAndBandsPayBandValue as LevelsAndBandsPayBandValue +from bamboohr_sdk.models.levels_and_bands_upload_response import ( + LevelsAndBandsUploadResponse as LevelsAndBandsUploadResponse, +) from bamboohr_sdk.models.list_field_detail import ListFieldDetail as ListFieldDetail from bamboohr_sdk.models.list_field_option import ListFieldOption as ListFieldOption from bamboohr_sdk.models.list_field_values import ListFieldValues as ListFieldValues -from bamboohr_sdk.models.list_field_values_options_inner import ListFieldValuesOptionsInner as ListFieldValuesOptionsInner +from bamboohr_sdk.models.list_field_values_options_inner import ( + ListFieldValuesOptionsInner as ListFieldValuesOptionsInner, +) +from bamboohr_sdk.models.list_field_values_xml import ListFieldValuesXml as ListFieldValuesXml +from bamboohr_sdk.models.list_field_values_xml_option_inner import ( + ListFieldValuesXmlOptionInner as ListFieldValuesXmlOptionInner, +) from bamboohr_sdk.models.list_users_response_value import ListUsersResponseValue as ListUsersResponseValue from bamboohr_sdk.models.list_users_xml_response import ListUsersXmlResponse as ListUsersXmlResponse -from bamboohr_sdk.models.list_users_xml_response_user_inner import ListUsersXmlResponseUserInner as ListUsersXmlResponseUserInner +from bamboohr_sdk.models.list_users_xml_response_user_inner import ( + ListUsersXmlResponseUserInner as ListUsersXmlResponseUserInner, +) +from bamboohr_sdk.models.list_value_view_object import ListValueViewObject as ListValueViewObject from bamboohr_sdk.models.location import Location as Location +from bamboohr_sdk.models.location_response_object import LocationResponseObject as LocationResponseObject +from bamboohr_sdk.models.location_response_object_address import ( + LocationResponseObjectAddress as LocationResponseObjectAddress, +) +from bamboohr_sdk.models.location_response_object_address_country import ( + LocationResponseObjectAddressCountry as LocationResponseObjectAddressCountry, +) +from bamboohr_sdk.models.location_response_object_address_state import ( + LocationResponseObjectAddressState as LocationResponseObjectAddressState, +) from bamboohr_sdk.models.login_failure_response import LoginFailureResponse as LoginFailureResponse from bamboohr_sdk.models.login_failure_xml_response import LoginFailureXmlResponse as LoginFailureXmlResponse from bamboohr_sdk.models.login_response import LoginResponse as LoginResponse from bamboohr_sdk.models.login_xml_response import LoginXmlResponse as LoginXmlResponse from bamboohr_sdk.models.member_benefit_event import MemberBenefitEvent as MemberBenefitEvent -from bamboohr_sdk.models.member_benefit_event_coverages_inner import MemberBenefitEventCoveragesInner as MemberBenefitEventCoveragesInner -from bamboohr_sdk.models.member_benefit_event_coverages_inner_events_inner import MemberBenefitEventCoveragesInnerEventsInner as MemberBenefitEventCoveragesInnerEventsInner -from bamboohr_sdk.models.member_benefit_events_response import MemberBenefitEventsResponse as MemberBenefitEventsResponse -from bamboohr_sdk.models.member_benefits_get_permission_denied_response import MemberBenefitsGetPermissionDeniedResponse as MemberBenefitsGetPermissionDeniedResponse -from bamboohr_sdk.models.member_benefits_get_success_response import MemberBenefitsGetSuccessResponse as MemberBenefitsGetSuccessResponse -from bamboohr_sdk.models.member_benefits_get_success_response_data_inner import MemberBenefitsGetSuccessResponseDataInner as MemberBenefitsGetSuccessResponseDataInner -from bamboohr_sdk.models.member_benefits_get_success_response_data_inner_plans_inner import MemberBenefitsGetSuccessResponseDataInnerPlansInner as MemberBenefitsGetSuccessResponseDataInnerPlansInner -from bamboohr_sdk.models.member_benefits_get_success_response_data_inner_plans_inner_date_ranges_inner import MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner as MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner -from bamboohr_sdk.models.member_benefits_get_success_response_links import MemberBenefitsGetSuccessResponseLinks as MemberBenefitsGetSuccessResponseLinks -from bamboohr_sdk.models.member_benefits_get_success_response_links_next import MemberBenefitsGetSuccessResponseLinksNext as MemberBenefitsGetSuccessResponseLinksNext -from bamboohr_sdk.models.member_benefits_get_success_response_links_prev import MemberBenefitsGetSuccessResponseLinksPrev as MemberBenefitsGetSuccessResponseLinksPrev -from bamboohr_sdk.models.member_benefits_get_success_response_meta import MemberBenefitsGetSuccessResponseMeta as MemberBenefitsGetSuccessResponseMeta -from bamboohr_sdk.models.member_benefits_get_validation_error_response import MemberBenefitsGetValidationErrorResponse as MemberBenefitsGetValidationErrorResponse +from bamboohr_sdk.models.member_benefit_event_coverages_inner import ( + MemberBenefitEventCoveragesInner as MemberBenefitEventCoveragesInner, +) +from bamboohr_sdk.models.member_benefit_event_coverages_inner_events_inner import ( + MemberBenefitEventCoveragesInnerEventsInner as MemberBenefitEventCoveragesInnerEventsInner, +) +from bamboohr_sdk.models.member_benefit_events_response import ( + MemberBenefitEventsResponse as MemberBenefitEventsResponse, +) +from bamboohr_sdk.models.member_benefits_get_permission_denied_response import ( + MemberBenefitsGetPermissionDeniedResponse as MemberBenefitsGetPermissionDeniedResponse, +) +from bamboohr_sdk.models.member_benefits_get_success_response import ( + MemberBenefitsGetSuccessResponse as MemberBenefitsGetSuccessResponse, +) +from bamboohr_sdk.models.member_benefits_get_success_response_data_inner import ( + MemberBenefitsGetSuccessResponseDataInner as MemberBenefitsGetSuccessResponseDataInner, +) +from bamboohr_sdk.models.member_benefits_get_success_response_data_inner_plans_inner import ( + MemberBenefitsGetSuccessResponseDataInnerPlansInner as MemberBenefitsGetSuccessResponseDataInnerPlansInner, +) +from bamboohr_sdk.models.member_benefits_get_success_response_data_inner_plans_inner_date_ranges_inner import ( + MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner as MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner, +) +from bamboohr_sdk.models.member_benefits_get_success_response_links import ( + MemberBenefitsGetSuccessResponseLinks as MemberBenefitsGetSuccessResponseLinks, +) +from bamboohr_sdk.models.member_benefits_get_success_response_links_next import ( + MemberBenefitsGetSuccessResponseLinksNext as MemberBenefitsGetSuccessResponseLinksNext, +) +from bamboohr_sdk.models.member_benefits_get_success_response_links_prev import ( + MemberBenefitsGetSuccessResponseLinksPrev as MemberBenefitsGetSuccessResponseLinksPrev, +) +from bamboohr_sdk.models.member_benefits_get_success_response_meta import ( + MemberBenefitsGetSuccessResponseMeta as MemberBenefitsGetSuccessResponseMeta, +) +from bamboohr_sdk.models.member_benefits_get_validation_error_response import ( + MemberBenefitsGetValidationErrorResponse as MemberBenefitsGetValidationErrorResponse, +) +from bamboohr_sdk.models.meta_company_properties_response import ( + MetaCompanyPropertiesResponse as MetaCompanyPropertiesResponse, +) +from bamboohr_sdk.models.meta_currency_type_item import MetaCurrencyTypeItem as MetaCurrencyTypeItem +from bamboohr_sdk.models.model1d1fc0f164cb51973a0206b8e2fb2d2d_request import ( + Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest as Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest, +) +from bamboohr_sdk.models.model1d1fc0f164cb51973a0206b8e2fb2d2d_request_budget_breakdown_inner import ( + Model1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner as Model1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner, +) +from bamboohr_sdk.models.model1d64402ee192568adbd5e3179a91e6e2_request_inner import ( + Model1d64402ee192568adbd5e3179a91e6e2RequestInner as Model1d64402ee192568adbd5e3179a91e6e2RequestInner, +) +from bamboohr_sdk.models.model1d64402ee192568adbd5e3179a91e6e2_request_inner_budget_allocations import ( + Model1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations as Model1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations, +) +from bamboohr_sdk.models.model288aa996aba16d7a495c62321ea999a9_request import ( + Model288aa996aba16d7a495c62321ea999a9Request as Model288aa996aba16d7a495c62321ea999a9Request, +) +from bamboohr_sdk.models.model288aa996aba16d7a495c62321ea999a9_request_sent_date_time import ( + Model288aa996aba16d7a495c62321ea999a9RequestSentDateTime as Model288aa996aba16d7a495c62321ea999a9RequestSentDateTime, +) +from bamboohr_sdk.models.model3958585c861325ea7a2cd30a8c74f042_request import ( + Model3958585c861325ea7a2cd30a8c74f042Request as Model3958585c861325ea7a2cd30a8c74f042Request, +) +from bamboohr_sdk.models.model89a5068111ec499135c7d6e9a53d5a30_request import ( + Model89a5068111ec499135c7d6e9a53d5a30Request as Model89a5068111ec499135c7d6e9a53d5a30Request, +) from bamboohr_sdk.models.model_field import ModelField as ModelField +from bamboohr_sdk.models.monitor_field_list import MonitorFieldList as MonitorFieldList +from bamboohr_sdk.models.monitor_field_list_fields_inner import ( + MonitorFieldListFieldsInner as MonitorFieldListFieldsInner, +) +from bamboohr_sdk.models.new_hire_packet_gtky_answer_visibility_item import ( + NewHirePacketGtkyAnswerVisibilityItem as NewHirePacketGtkyAnswerVisibilityItem, +) +from bamboohr_sdk.models.new_hire_packet_gtky_answer_visibility_request import ( + NewHirePacketGtkyAnswerVisibilityRequest as NewHirePacketGtkyAnswerVisibilityRequest, +) +from bamboohr_sdk.models.new_hire_packet_gtky_answer_visibility_response import ( + NewHirePacketGtkyAnswerVisibilityResponse as NewHirePacketGtkyAnswerVisibilityResponse, +) +from bamboohr_sdk.models.new_hire_packet_public_api import NewHirePacketPublicApi as NewHirePacketPublicApi +from bamboohr_sdk.models.new_hire_packet_public_api_writable_body import ( + NewHirePacketPublicApiWritableBody as NewHirePacketPublicApiWritableBody, +) +from bamboohr_sdk.models.new_hire_packets_list_response import NewHirePacketsListResponse as NewHirePacketsListResponse +from bamboohr_sdk.models.new_hire_widget_item import NewHireWidgetItem as NewHireWidgetItem +from bamboohr_sdk.models.new_hire_widget_response import NewHireWidgetResponse as NewHireWidgetResponse from bamboohr_sdk.models.new_web_hook import NewWebHook as NewWebHook +from bamboohr_sdk.models.onboarding_experience_public_api import ( + OnboardingExperiencePublicApi as OnboardingExperiencePublicApi, +) +from bamboohr_sdk.models.onboarding_experiences_list_response import ( + OnboardingExperiencesListResponse as OnboardingExperiencesListResponse, +) +from bamboohr_sdk.models.paged_location_response import PagedLocationResponse as PagedLocationResponse from bamboohr_sdk.models.paged_response import PagedResponse as PagedResponse from bamboohr_sdk.models.pagination import Pagination as Pagination from bamboohr_sdk.models.pagination_meta_data import PaginationMetaData as PaginationMetaData +from bamboohr_sdk.models.patch_company_profile_company_information_request import ( + PatchCompanyProfileCompanyInformationRequest as PatchCompanyProfileCompanyInformationRequest, +) +from bamboohr_sdk.models.patch_company_profile_company_information_request_address import ( + PatchCompanyProfileCompanyInformationRequestAddress as PatchCompanyProfileCompanyInformationRequestAddress, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status import ( + PayGradesAndBandsConfigurationStatus as PayGradesAndBandsConfigurationStatus, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status_job_titles import ( + PayGradesAndBandsConfigurationStatusJobTitles as PayGradesAndBandsConfigurationStatusJobTitles, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status_job_titles_warnings_inner import ( + PayGradesAndBandsConfigurationStatusJobTitlesWarningsInner as PayGradesAndBandsConfigurationStatusJobTitlesWarningsInner, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status_levels import ( + PayGradesAndBandsConfigurationStatusLevels as PayGradesAndBandsConfigurationStatusLevels, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status_levels_errors_inner import ( + PayGradesAndBandsConfigurationStatusLevelsErrorsInner as PayGradesAndBandsConfigurationStatusLevelsErrorsInner, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status_pay_bands import ( + PayGradesAndBandsConfigurationStatusPayBands as PayGradesAndBandsConfigurationStatusPayBands, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status_review import ( + PayGradesAndBandsConfigurationStatusReview as PayGradesAndBandsConfigurationStatusReview, +) +from bamboohr_sdk.models.pay_grades_and_bands_delete_groups_response import ( + PayGradesAndBandsDeleteGroupsResponse as PayGradesAndBandsDeleteGroupsResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_delete_hierarchy_group import ( + PayGradesAndBandsDeleteHierarchyGroup as PayGradesAndBandsDeleteHierarchyGroup, +) +from bamboohr_sdk.models.pay_grades_and_bands_delete_hierarchy_job_title import ( + PayGradesAndBandsDeleteHierarchyJobTitle as PayGradesAndBandsDeleteHierarchyJobTitle, +) +from bamboohr_sdk.models.pay_grades_and_bands_delete_hierarchy_level import ( + PayGradesAndBandsDeleteHierarchyLevel as PayGradesAndBandsDeleteHierarchyLevel, +) +from bamboohr_sdk.models.pay_grades_and_bands_delete_level_response import ( + PayGradesAndBandsDeleteLevelResponse as PayGradesAndBandsDeleteLevelResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_delete_response import ( + PayGradesAndBandsDeleteResponse as PayGradesAndBandsDeleteResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_job_title_assignments_group import ( + PayGradesAndBandsJobTitleAssignmentsGroup as PayGradesAndBandsJobTitleAssignmentsGroup, +) +from bamboohr_sdk.models.pay_grades_and_bands_job_title_assignments_job_title import ( + PayGradesAndBandsJobTitleAssignmentsJobTitle as PayGradesAndBandsJobTitleAssignmentsJobTitle, +) +from bamboohr_sdk.models.pay_grades_and_bands_job_title_assignments_level import ( + PayGradesAndBandsJobTitleAssignmentsLevel as PayGradesAndBandsJobTitleAssignmentsLevel, +) +from bamboohr_sdk.models.pay_grades_and_bands_job_title_assignments_response import ( + PayGradesAndBandsJobTitleAssignmentsResponse as PayGradesAndBandsJobTitleAssignmentsResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_job_title_employee import ( + PayGradesAndBandsJobTitleEmployee as PayGradesAndBandsJobTitleEmployee, +) +from bamboohr_sdk.models.pay_grades_and_bands_job_title_with_employees import ( + PayGradesAndBandsJobTitleWithEmployees as PayGradesAndBandsJobTitleWithEmployees, +) +from bamboohr_sdk.models.pay_grades_and_bands_level import PayGradesAndBandsLevel as PayGradesAndBandsLevel +from bamboohr_sdk.models.pay_grades_and_bands_level_job_title import ( + PayGradesAndBandsLevelJobTitle as PayGradesAndBandsLevelJobTitle, +) +from bamboohr_sdk.models.pay_grades_and_bands_levels_group import ( + PayGradesAndBandsLevelsGroup as PayGradesAndBandsLevelsGroup, +) +from bamboohr_sdk.models.pay_grades_and_bands_levels_response import ( + PayGradesAndBandsLevelsResponse as PayGradesAndBandsLevelsResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_pay_band_job_title import ( + PayGradesAndBandsPayBandJobTitle as PayGradesAndBandsPayBandJobTitle, +) +from bamboohr_sdk.models.pay_grades_and_bands_pay_band_level import ( + PayGradesAndBandsPayBandLevel as PayGradesAndBandsPayBandLevel, +) +from bamboohr_sdk.models.pay_grades_and_bands_pay_bands_group import ( + PayGradesAndBandsPayBandsGroup as PayGradesAndBandsPayBandsGroup, +) +from bamboohr_sdk.models.pay_grades_and_bands_pay_bands_response import ( + PayGradesAndBandsPayBandsResponse as PayGradesAndBandsPayBandsResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_publish_response import ( + PayGradesAndBandsPublishResponse as PayGradesAndBandsPublishResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_published_group import ( + PayGradesAndBandsPublishedGroup as PayGradesAndBandsPublishedGroup, +) +from bamboohr_sdk.models.pay_grades_and_bands_published_job_title import ( + PayGradesAndBandsPublishedJobTitle as PayGradesAndBandsPublishedJobTitle, +) +from bamboohr_sdk.models.pay_grades_and_bands_published_level import ( + PayGradesAndBandsPublishedLevel as PayGradesAndBandsPublishedLevel, +) +from bamboohr_sdk.models.pay_grades_and_bands_published_response import ( + PayGradesAndBandsPublishedResponse as PayGradesAndBandsPublishedResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_review_group import ( + PayGradesAndBandsReviewGroup as PayGradesAndBandsReviewGroup, +) +from bamboohr_sdk.models.pay_grades_and_bands_review_job_title import ( + PayGradesAndBandsReviewJobTitle as PayGradesAndBandsReviewJobTitle, +) +from bamboohr_sdk.models.pay_grades_and_bands_review_level import ( + PayGradesAndBandsReviewLevel as PayGradesAndBandsReviewLevel, +) +from bamboohr_sdk.models.pay_grades_and_bands_review_response import ( + PayGradesAndBandsReviewResponse as PayGradesAndBandsReviewResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_save_levels_response import ( + PayGradesAndBandsSaveLevelsResponse as PayGradesAndBandsSaveLevelsResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_update_job_titles_response import ( + PayGradesAndBandsUpdateJobTitlesResponse as PayGradesAndBandsUpdateJobTitlesResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_update_level import ( + PayGradesAndBandsUpdateLevel as PayGradesAndBandsUpdateLevel, +) +from bamboohr_sdk.models.pay_grades_and_bands_update_levels_group import ( + PayGradesAndBandsUpdateLevelsGroup as PayGradesAndBandsUpdateLevelsGroup, +) +from bamboohr_sdk.models.pay_grades_and_bands_update_levels_request import ( + PayGradesAndBandsUpdateLevelsRequest as PayGradesAndBandsUpdateLevelsRequest, +) +from bamboohr_sdk.models.pay_grades_and_bands_update_pay_band_item import ( + PayGradesAndBandsUpdatePayBandItem as PayGradesAndBandsUpdatePayBandItem, +) +from bamboohr_sdk.models.pay_grades_and_bands_update_pay_bands_response import ( + PayGradesAndBandsUpdatePayBandsResponse as PayGradesAndBandsUpdatePayBandsResponse, +) from bamboohr_sdk.models.person_info_api_transformer import PersonInfoApiTransformer as PersonInfoApiTransformer -from bamboohr_sdk.models.post_goal_comment_request import PostGoalCommentRequest as PostGoalCommentRequest -from bamboohr_sdk.models.post_goal_request import PostGoalRequest as PostGoalRequest -from bamboohr_sdk.models.post_goal_request_milestones_inner import PostGoalRequestMilestonesInner as PostGoalRequestMilestonesInner from bamboohr_sdk.models.post_new_employee import PostNewEmployee as PostNewEmployee from bamboohr_sdk.models.problem_details_response import ProblemDetailsResponse as ProblemDetailsResponse +from bamboohr_sdk.models.problem_details_response_v2 import ProblemDetailsResponseV2 as ProblemDetailsResponseV2 from bamboohr_sdk.models.project_create_request_schema import ProjectCreateRequestSchema as ProjectCreateRequestSchema +from bamboohr_sdk.models.project_create_time_tracking_project_task_v1 import ( + ProjectCreateTimeTrackingProjectTaskV1 as ProjectCreateTimeTrackingProjectTaskV1, +) +from bamboohr_sdk.models.project_create_time_tracking_project_v1 import ( + ProjectCreateTimeTrackingProjectV1 as ProjectCreateTimeTrackingProjectV1, +) +from bamboohr_sdk.models.project_create_time_tracking_project_v1_tasks_inner import ( + ProjectCreateTimeTrackingProjectV1TasksInner as ProjectCreateTimeTrackingProjectV1TasksInner, +) from bamboohr_sdk.models.project_info_api_transformer import ProjectInfoApiTransformer as ProjectInfoApiTransformer -from bamboohr_sdk.models.project_info_api_transformer_project import ProjectInfoApiTransformerProject as ProjectInfoApiTransformerProject -from bamboohr_sdk.models.project_info_api_transformer_task import ProjectInfoApiTransformerTask as ProjectInfoApiTransformerTask -from bamboohr_sdk.models.put_goal_comment_request import PutGoalCommentRequest as PutGoalCommentRequest -from bamboohr_sdk.models.put_goal_milestone_progress_request import PutGoalMilestoneProgressRequest as PutGoalMilestoneProgressRequest -from bamboohr_sdk.models.put_goal_progress_request import PutGoalProgressRequest as PutGoalProgressRequest -from bamboohr_sdk.models.put_goal_shared_with_request import PutGoalSharedWithRequest as PutGoalSharedWithRequest -from bamboohr_sdk.models.put_goal_v11_request import PutGoalV11Request as PutGoalV11Request -from bamboohr_sdk.models.put_goal_v11_request_milestones_inner import PutGoalV11RequestMilestonesInner as PutGoalV11RequestMilestonesInner +from bamboohr_sdk.models.project_info_api_transformer_project import ( + ProjectInfoApiTransformerProject as ProjectInfoApiTransformerProject, +) +from bamboohr_sdk.models.project_legacy_error_response_v1 import ( + ProjectLegacyErrorResponseV1 as ProjectLegacyErrorResponseV1, +) +from bamboohr_sdk.models.project_legacy_error_response_v1_error import ( + ProjectLegacyErrorResponseV1Error as ProjectLegacyErrorResponseV1Error, +) +from bamboohr_sdk.models.project_paginated_response_data_v1 import ( + ProjectPaginatedResponseDataV1 as ProjectPaginatedResponseDataV1, +) +from bamboohr_sdk.models.project_paginated_response_data_v1_meta import ( + ProjectPaginatedResponseDataV1Meta as ProjectPaginatedResponseDataV1Meta, +) +from bamboohr_sdk.models.project_paginated_tasks_response_v1 import ( + ProjectPaginatedTasksResponseV1 as ProjectPaginatedTasksResponseV1, +) +from bamboohr_sdk.models.project_paginated_tasks_response_v1_links import ( + ProjectPaginatedTasksResponseV1Links as ProjectPaginatedTasksResponseV1Links, +) +from bamboohr_sdk.models.project_paginated_tasks_response_v1_meta import ( + ProjectPaginatedTasksResponseV1Meta as ProjectPaginatedTasksResponseV1Meta, +) +from bamboohr_sdk.models.project_paginated_time_tracking_projects_response_v1 import ( + ProjectPaginatedTimeTrackingProjectsResponseV1 as ProjectPaginatedTimeTrackingProjectsResponseV1, +) +from bamboohr_sdk.models.project_standard_api_error_response_v1 import ( + ProjectStandardApiErrorResponseV1 as ProjectStandardApiErrorResponseV1, +) +from bamboohr_sdk.models.project_time_tracking_project_v1 import ( + ProjectTimeTrackingProjectV1 as ProjectTimeTrackingProjectV1, +) +from bamboohr_sdk.models.project_time_tracking_task_v1 import ProjectTimeTrackingTaskV1 as ProjectTimeTrackingTaskV1 +from bamboohr_sdk.models.project_update_time_tracking_project_task_v1 import ( + ProjectUpdateTimeTrackingProjectTaskV1 as ProjectUpdateTimeTrackingProjectTaskV1, +) +from bamboohr_sdk.models.project_update_time_tracking_project_v1 import ( + ProjectUpdateTimeTrackingProjectV1 as ProjectUpdateTimeTrackingProjectV1, +) +from bamboohr_sdk.models.province_item import ProvinceItem as ProvinceItem +from bamboohr_sdk.models.public_custom_field_types_response import ( + PublicCustomFieldTypesResponse as PublicCustomFieldTypesResponse, +) +from bamboohr_sdk.models.public_list_values_custom_field_settings_response import ( + PublicListValuesCustomFieldSettingsResponse as PublicListValuesCustomFieldSettingsResponse, +) +from bamboohr_sdk.models.public_list_values_custom_field_settings_response_values_inner import ( + PublicListValuesCustomFieldSettingsResponseValuesInner as PublicListValuesCustomFieldSettingsResponseValuesInner, +) +from bamboohr_sdk.models.put_company_industry_codes_request import ( + PutCompanyIndustryCodesRequest as PutCompanyIndustryCodesRequest, +) +from bamboohr_sdk.models.put_company_profile_display_name_request import ( + PutCompanyProfileDisplayNameRequest as PutCompanyProfileDisplayNameRequest, +) +from bamboohr_sdk.models.remove_cycle_admin_self_response import ( + RemoveCycleAdminSelfResponse as RemoveCycleAdminSelfResponse, +) +from bamboohr_sdk.models.remove_total_rewards_employees_request import ( + RemoveTotalRewardsEmployeesRequest as RemoveTotalRewardsEmployeesRequest, +) from bamboohr_sdk.models.report import Report as Report from bamboohr_sdk.models.reports_response import ReportsResponse as ReportsResponse from bamboohr_sdk.models.request import Request as Request from bamboohr_sdk.models.request_custom_report import RequestCustomReport as RequestCustomReport from bamboohr_sdk.models.request_custom_report_filters import RequestCustomReportFilters as RequestCustomReportFilters -from bamboohr_sdk.models.request_custom_report_filters_last_changed import RequestCustomReportFiltersLastChanged as RequestCustomReportFiltersLastChanged -from bamboohr_sdk.models.request_custom_report_response import RequestCustomReportResponse as RequestCustomReportResponse -from bamboohr_sdk.models.request_custom_report_response_employees_inner import RequestCustomReportResponseEmployeesInner as RequestCustomReportResponseEmployeesInner -from bamboohr_sdk.models.request_custom_report_response_fields_inner import RequestCustomReportResponseFieldsInner as RequestCustomReportResponseFieldsInner -from bamboohr_sdk.models.set_break_policy_employees_request import SetBreakPolicyEmployeesRequest as SetBreakPolicyEmployeesRequest +from bamboohr_sdk.models.request_custom_report_filters_last_changed import ( + RequestCustomReportFiltersLastChanged as RequestCustomReportFiltersLastChanged, +) +from bamboohr_sdk.models.request_custom_report_response import ( + RequestCustomReportResponse as RequestCustomReportResponse, +) +from bamboohr_sdk.models.request_custom_report_response_employees_inner import ( + RequestCustomReportResponseEmployeesInner as RequestCustomReportResponseEmployeesInner, +) +from bamboohr_sdk.models.request_custom_report_response_fields_inner import ( + RequestCustomReportResponseFieldsInner as RequestCustomReportResponseFieldsInner, +) +from bamboohr_sdk.models.save_change_comm_template_response import ( + SaveChangeCommTemplateResponse as SaveChangeCommTemplateResponse, +) +from bamboohr_sdk.models.scheduling_create_schedule_request_v1 import ( + SchedulingCreateScheduleRequestV1 as SchedulingCreateScheduleRequestV1, +) +from bamboohr_sdk.models.scheduling_create_scheduling_shift_request_v1 import ( + SchedulingCreateSchedulingShiftRequestV1 as SchedulingCreateSchedulingShiftRequestV1, +) +from bamboohr_sdk.models.scheduling_publish_shifts_failure_v1 import ( + SchedulingPublishShiftsFailureV1 as SchedulingPublishShiftsFailureV1, +) +from bamboohr_sdk.models.scheduling_publish_shifts_request import ( + SchedulingPublishShiftsRequest as SchedulingPublishShiftsRequest, +) +from bamboohr_sdk.models.scheduling_publish_shifts_result_v1 import ( + SchedulingPublishShiftsResultV1 as SchedulingPublishShiftsResultV1, +) +from bamboohr_sdk.models.scheduling_schedule_list_response_v1 import ( + SchedulingScheduleListResponseV1 as SchedulingScheduleListResponseV1, +) +from bamboohr_sdk.models.scheduling_schedule_list_response_v1_links import ( + SchedulingScheduleListResponseV1Links as SchedulingScheduleListResponseV1Links, +) +from bamboohr_sdk.models.scheduling_schedule_list_response_v1_meta import ( + SchedulingScheduleListResponseV1Meta as SchedulingScheduleListResponseV1Meta, +) +from bamboohr_sdk.models.scheduling_schedule_v1 import SchedulingScheduleV1 as SchedulingScheduleV1 +from bamboohr_sdk.models.scheduling_scheduling_shift_assessment_v1 import ( + SchedulingSchedulingShiftAssessmentV1 as SchedulingSchedulingShiftAssessmentV1, +) +from bamboohr_sdk.models.scheduling_scheduling_shift_assessment_violation_v1 import ( + SchedulingSchedulingShiftAssessmentViolationV1 as SchedulingSchedulingShiftAssessmentViolationV1, +) +from bamboohr_sdk.models.scheduling_scheduling_shift_v1 import ( + SchedulingSchedulingShiftV1 as SchedulingSchedulingShiftV1, +) +from bamboohr_sdk.models.scheduling_shift_assessment_list_response_v1 import ( + SchedulingShiftAssessmentListResponseV1 as SchedulingShiftAssessmentListResponseV1, +) +from bamboohr_sdk.models.scheduling_shift_assessment_list_response_v1_meta import ( + SchedulingShiftAssessmentListResponseV1Meta as SchedulingShiftAssessmentListResponseV1Meta, +) +from bamboohr_sdk.models.scheduling_shift_list_response_v1 import ( + SchedulingShiftListResponseV1 as SchedulingShiftListResponseV1, +) +from bamboohr_sdk.models.scheduling_shift_list_response_v1_links import ( + SchedulingShiftListResponseV1Links as SchedulingShiftListResponseV1Links, +) +from bamboohr_sdk.models.scheduling_shift_list_response_v1_links_next import ( + SchedulingShiftListResponseV1LinksNext as SchedulingShiftListResponseV1LinksNext, +) +from bamboohr_sdk.models.scheduling_shift_list_response_v1_links_prev import ( + SchedulingShiftListResponseV1LinksPrev as SchedulingShiftListResponseV1LinksPrev, +) +from bamboohr_sdk.models.scheduling_shift_list_response_v1_meta import ( + SchedulingShiftListResponseV1Meta as SchedulingShiftListResponseV1Meta, +) +from bamboohr_sdk.models.scheduling_timezone_list_response_v1 import ( + SchedulingTimezoneListResponseV1 as SchedulingTimezoneListResponseV1, +) +from bamboohr_sdk.models.scheduling_timezone_list_response_v1_meta import ( + SchedulingTimezoneListResponseV1Meta as SchedulingTimezoneListResponseV1Meta, +) +from bamboohr_sdk.models.scheduling_timezone_v1 import SchedulingTimezoneV1 as SchedulingTimezoneV1 +from bamboohr_sdk.models.scheduling_update_schedule_request_v1 import ( + SchedulingUpdateScheduleRequestV1 as SchedulingUpdateScheduleRequestV1, +) +from bamboohr_sdk.models.scheduling_update_scheduling_shift_request_v1 import ( + SchedulingUpdateSchedulingShiftRequestV1 as SchedulingUpdateSchedulingShiftRequestV1, +) +from bamboohr_sdk.models.send_employee_verification_lifecycle_email_by_user_request import ( + SendEmployeeVerificationLifecycleEmailByUserRequest as SendEmployeeVerificationLifecycleEmailByUserRequest, +) +from bamboohr_sdk.models.send_recommendations_response import SendRecommendationsResponse as SendRecommendationsResponse +from bamboohr_sdk.models.set_break_policy_employees_request import ( + SetBreakPolicyEmployeesRequest as SetBreakPolicyEmployeesRequest, +) +from bamboohr_sdk.models.set_total_rewards_custom_disclaimer_request import ( + SetTotalRewardsCustomDisclaimerRequest as SetTotalRewardsCustomDisclaimerRequest, +) +from bamboohr_sdk.models.set_total_rewards_onboarding_step_request import ( + SetTotalRewardsOnboardingStepRequest as SetTotalRewardsOnboardingStepRequest, +) from bamboohr_sdk.models.share_options_response import ShareOptionsResponse as ShareOptionsResponse +from bamboohr_sdk.models.shift_differential_create_time_tracking_shift_differential_v1 import ( + ShiftDifferentialCreateTimeTrackingShiftDifferentialV1 as ShiftDifferentialCreateTimeTrackingShiftDifferentialV1, +) +from bamboohr_sdk.models.shift_differential_create_time_tracking_shift_differential_v1_times_inner import ( + ShiftDifferentialCreateTimeTrackingShiftDifferentialV1TimesInner as ShiftDifferentialCreateTimeTrackingShiftDifferentialV1TimesInner, +) +from bamboohr_sdk.models.shift_differential_paginated_response_data_v1 import ( + ShiftDifferentialPaginatedResponseDataV1 as ShiftDifferentialPaginatedResponseDataV1, +) +from bamboohr_sdk.models.shift_differential_paginated_response_data_v1_meta import ( + ShiftDifferentialPaginatedResponseDataV1Meta as ShiftDifferentialPaginatedResponseDataV1Meta, +) +from bamboohr_sdk.models.shift_differential_paginated_time_tracking_shift_differentials_response_v1 import ( + ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1 as ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1, +) +from bamboohr_sdk.models.shift_differential_time_tracking_shift_differential_time_v1 import ( + ShiftDifferentialTimeTrackingShiftDifferentialTimeV1 as ShiftDifferentialTimeTrackingShiftDifferentialTimeV1, +) +from bamboohr_sdk.models.shift_differential_time_tracking_shift_differential_v1 import ( + ShiftDifferentialTimeTrackingShiftDifferentialV1 as ShiftDifferentialTimeTrackingShiftDifferentialV1, +) +from bamboohr_sdk.models.shift_differential_update_time_tracking_shift_differential_v1 import ( + ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1 as ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1, +) +from bamboohr_sdk.models.standard_api_error_response import StandardApiErrorResponse as StandardApiErrorResponse from bamboohr_sdk.models.state import State as State -from bamboohr_sdk.models.state_province_response_schema import StateProvinceResponseSchema as StateProvinceResponseSchema +from bamboohr_sdk.models.state_province_response_schema import ( + StateProvinceResponseSchema as StateProvinceResponseSchema, +) from bamboohr_sdk.models.state_province_schema import StateProvinceSchema as StateProvinceSchema from bamboohr_sdk.models.table_row_delete_response import TableRowDeleteResponse as TableRowDeleteResponse from bamboohr_sdk.models.table_row_update import TableRowUpdate as TableRowUpdate @@ -674,97 +2012,451 @@ from bamboohr_sdk.models.time_off_request1_type import TimeOffRequest1Type as TimeOffRequest1Type from bamboohr_sdk.models.time_off_request_dates_inner import TimeOffRequestDatesInner as TimeOffRequestDatesInner from bamboohr_sdk.models.time_off_request_notes_inner import TimeOffRequestNotesInner as TimeOffRequestNotesInner -from bamboohr_sdk.models.time_off_types_and_default_hours import TimeOffTypesAndDefaultHours as TimeOffTypesAndDefaultHours -from bamboohr_sdk.models.time_off_types_and_default_hours_default_hours_inner import TimeOffTypesAndDefaultHoursDefaultHoursInner as TimeOffTypesAndDefaultHoursDefaultHoursInner -from bamboohr_sdk.models.time_off_types_and_default_hours_time_off_types_inner import TimeOffTypesAndDefaultHoursTimeOffTypesInner as TimeOffTypesAndDefaultHoursTimeOffTypesInner -from bamboohr_sdk.models.time_tracking_break_policy_employee_collection_v1_inner import TimeTrackingBreakPolicyEmployeeCollectionV1Inner as TimeTrackingBreakPolicyEmployeeCollectionV1Inner -from bamboohr_sdk.models.time_tracking_bulk_response_schema import TimeTrackingBulkResponseSchema as TimeTrackingBulkResponseSchema -from bamboohr_sdk.models.time_tracking_bulk_response_schema_response import TimeTrackingBulkResponseSchemaResponse as TimeTrackingBulkResponseSchemaResponse -from bamboohr_sdk.models.time_tracking_create_or_update_time_tracking_break_without_policy_v1 import TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1 as TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1 -from bamboohr_sdk.models.time_tracking_create_time_tracking_break_policy_v1 import TimeTrackingCreateTimeTrackingBreakPolicyV1 as TimeTrackingCreateTimeTrackingBreakPolicyV1 -from bamboohr_sdk.models.time_tracking_create_time_tracking_break_v1 import TimeTrackingCreateTimeTrackingBreakV1 as TimeTrackingCreateTimeTrackingBreakV1 -from bamboohr_sdk.models.time_tracking_delete_response_schema import TimeTrackingDeleteResponseSchema as TimeTrackingDeleteResponseSchema -from bamboohr_sdk.models.time_tracking_id_response_schema import TimeTrackingIdResponseSchema as TimeTrackingIdResponseSchema -from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1 import TimeTrackingOffsetPaginatedResponseDataV1 as TimeTrackingOffsetPaginatedResponseDataV1 -from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1_links import TimeTrackingOffsetPaginatedResponseDataV1Links as TimeTrackingOffsetPaginatedResponseDataV1Links -from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1_links_next import TimeTrackingOffsetPaginatedResponseDataV1LinksNext as TimeTrackingOffsetPaginatedResponseDataV1LinksNext -from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1_links_prev import TimeTrackingOffsetPaginatedResponseDataV1LinksPrev as TimeTrackingOffsetPaginatedResponseDataV1LinksPrev -from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1_meta import TimeTrackingOffsetPaginatedResponseDataV1Meta as TimeTrackingOffsetPaginatedResponseDataV1Meta -from bamboohr_sdk.models.time_tracking_paginated_break_assessments_response_v1 import TimeTrackingPaginatedBreakAssessmentsResponseV1 as TimeTrackingPaginatedBreakAssessmentsResponseV1 -from bamboohr_sdk.models.time_tracking_paginated_break_policies_response_v1 import TimeTrackingPaginatedBreakPoliciesResponseV1 as TimeTrackingPaginatedBreakPoliciesResponseV1 -from bamboohr_sdk.models.time_tracking_paginated_break_policy_employees_response_v1 import TimeTrackingPaginatedBreakPolicyEmployeesResponseV1 as TimeTrackingPaginatedBreakPolicyEmployeesResponseV1 -from bamboohr_sdk.models.time_tracking_paginated_breaks_response_v1 import TimeTrackingPaginatedBreaksResponseV1 as TimeTrackingPaginatedBreaksResponseV1 -from bamboohr_sdk.models.time_tracking_project_with_tasks_and_employee_ids import TimeTrackingProjectWithTasksAndEmployeeIds as TimeTrackingProjectWithTasksAndEmployeeIds +from bamboohr_sdk.models.time_off_types_and_default_hours import ( + TimeOffTypesAndDefaultHours as TimeOffTypesAndDefaultHours, +) +from bamboohr_sdk.models.time_off_types_and_default_hours_default_hours_inner import ( + TimeOffTypesAndDefaultHoursDefaultHoursInner as TimeOffTypesAndDefaultHoursDefaultHoursInner, +) +from bamboohr_sdk.models.time_off_types_and_default_hours_time_off_types_inner import ( + TimeOffTypesAndDefaultHoursTimeOffTypesInner as TimeOffTypesAndDefaultHoursTimeOffTypesInner, +) +from bamboohr_sdk.models.time_tracking_break_policy_employee_collection_v1_inner import ( + TimeTrackingBreakPolicyEmployeeCollectionV1Inner as TimeTrackingBreakPolicyEmployeeCollectionV1Inner, +) +from bamboohr_sdk.models.time_tracking_break_policy_suggestions_response_v1 import ( + TimeTrackingBreakPolicySuggestionsResponseV1 as TimeTrackingBreakPolicySuggestionsResponseV1, +) +from bamboohr_sdk.models.time_tracking_break_policy_suggestions_response_v1_suggested_policies_inner import ( + TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner as TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner, +) +from bamboohr_sdk.models.time_tracking_break_policy_suggestions_response_v1_suggested_policies_inner_breaks_inner import ( + TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner as TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner, +) +from bamboohr_sdk.models.time_tracking_bulk_response_schema import ( + TimeTrackingBulkResponseSchema as TimeTrackingBulkResponseSchema, +) +from bamboohr_sdk.models.time_tracking_bulk_response_schema_response import ( + TimeTrackingBulkResponseSchemaResponse as TimeTrackingBulkResponseSchemaResponse, +) +from bamboohr_sdk.models.time_tracking_bulk_upsert_employee_time_tracking_data_accepted_v1 import ( + TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1 as TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1, +) +from bamboohr_sdk.models.time_tracking_bulk_upsert_employee_time_tracking_data_record_v1 import ( + TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1 as TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1, +) +from bamboohr_sdk.models.time_tracking_clock_entry_location_v1 import ( + TimeTrackingClockEntryLocationV1 as TimeTrackingClockEntryLocationV1, +) +from bamboohr_sdk.models.time_tracking_clock_entry_paginated_response_data_v1 import ( + TimeTrackingClockEntryPaginatedResponseDataV1 as TimeTrackingClockEntryPaginatedResponseDataV1, +) +from bamboohr_sdk.models.time_tracking_clock_entry_paginated_response_data_v1_meta import ( + TimeTrackingClockEntryPaginatedResponseDataV1Meta as TimeTrackingClockEntryPaginatedResponseDataV1Meta, +) +from bamboohr_sdk.models.time_tracking_clock_entry_v1 import TimeTrackingClockEntryV1 as TimeTrackingClockEntryV1 +from bamboohr_sdk.models.time_tracking_configuration_paginated_response_data_v1 import ( + TimeTrackingConfigurationPaginatedResponseDataV1 as TimeTrackingConfigurationPaginatedResponseDataV1, +) +from bamboohr_sdk.models.time_tracking_configuration_paginated_response_data_v1_links import ( + TimeTrackingConfigurationPaginatedResponseDataV1Links as TimeTrackingConfigurationPaginatedResponseDataV1Links, +) +from bamboohr_sdk.models.time_tracking_configuration_paginated_response_data_v1_links_next import ( + TimeTrackingConfigurationPaginatedResponseDataV1LinksNext as TimeTrackingConfigurationPaginatedResponseDataV1LinksNext, +) +from bamboohr_sdk.models.time_tracking_configuration_paginated_response_data_v1_links_prev import ( + TimeTrackingConfigurationPaginatedResponseDataV1LinksPrev as TimeTrackingConfigurationPaginatedResponseDataV1LinksPrev, +) +from bamboohr_sdk.models.time_tracking_configuration_paginated_response_data_v1_meta import ( + TimeTrackingConfigurationPaginatedResponseDataV1Meta as TimeTrackingConfigurationPaginatedResponseDataV1Meta, +) +from bamboohr_sdk.models.time_tracking_create_clock_in_v1 import ( + TimeTrackingCreateClockInV1 as TimeTrackingCreateClockInV1, +) +from bamboohr_sdk.models.time_tracking_create_clock_out_v1 import ( + TimeTrackingCreateClockOutV1 as TimeTrackingCreateClockOutV1, +) +from bamboohr_sdk.models.time_tracking_create_or_update_time_tracking_break_without_policy_v1 import ( + TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1 as TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1, +) +from bamboohr_sdk.models.time_tracking_create_time_tracking_break_policy_v1 import ( + TimeTrackingCreateTimeTrackingBreakPolicyV1 as TimeTrackingCreateTimeTrackingBreakPolicyV1, +) +from bamboohr_sdk.models.time_tracking_create_time_tracking_break_v1 import ( + TimeTrackingCreateTimeTrackingBreakV1 as TimeTrackingCreateTimeTrackingBreakV1, +) +from bamboohr_sdk.models.time_tracking_create_time_tracking_configuration_v1 import ( + TimeTrackingCreateTimeTrackingConfigurationV1 as TimeTrackingCreateTimeTrackingConfigurationV1, +) +from bamboohr_sdk.models.time_tracking_delete_response_schema import ( + TimeTrackingDeleteResponseSchema as TimeTrackingDeleteResponseSchema, +) +from bamboohr_sdk.models.time_tracking_employee_enrollment_paginated_response_data_v1 import ( + TimeTrackingEmployeeEnrollmentPaginatedResponseDataV1 as TimeTrackingEmployeeEnrollmentPaginatedResponseDataV1, +) +from bamboohr_sdk.models.time_tracking_employee_time_tracking_data_v1 import ( + TimeTrackingEmployeeTimeTrackingDataV1 as TimeTrackingEmployeeTimeTrackingDataV1, +) +from bamboohr_sdk.models.time_tracking_hour_entry_paginated_response_data_v1 import ( + TimeTrackingHourEntryPaginatedResponseDataV1 as TimeTrackingHourEntryPaginatedResponseDataV1, +) +from bamboohr_sdk.models.time_tracking_hour_entry_v1 import TimeTrackingHourEntryV1 as TimeTrackingHourEntryV1 +from bamboohr_sdk.models.time_tracking_id_response_schema import ( + TimeTrackingIdResponseSchema as TimeTrackingIdResponseSchema, +) +from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1 import ( + TimeTrackingOffsetPaginatedResponseDataV1 as TimeTrackingOffsetPaginatedResponseDataV1, +) +from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1_links import ( + TimeTrackingOffsetPaginatedResponseDataV1Links as TimeTrackingOffsetPaginatedResponseDataV1Links, +) +from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1_meta import ( + TimeTrackingOffsetPaginatedResponseDataV1Meta as TimeTrackingOffsetPaginatedResponseDataV1Meta, +) +from bamboohr_sdk.models.time_tracking_page_paginated_response_data_v1 import ( + TimeTrackingPagePaginatedResponseDataV1 as TimeTrackingPagePaginatedResponseDataV1, +) +from bamboohr_sdk.models.time_tracking_paginated_break_assessments_response_v1 import ( + TimeTrackingPaginatedBreakAssessmentsResponseV1 as TimeTrackingPaginatedBreakAssessmentsResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_break_policies_response_v1 import ( + TimeTrackingPaginatedBreakPoliciesResponseV1 as TimeTrackingPaginatedBreakPoliciesResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_break_policy_employees_response_v1 import ( + TimeTrackingPaginatedBreakPolicyEmployeesResponseV1 as TimeTrackingPaginatedBreakPolicyEmployeesResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_breaks_response_v1 import ( + TimeTrackingPaginatedBreaksResponseV1 as TimeTrackingPaginatedBreaksResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_clock_entries_response_v1 import ( + TimeTrackingPaginatedClockEntriesResponseV1 as TimeTrackingPaginatedClockEntriesResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_employee_time_tracking_data_response_v1 import ( + TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1 as TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_hour_entries_response_v1 import ( + TimeTrackingPaginatedHourEntriesResponseV1 as TimeTrackingPaginatedHourEntriesResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_time_tracking_configurations_response_v1 import ( + TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1 as TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_time_tracking_kiosks_response_v1 import ( + TimeTrackingPaginatedTimeTrackingKiosksResponseV1 as TimeTrackingPaginatedTimeTrackingKiosksResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_time_tracking_time_clocks_response_v1 import ( + TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1 as TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_timesheets_response_v1 import ( + TimeTrackingPaginatedTimesheetsResponseV1 as TimeTrackingPaginatedTimesheetsResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_timesheets_response_v1_meta import ( + TimeTrackingPaginatedTimesheetsResponseV1Meta as TimeTrackingPaginatedTimesheetsResponseV1Meta, +) +from bamboohr_sdk.models.time_tracking_project_with_tasks_and_employee_ids import ( + TimeTrackingProjectWithTasksAndEmployeeIds as TimeTrackingProjectWithTasksAndEmployeeIds, +) from bamboohr_sdk.models.time_tracking_record import TimeTrackingRecord as TimeTrackingRecord from bamboohr_sdk.models.time_tracking_record_schema import TimeTrackingRecordSchema as TimeTrackingRecordSchema -from bamboohr_sdk.models.time_tracking_record_schema_project import TimeTrackingRecordSchemaProject as TimeTrackingRecordSchemaProject -from bamboohr_sdk.models.time_tracking_record_schema_project_task import TimeTrackingRecordSchemaProjectTask as TimeTrackingRecordSchemaProjectTask -from bamboohr_sdk.models.time_tracking_record_schema_shift_differential import TimeTrackingRecordSchemaShiftDifferential as TimeTrackingRecordSchemaShiftDifferential -from bamboohr_sdk.models.time_tracking_sync_time_tracking_break_policy_v1 import TimeTrackingSyncTimeTrackingBreakPolicyV1 as TimeTrackingSyncTimeTrackingBreakPolicyV1 +from bamboohr_sdk.models.time_tracking_sync_time_tracking_break_policy_v1 import ( + TimeTrackingSyncTimeTrackingBreakPolicyV1 as TimeTrackingSyncTimeTrackingBreakPolicyV1, +) from bamboohr_sdk.models.time_tracking_task import TimeTrackingTask as TimeTrackingTask -from bamboohr_sdk.models.time_tracking_time_tracking_break_assessment_v1 import TimeTrackingTimeTrackingBreakAssessmentV1 as TimeTrackingTimeTrackingBreakAssessmentV1 -from bamboohr_sdk.models.time_tracking_time_tracking_break_assessment_violation_v1 import TimeTrackingTimeTrackingBreakAssessmentViolationV1 as TimeTrackingTimeTrackingBreakAssessmentViolationV1 -from bamboohr_sdk.models.time_tracking_time_tracking_break_availability_v1 import TimeTrackingTimeTrackingBreakAvailabilityV1 as TimeTrackingTimeTrackingBreakAvailabilityV1 -from bamboohr_sdk.models.time_tracking_time_tracking_break_policy_v1 import TimeTrackingTimeTrackingBreakPolicyV1 as TimeTrackingTimeTrackingBreakPolicyV1 -from bamboohr_sdk.models.time_tracking_time_tracking_break_policy_with_relations_v1 import TimeTrackingTimeTrackingBreakPolicyWithRelationsV1 as TimeTrackingTimeTrackingBreakPolicyWithRelationsV1 -from bamboohr_sdk.models.time_tracking_time_tracking_break_v1 import TimeTrackingTimeTrackingBreakV1 as TimeTrackingTimeTrackingBreakV1 -from bamboohr_sdk.models.time_tracking_update_time_tracking_break_policy_v1 import TimeTrackingUpdateTimeTrackingBreakPolicyV1 as TimeTrackingUpdateTimeTrackingBreakPolicyV1 -from bamboohr_sdk.models.time_tracking_update_time_tracking_break_v1 import TimeTrackingUpdateTimeTrackingBreakV1 as TimeTrackingUpdateTimeTrackingBreakV1 -from bamboohr_sdk.models.timesheet_entry_info_api_transformer import TimesheetEntryInfoApiTransformer as TimesheetEntryInfoApiTransformer -from bamboohr_sdk.models.timesheet_entry_info_api_transformer_break_info import TimesheetEntryInfoApiTransformerBreakInfo as TimesheetEntryInfoApiTransformerBreakInfo +from bamboohr_sdk.models.time_tracking_time_tracking_break_assessment_v1 import ( + TimeTrackingTimeTrackingBreakAssessmentV1 as TimeTrackingTimeTrackingBreakAssessmentV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_break_assessment_violation_v1 import ( + TimeTrackingTimeTrackingBreakAssessmentViolationV1 as TimeTrackingTimeTrackingBreakAssessmentViolationV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_break_availability_v1 import ( + TimeTrackingTimeTrackingBreakAvailabilityV1 as TimeTrackingTimeTrackingBreakAvailabilityV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_break_policy_v1 import ( + TimeTrackingTimeTrackingBreakPolicyV1 as TimeTrackingTimeTrackingBreakPolicyV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_break_policy_with_relations_v1 import ( + TimeTrackingTimeTrackingBreakPolicyWithRelationsV1 as TimeTrackingTimeTrackingBreakPolicyWithRelationsV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_break_v1 import ( + TimeTrackingTimeTrackingBreakV1 as TimeTrackingTimeTrackingBreakV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_configuration_v1 import ( + TimeTrackingTimeTrackingConfigurationV1 as TimeTrackingTimeTrackingConfigurationV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_hour_entry_v1 import ( + TimeTrackingTimeTrackingHourEntryV1 as TimeTrackingTimeTrackingHourEntryV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_kiosk_v1 import ( + TimeTrackingTimeTrackingKioskV1 as TimeTrackingTimeTrackingKioskV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_time_clock_v1 import ( + TimeTrackingTimeTrackingTimeClockV1 as TimeTrackingTimeTrackingTimeClockV1, +) +from bamboohr_sdk.models.time_tracking_timesheet_v1 import TimeTrackingTimesheetV1 as TimeTrackingTimesheetV1 +from bamboohr_sdk.models.time_tracking_update_clock_entry_v1 import ( + TimeTrackingUpdateClockEntryV1 as TimeTrackingUpdateClockEntryV1, +) +from bamboohr_sdk.models.time_tracking_update_employee_time_tracking_data_v1 import ( + TimeTrackingUpdateEmployeeTimeTrackingDataV1 as TimeTrackingUpdateEmployeeTimeTrackingDataV1, +) +from bamboohr_sdk.models.time_tracking_update_time_tracking_break_policy_v1 import ( + TimeTrackingUpdateTimeTrackingBreakPolicyV1 as TimeTrackingUpdateTimeTrackingBreakPolicyV1, +) +from bamboohr_sdk.models.time_tracking_update_time_tracking_break_v1 import ( + TimeTrackingUpdateTimeTrackingBreakV1 as TimeTrackingUpdateTimeTrackingBreakV1, +) +from bamboohr_sdk.models.time_tracking_update_time_tracking_configuration_v1 import ( + TimeTrackingUpdateTimeTrackingConfigurationV1 as TimeTrackingUpdateTimeTrackingConfigurationV1, +) +from bamboohr_sdk.models.time_tracking_update_time_tracking_kiosk_v1 import ( + TimeTrackingUpdateTimeTrackingKioskV1 as TimeTrackingUpdateTimeTrackingKioskV1, +) +from bamboohr_sdk.models.time_tracking_update_time_tracking_time_clock_v1 import ( + TimeTrackingUpdateTimeTrackingTimeClockV1 as TimeTrackingUpdateTimeTrackingTimeClockV1, +) +from bamboohr_sdk.models.timesheet_entry_info_api_transformer import ( + TimesheetEntryInfoApiTransformer as TimesheetEntryInfoApiTransformer, +) +from bamboohr_sdk.models.timesheet_timesheet_daily_entry_v1 import ( + TimesheetTimesheetDailyEntryV1 as TimesheetTimesheetDailyEntryV1, +) +from bamboohr_sdk.models.timesheet_timesheet_daily_summary_v1 import ( + TimesheetTimesheetDailySummaryV1 as TimesheetTimesheetDailySummaryV1, +) from bamboohr_sdk.models.timezone_list_response import TimezoneListResponse as TimezoneListResponse from bamboohr_sdk.models.timezone_resource import TimezoneResource as TimezoneResource +from bamboohr_sdk.models.total_rewards_benefit_details_values import ( + TotalRewardsBenefitDetailsValues as TotalRewardsBenefitDetailsValues, +) +from bamboohr_sdk.models.total_rewards_benefit_section_values import ( + TotalRewardsBenefitSectionValues as TotalRewardsBenefitSectionValues, +) +from bamboohr_sdk.models.total_rewards_calendar_section_values import ( + TotalRewardsCalendarSectionValues as TotalRewardsCalendarSectionValues, +) +from bamboohr_sdk.models.total_rewards_comp_summary_values import ( + TotalRewardsCompSummaryValues as TotalRewardsCompSummaryValues, +) +from bamboohr_sdk.models.total_rewards_custom_disclaimer_info import ( + TotalRewardsCustomDisclaimerInfo as TotalRewardsCustomDisclaimerInfo, +) +from bamboohr_sdk.models.total_rewards_employee_statement import ( + TotalRewardsEmployeeStatement as TotalRewardsEmployeeStatement, +) +from bamboohr_sdk.models.total_rewards_equity_details_values import ( + TotalRewardsEquityDetailsValues as TotalRewardsEquityDetailsValues, +) +from bamboohr_sdk.models.total_rewards_equity_estimated_valuation_values import ( + TotalRewardsEquityEstimatedValuationValues as TotalRewardsEquityEstimatedValuationValues, +) +from bamboohr_sdk.models.total_rewards_equity_growth_chart_item import ( + TotalRewardsEquityGrowthChartItem as TotalRewardsEquityGrowthChartItem, +) +from bamboohr_sdk.models.total_rewards_equity_growth_estimation import ( + TotalRewardsEquityGrowthEstimation as TotalRewardsEquityGrowthEstimation, +) +from bamboohr_sdk.models.total_rewards_equity_section_values import ( + TotalRewardsEquitySectionValues as TotalRewardsEquitySectionValues, +) +from bamboohr_sdk.models.total_rewards_extra_pay_details_values import ( + TotalRewardsExtraPayDetailsValues as TotalRewardsExtraPayDetailsValues, +) +from bamboohr_sdk.models.total_rewards_extra_pay_section_values import ( + TotalRewardsExtraPaySectionValues as TotalRewardsExtraPaySectionValues, +) +from bamboohr_sdk.models.total_rewards_holiday_value import TotalRewardsHolidayValue as TotalRewardsHolidayValue +from bamboohr_sdk.models.total_rewards_onboarding_step import TotalRewardsOnboardingStep as TotalRewardsOnboardingStep +from bamboohr_sdk.models.total_rewards_overview_section_values import ( + TotalRewardsOverviewSectionValues as TotalRewardsOverviewSectionValues, +) +from bamboohr_sdk.models.total_rewards_time_off_policy_value import ( + TotalRewardsTimeOffPolicyValue as TotalRewardsTimeOffPolicyValue, +) +from bamboohr_sdk.models.total_rewards_timeline_item import TotalRewardsTimelineItem as TotalRewardsTimelineItem +from bamboohr_sdk.models.total_rewards_timeline_item_label import ( + TotalRewardsTimelineItemLabel as TotalRewardsTimelineItemLabel, +) +from bamboohr_sdk.models.total_rewards_timeline_section_values import ( + TotalRewardsTimelineSectionValues as TotalRewardsTimelineSectionValues, +) from bamboohr_sdk.models.training_category import TrainingCategory as TrainingCategory from bamboohr_sdk.models.training_record import TrainingRecord as TrainingRecord from bamboohr_sdk.models.training_record_map import TrainingRecordMap as TrainingRecordMap from bamboohr_sdk.models.training_record_type import TrainingRecordType as TrainingRecordType from bamboohr_sdk.models.training_type import TrainingType as TrainingType from bamboohr_sdk.models.training_type_category import TrainingTypeCategory as TrainingTypeCategory -from bamboohr_sdk.models.training_type_due_from_hire_date import TrainingTypeDueFromHireDate as TrainingTypeDueFromHireDate -from bamboohr_sdk.models.training_type_due_from_hire_date_one_of import TrainingTypeDueFromHireDateOneOf as TrainingTypeDueFromHireDateOneOf -from bamboohr_sdk.models.transformed_api_employee_goal_details import TransformedApiEmployeeGoalDetails as TransformedApiEmployeeGoalDetails -from bamboohr_sdk.models.transformed_api_employee_goal_details_goal import TransformedApiEmployeeGoalDetailsGoal as TransformedApiEmployeeGoalDetailsGoal +from bamboohr_sdk.models.transformed_api_employee_goal_details import ( + TransformedApiEmployeeGoalDetails as TransformedApiEmployeeGoalDetails, +) +from bamboohr_sdk.models.transformed_api_employee_goal_details_goal import ( + TransformedApiEmployeeGoalDetailsGoal as TransformedApiEmployeeGoalDetailsGoal, +) from bamboohr_sdk.models.transformed_api_goal import TransformedApiGoal as TransformedApiGoal -from bamboohr_sdk.models.transformed_api_goal_actions import TransformedApiGoalActions as TransformedApiGoalActions -from bamboohr_sdk.models.transformed_api_goal_milestones_inner import TransformedApiGoalMilestonesInner as TransformedApiGoalMilestonesInner -from bamboohr_sdk.models.unassign_employees_from_break_policy_request import UnassignEmployeesFromBreakPolicyRequest as UnassignEmployeesFromBreakPolicyRequest -from bamboohr_sdk.models.update_applicant_status_request import UpdateApplicantStatusRequest as UpdateApplicantStatusRequest -from bamboohr_sdk.models.update_applicant_status_response import UpdateApplicantStatusResponse as UpdateApplicantStatusResponse -from bamboohr_sdk.models.update_employee_training_record_request import UpdateEmployeeTrainingRecordRequest as UpdateEmployeeTrainingRecordRequest -from bamboohr_sdk.models.update_training_category_request import UpdateTrainingCategoryRequest as UpdateTrainingCategoryRequest +from bamboohr_sdk.models.transformed_api_goal_milestones_inner import ( + TransformedApiGoalMilestonesInner as TransformedApiGoalMilestonesInner, +) +from bamboohr_sdk.models.unarchive_custom_fields_request import ( + UnarchiveCustomFieldsRequest as UnarchiveCustomFieldsRequest, +) +from bamboohr_sdk.models.unarchive_custom_fields_response import ( + UnarchiveCustomFieldsResponse as UnarchiveCustomFieldsResponse, +) +from bamboohr_sdk.models.unassign_employees_from_break_policy_request import ( + UnassignEmployeesFromBreakPolicyRequest as UnassignEmployeesFromBreakPolicyRequest, +) +from bamboohr_sdk.models.update_applicant_status_request import ( + UpdateApplicantStatusRequest as UpdateApplicantStatusRequest, +) +from bamboohr_sdk.models.update_applicant_status_response import ( + UpdateApplicantStatusResponse as UpdateApplicantStatusResponse, +) +from bamboohr_sdk.models.update_company_industry_codes400_response import ( + UpdateCompanyIndustryCodes400Response as UpdateCompanyIndustryCodes400Response, +) +from bamboohr_sdk.models.update_company_industry_codes403_response import ( + UpdateCompanyIndustryCodes403Response as UpdateCompanyIndustryCodes403Response, +) +from bamboohr_sdk.models.update_company_industry_codes404_response import ( + UpdateCompanyIndustryCodes404Response as UpdateCompanyIndustryCodes404Response, +) +from bamboohr_sdk.models.update_company_industry_codes500_response import ( + UpdateCompanyIndustryCodes500Response as UpdateCompanyIndustryCodes500Response, +) +from bamboohr_sdk.models.update_company_industry_codes_response import ( + UpdateCompanyIndustryCodesResponse as UpdateCompanyIndustryCodesResponse, +) +from bamboohr_sdk.models.update_company_name_bad_request_response import ( + UpdateCompanyNameBadRequestResponse as UpdateCompanyNameBadRequestResponse, +) +from bamboohr_sdk.models.update_company_name_bad_request_response_error import ( + UpdateCompanyNameBadRequestResponseError as UpdateCompanyNameBadRequestResponseError, +) +from bamboohr_sdk.models.update_company_name_forbidden_response import ( + UpdateCompanyNameForbiddenResponse as UpdateCompanyNameForbiddenResponse, +) +from bamboohr_sdk.models.update_company_name_forbidden_response_error import ( + UpdateCompanyNameForbiddenResponseError as UpdateCompanyNameForbiddenResponseError, +) +from bamboohr_sdk.models.update_company_name_internal_error_response import ( + UpdateCompanyNameInternalErrorResponse as UpdateCompanyNameInternalErrorResponse, +) +from bamboohr_sdk.models.update_company_name_success_response import ( + UpdateCompanyNameSuccessResponse as UpdateCompanyNameSuccessResponse, +) +from bamboohr_sdk.models.update_compensation_benchmark_request import ( + UpdateCompensationBenchmarkRequest as UpdateCompensationBenchmarkRequest, +) +from bamboohr_sdk.models.update_compensation_benchmark_source_item import ( + UpdateCompensationBenchmarkSourceItem as UpdateCompensationBenchmarkSourceItem, +) +from bamboohr_sdk.models.update_compensation_benchmark_sources_request import ( + UpdateCompensationBenchmarkSourcesRequest as UpdateCompensationBenchmarkSourcesRequest, +) +from bamboohr_sdk.models.update_compensation_benchmark_sources_response import ( + UpdateCompensationBenchmarkSourcesResponse as UpdateCompensationBenchmarkSourcesResponse, +) +from bamboohr_sdk.models.update_employee_training_record_request import ( + UpdateEmployeeTrainingRecordRequest as UpdateEmployeeTrainingRecordRequest, +) +from bamboohr_sdk.models.update_employee_verification_integration_request import ( + UpdateEmployeeVerificationIntegrationRequest as UpdateEmployeeVerificationIntegrationRequest, +) +from bamboohr_sdk.models.update_employee_verification_request import ( + UpdateEmployeeVerificationRequest as UpdateEmployeeVerificationRequest, +) +from bamboohr_sdk.models.update_goal_comment_request import UpdateGoalCommentRequest as UpdateGoalCommentRequest +from bamboohr_sdk.models.update_goal_milestone_progress_request import ( + UpdateGoalMilestoneProgressRequest as UpdateGoalMilestoneProgressRequest, +) +from bamboohr_sdk.models.update_goal_progress_request import UpdateGoalProgressRequest as UpdateGoalProgressRequest +from bamboohr_sdk.models.update_goal_sharing_request import UpdateGoalSharingRequest as UpdateGoalSharingRequest +from bamboohr_sdk.models.update_goal_v1 import UpdateGoalV1 as UpdateGoalV1 +from bamboohr_sdk.models.update_goal_v11_request import UpdateGoalV11Request as UpdateGoalV11Request +from bamboohr_sdk.models.update_goal_v11_request_milestones_inner import ( + UpdateGoalV11RequestMilestonesInner as UpdateGoalV11RequestMilestonesInner, +) +from bamboohr_sdk.models.update_location_request import UpdateLocationRequest as UpdateLocationRequest +from bamboohr_sdk.models.update_location_request_address import ( + UpdateLocationRequestAddress as UpdateLocationRequestAddress, +) +from bamboohr_sdk.models.update_pay_bands_request import UpdatePayBandsRequest as UpdatePayBandsRequest +from bamboohr_sdk.models.update_training_category_request import ( + UpdateTrainingCategoryRequest as UpdateTrainingCategoryRequest, +) from bamboohr_sdk.models.update_training_type_request import UpdateTrainingTypeRequest as UpdateTrainingTypeRequest -from bamboohr_sdk.models.update_training_type_request_category import UpdateTrainingTypeRequestCategory as UpdateTrainingTypeRequestCategory -from bamboohr_sdk.models.update_webhook_bad_request_response import UpdateWebhookBadRequestResponse as UpdateWebhookBadRequestResponse +from bamboohr_sdk.models.update_training_type_request_category import ( + UpdateTrainingTypeRequestCategory as UpdateTrainingTypeRequestCategory, +) +from bamboohr_sdk.models.update_webhook_bad_request_response import ( + UpdateWebhookBadRequestResponse as UpdateWebhookBadRequestResponse, +) +from bamboohr_sdk.models.updated_compensation_benchmark import ( + UpdatedCompensationBenchmark as UpdatedCompensationBenchmark, +) +from bamboohr_sdk.models.updated_compensation_benchmark_saved_benchmark import ( + UpdatedCompensationBenchmarkSavedBenchmark as UpdatedCompensationBenchmarkSavedBenchmark, +) +from bamboohr_sdk.models.upload_employee_photo_request1 import ( + UploadEmployeePhotoRequest1 as UploadEmployeePhotoRequest1, +) +from bamboohr_sdk.models.user_permission_data import UserPermissionData as UserPermissionData from bamboohr_sdk.models.web_hook_post_field_data_object import WebHookPostFieldDataObject as WebHookPostFieldDataObject -from bamboohr_sdk.models.web_hook_post_field_page_data_object import WebHookPostFieldPageDataObject as WebHookPostFieldPageDataObject -from bamboohr_sdk.models.web_hook_post_field_response_object import WebHookPostFieldResponseObject as WebHookPostFieldResponseObject -from bamboohr_sdk.models.web_hook_post_field_table_data_object import WebHookPostFieldTableDataObject as WebHookPostFieldTableDataObject +from bamboohr_sdk.models.web_hook_post_field_page_data_object import ( + WebHookPostFieldPageDataObject as WebHookPostFieldPageDataObject, +) +from bamboohr_sdk.models.web_hook_post_field_response_object import ( + WebHookPostFieldResponseObject as WebHookPostFieldResponseObject, +) +from bamboohr_sdk.models.web_hook_post_field_table_data_object import ( + WebHookPostFieldTableDataObject as WebHookPostFieldTableDataObject, +) from bamboohr_sdk.models.web_hook_response import WebHookResponse as WebHookResponse from bamboohr_sdk.models.webhook import Webhook as Webhook from bamboohr_sdk.models.webhook_bad_request import WebhookBadRequest as WebhookBadRequest -from bamboohr_sdk.models.webhook_bad_request_errors_inner import WebhookBadRequestErrorsInner as WebhookBadRequestErrorsInner +from bamboohr_sdk.models.webhook_bad_request_errors_inner import ( + WebhookBadRequestErrorsInner as WebhookBadRequestErrorsInner, +) from bamboohr_sdk.models.webhook_error import WebhookError as WebhookError from bamboohr_sdk.models.webhook_error_errors import WebhookErrorErrors as WebhookErrorErrors from bamboohr_sdk.models.webhook_event_type import WebhookEventType as WebhookEventType from bamboohr_sdk.models.webhook_log_entry import WebhookLogEntry as WebhookLogEntry from bamboohr_sdk.models.webhook_log_list_response import WebhookLogListResponse as WebhookLogListResponse -from bamboohr_sdk.models.webhook_log_rate_limit_response import WebhookLogRateLimitResponse as WebhookLogRateLimitResponse -from bamboohr_sdk.models.webhook_log_rate_limit_response_error import WebhookLogRateLimitResponseError as WebhookLogRateLimitResponseError +from bamboohr_sdk.models.webhook_log_rate_limit_response import ( + WebhookLogRateLimitResponse as WebhookLogRateLimitResponse, +) +from bamboohr_sdk.models.webhook_log_rate_limit_response_error import ( + WebhookLogRateLimitResponseError as WebhookLogRateLimitResponseError, +) from bamboohr_sdk.models.webhook_sub_error_property import WebhookSubErrorProperty as WebhookSubErrorProperty -from bamboohr_sdk.models.webhook_sub_error_property_monitor_fields_inner import WebhookSubErrorPropertyMonitorFieldsInner as WebhookSubErrorPropertyMonitorFieldsInner -from bamboohr_sdk.models.webhook_sub_error_property_monitor_fields_inner_id import WebhookSubErrorPropertyMonitorFieldsInnerId as WebhookSubErrorPropertyMonitorFieldsInnerId -from bamboohr_sdk.models.webhook_sub_error_property_unknown_fields_inner import WebhookSubErrorPropertyUnknownFieldsInner as WebhookSubErrorPropertyUnknownFieldsInner -from bamboohr_sdk.models.webhook_sub_error_property_unknown_fields_inner_id import WebhookSubErrorPropertyUnknownFieldsInnerId as WebhookSubErrorPropertyUnknownFieldsInnerId +from bamboohr_sdk.models.webhook_sub_error_property_monitor_fields_inner import ( + WebhookSubErrorPropertyMonitorFieldsInner as WebhookSubErrorPropertyMonitorFieldsInner, +) +from bamboohr_sdk.models.webhook_sub_error_property_monitor_fields_inner_id import ( + WebhookSubErrorPropertyMonitorFieldsInnerId as WebhookSubErrorPropertyMonitorFieldsInnerId, +) +from bamboohr_sdk.models.webhook_sub_error_property_unknown_fields_inner import ( + WebhookSubErrorPropertyUnknownFieldsInner as WebhookSubErrorPropertyUnknownFieldsInner, +) +from bamboohr_sdk.models.webhook_sub_error_property_unknown_fields_inner_id import ( + WebhookSubErrorPropertyUnknownFieldsInnerId as WebhookSubErrorPropertyUnknownFieldsInnerId, +) from bamboohr_sdk.models.webhooks_list import WebhooksList as WebhooksList from bamboohr_sdk.models.webhooks_list_webhooks_inner import WebhooksListWebhooksInner as WebhooksListWebhooksInner from bamboohr_sdk.models.whos_out_entry import WhosOutEntry as WhosOutEntry -from bamboohr_sdk.models.xml_directory_employee import XmlDirectoryEmployee as XmlDirectoryEmployee -from bamboohr_sdk.models.xml_directory_employee_employees import XmlDirectoryEmployeeEmployees as XmlDirectoryEmployeeEmployees -from bamboohr_sdk.models.xml_directory_employee_employees_employee_inner import XmlDirectoryEmployeeEmployeesEmployeeInner as XmlDirectoryEmployeeEmployeesEmployeeInner -from bamboohr_sdk.models.xml_directory_employee_employees_employee_inner_field_inner import XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner as XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner -from bamboohr_sdk.models.xml_directory_employee_fieldset import XmlDirectoryEmployeeFieldset as XmlDirectoryEmployeeFieldset -from bamboohr_sdk.models.xml_directory_employee_fieldset_field_inner import XmlDirectoryEmployeeFieldsetFieldInner as XmlDirectoryEmployeeFieldsetFieldInner +from bamboohr_sdk.models.whos_out_list_response_v1 import WhosOutListResponseV1 as WhosOutListResponseV1 +from bamboohr_sdk.models.whos_out_list_response_v1_links import WhosOutListResponseV1Links as WhosOutListResponseV1Links +from bamboohr_sdk.models.whos_out_list_response_v1_links_next import ( + WhosOutListResponseV1LinksNext as WhosOutListResponseV1LinksNext, +) +from bamboohr_sdk.models.whos_out_list_response_v1_links_prev import ( + WhosOutListResponseV1LinksPrev as WhosOutListResponseV1LinksPrev, +) +from bamboohr_sdk.models.whos_out_list_response_v1_meta import WhosOutListResponseV1Meta as WhosOutListResponseV1Meta +from bamboohr_sdk.models.whos_out_person_v1 import WhosOutPersonV1 as WhosOutPersonV1 +from bamboohr_sdk.models.whos_out_v1 import WhosOutV1 as WhosOutV1 from bamboohr_sdk.models.xml_employee_files import XmlEmployeeFiles as XmlEmployeeFiles -from bamboohr_sdk.models.xml_employee_files_category_inner import XmlEmployeeFilesCategoryInner as XmlEmployeeFilesCategoryInner -from bamboohr_sdk.models.xml_employee_files_category_inner_file_inner import XmlEmployeeFilesCategoryInnerFileInner as XmlEmployeeFilesCategoryInnerFileInner - +from bamboohr_sdk.models.xml_employee_files_category_inner import ( + XmlEmployeeFilesCategoryInner as XmlEmployeeFilesCategoryInner, +) +from bamboohr_sdk.models.xml_employee_files_category_inner_file_inner import ( + XmlEmployeeFilesCategoryInnerFileInner as XmlEmployeeFilesCategoryInnerFileInner, +) diff --git a/bamboohr_sdk/api/__init__.py b/bamboohr_sdk/api/__init__.py index 76cded4..b7a8a5d 100644 --- a/bamboohr_sdk/api/__init__.py +++ b/bamboohr_sdk/api/__init__.py @@ -2,23 +2,37 @@ # import apis into api package from bamboohr_sdk.api.account_information_api import AccountInformationApi +from bamboohr_sdk.api.alerts_api import AlertsApi from bamboohr_sdk.api.applicant_tracking_api import ApplicantTrackingApi from bamboohr_sdk.api.benefits_api import BenefitsApi +from bamboohr_sdk.api.calendar_events_api import CalendarEventsApi +from bamboohr_sdk.api.change_tracking_api import ChangeTrackingApi +from bamboohr_sdk.api.company_api import CompanyApi from bamboohr_sdk.api.company_files_api import CompanyFilesApi from bamboohr_sdk.api.company_profile_api import CompanyProfileApi +from bamboohr_sdk.api.compensation_api import CompensationApi +from bamboohr_sdk.api.compensation_benchmarking_api import CompensationBenchmarkingApi +from bamboohr_sdk.api.compensation_planning_api import CompensationPlanningApi +from bamboohr_sdk.api.custom_fields_api import CustomFieldsApi from bamboohr_sdk.api.custom_reports_api import CustomReportsApi from bamboohr_sdk.api.datasets_api import DatasetsApi from bamboohr_sdk.api.employee_files_api import EmployeeFilesApi +from bamboohr_sdk.api.employee_tables_api import EmployeeTablesApi +from bamboohr_sdk.api.employee_verification_api import EmployeeVerificationApi from bamboohr_sdk.api.employees_api import EmployeesApi from bamboohr_sdk.api.goals_api import GoalsApi +from bamboohr_sdk.api.holidays_api import HolidaysApi from bamboohr_sdk.api.hours_api import HoursApi -from bamboohr_sdk.api.last_change_information_api import LastChangeInformationApi +from bamboohr_sdk.api.locations_api import LocationsApi from bamboohr_sdk.api.login_api import LoginApi +from bamboohr_sdk.api.meal_rest_breaks_api import MealRestBreaksApi +from bamboohr_sdk.api.onboarding_api import OnboardingApi +from bamboohr_sdk.api.pay_grades_bands_api import PayGradesBandsApi from bamboohr_sdk.api.photos_api import PhotosApi from bamboohr_sdk.api.reports_api import ReportsApi -from bamboohr_sdk.api.tabular_data_api import TabularDataApi +from bamboohr_sdk.api.scheduling_api import SchedulingApi from bamboohr_sdk.api.time_off_api import TimeOffApi from bamboohr_sdk.api.time_tracking_api import TimeTrackingApi +from bamboohr_sdk.api.total_rewards_api import TotalRewardsApi from bamboohr_sdk.api.training_api import TrainingApi from bamboohr_sdk.api.webhooks_api import WebhooksApi - diff --git a/bamboohr_sdk/api/account_information_api.py b/bamboohr_sdk/api/account_information_api.py index c248a86..bdd0247 100644 --- a/bamboohr_sdk/api/account_information_api.py +++ b/bamboohr_sdk/api/account_information_api.py @@ -1,35 +1,36 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" + +from typing import Annotated, Any -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call -from pydantic import Field, StrictInt, StrictStr, field_validator -from typing import Dict, List, Optional -from typing_extensions import Annotated +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.bank_holiday import BankHoliday +from bamboohr_sdk.models.countries_options_response import CountriesOptionsResponse from bamboohr_sdk.models.country_schema import CountrySchema +from bamboohr_sdk.models.currency_conversions_response import CurrencyConversionsResponse from bamboohr_sdk.models.field1 import Field1 +from bamboohr_sdk.models.industry import Industry from bamboohr_sdk.models.list_field_detail import ListFieldDetail from bamboohr_sdk.models.list_field_values import ListFieldValues from bamboohr_sdk.models.list_users_response_value import ListUsersResponseValue +from bamboohr_sdk.models.meta_company_properties_response import MetaCompanyPropertiesResponse +from bamboohr_sdk.models.meta_currency_type_item import MetaCurrencyTypeItem +from bamboohr_sdk.models.province_item import ProvinceItem from bamboohr_sdk.models.state_province_response_schema import StateProvinceResponseSchema from bamboohr_sdk.models.tabular_field import TabularField from bamboohr_sdk.models.timezone_list_response import TimezoneListResponse - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.timezone_resource import TimezoneResource from bamboohr_sdk.rest import RESTResponseType @@ -45,42 +46,82 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call + def baa7162824294d030115568d1d8e6ca7( + self, + id: Annotated[StrictInt | None, Field(description="The numeric ID of the timezone to retrieve.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimezoneResource: + """Get timezone by ID + + Retrieves a single timezone by its numeric ID. Returns the same timezone resource shape used by the list endpoint. OAuth Scopes: meta + + :param id: The numeric ID of the timezone to retrieve. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._baa7162824294d030115568d1d8e6ca7_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimezoneResource", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data @validate_call - def call_5c5fb0f1211ae1c9451753f92f1053b6( + def baa7162824294d030115568d1d8e6ca7_with_http_info( self, - page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page.")] = None, - page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="Ordering by OData (Open Data Protocol) v4 specification")] = None, - select: Annotated[Optional[StrictStr], Field(description="Projection (field selection) by OData specification")] = None, - filter: Annotated[Optional[StrictStr], Field(description="Filter by an OData (Open Data Protocol) v4 specification")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt | None, Field(description="The numeric ID of the timezone to retrieve.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimezoneListResponse: - """List timezones + ) -> ApiResponse[TimezoneResource]: + """Get timezone by ID - Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters. + Retrieves a single timezone by its numeric ID. Returns the same timezone resource shape used by the list endpoint. OAuth Scopes: meta - :param page_size: The number of items to return per page. - :type page_size: int - :param page: The page number to retrieve. - :type page: int - :param sort: Ordering by OData (Open Data Protocol) v4 specification - :type sort: str - :param select: Projection (field selection) by OData specification - :type select: str - :param filter: Filter by an OData (Open Data Protocol) v4 specification - :type filter: str + :param id: The numeric ID of the timezone to retrieve. (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -101,73 +142,2102 @@ def call_5c5fb0f1211ae1c9451753f92f1053b6( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._call_5c5fb0f1211ae1c9451753f92f1053b6_serialize( - page_size=page_size, - page=page, - sort=sort, - select=select, - filter=filter, + _param = self._baa7162824294d030115568d1d8e6ca7_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimezoneResource", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def baa7162824294d030115568d1d8e6ca7_without_preload_content( + self, + id: Annotated[StrictInt | None, Field(description="The numeric ID of the timezone to retrieve.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get timezone by ID + + Retrieves a single timezone by its numeric ID. Returns the same timezone resource shape used by the list endpoint. OAuth Scopes: meta + + :param id: The numeric ID of the timezone to retrieve. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._baa7162824294d030115568d1d8e6ca7_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimezoneResource", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _baa7162824294d030115568d1d8e6ca7_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/meta/timezones/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_10d66d8561dd7dac50ff9c21ef63d83b( + self, + zip: Annotated[str, Field(strict=True, description="A 5-digit US ZIP code.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimezoneResource: + """Get timezone by ZIP code + + Retrieves the timezone for a US ZIP code. Returns the same timezone resource shape used by the list endpoint. Only US ZIP codes are supported; valid 5-digit ZIPs that are not present in our reference data return a 404. OAuth Scopes: meta + + :param zip: A 5-digit US ZIP code. (required) + :type zip: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_10d66d8561dd7dac50ff9c21ef63d83b_serialize( + zip=zip, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimezoneListResponse", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimezoneResource", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call + def call_10d66d8561dd7dac50ff9c21ef63d83b_with_http_info( + self, + zip: Annotated[str, Field(strict=True, description="A 5-digit US ZIP code.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimezoneResource]: + """Get timezone by ZIP code + + Retrieves the timezone for a US ZIP code. Returns the same timezone resource shape used by the list endpoint. Only US ZIP codes are supported; valid 5-digit ZIPs that are not present in our reference data return a 404. OAuth Scopes: meta + + :param zip: A 5-digit US ZIP code. (required) + :type zip: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_10d66d8561dd7dac50ff9c21ef63d83b_serialize( + zip=zip, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimezoneResource", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) @validate_call - def call_5c5fb0f1211ae1c9451753f92f1053b6_with_http_info( + def call_10d66d8561dd7dac50ff9c21ef63d83b_without_preload_content( self, - page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page.")] = None, - page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="Ordering by OData (Open Data Protocol) v4 specification")] = None, - select: Annotated[Optional[StrictStr], Field(description="Projection (field selection) by OData specification")] = None, - filter: Annotated[Optional[StrictStr], Field(description="Filter by an OData (Open Data Protocol) v4 specification")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + zip: Annotated[str, Field(strict=True, description="A 5-digit US ZIP code.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimezoneListResponse]: - """List timezones + ) -> RESTResponseType: + """Get timezone by ZIP code - Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters. + Retrieves the timezone for a US ZIP code. Returns the same timezone resource shape used by the list endpoint. Only US ZIP codes are supported; valid 5-digit ZIPs that are not present in our reference data return a 404. OAuth Scopes: meta - :param page_size: The number of items to return per page. - :type page_size: int - :param page: The page number to retrieve. - :type page: int - :param sort: Ordering by OData (Open Data Protocol) v4 specification - :type sort: str - :param select: Projection (field selection) by OData specification - :type select: str - :param filter: Filter by an OData (Open Data Protocol) v4 specification - :type filter: str + :param zip: A 5-digit US ZIP code. (required) + :type zip: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_10d66d8561dd7dac50ff9c21ef63d83b_serialize( + zip=zip, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimezoneResource", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_10d66d8561dd7dac50ff9c21ef63d83b_serialize( + self, + zip, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if zip is not None: + _path_params["zip"] = zip + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/meta/timezones/by-zip/{zip}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_5c5fb0f1211ae1c9451753f92f1053b6( + self, + page_size: Annotated[StrictInt | None, Field(description="The number of items to return per page.")] = None, + page: Annotated[StrictInt | None, Field(description="The page number to retrieve.")] = None, + sort: Annotated[ + StrictStr | None, Field(description="Ordering by OData (Open Data Protocol) v4 specification") + ] = None, + select: Annotated[ + StrictStr | None, Field(description="Projection (field selection) by OData specification") + ] = None, + filter: Annotated[ + StrictStr | None, Field(description="Filter by an OData (Open Data Protocol) v4 specification") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimezoneListResponse: + """List timezones + + Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters. + + :param page_size: The number of items to return per page. + :type page_size: int + :param page: The page number to retrieve. + :type page: int + :param sort: Ordering by OData (Open Data Protocol) v4 specification + :type sort: str + :param select: Projection (field selection) by OData specification + :type select: str + :param filter: Filter by an OData (Open Data Protocol) v4 specification + :type filter: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_5c5fb0f1211ae1c9451753f92f1053b6_serialize( + page_size=page_size, + page=page, + sort=sort, + select=select, + filter=filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimezoneListResponse", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_5c5fb0f1211ae1c9451753f92f1053b6_with_http_info( + self, + page_size: Annotated[StrictInt | None, Field(description="The number of items to return per page.")] = None, + page: Annotated[StrictInt | None, Field(description="The page number to retrieve.")] = None, + sort: Annotated[ + StrictStr | None, Field(description="Ordering by OData (Open Data Protocol) v4 specification") + ] = None, + select: Annotated[ + StrictStr | None, Field(description="Projection (field selection) by OData specification") + ] = None, + filter: Annotated[ + StrictStr | None, Field(description="Filter by an OData (Open Data Protocol) v4 specification") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimezoneListResponse]: + """List timezones + + Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters. + + :param page_size: The number of items to return per page. + :type page_size: int + :param page: The page number to retrieve. + :type page: int + :param sort: Ordering by OData (Open Data Protocol) v4 specification + :type sort: str + :param select: Projection (field selection) by OData specification + :type select: str + :param filter: Filter by an OData (Open Data Protocol) v4 specification + :type filter: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_5c5fb0f1211ae1c9451753f92f1053b6_serialize( + page_size=page_size, + page=page, + sort=sort, + select=select, + filter=filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimezoneListResponse", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_5c5fb0f1211ae1c9451753f92f1053b6_without_preload_content( + self, + page_size: Annotated[StrictInt | None, Field(description="The number of items to return per page.")] = None, + page: Annotated[StrictInt | None, Field(description="The page number to retrieve.")] = None, + sort: Annotated[ + StrictStr | None, Field(description="Ordering by OData (Open Data Protocol) v4 specification") + ] = None, + select: Annotated[ + StrictStr | None, Field(description="Projection (field selection) by OData specification") + ] = None, + filter: Annotated[ + StrictStr | None, Field(description="Filter by an OData (Open Data Protocol) v4 specification") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List timezones + + Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters. + + :param page_size: The number of items to return per page. + :type page_size: int + :param page: The page number to retrieve. + :type page: int + :param sort: Ordering by OData (Open Data Protocol) v4 specification + :type sort: str + :param select: Projection (field selection) by OData specification + :type select: str + :param filter: Filter by an OData (Open Data Protocol) v4 specification + :type filter: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_5c5fb0f1211ae1c9451753f92f1053b6_serialize( + page_size=page_size, + page=page, + sort=sort, + select=select, + filter=filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimezoneListResponse", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_5c5fb0f1211ae1c9451753f92f1053b6_serialize( + self, + page_size, + page, + sort, + select, + filter, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + if page is not None: + _query_params.append(("page", page)) + + if sort is not None: + _query_params.append(("sort", sort)) + + if select is not None: + _query_params.append(("select", select)) + + if filter is not None: + _query_params.append(("filter", filter)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = [] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/meta/timezones", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_all_currency_types( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> list[MetaCurrencyTypeItem]: + """Get all currency types + + Returns a JSON array of supported currency catalog entries. Each object includes `id`, `code`, `name`, `symbol` (display symbol), and `symbolPosition`—an integer discriminator: `0` = symbol before the amount (prefix) and `1` = after the amount (postfix), matching the values returned in the JSON body. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_all_currency_types_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[MetaCurrencyTypeItem]", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_all_currency_types_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[list[MetaCurrencyTypeItem]]: + """Get all currency types + + Returns a JSON array of supported currency catalog entries. Each object includes `id`, `code`, `name`, `symbol` (display symbol), and `symbolPosition`—an integer discriminator: `0` = symbol before the amount (prefix) and `1` = after the amount (postfix), matching the values returned in the JSON body. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_all_currency_types_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[MetaCurrencyTypeItem]", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_all_currency_types_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get all currency types + + Returns a JSON array of supported currency catalog entries. Each object includes `id`, `code`, `name`, `symbol` (display symbol), and `symbolPosition`—an integer discriminator: `0` = symbol before the amount (prefix) and `1` = after the amount (postfix), matching the values returned in the JSON body. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_all_currency_types_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[MetaCurrencyTypeItem]", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_all_currency_types_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/meta/currency/types", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_all_provinces( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> list[ProvinceItem]: + """Get All Provinces + + Returns a flat list of all states and provinces across every country. Each entry includes a numeric ID, the countryId it belongs to, an abbreviation label (e.g. \"UT\"), an ISO 3166-2 code (e.g. \"US-UT\"), and a full name. Use the countryId field to filter client-side. OAuth Scopes: meta + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_all_provinces_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[ProvinceItem]", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_all_provinces_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[list[ProvinceItem]]: + """Get All Provinces + + Returns a flat list of all states and provinces across every country. Each entry includes a numeric ID, the countryId it belongs to, an abbreviation label (e.g. \"UT\"), an ISO 3166-2 code (e.g. \"US-UT\"), and a full name. Use the countryId field to filter client-side. OAuth Scopes: meta + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_all_provinces_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[ProvinceItem]", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_all_provinces_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get All Provinces + + Returns a flat list of all states and provinces across every country. Each entry includes a numeric ID, the countryId it belongs to, an abbreviation label (e.g. \"UT\"), an ISO 3166-2 code (e.g. \"US-UT\"), and a full name. Use the countryId field to filter client-side. OAuth Scopes: meta + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_all_provinces_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[ProvinceItem]", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_all_provinces_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/meta/provinces", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_countries_options( + self, + iso_code: Annotated[ + Annotated[str, Field(min_length=2, strict=True, max_length=2)] | None, + Field( + description="ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CountriesOptionsResponse: + """Get Countries + + Returns a JSON array of every country in the catalog, or a single country object when `isoCode` is supplied. Each element has `id` (Country ID), `name` (Country Name), and `isoCode` (ISO 3166-1 alpha-2 code or null when unset). OAuth Scopes: field, meta + + :param iso_code: ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array. + :type iso_code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_countries_options_serialize( + iso_code=iso_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CountriesOptionsResponse", + "404": None, + "422": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_countries_options_with_http_info( + self, + iso_code: Annotated[ + Annotated[str, Field(min_length=2, strict=True, max_length=2)] | None, + Field( + description="ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CountriesOptionsResponse]: + """Get Countries + + Returns a JSON array of every country in the catalog, or a single country object when `isoCode` is supplied. Each element has `id` (Country ID), `name` (Country Name), and `isoCode` (ISO 3166-1 alpha-2 code or null when unset). OAuth Scopes: field, meta + + :param iso_code: ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array. + :type iso_code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_countries_options_serialize( + iso_code=iso_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CountriesOptionsResponse", + "404": None, + "422": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_countries_options_without_preload_content( + self, + iso_code: Annotated[ + Annotated[str, Field(min_length=2, strict=True, max_length=2)] | None, + Field( + description="ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Countries + + Returns a JSON array of every country in the catalog, or a single country object when `isoCode` is supplied. Each element has `id` (Country ID), `name` (Country Name), and `isoCode` (ISO 3166-1 alpha-2 code or null when unset). OAuth Scopes: field, meta + + :param iso_code: ISO 3166-1 alpha-2 country code (exactly two letters). When present, returns the matching country as a single object instead of the full array. + :type iso_code: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_countries_options_serialize( + iso_code=iso_code, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CountriesOptionsResponse", + "404": None, + "422": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_countries_options_serialize( + self, + iso_code, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if iso_code is not None: + _query_params.append(("isoCode", iso_code)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/meta/countries/options", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_country_by_id( + self, + id: Annotated[ + str, + Field( + strict=True, + description="Country id, as a numeric string. Obtain valid ids from the `id` field of Get Countries (`get-countries-options`).", + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CountrySchema: + """Get Country by ID + + Returns a single country from the catalog as a JSON object, identified by its numeric id. Each field matches the corresponding element returned by Get Countries (`get-countries-options`). Use this for a single country lookup by id. For ISO 3166-1 code lookup or the full country list, use Get Countries (`get-countries-options`) instead. OAuth Scopes: meta + + :param id: Country id, as a numeric string. Obtain valid ids from the `id` field of Get Countries (`get-countries-options`). (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_country_by_id_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CountrySchema", + "422": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_country_by_id_with_http_info( + self, + id: Annotated[ + str, + Field( + strict=True, + description="Country id, as a numeric string. Obtain valid ids from the `id` field of Get Countries (`get-countries-options`).", + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CountrySchema]: + """Get Country by ID + + Returns a single country from the catalog as a JSON object, identified by its numeric id. Each field matches the corresponding element returned by Get Countries (`get-countries-options`). Use this for a single country lookup by id. For ISO 3166-1 code lookup or the full country list, use Get Countries (`get-countries-options`) instead. OAuth Scopes: meta + + :param id: Country id, as a numeric string. Obtain valid ids from the `id` field of Get Countries (`get-countries-options`). (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_country_by_id_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CountrySchema", + "422": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_country_by_id_without_preload_content( + self, + id: Annotated[ + str, + Field( + strict=True, + description="Country id, as a numeric string. Obtain valid ids from the `id` field of Get Countries (`get-countries-options`).", + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Country by ID + + Returns a single country from the catalog as a JSON object, identified by its numeric id. Each field matches the corresponding element returned by Get Countries (`get-countries-options`). Use this for a single country lookup by id. For ISO 3166-1 code lookup or the full country list, use Get Countries (`get-countries-options`) instead. OAuth Scopes: meta + + :param id: Country id, as a numeric string. Obtain valid ids from the `id` field of Get Countries (`get-countries-options`). (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_country_by_id_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CountrySchema", + "422": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_country_by_id_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/meta/countries/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_currency_conversions( + self, + base_currency: Annotated[ + Annotated[str, Field(min_length=3, strict=True, max_length=3)] | None, + Field( + description="ISO 4217 alphabetic base currency code (for example USD or EUR). Case-insensitive; values are normalized to uppercase. Defaults to USD when omitted. A well-formed code with no stored rate snapshot returns 404." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CurrencyConversionsResponse: + """Get Currency Conversion Rates + + Returns the latest currency conversion rate snapshot for a single base currency. The response is a single JSON object whose `rates` field is a map of ISO 4217 currency codes to conversion rates relative to the base currency; the base currency itself maps to `1`. The rate-map keys match the `code` values from **Get All Currency Types** (`get-all-currency-types`). A well-formed base currency code that has no stored snapshot returns 404 rather than an empty object. OAuth Scopes: meta + + :param base_currency: ISO 4217 alphabetic base currency code (for example USD or EUR). Case-insensitive; values are normalized to uppercase. Defaults to USD when omitted. A well-formed code with no stored rate snapshot returns 404. + :type base_currency: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_currency_conversions_serialize( + base_currency=base_currency, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CurrencyConversionsResponse", + "400": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "503": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_currency_conversions_with_http_info( + self, + base_currency: Annotated[ + Annotated[str, Field(min_length=3, strict=True, max_length=3)] | None, + Field( + description="ISO 4217 alphabetic base currency code (for example USD or EUR). Case-insensitive; values are normalized to uppercase. Defaults to USD when omitted. A well-formed code with no stored rate snapshot returns 404." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CurrencyConversionsResponse]: + """Get Currency Conversion Rates + + Returns the latest currency conversion rate snapshot for a single base currency. The response is a single JSON object whose `rates` field is a map of ISO 4217 currency codes to conversion rates relative to the base currency; the base currency itself maps to `1`. The rate-map keys match the `code` values from **Get All Currency Types** (`get-all-currency-types`). A well-formed base currency code that has no stored snapshot returns 404 rather than an empty object. OAuth Scopes: meta + + :param base_currency: ISO 4217 alphabetic base currency code (for example USD or EUR). Case-insensitive; values are normalized to uppercase. Defaults to USD when omitted. A well-formed code with no stored rate snapshot returns 404. + :type base_currency: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_currency_conversions_serialize( + base_currency=base_currency, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CurrencyConversionsResponse", + "400": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "503": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_currency_conversions_without_preload_content( + self, + base_currency: Annotated[ + Annotated[str, Field(min_length=3, strict=True, max_length=3)] | None, + Field( + description="ISO 4217 alphabetic base currency code (for example USD or EUR). Case-insensitive; values are normalized to uppercase. Defaults to USD when omitted. A well-formed code with no stored rate snapshot returns 404." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Currency Conversion Rates + + Returns the latest currency conversion rate snapshot for a single base currency. The response is a single JSON object whose `rates` field is a map of ISO 4217 currency codes to conversion rates relative to the base currency; the base currency itself maps to `1`. The rate-map keys match the `code` values from **Get All Currency Types** (`get-all-currency-types`). A well-formed base currency code that has no stored snapshot returns 404 rather than an empty object. OAuth Scopes: meta + + :param base_currency: ISO 4217 alphabetic base currency code (for example USD or EUR). Case-insensitive; values are normalized to uppercase. Defaults to USD when omitted. A well-formed code with no stored rate snapshot returns 404. + :type base_currency: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_currency_conversions_serialize( + base_currency=base_currency, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CurrencyConversionsResponse", + "400": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "503": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_currency_conversions_serialize( + self, + base_currency, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if base_currency is not None: + _query_params.append(("baseCurrency", base_currency)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/meta/currency-conversions", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_meta_company( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MetaCompanyPropertiesResponse: + """Get company properties + + Get company properties including ID, name, domain, and base API URL. Provides essential company metadata for API access. OAuth Scopes: company:info + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_meta_company_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "MetaCompanyPropertiesResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_meta_company_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MetaCompanyPropertiesResponse]: + """Get company properties + + Get company properties including ID, name, domain, and base API URL. Provides essential company metadata for API access. OAuth Scopes: company:info + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_meta_company_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "MetaCompanyPropertiesResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_meta_company_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get company properties + + Get company properties including ID, name, domain, and base API URL. Provides essential company metadata for API access. OAuth Scopes: company:info + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_meta_company_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "MetaCompanyPropertiesResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_meta_company_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/meta/company", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_states_by_country_id( + self, + country_id: Annotated[ + StrictInt | None, + Field( + description="Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> StateProvinceResponseSchema: + """List states and provinces for a country by Country ID + + Returns the list of states or provinces for the specified country, sorted alphabetically by abbreviation (`options[].label`). Each item follows StateProvinceSchema: `label` is the subdivision abbreviation (e.g. \"UT\"), not the full name; `name` is the full subdivision name; `iso` is the ISO 3166-2 code (e.g. \"US-UT\"). Use a `countryId` from `GET /api/v1/meta/countries/options` (the `id` field on the row for the country) so it matches the countries list. OAuth Scopes: field + + :param country_id: Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`. (required) + :type country_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_states_by_country_id_serialize( + country_id=country_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "StateProvinceResponseSchema", + "400": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_states_by_country_id_with_http_info( + self, + country_id: Annotated[ + StrictInt | None, + Field( + description="Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[StateProvinceResponseSchema]: + """List states and provinces for a country by Country ID + + Returns the list of states or provinces for the specified country, sorted alphabetically by abbreviation (`options[].label`). Each item follows StateProvinceSchema: `label` is the subdivision abbreviation (e.g. \"UT\"), not the full name; `name` is the full subdivision name; `iso` is the ISO 3166-2 code (e.g. \"US-UT\"). Use a `countryId` from `GET /api/v1/meta/countries/options` (the `id` field on the row for the country) so it matches the countries list. OAuth Scopes: field + + :param country_id: Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`. (required) + :type country_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -188,73 +2258,50 @@ def call_5c5fb0f1211ae1c9451753f92f1053b6_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._call_5c5fb0f1211ae1c9451753f92f1053b6_serialize( - page_size=page_size, - page=page, - sort=sort, - select=select, - filter=filter, + _param = self._get_states_by_country_id_serialize( + country_id=country_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimezoneListResponse", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "StateProvinceResponseSchema", + "400": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def call_5c5fb0f1211ae1c9451753f92f1053b6_without_preload_content( + def get_states_by_country_id_without_preload_content( self, - page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page.")] = None, - page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="Ordering by OData (Open Data Protocol) v4 specification")] = None, - select: Annotated[Optional[StrictStr], Field(description="Projection (field selection) by OData specification")] = None, - filter: Annotated[Optional[StrictStr], Field(description="Filter by an OData (Open Data Protocol) v4 specification")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + country_id: Annotated[ + StrictInt | None, + Field( + description="Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List timezones + """List states and provinces for a country by Country ID - Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters. + Returns the list of states or provinces for the specified country, sorted alphabetically by abbreviation (`options[].label`). Each item follows StateProvinceSchema: `label` is the subdivision abbreviation (e.g. \"UT\"), not the full name; `name` is the full subdivision name; `iso` is the ISO 3166-2 code (e.g. \"US-UT\"). Use a `countryId` from `GET /api/v1/meta/countries/options` (the `id` field on the row for the country) so it matches the countries list. OAuth Scopes: field - :param page_size: The number of items to return per page. - :type page_size: int - :param page: The page number to retrieve. - :type page: int - :param sort: Ordering by OData (Open Data Protocol) v4 specification - :type sort: str - :param select: Projection (field selection) by OData specification - :type select: str - :param filter: Filter by an OData (Open Data Protocol) v4 specification - :type filter: str + :param country_id: Numeric id of the country, taken from the countries options list. Use the `id` of the target country from `GET /api/v1/meta/countries/options`. (required) + :type country_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -275,41 +2322,26 @@ def call_5c5fb0f1211ae1c9451753f92f1053b6_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._call_5c5fb0f1211ae1c9451753f92f1053b6_serialize( - page_size=page_size, - page=page, - sort=sort, - select=select, - filter=filter, + _param = self._get_states_by_country_id_serialize( + country_id=country_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimezoneListResponse", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "StateProvinceResponseSchema", + "400": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _call_5c5fb0f1211ae1c9451753f92f1053b6_serialize( + def _get_states_by_country_id_serialize( self, - page_size, - page, - sort, - select, - filter, + country_id, _request_auth, _content_type, _headers, @@ -318,62 +2350,33 @@ def _call_5c5fb0f1211ae1c9451753f92f1053b6_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters + if country_id is not None: + _path_params["countryId"] = country_id # process the query parameters - if page_size is not None: - - _query_params.append(('pageSize', page_size)) - - if page is not None: - - _query_params.append(('page', page)) - - if sort is not None: - - _query_params.append(('sort', sort)) - - if select is not None: - - _query_params.append(('select', select)) - - if filter is not None: - - _query_params.append(('filter', filter)) - # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/problem+json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/meta/timezones', + method="GET", + resource_path="/api/v1/meta/provinces/{countryId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -383,32 +2386,32 @@ def _call_5c5fb0f1211ae1c9451753f92f1053b6_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_countries_options( + def list_bank_holidays( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + year: Annotated[ + Annotated[int, Field(le=9999, strict=True, ge=1)] | None, + Field( + description="When set, only holidays whose dates fall in this calendar year are returned. When omitted, all bank holidays are returned. Values outside 1-9999 return 422." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[CountrySchema]: - """Get Countries + ) -> list[BankHoliday]: + """List Bank Holidays - Returns the full list of countries supported by BambooHR, each with a numeric string ID, full name, and ISO 3166-1 alpha-2 code. The returned IDs can be passed to the Get States by Country ID endpoint to retrieve the corresponding states or provinces. + Returns global bank holiday reference dates (US federal and related bank holidays maintained by BambooHR), not company-configured holidays. The response is a JSON array of holiday objects sorted by date in ascending order. Provide `year` to return only holidays whose dates fall within that calendar year; omit it to return the full multi-year reference set. OAuth Scopes: meta + :param year: When set, only holidays whose dates fall in this calendar year are returned. When omitted, all bank holidays are returned. Values outside 1-9999 return 422. + :type year: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -429,49 +2432,53 @@ def get_countries_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_countries_options_serialize( + _param = self._list_bank_holidays_serialize( + year=year, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[CountrySchema]", + _response_types_map: dict[str, str | None] = { + "200": "List[BankHoliday]", + "422": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_countries_options_with_http_info( + def list_bank_holidays_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + year: Annotated[ + Annotated[int, Field(le=9999, strict=True, ge=1)] | None, + Field( + description="When set, only holidays whose dates fall in this calendar year are returned. When omitted, all bank holidays are returned. Values outside 1-9999 return 422." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[CountrySchema]]: - """Get Countries + ) -> ApiResponse[list[BankHoliday]]: + """List Bank Holidays - Returns the full list of countries supported by BambooHR, each with a numeric string ID, full name, and ISO 3166-1 alpha-2 code. The returned IDs can be passed to the Get States by Country ID endpoint to retrieve the corresponding states or provinces. + Returns global bank holiday reference dates (US federal and related bank holidays maintained by BambooHR), not company-configured holidays. The response is a JSON array of holiday objects sorted by date in ascending order. Provide `year` to return only holidays whose dates fall within that calendar year; omit it to return the full multi-year reference set. OAuth Scopes: meta + :param year: When set, only holidays whose dates fall in this calendar year are returned. When omitted, all bank holidays are returned. Values outside 1-9999 return 422. + :type year: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -492,49 +2499,53 @@ def get_countries_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_countries_options_serialize( + _param = self._list_bank_holidays_serialize( + year=year, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[CountrySchema]", + _response_types_map: dict[str, str | None] = { + "200": "List[BankHoliday]", + "422": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_countries_options_without_preload_content( + def list_bank_holidays_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + year: Annotated[ + Annotated[int, Field(le=9999, strict=True, ge=1)] | None, + Field( + description="When set, only holidays whose dates fall in this calendar year are returned. When omitted, all bank holidays are returned. Values outside 1-9999 return 422." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Countries + """List Bank Holidays - Returns the full list of countries supported by BambooHR, each with a numeric string ID, full name, and ISO 3166-1 alpha-2 code. The returned IDs can be passed to the Get States by Country ID endpoint to retrieve the corresponding states or provinces. + Returns global bank holiday reference dates (US federal and related bank holidays maintained by BambooHR), not company-configured holidays. The response is a JSON array of holiday objects sorted by date in ascending order. Provide `year` to return only holidays whose dates fall within that calendar year; omit it to return the full multi-year reference set. OAuth Scopes: meta + :param year: When set, only holidays whose dates fall in this calendar year are returned. When omitted, all bank holidays are returned. Values outside 1-9999 return 422. + :type year: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -555,27 +2566,29 @@ def get_countries_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_countries_options_serialize( + _param = self._list_bank_holidays_serialize( + year=year, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[CountrySchema]", + _response_types_map: dict[str, str | None] = { + "200": "List[BankHoliday]", + "422": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_countries_options_serialize( + def _list_bank_holidays_serialize( self, + year, _request_auth, _content_type, _headers, @@ -584,43 +2597,36 @@ def _get_countries_options_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters + if year is not None: + _query_params.append(("year", year)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/meta/countries/options', + method="GET", + resource_path="/api/v1/meta/bank-holidays", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -630,35 +2636,29 @@ def _get_countries_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_states_by_country_id( + def list_fields( self, - country_id: Annotated[StrictInt, Field(description="The numeric ID of the country whose states or provinces to retrieve. Use the Get Countries endpoint to look up valid country IDs.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> StateProvinceResponseSchema: - """Get States by Country ID + ) -> list[Field1]: + """List Fields - Returns the list of states or provinces for the specified country, sorted alphabetically by abbreviation. Each entry includes a numeric ID, an abbreviation label (e.g. \"UT\"), an ISO 3166-2 code (e.g. \"US-UT\"), and a full name. Pass the country ID from the Get Countries endpoint to retrieve its subdivisions. + Returns a list of all employee fields available in the account, including field ID, display name, data type, and whether the field is deprecated. Use this endpoint to discover which field names are valid for use with the Get Employee, Datasets, and other field-based endpoints. The response includes standard BambooHR fields as well as any custom fields configured in the account. OAuth Scopes: employee, field - :param country_id: The numeric ID of the country whose states or provinces to retrieve. Use the Get Countries endpoint to look up valid country IDs. (required) - :type country_id: int + :param accept_header_parameter: This endpoint can produce either JSON or XML. + :type accept_header_parameter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -679,54 +2679,46 @@ def get_states_by_country_id( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_states_by_country_id_serialize( - country_id=country_id, + _param = self._list_fields_serialize( + accept_header_parameter=accept_header_parameter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "StateProvinceResponseSchema", - '400': None, + _response_types_map: dict[str, str | None] = { + "200": "List[Field1]", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_states_by_country_id_with_http_info( + def list_fields_with_http_info( self, - country_id: Annotated[StrictInt, Field(description="The numeric ID of the country whose states or provinces to retrieve. Use the Get Countries endpoint to look up valid country IDs.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[StateProvinceResponseSchema]: - """Get States by Country ID + ) -> ApiResponse[list[Field1]]: + """List Fields - Returns the list of states or provinces for the specified country, sorted alphabetically by abbreviation. Each entry includes a numeric ID, an abbreviation label (e.g. \"UT\"), an ISO 3166-2 code (e.g. \"US-UT\"), and a full name. Pass the country ID from the Get Countries endpoint to retrieve its subdivisions. + Returns a list of all employee fields available in the account, including field ID, display name, data type, and whether the field is deprecated. Use this endpoint to discover which field names are valid for use with the Get Employee, Datasets, and other field-based endpoints. The response includes standard BambooHR fields as well as any custom fields configured in the account. OAuth Scopes: employee, field - :param country_id: The numeric ID of the country whose states or provinces to retrieve. Use the Get Countries endpoint to look up valid country IDs. (required) - :type country_id: int + :param accept_header_parameter: This endpoint can produce either JSON or XML. + :type accept_header_parameter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -747,54 +2739,46 @@ def get_states_by_country_id_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_states_by_country_id_serialize( - country_id=country_id, + _param = self._list_fields_serialize( + accept_header_parameter=accept_header_parameter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "StateProvinceResponseSchema", - '400': None, + _response_types_map: dict[str, str | None] = { + "200": "List[Field1]", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_states_by_country_id_without_preload_content( + def list_fields_without_preload_content( self, - country_id: Annotated[StrictInt, Field(description="The numeric ID of the country whose states or provinces to retrieve. Use the Get Countries endpoint to look up valid country IDs.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get States by Country ID + """List Fields - Returns the list of states or provinces for the specified country, sorted alphabetically by abbreviation. Each entry includes a numeric ID, an abbreviation label (e.g. \"UT\"), an ISO 3166-2 code (e.g. \"US-UT\"), and a full name. Pass the country ID from the Get Countries endpoint to retrieve its subdivisions. + Returns a list of all employee fields available in the account, including field ID, display name, data type, and whether the field is deprecated. Use this endpoint to discover which field names are valid for use with the Get Employee, Datasets, and other field-based endpoints. The response includes standard BambooHR fields as well as any custom fields configured in the account. OAuth Scopes: employee, field - :param country_id: The numeric ID of the country whose states or provinces to retrieve. Use the Get Countries endpoint to look up valid country IDs. (required) - :type country_id: int + :param accept_header_parameter: This endpoint can produce either JSON or XML. + :type accept_header_parameter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -815,30 +2799,25 @@ def get_states_by_country_id_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_states_by_country_id_serialize( - country_id=country_id, + _param = self._list_fields_serialize( + accept_header_parameter=accept_header_parameter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "StateProvinceResponseSchema", - '400': None, + _response_types_map: dict[str, str | None] = { + "200": "List[Field1]", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_states_by_country_id_serialize( + def _list_fields_serialize( self, - country_id, + accept_header_parameter, _request_auth, _content_type, _headers, @@ -847,45 +2826,33 @@ def _get_states_by_country_id_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if country_id is not None: - _path_params['countryId'] = country_id # process the query parameters # process the header parameters + if accept_header_parameter is not None: + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/meta/provinces/{countryId}', + method="GET", + resource_path="/api/v1/meta/fields", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -895,35 +2862,24 @@ def _get_states_by_country_id_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_fields( + def list_industries( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[Field1]: - """List Fields + ) -> list[Industry]: + """List Industries - Returns a list of all employee fields available in the account, including field ID, display name, data type, and whether the field is deprecated. Use this endpoint to discover which field names are valid for use with the Get Employee, Datasets, and other field-based endpoints. The response includes standard BambooHR fields as well as any custom fields configured in the account. + Returns every industry in BambooHR's reference data as a JSON array. To set a company's industry, pass a returned entry's `id` to Update Company Industry Codes (`put-company-industry-codes`). OAuth Scopes: meta - :param accept_header_parameter: This endpoint can produce either JSON or XML. - :type accept_header_parameter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -944,53 +2900,40 @@ def list_fields( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_fields_serialize( - accept_header_parameter=accept_header_parameter, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_industries_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Field1]", + _response_types_map: dict[str, str | None] = { + "200": "List[Industry]", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_fields_with_http_info( + def list_industries_with_http_info( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[Field1]]: - """List Fields + ) -> ApiResponse[list[Industry]]: + """List Industries - Returns a list of all employee fields available in the account, including field ID, display name, data type, and whether the field is deprecated. Use this endpoint to discover which field names are valid for use with the Get Employee, Datasets, and other field-based endpoints. The response includes standard BambooHR fields as well as any custom fields configured in the account. + Returns every industry in BambooHR's reference data as a JSON array. To set a company's industry, pass a returned entry's `id` to Update Company Industry Codes (`put-company-industry-codes`). OAuth Scopes: meta - :param accept_header_parameter: This endpoint can produce either JSON or XML. - :type accept_header_parameter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1011,53 +2954,40 @@ def list_fields_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_fields_serialize( - accept_header_parameter=accept_header_parameter, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_industries_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Field1]", + _response_types_map: dict[str, str | None] = { + "200": "List[Industry]", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_fields_without_preload_content( + def list_industries_without_preload_content( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Fields + """List Industries - Returns a list of all employee fields available in the account, including field ID, display name, data type, and whether the field is deprecated. Use this endpoint to discover which field names are valid for use with the Get Employee, Datasets, and other field-based endpoints. The response includes standard BambooHR fields as well as any custom fields configured in the account. + Returns every industry in BambooHR's reference data as a JSON array. To set a company's industry, pass a returned entry's `id` to Update Company Industry Codes (`put-company-industry-codes`). OAuth Scopes: meta - :param accept_header_parameter: This endpoint can produce either JSON or XML. - :type accept_header_parameter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1078,29 +3008,23 @@ def list_fields_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_fields_serialize( - accept_header_parameter=accept_header_parameter, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_industries_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Field1]", + _response_types_map: dict[str, str | None] = { + "200": "List[Industry]", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_fields_serialize( + def _list_industries_serialize( self, - accept_header_parameter, _request_auth, _content_type, _headers, @@ -1109,46 +3033,33 @@ def _list_fields_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters - if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/meta/fields', + method="GET", + resource_path="/api/v1/meta/industries", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1158,33 +3069,30 @@ def _list_fields_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_list_fields( self, - format: Annotated[Optional[StrictStr], Field(description="Set to \"json\" to receive JSON output as an alternative to using the Accept header.")] = None, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + format: Annotated[ + StrictStr | None, + Field(description='Set to "json" to receive JSON output as an alternative to using the Accept header.'), + ] = None, + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ListFieldDetail]: + ) -> list[ListFieldDetail]: """List List Fields - Returns details for all list fields in the account. Each list includes its field ID, alias, options, and whether it is manageable (editable). Lists with the `manageable` attribute set to `yes` can be modified via the PUT endpoint. Lists with the `multiple` attribute set to `yes` are fields that can have multiple values. Options with the `archived` attribute set to `yes` should not appear as current options, but are included so that historical data can reference the value. + Returns details for all list fields in the account. Each list includes its field ID, alias, options, and whether it is manageable (editable). Lists with the `manageable` attribute set to `yes` can be modified via the PUT endpoint. Lists with the `multiple` attribute set to `yes` are fields that can have multiple values. Options with the `archived` attribute set to `yes` are soft-deleted and included so that historical data can reference the value — filter by `archived: no` to show only active options to end users. OAuth Scopes: field :param format: Set to \"json\" to receive JSON output as an alternative to using the Accept header. :type format: str @@ -1210,7 +3118,7 @@ def list_list_fields( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_list_fields_serialize( format=format, @@ -1218,45 +3126,41 @@ def list_list_fields( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListFieldDetail]", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[ListFieldDetail]", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_list_fields_with_http_info( self, - format: Annotated[Optional[StrictStr], Field(description="Set to \"json\" to receive JSON output as an alternative to using the Accept header.")] = None, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + format: Annotated[ + StrictStr | None, + Field(description='Set to "json" to receive JSON output as an alternative to using the Accept header.'), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ListFieldDetail]]: + ) -> ApiResponse[list[ListFieldDetail]]: """List List Fields - Returns details for all list fields in the account. Each list includes its field ID, alias, options, and whether it is manageable (editable). Lists with the `manageable` attribute set to `yes` can be modified via the PUT endpoint. Lists with the `multiple` attribute set to `yes` are fields that can have multiple values. Options with the `archived` attribute set to `yes` should not appear as current options, but are included so that historical data can reference the value. + Returns details for all list fields in the account. Each list includes its field ID, alias, options, and whether it is manageable (editable). Lists with the `manageable` attribute set to `yes` can be modified via the PUT endpoint. Lists with the `multiple` attribute set to `yes` are fields that can have multiple values. Options with the `archived` attribute set to `yes` are soft-deleted and included so that historical data can reference the value — filter by `archived: no` to show only active options to end users. OAuth Scopes: field :param format: Set to \"json\" to receive JSON output as an alternative to using the Accept header. :type format: str @@ -1282,7 +3186,7 @@ def list_list_fields_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_list_fields_serialize( format=format, @@ -1290,45 +3194,41 @@ def list_list_fields_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListFieldDetail]", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[ListFieldDetail]", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_list_fields_without_preload_content( self, - format: Annotated[Optional[StrictStr], Field(description="Set to \"json\" to receive JSON output as an alternative to using the Accept header.")] = None, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + format: Annotated[ + StrictStr | None, + Field(description='Set to "json" to receive JSON output as an alternative to using the Accept header.'), + ] = None, + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List List Fields - Returns details for all list fields in the account. Each list includes its field ID, alias, options, and whether it is manageable (editable). Lists with the `manageable` attribute set to `yes` can be modified via the PUT endpoint. Lists with the `multiple` attribute set to `yes` are fields that can have multiple values. Options with the `archived` attribute set to `yes` should not appear as current options, but are included so that historical data can reference the value. + Returns details for all list fields in the account. Each list includes its field ID, alias, options, and whether it is manageable (editable). Lists with the `manageable` attribute set to `yes` can be modified via the PUT endpoint. Lists with the `multiple` attribute set to `yes` are fields that can have multiple values. Options with the `archived` attribute set to `yes` are soft-deleted and included so that historical data can reference the value — filter by `archived: no` to show only active options to end users. OAuth Scopes: field :param format: Set to \"json\" to receive JSON output as an alternative to using the Accept header. :type format: str @@ -1354,7 +3254,7 @@ def list_list_fields_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_list_fields_serialize( format=format, @@ -1362,20 +3262,16 @@ def list_list_fields_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListFieldDetail]", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[ListFieldDetail]", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_list_fields_serialize( self, format, @@ -1388,50 +3284,36 @@ def _list_list_fields_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters if format is not None: - - _query_params.append(('format', format)) - + _query_params.append(("format", format)) + # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/meta/lists', + method="GET", + resource_path="/api/v1/meta/lists", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1441,32 +3323,26 @@ def _list_list_fields_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_tabular_fields( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[TabularField]: + ) -> list[TabularField]: """List Tabular Fields - Returns a list of all tabular (table-based) fields available in the account. Each table includes its alias and the fields it contains with their IDs, names, and types. Use this endpoint to discover which table names are valid for the table row endpoints (e.g., jobInfo, compensation, employmentStatus). + Returns a list of all tabular (table-based) fields available in the account. Each table includes its alias and the fields it contains with their IDs, names, and types. Use this endpoint to discover which table names are valid for the table row endpoints (e.g., jobInfo, compensation, employmentStatus). For fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list. OAuth Scopes: field :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -1490,50 +3366,43 @@ def list_tabular_fields( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_tabular_fields_serialize( accept_header_parameter=accept_header_parameter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TabularField]", + _response_types_map: dict[str, str | None] = { + "200": "List[TabularField]", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_tabular_fields_with_http_info( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[TabularField]]: + ) -> ApiResponse[list[TabularField]]: """List Tabular Fields - Returns a list of all tabular (table-based) fields available in the account. Each table includes its alias and the fields it contains with their IDs, names, and types. Use this endpoint to discover which table names are valid for the table row endpoints (e.g., jobInfo, compensation, employmentStatus). + Returns a list of all tabular (table-based) fields available in the account. Each table includes its alias and the fields it contains with their IDs, names, and types. Use this endpoint to discover which table names are valid for the table row endpoints (e.g., jobInfo, compensation, employmentStatus). For fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list. OAuth Scopes: field :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -1557,50 +3426,43 @@ def list_tabular_fields_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_tabular_fields_serialize( accept_header_parameter=accept_header_parameter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TabularField]", + _response_types_map: dict[str, str | None] = { + "200": "List[TabularField]", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_tabular_fields_without_preload_content( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Tabular Fields - Returns a list of all tabular (table-based) fields available in the account. Each table includes its alias and the fields it contains with their IDs, names, and types. Use this endpoint to discover which table names are valid for the table row endpoints (e.g., jobInfo, compensation, employmentStatus). + Returns a list of all tabular (table-based) fields available in the account. Each table includes its alias and the fields it contains with their IDs, names, and types. Use this endpoint to discover which table names are valid for the table row endpoints (e.g., jobInfo, compensation, employmentStatus). For fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list. OAuth Scopes: field :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -1624,26 +3486,22 @@ def list_tabular_fields_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_tabular_fields_serialize( accept_header_parameter=accept_header_parameter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TabularField]", + _response_types_map: dict[str, str | None] = { + "200": "List[TabularField]", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_tabular_fields_serialize( self, accept_header_parameter, @@ -1655,46 +3513,33 @@ def _list_tabular_fields_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/meta/tables', + method="GET", + resource_path="/api/v1/meta/tables", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1704,33 +3549,32 @@ def _list_tabular_fields_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_users( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - status: Annotated[Optional[StrictStr], Field(description="Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + status: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, ListUsersResponseValue]: + ) -> dict[str, ListUsersResponseValue]: """List Users - Returns all users for the company, optionally filtered by status. Each user entry includes a user ID, associated employee ID, name, email address (resolved in priority order: work, home, account), account status, and last login time when available. Pass a comma-separated list of status values via the `status` query parameter to filter results. Valid values are `enabled` and `disabled`. If the parameter is omitted or contains only unrecognized values, users of all statuses are returned. Support admin accounts are always excluded from the response. The response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. + Returns all users for the company, optionally filtered by status. Each user entry includes a user ID, associated employee ID, name, email address (resolved in priority order: work, home, account), account status, and last login time when available. Pass a comma-separated list of status values via the `status` query parameter to filter results. Valid values are `enabled` and `disabled`. If the parameter is omitted or contains only unrecognized values, users of all statuses are returned. Support admin accounts are always excluded from the response. The response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. OAuth Scopes: user, user:management :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -1756,7 +3600,7 @@ def list_users( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_users_serialize( accept_header_parameter=accept_header_parameter, @@ -1764,46 +3608,44 @@ def list_users( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, ListUsersResponseValue]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, ListUsersResponseValue]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_users_with_http_info( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - status: Annotated[Optional[StrictStr], Field(description="Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + status: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, ListUsersResponseValue]]: + ) -> ApiResponse[dict[str, ListUsersResponseValue]]: """List Users - Returns all users for the company, optionally filtered by status. Each user entry includes a user ID, associated employee ID, name, email address (resolved in priority order: work, home, account), account status, and last login time when available. Pass a comma-separated list of status values via the `status` query parameter to filter results. Valid values are `enabled` and `disabled`. If the parameter is omitted or contains only unrecognized values, users of all statuses are returned. Support admin accounts are always excluded from the response. The response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. + Returns all users for the company, optionally filtered by status. Each user entry includes a user ID, associated employee ID, name, email address (resolved in priority order: work, home, account), account status, and last login time when available. Pass a comma-separated list of status values via the `status` query parameter to filter results. Valid values are `enabled` and `disabled`. If the parameter is omitted or contains only unrecognized values, users of all statuses are returned. Support admin accounts are always excluded from the response. The response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. OAuth Scopes: user, user:management :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -1829,7 +3671,7 @@ def list_users_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_users_serialize( accept_header_parameter=accept_header_parameter, @@ -1837,46 +3679,44 @@ def list_users_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, ListUsersResponseValue]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, ListUsersResponseValue]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_users_without_preload_content( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - status: Annotated[Optional[StrictStr], Field(description="Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + status: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of statuses to filter by. Valid values: `enabled`, `disabled`. Defaults to returning users of all statuses when omitted or when no recognized value is provided." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Users - Returns all users for the company, optionally filtered by status. Each user entry includes a user ID, associated employee ID, name, email address (resolved in priority order: work, home, account), account status, and last login time when available. Pass a comma-separated list of status values via the `status` query parameter to filter results. Valid values are `enabled` and `disabled`. If the parameter is omitted or contains only unrecognized values, users of all statuses are returned. Support admin accounts are always excluded from the response. The response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. + Returns all users for the company, optionally filtered by status. Each user entry includes a user ID, associated employee ID, name, email address (resolved in priority order: work, home, account), account status, and last login time when available. Pass a comma-separated list of status values via the `status` query parameter to filter results. Valid values are `enabled` and `disabled`. If the parameter is omitted or contains only unrecognized values, users of all statuses are returned. Support admin accounts are always excluded from the response. The response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. OAuth Scopes: user, user:management :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -1902,7 +3742,7 @@ def list_users_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_users_serialize( accept_header_parameter=accept_header_parameter, @@ -1910,21 +3750,17 @@ def list_users_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, ListUsersResponseValue]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, ListUsersResponseValue]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_users_serialize( self, accept_header_parameter, @@ -1937,50 +3773,36 @@ def _list_users_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters if status is not None: - - _query_params.append(('status', status)) - + _query_params.append(("status", status)) + # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/meta/users', + method="GET", + resource_path="/api/v1/meta/users", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1990,38 +3812,41 @@ def _list_users_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_list_field_values( self, - list_field_id: Annotated[StrictStr, Field(description="The ID of the list field to update.")], + list_field_id: Annotated[ + StrictStr | None, + Field( + description="The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`." + ), + ], list_field_values: ListFieldValues, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + format: Annotated[ + StrictStr | None, + Field(description='Set to "json" to receive JSON output as an alternative to using the Accept header.'), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ListFieldDetail: """Update List Field Values - Create, update, or archive options for a list field. To update an existing option, specify its ID. To create a new option, omit the `id` attribute. To archive an option while preserving it for historical data, set the `archived` attribute to `yes`. Response format note: A successful response returns the full updated list in XML format. + Create, update, or archive options for a list field. To update an existing option, specify its `id`. To create a new option, omit `id`. To archive an option, set `archived` to `yes` — the option is soft-deleted and will continue to appear in GET responses for historical data integrity. To reactivate an archived option, set `archived` to `no`. The `archivedDate` field is server-set when an option is first archived and is not cleared if the option is later reactivated. Options on list fields with `manageable: no` cannot be modified and will return a 405. OAuth Scopes: field.write - :param list_field_id: The ID of the list field to update. (required) + :param list_field_id: The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`. (required) :type list_field_id: str :param list_field_values: (required) :type list_field_values: ListFieldValues + :param format: Set to \"json\" to receive JSON output as an alternative to using the Accept header. + :type format: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2042,61 +3867,65 @@ def update_list_field_values( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_list_field_values_serialize( list_field_id=list_field_id, list_field_values=list_field_values, + format=format, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListFieldDetail", - '400': None, - '403': None, - '404': None, - '409': None, + _response_types_map: dict[str, str | None] = { + "200": "ListFieldDetail", + "400": None, + "403": None, + "404": None, + "405": None, + "409": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def update_list_field_values_with_http_info( self, - list_field_id: Annotated[StrictStr, Field(description="The ID of the list field to update.")], + list_field_id: Annotated[ + StrictStr | None, + Field( + description="The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`." + ), + ], list_field_values: ListFieldValues, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + format: Annotated[ + StrictStr | None, + Field(description='Set to "json" to receive JSON output as an alternative to using the Accept header.'), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ListFieldDetail]: """Update List Field Values - Create, update, or archive options for a list field. To update an existing option, specify its ID. To create a new option, omit the `id` attribute. To archive an option while preserving it for historical data, set the `archived` attribute to `yes`. Response format note: A successful response returns the full updated list in XML format. + Create, update, or archive options for a list field. To update an existing option, specify its `id`. To create a new option, omit `id`. To archive an option, set `archived` to `yes` — the option is soft-deleted and will continue to appear in GET responses for historical data integrity. To reactivate an archived option, set `archived` to `no`. The `archivedDate` field is server-set when an option is first archived and is not cleared if the option is later reactivated. Options on list fields with `manageable: no` cannot be modified and will return a 405. OAuth Scopes: field.write - :param list_field_id: The ID of the list field to update. (required) + :param list_field_id: The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`. (required) :type list_field_id: str :param list_field_values: (required) :type list_field_values: ListFieldValues + :param format: Set to \"json\" to receive JSON output as an alternative to using the Accept header. + :type format: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2117,61 +3946,65 @@ def update_list_field_values_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_list_field_values_serialize( list_field_id=list_field_id, list_field_values=list_field_values, + format=format, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListFieldDetail", - '400': None, - '403': None, - '404': None, - '409': None, + _response_types_map: dict[str, str | None] = { + "200": "ListFieldDetail", + "400": None, + "403": None, + "404": None, + "405": None, + "409": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_list_field_values_without_preload_content( self, - list_field_id: Annotated[StrictStr, Field(description="The ID of the list field to update.")], + list_field_id: Annotated[ + StrictStr | None, + Field( + description="The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`." + ), + ], list_field_values: ListFieldValues, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + format: Annotated[ + StrictStr | None, + Field(description='Set to "json" to receive JSON output as an alternative to using the Accept header.'), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update List Field Values - Create, update, or archive options for a list field. To update an existing option, specify its ID. To create a new option, omit the `id` attribute. To archive an option while preserving it for historical data, set the `archived` attribute to `yes`. Response format note: A successful response returns the full updated list in XML format. + Create, update, or archive options for a list field. To update an existing option, specify its `id`. To create a new option, omit `id`. To archive an option, set `archived` to `yes` — the option is soft-deleted and will continue to appear in GET responses for historical data integrity. To reactivate an archived option, set `archived` to `no`. The `archivedDate` field is server-set when an option is first archived and is not cleared if the option is later reactivated. Options on list fields with `manageable: no` cannot be modified and will return a 405. OAuth Scopes: field.write - :param list_field_id: The ID of the list field to update. (required) + :param list_field_id: The field ID of the list to update. This is the `fieldId` value returned by the GET endpoint, not the list `id`. (required) :type list_field_id: str :param list_field_values: (required) :type list_field_values: ListFieldValues + :param format: Set to \"json\" to receive JSON output as an alternative to using the Accept header. + :type format: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2192,35 +4025,34 @@ def update_list_field_values_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_list_field_values_serialize( list_field_id=list_field_id, list_field_values=list_field_values, + format=format, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListFieldDetail", - '400': None, - '403': None, - '404': None, - '409': None, + _response_types_map: dict[str, str | None] = { + "200": "ListFieldDetail", + "400": None, + "403": None, + "404": None, + "405": None, + "409": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_list_field_values_serialize( self, list_field_id, list_field_values, + format, _request_auth, _content_type, _headers, @@ -2229,61 +4061,46 @@ def _update_list_field_values_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if list_field_id is not None: - _path_params['listFieldId'] = list_field_id + _path_params["listFieldId"] = list_field_id # process the query parameters + if format is not None: + _query_params.append(("format", format)) + # process the header parameters # process the form parameters # process the body parameter if list_field_values is not None: _body_params = list_field_values - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/xml' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/xml"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'text/xml' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json", "text/xml"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/meta/lists/{listFieldId}', + method="PUT", + resource_path="/api/v1/meta/lists/{listFieldId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2293,7 +4110,5 @@ def _update_list_field_values_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/alerts_api.py b/bamboohr_sdk/api/alerts_api.py new file mode 100644 index 0000000..257c7bb --- /dev/null +++ b/bamboohr_sdk/api/alerts_api.py @@ -0,0 +1,1197 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.alert_configuration_v1 import AlertConfigurationV1 +from bamboohr_sdk.models.alert_configuration_write_v1 import AlertConfigurationWriteV1 +from bamboohr_sdk.models.alert_template_list_response_v1 import AlertTemplateListResponseV1 +from bamboohr_sdk.rest import RESTResponseType + + +class AlertsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def create_alert_configuration( + self, + alert_configuration_write_v1: AlertConfigurationWriteV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AlertConfigurationV1: + """Create Alert Configuration + + Creates an alert configuration for the authenticated company from one of BambooHR's alert templates, and returns the stored configuration, including its server-assigned `id`, as a single JSON object. Use this to add a configuration the company does not have yet. To overwrite one that already exists, use **Replace Alert Configuration** (`replace-alert-configuration`) instead; to see what is already configured, use **List Alert Configurations** (`list-alert-configurations`). `bambooAlertId` names the alert template the configuration is built on and comes from **List Alert Templates** (`list-alert-templates`). An alert configuration sends scheduled email to people; to receive a programmatic HTTP callback when employee data changes instead, use **Webhooks > Create Webhook** (`create-webhook`). The configuration is live as soon as it is created and begins sending on the schedule it defines. Nothing limits a template to one configuration, so repeating this call with the same `bambooAlertId` adds a second configuration rather than replacing the first, and no endpoint deletes an alert configuration once it exists. The returned object also carries `additionalRecipientEmails`, `employeeIds`, `listValueIds`, and `userIds`; this API never stores those, so scope an alert's audience with `filterListValueIds` and the `sendTo*` properties instead. Access is all-or-nothing rather than per-record. An authenticated caller without view access to the company's Email Alerts settings receives `403` instead of a partial success. OAuth Scopes: alerts.write + + :param alert_configuration_write_v1: (required) + :type alert_configuration_write_v1: AlertConfigurationWriteV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_alert_configuration_serialize( + alert_configuration_write_v1=alert_configuration_write_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "AlertConfigurationV1", + "400": "ProblemDetailsResponseV2", + "401": None, + "403": "ProblemDetailsResponseV2", + "500": "ProblemDetailsResponseV2", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_alert_configuration_with_http_info( + self, + alert_configuration_write_v1: AlertConfigurationWriteV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AlertConfigurationV1]: + """Create Alert Configuration + + Creates an alert configuration for the authenticated company from one of BambooHR's alert templates, and returns the stored configuration, including its server-assigned `id`, as a single JSON object. Use this to add a configuration the company does not have yet. To overwrite one that already exists, use **Replace Alert Configuration** (`replace-alert-configuration`) instead; to see what is already configured, use **List Alert Configurations** (`list-alert-configurations`). `bambooAlertId` names the alert template the configuration is built on and comes from **List Alert Templates** (`list-alert-templates`). An alert configuration sends scheduled email to people; to receive a programmatic HTTP callback when employee data changes instead, use **Webhooks > Create Webhook** (`create-webhook`). The configuration is live as soon as it is created and begins sending on the schedule it defines. Nothing limits a template to one configuration, so repeating this call with the same `bambooAlertId` adds a second configuration rather than replacing the first, and no endpoint deletes an alert configuration once it exists. The returned object also carries `additionalRecipientEmails`, `employeeIds`, `listValueIds`, and `userIds`; this API never stores those, so scope an alert's audience with `filterListValueIds` and the `sendTo*` properties instead. Access is all-or-nothing rather than per-record. An authenticated caller without view access to the company's Email Alerts settings receives `403` instead of a partial success. OAuth Scopes: alerts.write + + :param alert_configuration_write_v1: (required) + :type alert_configuration_write_v1: AlertConfigurationWriteV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_alert_configuration_serialize( + alert_configuration_write_v1=alert_configuration_write_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "AlertConfigurationV1", + "400": "ProblemDetailsResponseV2", + "401": None, + "403": "ProblemDetailsResponseV2", + "500": "ProblemDetailsResponseV2", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_alert_configuration_without_preload_content( + self, + alert_configuration_write_v1: AlertConfigurationWriteV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Alert Configuration + + Creates an alert configuration for the authenticated company from one of BambooHR's alert templates, and returns the stored configuration, including its server-assigned `id`, as a single JSON object. Use this to add a configuration the company does not have yet. To overwrite one that already exists, use **Replace Alert Configuration** (`replace-alert-configuration`) instead; to see what is already configured, use **List Alert Configurations** (`list-alert-configurations`). `bambooAlertId` names the alert template the configuration is built on and comes from **List Alert Templates** (`list-alert-templates`). An alert configuration sends scheduled email to people; to receive a programmatic HTTP callback when employee data changes instead, use **Webhooks > Create Webhook** (`create-webhook`). The configuration is live as soon as it is created and begins sending on the schedule it defines. Nothing limits a template to one configuration, so repeating this call with the same `bambooAlertId` adds a second configuration rather than replacing the first, and no endpoint deletes an alert configuration once it exists. The returned object also carries `additionalRecipientEmails`, `employeeIds`, `listValueIds`, and `userIds`; this API never stores those, so scope an alert's audience with `filterListValueIds` and the `sendTo*` properties instead. Access is all-or-nothing rather than per-record. An authenticated caller without view access to the company's Email Alerts settings receives `403` instead of a partial success. OAuth Scopes: alerts.write + + :param alert_configuration_write_v1: (required) + :type alert_configuration_write_v1: AlertConfigurationWriteV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_alert_configuration_serialize( + alert_configuration_write_v1=alert_configuration_write_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "AlertConfigurationV1", + "400": "ProblemDetailsResponseV2", + "401": None, + "403": "ProblemDetailsResponseV2", + "500": "ProblemDetailsResponseV2", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_alert_configuration_serialize( + self, + alert_configuration_write_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if alert_configuration_write_v1 is not None: + _body_params = alert_configuration_write_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/alert-configurations", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_alert_configuration( + self, + id: Annotated[ + StrictInt | None, + Field( + description="Identifier of the alert configuration to return, as emitted in the `id` field of **List Alert Configurations** (`list-alert-configurations`). This is the configuration's own identifier, not the `bambooAlertId` of the alert template it is based on. No wildcard or `0` sentinel is supported; enumerate configurations with `list-alert-configurations` instead." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AlertConfigurationV1: + """Get Alert Configuration + + Returns one alert configuration the company has set up: which alert template it uses, when it runs, who receives it, and any custom subject, message, or list-value filters. The response is a single JSON object with no wrapper. Use this when the configuration's `id` is already known, either from **List Alert Configurations** (`list-alert-configurations`) or from the body **Create Alert Configuration** (`create-alert-configuration`) and **Replace Alert Configuration** (`replace-alert-configuration`) return. To enumerate or search a company's configured alerts, use `list-alert-configurations` instead. For the catalog of alert types that *can* be configured, rather than what this company has configured, use **List Alert Templates** (`list-alert-templates`). The `bambooAlertId` on the returned object identifies the underlying template, not this configuration, so the two identifiers are not interchangeable. Access is all-or-nothing rather than per-record. An authenticated caller without view access to the company's Email Alerts settings receives `403` rather than a partially redacted object. Only configurations belonging to the authenticated company are reachable, and an `id` from any other company is indistinguishable from one that never existed. OAuth Scopes: alerts + + :param id: Identifier of the alert configuration to return, as emitted in the `id` field of **List Alert Configurations** (`list-alert-configurations`). This is the configuration's own identifier, not the `bambooAlertId` of the alert template it is based on. No wildcard or `0` sentinel is supported; enumerate configurations with `list-alert-configurations` instead. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_alert_configuration_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "AlertConfigurationV1", + "401": None, + "403": "ProblemDetailsResponseV2", + "404": "ProblemDetailsResponseV2", + "500": "ProblemDetailsResponseV2", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_alert_configuration_with_http_info( + self, + id: Annotated[ + StrictInt | None, + Field( + description="Identifier of the alert configuration to return, as emitted in the `id` field of **List Alert Configurations** (`list-alert-configurations`). This is the configuration's own identifier, not the `bambooAlertId` of the alert template it is based on. No wildcard or `0` sentinel is supported; enumerate configurations with `list-alert-configurations` instead." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AlertConfigurationV1]: + """Get Alert Configuration + + Returns one alert configuration the company has set up: which alert template it uses, when it runs, who receives it, and any custom subject, message, or list-value filters. The response is a single JSON object with no wrapper. Use this when the configuration's `id` is already known, either from **List Alert Configurations** (`list-alert-configurations`) or from the body **Create Alert Configuration** (`create-alert-configuration`) and **Replace Alert Configuration** (`replace-alert-configuration`) return. To enumerate or search a company's configured alerts, use `list-alert-configurations` instead. For the catalog of alert types that *can* be configured, rather than what this company has configured, use **List Alert Templates** (`list-alert-templates`). The `bambooAlertId` on the returned object identifies the underlying template, not this configuration, so the two identifiers are not interchangeable. Access is all-or-nothing rather than per-record. An authenticated caller without view access to the company's Email Alerts settings receives `403` rather than a partially redacted object. Only configurations belonging to the authenticated company are reachable, and an `id` from any other company is indistinguishable from one that never existed. OAuth Scopes: alerts + + :param id: Identifier of the alert configuration to return, as emitted in the `id` field of **List Alert Configurations** (`list-alert-configurations`). This is the configuration's own identifier, not the `bambooAlertId` of the alert template it is based on. No wildcard or `0` sentinel is supported; enumerate configurations with `list-alert-configurations` instead. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_alert_configuration_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "AlertConfigurationV1", + "401": None, + "403": "ProblemDetailsResponseV2", + "404": "ProblemDetailsResponseV2", + "500": "ProblemDetailsResponseV2", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_alert_configuration_without_preload_content( + self, + id: Annotated[ + StrictInt | None, + Field( + description="Identifier of the alert configuration to return, as emitted in the `id` field of **List Alert Configurations** (`list-alert-configurations`). This is the configuration's own identifier, not the `bambooAlertId` of the alert template it is based on. No wildcard or `0` sentinel is supported; enumerate configurations with `list-alert-configurations` instead." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Alert Configuration + + Returns one alert configuration the company has set up: which alert template it uses, when it runs, who receives it, and any custom subject, message, or list-value filters. The response is a single JSON object with no wrapper. Use this when the configuration's `id` is already known, either from **List Alert Configurations** (`list-alert-configurations`) or from the body **Create Alert Configuration** (`create-alert-configuration`) and **Replace Alert Configuration** (`replace-alert-configuration`) return. To enumerate or search a company's configured alerts, use `list-alert-configurations` instead. For the catalog of alert types that *can* be configured, rather than what this company has configured, use **List Alert Templates** (`list-alert-templates`). The `bambooAlertId` on the returned object identifies the underlying template, not this configuration, so the two identifiers are not interchangeable. Access is all-or-nothing rather than per-record. An authenticated caller without view access to the company's Email Alerts settings receives `403` rather than a partially redacted object. Only configurations belonging to the authenticated company are reachable, and an `id` from any other company is indistinguishable from one that never existed. OAuth Scopes: alerts + + :param id: Identifier of the alert configuration to return, as emitted in the `id` field of **List Alert Configurations** (`list-alert-configurations`). This is the configuration's own identifier, not the `bambooAlertId` of the alert template it is based on. No wildcard or `0` sentinel is supported; enumerate configurations with `list-alert-configurations` instead. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_alert_configuration_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "AlertConfigurationV1", + "401": None, + "403": "ProblemDetailsResponseV2", + "404": "ProblemDetailsResponseV2", + "500": "ProblemDetailsResponseV2", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_alert_configuration_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/alert-configurations/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_alert_configurations( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> list[AlertConfigurationV1]: + """List Alert Configurations + + Returns every alert configuration the company has set up: which alert template each one uses, when it runs, who receives it, and any custom subject, message, or list-value filters. The response is a top-level JSON array with no wrapper, empty when the company has no configured alerts, and in no guaranteed order. Use this to enumerate or search a company's own configured alerts. To read a single configuration whose `id` is already known, use **Get Alert Configuration** (`get-alert-configuration`) instead. For the catalog of alert types that *can* be configured, rather than what this company has configured, use **List Alert Templates** (`list-alert-templates`). The `bambooAlertId` on each entry returned here is the same identifier that `list-alert-templates` returns as `id`. Access is all-or-nothing rather than per-record. An authenticated caller without view access to the company's Email Alerts settings receives `403` instead of a filtered list, so a successful response always contains the company's complete set. OAuth Scopes: alerts + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_alert_configurations_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[AlertConfigurationV1]", + "401": None, + "403": "ProblemDetailsResponseV2", + "500": "ProblemDetailsResponseV2", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_alert_configurations_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[list[AlertConfigurationV1]]: + """List Alert Configurations + + Returns every alert configuration the company has set up: which alert template each one uses, when it runs, who receives it, and any custom subject, message, or list-value filters. The response is a top-level JSON array with no wrapper, empty when the company has no configured alerts, and in no guaranteed order. Use this to enumerate or search a company's own configured alerts. To read a single configuration whose `id` is already known, use **Get Alert Configuration** (`get-alert-configuration`) instead. For the catalog of alert types that *can* be configured, rather than what this company has configured, use **List Alert Templates** (`list-alert-templates`). The `bambooAlertId` on each entry returned here is the same identifier that `list-alert-templates` returns as `id`. Access is all-or-nothing rather than per-record. An authenticated caller without view access to the company's Email Alerts settings receives `403` instead of a filtered list, so a successful response always contains the company's complete set. OAuth Scopes: alerts + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_alert_configurations_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[AlertConfigurationV1]", + "401": None, + "403": "ProblemDetailsResponseV2", + "500": "ProblemDetailsResponseV2", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_alert_configurations_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Alert Configurations + + Returns every alert configuration the company has set up: which alert template each one uses, when it runs, who receives it, and any custom subject, message, or list-value filters. The response is a top-level JSON array with no wrapper, empty when the company has no configured alerts, and in no guaranteed order. Use this to enumerate or search a company's own configured alerts. To read a single configuration whose `id` is already known, use **Get Alert Configuration** (`get-alert-configuration`) instead. For the catalog of alert types that *can* be configured, rather than what this company has configured, use **List Alert Templates** (`list-alert-templates`). The `bambooAlertId` on each entry returned here is the same identifier that `list-alert-templates` returns as `id`. Access is all-or-nothing rather than per-record. An authenticated caller without view access to the company's Email Alerts settings receives `403` instead of a filtered list, so a successful response always contains the company's complete set. OAuth Scopes: alerts + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_alert_configurations_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[AlertConfigurationV1]", + "401": None, + "403": "ProblemDetailsResponseV2", + "500": "ProblemDetailsResponseV2", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_alert_configurations_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/alert-configurations", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_alert_templates( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AlertTemplateListResponseV1: + """List Alert Templates + + Returns the catalog of alert templates that company alert configurations are built from. These are the built-in alert types BambooHR supports (for example New Hire, Birthdays, Time Off Approved), each paired with the settings group it is filed under. The response is an object with a single `alerts` array, ordered by `groupName` and then `name`. The alert-configuration endpoints represent the same identifier as `bambooAlertId`. The catalog is global: it lists every alert BambooHR offers and is not narrowed to the features the authenticated company has enabled, so a template appearing here does not guarantee that the company can configure it. Use this to discover the `bambooAlertId` required by **Create Alert Configuration** (`create-alert-configuration`). For the alerts a company has already configured, use **List Alert Configurations** (`list-alert-configurations`) instead. Callers without view access to the company's Email Alerts settings receive `403` rather than a filtered result. OAuth Scopes: alerts + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_alert_templates_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "AlertTemplateListResponseV1", + "401": None, + "403": "StandardApiErrorResponse", + "500": "StandardApiErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_alert_templates_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AlertTemplateListResponseV1]: + """List Alert Templates + + Returns the catalog of alert templates that company alert configurations are built from. These are the built-in alert types BambooHR supports (for example New Hire, Birthdays, Time Off Approved), each paired with the settings group it is filed under. The response is an object with a single `alerts` array, ordered by `groupName` and then `name`. The alert-configuration endpoints represent the same identifier as `bambooAlertId`. The catalog is global: it lists every alert BambooHR offers and is not narrowed to the features the authenticated company has enabled, so a template appearing here does not guarantee that the company can configure it. Use this to discover the `bambooAlertId` required by **Create Alert Configuration** (`create-alert-configuration`). For the alerts a company has already configured, use **List Alert Configurations** (`list-alert-configurations`) instead. Callers without view access to the company's Email Alerts settings receive `403` rather than a filtered result. OAuth Scopes: alerts + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_alert_templates_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "AlertTemplateListResponseV1", + "401": None, + "403": "StandardApiErrorResponse", + "500": "StandardApiErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_alert_templates_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Alert Templates + + Returns the catalog of alert templates that company alert configurations are built from. These are the built-in alert types BambooHR supports (for example New Hire, Birthdays, Time Off Approved), each paired with the settings group it is filed under. The response is an object with a single `alerts` array, ordered by `groupName` and then `name`. The alert-configuration endpoints represent the same identifier as `bambooAlertId`. The catalog is global: it lists every alert BambooHR offers and is not narrowed to the features the authenticated company has enabled, so a template appearing here does not guarantee that the company can configure it. Use this to discover the `bambooAlertId` required by **Create Alert Configuration** (`create-alert-configuration`). For the alerts a company has already configured, use **List Alert Configurations** (`list-alert-configurations`) instead. Callers without view access to the company's Email Alerts settings receive `403` rather than a filtered result. OAuth Scopes: alerts + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_alert_templates_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "AlertTemplateListResponseV1", + "401": None, + "403": "StandardApiErrorResponse", + "500": "StandardApiErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_alert_templates_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/alerts", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def replace_alert_configuration( + self, + id: Annotated[ + StrictInt | None, + Field( + description="Identifier of the alert configuration to overwrite, as emitted in the `id` field of **List Alert Configurations** (`list-alert-configurations`). This is the configuration's own identifier, not the `bambooAlertId` of the alert template it is based on. The path value is authoritative; no wildcard or `0` sentinel is supported." + ), + ], + alert_configuration_write_v1: AlertConfigurationWriteV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AlertConfigurationV1: + """Replace Alert Configuration + + Overwrites the alert configuration identified by `{id}` and returns the stored configuration as a single JSON object. Each call replaces the whole configuration: a property left out of the request body is reset to its default rather than kept at its current value, so send the full desired state and not only the properties that changed. Read the current state with **Get Alert Configuration** (`get-alert-configuration`) first when only part of a configuration should change. The response echoes the values submitted rather than re-reading the saved row, so read the configuration back with `get-alert-configuration` when the persisted state needs to be confirmed. Use this to change a configuration the company already has. To add one, use **Create Alert Configuration** (`create-alert-configuration`) instead; to find out what is already configured, use **List Alert Configurations** (`list-alert-configurations`). `bambooAlertId` names the alert template the configuration is built on, comes from **List Alert Templates** (`list-alert-templates`), and is required on every call even when the template is not changing. The configuration stays live throughout and sends on whatever schedule the call leaves it with, so an update that omits the `sendTo*` properties can re-enable delivery to recipients the previous state excluded. Changing `bambooAlertId` re-points this configuration at a different alert template rather than adding a second one, and no endpoint deletes an alert configuration once it exists. The returned object also carries `additionalRecipientEmails`, `employeeIds`, `listValueIds`, and `userIds`; this API never stores those, so scope an alert's audience with `filterListValueIds` and the `sendTo*` properties instead. Access is all-or-nothing rather than per-record. An authenticated caller without view access to the company's Email Alerts settings receives `403` instead of a partial success. OAuth Scopes: alerts.write + + :param id: Identifier of the alert configuration to overwrite, as emitted in the `id` field of **List Alert Configurations** (`list-alert-configurations`). This is the configuration's own identifier, not the `bambooAlertId` of the alert template it is based on. The path value is authoritative; no wildcard or `0` sentinel is supported. (required) + :type id: int + :param alert_configuration_write_v1: (required) + :type alert_configuration_write_v1: AlertConfigurationWriteV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._replace_alert_configuration_serialize( + id=id, + alert_configuration_write_v1=alert_configuration_write_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "AlertConfigurationV1", + "400": "ProblemDetailsResponseV2", + "401": None, + "403": "ProblemDetailsResponseV2", + "500": "ProblemDetailsResponseV2", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def replace_alert_configuration_with_http_info( + self, + id: Annotated[ + StrictInt | None, + Field( + description="Identifier of the alert configuration to overwrite, as emitted in the `id` field of **List Alert Configurations** (`list-alert-configurations`). This is the configuration's own identifier, not the `bambooAlertId` of the alert template it is based on. The path value is authoritative; no wildcard or `0` sentinel is supported." + ), + ], + alert_configuration_write_v1: AlertConfigurationWriteV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AlertConfigurationV1]: + """Replace Alert Configuration + + Overwrites the alert configuration identified by `{id}` and returns the stored configuration as a single JSON object. Each call replaces the whole configuration: a property left out of the request body is reset to its default rather than kept at its current value, so send the full desired state and not only the properties that changed. Read the current state with **Get Alert Configuration** (`get-alert-configuration`) first when only part of a configuration should change. The response echoes the values submitted rather than re-reading the saved row, so read the configuration back with `get-alert-configuration` when the persisted state needs to be confirmed. Use this to change a configuration the company already has. To add one, use **Create Alert Configuration** (`create-alert-configuration`) instead; to find out what is already configured, use **List Alert Configurations** (`list-alert-configurations`). `bambooAlertId` names the alert template the configuration is built on, comes from **List Alert Templates** (`list-alert-templates`), and is required on every call even when the template is not changing. The configuration stays live throughout and sends on whatever schedule the call leaves it with, so an update that omits the `sendTo*` properties can re-enable delivery to recipients the previous state excluded. Changing `bambooAlertId` re-points this configuration at a different alert template rather than adding a second one, and no endpoint deletes an alert configuration once it exists. The returned object also carries `additionalRecipientEmails`, `employeeIds`, `listValueIds`, and `userIds`; this API never stores those, so scope an alert's audience with `filterListValueIds` and the `sendTo*` properties instead. Access is all-or-nothing rather than per-record. An authenticated caller without view access to the company's Email Alerts settings receives `403` instead of a partial success. OAuth Scopes: alerts.write + + :param id: Identifier of the alert configuration to overwrite, as emitted in the `id` field of **List Alert Configurations** (`list-alert-configurations`). This is the configuration's own identifier, not the `bambooAlertId` of the alert template it is based on. The path value is authoritative; no wildcard or `0` sentinel is supported. (required) + :type id: int + :param alert_configuration_write_v1: (required) + :type alert_configuration_write_v1: AlertConfigurationWriteV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._replace_alert_configuration_serialize( + id=id, + alert_configuration_write_v1=alert_configuration_write_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "AlertConfigurationV1", + "400": "ProblemDetailsResponseV2", + "401": None, + "403": "ProblemDetailsResponseV2", + "500": "ProblemDetailsResponseV2", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def replace_alert_configuration_without_preload_content( + self, + id: Annotated[ + StrictInt | None, + Field( + description="Identifier of the alert configuration to overwrite, as emitted in the `id` field of **List Alert Configurations** (`list-alert-configurations`). This is the configuration's own identifier, not the `bambooAlertId` of the alert template it is based on. The path value is authoritative; no wildcard or `0` sentinel is supported." + ), + ], + alert_configuration_write_v1: AlertConfigurationWriteV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Replace Alert Configuration + + Overwrites the alert configuration identified by `{id}` and returns the stored configuration as a single JSON object. Each call replaces the whole configuration: a property left out of the request body is reset to its default rather than kept at its current value, so send the full desired state and not only the properties that changed. Read the current state with **Get Alert Configuration** (`get-alert-configuration`) first when only part of a configuration should change. The response echoes the values submitted rather than re-reading the saved row, so read the configuration back with `get-alert-configuration` when the persisted state needs to be confirmed. Use this to change a configuration the company already has. To add one, use **Create Alert Configuration** (`create-alert-configuration`) instead; to find out what is already configured, use **List Alert Configurations** (`list-alert-configurations`). `bambooAlertId` names the alert template the configuration is built on, comes from **List Alert Templates** (`list-alert-templates`), and is required on every call even when the template is not changing. The configuration stays live throughout and sends on whatever schedule the call leaves it with, so an update that omits the `sendTo*` properties can re-enable delivery to recipients the previous state excluded. Changing `bambooAlertId` re-points this configuration at a different alert template rather than adding a second one, and no endpoint deletes an alert configuration once it exists. The returned object also carries `additionalRecipientEmails`, `employeeIds`, `listValueIds`, and `userIds`; this API never stores those, so scope an alert's audience with `filterListValueIds` and the `sendTo*` properties instead. Access is all-or-nothing rather than per-record. An authenticated caller without view access to the company's Email Alerts settings receives `403` instead of a partial success. OAuth Scopes: alerts.write + + :param id: Identifier of the alert configuration to overwrite, as emitted in the `id` field of **List Alert Configurations** (`list-alert-configurations`). This is the configuration's own identifier, not the `bambooAlertId` of the alert template it is based on. The path value is authoritative; no wildcard or `0` sentinel is supported. (required) + :type id: int + :param alert_configuration_write_v1: (required) + :type alert_configuration_write_v1: AlertConfigurationWriteV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._replace_alert_configuration_serialize( + id=id, + alert_configuration_write_v1=alert_configuration_write_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "AlertConfigurationV1", + "400": "ProblemDetailsResponseV2", + "401": None, + "403": "ProblemDetailsResponseV2", + "500": "ProblemDetailsResponseV2", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _replace_alert_configuration_serialize( + self, + id, + alert_configuration_write_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if alert_configuration_write_v1 is not None: + _body_params = alert_configuration_write_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/alert-configurations/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/applicant_tracking_api.py b/bamboohr_sdk/api/applicant_tracking_api.py index 620f7b4..a568935 100644 --- a/bamboohr_sdk/api/applicant_tracking_api.py +++ b/bamboohr_sdk/api/applicant_tracking_api.py @@ -1,25 +1,21 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +Do not edit the class manually. +""" from datetime import date -from pydantic import Field, StrictBytes, StrictInt, StrictStr, field_validator -from typing import List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any + +from pydantic import Field, StrictBytes, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.models.applicant_status import ApplicantStatus from bamboohr_sdk.models.application_details import ApplicationDetails from bamboohr_sdk.models.applications_list import ApplicationsList @@ -32,9 +28,6 @@ from bamboohr_sdk.models.location import Location from bamboohr_sdk.models.update_applicant_status_request import UpdateApplicantStatusRequest from bamboohr_sdk.models.update_applicant_status_response import UpdateApplicantStatusResponse - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.rest import RESTResponseType @@ -50,31 +43,29 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def create_application_comment( self, - application_id: Annotated[StrictInt, Field(description="The ID of the application to add a comment to.")], - create_application_comment_request: Annotated[CreateApplicationCommentRequest, Field(description="Comment object to post")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + application_id: Annotated[ + StrictStr | None, Field(description="The ID of the application to add a comment to.") + ], + create_application_comment_request: Annotated[ + CreateApplicationCommentRequest, Field(description="Comment object to post") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CreateCommentResponse: """Create Job Application Comment - Add a comment to an application. The owner of the API key used must have access to ATS settings. The `type` field defaults to `comment` if omitted. + Add a comment to an application. The authenticated caller must have access to ATS settings. The `type` field defaults to `comment` if omitted. OAuth Scopes: hiring:applications.write :param application_id: The ID of the application to add a comment to. (required) - :type application_id: int + :type application_id: str :param create_application_comment_request: Comment object to post (required) :type create_application_comment_request: CreateApplicationCommentRequest :param _request_timeout: timeout setting for this request. If one @@ -97,7 +88,7 @@ def create_application_comment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_application_comment_serialize( application_id=application_id, @@ -105,51 +96,46 @@ def create_application_comment( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateCommentResponse", - '400': None, - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "CreateCommentResponse", + "400": None, + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def create_application_comment_with_http_info( self, - application_id: Annotated[StrictInt, Field(description="The ID of the application to add a comment to.")], - create_application_comment_request: Annotated[CreateApplicationCommentRequest, Field(description="Comment object to post")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + application_id: Annotated[ + StrictStr | None, Field(description="The ID of the application to add a comment to.") + ], + create_application_comment_request: Annotated[ + CreateApplicationCommentRequest, Field(description="Comment object to post") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CreateCommentResponse]: """Create Job Application Comment - Add a comment to an application. The owner of the API key used must have access to ATS settings. The `type` field defaults to `comment` if omitted. + Add a comment to an application. The authenticated caller must have access to ATS settings. The `type` field defaults to `comment` if omitted. OAuth Scopes: hiring:applications.write :param application_id: The ID of the application to add a comment to. (required) - :type application_id: int + :type application_id: str :param create_application_comment_request: Comment object to post (required) :type create_application_comment_request: CreateApplicationCommentRequest :param _request_timeout: timeout setting for this request. If one @@ -172,7 +158,7 @@ def create_application_comment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_application_comment_serialize( application_id=application_id, @@ -180,51 +166,46 @@ def create_application_comment_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateCommentResponse", - '400': None, - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "CreateCommentResponse", + "400": None, + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_application_comment_without_preload_content( self, - application_id: Annotated[StrictInt, Field(description="The ID of the application to add a comment to.")], - create_application_comment_request: Annotated[CreateApplicationCommentRequest, Field(description="Comment object to post")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + application_id: Annotated[ + StrictStr | None, Field(description="The ID of the application to add a comment to.") + ], + create_application_comment_request: Annotated[ + CreateApplicationCommentRequest, Field(description="Comment object to post") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Job Application Comment - Add a comment to an application. The owner of the API key used must have access to ATS settings. The `type` field defaults to `comment` if omitted. + Add a comment to an application. The authenticated caller must have access to ATS settings. The `type` field defaults to `comment` if omitted. OAuth Scopes: hiring:applications.write :param application_id: The ID of the application to add a comment to. (required) - :type application_id: int + :type application_id: str :param create_application_comment_request: Comment object to post (required) :type create_application_comment_request: CreateApplicationCommentRequest :param _request_timeout: timeout setting for this request. If one @@ -247,7 +228,7 @@ def create_application_comment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_application_comment_serialize( application_id=application_id, @@ -255,23 +236,19 @@ def create_application_comment_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateCommentResponse", - '400': None, - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "CreateCommentResponse", + "400": None, + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_application_comment_serialize( self, application_id, @@ -284,21 +261,18 @@ def _create_application_comment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if application_id is not None: - _path_params['applicationId'] = application_id + _path_params["applicationId"] = application_id # process the query parameters # process the header parameters # process the form parameters @@ -306,38 +280,24 @@ def _create_application_comment_serialize( if create_application_comment_request is not None: _body_params = create_application_comment_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/applicant_tracking/applications/{applicationId}/comments', + method="POST", + resource_path="/api/v1/applicant_tracking/applications/{applicationId}/comments", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -347,52 +307,83 @@ def _create_application_comment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def create_candidate( self, first_name: Annotated[StrictStr, Field(description="The first name of the candidate.")], last_name: Annotated[StrictStr, Field(description="The last name of the candidate.")], job_id: Annotated[StrictInt, Field(description="The id of the job opening for the candidate application.")], - email: Annotated[Optional[StrictStr], Field(description="The email address of the candidate. Must be a valid email address.")] = None, - phone_number: Annotated[Optional[StrictStr], Field(description="The phone number of the candidate.")] = None, - source: Annotated[Optional[StrictStr], Field(description="The source of the candidate application, e.g. LinkedIn, Indeed, etc.")] = None, - address: Annotated[Optional[StrictStr], Field(description="The street address of the candidate.")] = None, - city: Annotated[Optional[StrictStr], Field(description="The city of the candidate.")] = None, - state: Annotated[Optional[StrictStr], Field(description="The state or province of the candidate. Accepts state name, abbreviation, or ISO code.")] = None, - zip: Annotated[Optional[StrictStr], Field(description="The zip code or postal code of the candidate.")] = None, - country: Annotated[Optional[StrictStr], Field(description="The country of the candidate. Accepts country name or ISO code.")] = None, - linkedin_url: Annotated[Optional[StrictStr], Field(description="The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`.")] = None, - date_available: Annotated[Optional[date], Field(description="The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`).")] = None, - desired_salary: Annotated[Optional[StrictStr], Field(description="The desired salary of the candidate.")] = None, - referred_by: Annotated[Optional[StrictStr], Field(description="The person or entity that referred the candidate.")] = None, - website_url: Annotated[Optional[StrictStr], Field(description="The personal website, blog, or online portfolio of the candidate. Must be a valid URL.")] = None, - highest_education: Annotated[Optional[StrictStr], Field(description="The highest completed education level of the candidate.")] = None, - college_name: Annotated[Optional[StrictStr], Field(description="The college or university of the candidate.")] = None, - references: Annotated[Optional[StrictStr], Field(description="A list of references supplied by the candidate.")] = None, - resume: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`.")] = None, - cover_letter: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + email: Annotated[ + StrictStr | None, Field(description="The email address of the candidate. Must be a valid email address.") + ] = None, + phone_number: Annotated[StrictStr | None, Field(description="The phone number of the candidate.")] = None, + source: Annotated[ + StrictStr | None, + Field(description="The source of the candidate application, e.g. LinkedIn, Indeed, etc."), + ] = None, + address: Annotated[StrictStr | None, Field(description="The street address of the candidate.")] = None, + city: Annotated[StrictStr | None, Field(description="The city of the candidate.")] = None, + state: Annotated[ + StrictStr | None, + Field(description="The state or province of the candidate. Accepts state name, abbreviation, or ISO code."), + ] = None, + zip: Annotated[StrictStr | None, Field(description="The zip code or postal code of the candidate.")] = None, + country: Annotated[ + StrictStr | None, Field(description="The country of the candidate. Accepts country name or ISO code.") + ] = None, + linkedin_url: Annotated[ + StrictStr | None, + Field( + description="The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`." + ), + ] = None, + date_available: Annotated[ + date | None, + Field(description="The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`)."), + ] = None, + desired_salary: Annotated[StrictStr | None, Field(description="The desired salary of the candidate.")] = None, + referred_by: Annotated[ + StrictStr | None, Field(description="The person or entity that referred the candidate.") + ] = None, + website_url: Annotated[ + StrictStr | None, + Field(description="The personal website, blog, or online portfolio of the candidate. Must be a valid URL."), + ] = None, + highest_education: Annotated[ + StrictStr | None, Field(description="The highest completed education level of the candidate.") + ] = None, + college_name: Annotated[ + StrictStr | None, Field(description="The college or university of the candidate.") + ] = None, + references: Annotated[ + StrictStr | None, Field(description="A list of references supplied by the candidate.") + ] = None, + resume: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes] | None, + Field( + description="Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`." + ), + ] = None, + cover_letter: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes] | None, + Field( + description="Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CreateCandidateResponse: """Create Candidate - Create a new candidate application for a job opening. The owner of the API key used must have access to ATS settings. On success, returns the new candidate ID. Only fields required by the target job opening's standard questions need to be provided beyond firstName, lastName, and jobId. + Create a new candidate application for a job opening. The authenticated caller must have access to ATS settings. On success, returns the new candidate ID. Only fields required by the target job opening's standard questions need to be provided beyond firstName, lastName, and jobId. OAuth Scopes: hiring:applications.write :param first_name: The first name of the candidate. (required) :type first_name: str @@ -456,7 +447,7 @@ def create_candidate( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_candidate_serialize( first_name=first_name, @@ -483,67 +474,98 @@ def create_candidate( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateCandidateResponse", - '401': None, - '403': None, - '404': None, - '422': None, + _response_types_map: dict[str, str | None] = { + "200": "CreateCandidateResponse", + "401": None, + "403": None, + "404": None, + "422": None, + "429": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def create_candidate_with_http_info( self, first_name: Annotated[StrictStr, Field(description="The first name of the candidate.")], last_name: Annotated[StrictStr, Field(description="The last name of the candidate.")], job_id: Annotated[StrictInt, Field(description="The id of the job opening for the candidate application.")], - email: Annotated[Optional[StrictStr], Field(description="The email address of the candidate. Must be a valid email address.")] = None, - phone_number: Annotated[Optional[StrictStr], Field(description="The phone number of the candidate.")] = None, - source: Annotated[Optional[StrictStr], Field(description="The source of the candidate application, e.g. LinkedIn, Indeed, etc.")] = None, - address: Annotated[Optional[StrictStr], Field(description="The street address of the candidate.")] = None, - city: Annotated[Optional[StrictStr], Field(description="The city of the candidate.")] = None, - state: Annotated[Optional[StrictStr], Field(description="The state or province of the candidate. Accepts state name, abbreviation, or ISO code.")] = None, - zip: Annotated[Optional[StrictStr], Field(description="The zip code or postal code of the candidate.")] = None, - country: Annotated[Optional[StrictStr], Field(description="The country of the candidate. Accepts country name or ISO code.")] = None, - linkedin_url: Annotated[Optional[StrictStr], Field(description="The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`.")] = None, - date_available: Annotated[Optional[date], Field(description="The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`).")] = None, - desired_salary: Annotated[Optional[StrictStr], Field(description="The desired salary of the candidate.")] = None, - referred_by: Annotated[Optional[StrictStr], Field(description="The person or entity that referred the candidate.")] = None, - website_url: Annotated[Optional[StrictStr], Field(description="The personal website, blog, or online portfolio of the candidate. Must be a valid URL.")] = None, - highest_education: Annotated[Optional[StrictStr], Field(description="The highest completed education level of the candidate.")] = None, - college_name: Annotated[Optional[StrictStr], Field(description="The college or university of the candidate.")] = None, - references: Annotated[Optional[StrictStr], Field(description="A list of references supplied by the candidate.")] = None, - resume: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`.")] = None, - cover_letter: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + email: Annotated[ + StrictStr | None, Field(description="The email address of the candidate. Must be a valid email address.") + ] = None, + phone_number: Annotated[StrictStr | None, Field(description="The phone number of the candidate.")] = None, + source: Annotated[ + StrictStr | None, + Field(description="The source of the candidate application, e.g. LinkedIn, Indeed, etc."), + ] = None, + address: Annotated[StrictStr | None, Field(description="The street address of the candidate.")] = None, + city: Annotated[StrictStr | None, Field(description="The city of the candidate.")] = None, + state: Annotated[ + StrictStr | None, + Field(description="The state or province of the candidate. Accepts state name, abbreviation, or ISO code."), + ] = None, + zip: Annotated[StrictStr | None, Field(description="The zip code or postal code of the candidate.")] = None, + country: Annotated[ + StrictStr | None, Field(description="The country of the candidate. Accepts country name or ISO code.") + ] = None, + linkedin_url: Annotated[ + StrictStr | None, + Field( + description="The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`." + ), + ] = None, + date_available: Annotated[ + date | None, + Field(description="The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`)."), + ] = None, + desired_salary: Annotated[StrictStr | None, Field(description="The desired salary of the candidate.")] = None, + referred_by: Annotated[ + StrictStr | None, Field(description="The person or entity that referred the candidate.") + ] = None, + website_url: Annotated[ + StrictStr | None, + Field(description="The personal website, blog, or online portfolio of the candidate. Must be a valid URL."), + ] = None, + highest_education: Annotated[ + StrictStr | None, Field(description="The highest completed education level of the candidate.") + ] = None, + college_name: Annotated[ + StrictStr | None, Field(description="The college or university of the candidate.") + ] = None, + references: Annotated[ + StrictStr | None, Field(description="A list of references supplied by the candidate.") + ] = None, + resume: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes] | None, + Field( + description="Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`." + ), + ] = None, + cover_letter: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes] | None, + Field( + description="Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CreateCandidateResponse]: """Create Candidate - Create a new candidate application for a job opening. The owner of the API key used must have access to ATS settings. On success, returns the new candidate ID. Only fields required by the target job opening's standard questions need to be provided beyond firstName, lastName, and jobId. + Create a new candidate application for a job opening. The authenticated caller must have access to ATS settings. On success, returns the new candidate ID. Only fields required by the target job opening's standard questions need to be provided beyond firstName, lastName, and jobId. OAuth Scopes: hiring:applications.write :param first_name: The first name of the candidate. (required) :type first_name: str @@ -607,7 +629,7 @@ def create_candidate_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_candidate_serialize( first_name=first_name, @@ -634,67 +656,98 @@ def create_candidate_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateCandidateResponse", - '401': None, - '403': None, - '404': None, - '422': None, + _response_types_map: dict[str, str | None] = { + "200": "CreateCandidateResponse", + "401": None, + "403": None, + "404": None, + "422": None, + "429": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_candidate_without_preload_content( self, first_name: Annotated[StrictStr, Field(description="The first name of the candidate.")], last_name: Annotated[StrictStr, Field(description="The last name of the candidate.")], job_id: Annotated[StrictInt, Field(description="The id of the job opening for the candidate application.")], - email: Annotated[Optional[StrictStr], Field(description="The email address of the candidate. Must be a valid email address.")] = None, - phone_number: Annotated[Optional[StrictStr], Field(description="The phone number of the candidate.")] = None, - source: Annotated[Optional[StrictStr], Field(description="The source of the candidate application, e.g. LinkedIn, Indeed, etc.")] = None, - address: Annotated[Optional[StrictStr], Field(description="The street address of the candidate.")] = None, - city: Annotated[Optional[StrictStr], Field(description="The city of the candidate.")] = None, - state: Annotated[Optional[StrictStr], Field(description="The state or province of the candidate. Accepts state name, abbreviation, or ISO code.")] = None, - zip: Annotated[Optional[StrictStr], Field(description="The zip code or postal code of the candidate.")] = None, - country: Annotated[Optional[StrictStr], Field(description="The country of the candidate. Accepts country name or ISO code.")] = None, - linkedin_url: Annotated[Optional[StrictStr], Field(description="The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`.")] = None, - date_available: Annotated[Optional[date], Field(description="The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`).")] = None, - desired_salary: Annotated[Optional[StrictStr], Field(description="The desired salary of the candidate.")] = None, - referred_by: Annotated[Optional[StrictStr], Field(description="The person or entity that referred the candidate.")] = None, - website_url: Annotated[Optional[StrictStr], Field(description="The personal website, blog, or online portfolio of the candidate. Must be a valid URL.")] = None, - highest_education: Annotated[Optional[StrictStr], Field(description="The highest completed education level of the candidate.")] = None, - college_name: Annotated[Optional[StrictStr], Field(description="The college or university of the candidate.")] = None, - references: Annotated[Optional[StrictStr], Field(description="A list of references supplied by the candidate.")] = None, - resume: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`.")] = None, - cover_letter: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + email: Annotated[ + StrictStr | None, Field(description="The email address of the candidate. Must be a valid email address.") + ] = None, + phone_number: Annotated[StrictStr | None, Field(description="The phone number of the candidate.")] = None, + source: Annotated[ + StrictStr | None, + Field(description="The source of the candidate application, e.g. LinkedIn, Indeed, etc."), + ] = None, + address: Annotated[StrictStr | None, Field(description="The street address of the candidate.")] = None, + city: Annotated[StrictStr | None, Field(description="The city of the candidate.")] = None, + state: Annotated[ + StrictStr | None, + Field(description="The state or province of the candidate. Accepts state name, abbreviation, or ISO code."), + ] = None, + zip: Annotated[StrictStr | None, Field(description="The zip code or postal code of the candidate.")] = None, + country: Annotated[ + StrictStr | None, Field(description="The country of the candidate. Accepts country name or ISO code.") + ] = None, + linkedin_url: Annotated[ + StrictStr | None, + Field( + description="The LinkedIn profile URL of the candidate. Must match `https?://(.*\\\\.)?linkedin.com/...`." + ), + ] = None, + date_available: Annotated[ + date | None, + Field(description="The available start date of the candidate. Format: `Y-m-d` (e.g. `2024-06-01`)."), + ] = None, + desired_salary: Annotated[StrictStr | None, Field(description="The desired salary of the candidate.")] = None, + referred_by: Annotated[ + StrictStr | None, Field(description="The person or entity that referred the candidate.") + ] = None, + website_url: Annotated[ + StrictStr | None, + Field(description="The personal website, blog, or online portfolio of the candidate. Must be a valid URL."), + ] = None, + highest_education: Annotated[ + StrictStr | None, Field(description="The highest completed education level of the candidate.") + ] = None, + college_name: Annotated[ + StrictStr | None, Field(description="The college or university of the candidate.") + ] = None, + references: Annotated[ + StrictStr | None, Field(description="A list of references supplied by the candidate.") + ] = None, + resume: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes] | None, + Field( + description="Resume file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`." + ), + ] = None, + cover_letter: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes] | None, + Field( + description="Cover letter file for the candidate. Accepted MIME types: `application/pdf`, `application/msword`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `text/plain`, `application/rtf`, `image/jpeg`, `image/gif`, `image/png`, `image/tiff`, `image/bmp`." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Candidate - Create a new candidate application for a job opening. The owner of the API key used must have access to ATS settings. On success, returns the new candidate ID. Only fields required by the target job opening's standard questions need to be provided beyond firstName, lastName, and jobId. + Create a new candidate application for a job opening. The authenticated caller must have access to ATS settings. On success, returns the new candidate ID. Only fields required by the target job opening's standard questions need to be provided beyond firstName, lastName, and jobId. OAuth Scopes: hiring:applications.write :param first_name: The first name of the candidate. (required) :type first_name: str @@ -758,7 +811,7 @@ def create_candidate_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_candidate_serialize( first_name=first_name, @@ -785,23 +838,20 @@ def create_candidate_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateCandidateResponse", - '401': None, - '403': None, - '404': None, - '422': None, + _response_types_map: dict[str, str | None] = { + "200": "CreateCandidateResponse", + "401": None, + "403": None, + "404": None, + "422": None, + "429": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_candidate_serialize( self, first_name, @@ -833,98 +883,81 @@ def _create_candidate_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters # process the form parameters if first_name is not None: - _form_params.append(('firstName', first_name)) + _form_params.append(("firstName", first_name)) if last_name is not None: - _form_params.append(('lastName', last_name)) + _form_params.append(("lastName", last_name)) if email is not None: - _form_params.append(('email', email)) + _form_params.append(("email", email)) if phone_number is not None: - _form_params.append(('phoneNumber', phone_number)) + _form_params.append(("phoneNumber", phone_number)) if source is not None: - _form_params.append(('source', source)) + _form_params.append(("source", source)) if job_id is not None: - _form_params.append(('jobId', job_id)) + _form_params.append(("jobId", job_id)) if address is not None: - _form_params.append(('address', address)) + _form_params.append(("address", address)) if city is not None: - _form_params.append(('city', city)) + _form_params.append(("city", city)) if state is not None: - _form_params.append(('state', state)) + _form_params.append(("state", state)) if zip is not None: - _form_params.append(('zip', zip)) + _form_params.append(("zip", zip)) if country is not None: - _form_params.append(('country', country)) + _form_params.append(("country", country)) if linkedin_url is not None: - _form_params.append(('linkedinUrl', linkedin_url)) + _form_params.append(("linkedinUrl", linkedin_url)) if date_available is not None: - _form_params.append(('dateAvailable', date_available)) + _form_params.append(("dateAvailable", date_available)) if desired_salary is not None: - _form_params.append(('desiredSalary', desired_salary)) + _form_params.append(("desiredSalary", desired_salary)) if referred_by is not None: - _form_params.append(('referredBy', referred_by)) + _form_params.append(("referredBy", referred_by)) if website_url is not None: - _form_params.append(('websiteUrl', website_url)) + _form_params.append(("websiteUrl", website_url)) if highest_education is not None: - _form_params.append(('highestEducation', highest_education)) + _form_params.append(("highestEducation", highest_education)) if college_name is not None: - _form_params.append(('collegeName', college_name)) + _form_params.append(("collegeName", college_name)) if references is not None: - _form_params.append(('references', references)) + _form_params.append(("references", references)) if resume is not None: - _files['resume'] = resume + _files["resume"] = resume if cover_letter is not None: - _files['coverLetter'] = cover_letter + _files["coverLetter"] = cover_letter # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'multipart/form-data' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/applicant_tracking/application', + method="POST", + resource_path="/api/v1/applicant_tracking/application", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -934,59 +967,133 @@ def _create_candidate_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def create_job_opening( self, posting_title: Annotated[StrictStr, Field(description="The posting title of the job opening.")], job_status: Annotated[StrictStr, Field(description="The status of the job opening.")], - hiring_lead: Annotated[StrictInt, Field(description="The employee id (from the v1/applicant_tracking/hiring_leads endpoint) of the hiring lead for the job opening.")], - employment_type: Annotated[StrictStr, Field(description="The type of employment offered in the job opening, e.g. Full-Time, Part-Time, Contractor, etc.")], + hiring_lead: Annotated[ + StrictInt, + Field( + description="The internal employee ID of the hiring lead for the job opening. Use `employeeId` from Get Hiring Leads (`get-hiring-leads`)." + ), + ], + employment_type: Annotated[ + StrictStr, + Field( + description="The type of employment offered in the job opening, e.g. Full-Time, Part-Time, Contractor, etc." + ), + ], job_description: Annotated[StrictStr, Field(description="The long-form text description of the job opening.")], - department: Annotated[Optional[StrictStr], Field(description="The department of the job opening.")] = None, - minimum_experience: Annotated[Optional[StrictStr], Field(description="The minimum experience level that qualifies a candidate for the job opening.")] = None, - compensation: Annotated[Optional[StrictStr], Field(description="The pay rate or compensation for the job opening.")] = None, - job_location: Annotated[Optional[StrictInt], Field(description="The location id (from the v1/applicant_tracking/locations endpoint) of the job opening. Omit this parameter for a remote job location.")] = None, - application_question_resume: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for resume (true) or not (false) or if uploading a resume is mandatory (required).")] = None, - application_question_address: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for address (true) or not (false) or if entering an address is mandatory (required).")] = None, - application_question_linkedin_url: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for LinkedIn profile url (true) or not (false) or if entering a LinkedIn profile url is mandatory (required).")] = None, - application_question_date_available: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for availability date (true) or not (false) or if entering an availability date is mandatory (required).")] = None, - application_question_desired_salary: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for desired salary (true) or not (false) or if entering a desired salary is mandatory (required).")] = None, - application_question_cover_letter: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for cover letter (true) or not (false) or if uploading a cover letter is mandatory (required).")] = None, - application_question_referred_by: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for referred by (true) or not (false) or if entering referred by is mandatory (required).")] = None, - application_question_website_url: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for website url (true) or not (false) or if entering a website url is mandatory (required).")] = None, - application_question_highest_education: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for highest education (true) or not (false) or if entering highest education is mandatory (required).")] = None, - application_question_college: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required).")] = None, - application_question_references: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required).")] = None, - internal_job_code: Annotated[Optional[StrictStr], Field(description="The internal job code for the job opening.")] = None, - location_type: Annotated[Optional[StrictInt], Field(description="The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + department: Annotated[StrictStr | None, Field(description="The department of the job opening.")] = None, + minimum_experience: Annotated[ + StrictStr | None, + Field(description="The minimum experience level that qualifies a candidate for the job opening."), + ] = None, + compensation: Annotated[ + StrictStr | None, Field(description="The pay rate or compensation for the job opening.") + ] = None, + job_location: Annotated[ + StrictInt | None, + Field( + description="The location id (from the v1/applicant_tracking/locations endpoint) of the job opening. Omit this parameter for a remote job location." + ), + ] = None, + application_question_resume: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for resume (true) or not (false) or if uploading a resume is mandatory (required)." + ), + ] = None, + application_question_address: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for address (true) or not (false) or if entering an address is mandatory (required)." + ), + ] = None, + application_question_linkedin_url: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for LinkedIn profile url (true) or not (false) or if entering a LinkedIn profile url is mandatory (required)." + ), + ] = None, + application_question_date_available: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for availability date (true) or not (false) or if entering an availability date is mandatory (required)." + ), + ] = None, + application_question_desired_salary: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for desired salary (true) or not (false) or if entering a desired salary is mandatory (required)." + ), + ] = None, + application_question_cover_letter: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for cover letter (true) or not (false) or if uploading a cover letter is mandatory (required)." + ), + ] = None, + application_question_referred_by: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for referred by (true) or not (false) or if entering referred by is mandatory (required)." + ), + ] = None, + application_question_website_url: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for website url (true) or not (false) or if entering a website url is mandatory (required)." + ), + ] = None, + application_question_highest_education: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for highest education (true) or not (false) or if entering highest education is mandatory (required)." + ), + ] = None, + application_question_college: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required)." + ), + ] = None, + application_question_references: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required)." + ), + ] = None, + internal_job_code: Annotated[ + StrictStr | None, Field(description="The internal job code for the job opening.") + ] = None, + location_type: Annotated[ + StrictInt | None, + Field( + description="The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CreateJobOpeningResponse: """Create Job Opening - Create a new job opening. The owner of the API key used must have access to ATS settings. Use the Get Company Locations and Get Hiring Leads endpoints to obtain valid IDs for `jobLocation` and `hiringLead`. On success, returns the new job opening ID. + Create a new job opening. The authenticated caller must have access to ATS settings. Use the Get Company Locations and Get Hiring Leads endpoints to obtain valid IDs for `jobLocation` and `hiringLead`. On success, returns the new job opening ID. :param posting_title: The posting title of the job opening. (required) :type posting_title: str :param job_status: The status of the job opening. (required) :type job_status: str - :param hiring_lead: The employee id (from the v1/applicant_tracking/hiring_leads endpoint) of the hiring lead for the job opening. (required) + :param hiring_lead: The internal employee ID of the hiring lead for the job opening. Use `employeeId` from Get Hiring Leads (`get-hiring-leads`). (required) :type hiring_lead: int :param employment_type: The type of employment offered in the job opening, e.g. Full-Time, Part-Time, Contractor, etc. (required) :type employment_type: str @@ -1046,7 +1153,7 @@ def create_job_opening( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_job_opening_serialize( posting_title=posting_title, @@ -1074,74 +1181,147 @@ def create_job_opening( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateJobOpeningResponse", - '401': None, - '403': None, - '404': None, - '422': None, + _response_types_map: dict[str, str | None] = { + "200": "CreateJobOpeningResponse", + "401": None, + "403": None, + "404": None, + "422": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def create_job_opening_with_http_info( self, posting_title: Annotated[StrictStr, Field(description="The posting title of the job opening.")], job_status: Annotated[StrictStr, Field(description="The status of the job opening.")], - hiring_lead: Annotated[StrictInt, Field(description="The employee id (from the v1/applicant_tracking/hiring_leads endpoint) of the hiring lead for the job opening.")], - employment_type: Annotated[StrictStr, Field(description="The type of employment offered in the job opening, e.g. Full-Time, Part-Time, Contractor, etc.")], + hiring_lead: Annotated[ + StrictInt, + Field( + description="The internal employee ID of the hiring lead for the job opening. Use `employeeId` from Get Hiring Leads (`get-hiring-leads`)." + ), + ], + employment_type: Annotated[ + StrictStr, + Field( + description="The type of employment offered in the job opening, e.g. Full-Time, Part-Time, Contractor, etc." + ), + ], job_description: Annotated[StrictStr, Field(description="The long-form text description of the job opening.")], - department: Annotated[Optional[StrictStr], Field(description="The department of the job opening.")] = None, - minimum_experience: Annotated[Optional[StrictStr], Field(description="The minimum experience level that qualifies a candidate for the job opening.")] = None, - compensation: Annotated[Optional[StrictStr], Field(description="The pay rate or compensation for the job opening.")] = None, - job_location: Annotated[Optional[StrictInt], Field(description="The location id (from the v1/applicant_tracking/locations endpoint) of the job opening. Omit this parameter for a remote job location.")] = None, - application_question_resume: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for resume (true) or not (false) or if uploading a resume is mandatory (required).")] = None, - application_question_address: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for address (true) or not (false) or if entering an address is mandatory (required).")] = None, - application_question_linkedin_url: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for LinkedIn profile url (true) or not (false) or if entering a LinkedIn profile url is mandatory (required).")] = None, - application_question_date_available: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for availability date (true) or not (false) or if entering an availability date is mandatory (required).")] = None, - application_question_desired_salary: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for desired salary (true) or not (false) or if entering a desired salary is mandatory (required).")] = None, - application_question_cover_letter: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for cover letter (true) or not (false) or if uploading a cover letter is mandatory (required).")] = None, - application_question_referred_by: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for referred by (true) or not (false) or if entering referred by is mandatory (required).")] = None, - application_question_website_url: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for website url (true) or not (false) or if entering a website url is mandatory (required).")] = None, - application_question_highest_education: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for highest education (true) or not (false) or if entering highest education is mandatory (required).")] = None, - application_question_college: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required).")] = None, - application_question_references: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required).")] = None, - internal_job_code: Annotated[Optional[StrictStr], Field(description="The internal job code for the job opening.")] = None, - location_type: Annotated[Optional[StrictInt], Field(description="The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + department: Annotated[StrictStr | None, Field(description="The department of the job opening.")] = None, + minimum_experience: Annotated[ + StrictStr | None, + Field(description="The minimum experience level that qualifies a candidate for the job opening."), + ] = None, + compensation: Annotated[ + StrictStr | None, Field(description="The pay rate or compensation for the job opening.") + ] = None, + job_location: Annotated[ + StrictInt | None, + Field( + description="The location id (from the v1/applicant_tracking/locations endpoint) of the job opening. Omit this parameter for a remote job location." + ), + ] = None, + application_question_resume: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for resume (true) or not (false) or if uploading a resume is mandatory (required)." + ), + ] = None, + application_question_address: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for address (true) or not (false) or if entering an address is mandatory (required)." + ), + ] = None, + application_question_linkedin_url: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for LinkedIn profile url (true) or not (false) or if entering a LinkedIn profile url is mandatory (required)." + ), + ] = None, + application_question_date_available: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for availability date (true) or not (false) or if entering an availability date is mandatory (required)." + ), + ] = None, + application_question_desired_salary: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for desired salary (true) or not (false) or if entering a desired salary is mandatory (required)." + ), + ] = None, + application_question_cover_letter: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for cover letter (true) or not (false) or if uploading a cover letter is mandatory (required)." + ), + ] = None, + application_question_referred_by: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for referred by (true) or not (false) or if entering referred by is mandatory (required)." + ), + ] = None, + application_question_website_url: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for website url (true) or not (false) or if entering a website url is mandatory (required)." + ), + ] = None, + application_question_highest_education: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for highest education (true) or not (false) or if entering highest education is mandatory (required)." + ), + ] = None, + application_question_college: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required)." + ), + ] = None, + application_question_references: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required)." + ), + ] = None, + internal_job_code: Annotated[ + StrictStr | None, Field(description="The internal job code for the job opening.") + ] = None, + location_type: Annotated[ + StrictInt | None, + Field( + description="The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CreateJobOpeningResponse]: """Create Job Opening - Create a new job opening. The owner of the API key used must have access to ATS settings. Use the Get Company Locations and Get Hiring Leads endpoints to obtain valid IDs for `jobLocation` and `hiringLead`. On success, returns the new job opening ID. + Create a new job opening. The authenticated caller must have access to ATS settings. Use the Get Company Locations and Get Hiring Leads endpoints to obtain valid IDs for `jobLocation` and `hiringLead`. On success, returns the new job opening ID. :param posting_title: The posting title of the job opening. (required) :type posting_title: str :param job_status: The status of the job opening. (required) :type job_status: str - :param hiring_lead: The employee id (from the v1/applicant_tracking/hiring_leads endpoint) of the hiring lead for the job opening. (required) + :param hiring_lead: The internal employee ID of the hiring lead for the job opening. Use `employeeId` from Get Hiring Leads (`get-hiring-leads`). (required) :type hiring_lead: int :param employment_type: The type of employment offered in the job opening, e.g. Full-Time, Part-Time, Contractor, etc. (required) :type employment_type: str @@ -1201,7 +1381,7 @@ def create_job_opening_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_job_opening_serialize( posting_title=posting_title, @@ -1229,74 +1409,147 @@ def create_job_opening_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateJobOpeningResponse", - '401': None, - '403': None, - '404': None, - '422': None, + _response_types_map: dict[str, str | None] = { + "200": "CreateJobOpeningResponse", + "401": None, + "403": None, + "404": None, + "422": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_job_opening_without_preload_content( self, posting_title: Annotated[StrictStr, Field(description="The posting title of the job opening.")], job_status: Annotated[StrictStr, Field(description="The status of the job opening.")], - hiring_lead: Annotated[StrictInt, Field(description="The employee id (from the v1/applicant_tracking/hiring_leads endpoint) of the hiring lead for the job opening.")], - employment_type: Annotated[StrictStr, Field(description="The type of employment offered in the job opening, e.g. Full-Time, Part-Time, Contractor, etc.")], + hiring_lead: Annotated[ + StrictInt, + Field( + description="The internal employee ID of the hiring lead for the job opening. Use `employeeId` from Get Hiring Leads (`get-hiring-leads`)." + ), + ], + employment_type: Annotated[ + StrictStr, + Field( + description="The type of employment offered in the job opening, e.g. Full-Time, Part-Time, Contractor, etc." + ), + ], job_description: Annotated[StrictStr, Field(description="The long-form text description of the job opening.")], - department: Annotated[Optional[StrictStr], Field(description="The department of the job opening.")] = None, - minimum_experience: Annotated[Optional[StrictStr], Field(description="The minimum experience level that qualifies a candidate for the job opening.")] = None, - compensation: Annotated[Optional[StrictStr], Field(description="The pay rate or compensation for the job opening.")] = None, - job_location: Annotated[Optional[StrictInt], Field(description="The location id (from the v1/applicant_tracking/locations endpoint) of the job opening. Omit this parameter for a remote job location.")] = None, - application_question_resume: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for resume (true) or not (false) or if uploading a resume is mandatory (required).")] = None, - application_question_address: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for address (true) or not (false) or if entering an address is mandatory (required).")] = None, - application_question_linkedin_url: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for LinkedIn profile url (true) or not (false) or if entering a LinkedIn profile url is mandatory (required).")] = None, - application_question_date_available: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for availability date (true) or not (false) or if entering an availability date is mandatory (required).")] = None, - application_question_desired_salary: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for desired salary (true) or not (false) or if entering a desired salary is mandatory (required).")] = None, - application_question_cover_letter: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for cover letter (true) or not (false) or if uploading a cover letter is mandatory (required).")] = None, - application_question_referred_by: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for referred by (true) or not (false) or if entering referred by is mandatory (required).")] = None, - application_question_website_url: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for website url (true) or not (false) or if entering a website url is mandatory (required).")] = None, - application_question_highest_education: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for highest education (true) or not (false) or if entering highest education is mandatory (required).")] = None, - application_question_college: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required).")] = None, - application_question_references: Annotated[Optional[StrictStr], Field(description="Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required).")] = None, - internal_job_code: Annotated[Optional[StrictStr], Field(description="The internal job code for the job opening.")] = None, - location_type: Annotated[Optional[StrictInt], Field(description="The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + department: Annotated[StrictStr | None, Field(description="The department of the job opening.")] = None, + minimum_experience: Annotated[ + StrictStr | None, + Field(description="The minimum experience level that qualifies a candidate for the job opening."), + ] = None, + compensation: Annotated[ + StrictStr | None, Field(description="The pay rate or compensation for the job opening.") + ] = None, + job_location: Annotated[ + StrictInt | None, + Field( + description="The location id (from the v1/applicant_tracking/locations endpoint) of the job opening. Omit this parameter for a remote job location." + ), + ] = None, + application_question_resume: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for resume (true) or not (false) or if uploading a resume is mandatory (required)." + ), + ] = None, + application_question_address: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for address (true) or not (false) or if entering an address is mandatory (required)." + ), + ] = None, + application_question_linkedin_url: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for LinkedIn profile url (true) or not (false) or if entering a LinkedIn profile url is mandatory (required)." + ), + ] = None, + application_question_date_available: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for availability date (true) or not (false) or if entering an availability date is mandatory (required)." + ), + ] = None, + application_question_desired_salary: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for desired salary (true) or not (false) or if entering a desired salary is mandatory (required)." + ), + ] = None, + application_question_cover_letter: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for cover letter (true) or not (false) or if uploading a cover letter is mandatory (required)." + ), + ] = None, + application_question_referred_by: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for referred by (true) or not (false) or if entering referred by is mandatory (required)." + ), + ] = None, + application_question_website_url: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for website url (true) or not (false) or if entering a website url is mandatory (required)." + ), + ] = None, + application_question_highest_education: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for highest education (true) or not (false) or if entering highest education is mandatory (required)." + ), + ] = None, + application_question_college: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for college (true) or not (false) or if entering a college is mandatory (required)." + ), + ] = None, + application_question_references: Annotated[ + StrictStr | None, + Field( + description="Whether the job opening application has a standard question for references (true) or not (false) or if entering references is mandatory (required)." + ), + ] = None, + internal_job_code: Annotated[ + StrictStr | None, Field(description="The internal job code for the job opening.") + ] = None, + location_type: Annotated[ + StrictInt | None, + Field( + description="The location type for the job opening. `0` = on-site (requires `jobLocation`), `1` = remote (no `jobLocation`), `2` = hybrid (requires `jobLocation`). Defaults to `1` if omitted and no `jobLocation` is provided, or `0` if `jobLocation` is provided." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Job Opening - Create a new job opening. The owner of the API key used must have access to ATS settings. Use the Get Company Locations and Get Hiring Leads endpoints to obtain valid IDs for `jobLocation` and `hiringLead`. On success, returns the new job opening ID. + Create a new job opening. The authenticated caller must have access to ATS settings. Use the Get Company Locations and Get Hiring Leads endpoints to obtain valid IDs for `jobLocation` and `hiringLead`. On success, returns the new job opening ID. :param posting_title: The posting title of the job opening. (required) :type posting_title: str :param job_status: The status of the job opening. (required) :type job_status: str - :param hiring_lead: The employee id (from the v1/applicant_tracking/hiring_leads endpoint) of the hiring lead for the job opening. (required) + :param hiring_lead: The internal employee ID of the hiring lead for the job opening. Use `employeeId` from Get Hiring Leads (`get-hiring-leads`). (required) :type hiring_lead: int :param employment_type: The type of employment offered in the job opening, e.g. Full-Time, Part-Time, Contractor, etc. (required) :type employment_type: str @@ -1356,7 +1609,7 @@ def create_job_opening_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_job_opening_serialize( posting_title=posting_title, @@ -1384,23 +1637,19 @@ def create_job_opening_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateJobOpeningResponse", - '401': None, - '403': None, - '404': None, - '422': None, + _response_types_map: dict[str, str | None] = { + "200": "CreateJobOpeningResponse", + "401": None, + "403": None, + "404": None, + "422": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_job_opening_serialize( self, posting_title, @@ -1433,100 +1682,83 @@ def _create_job_opening_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters # process the form parameters if posting_title is not None: - _form_params.append(('postingTitle', posting_title)) + _form_params.append(("postingTitle", posting_title)) if job_status is not None: - _form_params.append(('jobStatus', job_status)) + _form_params.append(("jobStatus", job_status)) if hiring_lead is not None: - _form_params.append(('hiringLead', hiring_lead)) + _form_params.append(("hiringLead", hiring_lead)) if department is not None: - _form_params.append(('department', department)) + _form_params.append(("department", department)) if employment_type is not None: - _form_params.append(('employmentType', employment_type)) + _form_params.append(("employmentType", employment_type)) if minimum_experience is not None: - _form_params.append(('minimumExperience', minimum_experience)) + _form_params.append(("minimumExperience", minimum_experience)) if compensation is not None: - _form_params.append(('compensation', compensation)) + _form_params.append(("compensation", compensation)) if job_location is not None: - _form_params.append(('jobLocation', job_location)) + _form_params.append(("jobLocation", job_location)) if job_description is not None: - _form_params.append(('jobDescription', job_description)) + _form_params.append(("jobDescription", job_description)) if application_question_resume is not None: - _form_params.append(('applicationQuestionResume', application_question_resume)) + _form_params.append(("applicationQuestionResume", application_question_resume)) if application_question_address is not None: - _form_params.append(('applicationQuestionAddress', application_question_address)) + _form_params.append(("applicationQuestionAddress", application_question_address)) if application_question_linkedin_url is not None: - _form_params.append(('applicationQuestionLinkedinUrl', application_question_linkedin_url)) + _form_params.append(("applicationQuestionLinkedinUrl", application_question_linkedin_url)) if application_question_date_available is not None: - _form_params.append(('applicationQuestionDateAvailable', application_question_date_available)) + _form_params.append(("applicationQuestionDateAvailable", application_question_date_available)) if application_question_desired_salary is not None: - _form_params.append(('applicationQuestionDesiredSalary', application_question_desired_salary)) + _form_params.append(("applicationQuestionDesiredSalary", application_question_desired_salary)) if application_question_cover_letter is not None: - _form_params.append(('applicationQuestionCoverLetter', application_question_cover_letter)) + _form_params.append(("applicationQuestionCoverLetter", application_question_cover_letter)) if application_question_referred_by is not None: - _form_params.append(('applicationQuestionReferredBy', application_question_referred_by)) + _form_params.append(("applicationQuestionReferredBy", application_question_referred_by)) if application_question_website_url is not None: - _form_params.append(('applicationQuestionWebsiteUrl', application_question_website_url)) + _form_params.append(("applicationQuestionWebsiteUrl", application_question_website_url)) if application_question_highest_education is not None: - _form_params.append(('applicationQuestionHighestEducation', application_question_highest_education)) + _form_params.append(("applicationQuestionHighestEducation", application_question_highest_education)) if application_question_college is not None: - _form_params.append(('applicationQuestionCollege', application_question_college)) + _form_params.append(("applicationQuestionCollege", application_question_college)) if application_question_references is not None: - _form_params.append(('applicationQuestionReferences', application_question_references)) + _form_params.append(("applicationQuestionReferences", application_question_references)) if internal_job_code is not None: - _form_params.append(('internalJobCode', internal_job_code)) + _form_params.append(("internalJobCode", internal_job_code)) if location_type is not None: - _form_params.append(('locationType', location_type)) + _form_params.append(("locationType", location_type)) # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'multipart/form-data' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/applicant_tracking/job_opening', + method="POST", + resource_path="/api/v1/applicant_tracking/job_opening", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1536,35 +1768,29 @@ def _create_job_opening_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_application_details( self, - application_id: Annotated[StrictInt, Field(description="The ID of the application to retrieve details for.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + application_id: Annotated[ + StrictStr | None, Field(description="The ID of the application to retrieve details for.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApplicationDetails: """Get Job Application Details - Get the full details of a single application including applicant info, job details, questions and answers, and status history. The owner of the API key used must have access to ATS settings. + Get the full details of a single application including applicant info, job details, questions and answers, and status history. The authenticated caller must have access to ATS settings. OAuth Scopes: hiring:applications :param application_id: The ID of the application to retrieve details for. (required) - :type application_id: int + :type application_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1585,56 +1811,49 @@ def get_application_details( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_application_details_serialize( application_id=application_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApplicationDetails", - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "ApplicationDetails", + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_application_details_with_http_info( self, - application_id: Annotated[StrictInt, Field(description="The ID of the application to retrieve details for.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + application_id: Annotated[ + StrictStr | None, Field(description="The ID of the application to retrieve details for.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ApplicationDetails]: """Get Job Application Details - Get the full details of a single application including applicant info, job details, questions and answers, and status history. The owner of the API key used must have access to ATS settings. + Get the full details of a single application including applicant info, job details, questions and answers, and status history. The authenticated caller must have access to ATS settings. OAuth Scopes: hiring:applications :param application_id: The ID of the application to retrieve details for. (required) - :type application_id: int + :type application_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1655,56 +1874,49 @@ def get_application_details_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_application_details_serialize( application_id=application_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApplicationDetails", - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "ApplicationDetails", + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_application_details_without_preload_content( self, - application_id: Annotated[StrictInt, Field(description="The ID of the application to retrieve details for.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + application_id: Annotated[ + StrictStr | None, Field(description="The ID of the application to retrieve details for.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Job Application Details - Get the full details of a single application including applicant info, job details, questions and answers, and status history. The owner of the API key used must have access to ATS settings. + Get the full details of a single application including applicant info, job details, questions and answers, and status history. The authenticated caller must have access to ATS settings. OAuth Scopes: hiring:applications :param application_id: The ID of the application to retrieve details for. (required) - :type application_id: int + :type application_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1725,29 +1937,25 @@ def get_application_details_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_application_details_serialize( application_id=application_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApplicationDetails", - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "ApplicationDetails", + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_application_details_serialize( self, application_id, @@ -1759,45 +1967,33 @@ def _get_application_details_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if application_id is not None: - _path_params['applicationId'] = application_id + _path_params["applicationId"] = application_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/applicant_tracking/applications/{applicationId}', + method="GET", + resource_path="/api/v1/applicant_tracking/applications/{applicationId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1807,40 +2003,52 @@ def _get_application_details_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_applications( self, - page: Annotated[Optional[StrictInt], Field(description="The page number")] = None, - job_id: Annotated[Optional[StrictInt], Field(description="A Job Id to limit results to")] = None, - application_status_id: Annotated[Optional[StrictStr], Field(description="One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`).")] = None, - application_status: Annotated[Optional[StrictStr], Field(description="One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`.")] = None, - job_status_groups: Annotated[Optional[StrictStr], Field(description="One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`.")] = None, - search_string: Annotated[Optional[StrictStr], Field(description="A general search criteria by which to find applications.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="A specific field to sort the results by.")] = None, - sort_order: Annotated[Optional[StrictStr], Field(description="Order by which to sort results.")] = None, - new_since: Annotated[Optional[StrictStr], Field(description="Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page: Annotated[StrictInt | None, Field(description="The page number")] = None, + job_id: Annotated[StrictInt | None, Field(description="A Job Id to limit results to")] = None, + application_status_id: Annotated[ + StrictStr | None, + Field(description="One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`)."), + ] = None, + application_status: Annotated[ + StrictStr | None, + Field( + description="One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`." + ), + ] = None, + job_status_groups: Annotated[ + StrictStr | None, + Field( + description="One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`." + ), + ] = None, + search_string: Annotated[ + StrictStr | None, Field(description="A general search criteria by which to find applications.") + ] = None, + sort_by: Annotated[StrictStr | None, Field(description="A specific field to sort the results by.")] = None, + sort_order: Annotated[StrictStr | None, Field(description="Order by which to sort results.")] = None, + new_since: Annotated[ + StrictStr | None, + Field( + description="Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). Do NOT use ISO 8601 format (no `T` separator or `Z` suffix)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApplicationsList: """Get Job Applications - Get a list of applications. The owner of the API key used must have access to ATS settings. Combine as many different optional parameter filters as you like. + Get a list of applications. The authenticated caller must have access to ATS settings. Combine as many different optional parameter filters as you like. OAuth Scopes: hiring:applications :param page: The page number :type page: int @@ -1858,7 +2066,7 @@ def get_applications( :type sort_by: str :param sort_order: Order by which to sort results. :type sort_order: str - :param new_since: Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). + :param new_since: Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). Do NOT use ISO 8601 format (no `T` separator or `Z` suffix). :type new_since: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1880,7 +2088,7 @@ def get_applications( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_applications_serialize( page=page, @@ -1895,54 +2103,65 @@ def get_applications( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApplicationsList", - '400': None, - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "ApplicationsList", + "400": None, + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_applications_with_http_info( self, - page: Annotated[Optional[StrictInt], Field(description="The page number")] = None, - job_id: Annotated[Optional[StrictInt], Field(description="A Job Id to limit results to")] = None, - application_status_id: Annotated[Optional[StrictStr], Field(description="One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`).")] = None, - application_status: Annotated[Optional[StrictStr], Field(description="One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`.")] = None, - job_status_groups: Annotated[Optional[StrictStr], Field(description="One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`.")] = None, - search_string: Annotated[Optional[StrictStr], Field(description="A general search criteria by which to find applications.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="A specific field to sort the results by.")] = None, - sort_order: Annotated[Optional[StrictStr], Field(description="Order by which to sort results.")] = None, - new_since: Annotated[Optional[StrictStr], Field(description="Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page: Annotated[StrictInt | None, Field(description="The page number")] = None, + job_id: Annotated[StrictInt | None, Field(description="A Job Id to limit results to")] = None, + application_status_id: Annotated[ + StrictStr | None, + Field(description="One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`)."), + ] = None, + application_status: Annotated[ + StrictStr | None, + Field( + description="One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`." + ), + ] = None, + job_status_groups: Annotated[ + StrictStr | None, + Field( + description="One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`." + ), + ] = None, + search_string: Annotated[ + StrictStr | None, Field(description="A general search criteria by which to find applications.") + ] = None, + sort_by: Annotated[StrictStr | None, Field(description="A specific field to sort the results by.")] = None, + sort_order: Annotated[StrictStr | None, Field(description="Order by which to sort results.")] = None, + new_since: Annotated[ + StrictStr | None, + Field( + description="Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). Do NOT use ISO 8601 format (no `T` separator or `Z` suffix)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ApplicationsList]: """Get Job Applications - Get a list of applications. The owner of the API key used must have access to ATS settings. Combine as many different optional parameter filters as you like. + Get a list of applications. The authenticated caller must have access to ATS settings. Combine as many different optional parameter filters as you like. OAuth Scopes: hiring:applications :param page: The page number :type page: int @@ -1960,7 +2179,7 @@ def get_applications_with_http_info( :type sort_by: str :param sort_order: Order by which to sort results. :type sort_order: str - :param new_since: Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). + :param new_since: Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). Do NOT use ISO 8601 format (no `T` separator or `Z` suffix). :type new_since: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1982,7 +2201,7 @@ def get_applications_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_applications_serialize( page=page, @@ -1997,54 +2216,65 @@ def get_applications_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApplicationsList", - '400': None, - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "ApplicationsList", + "400": None, + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_applications_without_preload_content( self, - page: Annotated[Optional[StrictInt], Field(description="The page number")] = None, - job_id: Annotated[Optional[StrictInt], Field(description="A Job Id to limit results to")] = None, - application_status_id: Annotated[Optional[StrictStr], Field(description="One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`).")] = None, - application_status: Annotated[Optional[StrictStr], Field(description="One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`.")] = None, - job_status_groups: Annotated[Optional[StrictStr], Field(description="One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`.")] = None, - search_string: Annotated[Optional[StrictStr], Field(description="A general search criteria by which to find applications.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="A specific field to sort the results by.")] = None, - sort_order: Annotated[Optional[StrictStr], Field(description="Order by which to sort results.")] = None, - new_since: Annotated[Optional[StrictStr], Field(description="Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page: Annotated[StrictInt | None, Field(description="The page number")] = None, + job_id: Annotated[StrictInt | None, Field(description="A Job Id to limit results to")] = None, + application_status_id: Annotated[ + StrictStr | None, + Field(description="One or more application status IDs to filter by, comma-separated (e.g. `1,2,3`)."), + ] = None, + application_status: Annotated[ + StrictStr | None, + Field( + description="One or more application status group codes to filter by, comma-separated (e.g. `NEW,ACTIVE`). Allowed values: `ALL`, `ALL_ACTIVE`, `NEW`, `ACTIVE`, `INACTIVE`, `HIRED`." + ), + ] = None, + job_status_groups: Annotated[ + StrictStr | None, + Field( + description="One or more position status groups to filter by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`." + ), + ] = None, + search_string: Annotated[ + StrictStr | None, Field(description="A general search criteria by which to find applications.") + ] = None, + sort_by: Annotated[StrictStr | None, Field(description="A specific field to sort the results by.")] = None, + sort_order: Annotated[StrictStr | None, Field(description="Order by which to sort results.")] = None, + new_since: Annotated[ + StrictStr | None, + Field( + description="Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). Do NOT use ISO 8601 format (no `T` separator or `Z` suffix)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Job Applications - Get a list of applications. The owner of the API key used must have access to ATS settings. Combine as many different optional parameter filters as you like. + Get a list of applications. The authenticated caller must have access to ATS settings. Combine as many different optional parameter filters as you like. OAuth Scopes: hiring:applications :param page: The page number :type page: int @@ -2062,7 +2292,7 @@ def get_applications_without_preload_content( :type sort_by: str :param sort_order: Order by which to sort results. :type sort_order: str - :param new_since: Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). + :param new_since: Only return applications submitted after this UTC timestamp. Format: `Y-m-d H:i:s` (e.g. `2024-01-01 13:00:00`). Do NOT use ISO 8601 format (no `T` separator or `Z` suffix). :type new_since: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2084,7 +2314,7 @@ def get_applications_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_applications_serialize( page=page, @@ -2099,22 +2329,18 @@ def get_applications_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApplicationsList", - '400': None, - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "ApplicationsList", + "400": None, + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_applications_serialize( self, page, @@ -2134,79 +2360,58 @@ def _get_applications_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + _query_params.append(("page", page)) + if job_id is not None: - - _query_params.append(('jobId', job_id)) - + _query_params.append(("jobId", job_id)) + if application_status_id is not None: - - _query_params.append(('applicationStatusId', application_status_id)) - + _query_params.append(("applicationStatusId", application_status_id)) + if application_status is not None: - - _query_params.append(('applicationStatus', application_status)) - + _query_params.append(("applicationStatus", application_status)) + if job_status_groups is not None: - - _query_params.append(('jobStatusGroups', job_status_groups)) - + _query_params.append(("jobStatusGroups", job_status_groups)) + if search_string is not None: - - _query_params.append(('searchString', search_string)) - + _query_params.append(("searchString", search_string)) + if sort_by is not None: - - _query_params.append(('sortBy', sort_by)) - + _query_params.append(("sortBy", sort_by)) + if sort_order is not None: - - _query_params.append(('sortOrder', sort_order)) - + _query_params.append(("sortOrder", sort_order)) + if new_since is not None: - - _query_params.append(('newSince', new_since)) - + _query_params.append(("newSince", new_since)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/applicant_tracking/applications', + method="GET", + resource_path="/api/v1/applicant_tracking/applications", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2216,31 +2421,23 @@ def _get_applications_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_company_locations( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[Location]: + ) -> list[Location]: """Get Company Locations - Get all company locations available for use when creating a job opening. The owner of the API key used must have access to ATS settings. Use the returned location IDs as the `jobLocation` field when calling the Create Job Opening endpoint. + Get all company locations available for use when creating a job opening. The authenticated caller must have access to ATS settings. Use the returned location IDs as the `jobLocation` field when calling the Create Job Opening endpoint. OAuth Scopes: hiring:applications :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2262,51 +2459,39 @@ def get_company_locations( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_company_locations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Location]", - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "List[Location]", + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_company_locations_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[Location]]: + ) -> ApiResponse[list[Location]]: """Get Company Locations - Get all company locations available for use when creating a job opening. The owner of the API key used must have access to ATS settings. Use the returned location IDs as the `jobLocation` field when calling the Create Job Opening endpoint. + Get all company locations available for use when creating a job opening. The authenticated caller must have access to ATS settings. Use the returned location IDs as the `jobLocation` field when calling the Create Job Opening endpoint. OAuth Scopes: hiring:applications :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2328,51 +2513,39 @@ def get_company_locations_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_company_locations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Location]", - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "List[Location]", + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_company_locations_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Company Locations - Get all company locations available for use when creating a job opening. The owner of the API key used must have access to ATS settings. Use the returned location IDs as the `jobLocation` field when calling the Create Job Opening endpoint. + Get all company locations available for use when creating a job opening. The authenticated caller must have access to ATS settings. Use the returned location IDs as the `jobLocation` field when calling the Create Job Opening endpoint. OAuth Scopes: hiring:applications :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2394,28 +2567,21 @@ def get_company_locations_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_company_locations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Location]", - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "List[Location]", + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_company_locations_serialize( self, _request_auth, @@ -2426,17 +2592,14 @@ def _get_company_locations_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -2444,25 +2607,16 @@ def _get_company_locations_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/applicant_tracking/locations', + method="GET", + resource_path="/api/v1/applicant_tracking/locations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2472,31 +2626,23 @@ def _get_company_locations_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_hiring_leads( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[HiringLead]: + ) -> list[HiringLead]: """Get Hiring Leads - Get the list of employees who can be assigned as a hiring lead when creating a new job opening. The owner of the API key used must have access to ATS settings. Use the returned `employeeId` values as the `hiringLead` field when calling the Create Job Opening endpoint. + Get the list of employees who can be assigned as a hiring lead when creating a new job opening. The authenticated caller must have access to ATS settings. Use the returned `employeeId` values as the `hiringLead` field when calling the Create Job Opening endpoint. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2518,51 +2664,39 @@ def get_hiring_leads( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_hiring_leads_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[HiringLead]", - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "List[HiringLead]", + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_hiring_leads_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[HiringLead]]: + ) -> ApiResponse[list[HiringLead]]: """Get Hiring Leads - Get the list of employees who can be assigned as a hiring lead when creating a new job opening. The owner of the API key used must have access to ATS settings. Use the returned `employeeId` values as the `hiringLead` field when calling the Create Job Opening endpoint. + Get the list of employees who can be assigned as a hiring lead when creating a new job opening. The authenticated caller must have access to ATS settings. Use the returned `employeeId` values as the `hiringLead` field when calling the Create Job Opening endpoint. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2584,51 +2718,39 @@ def get_hiring_leads_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_hiring_leads_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[HiringLead]", - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "List[HiringLead]", + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_hiring_leads_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Hiring Leads - Get the list of employees who can be assigned as a hiring lead when creating a new job opening. The owner of the API key used must have access to ATS settings. Use the returned `employeeId` values as the `hiringLead` field when calling the Create Job Opening endpoint. + Get the list of employees who can be assigned as a hiring lead when creating a new job opening. The authenticated caller must have access to ATS settings. Use the returned `employeeId` values as the `hiringLead` field when calling the Create Job Opening endpoint. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2650,28 +2772,21 @@ def get_hiring_leads_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_hiring_leads_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[HiringLead]", - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "List[HiringLead]", + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_hiring_leads_serialize( self, _request_auth, @@ -2682,17 +2797,14 @@ def _get_hiring_leads_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -2700,25 +2812,16 @@ def _get_hiring_leads_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/applicant_tracking/hiring_leads', + method="GET", + resource_path="/api/v1/applicant_tracking/hiring_leads", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2728,35 +2831,37 @@ def _get_hiring_leads_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_job_summaries( self, - status_groups: Annotated[Optional[StrictStr], Field(description="One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions.")] = None, - status_ids: Annotated[Optional[StrictStr], Field(description="One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="A specific field to sort the results by.")] = None, - sort_order: Annotated[Optional[StrictStr], Field(description="Order by which to sort results.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + status_groups: Annotated[ + StrictStr | None, + Field( + description="One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions." + ), + ] = None, + status_ids: Annotated[ + StrictStr | None, + Field( + description="One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided." + ), + ] = None, + sort_by: Annotated[StrictStr | None, Field(description="A specific field to sort the results by.")] = None, + sort_order: Annotated[StrictStr | None, Field(description="Order by which to sort results.")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[JobSummary]: + ) -> list[JobSummary]: """Get Job Summaries - Get a list of job opening summaries. The owner of the API key used must have access to ATS settings. Results can be filtered by status group and sorted by various fields. By default returns all non-deleted job openings. + Get a list of job opening summaries. The authenticated caller must have access to ATS settings. Results can be filtered by status group and sorted by various fields. By default returns all non-deleted job openings. OAuth Scopes: hiring:applications :param status_groups: One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions. :type status_groups: str @@ -2786,7 +2891,7 @@ def get_job_summaries( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_job_summaries_serialize( status_groups=status_groups, @@ -2796,49 +2901,50 @@ def get_job_summaries( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[JobSummary]", - '400': None, - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[JobSummary]", + "400": None, + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_job_summaries_with_http_info( self, - status_groups: Annotated[Optional[StrictStr], Field(description="One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions.")] = None, - status_ids: Annotated[Optional[StrictStr], Field(description="One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="A specific field to sort the results by.")] = None, - sort_order: Annotated[Optional[StrictStr], Field(description="Order by which to sort results.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + status_groups: Annotated[ + StrictStr | None, + Field( + description="One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions." + ), + ] = None, + status_ids: Annotated[ + StrictStr | None, + Field( + description="One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided." + ), + ] = None, + sort_by: Annotated[StrictStr | None, Field(description="A specific field to sort the results by.")] = None, + sort_order: Annotated[StrictStr | None, Field(description="Order by which to sort results.")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[JobSummary]]: + ) -> ApiResponse[list[JobSummary]]: """Get Job Summaries - Get a list of job opening summaries. The owner of the API key used must have access to ATS settings. Results can be filtered by status group and sorted by various fields. By default returns all non-deleted job openings. + Get a list of job opening summaries. The authenticated caller must have access to ATS settings. Results can be filtered by status group and sorted by various fields. By default returns all non-deleted job openings. OAuth Scopes: hiring:applications :param status_groups: One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions. :type status_groups: str @@ -2868,7 +2974,7 @@ def get_job_summaries_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_job_summaries_serialize( status_groups=status_groups, @@ -2878,49 +2984,50 @@ def get_job_summaries_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[JobSummary]", - '400': None, - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[JobSummary]", + "400": None, + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_job_summaries_without_preload_content( self, - status_groups: Annotated[Optional[StrictStr], Field(description="One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions.")] = None, - status_ids: Annotated[Optional[StrictStr], Field(description="One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="A specific field to sort the results by.")] = None, - sort_order: Annotated[Optional[StrictStr], Field(description="Order by which to sort results.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + status_groups: Annotated[ + StrictStr | None, + Field( + description="One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions." + ), + ] = None, + status_ids: Annotated[ + StrictStr | None, + Field( + description="One or more specific job opening status IDs to filter by, comma-separated (e.g. `1,2`). Combined with `statusGroups` when both are provided." + ), + ] = None, + sort_by: Annotated[StrictStr | None, Field(description="A specific field to sort the results by.")] = None, + sort_order: Annotated[StrictStr | None, Field(description="Order by which to sort results.")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Job Summaries - Get a list of job opening summaries. The owner of the API key used must have access to ATS settings. Results can be filtered by status group and sorted by various fields. By default returns all non-deleted job openings. + Get a list of job opening summaries. The authenticated caller must have access to ATS settings. Results can be filtered by status group and sorted by various fields. By default returns all non-deleted job openings. OAuth Scopes: hiring:applications :param status_groups: One or more status groups to filter positions by, comma-separated (e.g. `Draft,Open`). Allowed values: `ALL`, `DRAFT_AND_OPEN`, `Open`, `Filled`, `Draft`, `Deleted`, `On Hold`, `Canceled`. Defaults to all non-deleted positions. :type status_groups: str @@ -2950,7 +3057,7 @@ def get_job_summaries_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_job_summaries_serialize( status_groups=status_groups, @@ -2960,22 +3067,18 @@ def get_job_summaries_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[JobSummary]", - '400': None, - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[JobSummary]", + "400": None, + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_job_summaries_serialize( self, status_groups, @@ -2990,59 +3093,43 @@ def _get_job_summaries_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters if status_groups is not None: - - _query_params.append(('statusGroups', status_groups)) - + _query_params.append(("statusGroups", status_groups)) + if status_ids is not None: - - _query_params.append(('status_ids', status_ids)) - + _query_params.append(("status_ids", status_ids)) + if sort_by is not None: - - _query_params.append(('sortBy', sort_by)) - + _query_params.append(("sortBy", sort_by)) + if sort_order is not None: - - _query_params.append(('sortOrder', sort_order)) - + _query_params.append(("sortOrder", sort_order)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/applicant_tracking/jobs', + method="GET", + resource_path="/api/v1/applicant_tracking/jobs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3052,31 +3139,23 @@ def _get_job_summaries_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_statuses( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ApplicantStatus]: + ) -> list[ApplicantStatus]: """Get Applicant Statuses - Get a list of applicant statuses configured for the company. The owner of the API key used must have access to ATS settings. Returns both system-defined and custom statuses. + Get a list of applicant statuses configured for the company. The authenticated caller must have access to ATS settings. Returns both system-defined and custom statuses. OAuth Scopes: hiring:applications :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3098,50 +3177,38 @@ def get_statuses( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_statuses_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ApplicantStatus]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[ApplicantStatus]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_statuses_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ApplicantStatus]]: + ) -> ApiResponse[list[ApplicantStatus]]: """Get Applicant Statuses - Get a list of applicant statuses configured for the company. The owner of the API key used must have access to ATS settings. Returns both system-defined and custom statuses. + Get a list of applicant statuses configured for the company. The authenticated caller must have access to ATS settings. Returns both system-defined and custom statuses. OAuth Scopes: hiring:applications :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3163,50 +3230,38 @@ def get_statuses_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_statuses_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ApplicantStatus]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[ApplicantStatus]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_statuses_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Applicant Statuses - Get a list of applicant statuses configured for the company. The owner of the API key used must have access to ATS settings. Returns both system-defined and custom statuses. + Get a list of applicant statuses configured for the company. The authenticated caller must have access to ATS settings. Returns both system-defined and custom statuses. OAuth Scopes: hiring:applications :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3228,27 +3283,20 @@ def get_statuses_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_statuses_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ApplicantStatus]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[ApplicantStatus]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_statuses_serialize( self, _request_auth, @@ -3259,17 +3307,14 @@ def _get_statuses_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -3277,25 +3322,16 @@ def _get_statuses_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/applicant_tracking/statuses', + method="GET", + resource_path="/api/v1/applicant_tracking/statuses", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3305,33 +3341,29 @@ def _get_statuses_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_applicant_status( self, - application_id: Annotated[StrictInt, Field(description="The ID of the application whose status should be updated.")], - update_applicant_status_request: Annotated[UpdateApplicantStatusRequest, Field(description="The new status to assign to the application.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + application_id: Annotated[ + StrictInt | None, Field(description="The ID of the application whose status should be updated.") + ], + update_applicant_status_request: Annotated[ + UpdateApplicantStatusRequest, Field(description="The new status to assign to the application.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UpdateApplicantStatusResponse: """Update Applicant Status - Update the status of an application. The owner of the API key used must have access to ATS settings. Use the Get Applicant Statuses endpoint to obtain valid status IDs. + Update the status of an application. The authenticated caller must have access to ATS settings. Use the Get Applicant Statuses endpoint to obtain valid status IDs. OAuth Scopes: hiring:applications.write :param application_id: The ID of the application whose status should be updated. (required) :type application_id: int @@ -3357,7 +3389,7 @@ def update_applicant_status( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_applicant_status_serialize( application_id=application_id, @@ -3365,48 +3397,43 @@ def update_applicant_status( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateApplicantStatusResponse", - '400': None, - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "UpdateApplicantStatusResponse", + "400": None, + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def update_applicant_status_with_http_info( self, - application_id: Annotated[StrictInt, Field(description="The ID of the application whose status should be updated.")], - update_applicant_status_request: Annotated[UpdateApplicantStatusRequest, Field(description="The new status to assign to the application.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + application_id: Annotated[ + StrictInt | None, Field(description="The ID of the application whose status should be updated.") + ], + update_applicant_status_request: Annotated[ + UpdateApplicantStatusRequest, Field(description="The new status to assign to the application.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UpdateApplicantStatusResponse]: """Update Applicant Status - Update the status of an application. The owner of the API key used must have access to ATS settings. Use the Get Applicant Statuses endpoint to obtain valid status IDs. + Update the status of an application. The authenticated caller must have access to ATS settings. Use the Get Applicant Statuses endpoint to obtain valid status IDs. OAuth Scopes: hiring:applications.write :param application_id: The ID of the application whose status should be updated. (required) :type application_id: int @@ -3432,7 +3459,7 @@ def update_applicant_status_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_applicant_status_serialize( application_id=application_id, @@ -3440,48 +3467,43 @@ def update_applicant_status_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateApplicantStatusResponse", - '400': None, - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "UpdateApplicantStatusResponse", + "400": None, + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_applicant_status_without_preload_content( self, - application_id: Annotated[StrictInt, Field(description="The ID of the application whose status should be updated.")], - update_applicant_status_request: Annotated[UpdateApplicantStatusRequest, Field(description="The new status to assign to the application.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + application_id: Annotated[ + StrictInt | None, Field(description="The ID of the application whose status should be updated.") + ], + update_applicant_status_request: Annotated[ + UpdateApplicantStatusRequest, Field(description="The new status to assign to the application.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Applicant Status - Update the status of an application. The owner of the API key used must have access to ATS settings. Use the Get Applicant Statuses endpoint to obtain valid status IDs. + Update the status of an application. The authenticated caller must have access to ATS settings. Use the Get Applicant Statuses endpoint to obtain valid status IDs. OAuth Scopes: hiring:applications.write :param application_id: The ID of the application whose status should be updated. (required) :type application_id: int @@ -3507,7 +3529,7 @@ def update_applicant_status_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_applicant_status_serialize( application_id=application_id, @@ -3515,23 +3537,19 @@ def update_applicant_status_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateApplicantStatusResponse", - '400': None, - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "UpdateApplicantStatusResponse", + "400": None, + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_applicant_status_serialize( self, application_id, @@ -3544,21 +3562,18 @@ def _update_applicant_status_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if application_id is not None: - _path_params['applicationId'] = application_id + _path_params["applicationId"] = application_id # process the query parameters # process the header parameters # process the form parameters @@ -3566,39 +3581,24 @@ def _update_applicant_status_serialize( if update_applicant_status_request is not None: _body_params = update_applicant_status_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/html' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/html"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/applicant_tracking/applications/{applicationId}/status', + method="POST", + resource_path="/api/v1/applicant_tracking/applications/{applicationId}/status", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3608,7 +3608,5 @@ def _update_applicant_status_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/benefits_api.py b/bamboohr_sdk/api/benefits_api.py index 9062d73..f1b2246 100644 --- a/bamboohr_sdk/api/benefits_api.py +++ b/bamboohr_sdk/api/benefits_api.py @@ -1,24 +1,20 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" + +from typing import Annotated, Any -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call -from pydantic import Field, StrictInt, StrictStr, field_validator -from typing import List, Optional -from typing_extensions import Annotated +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.models.benefit_coverages_response import BenefitCoveragesResponse from bamboohr_sdk.models.benefit_deduction_type import BenefitDeductionType from bamboohr_sdk.models.company_benefits_list_response import CompanyBenefitsListResponse @@ -28,9 +24,6 @@ from bamboohr_sdk.models.employee_dependents_response import EmployeeDependentsResponse from bamboohr_sdk.models.member_benefit_events_response import MemberBenefitEventsResponse from bamboohr_sdk.models.member_benefits_get_success_response import MemberBenefitsGetSuccessResponse - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.rest import RESTResponseType @@ -46,27 +39,21 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def create_employee_dependent( self, employee_dependent: EmployeeDependent, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> EmployeeDependentsResponse: """Create Employee Dependent - Creates a new dependent record for an employee. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. + Creates a new dependent record for an employee. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful creation fires an internal dependent-created event that may trigger downstream benefit enrollment processing. OAuth Scopes: employee:dependent.write, employee:dependent:ssn.write :param employee_dependent: (required) :type employee_dependent: EmployeeDependent @@ -90,54 +77,45 @@ def create_employee_dependent( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_employee_dependent_serialize( employee_dependent=employee_dependent, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeDependentsResponse", - '400': None, - '403': None, - '409': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeDependentsResponse", + "400": None, + "403": None, + "409": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def create_employee_dependent_with_http_info( self, employee_dependent: EmployeeDependent, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[EmployeeDependentsResponse]: """Create Employee Dependent - Creates a new dependent record for an employee. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. + Creates a new dependent record for an employee. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful creation fires an internal dependent-created event that may trigger downstream benefit enrollment processing. OAuth Scopes: employee:dependent.write, employee:dependent:ssn.write :param employee_dependent: (required) :type employee_dependent: EmployeeDependent @@ -161,54 +139,45 @@ def create_employee_dependent_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_employee_dependent_serialize( employee_dependent=employee_dependent, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeDependentsResponse", - '400': None, - '403': None, - '409': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeDependentsResponse", + "400": None, + "403": None, + "409": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_employee_dependent_without_preload_content( self, employee_dependent: EmployeeDependent, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Employee Dependent - Creates a new dependent record for an employee. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. + Creates a new dependent record for an employee. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful creation fires an internal dependent-created event that may trigger downstream benefit enrollment processing. OAuth Scopes: employee:dependent.write, employee:dependent:ssn.write :param employee_dependent: (required) :type employee_dependent: EmployeeDependent @@ -232,30 +201,26 @@ def create_employee_dependent_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_employee_dependent_serialize( employee_dependent=employee_dependent, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeDependentsResponse", - '400': None, - '403': None, - '409': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeDependentsResponse", + "400": None, + "403": None, + "409": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_employee_dependent_serialize( self, employee_dependent, @@ -267,17 +232,14 @@ def _create_employee_dependent_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -287,40 +249,24 @@ def _create_employee_dependent_serialize( if employee_dependent is not None: _body_params = employee_dependent - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json", "application/xml"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/employeedependents', + method="POST", + resource_path="/api/v1/employeedependents", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -330,33 +276,27 @@ def _create_employee_dependent_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_employee_dependent( self, - id: Annotated[StrictInt, Field(description="The numeric ID of the employee dependent to retrieve.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[StrictInt | None, Field(description="The numeric ID of the employee dependent to retrieve.")], + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> EmployeeDependentsResponse: """Get Employee Dependent - Returns the details of a single employee dependent by their dependent ID. The response is a JSON object with a top-level key \"Employee Dependents\" containing a single-element array. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. + Returns the details of a single employee dependent by their dependent ID. The response is a JSON object with a top-level key \"Employee Dependents\" containing a single-element array. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. OAuth Scopes: employee:dependent, employee:dependent:ssn :param id: The numeric ID of the employee dependent to retrieve. (required) :type id: int @@ -382,7 +322,7 @@ def get_employee_dependent( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_dependent_serialize( id=id, @@ -390,46 +330,39 @@ def get_employee_dependent( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeDependentsResponse", - '400': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeDependentsResponse", + "400": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_employee_dependent_with_http_info( self, - id: Annotated[StrictInt, Field(description="The numeric ID of the employee dependent to retrieve.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[StrictInt | None, Field(description="The numeric ID of the employee dependent to retrieve.")], + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[EmployeeDependentsResponse]: """Get Employee Dependent - Returns the details of a single employee dependent by their dependent ID. The response is a JSON object with a top-level key \"Employee Dependents\" containing a single-element array. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. + Returns the details of a single employee dependent by their dependent ID. The response is a JSON object with a top-level key \"Employee Dependents\" containing a single-element array. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. OAuth Scopes: employee:dependent, employee:dependent:ssn :param id: The numeric ID of the employee dependent to retrieve. (required) :type id: int @@ -455,7 +388,7 @@ def get_employee_dependent_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_dependent_serialize( id=id, @@ -463,46 +396,39 @@ def get_employee_dependent_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeDependentsResponse", - '400': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeDependentsResponse", + "400": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_employee_dependent_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The numeric ID of the employee dependent to retrieve.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[StrictInt | None, Field(description="The numeric ID of the employee dependent to retrieve.")], + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Employee Dependent - Returns the details of a single employee dependent by their dependent ID. The response is a JSON object with a top-level key \"Employee Dependents\" containing a single-element array. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. + Returns the details of a single employee dependent by their dependent ID. The response is a JSON object with a top-level key \"Employee Dependents\" containing a single-element array. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. OAuth Scopes: employee:dependent, employee:dependent:ssn :param id: The numeric ID of the employee dependent to retrieve. (required) :type id: int @@ -528,7 +454,7 @@ def get_employee_dependent_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_dependent_serialize( id=id, @@ -536,21 +462,17 @@ def get_employee_dependent_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeDependentsResponse", - '400': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeDependentsResponse", + "400": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_employee_dependent_serialize( self, id, @@ -563,48 +485,35 @@ def _get_employee_dependent_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employeedependents/{id}', + method="GET", + resource_path="/api/v1/employeedependents/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -614,41 +523,29 @@ def _get_employee_dependent_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_member_benefits( + def list_benefit_coverages( self, - calendar_year: Annotated[str, Field(strict=True, description="The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for.")], - page: Annotated[Optional[StrictStr], Field(description="The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1.")] = None, - page_size: Annotated[Optional[StrictStr], Field(description="The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MemberBenefitsGetSuccessResponse: - """Get Member Benefits + ) -> BenefitCoveragesResponse: + """List Benefit Coverages - Returns a paginated list of benefit enrollment records for all members (employees and dependents) in the company for a given calendar year. Each record groups a member's plans and the date ranges during which they held each enrollment status. The caller must be a benefit admin; non-admin requests receive a 403. `memberId` is formatted as `\"employee.{id}\"` for employees and `\"dependent.{id}\"` for dependents. `subscriberId` is the employee ID as a string (the plan subscriber, even when the member is a dependent). Pagination defaults to page 1 with 25 items per page; `pageSize` must be between 1 and 99 inclusive. + Returns all benefit coverage levels configured in the company, such as Employee Only, Employee + Spouse, and Employee + Family. The JSON response wraps results under a \"Benefit Coverages\" key. Each coverage level includes an ID, short name, optional description, sort order, and an associated benefit plan ID (null for company-wide levels). Requires Benefits Administration permissions or owner/admin access. OAuth Scopes: benefit - :param calendar_year: The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. (required) - :type calendar_year: str - :param page: The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. - :type page: str - :param page_size: The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. - :type page_size: str + :param accept_header_parameter: This endpoint can produce either JSON or XML. + :type accept_header_parameter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -669,63 +566,47 @@ def get_member_benefits( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_member_benefits_serialize( - calendar_year=calendar_year, - page=page, - page_size=page_size, + _param = self._list_benefit_coverages_serialize( + accept_header_parameter=accept_header_parameter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberBenefitsGetSuccessResponse", - '400': "MemberBenefitsGetValidationErrorResponse", - '403': "MemberBenefitsGetPermissionDeniedResponse", + _response_types_map: dict[str, str | None] = { + "200": "BenefitCoveragesResponse", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_member_benefits_with_http_info( + def list_benefit_coverages_with_http_info( self, - calendar_year: Annotated[str, Field(strict=True, description="The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for.")], - page: Annotated[Optional[StrictStr], Field(description="The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1.")] = None, - page_size: Annotated[Optional[StrictStr], Field(description="The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MemberBenefitsGetSuccessResponse]: - """Get Member Benefits + ) -> ApiResponse[BenefitCoveragesResponse]: + """List Benefit Coverages - Returns a paginated list of benefit enrollment records for all members (employees and dependents) in the company for a given calendar year. Each record groups a member's plans and the date ranges during which they held each enrollment status. The caller must be a benefit admin; non-admin requests receive a 403. `memberId` is formatted as `\"employee.{id}\"` for employees and `\"dependent.{id}\"` for dependents. `subscriberId` is the employee ID as a string (the plan subscriber, even when the member is a dependent). Pagination defaults to page 1 with 25 items per page; `pageSize` must be between 1 and 99 inclusive. + Returns all benefit coverage levels configured in the company, such as Employee Only, Employee + Spouse, and Employee + Family. The JSON response wraps results under a \"Benefit Coverages\" key. Each coverage level includes an ID, short name, optional description, sort order, and an associated benefit plan ID (null for company-wide levels). Requires Benefits Administration permissions or owner/admin access. OAuth Scopes: benefit - :param calendar_year: The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. (required) - :type calendar_year: str - :param page: The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. - :type page: str - :param page_size: The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. - :type page_size: str + :param accept_header_parameter: This endpoint can produce either JSON or XML. + :type accept_header_parameter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -746,63 +627,47 @@ def get_member_benefits_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_member_benefits_serialize( - calendar_year=calendar_year, - page=page, - page_size=page_size, + _param = self._list_benefit_coverages_serialize( + accept_header_parameter=accept_header_parameter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberBenefitsGetSuccessResponse", - '400': "MemberBenefitsGetValidationErrorResponse", - '403': "MemberBenefitsGetPermissionDeniedResponse", + _response_types_map: dict[str, str | None] = { + "200": "BenefitCoveragesResponse", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_member_benefits_without_preload_content( + def list_benefit_coverages_without_preload_content( self, - calendar_year: Annotated[str, Field(strict=True, description="The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for.")], - page: Annotated[Optional[StrictStr], Field(description="The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1.")] = None, - page_size: Annotated[Optional[StrictStr], Field(description="The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Member Benefits + """List Benefit Coverages - Returns a paginated list of benefit enrollment records for all members (employees and dependents) in the company for a given calendar year. Each record groups a member's plans and the date ranges during which they held each enrollment status. The caller must be a benefit admin; non-admin requests receive a 403. `memberId` is formatted as `\"employee.{id}\"` for employees and `\"dependent.{id}\"` for dependents. `subscriberId` is the employee ID as a string (the plan subscriber, even when the member is a dependent). Pagination defaults to page 1 with 25 items per page; `pageSize` must be between 1 and 99 inclusive. + Returns all benefit coverage levels configured in the company, such as Employee Only, Employee + Spouse, and Employee + Family. The JSON response wraps results under a \"Benefit Coverages\" key. Each coverage level includes an ID, short name, optional description, sort order, and an associated benefit plan ID (null for company-wide levels). Requires Benefits Administration permissions or owner/admin access. OAuth Scopes: benefit - :param calendar_year: The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. (required) - :type calendar_year: str - :param page: The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. - :type page: str - :param page_size: The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. - :type page_size: str + :param accept_header_parameter: This endpoint can produce either JSON or XML. + :type accept_header_parameter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -823,35 +688,26 @@ def get_member_benefits_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_member_benefits_serialize( - calendar_year=calendar_year, - page=page, - page_size=page_size, + _param = self._list_benefit_coverages_serialize( + accept_header_parameter=accept_header_parameter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberBenefitsGetSuccessResponse", - '400': "MemberBenefitsGetValidationErrorResponse", - '403': "MemberBenefitsGetPermissionDeniedResponse", + _response_types_map: dict[str, str | None] = { + "200": "BenefitCoveragesResponse", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_member_benefits_serialize( + def _list_benefit_coverages_serialize( self, - calendar_year, - page, - page_size, + accept_header_parameter, _request_auth, _content_type, _headers, @@ -860,55 +716,33 @@ def _get_member_benefits_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters - if calendar_year is not None: - - _query_params.append(('calendarYear', calendar_year)) - - if page is not None: - - _query_params.append(('page', page)) - - if page_size is not None: - - _query_params.append(('pageSize', page_size)) - # process the header parameters + if accept_header_parameter is not None: + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/benefits/member-benefits', + method="GET", + resource_path="/api/v1/benefitcoverages", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -918,35 +752,24 @@ def _get_member_benefits_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_benefit_coverages( + def list_benefit_deduction_types( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BenefitCoveragesResponse: - """List Benefit Coverages + ) -> list[BenefitDeductionType]: + """List Benefit Deduction Types - Returns all benefit coverage levels configured in the company. Coverage levels represent enrollment tiers such as Employee Only, Employee + Spouse, Employee + Family, etc. The response is a JSON object with a top-level key `\"Benefit Coverages\"` containing an array of coverage level objects. Each object includes the coverage ID, short name, description, sort order, and the benefit plan ID it is associated with (null for company-wide coverage levels). Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. + Returns all benefit deduction types available in the system. Each deduction type describes a category of payroll deduction (e.g. 401(k), HSA, Section 125) along with its allowable benefit plan types, default deduction code, and optional sub-types. Some deduction types are grouped under a parent with sub-types (e.g. Pre-Tax groups Health, Dental, etc.); in that case the parent entry has a non-empty `subTypes` array. Requires Benefits Administration permissions. OAuth Scopes: benefit - :param accept_header_parameter: This endpoint can produce either JSON or XML. - :type accept_header_parameter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -967,54 +790,39 @@ def list_benefit_coverages( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_benefit_coverages_serialize( - accept_header_parameter=accept_header_parameter, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_benefit_deduction_types_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "BenefitCoveragesResponse", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[BenefitDeductionType]", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_benefit_coverages_with_http_info( + def list_benefit_deduction_types_with_http_info( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BenefitCoveragesResponse]: - """List Benefit Coverages + ) -> ApiResponse[list[BenefitDeductionType]]: + """List Benefit Deduction Types - Returns all benefit coverage levels configured in the company. Coverage levels represent enrollment tiers such as Employee Only, Employee + Spouse, Employee + Family, etc. The response is a JSON object with a top-level key `\"Benefit Coverages\"` containing an array of coverage level objects. Each object includes the coverage ID, short name, description, sort order, and the benefit plan ID it is associated with (null for company-wide coverage levels). Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. + Returns all benefit deduction types available in the system. Each deduction type describes a category of payroll deduction (e.g. 401(k), HSA, Section 125) along with its allowable benefit plan types, default deduction code, and optional sub-types. Some deduction types are grouped under a parent with sub-types (e.g. Pre-Tax groups Health, Dental, etc.); in that case the parent entry has a non-empty `subTypes` array. Requires Benefits Administration permissions. OAuth Scopes: benefit - :param accept_header_parameter: This endpoint can produce either JSON or XML. - :type accept_header_parameter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1035,54 +843,39 @@ def list_benefit_coverages_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_benefit_coverages_serialize( - accept_header_parameter=accept_header_parameter, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_benefit_deduction_types_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "BenefitCoveragesResponse", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[BenefitDeductionType]", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_benefit_coverages_without_preload_content( + def list_benefit_deduction_types_without_preload_content( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Benefit Coverages + """List Benefit Deduction Types - Returns all benefit coverage levels configured in the company. Coverage levels represent enrollment tiers such as Employee Only, Employee + Spouse, Employee + Family, etc. The response is a JSON object with a top-level key `\"Benefit Coverages\"` containing an array of coverage level objects. Each object includes the coverage ID, short name, description, sort order, and the benefit plan ID it is associated with (null for company-wide coverage levels). Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. + Returns all benefit deduction types available in the system. Each deduction type describes a category of payroll deduction (e.g. 401(k), HSA, Section 125) along with its allowable benefit plan types, default deduction code, and optional sub-types. Some deduction types are grouped under a parent with sub-types (e.g. Pre-Tax groups Health, Dental, etc.); in that case the parent entry has a non-empty `subTypes` array. Requires Benefits Administration permissions. OAuth Scopes: benefit - :param accept_header_parameter: This endpoint can produce either JSON or XML. - :type accept_header_parameter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1103,30 +896,22 @@ def list_benefit_coverages_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_benefit_coverages_serialize( - accept_header_parameter=accept_header_parameter, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_benefit_deduction_types_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "BenefitCoveragesResponse", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[BenefitDeductionType]", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_benefit_coverages_serialize( + def _list_benefit_deduction_types_serialize( self, - accept_header_parameter, _request_auth, _content_type, _headers, @@ -1135,46 +920,31 @@ def _list_benefit_coverages_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters - if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/benefitcoverages', + method="GET", + resource_path="/api/v1/benefits/settings/deduction_types/all", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1184,31 +954,23 @@ def _list_benefit_coverages_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_benefit_deduction_types( + def list_company_benefits( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[BenefitDeductionType]: - """List Benefit Deduction Types + ) -> CompanyBenefitsListResponse: + """List Company Benefits - Returns all benefit deduction types available in the system. Each deduction type describes a category of payroll deduction (e.g. 401(k), HSA, Section 125) along with its allowable benefit plan types, default deduction code, and optional sub-types. Some deduction types are grouped under a parent with sub-types (e.g. Pre-Tax groups Health, Dental, etc.); in that case the parent entry has a non-empty `subTypes` array. Requires Benefits Administration permissions. + Returns all active (non-deleted) company benefit plans for the account. Each plan includes summary-level fields such as name, benefit category type, associated vendor and deduction IDs, effective date range, and catch-up eligibility flags. Deleted plans are excluded. To retrieve full detail for a specific plan (including SSO URL, description, and ACA fields), use \"Get a company benefit\". OAuth Scopes: benefit :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1230,50 +992,38 @@ def list_benefit_deduction_types( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_benefit_deduction_types_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_company_benefits_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[BenefitDeductionType]", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "CompanyBenefitsListResponse", + "401": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_benefit_deduction_types_with_http_info( + def list_company_benefits_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[BenefitDeductionType]]: - """List Benefit Deduction Types + ) -> ApiResponse[CompanyBenefitsListResponse]: + """List Company Benefits - Returns all benefit deduction types available in the system. Each deduction type describes a category of payroll deduction (e.g. 401(k), HSA, Section 125) along with its allowable benefit plan types, default deduction code, and optional sub-types. Some deduction types are grouped under a parent with sub-types (e.g. Pre-Tax groups Health, Dental, etc.); in that case the parent entry has a non-empty `subTypes` array. Requires Benefits Administration permissions. + Returns all active (non-deleted) company benefit plans for the account. Each plan includes summary-level fields such as name, benefit category type, associated vendor and deduction IDs, effective date range, and catch-up eligibility flags. Deleted plans are excluded. To retrieve full detail for a specific plan (including SSO URL, description, and ACA fields), use \"Get a company benefit\". OAuth Scopes: benefit :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1295,50 +1045,38 @@ def list_benefit_deduction_types_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_benefit_deduction_types_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_company_benefits_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[BenefitDeductionType]", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "CompanyBenefitsListResponse", + "401": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_benefit_deduction_types_without_preload_content( + def list_company_benefits_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Benefit Deduction Types + """List Company Benefits - Returns all benefit deduction types available in the system. Each deduction type describes a category of payroll deduction (e.g. 401(k), HSA, Section 125) along with its allowable benefit plan types, default deduction code, and optional sub-types. Some deduction types are grouped under a parent with sub-types (e.g. Pre-Tax groups Health, Dental, etc.); in that case the parent entry has a non-empty `subTypes` array. Requires Benefits Administration permissions. + Returns all active (non-deleted) company benefit plans for the account. Each plan includes summary-level fields such as name, benefit category type, associated vendor and deduction IDs, effective date range, and catch-up eligibility flags. Deleted plans are excluded. To retrieve full detail for a specific plan (including SSO URL, description, and ACA fields), use \"Get a company benefit\". OAuth Scopes: benefit :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1360,28 +1098,21 @@ def list_benefit_deduction_types_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_benefit_deduction_types_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_company_benefits_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[BenefitDeductionType]", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "CompanyBenefitsListResponse", + "401": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_benefit_deduction_types_serialize( + def _list_company_benefits_serialize( self, _request_auth, _content_type, @@ -1391,17 +1122,14 @@ def _list_benefit_deduction_types_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -1409,25 +1137,16 @@ def _list_benefit_deduction_types_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/benefits/settings/deduction_types/all', + method="GET", + resource_path="/api/v1/benefit/company_benefit", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1437,32 +1156,32 @@ def _list_benefit_deduction_types_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_company_benefits( + def list_employee_benefits( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_benefit_filters: Annotated[ + EmployeeBenefitFilters, + Field( + description="Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CompanyBenefitsListResponse: - """List Company Benefits + ) -> EmployeeBenefitsListResponse: + """List Employee Benefits - Returns all active (non-deleted) company benefit plans for the account. Each plan includes summary-level information: name, benefit category type, associated vendor and deduction IDs, effective date range, and catch-up eligibility flags. Deleted plans are excluded. To retrieve full detail for a specific plan (including SSO URL, description, and ACA fields), use GET /api/v1/benefit/company_benefit/{id}. + Returns current and scheduled-future benefit enrollment records, grouped by employee. The response is a JSON object with a single `employeeBenefits` array where each entry contains the internal employee ID, the employee's current pay frequency (null when no pay schedule is set), and an `employeeBenefit` array of per-plan records that includes both the current enrollment record and any scheduled future-change records for that plan. Each record includes enrollment status, deduction date range, currency, occurrences-per-year, and the full employee/employer cost-sharing fields. A JSON request body with a `filters` object is required, and the `filters` object must contain at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate`. Any combination is accepted. Providing no `filters` object or an empty `filters` object returns a 400 validation error. Filtering by `companyBenefitId` or `enrollmentStatusEffectiveDate` returns enrollments for every accessible employee, so the response can contain many entries. Use **List Company Benefits** (`list-company-benefits`) to look up valid `companyBenefitId` values. Future-enrollment records are silently omitted when the authenticated user lacks permission to view scheduled benefit changes. Current enrollment records continue to be returned. An empty `employeeBenefit` array on a known employee can mean either no enrollments or that the caller cannot view them. Note: This endpoint accepts filters inside a JSON request body on a `GET` request, which is non-standard. Some HTTP clients, proxies, and gateways may strip request bodies from GET requests, which can produce confusing missing-filter behavior. Callers experiencing validation errors should verify that the request body is being preserved. A query-parameter-based endpoint will be released in the future. OAuth Scopes: benefit + :param employee_benefit_filters: Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted. (required) + :type employee_benefit_filters: EmployeeBenefitFilters :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1483,51 +1202,53 @@ def list_company_benefits( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_company_benefits_serialize( + _param = self._list_employee_benefits_serialize( + employee_benefit_filters=employee_benefit_filters, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompanyBenefitsListResponse", - '401': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeBenefitsListResponse", + "400": None, + "401": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_company_benefits_with_http_info( + def list_employee_benefits_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_benefit_filters: Annotated[ + EmployeeBenefitFilters, + Field( + description="Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CompanyBenefitsListResponse]: - """List Company Benefits + ) -> ApiResponse[EmployeeBenefitsListResponse]: + """List Employee Benefits - Returns all active (non-deleted) company benefit plans for the account. Each plan includes summary-level information: name, benefit category type, associated vendor and deduction IDs, effective date range, and catch-up eligibility flags. Deleted plans are excluded. To retrieve full detail for a specific plan (including SSO URL, description, and ACA fields), use GET /api/v1/benefit/company_benefit/{id}. + Returns current and scheduled-future benefit enrollment records, grouped by employee. The response is a JSON object with a single `employeeBenefits` array where each entry contains the internal employee ID, the employee's current pay frequency (null when no pay schedule is set), and an `employeeBenefit` array of per-plan records that includes both the current enrollment record and any scheduled future-change records for that plan. Each record includes enrollment status, deduction date range, currency, occurrences-per-year, and the full employee/employer cost-sharing fields. A JSON request body with a `filters` object is required, and the `filters` object must contain at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate`. Any combination is accepted. Providing no `filters` object or an empty `filters` object returns a 400 validation error. Filtering by `companyBenefitId` or `enrollmentStatusEffectiveDate` returns enrollments for every accessible employee, so the response can contain many entries. Use **List Company Benefits** (`list-company-benefits`) to look up valid `companyBenefitId` values. Future-enrollment records are silently omitted when the authenticated user lacks permission to view scheduled benefit changes. Current enrollment records continue to be returned. An empty `employeeBenefit` array on a known employee can mean either no enrollments or that the caller cannot view them. Note: This endpoint accepts filters inside a JSON request body on a `GET` request, which is non-standard. Some HTTP clients, proxies, and gateways may strip request bodies from GET requests, which can produce confusing missing-filter behavior. Callers experiencing validation errors should verify that the request body is being preserved. A query-parameter-based endpoint will be released in the future. OAuth Scopes: benefit + :param employee_benefit_filters: Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted. (required) + :type employee_benefit_filters: EmployeeBenefitFilters :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1548,51 +1269,53 @@ def list_company_benefits_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_company_benefits_serialize( + _param = self._list_employee_benefits_serialize( + employee_benefit_filters=employee_benefit_filters, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompanyBenefitsListResponse", - '401': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeBenefitsListResponse", + "400": None, + "401": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_company_benefits_without_preload_content( + def list_employee_benefits_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_benefit_filters: Annotated[ + EmployeeBenefitFilters, + Field( + description="Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Company Benefits + """List Employee Benefits - Returns all active (non-deleted) company benefit plans for the account. Each plan includes summary-level information: name, benefit category type, associated vendor and deduction IDs, effective date range, and catch-up eligibility flags. Deleted plans are excluded. To retrieve full detail for a specific plan (including SSO URL, description, and ACA fields), use GET /api/v1/benefit/company_benefit/{id}. + Returns current and scheduled-future benefit enrollment records, grouped by employee. The response is a JSON object with a single `employeeBenefits` array where each entry contains the internal employee ID, the employee's current pay frequency (null when no pay schedule is set), and an `employeeBenefit` array of per-plan records that includes both the current enrollment record and any scheduled future-change records for that plan. Each record includes enrollment status, deduction date range, currency, occurrences-per-year, and the full employee/employer cost-sharing fields. A JSON request body with a `filters` object is required, and the `filters` object must contain at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate`. Any combination is accepted. Providing no `filters` object or an empty `filters` object returns a 400 validation error. Filtering by `companyBenefitId` or `enrollmentStatusEffectiveDate` returns enrollments for every accessible employee, so the response can contain many entries. Use **List Company Benefits** (`list-company-benefits`) to look up valid `companyBenefitId` values. Future-enrollment records are silently omitted when the authenticated user lacks permission to view scheduled benefit changes. Current enrollment records continue to be returned. An empty `employeeBenefit` array on a known employee can mean either no enrollments or that the caller cannot view them. Note: This endpoint accepts filters inside a JSON request body on a `GET` request, which is non-standard. Some HTTP clients, proxies, and gateways may strip request bodies from GET requests, which can produce confusing missing-filter behavior. Callers experiencing validation errors should verify that the request body is being preserved. A query-parameter-based endpoint will be released in the future. OAuth Scopes: benefit + :param employee_benefit_filters: Filters that scope the results. The `filters` object is required, and at least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided. Any combination of the three is accepted. (required) + :type employee_benefit_filters: EmployeeBenefitFilters :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1613,29 +1336,29 @@ def list_company_benefits_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_company_benefits_serialize( + _param = self._list_employee_benefits_serialize( + employee_benefit_filters=employee_benefit_filters, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompanyBenefitsListResponse", - '401': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeBenefitsListResponse", + "400": None, + "401": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_company_benefits_serialize( + def _list_employee_benefits_serialize( self, + employee_benefit_filters, _request_auth, _content_type, _headers, @@ -1644,43 +1367,41 @@ def _list_company_benefits_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters # process the form parameters # process the body parameter - + if employee_benefit_filters is not None: + _body_params = employee_benefit_filters # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/benefit/company_benefit', + method="GET", + resource_path="/api/v1/benefit/employee_benefit", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1690,35 +1411,37 @@ def _list_company_benefits_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_employee_benefits( + def list_employee_dependents( self, - employee_benefit_filters: Annotated[EmployeeBenefitFilters, Field(description="Filters to scope the results. The filters object is required and must include at least one filter field.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employeeid: Annotated[ + StrictInt | None, + Field( + description="The internal employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> EmployeeBenefitsListResponse: - """List Employee Benefits + ) -> EmployeeDependentsResponse: + """List Employee Dependents - Returns current and future benefit enrollment records for one or more employees, grouped by employee. A JSON request body containing a filters object is required; at least one filter field (employeeId, companyBenefitId, or enrollmentStatusEffectiveDate) must be provided. Each result item contains the employee ID, pay frequency, and an array of per-plan benefit records with enrollment status, deduction amounts, and cost-sharing details. + Returns employee dependents for the company. When `employeeid` is provided, only dependents for that employee are returned. When omitted, all dependents across all employees are returned. The response is a JSON object with a top-level key \"Employee Dependents\" containing an array of dependent objects. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. OAuth Scopes: employee:dependent, employee:dependent:ssn - :param employee_benefit_filters: Filters to scope the results. The filters object is required and must include at least one filter field. (required) - :type employee_benefit_filters: EmployeeBenefitFilters + :param accept_header_parameter: This endpoint can produce either JSON or XML. + :type accept_header_parameter: str + :param employeeid: The internal employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. + :type employeeid: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1739,57 +1462,56 @@ def list_employee_benefits( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_benefits_serialize( - employee_benefit_filters=employee_benefit_filters, + _param = self._list_employee_dependents_serialize( + accept_header_parameter=accept_header_parameter, + employeeid=employeeid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeBenefitsListResponse", - '400': None, - '401': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeDependentsResponse", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_employee_benefits_with_http_info( + def list_employee_dependents_with_http_info( self, - employee_benefit_filters: Annotated[EmployeeBenefitFilters, Field(description="Filters to scope the results. The filters object is required and must include at least one filter field.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + employeeid: Annotated[ + StrictInt | None, + Field( + description="The internal employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[EmployeeBenefitsListResponse]: - """List Employee Benefits + ) -> ApiResponse[EmployeeDependentsResponse]: + """List Employee Dependents - Returns current and future benefit enrollment records for one or more employees, grouped by employee. A JSON request body containing a filters object is required; at least one filter field (employeeId, companyBenefitId, or enrollmentStatusEffectiveDate) must be provided. Each result item contains the employee ID, pay frequency, and an array of per-plan benefit records with enrollment status, deduction amounts, and cost-sharing details. + Returns employee dependents for the company. When `employeeid` is provided, only dependents for that employee are returned. When omitted, all dependents across all employees are returned. The response is a JSON object with a top-level key \"Employee Dependents\" containing an array of dependent objects. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. OAuth Scopes: employee:dependent, employee:dependent:ssn - :param employee_benefit_filters: Filters to scope the results. The filters object is required and must include at least one filter field. (required) - :type employee_benefit_filters: EmployeeBenefitFilters + :param accept_header_parameter: This endpoint can produce either JSON or XML. + :type accept_header_parameter: str + :param employeeid: The internal employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. + :type employeeid: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1810,57 +1532,56 @@ def list_employee_benefits_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_benefits_serialize( - employee_benefit_filters=employee_benefit_filters, + _param = self._list_employee_dependents_serialize( + accept_header_parameter=accept_header_parameter, + employeeid=employeeid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeBenefitsListResponse", - '400': None, - '401': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeDependentsResponse", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_employee_benefits_without_preload_content( + def list_employee_dependents_without_preload_content( self, - employee_benefit_filters: Annotated[EmployeeBenefitFilters, Field(description="Filters to scope the results. The filters object is required and must include at least one filter field.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + employeeid: Annotated[ + StrictInt | None, + Field( + description="The internal employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Employee Benefits + """List Employee Dependents - Returns current and future benefit enrollment records for one or more employees, grouped by employee. A JSON request body containing a filters object is required; at least one filter field (employeeId, companyBenefitId, or enrollmentStatusEffectiveDate) must be provided. Each result item contains the employee ID, pay frequency, and an array of per-plan benefit records with enrollment status, deduction amounts, and cost-sharing details. + Returns employee dependents for the company. When `employeeid` is provided, only dependents for that employee are returned. When omitted, all dependents across all employees are returned. The response is a JSON object with a top-level key \"Employee Dependents\" containing an array of dependent objects. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. OAuth Scopes: employee:dependent, employee:dependent:ssn - :param employee_benefit_filters: Filters to scope the results. The filters object is required and must include at least one filter field. (required) - :type employee_benefit_filters: EmployeeBenefitFilters + :param accept_header_parameter: This endpoint can produce either JSON or XML. + :type accept_header_parameter: str + :param employeeid: The internal employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. + :type employeeid: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1881,33 +1602,28 @@ def list_employee_benefits_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_benefits_serialize( - employee_benefit_filters=employee_benefit_filters, + _param = self._list_employee_dependents_serialize( + accept_header_parameter=accept_header_parameter, + employeeid=employeeid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeBenefitsListResponse", - '400': None, - '401': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeDependentsResponse", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_employee_benefits_serialize( + def _list_employee_dependents_serialize( self, - employee_benefit_filters, + accept_header_parameter, + employeeid, _request_auth, _content_type, _headers, @@ -1916,58 +1632,36 @@ def _list_employee_benefits_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters + if employeeid is not None: + _query_params.append(("employeeid", employeeid)) + # process the header parameters + if accept_header_parameter is not None: + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - if employee_benefit_filters is not None: - _body_params = employee_benefit_filters - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/benefit/employee_benefit', + method="GET", + resource_path="/api/v1/employeedependents", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1977,38 +1671,24 @@ def _list_employee_benefits_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_employee_dependents( + def list_member_benefit_events( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - employeeid: Annotated[Optional[StrictInt], Field(description="The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> EmployeeDependentsResponse: - """List Employee Dependents + ) -> MemberBenefitEventsResponse: + """List Member Benefit Events - Returns employee dependents for the company. When `employeeid` is provided, only dependents for that employee are returned. When omitted, all dependents across all employees are returned. The response is a JSON object with a top-level key \"Employee Dependents\" containing an array of dependent objects. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. + Returns benefit enrollment events for all employees and their dependents over the past year, organized by member. Each entry identifies a member (employee or dependent) and lists their per-plan coverage events (eligibility granted, enrolled, or loss of coverage), sorted chronologically. Requires benefit settings access. OAuth Scopes: benefit - :param accept_header_parameter: This endpoint can produce either JSON or XML. - :type accept_header_parameter: str - :param employeeid: The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. - :type employeeid: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2029,58 +1709,39 @@ def list_employee_dependents( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_dependents_serialize( - accept_header_parameter=accept_header_parameter, - employeeid=employeeid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_member_benefit_events_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeDependentsResponse", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "MemberBenefitEventsResponse", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_employee_dependents_with_http_info( + def list_member_benefit_events_with_http_info( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - employeeid: Annotated[Optional[StrictInt], Field(description="The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[EmployeeDependentsResponse]: - """List Employee Dependents + ) -> ApiResponse[MemberBenefitEventsResponse]: + """List Member Benefit Events - Returns employee dependents for the company. When `employeeid` is provided, only dependents for that employee are returned. When omitted, all dependents across all employees are returned. The response is a JSON object with a top-level key \"Employee Dependents\" containing an array of dependent objects. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. + Returns benefit enrollment events for all employees and their dependents over the past year, organized by member. Each entry identifies a member (employee or dependent) and lists their per-plan coverage events (eligibility granted, enrolled, or loss of coverage), sorted chronologically. Requires benefit settings access. OAuth Scopes: benefit - :param accept_header_parameter: This endpoint can produce either JSON or XML. - :type accept_header_parameter: str - :param employeeid: The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. - :type employeeid: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2101,58 +1762,39 @@ def list_employee_dependents_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_dependents_serialize( - accept_header_parameter=accept_header_parameter, - employeeid=employeeid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_member_benefit_events_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeDependentsResponse", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "MemberBenefitEventsResponse", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_employee_dependents_without_preload_content( + def list_member_benefit_events_without_preload_content( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - employeeid: Annotated[Optional[StrictInt], Field(description="The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Employee Dependents + """List Member Benefit Events - Returns employee dependents for the company. When `employeeid` is provided, only dependents for that employee are returned. When omitted, all dependents across all employees are returned. The response is a JSON object with a top-level key \"Employee Dependents\" containing an array of dependent objects. SSN and SIN are returned as masked values (e.g. \"xxx-xx-1234\"). State and country are returned as full names. Supports both JSON and XML response formats via the Accept header. Requires Benefits Administration permissions. + Returns benefit enrollment events for all employees and their dependents over the past year, organized by member. Each entry identifies a member (employee or dependent) and lists their per-plan coverage events (eligibility granted, enrolled, or loss of coverage), sorted chronologically. Requires benefit settings access. OAuth Scopes: benefit - :param accept_header_parameter: This endpoint can produce either JSON or XML. - :type accept_header_parameter: str - :param employeeid: The employee ID to filter dependents by. When provided, only dependents for that employee are returned. When omitted, all company dependents are returned. - :type employeeid: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2173,32 +1815,22 @@ def list_employee_dependents_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_dependents_serialize( - accept_header_parameter=accept_header_parameter, - employeeid=employeeid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_member_benefit_events_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeDependentsResponse", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "MemberBenefitEventsResponse", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_employee_dependents_serialize( + def _list_member_benefit_events_serialize( self, - accept_header_parameter, - employeeid, _request_auth, _content_type, _headers, @@ -2207,50 +1839,31 @@ def _list_employee_dependents_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters - if employeeid is not None: - - _query_params.append(('employeeid', employeeid)) - # process the header parameters - if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employeedependents', + method="GET", + resource_path="/api/v1/benefit/member_benefit", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2260,32 +1873,46 @@ def _list_employee_dependents_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_member_benefit_events( + def list_member_benefits( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + calendar_year: Annotated[ + str, + Field(strict=True, description="The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for."), + ], + page: Annotated[ + StrictStr | None, + Field( + description="The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1." + ), + ] = None, + page_size: Annotated[ + StrictStr | None, + Field( + description="The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MemberBenefitEventsResponse: - """List Member Benefit Events + ) -> MemberBenefitsGetSuccessResponse: + """List Member Benefits - Returns benefit enrollment events for all employees and their dependents over the past year, organized by member. Each entry identifies a member (employee or dependent) and lists their per-plan coverage events (eligibility granted, enrolled, or loss of coverage), sorted chronologically. Requires benefit settings access. + Returns a paginated list of benefit enrollment records for all members (employees and dependents) in the company for a given calendar year. Each record represents one member and includes the plans they held and the date ranges during which they held each enrollment status. Dependents appear alongside their subscribing employee via subscriberId. Use \"List Company Benefits\" to get valid planId values. OAuth Scopes: benefit + :param calendar_year: The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. (required) + :type calendar_year: str + :param page: The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. + :type page: str + :param page_size: The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. + :type page_size: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2306,51 +1933,67 @@ def list_member_benefit_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_member_benefit_events_serialize( + _param = self._list_member_benefits_serialize( + calendar_year=calendar_year, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberBenefitEventsResponse", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "MemberBenefitsGetSuccessResponse", + "400": "MemberBenefitsGetValidationErrorResponse", + "403": "MemberBenefitsGetPermissionDeniedResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_member_benefit_events_with_http_info( + def list_member_benefits_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + calendar_year: Annotated[ + str, + Field(strict=True, description="The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for."), + ], + page: Annotated[ + StrictStr | None, + Field( + description="The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1." + ), + ] = None, + page_size: Annotated[ + StrictStr | None, + Field( + description="The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MemberBenefitEventsResponse]: - """List Member Benefit Events + ) -> ApiResponse[MemberBenefitsGetSuccessResponse]: + """List Member Benefits - Returns benefit enrollment events for all employees and their dependents over the past year, organized by member. Each entry identifies a member (employee or dependent) and lists their per-plan coverage events (eligibility granted, enrolled, or loss of coverage), sorted chronologically. Requires benefit settings access. + Returns a paginated list of benefit enrollment records for all members (employees and dependents) in the company for a given calendar year. Each record represents one member and includes the plans they held and the date ranges during which they held each enrollment status. Dependents appear alongside their subscribing employee via subscriberId. Use \"List Company Benefits\" to get valid planId values. OAuth Scopes: benefit + :param calendar_year: The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. (required) + :type calendar_year: str + :param page: The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. + :type page: str + :param page_size: The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. + :type page_size: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2371,51 +2014,67 @@ def list_member_benefit_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_member_benefit_events_serialize( + _param = self._list_member_benefits_serialize( + calendar_year=calendar_year, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberBenefitEventsResponse", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "MemberBenefitsGetSuccessResponse", + "400": "MemberBenefitsGetValidationErrorResponse", + "403": "MemberBenefitsGetPermissionDeniedResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_member_benefit_events_without_preload_content( + def list_member_benefits_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + calendar_year: Annotated[ + str, + Field(strict=True, description="The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for."), + ], + page: Annotated[ + StrictStr | None, + Field( + description="The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page_size: Annotated[ + StrictStr | None, + Field( + description="The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Member Benefit Events + """List Member Benefits - Returns benefit enrollment events for all employees and their dependents over the past year, organized by member. Each entry identifies a member (employee or dependent) and lists their per-plan coverage events (eligibility granted, enrolled, or loss of coverage), sorted chronologically. Requires benefit settings access. + Returns a paginated list of benefit enrollment records for all members (employees and dependents) in the company for a given calendar year. Each record represents one member and includes the plans they held and the date ranges during which they held each enrollment status. Dependents appear alongside their subscribing employee via subscriberId. Use \"List Company Benefits\" to get valid planId values. OAuth Scopes: benefit + :param calendar_year: The 4-digit calendar year (YYYY) to retrieve benefit enrollment data for. (required) + :type calendar_year: str + :param page: The 1-based page number for pagination. The value is cast to an integer; values that cast to 0 or below are rejected with a 400. Defaults to 1. + :type page: str + :param page_size: The number of items per page. The value is cast to an integer; values that cast to 0 or below, or to 100 or above, are rejected with a 400. Defaults to 25. + :type page_size: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2436,29 +2095,31 @@ def list_member_benefit_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_member_benefit_events_serialize( + _param = self._list_member_benefits_serialize( + calendar_year=calendar_year, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberBenefitEventsResponse", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "MemberBenefitsGetSuccessResponse", + "400": "MemberBenefitsGetValidationErrorResponse", + "403": "MemberBenefitsGetPermissionDeniedResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_member_benefit_events_serialize( + def _list_member_benefits_serialize( self, + calendar_year, + page, + page_size, _request_auth, _content_type, _headers, @@ -2467,43 +2128,40 @@ def _list_member_benefit_events_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters + if calendar_year is not None: + _query_params.append(("calendarYear", calendar_year)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/benefit/member_benefit', + method="GET", + resource_path="/api/v1/benefits/member-benefits", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2513,33 +2171,25 @@ def _list_member_benefit_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_employee_dependent( self, - id: Annotated[StrictInt, Field(description="The numeric ID of the employee dependent to update.")], + id: Annotated[StrictInt | None, Field(description="The numeric ID of the employee dependent to update.")], employee_dependent: EmployeeDependent, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> EmployeeDependentsResponse: """Update Employee Dependent - Replaces all fields on an existing employee dependent record. The request body must contain the full desired state of the dependent — omitted fields are written as empty or null, not preserved. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. + Replaces all fields on an existing employee dependent record. The request body must contain the full desired state of the dependent — omitted fields are written as empty or null, not preserved. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful update fires an internal dependent-updated event that may trigger downstream benefit enrollment processing. OAuth Scopes: employee:dependent.write, employee:dependent:ssn.write :param id: The numeric ID of the employee dependent to update. (required) :type id: int @@ -2565,7 +2215,7 @@ def update_employee_dependent( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_employee_dependent_serialize( id=id, @@ -2573,48 +2223,39 @@ def update_employee_dependent( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeDependentsResponse", - '400': None, - '403': None, - '409': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeDependentsResponse", + "400": None, + "403": None, + "409": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def update_employee_dependent_with_http_info( self, - id: Annotated[StrictInt, Field(description="The numeric ID of the employee dependent to update.")], + id: Annotated[StrictInt | None, Field(description="The numeric ID of the employee dependent to update.")], employee_dependent: EmployeeDependent, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[EmployeeDependentsResponse]: """Update Employee Dependent - Replaces all fields on an existing employee dependent record. The request body must contain the full desired state of the dependent — omitted fields are written as empty or null, not preserved. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. + Replaces all fields on an existing employee dependent record. The request body must contain the full desired state of the dependent — omitted fields are written as empty or null, not preserved. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful update fires an internal dependent-updated event that may trigger downstream benefit enrollment processing. OAuth Scopes: employee:dependent.write, employee:dependent:ssn.write :param id: The numeric ID of the employee dependent to update. (required) :type id: int @@ -2640,7 +2281,7 @@ def update_employee_dependent_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_employee_dependent_serialize( id=id, @@ -2648,48 +2289,39 @@ def update_employee_dependent_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeDependentsResponse", - '400': None, - '403': None, - '409': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeDependentsResponse", + "400": None, + "403": None, + "409": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_employee_dependent_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The numeric ID of the employee dependent to update.")], + id: Annotated[StrictInt | None, Field(description="The numeric ID of the employee dependent to update.")], employee_dependent: EmployeeDependent, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Employee Dependent - Replaces all fields on an existing employee dependent record. The request body must contain the full desired state of the dependent — omitted fields are written as empty or null, not preserved. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. + Replaces all fields on an existing employee dependent record. The request body must contain the full desired state of the dependent — omitted fields are written as empty or null, not preserved. `employeeId` is required and must reference a valid employee. `relationship` must be a valid relationship type and `gender` must be a valid gender value. `isUsCitizen` and `isStudent` accept \"yes\" or \"no\". `state` accepts a state code (e.g. \"UT\") and `country` accepts an ISO 3166-1 alpha-2 country code (e.g. \"US\"). `dateOfBirth` must be in YYYY-MM-DD format. SSN and SIN are accepted as plain text and stored encrypted. Accepts both `application/json` and `application/xml` request bodies. The response format mirrors the request `Content-Type` (not the `Accept` header): JSON request bodies receive a JSON response; XML request bodies receive an XML response. A successful update fires an internal dependent-updated event that may trigger downstream benefit enrollment processing. OAuth Scopes: employee:dependent.write, employee:dependent:ssn.write :param id: The numeric ID of the employee dependent to update. (required) :type id: int @@ -2715,7 +2347,7 @@ def update_employee_dependent_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_employee_dependent_serialize( id=id, @@ -2723,23 +2355,19 @@ def update_employee_dependent_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeDependentsResponse", - '400': None, - '403': None, - '409': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeDependentsResponse", + "400": None, + "403": None, + "409": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_employee_dependent_serialize( self, id, @@ -2752,21 +2380,18 @@ def _update_employee_dependent_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters @@ -2774,40 +2399,24 @@ def _update_employee_dependent_serialize( if employee_dependent is not None: _body_params = employee_dependent - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json", "application/xml"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/employeedependents/{id}', + method="PUT", + resource_path="/api/v1/employeedependents/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2817,7 +2426,5 @@ def _update_employee_dependent_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/calendar_events_api.py b/bamboohr_sdk/api/calendar_events_api.py new file mode 100644 index 0000000..f0352fe --- /dev/null +++ b/bamboohr_sdk/api/calendar_events_api.py @@ -0,0 +1,440 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from datetime import date +from typing import Annotated, Any + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1 import CalendarCalendarEventsListResponseV1 +from bamboohr_sdk.rest import RESTResponseType + + +class CalendarEventsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def list_calendar_events( + self, + start: Annotated[ + date, Field(description="Inclusive start date (YYYY-MM-DD). Interpreted in the company timezone.") + ], + end: Annotated[ + date | None, + Field( + description="Inclusive end date (YYYY-MM-DD). Must be on or after start; the range must span less than one year." + ), + ], + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to calendar events. Supported operators: `eq` (equals), `in` (value in list), `and` (combine clauses). Filterable fields: `type` (one of `TIME_OFF`, `HOLIDAY`, `BIRTHDAY`, `ANNIVERSARY`), `employeeId` (int), `department` (int), `division` (int), `location` (int). Per-employee filters have no effect on HOLIDAY events. Example: `type in ('TIME_OFF','HOLIDAY') and department in (10,20)`." + ), + ] = None, + direct_reports_only: Annotated[ + StrictBool | None, + Field( + description="When true, restrict employee-bound events to the caller's direct reports. HOLIDAY events are unaffected. Callers with no direct reports receive an empty result for employee-bound types." + ), + ] = None, + include_persons: Annotated[ + StrictBool | None, + Field(description="When true, embed a persons map (keyed by employee id) alongside the events."), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page number to retrieve.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of items to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CalendarCalendarEventsListResponseV1: + """List Calendar Events + + Lists calendar events (time off, holidays, birthdays, and anniversaries) overlapping the requested date range. Events are sorted by start ascending, then type ascending (ANNIVERSARY, BIRTHDAY, HOLIDAY, TIME_OFF), then id ascending. TIME_OFF events represent approved requests only. Events the caller cannot view are silently omitted. OAuth Scopes: calendar:events + + :param start: Inclusive start date (YYYY-MM-DD). Interpreted in the company timezone. (required) + :type start: date + :param end: Inclusive end date (YYYY-MM-DD). Must be on or after start; the range must span less than one year. (required) + :type end: date + :param filter: OData filter expression applied to calendar events. Supported operators: `eq` (equals), `in` (value in list), `and` (combine clauses). Filterable fields: `type` (one of `TIME_OFF`, `HOLIDAY`, `BIRTHDAY`, `ANNIVERSARY`), `employeeId` (int), `department` (int), `division` (int), `location` (int). Per-employee filters have no effect on HOLIDAY events. Example: `type in ('TIME_OFF','HOLIDAY') and department in (10,20)`. + :type filter: str + :param direct_reports_only: When true, restrict employee-bound events to the caller's direct reports. HOLIDAY events are unaffected. Callers with no direct reports receive an empty result for employee-bound types. + :type direct_reports_only: bool + :param include_persons: When true, embed a persons map (keyed by employee id) alongside the events. + :type include_persons: bool + :param page: The page number to retrieve. + :type page: int + :param page_size: The number of items to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_calendar_events_serialize( + start=start, + end=end, + filter=filter, + direct_reports_only=direct_reports_only, + include_persons=include_persons, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CalendarCalendarEventsListResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_calendar_events_with_http_info( + self, + start: Annotated[ + date, Field(description="Inclusive start date (YYYY-MM-DD). Interpreted in the company timezone.") + ], + end: Annotated[ + date | None, + Field( + description="Inclusive end date (YYYY-MM-DD). Must be on or after start; the range must span less than one year." + ), + ], + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to calendar events. Supported operators: `eq` (equals), `in` (value in list), `and` (combine clauses). Filterable fields: `type` (one of `TIME_OFF`, `HOLIDAY`, `BIRTHDAY`, `ANNIVERSARY`), `employeeId` (int), `department` (int), `division` (int), `location` (int). Per-employee filters have no effect on HOLIDAY events. Example: `type in ('TIME_OFF','HOLIDAY') and department in (10,20)`." + ), + ] = None, + direct_reports_only: Annotated[ + StrictBool | None, + Field( + description="When true, restrict employee-bound events to the caller's direct reports. HOLIDAY events are unaffected. Callers with no direct reports receive an empty result for employee-bound types." + ), + ] = None, + include_persons: Annotated[ + StrictBool | None, + Field(description="When true, embed a persons map (keyed by employee id) alongside the events."), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page number to retrieve.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of items to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CalendarCalendarEventsListResponseV1]: + """List Calendar Events + + Lists calendar events (time off, holidays, birthdays, and anniversaries) overlapping the requested date range. Events are sorted by start ascending, then type ascending (ANNIVERSARY, BIRTHDAY, HOLIDAY, TIME_OFF), then id ascending. TIME_OFF events represent approved requests only. Events the caller cannot view are silently omitted. OAuth Scopes: calendar:events + + :param start: Inclusive start date (YYYY-MM-DD). Interpreted in the company timezone. (required) + :type start: date + :param end: Inclusive end date (YYYY-MM-DD). Must be on or after start; the range must span less than one year. (required) + :type end: date + :param filter: OData filter expression applied to calendar events. Supported operators: `eq` (equals), `in` (value in list), `and` (combine clauses). Filterable fields: `type` (one of `TIME_OFF`, `HOLIDAY`, `BIRTHDAY`, `ANNIVERSARY`), `employeeId` (int), `department` (int), `division` (int), `location` (int). Per-employee filters have no effect on HOLIDAY events. Example: `type in ('TIME_OFF','HOLIDAY') and department in (10,20)`. + :type filter: str + :param direct_reports_only: When true, restrict employee-bound events to the caller's direct reports. HOLIDAY events are unaffected. Callers with no direct reports receive an empty result for employee-bound types. + :type direct_reports_only: bool + :param include_persons: When true, embed a persons map (keyed by employee id) alongside the events. + :type include_persons: bool + :param page: The page number to retrieve. + :type page: int + :param page_size: The number of items to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_calendar_events_serialize( + start=start, + end=end, + filter=filter, + direct_reports_only=direct_reports_only, + include_persons=include_persons, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CalendarCalendarEventsListResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_calendar_events_without_preload_content( + self, + start: Annotated[ + date, Field(description="Inclusive start date (YYYY-MM-DD). Interpreted in the company timezone.") + ], + end: Annotated[ + date | None, + Field( + description="Inclusive end date (YYYY-MM-DD). Must be on or after start; the range must span less than one year." + ), + ], + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to calendar events. Supported operators: `eq` (equals), `in` (value in list), `and` (combine clauses). Filterable fields: `type` (one of `TIME_OFF`, `HOLIDAY`, `BIRTHDAY`, `ANNIVERSARY`), `employeeId` (int), `department` (int), `division` (int), `location` (int). Per-employee filters have no effect on HOLIDAY events. Example: `type in ('TIME_OFF','HOLIDAY') and department in (10,20)`." + ), + ] = None, + direct_reports_only: Annotated[ + StrictBool | None, + Field( + description="When true, restrict employee-bound events to the caller's direct reports. HOLIDAY events are unaffected. Callers with no direct reports receive an empty result for employee-bound types." + ), + ] = None, + include_persons: Annotated[ + StrictBool | None, + Field(description="When true, embed a persons map (keyed by employee id) alongside the events."), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page number to retrieve.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of items to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Calendar Events + + Lists calendar events (time off, holidays, birthdays, and anniversaries) overlapping the requested date range. Events are sorted by start ascending, then type ascending (ANNIVERSARY, BIRTHDAY, HOLIDAY, TIME_OFF), then id ascending. TIME_OFF events represent approved requests only. Events the caller cannot view are silently omitted. OAuth Scopes: calendar:events + + :param start: Inclusive start date (YYYY-MM-DD). Interpreted in the company timezone. (required) + :type start: date + :param end: Inclusive end date (YYYY-MM-DD). Must be on or after start; the range must span less than one year. (required) + :type end: date + :param filter: OData filter expression applied to calendar events. Supported operators: `eq` (equals), `in` (value in list), `and` (combine clauses). Filterable fields: `type` (one of `TIME_OFF`, `HOLIDAY`, `BIRTHDAY`, `ANNIVERSARY`), `employeeId` (int), `department` (int), `division` (int), `location` (int). Per-employee filters have no effect on HOLIDAY events. Example: `type in ('TIME_OFF','HOLIDAY') and department in (10,20)`. + :type filter: str + :param direct_reports_only: When true, restrict employee-bound events to the caller's direct reports. HOLIDAY events are unaffected. Callers with no direct reports receive an empty result for employee-bound types. + :type direct_reports_only: bool + :param include_persons: When true, embed a persons map (keyed by employee id) alongside the events. + :type include_persons: bool + :param page: The page number to retrieve. + :type page: int + :param page_size: The number of items to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_calendar_events_serialize( + start=start, + end=end, + filter=filter, + direct_reports_only=direct_reports_only, + include_persons=include_persons, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CalendarCalendarEventsListResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_calendar_events_serialize( + self, + start, + end, + filter, + direct_reports_only, + include_persons, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if start is not None: + if isinstance(start, date): + _query_params.append(("start", start.strftime(self.api_client.configuration.date_format))) + else: + _query_params.append(("start", start)) + + if end is not None: + if isinstance(end, date): + _query_params.append(("end", end.strftime(self.api_client.configuration.date_format))) + else: + _query_params.append(("end", end)) + + if filter is not None: + _query_params.append(("filter", filter)) + + if direct_reports_only is not None: + _query_params.append(("directReportsOnly", direct_reports_only)) + + if include_persons is not None: + _query_params.append(("includePersons", include_persons)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/calendar-events", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/change_tracking_api.py b/bamboohr_sdk/api/change_tracking_api.py new file mode 100644 index 0000000..65be023 --- /dev/null +++ b/bamboohr_sdk/api/change_tracking_api.py @@ -0,0 +1,573 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from datetime import datetime +from typing import Annotated, Any + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.changed_employee_ids_response import ChangedEmployeeIdsResponse +from bamboohr_sdk.models.changed_employee_table_data_response import ChangedEmployeeTableDataResponse +from bamboohr_sdk.rest import RESTResponseType + + +class ChangeTrackingApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def get_changed_employee_ids( + self, + since: Annotated[ + datetime, + Field( + description="ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned." + ), + ], + type: Annotated[ + StrictStr | None, Field(description="Filter by change type. If omitted, all change types are returned.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ChangedEmployeeIdsResponse: + """Get Changed Employee IDs + + Returns a list of employee IDs that have changed since the given timestamp. This allows for efficient syncing of employee data — rather than downloading all employees, only those that have changed are returned. A change in ANY individual field in the employee record, as well as any change to the employment status, job info, or compensation tables, will cause that employee to be returned. Each entry includes the employee ID, the type of change (Inserted, Updated, or Deleted), and the last-changed timestamp. OAuth Scopes: public.integration, public.user + + :param since: ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) + :type since: datetime + :param type: Filter by change type. If omitted, all change types are returned. + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_changed_employee_ids_serialize( + since=since, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ChangedEmployeeIdsResponse", + "400": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_changed_employee_ids_with_http_info( + self, + since: Annotated[ + datetime, + Field( + description="ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned." + ), + ], + type: Annotated[ + StrictStr | None, Field(description="Filter by change type. If omitted, all change types are returned.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ChangedEmployeeIdsResponse]: + """Get Changed Employee IDs + + Returns a list of employee IDs that have changed since the given timestamp. This allows for efficient syncing of employee data — rather than downloading all employees, only those that have changed are returned. A change in ANY individual field in the employee record, as well as any change to the employment status, job info, or compensation tables, will cause that employee to be returned. Each entry includes the employee ID, the type of change (Inserted, Updated, or Deleted), and the last-changed timestamp. OAuth Scopes: public.integration, public.user + + :param since: ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) + :type since: datetime + :param type: Filter by change type. If omitted, all change types are returned. + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_changed_employee_ids_serialize( + since=since, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ChangedEmployeeIdsResponse", + "400": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_changed_employee_ids_without_preload_content( + self, + since: Annotated[ + datetime, + Field( + description="ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned." + ), + ], + type: Annotated[ + StrictStr | None, Field(description="Filter by change type. If omitted, all change types are returned.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Changed Employee IDs + + Returns a list of employee IDs that have changed since the given timestamp. This allows for efficient syncing of employee data — rather than downloading all employees, only those that have changed are returned. A change in ANY individual field in the employee record, as well as any change to the employment status, job info, or compensation tables, will cause that employee to be returned. Each entry includes the employee ID, the type of change (Inserted, Updated, or Deleted), and the last-changed timestamp. OAuth Scopes: public.integration, public.user + + :param since: ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) + :type since: datetime + :param type: Filter by change type. If omitted, all change types are returned. + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_changed_employee_ids_serialize( + since=since, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ChangedEmployeeIdsResponse", + "400": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_changed_employee_ids_serialize( + self, + since, + type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if since is not None: + if isinstance(since, datetime): + _query_params.append(("since", since.strftime(self.api_client.configuration.datetime_format))) + else: + _query_params.append(("since", since)) + + if type is not None: + _query_params.append(("type", type)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/employees/changed", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_changed_employee_table_data( + self, + table: Annotated[ + StrictStr, + Field( + description="The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], + since: Annotated[ + datetime | None, + Field( + description="ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ChangedEmployeeTableDataResponse: + """Get Changed Employee Table Data + + Returns table data for employees that have changed since the given timestamp. This is an optimization to avoid downloading all table data for all employees. It operates on an employee-last-changed-timestamp, which means that a change in ANY field in the employee record will cause ALL of that employee's table rows to show up via this API. The response includes the table rows grouped by employee ID with their last-changed timestamps. OAuth Scopes: employee, employee:assets, employee:compensation, employee:custom_fields, employee:custom_fields_encrypted, employee:education, employee:emergency_contacts, employee:job, sensitive_employee:creditcards + + :param table: The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + :type table: str + :param since: ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) + :type since: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_changed_employee_table_data_serialize( + table=table, + since=since, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ChangedEmployeeTableDataResponse", + "400": None, + "404": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_changed_employee_table_data_with_http_info( + self, + table: Annotated[ + StrictStr, + Field( + description="The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], + since: Annotated[ + datetime | None, + Field( + description="ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ChangedEmployeeTableDataResponse]: + """Get Changed Employee Table Data + + Returns table data for employees that have changed since the given timestamp. This is an optimization to avoid downloading all table data for all employees. It operates on an employee-last-changed-timestamp, which means that a change in ANY field in the employee record will cause ALL of that employee's table rows to show up via this API. The response includes the table rows grouped by employee ID with their last-changed timestamps. OAuth Scopes: employee, employee:assets, employee:compensation, employee:custom_fields, employee:custom_fields_encrypted, employee:education, employee:emergency_contacts, employee:job, sensitive_employee:creditcards + + :param table: The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + :type table: str + :param since: ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) + :type since: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_changed_employee_table_data_serialize( + table=table, + since=since, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ChangedEmployeeTableDataResponse", + "400": None, + "404": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_changed_employee_table_data_without_preload_content( + self, + table: Annotated[ + StrictStr, + Field( + description="The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], + since: Annotated[ + datetime | None, + Field( + description="ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Changed Employee Table Data + + Returns table data for employees that have changed since the given timestamp. This is an optimization to avoid downloading all table data for all employees. It operates on an employee-last-changed-timestamp, which means that a change in ANY field in the employee record will cause ALL of that employee's table rows to show up via this API. The response includes the table rows grouped by employee ID with their last-changed timestamps. OAuth Scopes: employee, employee:assets, employee:compensation, employee:custom_fields, employee:custom_fields_encrypted, employee:education, employee:emergency_contacts, employee:job, sensitive_employee:creditcards + + :param table: The API name of the table to retrieve changed data for. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) + :type table: str + :param since: ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) + :type since: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_changed_employee_table_data_serialize( + table=table, + since=since, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ChangedEmployeeTableDataResponse", + "400": None, + "404": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_changed_employee_table_data_serialize( + self, + table, + since, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if table is not None: + _path_params["table"] = table + # process the query parameters + if since is not None: + if isinstance(since, datetime): + _query_params.append(("since", since.strftime(self.api_client.configuration.datetime_format))) + else: + _query_params.append(("since", since)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/employees/changed/tables/{table}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/company_api.py b/bamboohr_sdk/api/company_api.py new file mode 100644 index 0000000..97d0293 --- /dev/null +++ b/bamboohr_sdk/api/company_api.py @@ -0,0 +1,276 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.put_company_industry_codes_request import PutCompanyIndustryCodesRequest +from bamboohr_sdk.models.update_company_industry_codes_response import UpdateCompanyIndustryCodesResponse +from bamboohr_sdk.rest import RESTResponseType + + +class CompanyApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def put_company_industry_codes( + self, + put_company_industry_codes_request: PutCompanyIndustryCodesRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UpdateCompanyIndustryCodesResponse: + """Update Company Industry Codes + + Updates the industry codes associated with a company. OAuth Scopes: company:details.write + + :param put_company_industry_codes_request: (required) + :type put_company_industry_codes_request: PutCompanyIndustryCodesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._put_company_industry_codes_serialize( + put_company_industry_codes_request=put_company_industry_codes_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UpdateCompanyIndustryCodesResponse", + "400": "UpdateCompanyIndustryCodes400Response", + "401": None, + "403": "UpdateCompanyIndustryCodes403Response", + "404": "UpdateCompanyIndustryCodes404Response", + "500": "UpdateCompanyIndustryCodes500Response", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def put_company_industry_codes_with_http_info( + self, + put_company_industry_codes_request: PutCompanyIndustryCodesRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UpdateCompanyIndustryCodesResponse]: + """Update Company Industry Codes + + Updates the industry codes associated with a company. OAuth Scopes: company:details.write + + :param put_company_industry_codes_request: (required) + :type put_company_industry_codes_request: PutCompanyIndustryCodesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._put_company_industry_codes_serialize( + put_company_industry_codes_request=put_company_industry_codes_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UpdateCompanyIndustryCodesResponse", + "400": "UpdateCompanyIndustryCodes400Response", + "401": None, + "403": "UpdateCompanyIndustryCodes403Response", + "404": "UpdateCompanyIndustryCodes404Response", + "500": "UpdateCompanyIndustryCodes500Response", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def put_company_industry_codes_without_preload_content( + self, + put_company_industry_codes_request: PutCompanyIndustryCodesRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Company Industry Codes + + Updates the industry codes associated with a company. OAuth Scopes: company:details.write + + :param put_company_industry_codes_request: (required) + :type put_company_industry_codes_request: PutCompanyIndustryCodesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._put_company_industry_codes_serialize( + put_company_industry_codes_request=put_company_industry_codes_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UpdateCompanyIndustryCodesResponse", + "400": "UpdateCompanyIndustryCodes400Response", + "401": None, + "403": "UpdateCompanyIndustryCodes403Response", + "404": "UpdateCompanyIndustryCodes404Response", + "500": "UpdateCompanyIndustryCodes500Response", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _put_company_industry_codes_serialize( + self, + put_company_industry_codes_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if put_company_industry_codes_request is not None: + _body_params = put_company_industry_codes_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/company-profile-data/industry-codes", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/company_files_api.py b/bamboohr_sdk/api/company_files_api.py index 3197800..46d513e 100644 --- a/bamboohr_sdk/api/company_files_api.py +++ b/bamboohr_sdk/api/company_files_api.py @@ -1,29 +1,22 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any -from pydantic import Field, StrictBytes, StrictInt, StrictStr, field_validator -from typing import List, Optional, Tuple, Union -from typing_extensions import Annotated -from bamboohr_sdk.models.company_file_update import CompanyFileUpdate -from bamboohr_sdk.models.company_files_response import CompanyFilesResponse +from pydantic import Field, StrictBytes, StrictFloat, StrictInt, StrictStr, validate_call from bamboohr_sdk.api_client import ApiClient, RequestSerialized from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.company_file_update import CompanyFileUpdate +from bamboohr_sdk.models.company_files_response import CompanyFilesResponse from bamboohr_sdk.rest import RESTResponseType @@ -39,27 +32,21 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call - def add_company_file_category( + def create_company_file_category( self, - request_body: List[StrictStr], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + request_body: list[StrictStr], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Create Company File Category - Creates one or more company file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, 403 if the caller lacks permission or the name is reserved, and 500 on an internal error. + Creates one or more company file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, 403 if the caller lacks permission or the name is reserved, and 500 on an internal error. OAuth Scopes: company_file.write :param request_body: (required) :type request_body: List[str] @@ -83,27 +70,24 @@ def add_company_file_category( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._add_company_file_category_serialize( + _param = self._create_company_file_category_serialize( request_body=request_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '201': None, - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "201": None, + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -111,27 +95,21 @@ def add_company_file_category( response_types_map=_response_types_map, ) - @validate_call - def add_company_file_category_with_http_info( + def create_company_file_category_with_http_info( self, - request_body: List[StrictStr], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + request_body: list[StrictStr], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Create Company File Category - Creates one or more company file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, 403 if the caller lacks permission or the name is reserved, and 500 on an internal error. + Creates one or more company file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, 403 if the caller lacks permission or the name is reserved, and 500 on an internal error. OAuth Scopes: company_file.write :param request_body: (required) :type request_body: List[str] @@ -155,54 +133,45 @@ def add_company_file_category_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._add_company_file_category_serialize( + _param = self._create_company_file_category_serialize( request_body=request_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '201': None, - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "201": None, + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def add_company_file_category_without_preload_content( + def create_company_file_category_without_preload_content( self, - request_body: List[StrictStr], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + request_body: list[StrictStr], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Company File Category - Creates one or more company file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, 403 if the caller lacks permission or the name is reserved, and 500 on an internal error. + Creates one or more company file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, 403 if the caller lacks permission or the name is reserved, and 500 on an internal error. OAuth Scopes: company_file.write :param request_body: (required) :type request_body: List[str] @@ -226,31 +195,27 @@ def add_company_file_category_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._add_company_file_category_serialize( + _param = self._create_company_file_category_serialize( request_body=request_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '201': None, - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "201": None, + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _add_company_file_category_serialize( + def _create_company_file_category_serialize( self, request_body, _request_auth, @@ -261,18 +226,16 @@ def _add_company_file_category_serialize( _host = None - _collection_formats: Dict[str, str] = { - 'request_body': '', + _collection_formats: dict[str, str] = { + "request_body": "", } - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -282,32 +245,20 @@ def _add_company_file_category_serialize( if request_body is not None: _body_params = request_body - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json", "application/xml"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/files/categories', + method="POST", + resource_path="/api/v1/files/categories", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -317,32 +268,24 @@ def _add_company_file_category_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def delete_company_file( self, - file_id: Annotated[StrictInt, Field(description="The ID of the company file to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + file_id: Annotated[StrictInt | None, Field(description="The ID of the company file to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Delete Company File - Deletes the specified company file. Requires the caller to have company file write access. Returns 404 if the file does not exist, 403 if the caller lacks permission, and 500 on an internal error. + Permanently removes a company file and its associated storage. The company must have the Files tool enabled; otherwise the file is treated as not found. Read-only file types (e.g. e-signature templates) are silently skipped. No response body is returned on success. Use \"Company Files > List Company Files\" to obtain file IDs. OAuth Scopes: company_file.write :param file_id: The ID of the company file to delete. (required) :type file_id: int @@ -366,26 +309,23 @@ def delete_company_file( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_company_file_serialize( file_id=file_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -393,27 +333,21 @@ def delete_company_file( response_types_map=_response_types_map, ) - @validate_call def delete_company_file_with_http_info( self, - file_id: Annotated[StrictInt, Field(description="The ID of the company file to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + file_id: Annotated[StrictInt | None, Field(description="The ID of the company file to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Delete Company File - Deletes the specified company file. Requires the caller to have company file write access. Returns 404 if the file does not exist, 403 if the caller lacks permission, and 500 on an internal error. + Permanently removes a company file and its associated storage. The company must have the Files tool enabled; otherwise the file is treated as not found. Read-only file types (e.g. e-signature templates) are silently skipped. No response body is returned on success. Use \"Company Files > List Company Files\" to obtain file IDs. OAuth Scopes: company_file.write :param file_id: The ID of the company file to delete. (required) :type file_id: int @@ -437,53 +371,44 @@ def delete_company_file_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_company_file_serialize( file_id=file_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def delete_company_file_without_preload_content( self, - file_id: Annotated[StrictInt, Field(description="The ID of the company file to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + file_id: Annotated[StrictInt | None, Field(description="The ID of the company file to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Delete Company File - Deletes the specified company file. Requires the caller to have company file write access. Returns 404 if the file does not exist, 403 if the caller lacks permission, and 500 on an internal error. + Permanently removes a company file and its associated storage. The company must have the Files tool enabled; otherwise the file is treated as not found. Read-only file types (e.g. e-signature templates) are silently skipped. No response body is returned on success. Use \"Company Files > List Company Files\" to obtain file IDs. OAuth Scopes: company_file.write :param file_id: The ID of the company file to delete. (required) :type file_id: int @@ -507,29 +432,25 @@ def delete_company_file_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_company_file_serialize( file_id=file_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_company_file_serialize( self, file_id, @@ -541,38 +462,29 @@ def _delete_company_file_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if file_id is not None: - _path_params['fileId'] = file_id + _path_params["fileId"] = file_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/files/{fileId}', + method="DELETE", + resource_path="/api/v1/files/{fileId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -582,32 +494,24 @@ def _delete_company_file_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_company_file( self, - file_id: Annotated[StrictInt, Field(description="The ID of the company file to download.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + file_id: Annotated[StrictInt | None, Field(description="The ID of the company file to download.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Get Company File - Downloads a company file by its ID. The response body is the raw file content. The `Content-Type` header reflects the file's MIME type and `Content-Disposition` is set to `attachment` with the original filename. Access is permitted if the file or its category is shared with employees, shared directly with the requesting user, or the user has view permission on the file section. + Downloads a company file by its ID. The response body is the raw file content. The `Content-Type` header reflects the file's MIME type and `Content-Disposition` is set to `attachment` with the original filename. Access is permitted if the file or its category is shared with employees, shared directly with the requesting user, or the user has view permission on the file section. OAuth Scopes: company_file :param file_id: The ID of the company file to download. (required) :type file_id: int @@ -631,25 +535,22 @@ def get_company_file( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_company_file_serialize( file_id=file_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -657,27 +558,21 @@ def get_company_file( response_types_map=_response_types_map, ) - @validate_call def get_company_file_with_http_info( self, - file_id: Annotated[StrictInt, Field(description="The ID of the company file to download.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + file_id: Annotated[StrictInt | None, Field(description="The ID of the company file to download.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Get Company File - Downloads a company file by its ID. The response body is the raw file content. The `Content-Type` header reflects the file's MIME type and `Content-Disposition` is set to `attachment` with the original filename. Access is permitted if the file or its category is shared with employees, shared directly with the requesting user, or the user has view permission on the file section. + Downloads a company file by its ID. The response body is the raw file content. The `Content-Type` header reflects the file's MIME type and `Content-Disposition` is set to `attachment` with the original filename. Access is permitted if the file or its category is shared with employees, shared directly with the requesting user, or the user has view permission on the file section. OAuth Scopes: company_file :param file_id: The ID of the company file to download. (required) :type file_id: int @@ -701,52 +596,43 @@ def get_company_file_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_company_file_serialize( file_id=file_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_company_file_without_preload_content( self, - file_id: Annotated[StrictInt, Field(description="The ID of the company file to download.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + file_id: Annotated[StrictInt | None, Field(description="The ID of the company file to download.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Company File - Downloads a company file by its ID. The response body is the raw file content. The `Content-Type` header reflects the file's MIME type and `Content-Disposition` is set to `attachment` with the original filename. Access is permitted if the file or its category is shared with employees, shared directly with the requesting user, or the user has view permission on the file section. + Downloads a company file by its ID. The response body is the raw file content. The `Content-Type` header reflects the file's MIME type and `Content-Disposition` is set to `attachment` with the original filename. Access is permitted if the file or its category is shared with employees, shared directly with the requesting user, or the user has view permission on the file section. OAuth Scopes: company_file :param file_id: The ID of the company file to download. (required) :type file_id: int @@ -770,28 +656,24 @@ def get_company_file_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_company_file_serialize( file_id=file_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_company_file_serialize( self, file_id, @@ -803,45 +685,33 @@ def _get_company_file_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if file_id is not None: - _path_params['fileId'] = file_id + _path_params["fileId"] = file_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/octet-stream' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/octet-stream"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/files/{fileId}', + method="GET", + resource_path="/api/v1/files/{fileId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -851,31 +721,23 @@ def _get_company_file_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_company_files( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CompanyFilesResponse: """Get Company Files and Categories - Returns all company file categories and the files within each category that the requesting user is permitted to see. The response format is determined by the `Accept` request header: send `application/json` for JSON or omit it (or send `application/xml`) for XML. + Returns all company file categories and the files within each category that the requesting user is permitted to see. The response format is determined by the `Accept` request header: send `application/json` for JSON or omit it (or send `application/xml`) for XML. OAuth Scopes: company_file :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -897,49 +759,37 @@ def list_company_files( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_company_files_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompanyFilesResponse", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "CompanyFilesResponse", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_company_files_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CompanyFilesResponse]: """Get Company Files and Categories - Returns all company file categories and the files within each category that the requesting user is permitted to see. The response format is determined by the `Accept` request header: send `application/json` for JSON or omit it (or send `application/xml`) for XML. + Returns all company file categories and the files within each category that the requesting user is permitted to see. The response format is determined by the `Accept` request header: send `application/json` for JSON or omit it (or send `application/xml`) for XML. OAuth Scopes: company_file :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -961,49 +811,37 @@ def list_company_files_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_company_files_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompanyFilesResponse", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "CompanyFilesResponse", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_company_files_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Company Files and Categories - Returns all company file categories and the files within each category that the requesting user is permitted to see. The response format is determined by the `Accept` request header: send `application/json` for JSON or omit it (or send `application/xml`) for XML. + Returns all company file categories and the files within each category that the requesting user is permitted to see. The response format is determined by the `Accept` request header: send `application/json` for JSON or omit it (or send `application/xml`) for XML. OAuth Scopes: company_file :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1025,26 +863,19 @@ def list_company_files_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_company_files_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompanyFilesResponse", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "CompanyFilesResponse", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_company_files_serialize( self, _request_auth, @@ -1055,17 +886,14 @@ def _list_company_files_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -1073,26 +901,16 @@ def _list_company_files_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/files/view', + method="GET", + resource_path="/api/v1/files/view", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1102,33 +920,25 @@ def _list_company_files_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_company_file( self, - file_id: Annotated[StrictInt, Field(description="The ID of the company file to update.")], + file_id: Annotated[StrictInt | None, Field(description="The ID of the company file to update.")], company_file_update: CompanyFileUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Update Company File - Updates metadata for an existing company file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML. Only fields included in the request body are updated. + Updates metadata for an existing company file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML. Only fields included in the request body are updated. OAuth Scopes: company_file.write :param file_id: The ID of the company file to update. (required) :type file_id: int @@ -1154,7 +964,7 @@ def update_company_file( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_company_file_serialize( file_id=file_id, @@ -1162,19 +972,16 @@ def update_company_file( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -1182,28 +989,22 @@ def update_company_file( response_types_map=_response_types_map, ) - @validate_call def update_company_file_with_http_info( self, - file_id: Annotated[StrictInt, Field(description="The ID of the company file to update.")], + file_id: Annotated[StrictInt | None, Field(description="The ID of the company file to update.")], company_file_update: CompanyFileUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Update Company File - Updates metadata for an existing company file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML. Only fields included in the request body are updated. + Updates metadata for an existing company file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML. Only fields included in the request body are updated. OAuth Scopes: company_file.write :param file_id: The ID of the company file to update. (required) :type file_id: int @@ -1229,7 +1030,7 @@ def update_company_file_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_company_file_serialize( file_id=file_id, @@ -1237,47 +1038,38 @@ def update_company_file_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_company_file_without_preload_content( self, - file_id: Annotated[StrictInt, Field(description="The ID of the company file to update.")], + file_id: Annotated[StrictInt | None, Field(description="The ID of the company file to update.")], company_file_update: CompanyFileUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Company File - Updates metadata for an existing company file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML. Only fields included in the request body are updated. + Updates metadata for an existing company file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML. Only fields included in the request body are updated. OAuth Scopes: company_file.write :param file_id: The ID of the company file to update. (required) :type file_id: int @@ -1303,7 +1095,7 @@ def update_company_file_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_company_file_serialize( file_id=file_id, @@ -1311,22 +1103,18 @@ def update_company_file_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_company_file_serialize( self, file_id, @@ -1339,21 +1127,18 @@ def _update_company_file_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if file_id is not None: - _path_params['fileId'] = file_id + _path_params["fileId"] = file_id # process the query parameters # process the header parameters # process the form parameters @@ -1361,31 +1146,20 @@ def _update_company_file_serialize( if company_file_update is not None: _body_params = company_file_update - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/files/{fileId}', + method="POST", + resource_path="/api/v1/files/{fileId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1395,35 +1169,36 @@ def _update_company_file_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def upload_company_file( self, file_name: Annotated[StrictStr, Field(description="The display name for the uploaded file.")], - category: Annotated[StrictInt, Field(description="The ID of the file category (section) to upload the file into.")], - file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The file to upload.")], - share: Annotated[Optional[StrictStr], Field(description="Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + category: Annotated[ + StrictInt, Field(description="The ID of the file category (section) to upload the file into.") + ], + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], Field(description="The file to upload.") + ], + share: Annotated[ + StrictStr | None, + Field( + description="Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Upload Company File - Uploads a file to a company file category. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Uploading to read-only categories is not permitted. Uploading to implementation categories is not permitted on companies that have completed implementation. + Uploads a file to a company file category. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Uploading to read-only categories is not permitted. Uploading to implementation categories is not permitted on companies that have completed implementation. OAuth Scopes: company_file.write :param file_name: The display name for the uploaded file. (required) :type file_name: str @@ -1453,7 +1228,7 @@ def upload_company_file( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._upload_company_file_serialize( file_name=file_name, @@ -1463,21 +1238,18 @@ def upload_company_file( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '403': None, - '404': None, - '413': None, - '503': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "403": None, + "404": None, + "413": None, + "503": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -1485,30 +1257,33 @@ def upload_company_file( response_types_map=_response_types_map, ) - @validate_call def upload_company_file_with_http_info( self, file_name: Annotated[StrictStr, Field(description="The display name for the uploaded file.")], - category: Annotated[StrictInt, Field(description="The ID of the file category (section) to upload the file into.")], - file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The file to upload.")], - share: Annotated[Optional[StrictStr], Field(description="Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + category: Annotated[ + StrictInt, Field(description="The ID of the file category (section) to upload the file into.") + ], + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], Field(description="The file to upload.") + ], + share: Annotated[ + StrictStr | None, + Field( + description="Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Upload Company File - Uploads a file to a company file category. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Uploading to read-only categories is not permitted. Uploading to implementation categories is not permitted on companies that have completed implementation. + Uploads a file to a company file category. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Uploading to read-only categories is not permitted. Uploading to implementation categories is not permitted on companies that have completed implementation. OAuth Scopes: company_file.write :param file_name: The display name for the uploaded file. (required) :type file_name: str @@ -1538,7 +1313,7 @@ def upload_company_file_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._upload_company_file_serialize( file_name=file_name, @@ -1548,51 +1323,51 @@ def upload_company_file_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '403': None, - '404': None, - '413': None, - '503': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "403": None, + "404": None, + "413": None, + "503": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def upload_company_file_without_preload_content( self, file_name: Annotated[StrictStr, Field(description="The display name for the uploaded file.")], - category: Annotated[StrictInt, Field(description="The ID of the file category (section) to upload the file into.")], - file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The file to upload.")], - share: Annotated[Optional[StrictStr], Field(description="Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + category: Annotated[ + StrictInt, Field(description="The ID of the file category (section) to upload the file into.") + ], + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], Field(description="The file to upload.") + ], + share: Annotated[ + StrictStr | None, + Field( + description="Whether to share the file with all employees. Accepted values: `yes` or `no`. Defaults to `no`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Upload Company File - Uploads a file to a company file category. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Uploading to read-only categories is not permitted. Uploading to implementation categories is not permitted on companies that have completed implementation. + Uploads a file to a company file category. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Uploading to read-only categories is not permitted. Uploading to implementation categories is not permitted on companies that have completed implementation. OAuth Scopes: company_file.write :param file_name: The display name for the uploaded file. (required) :type file_name: str @@ -1622,7 +1397,7 @@ def upload_company_file_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._upload_company_file_serialize( file_name=file_name, @@ -1632,24 +1407,20 @@ def upload_company_file_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '403': None, - '404': None, - '413': None, - '503': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "403": None, + "404": None, + "413": None, + "503": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _upload_company_file_serialize( self, file_name, @@ -1664,57 +1435,43 @@ def _upload_company_file_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters # process the form parameters if file_name is not None: - _form_params.append(('fileName', file_name)) + _form_params.append(("fileName", file_name)) if category is not None: - _form_params.append(('category', category)) + _form_params.append(("category", category)) if share is not None: - _form_params.append(('share', share)) + _form_params.append(("share", share)) if file is not None: - _files['file'] = file + _files["file"] = file # process the body parameter - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'multipart/form-data' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/files', + method="POST", + resource_path="/api/v1/files", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1724,7 +1481,5 @@ def _upload_company_file_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/company_profile_api.py b/bamboohr_sdk/api/company_profile_api.py index d17c746..f382ff7 100644 --- a/bamboohr_sdk/api/company_profile_api.py +++ b/bamboohr_sdk/api/company_profile_api.py @@ -1,25 +1,27 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any -from bamboohr_sdk.models.company_profile_integrations import CompanyProfileIntegrations +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call from bamboohr_sdk.api_client import ApiClient, RequestSerialized from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.company_profile_data import CompanyProfileData +from bamboohr_sdk.models.company_profile_integrations import CompanyProfileIntegrations +from bamboohr_sdk.models.patch_company_profile_company_information_request import ( + PatchCompanyProfileCompanyInformationRequest, +) +from bamboohr_sdk.models.put_company_profile_display_name_request import PutCompanyProfileDisplayNameRequest +from bamboohr_sdk.models.update_company_name_success_response import UpdateCompanyNameSuccessResponse from bamboohr_sdk.rest import RESTResponseType @@ -35,26 +37,20 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def get_company_profile_integrations( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CompanyProfileIntegrations: """Get Company Profile Integrations - Returns the list of integration feature identifiers currently enabled for the company. Each identifier is an uppercase string key (e.g. `BAMBOOHR_PAYROLL`, `TIME_TRACKING`, `E_SIGNATURES`) representing a product feature or integration that has been activated on the account. The list reflects the company's current subscription and configuration. + Returns the list of integration feature identifiers currently enabled for the company. Each identifier is an uppercase string key (e.g. `BAMBOOHR_PAYROLL`, `TIME_TRACKING`, `E_SIGNATURES`) representing a product feature or integration that has been activated on the account. The list reflects the company's current subscription and configuration. OAuth Scopes: company:details :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -76,50 +72,38 @@ def get_company_profile_integrations( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_company_profile_integrations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompanyProfileIntegrations", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "CompanyProfileIntegrations", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_company_profile_integrations_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CompanyProfileIntegrations]: """Get Company Profile Integrations - Returns the list of integration feature identifiers currently enabled for the company. Each identifier is an uppercase string key (e.g. `BAMBOOHR_PAYROLL`, `TIME_TRACKING`, `E_SIGNATURES`) representing a product feature or integration that has been activated on the account. The list reflects the company's current subscription and configuration. + Returns the list of integration feature identifiers currently enabled for the company. Each identifier is an uppercase string key (e.g. `BAMBOOHR_PAYROLL`, `TIME_TRACKING`, `E_SIGNATURES`) representing a product feature or integration that has been activated on the account. The list reflects the company's current subscription and configuration. OAuth Scopes: company:details :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -141,50 +125,38 @@ def get_company_profile_integrations_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_company_profile_integrations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompanyProfileIntegrations", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "CompanyProfileIntegrations", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_company_profile_integrations_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Company Profile Integrations - Returns the list of integration feature identifiers currently enabled for the company. Each identifier is an uppercase string key (e.g. `BAMBOOHR_PAYROLL`, `TIME_TRACKING`, `E_SIGNATURES`) representing a product feature or integration that has been activated on the account. The list reflects the company's current subscription and configuration. + Returns the list of integration feature identifiers currently enabled for the company. Each identifier is an uppercase string key (e.g. `BAMBOOHR_PAYROLL`, `TIME_TRACKING`, `E_SIGNATURES`) representing a product feature or integration that has been activated on the account. The list reflects the company's current subscription and configuration. OAuth Scopes: company:details :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -206,29 +178,252 @@ def get_company_profile_integrations_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_company_profile_integrations_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompanyProfileIntegrations", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_company_profile_integrations_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/company-profile-integrations", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def patch_company_profile_company_information( + self, + patch_company_profile_company_information_request: PatchCompanyProfileCompanyInformationRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CompanyProfileData: + """Update company information (phone, address, legal name) + + Updates legal name, phone, and/or address for the company (application/merge-patch+json). String fields must be JSON strings (not numbers). Response matches GET /api/v1/company-profile-data. OAuth Scopes: company:details.write + + :param patch_company_profile_company_information_request: (required) + :type patch_company_profile_company_information_request: PatchCompanyProfileCompanyInformationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._patch_company_profile_company_information_serialize( + patch_company_profile_company_information_request=patch_company_profile_company_information_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompanyProfileIntegrations", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "CompanyProfileData", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def patch_company_profile_company_information_with_http_info( + self, + patch_company_profile_company_information_request: PatchCompanyProfileCompanyInformationRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CompanyProfileData]: + """Update company information (phone, address, legal name) + + Updates legal name, phone, and/or address for the company (application/merge-patch+json). String fields must be JSON strings (not numbers). Response matches GET /api/v1/company-profile-data. OAuth Scopes: company:details.write + + :param patch_company_profile_company_information_request: (required) + :type patch_company_profile_company_information_request: PatchCompanyProfileCompanyInformationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._patch_company_profile_company_information_serialize( + patch_company_profile_company_information_request=patch_company_profile_company_information_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, ) - return response_data.response + _response_types_map: dict[str, str | None] = { + "200": "CompanyProfileData", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) - def _get_company_profile_integrations_serialize( + @validate_call + def patch_company_profile_company_information_without_preload_content( self, + patch_company_profile_company_information_request: PatchCompanyProfileCompanyInformationRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update company information (phone, address, legal name) + + Updates legal name, phone, and/or address for the company (application/merge-patch+json). String fields must be JSON strings (not numbers). Response matches GET /api/v1/company-profile-data. OAuth Scopes: company:details.write + + :param patch_company_profile_company_information_request: (required) + :type patch_company_profile_company_information_request: PatchCompanyProfileCompanyInformationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._patch_company_profile_company_information_serialize( + patch_company_profile_company_information_request=patch_company_profile_company_information_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompanyProfileData", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _patch_company_profile_company_information_serialize( + self, + patch_company_profile_company_information_request, _request_auth, _content_type, _headers, @@ -237,43 +432,41 @@ def _get_company_profile_integrations_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters # process the form parameters # process the body parameter - + if patch_company_profile_company_information_request is not None: + _body_params = patch_company_profile_company_information_request # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/merge-patch+json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/company-profile-integrations', + method="PATCH", + resource_path="/api/v1/company-profile-data/company-information", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -283,7 +476,242 @@ def _get_company_profile_integrations_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) + @validate_call + def put_company_profile_display_name( + self, + put_company_profile_display_name_request: PutCompanyProfileDisplayNameRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UpdateCompanyNameSuccessResponse: + """Update company display name + + Updates the company display name. Requires admin permissions and the company:details.write OAuth scope. The display name must be a non-empty string with a maximum length of 255 characters. Upon successful update, the system logs the change and broadcasts an event to notify other services. OAuth Scopes: company:details.write + + :param put_company_profile_display_name_request: + :type put_company_profile_display_name_request: PutCompanyProfileDisplayNameRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._put_company_profile_display_name_serialize( + put_company_profile_display_name_request=put_company_profile_display_name_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UpdateCompanyNameSuccessResponse", + "400": "UpdateCompanyNameBadRequestResponse", + "403": "UpdateCompanyNameForbiddenResponse", + "500": "UpdateCompanyNameInternalErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def put_company_profile_display_name_with_http_info( + self, + put_company_profile_display_name_request: PutCompanyProfileDisplayNameRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UpdateCompanyNameSuccessResponse]: + """Update company display name + + Updates the company display name. Requires admin permissions and the company:details.write OAuth scope. The display name must be a non-empty string with a maximum length of 255 characters. Upon successful update, the system logs the change and broadcasts an event to notify other services. OAuth Scopes: company:details.write + + :param put_company_profile_display_name_request: + :type put_company_profile_display_name_request: PutCompanyProfileDisplayNameRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._put_company_profile_display_name_serialize( + put_company_profile_display_name_request=put_company_profile_display_name_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + _response_types_map: dict[str, str | None] = { + "200": "UpdateCompanyNameSuccessResponse", + "400": "UpdateCompanyNameBadRequestResponse", + "403": "UpdateCompanyNameForbiddenResponse", + "500": "UpdateCompanyNameInternalErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def put_company_profile_display_name_without_preload_content( + self, + put_company_profile_display_name_request: PutCompanyProfileDisplayNameRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update company display name + + Updates the company display name. Requires admin permissions and the company:details.write OAuth scope. The display name must be a non-empty string with a maximum length of 255 characters. Upon successful update, the system logs the change and broadcasts an event to notify other services. OAuth Scopes: company:details.write + + :param put_company_profile_display_name_request: + :type put_company_profile_display_name_request: PutCompanyProfileDisplayNameRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._put_company_profile_display_name_serialize( + put_company_profile_display_name_request=put_company_profile_display_name_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UpdateCompanyNameSuccessResponse", + "400": "UpdateCompanyNameBadRequestResponse", + "403": "UpdateCompanyNameForbiddenResponse", + "500": "UpdateCompanyNameInternalErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _put_company_profile_display_name_serialize( + self, + put_company_profile_display_name_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if put_company_profile_display_name_request is not None: + _body_params = put_company_profile_display_name_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/company-profile-data/display-name", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/compensation_api.py b/bamboohr_sdk/api/compensation_api.py new file mode 100644 index 0000000..9111138 --- /dev/null +++ b/bamboohr_sdk/api/compensation_api.py @@ -0,0 +1,675 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.compensation_equity_settings_response import CompensationEquitySettingsResponse +from bamboohr_sdk.models.compensation_equity_settings_update_request import CompensationEquitySettingsUpdateRequest +from bamboohr_sdk.models.compensation_tools_response import CompensationToolsResponse +from bamboohr_sdk.rest import RESTResponseType + + +class CompensationApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def c5880b509783cd9d7fce9ddf5d6af1be( + self, + compensation_equity_settings_update_request: CompensationEquitySettingsUpdateRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CompensationEquitySettingsResponse: + """Update company equity settings + + Updates company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration. OAuth Scopes: equity.write + + :param compensation_equity_settings_update_request: (required) + :type compensation_equity_settings_update_request: CompensationEquitySettingsUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._c5880b509783cd9d7fce9ddf5d6af1be_serialize( + compensation_equity_settings_update_request=compensation_equity_settings_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationEquitySettingsResponse", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def c5880b509783cd9d7fce9ddf5d6af1be_with_http_info( + self, + compensation_equity_settings_update_request: CompensationEquitySettingsUpdateRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CompensationEquitySettingsResponse]: + """Update company equity settings + + Updates company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration. OAuth Scopes: equity.write + + :param compensation_equity_settings_update_request: (required) + :type compensation_equity_settings_update_request: CompensationEquitySettingsUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._c5880b509783cd9d7fce9ddf5d6af1be_serialize( + compensation_equity_settings_update_request=compensation_equity_settings_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationEquitySettingsResponse", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def c5880b509783cd9d7fce9ddf5d6af1be_without_preload_content( + self, + compensation_equity_settings_update_request: CompensationEquitySettingsUpdateRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update company equity settings + + Updates company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration. OAuth Scopes: equity.write + + :param compensation_equity_settings_update_request: (required) + :type compensation_equity_settings_update_request: CompensationEquitySettingsUpdateRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._c5880b509783cd9d7fce9ddf5d6af1be_serialize( + compensation_equity_settings_update_request=compensation_equity_settings_update_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationEquitySettingsResponse", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _c5880b509783cd9d7fce9ddf5d6af1be_serialize( + self, + compensation_equity_settings_update_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if compensation_equity_settings_update_request is not None: + _body_params = compensation_equity_settings_update_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/compensation/equity/settings", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_9f398e2652ea47a6dc5121ce5184222a( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CompensationToolsResponse: + """List available compensation tools + + Returns the list of available compensation tools/settings for the company, including Levels & Bands, Compensation Benchmarking, Compensation Planning, and Total Rewards. Also returns upsell information if applicable. OAuth Scopes: compensation_tools + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_9f398e2652ea47a6dc5121ce5184222a_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationToolsResponse", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_9f398e2652ea47a6dc5121ce5184222a_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CompensationToolsResponse]: + """List available compensation tools + + Returns the list of available compensation tools/settings for the company, including Levels & Bands, Compensation Benchmarking, Compensation Planning, and Total Rewards. Also returns upsell information if applicable. OAuth Scopes: compensation_tools + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_9f398e2652ea47a6dc5121ce5184222a_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationToolsResponse", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_9f398e2652ea47a6dc5121ce5184222a_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List available compensation tools + + Returns the list of available compensation tools/settings for the company, including Levels & Bands, Compensation Benchmarking, Compensation Planning, and Total Rewards. Also returns upsell information if applicable. OAuth Scopes: compensation_tools + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_9f398e2652ea47a6dc5121ce5184222a_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationToolsResponse", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_9f398e2652ea47a6dc5121ce5184222a_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/tools", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def db49fb29f9f04d59afad7c01ce860418( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CompensationEquitySettingsResponse: + """Get company equity settings + + Retrieves company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration. OAuth Scopes: equity + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._db49fb29f9f04d59afad7c01ce860418_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationEquitySettingsResponse", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def db49fb29f9f04d59afad7c01ce860418_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CompensationEquitySettingsResponse]: + """Get company equity settings + + Retrieves company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration. OAuth Scopes: equity + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._db49fb29f9f04d59afad7c01ce860418_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationEquitySettingsResponse", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def db49fb29f9f04d59afad7c01ce860418_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get company equity settings + + Retrieves company-level equity settings including calculation type, valuation, shares, pricing, and vesting-related configuration. OAuth Scopes: equity + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._db49fb29f9f04d59afad7c01ce860418_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationEquitySettingsResponse", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _db49fb29f9f04d59afad7c01ce860418_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/equity/settings", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/compensation_benchmarking_api.py b/bamboohr_sdk/api/compensation_benchmarking_api.py new file mode 100644 index 0000000..82d5f4c --- /dev/null +++ b/bamboohr_sdk/api/compensation_benchmarking_api.py @@ -0,0 +1,2635 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any + +from pydantic import Field, StrictBytes, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.compensation_benchmark_details import CompensationBenchmarkDetails +from bamboohr_sdk.models.compensation_benchmark_source import CompensationBenchmarkSource +from bamboohr_sdk.models.compensation_benchmarks_list import CompensationBenchmarksList +from bamboohr_sdk.models.create_compensation_benchmark_request import CreateCompensationBenchmarkRequest +from bamboohr_sdk.models.create_compensation_benchmark_source_request import CreateCompensationBenchmarkSourceRequest +from bamboohr_sdk.models.created_compensation_benchmark import CreatedCompensationBenchmark +from bamboohr_sdk.models.created_compensation_benchmark_source import CreatedCompensationBenchmarkSource +from bamboohr_sdk.models.delete_compensation_benchmark_source_request import DeleteCompensationBenchmarkSourceRequest +from bamboohr_sdk.models.delete_compensation_benchmark_source_response import DeleteCompensationBenchmarkSourceResponse +from bamboohr_sdk.models.import_compensation_benchmarks_response import ImportCompensationBenchmarksResponse +from bamboohr_sdk.models.update_compensation_benchmark_request import UpdateCompensationBenchmarkRequest +from bamboohr_sdk.models.update_compensation_benchmark_sources_request import UpdateCompensationBenchmarkSourcesRequest +from bamboohr_sdk.models.update_compensation_benchmark_sources_response import ( + UpdateCompensationBenchmarkSourcesResponse, +) +from bamboohr_sdk.models.updated_compensation_benchmark import UpdatedCompensationBenchmark +from bamboohr_sdk.rest import RESTResponseType + + +class CompensationBenchmarkingApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def create_compensation_benchmark( + self, + create_compensation_benchmark_request: CreateCompensationBenchmarkRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreatedCompensationBenchmark: + """Create Compensation Benchmark + + Creates a new compensation benchmark for a specific company job title (and optionally a specific job location). The `jobTitleId` value comes from `GET /api/v1/compensation/benchmarks` (`jobDetails.id`) or the company's job-title list. When `jobLocationId` is omitted, the benchmark applies to the job title at any location. Returns the saved benchmark wrapped in `savedBenchmark` along with a status `message`. OAuth Scopes: compensation_benchmarks.write + + :param create_compensation_benchmark_request: + :type create_compensation_benchmark_request: CreateCompensationBenchmarkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_compensation_benchmark_serialize( + create_compensation_benchmark_request=create_compensation_benchmark_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CreatedCompensationBenchmark", + "403": "ProblemDetailsResponse", + "400": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_compensation_benchmark_with_http_info( + self, + create_compensation_benchmark_request: CreateCompensationBenchmarkRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreatedCompensationBenchmark]: + """Create Compensation Benchmark + + Creates a new compensation benchmark for a specific company job title (and optionally a specific job location). The `jobTitleId` value comes from `GET /api/v1/compensation/benchmarks` (`jobDetails.id`) or the company's job-title list. When `jobLocationId` is omitted, the benchmark applies to the job title at any location. Returns the saved benchmark wrapped in `savedBenchmark` along with a status `message`. OAuth Scopes: compensation_benchmarks.write + + :param create_compensation_benchmark_request: + :type create_compensation_benchmark_request: CreateCompensationBenchmarkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_compensation_benchmark_serialize( + create_compensation_benchmark_request=create_compensation_benchmark_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CreatedCompensationBenchmark", + "403": "ProblemDetailsResponse", + "400": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_compensation_benchmark_without_preload_content( + self, + create_compensation_benchmark_request: CreateCompensationBenchmarkRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Compensation Benchmark + + Creates a new compensation benchmark for a specific company job title (and optionally a specific job location). The `jobTitleId` value comes from `GET /api/v1/compensation/benchmarks` (`jobDetails.id`) or the company's job-title list. When `jobLocationId` is omitted, the benchmark applies to the job title at any location. Returns the saved benchmark wrapped in `savedBenchmark` along with a status `message`. OAuth Scopes: compensation_benchmarks.write + + :param create_compensation_benchmark_request: + :type create_compensation_benchmark_request: CreateCompensationBenchmarkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_compensation_benchmark_serialize( + create_compensation_benchmark_request=create_compensation_benchmark_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CreatedCompensationBenchmark", + "403": "ProblemDetailsResponse", + "400": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_compensation_benchmark_serialize( + self, + create_compensation_benchmark_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_compensation_benchmark_request is not None: + _body_params = create_compensation_benchmark_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/compensation/benchmarks", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_compensation_benchmark_source( + self, + create_compensation_benchmark_source_request: CreateCompensationBenchmarkSourceRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreatedCompensationBenchmarkSource: + """Create Compensation Benchmark Source + + Creates a new benchmark source the company can attach to its benchmarks. The `name` must be non-empty; the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Returns the new source's ID and the trimmed name. OAuth Scopes: compensation_benchmarks.write + + :param create_compensation_benchmark_source_request: + :type create_compensation_benchmark_source_request: CreateCompensationBenchmarkSourceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_compensation_benchmark_source_serialize( + create_compensation_benchmark_source_request=create_compensation_benchmark_source_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CreatedCompensationBenchmarkSource", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_compensation_benchmark_source_with_http_info( + self, + create_compensation_benchmark_source_request: CreateCompensationBenchmarkSourceRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreatedCompensationBenchmarkSource]: + """Create Compensation Benchmark Source + + Creates a new benchmark source the company can attach to its benchmarks. The `name` must be non-empty; the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Returns the new source's ID and the trimmed name. OAuth Scopes: compensation_benchmarks.write + + :param create_compensation_benchmark_source_request: + :type create_compensation_benchmark_source_request: CreateCompensationBenchmarkSourceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_compensation_benchmark_source_serialize( + create_compensation_benchmark_source_request=create_compensation_benchmark_source_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CreatedCompensationBenchmarkSource", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_compensation_benchmark_source_without_preload_content( + self, + create_compensation_benchmark_source_request: CreateCompensationBenchmarkSourceRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Compensation Benchmark Source + + Creates a new benchmark source the company can attach to its benchmarks. The `name` must be non-empty; the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Returns the new source's ID and the trimmed name. OAuth Scopes: compensation_benchmarks.write + + :param create_compensation_benchmark_source_request: + :type create_compensation_benchmark_source_request: CreateCompensationBenchmarkSourceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_compensation_benchmark_source_serialize( + create_compensation_benchmark_source_request=create_compensation_benchmark_source_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CreatedCompensationBenchmarkSource", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_compensation_benchmark_source_serialize( + self, + create_compensation_benchmark_source_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_compensation_benchmark_source_request is not None: + _body_params = create_compensation_benchmark_source_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/compensation/benchmarks/sources", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_compensation_benchmark( + self, + id: Annotated[StrictInt | None, Field(description="Integer ID of the compensation benchmark to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Delete Compensation Benchmark + + Permanently removes the compensation benchmark identified by `id`. The `id` is a numeric benchmark row identifier; non-numeric values are rejected by the handler. Valid values are returned by `GET /api/v1/compensation/benchmarks/details` under `benchmarkValues[].id` and by the create/update endpoints as `savedBenchmark.id`. OAuth Scopes: compensation_benchmarks.write + + :param id: Integer ID of the compensation benchmark to delete. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_compensation_benchmark_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "str", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_compensation_benchmark_with_http_info( + self, + id: Annotated[StrictInt | None, Field(description="Integer ID of the compensation benchmark to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Delete Compensation Benchmark + + Permanently removes the compensation benchmark identified by `id`. The `id` is a numeric benchmark row identifier; non-numeric values are rejected by the handler. Valid values are returned by `GET /api/v1/compensation/benchmarks/details` under `benchmarkValues[].id` and by the create/update endpoints as `savedBenchmark.id`. OAuth Scopes: compensation_benchmarks.write + + :param id: Integer ID of the compensation benchmark to delete. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_compensation_benchmark_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "str", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_compensation_benchmark_without_preload_content( + self, + id: Annotated[StrictInt | None, Field(description="Integer ID of the compensation benchmark to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Compensation Benchmark + + Permanently removes the compensation benchmark identified by `id`. The `id` is a numeric benchmark row identifier; non-numeric values are rejected by the handler. Valid values are returned by `GET /api/v1/compensation/benchmarks/details` under `benchmarkValues[].id` and by the create/update endpoints as `savedBenchmark.id`. OAuth Scopes: compensation_benchmarks.write + + :param id: Integer ID of the compensation benchmark to delete. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_compensation_benchmark_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "str", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_compensation_benchmark_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/compensation/benchmarks/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_compensation_benchmark_source( + self, + delete_compensation_benchmark_source_request: DeleteCompensationBenchmarkSourceRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DeleteCompensationBenchmarkSourceResponse: + """Delete Compensation Benchmark Source + + Deletes a benchmark source together with all benchmarks currently attached to it. The source `id` is taken from the request body. Use `GET /api/v1/compensation/benchmarks/sources` to look up the `id` of the source to delete. Returns `{ \"result\": \"success\" }` when the source is removed. OAuth Scopes: compensation_benchmarks.write + + :param delete_compensation_benchmark_source_request: + :type delete_compensation_benchmark_source_request: DeleteCompensationBenchmarkSourceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_compensation_benchmark_source_serialize( + delete_compensation_benchmark_source_request=delete_compensation_benchmark_source_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "DeleteCompensationBenchmarkSourceResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_compensation_benchmark_source_with_http_info( + self, + delete_compensation_benchmark_source_request: DeleteCompensationBenchmarkSourceRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DeleteCompensationBenchmarkSourceResponse]: + """Delete Compensation Benchmark Source + + Deletes a benchmark source together with all benchmarks currently attached to it. The source `id` is taken from the request body. Use `GET /api/v1/compensation/benchmarks/sources` to look up the `id` of the source to delete. Returns `{ \"result\": \"success\" }` when the source is removed. OAuth Scopes: compensation_benchmarks.write + + :param delete_compensation_benchmark_source_request: + :type delete_compensation_benchmark_source_request: DeleteCompensationBenchmarkSourceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_compensation_benchmark_source_serialize( + delete_compensation_benchmark_source_request=delete_compensation_benchmark_source_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "DeleteCompensationBenchmarkSourceResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_compensation_benchmark_source_without_preload_content( + self, + delete_compensation_benchmark_source_request: DeleteCompensationBenchmarkSourceRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Compensation Benchmark Source + + Deletes a benchmark source together with all benchmarks currently attached to it. The source `id` is taken from the request body. Use `GET /api/v1/compensation/benchmarks/sources` to look up the `id` of the source to delete. Returns `{ \"result\": \"success\" }` when the source is removed. OAuth Scopes: compensation_benchmarks.write + + :param delete_compensation_benchmark_source_request: + :type delete_compensation_benchmark_source_request: DeleteCompensationBenchmarkSourceRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_compensation_benchmark_source_serialize( + delete_compensation_benchmark_source_request=delete_compensation_benchmark_source_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "DeleteCompensationBenchmarkSourceResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_compensation_benchmark_source_serialize( + self, + delete_compensation_benchmark_source_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if delete_compensation_benchmark_source_request is not None: + _body_params = delete_compensation_benchmark_source_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/compensation/benchmarks/sources", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def export_compensation_benchmark_details( + self, + job_id: Annotated[ + StrictStr | None, Field(description="ID of the company job title to export benchmark details for.") + ], + location_id: Annotated[ + StrictStr | None, Field(description="Optional job location ID to restrict the export to one location.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Export Compensation Benchmark Details + + Returns a CSV export of the compensation benchmark detail view for a single job, optionally scoped to a specific location. Rows include employee-level data (name, location, annualized pay, compa-ratio, range penetration, years of experience) alongside the company's internal pay band for the job. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values. When `locationId` is omitted, the export aggregates across all locations for the job. OAuth Scopes: compensation_benchmarks + + :param job_id: ID of the company job title to export benchmark details for. (required) + :type job_id: str + :param location_id: Optional job location ID to restrict the export to one location. + :type location_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._export_compensation_benchmark_details_serialize( + job_id=job_id, + location_id=location_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "str", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def export_compensation_benchmark_details_with_http_info( + self, + job_id: Annotated[ + StrictStr | None, Field(description="ID of the company job title to export benchmark details for.") + ], + location_id: Annotated[ + StrictStr | None, Field(description="Optional job location ID to restrict the export to one location.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Export Compensation Benchmark Details + + Returns a CSV export of the compensation benchmark detail view for a single job, optionally scoped to a specific location. Rows include employee-level data (name, location, annualized pay, compa-ratio, range penetration, years of experience) alongside the company's internal pay band for the job. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values. When `locationId` is omitted, the export aggregates across all locations for the job. OAuth Scopes: compensation_benchmarks + + :param job_id: ID of the company job title to export benchmark details for. (required) + :type job_id: str + :param location_id: Optional job location ID to restrict the export to one location. + :type location_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._export_compensation_benchmark_details_serialize( + job_id=job_id, + location_id=location_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "str", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def export_compensation_benchmark_details_without_preload_content( + self, + job_id: Annotated[ + StrictStr | None, Field(description="ID of the company job title to export benchmark details for.") + ], + location_id: Annotated[ + StrictStr | None, Field(description="Optional job location ID to restrict the export to one location.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Export Compensation Benchmark Details + + Returns a CSV export of the compensation benchmark detail view for a single job, optionally scoped to a specific location. Rows include employee-level data (name, location, annualized pay, compa-ratio, range penetration, years of experience) alongside the company's internal pay band for the job. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values. When `locationId` is omitted, the export aggregates across all locations for the job. OAuth Scopes: compensation_benchmarks + + :param job_id: ID of the company job title to export benchmark details for. (required) + :type job_id: str + :param location_id: Optional job location ID to restrict the export to one location. + :type location_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._export_compensation_benchmark_details_serialize( + job_id=job_id, + location_id=location_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "str", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _export_compensation_benchmark_details_serialize( + self, + job_id, + location_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if job_id is not None: + _query_params.append(("jobId", job_id)) + + if location_id is not None: + _query_params.append(("locationId", location_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["text/csv", "application/problem+json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/benchmarks/details/export", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_compensation_benchmark_details( + self, + job_id: Annotated[ + StrictStr | None, Field(description="ID of the company job title to fetch benchmark details for.") + ], + location_id: Annotated[ + StrictStr | None, + Field( + description="Optional job location ID. When omitted, results aggregate across all locations for the job." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CompensationBenchmarkDetails: + """Get Compensation Benchmark Details + + Returns detailed benchmark data for a single company job title, optionally scoped to a specific location. The response includes the company pay range derived from current employees, the internal pay band configured for the job (if any), Mercer benchmark details when a Mercer benchmark is linked, every saved benchmark for the job/location (empty when none exist), and per-employee salary and compensation stats. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values. OAuth Scopes: compensation_benchmarks + + :param job_id: ID of the company job title to fetch benchmark details for. (required) + :type job_id: str + :param location_id: Optional job location ID. When omitted, results aggregate across all locations for the job. + :type location_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_compensation_benchmark_details_serialize( + job_id=job_id, + location_id=location_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationBenchmarkDetails", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_compensation_benchmark_details_with_http_info( + self, + job_id: Annotated[ + StrictStr | None, Field(description="ID of the company job title to fetch benchmark details for.") + ], + location_id: Annotated[ + StrictStr | None, + Field( + description="Optional job location ID. When omitted, results aggregate across all locations for the job." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CompensationBenchmarkDetails]: + """Get Compensation Benchmark Details + + Returns detailed benchmark data for a single company job title, optionally scoped to a specific location. The response includes the company pay range derived from current employees, the internal pay band configured for the job (if any), Mercer benchmark details when a Mercer benchmark is linked, every saved benchmark for the job/location (empty when none exist), and per-employee salary and compensation stats. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values. OAuth Scopes: compensation_benchmarks + + :param job_id: ID of the company job title to fetch benchmark details for. (required) + :type job_id: str + :param location_id: Optional job location ID. When omitted, results aggregate across all locations for the job. + :type location_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_compensation_benchmark_details_serialize( + job_id=job_id, + location_id=location_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationBenchmarkDetails", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_compensation_benchmark_details_without_preload_content( + self, + job_id: Annotated[ + StrictStr | None, Field(description="ID of the company job title to fetch benchmark details for.") + ], + location_id: Annotated[ + StrictStr | None, + Field( + description="Optional job location ID. When omitted, results aggregate across all locations for the job." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Compensation Benchmark Details + + Returns detailed benchmark data for a single company job title, optionally scoped to a specific location. The response includes the company pay range derived from current employees, the internal pay band configured for the job (if any), Mercer benchmark details when a Mercer benchmark is linked, every saved benchmark for the job/location (empty when none exist), and per-employee salary and compensation stats. Use `GET /api/v1/compensation/benchmarks` to find valid `jobId` and `locationId` values. OAuth Scopes: compensation_benchmarks + + :param job_id: ID of the company job title to fetch benchmark details for. (required) + :type job_id: str + :param location_id: Optional job location ID. When omitted, results aggregate across all locations for the job. + :type location_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_compensation_benchmark_details_serialize( + job_id=job_id, + location_id=location_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationBenchmarkDetails", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_compensation_benchmark_details_serialize( + self, + job_id, + location_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if job_id is not None: + _query_params.append(("jobId", job_id)) + + if location_id is not None: + _query_params.append(("locationId", location_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/benchmarks/details", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def import_compensation_benchmarks( + self, + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], Field(description="CSV file to import.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ImportCompensationBenchmarksResponse: + """Import Compensation Benchmarks From CSV + + Parses a CSV of compensation benchmarks uploaded as multipart/form-data and returns the parsed rows together with a suggested column-to-field mapping. The response is a preview payload — callers must follow up with the publish step in the UI/API to persist benchmarks. Returns `400` when no `file` part is provided and `422` when the CSV is malformed. OAuth Scopes: compensation_benchmarks.write + + :param file: CSV file to import. (required) + :type file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._import_compensation_benchmarks_serialize( + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ImportCompensationBenchmarksResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def import_compensation_benchmarks_with_http_info( + self, + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], Field(description="CSV file to import.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ImportCompensationBenchmarksResponse]: + """Import Compensation Benchmarks From CSV + + Parses a CSV of compensation benchmarks uploaded as multipart/form-data and returns the parsed rows together with a suggested column-to-field mapping. The response is a preview payload — callers must follow up with the publish step in the UI/API to persist benchmarks. Returns `400` when no `file` part is provided and `422` when the CSV is malformed. OAuth Scopes: compensation_benchmarks.write + + :param file: CSV file to import. (required) + :type file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._import_compensation_benchmarks_serialize( + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ImportCompensationBenchmarksResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def import_compensation_benchmarks_without_preload_content( + self, + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], Field(description="CSV file to import.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Import Compensation Benchmarks From CSV + + Parses a CSV of compensation benchmarks uploaded as multipart/form-data and returns the parsed rows together with a suggested column-to-field mapping. The response is a preview payload — callers must follow up with the publish step in the UI/API to persist benchmarks. Returns `400` when no `file` part is provided and `422` when the CSV is malformed. OAuth Scopes: compensation_benchmarks.write + + :param file: CSV file to import. (required) + :type file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._import_compensation_benchmarks_serialize( + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ImportCompensationBenchmarksResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _import_compensation_benchmarks_serialize( + self, + file, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if file is not None: + _files["file"] = file + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/compensation/benchmarks/import", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_compensation_benchmark_sources( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> list[CompensationBenchmarkSource]: + """List Compensation Benchmark Sources + + Returns every enabled benchmark source configured for the company. Each source identifies where a benchmark value came from (for example, a specific survey provider) and includes a display color and the count of benchmarks currently attached to that source. Use the returned `id` as the `sourceId` input when creating or updating a benchmark. OAuth Scopes: compensation_benchmarks + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_compensation_benchmark_sources_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[CompensationBenchmarkSource]", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_compensation_benchmark_sources_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[list[CompensationBenchmarkSource]]: + """List Compensation Benchmark Sources + + Returns every enabled benchmark source configured for the company. Each source identifies where a benchmark value came from (for example, a specific survey provider) and includes a display color and the count of benchmarks currently attached to that source. Use the returned `id` as the `sourceId` input when creating or updating a benchmark. OAuth Scopes: compensation_benchmarks + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_compensation_benchmark_sources_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[CompensationBenchmarkSource]", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_compensation_benchmark_sources_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Compensation Benchmark Sources + + Returns every enabled benchmark source configured for the company. Each source identifies where a benchmark value came from (for example, a specific survey provider) and includes a display color and the count of benchmarks currently attached to that source. Use the returned `id` as the `sourceId` input when creating or updating a benchmark. OAuth Scopes: compensation_benchmarks + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_compensation_benchmark_sources_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[CompensationBenchmarkSource]", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_compensation_benchmark_sources_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/benchmarks/sources", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_compensation_benchmarks( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CompensationBenchmarksList: + """List Compensation Benchmarks + + Returns every job/location pair the company tracks for compensation benchmarking. Each entry includes job and location identifiers, the benchmarks attached to that pair, the employees currently assigned to that job and location, and the company's configured internal pay band if one exists. Use the returned `jobDetails.id` and `locationDetails.id` values as the `jobId` and `locationId` inputs for `GET /api/v1/compensation/benchmarks/details`. Top-level `dismiss*Banner` fields reflect UI banner state and are not part of the benchmark data contract. OAuth Scopes: compensation_benchmarks + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_compensation_benchmarks_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationBenchmarksList", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_compensation_benchmarks_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CompensationBenchmarksList]: + """List Compensation Benchmarks + + Returns every job/location pair the company tracks for compensation benchmarking. Each entry includes job and location identifiers, the benchmarks attached to that pair, the employees currently assigned to that job and location, and the company's configured internal pay band if one exists. Use the returned `jobDetails.id` and `locationDetails.id` values as the `jobId` and `locationId` inputs for `GET /api/v1/compensation/benchmarks/details`. Top-level `dismiss*Banner` fields reflect UI banner state and are not part of the benchmark data contract. OAuth Scopes: compensation_benchmarks + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_compensation_benchmarks_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationBenchmarksList", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_compensation_benchmarks_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Compensation Benchmarks + + Returns every job/location pair the company tracks for compensation benchmarking. Each entry includes job and location identifiers, the benchmarks attached to that pair, the employees currently assigned to that job and location, and the company's configured internal pay band if one exists. Use the returned `jobDetails.id` and `locationDetails.id` values as the `jobId` and `locationId` inputs for `GET /api/v1/compensation/benchmarks/details`. Top-level `dismiss*Banner` fields reflect UI banner state and are not part of the benchmark data contract. OAuth Scopes: compensation_benchmarks + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_compensation_benchmarks_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationBenchmarksList", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_compensation_benchmarks_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/benchmarks", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_compensation_benchmark( + self, + update_compensation_benchmark_request: UpdateCompensationBenchmarkRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UpdatedCompensationBenchmark: + """Update Compensation Benchmark + + Updates an existing compensation benchmark identified by `id`. The `id` of an existing benchmark can be obtained from `GET /api/v1/compensation/benchmarks/details`. Request fields that are omitted or `null` are cleared on the stored benchmark; callers should send the full benchmark payload to preserve values. On success, returns the saved benchmark row wrapped in `savedBenchmark` together with a status `message`. OAuth Scopes: compensation_benchmarks.write + + :param update_compensation_benchmark_request: + :type update_compensation_benchmark_request: UpdateCompensationBenchmarkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_compensation_benchmark_serialize( + update_compensation_benchmark_request=update_compensation_benchmark_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UpdatedCompensationBenchmark", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_compensation_benchmark_with_http_info( + self, + update_compensation_benchmark_request: UpdateCompensationBenchmarkRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UpdatedCompensationBenchmark]: + """Update Compensation Benchmark + + Updates an existing compensation benchmark identified by `id`. The `id` of an existing benchmark can be obtained from `GET /api/v1/compensation/benchmarks/details`. Request fields that are omitted or `null` are cleared on the stored benchmark; callers should send the full benchmark payload to preserve values. On success, returns the saved benchmark row wrapped in `savedBenchmark` together with a status `message`. OAuth Scopes: compensation_benchmarks.write + + :param update_compensation_benchmark_request: + :type update_compensation_benchmark_request: UpdateCompensationBenchmarkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_compensation_benchmark_serialize( + update_compensation_benchmark_request=update_compensation_benchmark_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UpdatedCompensationBenchmark", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_compensation_benchmark_without_preload_content( + self, + update_compensation_benchmark_request: UpdateCompensationBenchmarkRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Compensation Benchmark + + Updates an existing compensation benchmark identified by `id`. The `id` of an existing benchmark can be obtained from `GET /api/v1/compensation/benchmarks/details`. Request fields that are omitted or `null` are cleared on the stored benchmark; callers should send the full benchmark payload to preserve values. On success, returns the saved benchmark row wrapped in `savedBenchmark` together with a status `message`. OAuth Scopes: compensation_benchmarks.write + + :param update_compensation_benchmark_request: + :type update_compensation_benchmark_request: UpdateCompensationBenchmarkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_compensation_benchmark_serialize( + update_compensation_benchmark_request=update_compensation_benchmark_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UpdatedCompensationBenchmark", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_compensation_benchmark_serialize( + self, + update_compensation_benchmark_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_compensation_benchmark_request is not None: + _body_params = update_compensation_benchmark_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/compensation/benchmarks", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_compensation_benchmark_sources( + self, + update_compensation_benchmark_sources_request: UpdateCompensationBenchmarkSourcesRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UpdateCompensationBenchmarkSourcesResponse: + """Update Compensation Benchmark Sources + + Updates the name and sort order of one or more existing benchmark sources in a single call. Every item in `benchmarkSources` must include a non-empty `id` and `name`; any item with the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Use `GET /api/v1/compensation/benchmarks/sources` to obtain the current `id` values. Returns `{ \"result\": \"success\" }` when all updates are applied. OAuth Scopes: compensation_benchmarks.write + + :param update_compensation_benchmark_sources_request: + :type update_compensation_benchmark_sources_request: UpdateCompensationBenchmarkSourcesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_compensation_benchmark_sources_serialize( + update_compensation_benchmark_sources_request=update_compensation_benchmark_sources_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UpdateCompensationBenchmarkSourcesResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_compensation_benchmark_sources_with_http_info( + self, + update_compensation_benchmark_sources_request: UpdateCompensationBenchmarkSourcesRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UpdateCompensationBenchmarkSourcesResponse]: + """Update Compensation Benchmark Sources + + Updates the name and sort order of one or more existing benchmark sources in a single call. Every item in `benchmarkSources` must include a non-empty `id` and `name`; any item with the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Use `GET /api/v1/compensation/benchmarks/sources` to obtain the current `id` values. Returns `{ \"result\": \"success\" }` when all updates are applied. OAuth Scopes: compensation_benchmarks.write + + :param update_compensation_benchmark_sources_request: + :type update_compensation_benchmark_sources_request: UpdateCompensationBenchmarkSourcesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_compensation_benchmark_sources_serialize( + update_compensation_benchmark_sources_request=update_compensation_benchmark_sources_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UpdateCompensationBenchmarkSourcesResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_compensation_benchmark_sources_without_preload_content( + self, + update_compensation_benchmark_sources_request: UpdateCompensationBenchmarkSourcesRequest | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Compensation Benchmark Sources + + Updates the name and sort order of one or more existing benchmark sources in a single call. Every item in `benchmarkSources` must include a non-empty `id` and `name`; any item with the reserved name `mercer` (case-insensitive) is rejected because Mercer sources are managed separately. Use `GET /api/v1/compensation/benchmarks/sources` to obtain the current `id` values. Returns `{ \"result\": \"success\" }` when all updates are applied. OAuth Scopes: compensation_benchmarks.write + + :param update_compensation_benchmark_sources_request: + :type update_compensation_benchmark_sources_request: UpdateCompensationBenchmarkSourcesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_compensation_benchmark_sources_serialize( + update_compensation_benchmark_sources_request=update_compensation_benchmark_sources_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UpdateCompensationBenchmarkSourcesResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_compensation_benchmark_sources_serialize( + self, + update_compensation_benchmark_sources_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_compensation_benchmark_sources_request is not None: + _body_params = update_compensation_benchmark_sources_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/compensation/benchmarks/sources", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/compensation_planning_api.py b/bamboohr_sdk/api/compensation_planning_api.py new file mode 100644 index 0000000..22d0ec3 --- /dev/null +++ b/bamboohr_sdk/api/compensation_planning_api.py @@ -0,0 +1,6877 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.a05b6d5f564f805d688ff2c1e37c3990_request import A05b6d5f564f805d688ff2c1e37c3990Request +from bamboohr_sdk.models.add_cycle_admins_response import AddCycleAdminsResponse +from bamboohr_sdk.models.budget_breakdown_import_response import BudgetBreakdownImportResponse +from bamboohr_sdk.models.budget_guidelines_view import BudgetGuidelinesView +from bamboohr_sdk.models.c7c32ed5278ac67e2e518bf7484a75dc_request import C7c32ed5278ac67e2e518bf7484a75dcRequest +from bamboohr_sdk.models.c79f9c5950f983e59d2626faa30c00a1_request import C79f9c5950f983e59d2626faa30c00a1Request +from bamboohr_sdk.models.cf87b8e09a001b6fb81dfce6c20ab9e3_request import Cf87b8e09a001b6fb81dfce6c20ab9e3Request +from bamboohr_sdk.models.compensation_planning_cycle_admins_response import CompensationPlanningCycleAdminsResponse +from bamboohr_sdk.models.compensation_planning_cycle_complete_response import CompensationPlanningCycleCompleteResponse +from bamboohr_sdk.models.dacd313af2106213fc4696175941ce65_request import Dacd313af2106213fc4696175941ce65Request +from bamboohr_sdk.models.details_and_currency_request_data_object import DetailsAndCurrencyRequestDataObject +from bamboohr_sdk.models.f3883a522dadbe9e11b34f8b656e3adb_request import F3883a522dadbe9e11b34f8b656e3adbRequest +from bamboohr_sdk.models.model1d1fc0f164cb51973a0206b8e2fb2d2d_request import ( + Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest, +) +from bamboohr_sdk.models.model1d64402ee192568adbd5e3179a91e6e2_request_inner import ( + Model1d64402ee192568adbd5e3179a91e6e2RequestInner, +) +from bamboohr_sdk.models.model89a5068111ec499135c7d6e9a53d5a30_request import ( + Model89a5068111ec499135c7d6e9a53d5a30Request, +) +from bamboohr_sdk.models.model3958585c861325ea7a2cd30a8c74f042_request import ( + Model3958585c861325ea7a2cd30a8c74f042Request, +) +from bamboohr_sdk.models.remove_cycle_admin_self_response import RemoveCycleAdminSelfResponse +from bamboohr_sdk.models.save_change_comm_template_response import SaveChangeCommTemplateResponse +from bamboohr_sdk.models.send_recommendations_response import SendRecommendationsResponse +from bamboohr_sdk.rest import RESTResponseType + + +class CompensationPlanningApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def a05b6d5f564f805d688ff2c1e37c3990( + self, + id: StrictInt, + a05b6d5f564f805d688ff2c1e37c3990_request: A05b6d5f564f805d688ff2c1e37c3990Request, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SendRecommendationsResponse: + """Send recommendations to next stage + + Send recommendations to the next approval stage for a specific approval flow template. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param a05b6d5f564f805d688ff2c1e37c3990_request: (required) + :type a05b6d5f564f805d688ff2c1e37c3990_request: A05b6d5f564f805d688ff2c1e37c3990Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._a05b6d5f564f805d688ff2c1e37c3990_serialize( + id=id, + a05b6d5f564f805d688ff2c1e37c3990_request=a05b6d5f564f805d688ff2c1e37c3990_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SendRecommendationsResponse", + "400": None, + "403": None, + "404": None, + "409": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def a05b6d5f564f805d688ff2c1e37c3990_with_http_info( + self, + id: StrictInt, + a05b6d5f564f805d688ff2c1e37c3990_request: A05b6d5f564f805d688ff2c1e37c3990Request, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SendRecommendationsResponse]: + """Send recommendations to next stage + + Send recommendations to the next approval stage for a specific approval flow template. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param a05b6d5f564f805d688ff2c1e37c3990_request: (required) + :type a05b6d5f564f805d688ff2c1e37c3990_request: A05b6d5f564f805d688ff2c1e37c3990Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._a05b6d5f564f805d688ff2c1e37c3990_serialize( + id=id, + a05b6d5f564f805d688ff2c1e37c3990_request=a05b6d5f564f805d688ff2c1e37c3990_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SendRecommendationsResponse", + "400": None, + "403": None, + "404": None, + "409": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def a05b6d5f564f805d688ff2c1e37c3990_without_preload_content( + self, + id: StrictInt, + a05b6d5f564f805d688ff2c1e37c3990_request: A05b6d5f564f805d688ff2c1e37c3990Request, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send recommendations to next stage + + Send recommendations to the next approval stage for a specific approval flow template. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param a05b6d5f564f805d688ff2c1e37c3990_request: (required) + :type a05b6d5f564f805d688ff2c1e37c3990_request: A05b6d5f564f805d688ff2c1e37c3990Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._a05b6d5f564f805d688ff2c1e37c3990_serialize( + id=id, + a05b6d5f564f805d688ff2c1e37c3990_request=a05b6d5f564f805d688ff2c1e37c3990_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SendRecommendationsResponse", + "400": None, + "403": None, + "404": None, + "409": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _a05b6d5f564f805d688ff2c1e37c3990_serialize( + self, + id, + a05b6d5f564f805d688ff2c1e37c3990_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if a05b6d5f564f805d688ff2c1e37c3990_request is not None: + _body_params = a05b6d5f564f805d688ff2c1e37c3990_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/compensation/planning_cycles/{id}/recommendations/send", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def a6b8da1348a3151fe95adc03aaf64447( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """List employees in compensation planning cycle + + List employees in the compensation planning cycle (picker data: company roster and membership). OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._a6b8da1348a3151fe95adc03aaf64447_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def a6b8da1348a3151fe95adc03aaf64447_with_http_info( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """List employees in compensation planning cycle + + List employees in the compensation planning cycle (picker data: company roster and membership). OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._a6b8da1348a3151fe95adc03aaf64447_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def a6b8da1348a3151fe95adc03aaf64447_without_preload_content( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List employees in compensation planning cycle + + List employees in the compensation planning cycle (picker data: company roster and membership). OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._a6b8da1348a3151fe95adc03aaf64447_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _a6b8da1348a3151fe95adc03aaf64447_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/planning_cycles/{id}/employees", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def b1e467e0eef72350eec61fcfeaf4e19d( + self, + id: StrictInt, + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee to remove from the approval flow."), + ], + group_by: Annotated[ + StrictStr | None, Field(description="Optional grouping for returned flows (e.g. department)") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """Remove from approval flow + + Remove an employee from all approval chains for a specific cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param employee_id: The internal employee ID of the employee to remove from the approval flow. (required) + :type employee_id: str + :param group_by: Optional grouping for returned flows (e.g. department) + :type group_by: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._b1e467e0eef72350eec61fcfeaf4e19d_serialize( + id=id, + employee_id=employee_id, + group_by=group_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def b1e467e0eef72350eec61fcfeaf4e19d_with_http_info( + self, + id: StrictInt, + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee to remove from the approval flow."), + ], + group_by: Annotated[ + StrictStr | None, Field(description="Optional grouping for returned flows (e.g. department)") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """Remove from approval flow + + Remove an employee from all approval chains for a specific cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param employee_id: The internal employee ID of the employee to remove from the approval flow. (required) + :type employee_id: str + :param group_by: Optional grouping for returned flows (e.g. department) + :type group_by: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._b1e467e0eef72350eec61fcfeaf4e19d_serialize( + id=id, + employee_id=employee_id, + group_by=group_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def b1e467e0eef72350eec61fcfeaf4e19d_without_preload_content( + self, + id: StrictInt, + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee to remove from the approval flow."), + ], + group_by: Annotated[ + StrictStr | None, Field(description="Optional grouping for returned flows (e.g. department)") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove from approval flow + + Remove an employee from all approval chains for a specific cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param employee_id: The internal employee ID of the employee to remove from the approval flow. (required) + :type employee_id: str + :param group_by: Optional grouping for returned flows (e.g. department) + :type group_by: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._b1e467e0eef72350eec61fcfeaf4e19d_serialize( + id=id, + employee_id=employee_id, + group_by=group_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _b1e467e0eef72350eec61fcfeaf4e19d_serialize( + self, + id, + employee_id, + group_by, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + if employee_id is not None: + _path_params["employeeId"] = employee_id + # process the query parameters + if group_by is not None: + _query_params.append(("groupBy", group_by)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/compensation/planning_cycles/{id}/approvals/employee/{employeeId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def b3c51254de6918637a971fe4af382a53( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CompensationPlanningCycleAdminsResponse: + """List compensation planning cycle admins + + List compensation planning cycle admins. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._b3c51254de6918637a971fe4af382a53_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationPlanningCycleAdminsResponse", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def b3c51254de6918637a971fe4af382a53_with_http_info( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CompensationPlanningCycleAdminsResponse]: + """List compensation planning cycle admins + + List compensation planning cycle admins. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._b3c51254de6918637a971fe4af382a53_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationPlanningCycleAdminsResponse", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def b3c51254de6918637a971fe4af382a53_without_preload_content( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List compensation planning cycle admins + + List compensation planning cycle admins. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._b3c51254de6918637a971fe4af382a53_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationPlanningCycleAdminsResponse", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _b3c51254de6918637a971fe4af382a53_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/planning_cycles/{id}/admins", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def b65f246186b41a9783a9397c11c703b4( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """List compensation planning cycles + + List all compensation planning cycles for the company, including status and employee counts. OAuth Scopes: planning_cycles + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._b65f246186b41a9783a9397c11c703b4_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def b65f246186b41a9783a9397c11c703b4_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """List compensation planning cycles + + List all compensation planning cycles for the company, including status and employee counts. OAuth Scopes: planning_cycles + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._b65f246186b41a9783a9397c11c703b4_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def b65f246186b41a9783a9397c11c703b4_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List compensation planning cycles + + List all compensation planning cycles for the company, including status and employee counts. OAuth Scopes: planning_cycles + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._b65f246186b41a9783a9397c11c703b4_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _b65f246186b41a9783a9397c11c703b4_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/planning_cycles", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def c79f9c5950f983e59d2626faa30c00a1( + self, + id: StrictInt, + c79f9c5950f983e59d2626faa30c00a1_request: C79f9c5950f983e59d2626faa30c00a1Request, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SaveChangeCommTemplateResponse: + """Save change comm template + + Save the change communication email template for a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param c79f9c5950f983e59d2626faa30c00a1_request: (required) + :type c79f9c5950f983e59d2626faa30c00a1_request: C79f9c5950f983e59d2626faa30c00a1Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._c79f9c5950f983e59d2626faa30c00a1_serialize( + id=id, + c79f9c5950f983e59d2626faa30c00a1_request=c79f9c5950f983e59d2626faa30c00a1_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SaveChangeCommTemplateResponse", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def c79f9c5950f983e59d2626faa30c00a1_with_http_info( + self, + id: StrictInt, + c79f9c5950f983e59d2626faa30c00a1_request: C79f9c5950f983e59d2626faa30c00a1Request, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SaveChangeCommTemplateResponse]: + """Save change comm template + + Save the change communication email template for a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param c79f9c5950f983e59d2626faa30c00a1_request: (required) + :type c79f9c5950f983e59d2626faa30c00a1_request: C79f9c5950f983e59d2626faa30c00a1Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._c79f9c5950f983e59d2626faa30c00a1_serialize( + id=id, + c79f9c5950f983e59d2626faa30c00a1_request=c79f9c5950f983e59d2626faa30c00a1_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SaveChangeCommTemplateResponse", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def c79f9c5950f983e59d2626faa30c00a1_without_preload_content( + self, + id: StrictInt, + c79f9c5950f983e59d2626faa30c00a1_request: C79f9c5950f983e59d2626faa30c00a1Request, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Save change comm template + + Save the change communication email template for a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param c79f9c5950f983e59d2626faa30c00a1_request: (required) + :type c79f9c5950f983e59d2626faa30c00a1_request: C79f9c5950f983e59d2626faa30c00a1Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._c79f9c5950f983e59d2626faa30c00a1_serialize( + id=id, + c79f9c5950f983e59d2626faa30c00a1_request=c79f9c5950f983e59d2626faa30c00a1_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SaveChangeCommTemplateResponse", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _c79f9c5950f983e59d2626faa30c00a1_serialize( + self, + id, + c79f9c5950f983e59d2626faa30c00a1_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if c79f9c5950f983e59d2626faa30c00a1_request is not None: + _body_params = c79f9c5950f983e59d2626faa30c00a1_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/compensation/planning_cycles/{id}/change_comm/template", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def c7c32ed5278ac67e2e518bf7484a75dc( + self, + id: StrictInt, + c7c32ed5278ac67e2e518bf7484a75dc_request: C7c32ed5278ac67e2e518bf7484a75dcRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AddCycleAdminsResponse: + """Add cycle admins + + Add one or more cycle admins by internal employee IDs. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param c7c32ed5278ac67e2e518bf7484a75dc_request: (required) + :type c7c32ed5278ac67e2e518bf7484a75dc_request: C7c32ed5278ac67e2e518bf7484a75dcRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._c7c32ed5278ac67e2e518bf7484a75dc_serialize( + id=id, + c7c32ed5278ac67e2e518bf7484a75dc_request=c7c32ed5278ac67e2e518bf7484a75dc_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "AddCycleAdminsResponse", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def c7c32ed5278ac67e2e518bf7484a75dc_with_http_info( + self, + id: StrictInt, + c7c32ed5278ac67e2e518bf7484a75dc_request: C7c32ed5278ac67e2e518bf7484a75dcRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AddCycleAdminsResponse]: + """Add cycle admins + + Add one or more cycle admins by internal employee IDs. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param c7c32ed5278ac67e2e518bf7484a75dc_request: (required) + :type c7c32ed5278ac67e2e518bf7484a75dc_request: C7c32ed5278ac67e2e518bf7484a75dcRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._c7c32ed5278ac67e2e518bf7484a75dc_serialize( + id=id, + c7c32ed5278ac67e2e518bf7484a75dc_request=c7c32ed5278ac67e2e518bf7484a75dc_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "AddCycleAdminsResponse", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def c7c32ed5278ac67e2e518bf7484a75dc_without_preload_content( + self, + id: StrictInt, + c7c32ed5278ac67e2e518bf7484a75dc_request: C7c32ed5278ac67e2e518bf7484a75dcRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add cycle admins + + Add one or more cycle admins by internal employee IDs. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param c7c32ed5278ac67e2e518bf7484a75dc_request: (required) + :type c7c32ed5278ac67e2e518bf7484a75dc_request: C7c32ed5278ac67e2e518bf7484a75dcRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._c7c32ed5278ac67e2e518bf7484a75dc_serialize( + id=id, + c7c32ed5278ac67e2e518bf7484a75dc_request=c7c32ed5278ac67e2e518bf7484a75dc_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "AddCycleAdminsResponse", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _c7c32ed5278ac67e2e518bf7484a75dc_serialize( + self, + id, + c7c32ed5278ac67e2e518bf7484a75dc_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if c7c32ed5278ac67e2e518bf7484a75dc_request is not None: + _body_params = c7c32ed5278ac67e2e518bf7484a75dc_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/compensation/planning_cycles/{id}/admins", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_100b0cf8c5207b35697ff10370fd5fe1( + self, + id: StrictInt, + details_and_currency_request_data_object: Annotated[ + DetailsAndCurrencyRequestDataObject, Field(description="Cycle details and currency settings to update") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """Update compensation planning cycle + + Update compensation planning cycle details and currency settings. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param details_and_currency_request_data_object: Cycle details and currency settings to update (required) + :type details_and_currency_request_data_object: DetailsAndCurrencyRequestDataObject + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_100b0cf8c5207b35697ff10370fd5fe1_serialize( + id=id, + details_and_currency_request_data_object=details_and_currency_request_data_object, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_100b0cf8c5207b35697ff10370fd5fe1_with_http_info( + self, + id: StrictInt, + details_and_currency_request_data_object: Annotated[ + DetailsAndCurrencyRequestDataObject, Field(description="Cycle details and currency settings to update") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """Update compensation planning cycle + + Update compensation planning cycle details and currency settings. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param details_and_currency_request_data_object: Cycle details and currency settings to update (required) + :type details_and_currency_request_data_object: DetailsAndCurrencyRequestDataObject + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_100b0cf8c5207b35697ff10370fd5fe1_serialize( + id=id, + details_and_currency_request_data_object=details_and_currency_request_data_object, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_100b0cf8c5207b35697ff10370fd5fe1_without_preload_content( + self, + id: StrictInt, + details_and_currency_request_data_object: Annotated[ + DetailsAndCurrencyRequestDataObject, Field(description="Cycle details and currency settings to update") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update compensation planning cycle + + Update compensation planning cycle details and currency settings. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param details_and_currency_request_data_object: Cycle details and currency settings to update (required) + :type details_and_currency_request_data_object: DetailsAndCurrencyRequestDataObject + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_100b0cf8c5207b35697ff10370fd5fe1_serialize( + id=id, + details_and_currency_request_data_object=details_and_currency_request_data_object, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_100b0cf8c5207b35697ff10370fd5fe1_serialize( + self, + id, + details_and_currency_request_data_object, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if details_and_currency_request_data_object is not None: + _body_params = details_and_currency_request_data_object + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/compensation/planning_cycles/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_1d1fc0f164cb51973a0206b8e2fb2d2d( + self, + id: StrictInt, + model1d1fc0f164cb51973a0206b8e2fb2d2d_request: Annotated[ + Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest, Field(description="Budget breakdown import data") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BudgetBreakdownImportResponse: + """Import budget breakdown + + Import budget breakdown from structured data and apply to allocations. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param model1d1fc0f164cb51973a0206b8e2fb2d2d_request: Budget breakdown import data (required) + :type model1d1fc0f164cb51973a0206b8e2fb2d2d_request: Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_1d1fc0f164cb51973a0206b8e2fb2d2d_serialize( + id=id, + model1d1fc0f164cb51973a0206b8e2fb2d2d_request=model1d1fc0f164cb51973a0206b8e2fb2d2d_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "BudgetBreakdownImportResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_1d1fc0f164cb51973a0206b8e2fb2d2d_with_http_info( + self, + id: StrictInt, + model1d1fc0f164cb51973a0206b8e2fb2d2d_request: Annotated[ + Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest, Field(description="Budget breakdown import data") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BudgetBreakdownImportResponse]: + """Import budget breakdown + + Import budget breakdown from structured data and apply to allocations. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param model1d1fc0f164cb51973a0206b8e2fb2d2d_request: Budget breakdown import data (required) + :type model1d1fc0f164cb51973a0206b8e2fb2d2d_request: Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_1d1fc0f164cb51973a0206b8e2fb2d2d_serialize( + id=id, + model1d1fc0f164cb51973a0206b8e2fb2d2d_request=model1d1fc0f164cb51973a0206b8e2fb2d2d_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "BudgetBreakdownImportResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_1d1fc0f164cb51973a0206b8e2fb2d2d_without_preload_content( + self, + id: StrictInt, + model1d1fc0f164cb51973a0206b8e2fb2d2d_request: Annotated[ + Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest, Field(description="Budget breakdown import data") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Import budget breakdown + + Import budget breakdown from structured data and apply to allocations. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param model1d1fc0f164cb51973a0206b8e2fb2d2d_request: Budget breakdown import data (required) + :type model1d1fc0f164cb51973a0206b8e2fb2d2d_request: Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_1d1fc0f164cb51973a0206b8e2fb2d2d_serialize( + id=id, + model1d1fc0f164cb51973a0206b8e2fb2d2d_request=model1d1fc0f164cb51973a0206b8e2fb2d2d_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "BudgetBreakdownImportResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_1d1fc0f164cb51973a0206b8e2fb2d2d_serialize( + self, + id, + model1d1fc0f164cb51973a0206b8e2fb2d2d_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if model1d1fc0f164cb51973a0206b8e2fb2d2d_request is not None: + _body_params = model1d1fc0f164cb51973a0206b8e2fb2d2d_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/compensation/planning_cycles/{id}/budgets/import", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_1d64402ee192568adbd5e3179a91e6e2( + self, + id: StrictInt, + model1d64402ee192568adbd5e3179a91e6e2_request_inner: Annotated[ + list[Model1d64402ee192568adbd5e3179a91e6e2RequestInner], Field(description="Budget breakdown data") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Save budget breakdown + + Save budget breakdown for a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param model1d64402ee192568adbd5e3179a91e6e2_request_inner: Budget breakdown data (required) + :type model1d64402ee192568adbd5e3179a91e6e2_request_inner: List[Model1d64402ee192568adbd5e3179a91e6e2RequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_1d64402ee192568adbd5e3179a91e6e2_serialize( + id=id, + model1d64402ee192568adbd5e3179a91e6e2_request_inner=model1d64402ee192568adbd5e3179a91e6e2_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_1d64402ee192568adbd5e3179a91e6e2_with_http_info( + self, + id: StrictInt, + model1d64402ee192568adbd5e3179a91e6e2_request_inner: Annotated[ + list[Model1d64402ee192568adbd5e3179a91e6e2RequestInner], Field(description="Budget breakdown data") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Save budget breakdown + + Save budget breakdown for a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param model1d64402ee192568adbd5e3179a91e6e2_request_inner: Budget breakdown data (required) + :type model1d64402ee192568adbd5e3179a91e6e2_request_inner: List[Model1d64402ee192568adbd5e3179a91e6e2RequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_1d64402ee192568adbd5e3179a91e6e2_serialize( + id=id, + model1d64402ee192568adbd5e3179a91e6e2_request_inner=model1d64402ee192568adbd5e3179a91e6e2_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_1d64402ee192568adbd5e3179a91e6e2_without_preload_content( + self, + id: StrictInt, + model1d64402ee192568adbd5e3179a91e6e2_request_inner: Annotated[ + list[Model1d64402ee192568adbd5e3179a91e6e2RequestInner], Field(description="Budget breakdown data") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Save budget breakdown + + Save budget breakdown for a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param model1d64402ee192568adbd5e3179a91e6e2_request_inner: Budget breakdown data (required) + :type model1d64402ee192568adbd5e3179a91e6e2_request_inner: List[Model1d64402ee192568adbd5e3179a91e6e2RequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_1d64402ee192568adbd5e3179a91e6e2_serialize( + id=id, + model1d64402ee192568adbd5e3179a91e6e2_request_inner=model1d64402ee192568adbd5e3179a91e6e2_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_1d64402ee192568adbd5e3179a91e6e2_serialize( + self, + id, + model1d64402ee192568adbd5e3179a91e6e2_request_inner, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = { + "Model1d64402ee192568adbd5e3179a91e6e2RequestInner": "", + } + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if model1d64402ee192568adbd5e3179a91e6e2_request_inner is not None: + _body_params = model1d64402ee192568adbd5e3179a91e6e2_request_inner + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/compensation/planning_cycles/{id}/budgets/breakdown", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_22ad75be25455279e2987c80851af5fc( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete compensation planning cycle + + Delete a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_22ad75be25455279e2987c80851af5fc_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_22ad75be25455279e2987c80851af5fc_with_http_info( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete compensation planning cycle + + Delete a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_22ad75be25455279e2987c80851af5fc_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_22ad75be25455279e2987c80851af5fc_without_preload_content( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete compensation planning cycle + + Delete a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_22ad75be25455279e2987c80851af5fc_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_22ad75be25455279e2987c80851af5fc_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/compensation/planning_cycles/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_329acecaa6df729733d0752aa9f6b204( + self, + id: StrictInt, + type: Annotated[ + StrictStr | None, + Field( + description="Worksheet context: recommendations, approvals, or overview (overview requires cycle admin)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """Get compensation planning cycle worksheet + + Get compensation planning worksheet details for the cycle (recommendations, approvals, or overview context). Omit `type` to use the default view for the current user. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param type: Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_329acecaa6df729733d0752aa9f6b204_serialize( + id=id, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_329acecaa6df729733d0752aa9f6b204_with_http_info( + self, + id: StrictInt, + type: Annotated[ + StrictStr | None, + Field( + description="Worksheet context: recommendations, approvals, or overview (overview requires cycle admin)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """Get compensation planning cycle worksheet + + Get compensation planning worksheet details for the cycle (recommendations, approvals, or overview context). Omit `type` to use the default view for the current user. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param type: Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_329acecaa6df729733d0752aa9f6b204_serialize( + id=id, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_329acecaa6df729733d0752aa9f6b204_without_preload_content( + self, + id: StrictInt, + type: Annotated[ + StrictStr | None, + Field( + description="Worksheet context: recommendations, approvals, or overview (overview requires cycle admin)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get compensation planning cycle worksheet + + Get compensation planning worksheet details for the cycle (recommendations, approvals, or overview context). Omit `type` to use the default view for the current user. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param type: Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_329acecaa6df729733d0752aa9f6b204_serialize( + id=id, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_329acecaa6df729733d0752aa9f6b204_serialize( + self, + id, + type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + if type is not None: + _query_params.append(("type", type)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/planning_cycles/{id}/worksheet", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_3958585c861325ea7a2cd30a8c74f042( + self, + id: StrictInt, + model3958585c861325ea7a2cd30a8c74f042_request: Annotated[ + Model3958585c861325ea7a2cd30a8c74f042Request, Field(description="Internal employee IDs to add") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Add employees to cycle + + Add employees to a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param model3958585c861325ea7a2cd30a8c74f042_request: Internal employee IDs to add (required) + :type model3958585c861325ea7a2cd30a8c74f042_request: Model3958585c861325ea7a2cd30a8c74f042Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_3958585c861325ea7a2cd30a8c74f042_serialize( + id=id, + model3958585c861325ea7a2cd30a8c74f042_request=model3958585c861325ea7a2cd30a8c74f042_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_3958585c861325ea7a2cd30a8c74f042_with_http_info( + self, + id: StrictInt, + model3958585c861325ea7a2cd30a8c74f042_request: Annotated[ + Model3958585c861325ea7a2cd30a8c74f042Request, Field(description="Internal employee IDs to add") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Add employees to cycle + + Add employees to a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param model3958585c861325ea7a2cd30a8c74f042_request: Internal employee IDs to add (required) + :type model3958585c861325ea7a2cd30a8c74f042_request: Model3958585c861325ea7a2cd30a8c74f042Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_3958585c861325ea7a2cd30a8c74f042_serialize( + id=id, + model3958585c861325ea7a2cd30a8c74f042_request=model3958585c861325ea7a2cd30a8c74f042_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_3958585c861325ea7a2cd30a8c74f042_without_preload_content( + self, + id: StrictInt, + model3958585c861325ea7a2cd30a8c74f042_request: Annotated[ + Model3958585c861325ea7a2cd30a8c74f042Request, Field(description="Internal employee IDs to add") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add employees to cycle + + Add employees to a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param model3958585c861325ea7a2cd30a8c74f042_request: Internal employee IDs to add (required) + :type model3958585c861325ea7a2cd30a8c74f042_request: Model3958585c861325ea7a2cd30a8c74f042Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_3958585c861325ea7a2cd30a8c74f042_serialize( + id=id, + model3958585c861325ea7a2cd30a8c74f042_request=model3958585c861325ea7a2cd30a8c74f042_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_3958585c861325ea7a2cd30a8c74f042_serialize( + self, + id, + model3958585c861325ea7a2cd30a8c74f042_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if model3958585c861325ea7a2cd30a8c74f042_request is not None: + _body_params = model3958585c861325ea7a2cd30a8c74f042_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/compensation/planning_cycles/{id}/employees", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_3a19f07aa737dc826ba43b9a1c1cd257( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Launch compensation planning cycle + + Launch a compensation planning cycle. Validates all cycle data and sets status to Live. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_3a19f07aa737dc826ba43b9a1c1cd257_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_3a19f07aa737dc826ba43b9a1c1cd257_with_http_info( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Launch compensation planning cycle + + Launch a compensation planning cycle. Validates all cycle data and sets status to Live. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_3a19f07aa737dc826ba43b9a1c1cd257_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_3a19f07aa737dc826ba43b9a1c1cd257_without_preload_content( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Launch compensation planning cycle + + Launch a compensation planning cycle. Validates all cycle data and sets status to Live. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_3a19f07aa737dc826ba43b9a1c1cd257_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_3a19f07aa737dc826ba43b9a1c1cd257_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/compensation/planning_cycles/{id}/launch", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_4e886b18264480611f380805301c49c4( + self, + id: StrictInt, + group_by: Annotated[ + StrictStr | None, Field(description="Optional grouping for flows (e.g. department)") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """Get compensation planning approval flows + + Get approval flows for the compensation planning cycle (grouped by department by default). OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param group_by: Optional grouping for flows (e.g. department) + :type group_by: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_4e886b18264480611f380805301c49c4_serialize( + id=id, + group_by=group_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_4e886b18264480611f380805301c49c4_with_http_info( + self, + id: StrictInt, + group_by: Annotated[ + StrictStr | None, Field(description="Optional grouping for flows (e.g. department)") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """Get compensation planning approval flows + + Get approval flows for the compensation planning cycle (grouped by department by default). OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param group_by: Optional grouping for flows (e.g. department) + :type group_by: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_4e886b18264480611f380805301c49c4_serialize( + id=id, + group_by=group_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_4e886b18264480611f380805301c49c4_without_preload_content( + self, + id: StrictInt, + group_by: Annotated[ + StrictStr | None, Field(description="Optional grouping for flows (e.g. department)") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get compensation planning approval flows + + Get approval flows for the compensation planning cycle (grouped by department by default). OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param group_by: Optional grouping for flows (e.g. department) + :type group_by: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_4e886b18264480611f380805301c49c4_serialize( + id=id, + group_by=group_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_4e886b18264480611f380805301c49c4_serialize( + self, + id, + group_by, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + if group_by is not None: + _query_params.append(("groupBy", group_by)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/planning_cycles/{id}/approvals", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_593d5bff120edf2a218a92022a682728( + self, + id: StrictInt, + type: Annotated[ + StrictStr | None, + Field( + description="Worksheet context: recommendations, approvals, or overview (overview requires cycle admin)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """Export compensation planning cycle worksheet to CSV + + Download compensation planning worksheet data as a UTF-8 CSV (Excel-friendly BOM). Same data scope as GET worksheet; omit `type` for the default view. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param type: Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_593d5bff120edf2a218a92022a682728_serialize( + id=id, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "bytearray", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_593d5bff120edf2a218a92022a682728_with_http_info( + self, + id: StrictInt, + type: Annotated[ + StrictStr | None, + Field( + description="Worksheet context: recommendations, approvals, or overview (overview requires cycle admin)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """Export compensation planning cycle worksheet to CSV + + Download compensation planning worksheet data as a UTF-8 CSV (Excel-friendly BOM). Same data scope as GET worksheet; omit `type` for the default view. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param type: Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_593d5bff120edf2a218a92022a682728_serialize( + id=id, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "bytearray", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_593d5bff120edf2a218a92022a682728_without_preload_content( + self, + id: StrictInt, + type: Annotated[ + StrictStr | None, + Field( + description="Worksheet context: recommendations, approvals, or overview (overview requires cycle admin)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Export compensation planning cycle worksheet to CSV + + Download compensation planning worksheet data as a UTF-8 CSV (Excel-friendly BOM). Same data scope as GET worksheet; omit `type` for the default view. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param type: Worksheet context: recommendations, approvals, or overview (overview requires cycle admin). + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_593d5bff120edf2a218a92022a682728_serialize( + id=id, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "bytearray", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_593d5bff120edf2a218a92022a682728_serialize( + self, + id, + type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + if type is not None: + _query_params.append(("type", type)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["text/csv"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/planning_cycles/{id}/worksheet/export", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_5c2b55158b0950b1e9211655666645b6( + self, + id: StrictInt | None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """Get compensation planning cycle details + + Get compensation planning cycle details and currency settings for a cycle. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_5c2b55158b0950b1e9211655666645b6_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_5c2b55158b0950b1e9211655666645b6_with_http_info( + self, + id: StrictInt | None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """Get compensation planning cycle details + + Get compensation planning cycle details and currency settings for a cycle. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_5c2b55158b0950b1e9211655666645b6_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_5c2b55158b0950b1e9211655666645b6_without_preload_content( + self, + id: StrictInt | None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get compensation planning cycle details + + Get compensation planning cycle details and currency settings for a cycle. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_5c2b55158b0950b1e9211655666645b6_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_5c2b55158b0950b1e9211655666645b6_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/planning_cycles/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_5c4aab35a34f5760ec044104b5232bf5( + self, + id: StrictInt, + employee_id: Annotated[ + StrictStr | None, Field(description="The internal employee ID of the employee to set as final approver.") + ], + group_by: Annotated[ + StrictStr | None, Field(description="Optional grouping for returned flows (e.g. department)") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """Set final approver + + Set or update the final approver for all approval flows in a cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param employee_id: The internal employee ID of the employee to set as final approver. (required) + :type employee_id: str + :param group_by: Optional grouping for returned flows (e.g. department) + :type group_by: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_5c4aab35a34f5760ec044104b5232bf5_serialize( + id=id, + employee_id=employee_id, + group_by=group_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_5c4aab35a34f5760ec044104b5232bf5_with_http_info( + self, + id: StrictInt, + employee_id: Annotated[ + StrictStr | None, Field(description="The internal employee ID of the employee to set as final approver.") + ], + group_by: Annotated[ + StrictStr | None, Field(description="Optional grouping for returned flows (e.g. department)") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """Set final approver + + Set or update the final approver for all approval flows in a cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param employee_id: The internal employee ID of the employee to set as final approver. (required) + :type employee_id: str + :param group_by: Optional grouping for returned flows (e.g. department) + :type group_by: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_5c4aab35a34f5760ec044104b5232bf5_serialize( + id=id, + employee_id=employee_id, + group_by=group_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_5c4aab35a34f5760ec044104b5232bf5_without_preload_content( + self, + id: StrictInt, + employee_id: Annotated[ + StrictStr | None, Field(description="The internal employee ID of the employee to set as final approver.") + ], + group_by: Annotated[ + StrictStr | None, Field(description="Optional grouping for returned flows (e.g. department)") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set final approver + + Set or update the final approver for all approval flows in a cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param employee_id: The internal employee ID of the employee to set as final approver. (required) + :type employee_id: str + :param group_by: Optional grouping for returned flows (e.g. department) + :type group_by: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_5c4aab35a34f5760ec044104b5232bf5_serialize( + id=id, + employee_id=employee_id, + group_by=group_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_5c4aab35a34f5760ec044104b5232bf5_serialize( + self, + id, + employee_id, + group_by, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + if employee_id is not None: + _path_params["employeeId"] = employee_id + # process the query parameters + if group_by is not None: + _query_params.append(("groupBy", group_by)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/compensation/planning_cycles/{id}/approvals/final_approver/{employeeId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_7efceaee2c010f88244dd01ee81e6e7b( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """Get compensation planning cycle budgets + + Get budget guidelines and breakdown for the compensation planning cycle. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_7efceaee2c010f88244dd01ee81e6e7b_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_7efceaee2c010f88244dd01ee81e6e7b_with_http_info( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """Get compensation planning cycle budgets + + Get budget guidelines and breakdown for the compensation planning cycle. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_7efceaee2c010f88244dd01ee81e6e7b_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_7efceaee2c010f88244dd01ee81e6e7b_without_preload_content( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get compensation planning cycle budgets + + Get budget guidelines and breakdown for the compensation planning cycle. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_7efceaee2c010f88244dd01ee81e6e7b_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_7efceaee2c010f88244dd01ee81e6e7b_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/planning_cycles/{id}/budgets", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_89a5068111ec499135c7d6e9a53d5a30( + self, + id: StrictInt, + model89a5068111ec499135c7d6e9a53d5a30_request: Annotated[ + Model89a5068111ec499135c7d6e9a53d5a30Request, Field(description="Internal employee IDs to remove") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove employees from cycle + + Remove employees from a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param model89a5068111ec499135c7d6e9a53d5a30_request: Internal employee IDs to remove (required) + :type model89a5068111ec499135c7d6e9a53d5a30_request: Model89a5068111ec499135c7d6e9a53d5a30Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_89a5068111ec499135c7d6e9a53d5a30_serialize( + id=id, + model89a5068111ec499135c7d6e9a53d5a30_request=model89a5068111ec499135c7d6e9a53d5a30_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_89a5068111ec499135c7d6e9a53d5a30_with_http_info( + self, + id: StrictInt, + model89a5068111ec499135c7d6e9a53d5a30_request: Annotated[ + Model89a5068111ec499135c7d6e9a53d5a30Request, Field(description="Internal employee IDs to remove") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove employees from cycle + + Remove employees from a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param model89a5068111ec499135c7d6e9a53d5a30_request: Internal employee IDs to remove (required) + :type model89a5068111ec499135c7d6e9a53d5a30_request: Model89a5068111ec499135c7d6e9a53d5a30Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_89a5068111ec499135c7d6e9a53d5a30_serialize( + id=id, + model89a5068111ec499135c7d6e9a53d5a30_request=model89a5068111ec499135c7d6e9a53d5a30_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_89a5068111ec499135c7d6e9a53d5a30_without_preload_content( + self, + id: StrictInt, + model89a5068111ec499135c7d6e9a53d5a30_request: Annotated[ + Model89a5068111ec499135c7d6e9a53d5a30Request, Field(description="Internal employee IDs to remove") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove employees from cycle + + Remove employees from a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param model89a5068111ec499135c7d6e9a53d5a30_request: Internal employee IDs to remove (required) + :type model89a5068111ec499135c7d6e9a53d5a30_request: Model89a5068111ec499135c7d6e9a53d5a30Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_89a5068111ec499135c7d6e9a53d5a30_serialize( + id=id, + model89a5068111ec499135c7d6e9a53d5a30_request=model89a5068111ec499135c7d6e9a53d5a30_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_89a5068111ec499135c7d6e9a53d5a30_serialize( + self, + id, + model89a5068111ec499135c7d6e9a53d5a30_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if model89a5068111ec499135c7d6e9a53d5a30_request is not None: + _body_params = model89a5068111ec499135c7d6e9a53d5a30_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/compensation/planning_cycles/{id}/employees", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_9bc279d788f6e86b4cd8b2e0d3de91b1( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """Get compensation planning cycle summary + + Get compensation planning cycle summary (progress, stats). OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_9bc279d788f6e86b4cd8b2e0d3de91b1_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_9bc279d788f6e86b4cd8b2e0d3de91b1_with_http_info( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """Get compensation planning cycle summary + + Get compensation planning cycle summary (progress, stats). OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_9bc279d788f6e86b4cd8b2e0d3de91b1_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_9bc279d788f6e86b4cd8b2e0d3de91b1_without_preload_content( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get compensation planning cycle summary + + Get compensation planning cycle summary (progress, stats). OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_9bc279d788f6e86b4cd8b2e0d3de91b1_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_9bc279d788f6e86b4cd8b2e0d3de91b1_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/planning_cycles/{id}/summary", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def cf87b8e09a001b6fb81dfce6c20ab9e3( + self, + id: StrictInt, + template_id: StrictStr | None, + cf87b8e09a001b6fb81dfce6c20ab9e3_request: Cf87b8e09a001b6fb81dfce6c20ab9e3Request, + group_by: Annotated[ + StrictStr | None, Field(description="Optional grouping for returned flows (e.g. department)") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """Update approval flow + + Update an approval flow for a compensation planning cycle. Allows modifying recommenders and approvers for a specific approval flow template. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param template_id: (required) + :type template_id: str + :param cf87b8e09a001b6fb81dfce6c20ab9e3_request: (required) + :type cf87b8e09a001b6fb81dfce6c20ab9e3_request: Cf87b8e09a001b6fb81dfce6c20ab9e3Request + :param group_by: Optional grouping for returned flows (e.g. department) + :type group_by: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._cf87b8e09a001b6fb81dfce6c20ab9e3_serialize( + id=id, + template_id=template_id, + cf87b8e09a001b6fb81dfce6c20ab9e3_request=cf87b8e09a001b6fb81dfce6c20ab9e3_request, + group_by=group_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def cf87b8e09a001b6fb81dfce6c20ab9e3_with_http_info( + self, + id: StrictInt, + template_id: StrictStr | None, + cf87b8e09a001b6fb81dfce6c20ab9e3_request: Cf87b8e09a001b6fb81dfce6c20ab9e3Request, + group_by: Annotated[ + StrictStr | None, Field(description="Optional grouping for returned flows (e.g. department)") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """Update approval flow + + Update an approval flow for a compensation planning cycle. Allows modifying recommenders and approvers for a specific approval flow template. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param template_id: (required) + :type template_id: str + :param cf87b8e09a001b6fb81dfce6c20ab9e3_request: (required) + :type cf87b8e09a001b6fb81dfce6c20ab9e3_request: Cf87b8e09a001b6fb81dfce6c20ab9e3Request + :param group_by: Optional grouping for returned flows (e.g. department) + :type group_by: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._cf87b8e09a001b6fb81dfce6c20ab9e3_serialize( + id=id, + template_id=template_id, + cf87b8e09a001b6fb81dfce6c20ab9e3_request=cf87b8e09a001b6fb81dfce6c20ab9e3_request, + group_by=group_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def cf87b8e09a001b6fb81dfce6c20ab9e3_without_preload_content( + self, + id: StrictInt, + template_id: StrictStr | None, + cf87b8e09a001b6fb81dfce6c20ab9e3_request: Cf87b8e09a001b6fb81dfce6c20ab9e3Request, + group_by: Annotated[ + StrictStr | None, Field(description="Optional grouping for returned flows (e.g. department)") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update approval flow + + Update an approval flow for a compensation planning cycle. Allows modifying recommenders and approvers for a specific approval flow template. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param template_id: (required) + :type template_id: str + :param cf87b8e09a001b6fb81dfce6c20ab9e3_request: (required) + :type cf87b8e09a001b6fb81dfce6c20ab9e3_request: Cf87b8e09a001b6fb81dfce6c20ab9e3Request + :param group_by: Optional grouping for returned flows (e.g. department) + :type group_by: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._cf87b8e09a001b6fb81dfce6c20ab9e3_serialize( + id=id, + template_id=template_id, + cf87b8e09a001b6fb81dfce6c20ab9e3_request=cf87b8e09a001b6fb81dfce6c20ab9e3_request, + group_by=group_by, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _cf87b8e09a001b6fb81dfce6c20ab9e3_serialize( + self, + id, + template_id, + cf87b8e09a001b6fb81dfce6c20ab9e3_request, + group_by, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + if template_id is not None: + _path_params["templateId"] = template_id + # process the query parameters + if group_by is not None: + _query_params.append(("groupBy", group_by)) + + # process the header parameters + # process the form parameters + # process the body parameter + if cf87b8e09a001b6fb81dfce6c20ab9e3_request is not None: + _body_params = cf87b8e09a001b6fb81dfce6c20ab9e3_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/compensation/planning_cycles/{id}/approvals/{templateId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def d6987e300672a00c7cfe59afebb64156( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """Get change communication letter details + + Get change communication letter details for the compensation planning cycle. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._d6987e300672a00c7cfe59afebb64156_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def d6987e300672a00c7cfe59afebb64156_with_http_info( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """Get change communication letter details + + Get change communication letter details for the compensation planning cycle. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._d6987e300672a00c7cfe59afebb64156_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def d6987e300672a00c7cfe59afebb64156_without_preload_content( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get change communication letter details + + Get change communication letter details for the compensation planning cycle. OAuth Scopes: planning_cycles + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._d6987e300672a00c7cfe59afebb64156_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _d6987e300672a00c7cfe59afebb64156_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/planning_cycles/{id}/change_comm", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def dacd313af2106213fc4696175941ce65( + self, + id: StrictInt, + dacd313af2106213fc4696175941ce65_request: Annotated[ + Dacd313af2106213fc4696175941ce65Request, Field(description="Budget guideline settings") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BudgetGuidelinesView: + """Save budget guidelines + + Save budget guidelines for a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param dacd313af2106213fc4696175941ce65_request: Budget guideline settings (required) + :type dacd313af2106213fc4696175941ce65_request: Dacd313af2106213fc4696175941ce65Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._dacd313af2106213fc4696175941ce65_serialize( + id=id, + dacd313af2106213fc4696175941ce65_request=dacd313af2106213fc4696175941ce65_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "BudgetGuidelinesView", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def dacd313af2106213fc4696175941ce65_with_http_info( + self, + id: StrictInt, + dacd313af2106213fc4696175941ce65_request: Annotated[ + Dacd313af2106213fc4696175941ce65Request, Field(description="Budget guideline settings") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BudgetGuidelinesView]: + """Save budget guidelines + + Save budget guidelines for a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param dacd313af2106213fc4696175941ce65_request: Budget guideline settings (required) + :type dacd313af2106213fc4696175941ce65_request: Dacd313af2106213fc4696175941ce65Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._dacd313af2106213fc4696175941ce65_serialize( + id=id, + dacd313af2106213fc4696175941ce65_request=dacd313af2106213fc4696175941ce65_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "BudgetGuidelinesView", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def dacd313af2106213fc4696175941ce65_without_preload_content( + self, + id: StrictInt, + dacd313af2106213fc4696175941ce65_request: Annotated[ + Dacd313af2106213fc4696175941ce65Request, Field(description="Budget guideline settings") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Save budget guidelines + + Save budget guidelines for a compensation planning cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param dacd313af2106213fc4696175941ce65_request: Budget guideline settings (required) + :type dacd313af2106213fc4696175941ce65_request: Dacd313af2106213fc4696175941ce65Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._dacd313af2106213fc4696175941ce65_serialize( + id=id, + dacd313af2106213fc4696175941ce65_request=dacd313af2106213fc4696175941ce65_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "BudgetGuidelinesView", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _dacd313af2106213fc4696175941ce65_serialize( + self, + id, + dacd313af2106213fc4696175941ce65_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if dacd313af2106213fc4696175941ce65_request is not None: + _body_params = dacd313af2106213fc4696175941ce65_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/compensation/planning_cycles/{id}/budgets/guidelines", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def e2ac4e1535f296cb8901f209e04caa83( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """Create compensation planning cycle + + Create a new compensation planning cycle with default settings. OAuth Scopes: planning_cycles.write + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._e2ac4e1535f296cb8901f209e04caa83_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "201": "Dict[str, object]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def e2ac4e1535f296cb8901f209e04caa83_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """Create compensation planning cycle + + Create a new compensation planning cycle with default settings. OAuth Scopes: planning_cycles.write + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._e2ac4e1535f296cb8901f209e04caa83_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "201": "Dict[str, object]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def e2ac4e1535f296cb8901f209e04caa83_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create compensation planning cycle + + Create a new compensation planning cycle with default settings. OAuth Scopes: planning_cycles.write + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._e2ac4e1535f296cb8901f209e04caa83_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "201": "Dict[str, object]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _e2ac4e1535f296cb8901f209e04caa83_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/compensation/planning_cycles", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def ef7619b0ee4c8dc079aaea870cfbe81b( + self, + id: StrictInt, + employee_id: Annotated[ + StrictStr | None, Field(description="The internal employee ID of the cycle admin to remove.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RemoveCycleAdminSelfResponse: + """Remove cycle admin + + Remove a cycle admin by internal employee ID. Full account admins cannot be removed. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param employee_id: The internal employee ID of the cycle admin to remove. (required) + :type employee_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._ef7619b0ee4c8dc079aaea870cfbe81b_serialize( + id=id, + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "RemoveCycleAdminSelfResponse", + "204": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def ef7619b0ee4c8dc079aaea870cfbe81b_with_http_info( + self, + id: StrictInt, + employee_id: Annotated[ + StrictStr | None, Field(description="The internal employee ID of the cycle admin to remove.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RemoveCycleAdminSelfResponse]: + """Remove cycle admin + + Remove a cycle admin by internal employee ID. Full account admins cannot be removed. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param employee_id: The internal employee ID of the cycle admin to remove. (required) + :type employee_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._ef7619b0ee4c8dc079aaea870cfbe81b_serialize( + id=id, + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "RemoveCycleAdminSelfResponse", + "204": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def ef7619b0ee4c8dc079aaea870cfbe81b_without_preload_content( + self, + id: StrictInt, + employee_id: Annotated[ + StrictStr | None, Field(description="The internal employee ID of the cycle admin to remove.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove cycle admin + + Remove a cycle admin by internal employee ID. Full account admins cannot be removed. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param employee_id: The internal employee ID of the cycle admin to remove. (required) + :type employee_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._ef7619b0ee4c8dc079aaea870cfbe81b_serialize( + id=id, + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "RemoveCycleAdminSelfResponse", + "204": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _ef7619b0ee4c8dc079aaea870cfbe81b_serialize( + self, + id, + employee_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + if employee_id is not None: + _path_params["employeeId"] = employee_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/compensation/planning_cycles/{id}/admins/{employeeId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def f3883a522dadbe9e11b34f8b656e3adb( + self, + id: StrictInt, + f3883a522dadbe9e11b34f8b656e3adb_request: F3883a522dadbe9e11b34f8b656e3adbRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> dict[str, object]: + """Save recommendations + + Save compensation recommendations for an employee in a cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param f3883a522dadbe9e11b34f8b656e3adb_request: (required) + :type f3883a522dadbe9e11b34f8b656e3adb_request: F3883a522dadbe9e11b34f8b656e3adbRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._f3883a522dadbe9e11b34f8b656e3adb_serialize( + id=id, + f3883a522dadbe9e11b34f8b656e3adb_request=f3883a522dadbe9e11b34f8b656e3adb_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "403": None, + "404": None, + "409": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def f3883a522dadbe9e11b34f8b656e3adb_with_http_info( + self, + id: StrictInt, + f3883a522dadbe9e11b34f8b656e3adb_request: F3883a522dadbe9e11b34f8b656e3adbRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[dict[str, object]]: + """Save recommendations + + Save compensation recommendations for an employee in a cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param f3883a522dadbe9e11b34f8b656e3adb_request: (required) + :type f3883a522dadbe9e11b34f8b656e3adb_request: F3883a522dadbe9e11b34f8b656e3adbRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._f3883a522dadbe9e11b34f8b656e3adb_serialize( + id=id, + f3883a522dadbe9e11b34f8b656e3adb_request=f3883a522dadbe9e11b34f8b656e3adb_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "403": None, + "404": None, + "409": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def f3883a522dadbe9e11b34f8b656e3adb_without_preload_content( + self, + id: StrictInt, + f3883a522dadbe9e11b34f8b656e3adb_request: F3883a522dadbe9e11b34f8b656e3adbRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Save recommendations + + Save compensation recommendations for an employee in a cycle. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param f3883a522dadbe9e11b34f8b656e3adb_request: (required) + :type f3883a522dadbe9e11b34f8b656e3adb_request: F3883a522dadbe9e11b34f8b656e3adbRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._f3883a522dadbe9e11b34f8b656e3adb_serialize( + id=id, + f3883a522dadbe9e11b34f8b656e3adb_request=f3883a522dadbe9e11b34f8b656e3adb_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, object]", + "400": None, + "403": None, + "404": None, + "409": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _f3883a522dadbe9e11b34f8b656e3adb_serialize( + self, + id, + f3883a522dadbe9e11b34f8b656e3adb_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if f3883a522dadbe9e11b34f8b656e3adb_request is not None: + _body_params = f3883a522dadbe9e11b34f8b656e3adb_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/compensation/planning_cycles/{id}/recommendations", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def f4b431363af6573af46750f32632e88b( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CompensationPlanningCycleCompleteResponse: + """Complete compensation planning cycle + + Complete a compensation planning cycle and finalize employee compensation records. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._f4b431363af6573af46750f32632e88b_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationPlanningCycleCompleteResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": None, + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def f4b431363af6573af46750f32632e88b_with_http_info( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CompensationPlanningCycleCompleteResponse]: + """Complete compensation planning cycle + + Complete a compensation planning cycle and finalize employee compensation records. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._f4b431363af6573af46750f32632e88b_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationPlanningCycleCompleteResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": None, + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def f4b431363af6573af46750f32632e88b_without_preload_content( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Complete compensation planning cycle + + Complete a compensation planning cycle and finalize employee compensation records. OAuth Scopes: planning_cycles.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._f4b431363af6573af46750f32632e88b_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompensationPlanningCycleCompleteResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": None, + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _f4b431363af6573af46750f32632e88b_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/compensation/planning_cycles/{id}/complete", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/custom_fields_api.py b/bamboohr_sdk/api/custom_fields_api.py new file mode 100644 index 0000000..1a870ce --- /dev/null +++ b/bamboohr_sdk/api/custom_fields_api.py @@ -0,0 +1,3047 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.add_custom_field_list_value_request import AddCustomFieldListValueRequest +from bamboohr_sdk.models.add_custom_field_list_value_response import AddCustomFieldListValueResponse +from bamboohr_sdk.models.archive_custom_field_response import ArchiveCustomFieldResponse +from bamboohr_sdk.models.archived_custom_fields_list_response import ArchivedCustomFieldsListResponse +from bamboohr_sdk.models.change_custom_field_list_value_request import ChangeCustomFieldListValueRequest +from bamboohr_sdk.models.custom_field_definition_response_object import CustomFieldDefinitionResponseObject +from bamboohr_sdk.models.custom_field_request import CustomFieldRequest +from bamboohr_sdk.models.custom_field_view_object import CustomFieldViewObject +from bamboohr_sdk.models.custom_fields_list_response import CustomFieldsListResponse +from bamboohr_sdk.models.list_value_view_object import ListValueViewObject +from bamboohr_sdk.models.public_custom_field_types_response import PublicCustomFieldTypesResponse +from bamboohr_sdk.models.public_list_values_custom_field_settings_response import ( + PublicListValuesCustomFieldSettingsResponse, +) +from bamboohr_sdk.models.unarchive_custom_fields_request import UnarchiveCustomFieldsRequest +from bamboohr_sdk.models.unarchive_custom_fields_response import UnarchiveCustomFieldsResponse +from bamboohr_sdk.rest import RESTResponseType + + +class CustomFieldsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def add_custom_field_list_value( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field.")], + add_custom_field_list_value_request: AddCustomFieldListValueRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AddCustomFieldListValueResponse: + """Add Custom Field List Value + + Adds one or more dropdown options to a list-type custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field. (required) + :type custom_field_id: str + :param add_custom_field_list_value_request: (required) + :type add_custom_field_list_value_request: AddCustomFieldListValueRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._add_custom_field_list_value_serialize( + custom_field_id=custom_field_id, + add_custom_field_list_value_request=add_custom_field_list_value_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "AddCustomFieldListValueResponse", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def add_custom_field_list_value_with_http_info( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field.")], + add_custom_field_list_value_request: AddCustomFieldListValueRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AddCustomFieldListValueResponse]: + """Add Custom Field List Value + + Adds one or more dropdown options to a list-type custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field. (required) + :type custom_field_id: str + :param add_custom_field_list_value_request: (required) + :type add_custom_field_list_value_request: AddCustomFieldListValueRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._add_custom_field_list_value_serialize( + custom_field_id=custom_field_id, + add_custom_field_list_value_request=add_custom_field_list_value_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "AddCustomFieldListValueResponse", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def add_custom_field_list_value_without_preload_content( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field.")], + add_custom_field_list_value_request: AddCustomFieldListValueRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add Custom Field List Value + + Adds one or more dropdown options to a list-type custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field. (required) + :type custom_field_id: str + :param add_custom_field_list_value_request: (required) + :type add_custom_field_list_value_request: AddCustomFieldListValueRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._add_custom_field_list_value_serialize( + custom_field_id=custom_field_id, + add_custom_field_list_value_request=add_custom_field_list_value_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "AddCustomFieldListValueResponse", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _add_custom_field_list_value_serialize( + self, + custom_field_id, + add_custom_field_list_value_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if custom_field_id is not None: + _path_params["customFieldId"] = custom_field_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if add_custom_field_list_value_request is not None: + _body_params = add_custom_field_list_value_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/hris/custom-fields/{customFieldId}/list-values", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def archive_public_custom_field( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field to archive.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArchiveCustomFieldResponse: + """Archive Custom Field + + Archive a custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field to archive. (required) + :type custom_field_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._archive_public_custom_field_serialize( + custom_field_id=custom_field_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ArchiveCustomFieldResponse", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def archive_public_custom_field_with_http_info( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field to archive.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArchiveCustomFieldResponse]: + """Archive Custom Field + + Archive a custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field to archive. (required) + :type custom_field_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._archive_public_custom_field_serialize( + custom_field_id=custom_field_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ArchiveCustomFieldResponse", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def archive_public_custom_field_without_preload_content( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field to archive.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Archive Custom Field + + Archive a custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field to archive. (required) + :type custom_field_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._archive_public_custom_field_serialize( + custom_field_id=custom_field_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ArchiveCustomFieldResponse", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _archive_public_custom_field_serialize( + self, + custom_field_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if custom_field_id is not None: + _path_params["customFieldId"] = custom_field_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/hris/custom-fields/{customFieldId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_public_custom_field( + self, + custom_field_request: CustomFieldRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CustomFieldViewObject: + """Create Custom Field + + Create a new custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_request: (required) + :type custom_field_request: CustomFieldRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_public_custom_field_serialize( + custom_field_request=custom_field_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CustomFieldViewObject", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_public_custom_field_with_http_info( + self, + custom_field_request: CustomFieldRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CustomFieldViewObject]: + """Create Custom Field + + Create a new custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_request: (required) + :type custom_field_request: CustomFieldRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_public_custom_field_serialize( + custom_field_request=custom_field_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CustomFieldViewObject", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_public_custom_field_without_preload_content( + self, + custom_field_request: CustomFieldRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Custom Field + + Create a new custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_request: (required) + :type custom_field_request: CustomFieldRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_public_custom_field_serialize( + custom_field_request=custom_field_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CustomFieldViewObject", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_public_custom_field_serialize( + self, + custom_field_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if custom_field_request is not None: + _body_params = custom_field_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/hris/custom-fields", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_custom_field_list_value( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field.")], + list_value_id: Annotated[str, Field(strict=True, description="The ID of the list value to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Custom Field List Value + + Deletes a dropdown option from a list-type custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field. (required) + :type custom_field_id: str + :param list_value_id: The ID of the list value to delete. (required) + :type list_value_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_custom_field_list_value_serialize( + custom_field_id=custom_field_id, + list_value_id=list_value_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_custom_field_list_value_with_http_info( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field.")], + list_value_id: Annotated[str, Field(strict=True, description="The ID of the list value to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Custom Field List Value + + Deletes a dropdown option from a list-type custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field. (required) + :type custom_field_id: str + :param list_value_id: The ID of the list value to delete. (required) + :type list_value_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_custom_field_list_value_serialize( + custom_field_id=custom_field_id, + list_value_id=list_value_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_custom_field_list_value_without_preload_content( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field.")], + list_value_id: Annotated[str, Field(strict=True, description="The ID of the list value to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Custom Field List Value + + Deletes a dropdown option from a list-type custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field. (required) + :type custom_field_id: str + :param list_value_id: The ID of the list value to delete. (required) + :type list_value_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_custom_field_list_value_serialize( + custom_field_id=custom_field_id, + list_value_id=list_value_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_custom_field_list_value_serialize( + self, + custom_field_id, + list_value_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if custom_field_id is not None: + _path_params["customFieldId"] = custom_field_id + if list_value_id is not None: + _path_params["listValueId"] = list_value_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/hris/custom-fields/{customFieldId}/list-values/{listValueId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def edit_custom_field_list_value( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field.")], + list_value_id: Annotated[str, Field(strict=True, description="The ID of the list value to edit.")], + change_custom_field_list_value_request: ChangeCustomFieldListValueRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListValueViewObject: + """Edit Custom Field List Value + + Updates a dropdown option on a list-type custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field. (required) + :type custom_field_id: str + :param list_value_id: The ID of the list value to edit. (required) + :type list_value_id: str + :param change_custom_field_list_value_request: (required) + :type change_custom_field_list_value_request: ChangeCustomFieldListValueRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._edit_custom_field_list_value_serialize( + custom_field_id=custom_field_id, + list_value_id=list_value_id, + change_custom_field_list_value_request=change_custom_field_list_value_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ListValueViewObject", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "415": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def edit_custom_field_list_value_with_http_info( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field.")], + list_value_id: Annotated[str, Field(strict=True, description="The ID of the list value to edit.")], + change_custom_field_list_value_request: ChangeCustomFieldListValueRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListValueViewObject]: + """Edit Custom Field List Value + + Updates a dropdown option on a list-type custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field. (required) + :type custom_field_id: str + :param list_value_id: The ID of the list value to edit. (required) + :type list_value_id: str + :param change_custom_field_list_value_request: (required) + :type change_custom_field_list_value_request: ChangeCustomFieldListValueRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._edit_custom_field_list_value_serialize( + custom_field_id=custom_field_id, + list_value_id=list_value_id, + change_custom_field_list_value_request=change_custom_field_list_value_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ListValueViewObject", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "415": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def edit_custom_field_list_value_without_preload_content( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field.")], + list_value_id: Annotated[str, Field(strict=True, description="The ID of the list value to edit.")], + change_custom_field_list_value_request: ChangeCustomFieldListValueRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit Custom Field List Value + + Updates a dropdown option on a list-type custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field. (required) + :type custom_field_id: str + :param list_value_id: The ID of the list value to edit. (required) + :type list_value_id: str + :param change_custom_field_list_value_request: (required) + :type change_custom_field_list_value_request: ChangeCustomFieldListValueRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._edit_custom_field_list_value_serialize( + custom_field_id=custom_field_id, + list_value_id=list_value_id, + change_custom_field_list_value_request=change_custom_field_list_value_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ListValueViewObject", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "415": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _edit_custom_field_list_value_serialize( + self, + custom_field_id, + list_value_id, + change_custom_field_list_value_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if custom_field_id is not None: + _path_params["customFieldId"] = custom_field_id + if list_value_id is not None: + _path_params["listValueId"] = list_value_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if change_custom_field_list_value_request is not None: + _body_params = change_custom_field_list_value_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/merge-patch+json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PATCH", + resource_path="/api/v1/hris/custom-fields/{customFieldId}/list-values/{listValueId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def edit_public_custom_field( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field to edit.")], + custom_field_request: CustomFieldRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CustomFieldViewObject: + """Edit Custom Field + + Edit an existing custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field to edit. (required) + :type custom_field_id: str + :param custom_field_request: (required) + :type custom_field_request: CustomFieldRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._edit_public_custom_field_serialize( + custom_field_id=custom_field_id, + custom_field_request=custom_field_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CustomFieldViewObject", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def edit_public_custom_field_with_http_info( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field to edit.")], + custom_field_request: CustomFieldRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CustomFieldViewObject]: + """Edit Custom Field + + Edit an existing custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field to edit. (required) + :type custom_field_id: str + :param custom_field_request: (required) + :type custom_field_request: CustomFieldRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._edit_public_custom_field_serialize( + custom_field_id=custom_field_id, + custom_field_request=custom_field_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CustomFieldViewObject", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def edit_public_custom_field_without_preload_content( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field to edit.")], + custom_field_request: CustomFieldRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Edit Custom Field + + Edit an existing custom field. OAuth Scopes: employee:custom_fields.write + + :param custom_field_id: The ID of the custom field to edit. (required) + :type custom_field_id: str + :param custom_field_request: (required) + :type custom_field_request: CustomFieldRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._edit_public_custom_field_serialize( + custom_field_id=custom_field_id, + custom_field_request=custom_field_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CustomFieldViewObject", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _edit_public_custom_field_serialize( + self, + custom_field_id, + custom_field_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if custom_field_id is not None: + _path_params["customFieldId"] = custom_field_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if custom_field_request is not None: + _body_params = custom_field_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/hris/custom-fields/{customFieldId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_custom_field( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field to retrieve")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CustomFieldDefinitionResponseObject: + """Get Custom Field + + Returns one custom field definition. IDs are strings and each has a numeric `legacyId` companion for legacy integrations. Use this for a known custom field ID. For browsing active fields, use List Custom Fields (`list-custom-fields`) instead. For archived fields, use List Archived Custom Fields (`list-archived-custom-fields`) instead. OAuth Scopes: employee:custom_fields + + :param custom_field_id: The ID of the custom field to retrieve (required) + :type custom_field_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_custom_field_serialize( + custom_field_id=custom_field_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CustomFieldDefinitionResponseObject", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_custom_field_with_http_info( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field to retrieve")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CustomFieldDefinitionResponseObject]: + """Get Custom Field + + Returns one custom field definition. IDs are strings and each has a numeric `legacyId` companion for legacy integrations. Use this for a known custom field ID. For browsing active fields, use List Custom Fields (`list-custom-fields`) instead. For archived fields, use List Archived Custom Fields (`list-archived-custom-fields`) instead. OAuth Scopes: employee:custom_fields + + :param custom_field_id: The ID of the custom field to retrieve (required) + :type custom_field_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_custom_field_serialize( + custom_field_id=custom_field_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CustomFieldDefinitionResponseObject", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_custom_field_without_preload_content( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field to retrieve")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Custom Field + + Returns one custom field definition. IDs are strings and each has a numeric `legacyId` companion for legacy integrations. Use this for a known custom field ID. For browsing active fields, use List Custom Fields (`list-custom-fields`) instead. For archived fields, use List Archived Custom Fields (`list-archived-custom-fields`) instead. OAuth Scopes: employee:custom_fields + + :param custom_field_id: The ID of the custom field to retrieve (required) + :type custom_field_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_custom_field_serialize( + custom_field_id=custom_field_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CustomFieldDefinitionResponseObject", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_custom_field_serialize( + self, + custom_field_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if custom_field_id is not None: + _path_params["customFieldId"] = custom_field_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/hris/custom-fields/{customFieldId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_archived_custom_fields( + self, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="Page number to retrieve. Must be greater than or equal to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="Maximum number of archived custom fields to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArchivedCustomFieldsListResponse: + """List Archived Custom Fields + + Returns a paginated list of archived custom fields. IDs are strings and each has a numeric `legacyId` companion for legacy integrations. Use this for archived custom fields. For active custom fields, use List Custom Fields (`list-custom-fields`) instead. OAuth Scopes: employee:custom_fields + + :param page: Page number to retrieve. Must be greater than or equal to 1. + :type page: int + :param page_size: Maximum number of archived custom fields to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_archived_custom_fields_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ArchivedCustomFieldsListResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_archived_custom_fields_with_http_info( + self, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="Page number to retrieve. Must be greater than or equal to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="Maximum number of archived custom fields to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArchivedCustomFieldsListResponse]: + """List Archived Custom Fields + + Returns a paginated list of archived custom fields. IDs are strings and each has a numeric `legacyId` companion for legacy integrations. Use this for archived custom fields. For active custom fields, use List Custom Fields (`list-custom-fields`) instead. OAuth Scopes: employee:custom_fields + + :param page: Page number to retrieve. Must be greater than or equal to 1. + :type page: int + :param page_size: Maximum number of archived custom fields to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_archived_custom_fields_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ArchivedCustomFieldsListResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_archived_custom_fields_without_preload_content( + self, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="Page number to retrieve. Must be greater than or equal to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="Maximum number of archived custom fields to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Archived Custom Fields + + Returns a paginated list of archived custom fields. IDs are strings and each has a numeric `legacyId` companion for legacy integrations. Use this for archived custom fields. For active custom fields, use List Custom Fields (`list-custom-fields`) instead. OAuth Scopes: employee:custom_fields + + :param page: Page number to retrieve. Must be greater than or equal to 1. + :type page: int + :param page_size: Maximum number of archived custom fields to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_archived_custom_fields_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ArchivedCustomFieldsListResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_archived_custom_fields_serialize( + self, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/hris/custom-fields/archived", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_custom_field_list_values( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PublicListValuesCustomFieldSettingsResponse: + """List Custom Field List Values + + Returns the dropdown options (and employee counts) for a list-type custom field. OAuth Scopes: employee:custom_fields + + :param custom_field_id: The ID of the custom field. (required) + :type custom_field_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_custom_field_list_values_serialize( + custom_field_id=custom_field_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PublicListValuesCustomFieldSettingsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_custom_field_list_values_with_http_info( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PublicListValuesCustomFieldSettingsResponse]: + """List Custom Field List Values + + Returns the dropdown options (and employee counts) for a list-type custom field. OAuth Scopes: employee:custom_fields + + :param custom_field_id: The ID of the custom field. (required) + :type custom_field_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_custom_field_list_values_serialize( + custom_field_id=custom_field_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PublicListValuesCustomFieldSettingsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_custom_field_list_values_without_preload_content( + self, + custom_field_id: Annotated[str, Field(strict=True, description="The ID of the custom field.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Custom Field List Values + + Returns the dropdown options (and employee counts) for a list-type custom field. OAuth Scopes: employee:custom_fields + + :param custom_field_id: The ID of the custom field. (required) + :type custom_field_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_custom_field_list_values_serialize( + custom_field_id=custom_field_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PublicListValuesCustomFieldSettingsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_custom_field_list_values_serialize( + self, + custom_field_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if custom_field_id is not None: + _path_params["customFieldId"] = custom_field_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/hris/custom-fields/{customFieldId}/list-values", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_custom_field_types( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PublicCustomFieldTypesResponse: + """List Custom Field Types + + Returns an object containing the custom field types available when creating a custom field. OAuth Scopes: employee:custom_fields + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_custom_field_types_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PublicCustomFieldTypesResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_custom_field_types_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PublicCustomFieldTypesResponse]: + """List Custom Field Types + + Returns an object containing the custom field types available when creating a custom field. OAuth Scopes: employee:custom_fields + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_custom_field_types_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PublicCustomFieldTypesResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_custom_field_types_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Custom Field Types + + Returns an object containing the custom field types available when creating a custom field. OAuth Scopes: employee:custom_fields + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_custom_field_types_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PublicCustomFieldTypesResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_custom_field_types_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/hris/custom-fields/types", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_custom_fields( + self, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="Page number to retrieve. Must be greater than or equal to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="Maximum number of custom fields to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CustomFieldsListResponse: + """List Custom Fields + + Returns a paginated list of active custom fields. IDs are strings and each has a numeric `legacyId` companion for legacy integrations. Use this for active custom fields. For archived custom fields, use List Archived Custom Fields (`list-archived-custom-fields`) instead. OAuth Scopes: employee:custom_fields + + :param page: Page number to retrieve. Must be greater than or equal to 1. + :type page: int + :param page_size: Maximum number of custom fields to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_custom_fields_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CustomFieldsListResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_custom_fields_with_http_info( + self, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="Page number to retrieve. Must be greater than or equal to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="Maximum number of custom fields to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CustomFieldsListResponse]: + """List Custom Fields + + Returns a paginated list of active custom fields. IDs are strings and each has a numeric `legacyId` companion for legacy integrations. Use this for active custom fields. For archived custom fields, use List Archived Custom Fields (`list-archived-custom-fields`) instead. OAuth Scopes: employee:custom_fields + + :param page: Page number to retrieve. Must be greater than or equal to 1. + :type page: int + :param page_size: Maximum number of custom fields to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_custom_fields_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CustomFieldsListResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_custom_fields_without_preload_content( + self, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="Page number to retrieve. Must be greater than or equal to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="Maximum number of custom fields to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Custom Fields + + Returns a paginated list of active custom fields. IDs are strings and each has a numeric `legacyId` companion for legacy integrations. Use this for active custom fields. For archived custom fields, use List Archived Custom Fields (`list-archived-custom-fields`) instead. OAuth Scopes: employee:custom_fields + + :param page: Page number to retrieve. Must be greater than or equal to 1. + :type page: int + :param page_size: Maximum number of custom fields to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_custom_fields_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CustomFieldsListResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_custom_fields_serialize( + self, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/hris/custom-fields", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def unarchive_public_custom_fields( + self, + unarchive_custom_fields_request: UnarchiveCustomFieldsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UnarchiveCustomFieldsResponse: + """Unarchive Custom Fields + + Unarchive custom fields. OAuth Scopes: employee:custom_fields.write + + :param unarchive_custom_fields_request: (required) + :type unarchive_custom_fields_request: UnarchiveCustomFieldsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._unarchive_public_custom_fields_serialize( + unarchive_custom_fields_request=unarchive_custom_fields_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UnarchiveCustomFieldsResponse", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def unarchive_public_custom_fields_with_http_info( + self, + unarchive_custom_fields_request: UnarchiveCustomFieldsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UnarchiveCustomFieldsResponse]: + """Unarchive Custom Fields + + Unarchive custom fields. OAuth Scopes: employee:custom_fields.write + + :param unarchive_custom_fields_request: (required) + :type unarchive_custom_fields_request: UnarchiveCustomFieldsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._unarchive_public_custom_fields_serialize( + unarchive_custom_fields_request=unarchive_custom_fields_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UnarchiveCustomFieldsResponse", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def unarchive_public_custom_fields_without_preload_content( + self, + unarchive_custom_fields_request: UnarchiveCustomFieldsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Unarchive Custom Fields + + Unarchive custom fields. OAuth Scopes: employee:custom_fields.write + + :param unarchive_custom_fields_request: (required) + :type unarchive_custom_fields_request: UnarchiveCustomFieldsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._unarchive_public_custom_fields_serialize( + unarchive_custom_fields_request=unarchive_custom_fields_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "UnarchiveCustomFieldsResponse", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _unarchive_public_custom_fields_serialize( + self, + unarchive_custom_fields_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if unarchive_custom_fields_request is not None: + _body_params = unarchive_custom_fields_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/hris/custom-fields/unarchive", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/custom_reports_api.py b/bamboohr_sdk/api/custom_reports_api.py index e723104..6e88840 100644 --- a/bamboohr_sdk/api/custom_reports_api.py +++ b/bamboohr_sdk/api/custom_reports_api.py @@ -1,29 +1,24 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any -from pydantic import Field, StrictInt -from typing import Optional -from typing_extensions import Annotated -from bamboohr_sdk.models.employee_response import EmployeeResponse -from bamboohr_sdk.models.reports_response import ReportsResponse +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call from bamboohr_sdk.api_client import ApiClient, RequestSerialized from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.custom_report_response import CustomReportResponse +from bamboohr_sdk.models.legacy_report_field_map_response import LegacyReportFieldMapResponse +from bamboohr_sdk.models.legacy_report_id_map_response import LegacyReportIDMapResponse +from bamboohr_sdk.models.reports_response import ReportsResponse from bamboohr_sdk.rest import RESTResponseType @@ -39,35 +34,444 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call + def get_legacy_report_field_map( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LegacyReportFieldMapResponse: + """Get Legacy Report Field Map + + Returns the mapping from the field identifiers the deprecated Reports > Get Company Report (`get-company-report`) endpoint emitted to the field names the Custom Reports and Datasets endpoints use today. Use it to repoint automations that still reference legacy identifiers — a field that came back as `location` before the report migration is `jobInformationLocation` afterward. To translate legacy report IDs rather than field identifiers, use Get Legacy Report ID Map (`get-legacy-report-id-map`) instead. The map covers the whole company and is not paginated. It is not scoped to the calling user's reports or field permissions, so a field appearing here does not mean the caller can read its data. A legacy identifier can map to more than one field. The legacy report emitted an amount column and its currency-code column under a single identifier, so `payRate` maps to both `compensationPayRate` and `compensationPayRateCurrencyCode`. The identifier alone cannot tell you which one a given report used, so compare `type` or `fieldLabel` against the column you are replacing. An identifier that is absent from the response has no equivalent field at all — that column was lost in the migration, and there is nothing to point an automation at. Some legacy fields encoded a category in the field itself: a legacy \"Vacation\" time off field returned only vacation hours. These map to a general field plus a `qualifier`, and you have to apply it. If you request the mapped `fieldName` on its own, you get every category rather than the one the legacy field returned. The operator differs by field — time off policy qualifiers use `equal`, while time off category, benefit plan, and training qualifiers use `includes` and expect the value wrapped in an array. To reproduce a legacy \"Safety Training\" due-date column, request `trainingDueDate` and filter `{\"field\": \"trainingName\", \"operator\": \"includes\", \"value\": [\"Safety Training\"]}`. Qualifier values are legacy names carried over without validation, so a category, plan, or training that has since been renamed or removed will produce a qualifier that matches nothing. Check the value against Datasets > Get Field Options (v1.2) (`get-field-options-v1_2`) before repointing an automation. The map is cached per account for up to an hour, so a field that was just added or renamed may not appear immediately. OAuth Scopes: report + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_legacy_report_field_map_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "LegacyReportFieldMapResponse", + "401": None, + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_legacy_report_field_map_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LegacyReportFieldMapResponse]: + """Get Legacy Report Field Map + + Returns the mapping from the field identifiers the deprecated Reports > Get Company Report (`get-company-report`) endpoint emitted to the field names the Custom Reports and Datasets endpoints use today. Use it to repoint automations that still reference legacy identifiers — a field that came back as `location` before the report migration is `jobInformationLocation` afterward. To translate legacy report IDs rather than field identifiers, use Get Legacy Report ID Map (`get-legacy-report-id-map`) instead. The map covers the whole company and is not paginated. It is not scoped to the calling user's reports or field permissions, so a field appearing here does not mean the caller can read its data. A legacy identifier can map to more than one field. The legacy report emitted an amount column and its currency-code column under a single identifier, so `payRate` maps to both `compensationPayRate` and `compensationPayRateCurrencyCode`. The identifier alone cannot tell you which one a given report used, so compare `type` or `fieldLabel` against the column you are replacing. An identifier that is absent from the response has no equivalent field at all — that column was lost in the migration, and there is nothing to point an automation at. Some legacy fields encoded a category in the field itself: a legacy \"Vacation\" time off field returned only vacation hours. These map to a general field plus a `qualifier`, and you have to apply it. If you request the mapped `fieldName` on its own, you get every category rather than the one the legacy field returned. The operator differs by field — time off policy qualifiers use `equal`, while time off category, benefit plan, and training qualifiers use `includes` and expect the value wrapped in an array. To reproduce a legacy \"Safety Training\" due-date column, request `trainingDueDate` and filter `{\"field\": \"trainingName\", \"operator\": \"includes\", \"value\": [\"Safety Training\"]}`. Qualifier values are legacy names carried over without validation, so a category, plan, or training that has since been renamed or removed will produce a qualifier that matches nothing. Check the value against Datasets > Get Field Options (v1.2) (`get-field-options-v1_2`) before repointing an automation. The map is cached per account for up to an hour, so a field that was just added or renamed may not appear immediately. OAuth Scopes: report + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_legacy_report_field_map_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "LegacyReportFieldMapResponse", + "401": None, + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) @validate_call - def get_by_report_id( + def get_legacy_report_field_map_without_preload_content( self, - report_id: Annotated[StrictInt, Field(description="The ID of the saved custom report to retrieve data for.")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Legacy Report Field Map + + Returns the mapping from the field identifiers the deprecated Reports > Get Company Report (`get-company-report`) endpoint emitted to the field names the Custom Reports and Datasets endpoints use today. Use it to repoint automations that still reference legacy identifiers — a field that came back as `location` before the report migration is `jobInformationLocation` afterward. To translate legacy report IDs rather than field identifiers, use Get Legacy Report ID Map (`get-legacy-report-id-map`) instead. The map covers the whole company and is not paginated. It is not scoped to the calling user's reports or field permissions, so a field appearing here does not mean the caller can read its data. A legacy identifier can map to more than one field. The legacy report emitted an amount column and its currency-code column under a single identifier, so `payRate` maps to both `compensationPayRate` and `compensationPayRateCurrencyCode`. The identifier alone cannot tell you which one a given report used, so compare `type` or `fieldLabel` against the column you are replacing. An identifier that is absent from the response has no equivalent field at all — that column was lost in the migration, and there is nothing to point an automation at. Some legacy fields encoded a category in the field itself: a legacy \"Vacation\" time off field returned only vacation hours. These map to a general field plus a `qualifier`, and you have to apply it. If you request the mapped `fieldName` on its own, you get every category rather than the one the legacy field returned. The operator differs by field — time off policy qualifiers use `equal`, while time off category, benefit plan, and training qualifiers use `includes` and expect the value wrapped in an array. To reproduce a legacy \"Safety Training\" due-date column, request `trainingDueDate` and filter `{\"field\": \"trainingName\", \"operator\": \"includes\", \"value\": [\"Safety Training\"]}`. Qualifier values are legacy names carried over without validation, so a category, plan, or training that has since been renamed or removed will produce a qualifier that matches nothing. Check the value against Datasets > Get Field Options (v1.2) (`get-field-options-v1_2`) before repointing an automation. The map is cached per account for up to an hour, so a field that was just added or renamed may not appear immediately. OAuth Scopes: report + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_legacy_report_field_map_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "LegacyReportFieldMapResponse", + "401": None, + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_legacy_report_field_map_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/custom-reports/legacy-field-map", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_legacy_report_id_map( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LegacyReportIDMapResponse: + """Get Legacy Report ID Map + + Returns a mapping from legacy custom report IDs to the new report IDs created by the report migration. Use this to update automations or integrations that still reference legacy report IDs. Pass a `newReportId` to Get Report by ID (`get-report-by-id`) to execute the migrated report. Administrators receive a mapping for every custom report in the account; other users receive mappings only for the custom reports they can access (reports they own or that are shared with them). Because the map for a non-administrator is silently limited to their accessible reports, a legacy ID that is absent may be outside that user's visibility rather than nonexistent in the account. Each entry pairs a `legacyReportId` with its `newReportId` and a `status`. When a report has not been migrated, `newReportId` is `null` and `status` is `notMigrated`; otherwise `newReportId` is the migrated report's ID and `status` is `migrated`. Returns an empty `mappings` array when the user has no accessible custom reports. OAuth Scopes: report + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_legacy_report_id_map_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "LegacyReportIDMapResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_legacy_report_id_map_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LegacyReportIDMapResponse]: + """Get Legacy Report ID Map + + Returns a mapping from legacy custom report IDs to the new report IDs created by the report migration. Use this to update automations or integrations that still reference legacy report IDs. Pass a `newReportId` to Get Report by ID (`get-report-by-id`) to execute the migrated report. Administrators receive a mapping for every custom report in the account; other users receive mappings only for the custom reports they can access (reports they own or that are shared with them). Because the map for a non-administrator is silently limited to their accessible reports, a legacy ID that is absent may be outside that user's visibility rather than nonexistent in the account. Each entry pairs a `legacyReportId` with its `newReportId` and a `status`. When a report has not been migrated, `newReportId` is `null` and `status` is `notMigrated`; otherwise `newReportId` is the migrated report's ID and `status` is `migrated`. Returns an empty `mappings` array when the user has no accessible custom reports. OAuth Scopes: report + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_legacy_report_id_map_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "LegacyReportIDMapResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_legacy_report_id_map_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Legacy Report ID Map + + Returns a mapping from legacy custom report IDs to the new report IDs created by the report migration. Use this to update automations or integrations that still reference legacy report IDs. Pass a `newReportId` to Get Report by ID (`get-report-by-id`) to execute the migrated report. Administrators receive a mapping for every custom report in the account; other users receive mappings only for the custom reports they can access (reports they own or that are shared with them). Because the map for a non-administrator is silently limited to their accessible reports, a legacy ID that is absent may be outside that user's visibility rather than nonexistent in the account. Each entry pairs a `legacyReportId` with its `newReportId` and a `status`. When a report has not been migrated, `newReportId` is `null` and `status` is `notMigrated`; otherwise `newReportId` is the migrated report's ID and `status` is `migrated`. Returns an empty `mappings` array when the user has no accessible custom reports. OAuth Scopes: report + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_legacy_report_id_map_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "LegacyReportIDMapResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_legacy_report_id_map_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/custom-reports/legacy-id-map", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_report_by_id( + self, + report_id: Annotated[ + StrictInt | None, Field(description="The numeric ID of the saved custom report to execute.") + ], + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of records per page. Defaults to 500. Maximum is 1000."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> EmployeeResponse: + ) -> CustomReportResponse: """Get Report by ID - Retrieve data for a specific saved custom report by its ID. Returns the same paginated data structure as the ad-hoc dataset query endpoint, using the report's saved field list and filter configuration. Use GET /api/v1/custom-reports to list available report IDs. Results default to 500 records per page; use the `page` and `page_size` query parameters to paginate. + Executes a saved custom report and returns its data using the report's configured fields and filters. The `data` array contains employee record objects whose keys are determined by the fields selected when the report was created — each object is a flat key-value map where keys are field names (e.g. `firstName`, `status`, `hireDate`) and values are strings or `null`. The `aggregations` array is empty unless the report's underlying dataset configuration includes aggregation rules. Use \"List Reports\" to discover available report IDs. Response shape: Each element of `data` is a flat key-value object — field values are top-level keys (e.g. `row[\"firstName\"]`). This differs from `get-data-from-dataset-v2`, where field values are nested under a `fields` key (e.g. `row[\"fields\"][\"firstName\"]`). The top-level `fields` array lists the report's columns in the order the report shows them. Each entry's `name` is the key that column uses in every `data` record, and `label` is the column heading the customer sees in BambooHR — their own wording if they renamed the column. When `label` is `null`, display `name`. There is no schema-only response from this endpoint. The `pagination.total_records` value is the number of rows produced by the saved report after applying the report's configured filters, not necessarily the total number of employees in the account. Validate output before using in automated pipelines. Results default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Invalid or zero values for `page` and `page_size` fall back to their defaults. OAuth Scopes: report - :param report_id: The ID of the saved custom report to retrieve data for. (required) + :param report_id: The numeric ID of the saved custom report to execute. (required) :type report_id: int :param page: The page number to retrieve. Defaults to 1. :type page: int - :param page_size: The number of records to retrieve per page. Defaults to 500. Maximum is 1000. + :param page_size: The number of records per page. Defaults to 500. Maximum is 1000. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -89,64 +493,63 @@ def get_by_report_id( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_by_report_id_serialize( + _param = self._get_report_by_id_serialize( report_id=report_id, page=page, page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeResponse", - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "CustomReportResponse", + "400": "ErrorResponse", + "403": "ErrorResponse", + "404": "ErrorResponse", + "500": "ErrorResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_by_report_id_with_http_info( + def get_report_by_id_with_http_info( self, - report_id: Annotated[StrictInt, Field(description="The ID of the saved custom report to retrieve data for.")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + report_id: Annotated[ + StrictInt | None, Field(description="The numeric ID of the saved custom report to execute.") + ], + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of records per page. Defaults to 500. Maximum is 1000."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[EmployeeResponse]: + ) -> ApiResponse[CustomReportResponse]: """Get Report by ID - Retrieve data for a specific saved custom report by its ID. Returns the same paginated data structure as the ad-hoc dataset query endpoint, using the report's saved field list and filter configuration. Use GET /api/v1/custom-reports to list available report IDs. Results default to 500 records per page; use the `page` and `page_size` query parameters to paginate. + Executes a saved custom report and returns its data using the report's configured fields and filters. The `data` array contains employee record objects whose keys are determined by the fields selected when the report was created — each object is a flat key-value map where keys are field names (e.g. `firstName`, `status`, `hireDate`) and values are strings or `null`. The `aggregations` array is empty unless the report's underlying dataset configuration includes aggregation rules. Use \"List Reports\" to discover available report IDs. Response shape: Each element of `data` is a flat key-value object — field values are top-level keys (e.g. `row[\"firstName\"]`). This differs from `get-data-from-dataset-v2`, where field values are nested under a `fields` key (e.g. `row[\"fields\"][\"firstName\"]`). The top-level `fields` array lists the report's columns in the order the report shows them. Each entry's `name` is the key that column uses in every `data` record, and `label` is the column heading the customer sees in BambooHR — their own wording if they renamed the column. When `label` is `null`, display `name`. There is no schema-only response from this endpoint. The `pagination.total_records` value is the number of rows produced by the saved report after applying the report's configured filters, not necessarily the total number of employees in the account. Validate output before using in automated pipelines. Results default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Invalid or zero values for `page` and `page_size` fall back to their defaults. OAuth Scopes: report - :param report_id: The ID of the saved custom report to retrieve data for. (required) + :param report_id: The numeric ID of the saved custom report to execute. (required) :type report_id: int :param page: The page number to retrieve. Defaults to 1. :type page: int - :param page_size: The number of records to retrieve per page. Defaults to 500. Maximum is 1000. + :param page_size: The number of records per page. Defaults to 500. Maximum is 1000. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -168,64 +571,63 @@ def get_by_report_id_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_by_report_id_serialize( + _param = self._get_report_by_id_serialize( report_id=report_id, page=page, page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeResponse", - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "CustomReportResponse", + "400": "ErrorResponse", + "403": "ErrorResponse", + "404": "ErrorResponse", + "500": "ErrorResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_by_report_id_without_preload_content( + def get_report_by_id_without_preload_content( self, - report_id: Annotated[StrictInt, Field(description="The ID of the saved custom report to retrieve data for.")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + report_id: Annotated[ + StrictInt | None, Field(description="The numeric ID of the saved custom report to execute.") + ], + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of records per page. Defaults to 500. Maximum is 1000."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Report by ID - Retrieve data for a specific saved custom report by its ID. Returns the same paginated data structure as the ad-hoc dataset query endpoint, using the report's saved field list and filter configuration. Use GET /api/v1/custom-reports to list available report IDs. Results default to 500 records per page; use the `page` and `page_size` query parameters to paginate. + Executes a saved custom report and returns its data using the report's configured fields and filters. The `data` array contains employee record objects whose keys are determined by the fields selected when the report was created — each object is a flat key-value map where keys are field names (e.g. `firstName`, `status`, `hireDate`) and values are strings or `null`. The `aggregations` array is empty unless the report's underlying dataset configuration includes aggregation rules. Use \"List Reports\" to discover available report IDs. Response shape: Each element of `data` is a flat key-value object — field values are top-level keys (e.g. `row[\"firstName\"]`). This differs from `get-data-from-dataset-v2`, where field values are nested under a `fields` key (e.g. `row[\"fields\"][\"firstName\"]`). The top-level `fields` array lists the report's columns in the order the report shows them. Each entry's `name` is the key that column uses in every `data` record, and `label` is the column heading the customer sees in BambooHR — their own wording if they renamed the column. When `label` is `null`, display `name`. There is no schema-only response from this endpoint. The `pagination.total_records` value is the number of rows produced by the saved report after applying the report's configured filters, not necessarily the total number of employees in the account. Validate output before using in automated pipelines. Results default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Invalid or zero values for `page` and `page_size` fall back to their defaults. OAuth Scopes: report - :param report_id: The ID of the saved custom report to retrieve data for. (required) + :param report_id: The numeric ID of the saved custom report to execute. (required) :type report_id: int :param page: The page number to retrieve. Defaults to 1. :type page: int - :param page_size: The number of records to retrieve per page. Defaults to 500. Maximum is 1000. + :param page_size: The number of records per page. Defaults to 500. Maximum is 1000. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -247,33 +649,29 @@ def get_by_report_id_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_by_report_id_serialize( + _param = self._get_report_by_id_serialize( report_id=report_id, page=page, page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeResponse", - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "CustomReportResponse", + "400": "ErrorResponse", + "403": "ErrorResponse", + "404": "ErrorResponse", + "500": "ErrorResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_by_report_id_serialize( + def _get_report_by_id_serialize( self, report_id, page, @@ -286,53 +684,39 @@ def _get_by_report_id_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if report_id is not None: - _path_params['reportId'] = report_id + _path_params["reportId"] = report_id # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + _query_params.append(("page", page)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/custom-reports/{reportId}', + method="GET", + resource_path="/api/v1/custom-reports/{reportId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -342,35 +726,35 @@ def _get_by_report_id_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_reports( self, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field( + description="The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1." + ), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ReportsResponse: """List Reports - Retrieve a paginated list of saved custom reports available in the account. Returns each report's ID and name. Use the report ID with GET /api/v1/custom-reports/{reportId} to fetch the report's data. Results default to 500 records per page. + Returns a paginated list of saved custom reports available in the account. Each report entry contains an `id` (integer) and a `name` (string). Pass a report's `id` to \"Get Report by ID\" to execute it and retrieve its data. Results default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page rather than returning an error. Invalid or zero values for `page` and `page_size` fall back to their defaults. The `pagination` object includes `total_records`, `current_page`, `total_pages`, and nullable `next_page`/`prev_page` links. When there is no next or previous page the corresponding value is `null`. OAuth Scopes: report - :param page: The page number to retrieve. Defaults to 1. + :param page: The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. :type page: int :param page_size: The number of records to retrieve per page. Defaults to 500. Maximum is 1000. :type page_size: int @@ -394,7 +778,7 @@ def list_reports( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_reports_serialize( page=page, @@ -402,48 +786,47 @@ def list_reports( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ReportsResponse", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "ReportsResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_reports_with_http_info( self, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field( + description="The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ReportsResponse]: """List Reports - Retrieve a paginated list of saved custom reports available in the account. Returns each report's ID and name. Use the report ID with GET /api/v1/custom-reports/{reportId} to fetch the report's data. Results default to 500 records per page. + Returns a paginated list of saved custom reports available in the account. Each report entry contains an `id` (integer) and a `name` (string). Pass a report's `id` to \"Get Report by ID\" to execute it and retrieve its data. Results default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page rather than returning an error. Invalid or zero values for `page` and `page_size` fall back to their defaults. The `pagination` object includes `total_records`, `current_page`, `total_pages`, and nullable `next_page`/`prev_page` links. When there is no next or previous page the corresponding value is `null`. OAuth Scopes: report - :param page: The page number to retrieve. Defaults to 1. + :param page: The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. :type page: int :param page_size: The number of records to retrieve per page. Defaults to 500. Maximum is 1000. :type page_size: int @@ -467,7 +850,7 @@ def list_reports_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_reports_serialize( page=page, @@ -475,48 +858,47 @@ def list_reports_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ReportsResponse", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "ReportsResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_reports_without_preload_content( self, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field( + description="The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1." + ), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Reports - Retrieve a paginated list of saved custom reports available in the account. Returns each report's ID and name. Use the report ID with GET /api/v1/custom-reports/{reportId} to fetch the report's data. Results default to 500 records per page. + Returns a paginated list of saved custom reports available in the account. Each report entry contains an `id` (integer) and a `name` (string). Pass a report's `id` to \"Get Report by ID\" to execute it and retrieve its data. Results default to page 1 with 500 records per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page rather than returning an error. Invalid or zero values for `page` and `page_size` fall back to their defaults. The `pagination` object includes `total_records`, `current_page`, `total_pages`, and nullable `next_page`/`prev_page` links. When there is no next or previous page the corresponding value is `null`. OAuth Scopes: report - :param page: The page number to retrieve. Defaults to 1. + :param page: The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. :type page: int :param page_size: The number of records to retrieve per page. Defaults to 500. Maximum is 1000. :type page_size: int @@ -540,7 +922,7 @@ def list_reports_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_reports_serialize( page=page, @@ -548,21 +930,17 @@ def list_reports_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ReportsResponse", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "ReportsResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_reports_serialize( self, page, @@ -575,51 +953,37 @@ def _list_reports_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + _query_params.append(("page", page)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/custom-reports', + method="GET", + resource_path="/api/v1/custom-reports", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -629,7 +993,5 @@ def _list_reports_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/datasets_api.py b/bamboohr_sdk/api/datasets_api.py index 63fc984..bdc3004 100644 --- a/bamboohr_sdk/api/datasets_api.py +++ b/bamboohr_sdk/api/datasets_api.py @@ -1,34 +1,30 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call -from pydantic import Field, StrictStr -from typing import Dict, List, Optional -from typing_extensions import Annotated +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.models.data_request import DataRequest +from bamboohr_sdk.models.dataset_data_response_v2 import DatasetDataResponseV2 from bamboohr_sdk.models.dataset_fields_response import DatasetFieldsResponse -from bamboohr_sdk.models.dataset_response import DatasetResponse -from bamboohr_sdk.models.datasets_response import DatasetsResponse +from bamboohr_sdk.models.dataset_response_v1 import DatasetResponseV1 +from bamboohr_sdk.models.datasets_response_v12 import DatasetsResponseV12 from bamboohr_sdk.models.employee_response import EmployeeResponse from bamboohr_sdk.models.field_options_request_schema import FieldOptionsRequestSchema from bamboohr_sdk.models.field_options_transformer import FieldOptionsTransformer - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.get_data_from_dataset_v2_request import GetDataFromDatasetV2Request from bamboohr_sdk.rest import RESTResponseType @@ -44,32 +40,37 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call - def get_data_from_dataset( + def get_data_from_dataset_v1( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want data from")], + dataset_name: Annotated[ + StrictStr | None, + Field( + description='The machine-readable name of the dataset to query. Use "List Datasets (v1.2)" to discover available names.' + ), + ], data_request: DataRequest, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> EmployeeResponse: - """Get Data from Dataset + """(Deprecated) Get Data from Dataset (v1) - Retrieve data from the specified dataset. You must provide a list of fields to return; use GET /api/v1/datasets/{datasetName}/fields to discover available field names. Returns a paginated list of records under the `data` key, along with optional `aggregations` and a `pagination` block. Results default to 500 records per page. Use the `page` and `page_size` query parameters to paginate through large result sets. **Deprecation notice:** This endpoint is deprecated. Use POST /api/v2/datasets/{datasetName}/data instead. ***Field Settings:*** **Show History** When any of the fields included in your request are historical table fields, you may include the `showHistory` setting. Example: `\"showHistory\":[\"entityName\"]`. Entity Name can be found in the GET /api/v1/datasets/{datasetName}/fields endpoint. **Sort By:** Pass multiple fields to sort by as an array of objects `{field: \"fieldName\", sort: \"asc\"}`. The order of the fields in the array determines the sort priority. **Group By:** Passed as an array of strings. Currently grouping by more than one field is not supported. **Aggregations:** When using aggregations the following aggregates are available based on field type: - **text**: count - **date**: count, min, max - **int**: count, min, max, sum, avg - **bool**: count - **options**: count - **govIdText**: count **Filters:** When using filters, the filtered field does not have to be in the list of fields you want to show on the report. **Important Filter Notes:** - **List filter values** (for `options` field type using `includes` or `does_not_include` operators) must be enclosed in square brackets [ ]. Example: `[\"value1\", \"value2\"]` - **Future hires**: Future hires have a status of `Inactive` in the datasets API. To include future hires in your results, you must include `Inactive` in your status filter. Use GET /api/v1/datasets/{datasetName}/field-options to retrieve possible filter values for fields. Use the `id` returned from the field-options endpoint. **Filter Operators by Field Type:** - **text**: contains, does_not_contain, equal, not_equal, empty, not_empty - **date**: lt, lte, gt, gte, equal, not_equal, empty, not_empty, last (value: `{\"duration\": \"5\", \"unit\": \"years\"}`), next, range (value: `{\"start\": \"2023-01-01\", \"end\": \"2023-12-31\"}`) - **int**: equal, not_equal, gte, gt, lte, lt, empty, not_empty - **bool**: checked, not_checked - **options**: includes, does_not_include, empty, not_empty - **govIdText**: empty, not_empty + Deprecated. Use \"Get Data from Dataset (v2)\" instead. Retrieves records from the specified dataset using the fields, filters, sorting, grouping, and aggregations supplied in the request body. Provide field names in the `fields` array; use \"Get Fields from Dataset (v1.2)\" to discover available names. The response contains paginated rows under `data`, an `aggregations` array (empty when none requested), and a `pagination` block with page navigation links. Results default to page 1 with 500 records per page (maximum 1000). Use \"Get Field Options (v1.2)\" to retrieve valid filter values. Filter fields do not need to appear in the `fields` list. Future hires have a status of `Inactive`; include it in your status filter to retrieve them. For `options`-type fields using `includes`/`does_not_include`, pass the filter value as an array enclosed in square brackets, for example `[\"Full-Time\", \"Part-Time\"]`. When any requested fields are historical table fields, pass their entity names in `showHistory`; entity names are returned by \"Get Fields from Dataset (v1.2)\". Grouping (`groupBy`) currently supports only one field; when active, `data` becomes an object keyed by group value instead of an array. Sort priority follows the order of objects in `sortBy`. Aggregations accept a `defaultAggregation` applied to every field and/or per-field `overridingAggregations`. **Aggregations by field type:** text: count; date: count, min, max; int: count, min, max, sum, avg; bool: count; options: count; govIdText: count. **Filter operators by field type:** text: contains, does_not_contain, equal, not_equal, empty, not_empty; date: lt, lte, gt, gte (each accepts a YYYY-MM-DD date string or a relative object `{\"duration\": \"N\", \"unit\": \"days|weeks|months|years\"}` where duration is a number as a string — lt/lte are measured backward from today, gt/gte forward), equal, not_equal, empty, not_empty, last, next (relative object `{\"duration\": \"N\", \"unit\": \"days|weeks|months|years\"}`), range (object `{\"start\": \"YYYY-MM-DD\", \"end\": \"YYYY-MM-DD\"}`); int: equal, not_equal, gte, gt, lte, lt, empty, not_empty; bool: checked, not_checked; options: includes, does_not_include, empty, not_empty; govIdText: empty, not_empty. OAuth Scopes: report - :param dataset_name: The name of the dataset you want data from (required) + :param dataset_name: The machine-readable name of the dataset to query. Use \"List Datasets (v1.2)\" to discover available names. (required) :type dataset_name: str :param data_request: (required) :type data_request: DataRequest @@ -97,9 +98,10 @@ def get_data_from_dataset( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/datasets/{datasetName} is deprecated.", DeprecationWarning) - _param = self._get_data_from_dataset_serialize( + _param = self._get_data_from_dataset_v1_serialize( dataset_name=dataset_name, data_request=data_request, page=page, @@ -107,51 +109,53 @@ def get_data_from_dataset( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeResponse", - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeResponse", + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_data_from_dataset_with_http_info( + def get_data_from_dataset_v1_with_http_info( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want data from")], + dataset_name: Annotated[ + StrictStr | None, + Field( + description='The machine-readable name of the dataset to query. Use "List Datasets (v1.2)" to discover available names.' + ), + ], data_request: DataRequest, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[EmployeeResponse]: - """Get Data from Dataset + """(Deprecated) Get Data from Dataset (v1) - Retrieve data from the specified dataset. You must provide a list of fields to return; use GET /api/v1/datasets/{datasetName}/fields to discover available field names. Returns a paginated list of records under the `data` key, along with optional `aggregations` and a `pagination` block. Results default to 500 records per page. Use the `page` and `page_size` query parameters to paginate through large result sets. **Deprecation notice:** This endpoint is deprecated. Use POST /api/v2/datasets/{datasetName}/data instead. ***Field Settings:*** **Show History** When any of the fields included in your request are historical table fields, you may include the `showHistory` setting. Example: `\"showHistory\":[\"entityName\"]`. Entity Name can be found in the GET /api/v1/datasets/{datasetName}/fields endpoint. **Sort By:** Pass multiple fields to sort by as an array of objects `{field: \"fieldName\", sort: \"asc\"}`. The order of the fields in the array determines the sort priority. **Group By:** Passed as an array of strings. Currently grouping by more than one field is not supported. **Aggregations:** When using aggregations the following aggregates are available based on field type: - **text**: count - **date**: count, min, max - **int**: count, min, max, sum, avg - **bool**: count - **options**: count - **govIdText**: count **Filters:** When using filters, the filtered field does not have to be in the list of fields you want to show on the report. **Important Filter Notes:** - **List filter values** (for `options` field type using `includes` or `does_not_include` operators) must be enclosed in square brackets [ ]. Example: `[\"value1\", \"value2\"]` - **Future hires**: Future hires have a status of `Inactive` in the datasets API. To include future hires in your results, you must include `Inactive` in your status filter. Use GET /api/v1/datasets/{datasetName}/field-options to retrieve possible filter values for fields. Use the `id` returned from the field-options endpoint. **Filter Operators by Field Type:** - **text**: contains, does_not_contain, equal, not_equal, empty, not_empty - **date**: lt, lte, gt, gte, equal, not_equal, empty, not_empty, last (value: `{\"duration\": \"5\", \"unit\": \"years\"}`), next, range (value: `{\"start\": \"2023-01-01\", \"end\": \"2023-12-31\"}`) - **int**: equal, not_equal, gte, gt, lte, lt, empty, not_empty - **bool**: checked, not_checked - **options**: includes, does_not_include, empty, not_empty - **govIdText**: empty, not_empty + Deprecated. Use \"Get Data from Dataset (v2)\" instead. Retrieves records from the specified dataset using the fields, filters, sorting, grouping, and aggregations supplied in the request body. Provide field names in the `fields` array; use \"Get Fields from Dataset (v1.2)\" to discover available names. The response contains paginated rows under `data`, an `aggregations` array (empty when none requested), and a `pagination` block with page navigation links. Results default to page 1 with 500 records per page (maximum 1000). Use \"Get Field Options (v1.2)\" to retrieve valid filter values. Filter fields do not need to appear in the `fields` list. Future hires have a status of `Inactive`; include it in your status filter to retrieve them. For `options`-type fields using `includes`/`does_not_include`, pass the filter value as an array enclosed in square brackets, for example `[\"Full-Time\", \"Part-Time\"]`. When any requested fields are historical table fields, pass their entity names in `showHistory`; entity names are returned by \"Get Fields from Dataset (v1.2)\". Grouping (`groupBy`) currently supports only one field; when active, `data` becomes an object keyed by group value instead of an array. Sort priority follows the order of objects in `sortBy`. Aggregations accept a `defaultAggregation` applied to every field and/or per-field `overridingAggregations`. **Aggregations by field type:** text: count; date: count, min, max; int: count, min, max, sum, avg; bool: count; options: count; govIdText: count. **Filter operators by field type:** text: contains, does_not_contain, equal, not_equal, empty, not_empty; date: lt, lte, gt, gte (each accepts a YYYY-MM-DD date string or a relative object `{\"duration\": \"N\", \"unit\": \"days|weeks|months|years\"}` where duration is a number as a string — lt/lte are measured backward from today, gt/gte forward), equal, not_equal, empty, not_empty, last, next (relative object `{\"duration\": \"N\", \"unit\": \"days|weeks|months|years\"}`), range (object `{\"start\": \"YYYY-MM-DD\", \"end\": \"YYYY-MM-DD\"}`); int: equal, not_equal, gte, gt, lte, lt, empty, not_empty; bool: checked, not_checked; options: includes, does_not_include, empty, not_empty; govIdText: empty, not_empty. OAuth Scopes: report - :param dataset_name: The name of the dataset you want data from (required) + :param dataset_name: The machine-readable name of the dataset to query. Use \"List Datasets (v1.2)\" to discover available names. (required) :type dataset_name: str :param data_request: (required) :type data_request: DataRequest @@ -179,9 +183,10 @@ def get_data_from_dataset_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/datasets/{datasetName} is deprecated.", DeprecationWarning) - _param = self._get_data_from_dataset_serialize( + _param = self._get_data_from_dataset_v1_serialize( dataset_name=dataset_name, data_request=data_request, page=page, @@ -189,51 +194,53 @@ def get_data_from_dataset_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeResponse", - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeResponse", + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_data_from_dataset_without_preload_content( + def get_data_from_dataset_v1_without_preload_content( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want data from")], + dataset_name: Annotated[ + StrictStr | None, + Field( + description='The machine-readable name of the dataset to query. Use "List Datasets (v1.2)" to discover available names.' + ), + ], data_request: DataRequest, - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Data from Dataset + """(Deprecated) Get Data from Dataset (v1) - Retrieve data from the specified dataset. You must provide a list of fields to return; use GET /api/v1/datasets/{datasetName}/fields to discover available field names. Returns a paginated list of records under the `data` key, along with optional `aggregations` and a `pagination` block. Results default to 500 records per page. Use the `page` and `page_size` query parameters to paginate through large result sets. **Deprecation notice:** This endpoint is deprecated. Use POST /api/v2/datasets/{datasetName}/data instead. ***Field Settings:*** **Show History** When any of the fields included in your request are historical table fields, you may include the `showHistory` setting. Example: `\"showHistory\":[\"entityName\"]`. Entity Name can be found in the GET /api/v1/datasets/{datasetName}/fields endpoint. **Sort By:** Pass multiple fields to sort by as an array of objects `{field: \"fieldName\", sort: \"asc\"}`. The order of the fields in the array determines the sort priority. **Group By:** Passed as an array of strings. Currently grouping by more than one field is not supported. **Aggregations:** When using aggregations the following aggregates are available based on field type: - **text**: count - **date**: count, min, max - **int**: count, min, max, sum, avg - **bool**: count - **options**: count - **govIdText**: count **Filters:** When using filters, the filtered field does not have to be in the list of fields you want to show on the report. **Important Filter Notes:** - **List filter values** (for `options` field type using `includes` or `does_not_include` operators) must be enclosed in square brackets [ ]. Example: `[\"value1\", \"value2\"]` - **Future hires**: Future hires have a status of `Inactive` in the datasets API. To include future hires in your results, you must include `Inactive` in your status filter. Use GET /api/v1/datasets/{datasetName}/field-options to retrieve possible filter values for fields. Use the `id` returned from the field-options endpoint. **Filter Operators by Field Type:** - **text**: contains, does_not_contain, equal, not_equal, empty, not_empty - **date**: lt, lte, gt, gte, equal, not_equal, empty, not_empty, last (value: `{\"duration\": \"5\", \"unit\": \"years\"}`), next, range (value: `{\"start\": \"2023-01-01\", \"end\": \"2023-12-31\"}`) - **int**: equal, not_equal, gte, gt, lte, lt, empty, not_empty - **bool**: checked, not_checked - **options**: includes, does_not_include, empty, not_empty - **govIdText**: empty, not_empty + Deprecated. Use \"Get Data from Dataset (v2)\" instead. Retrieves records from the specified dataset using the fields, filters, sorting, grouping, and aggregations supplied in the request body. Provide field names in the `fields` array; use \"Get Fields from Dataset (v1.2)\" to discover available names. The response contains paginated rows under `data`, an `aggregations` array (empty when none requested), and a `pagination` block with page navigation links. Results default to page 1 with 500 records per page (maximum 1000). Use \"Get Field Options (v1.2)\" to retrieve valid filter values. Filter fields do not need to appear in the `fields` list. Future hires have a status of `Inactive`; include it in your status filter to retrieve them. For `options`-type fields using `includes`/`does_not_include`, pass the filter value as an array enclosed in square brackets, for example `[\"Full-Time\", \"Part-Time\"]`. When any requested fields are historical table fields, pass their entity names in `showHistory`; entity names are returned by \"Get Fields from Dataset (v1.2)\". Grouping (`groupBy`) currently supports only one field; when active, `data` becomes an object keyed by group value instead of an array. Sort priority follows the order of objects in `sortBy`. Aggregations accept a `defaultAggregation` applied to every field and/or per-field `overridingAggregations`. **Aggregations by field type:** text: count; date: count, min, max; int: count, min, max, sum, avg; bool: count; options: count; govIdText: count. **Filter operators by field type:** text: contains, does_not_contain, equal, not_equal, empty, not_empty; date: lt, lte, gt, gte (each accepts a YYYY-MM-DD date string or a relative object `{\"duration\": \"N\", \"unit\": \"days|weeks|months|years\"}` where duration is a number as a string — lt/lte are measured backward from today, gt/gte forward), equal, not_equal, empty, not_empty, last, next (relative object `{\"duration\": \"N\", \"unit\": \"days|weeks|months|years\"}`), range (object `{\"start\": \"YYYY-MM-DD\", \"end\": \"YYYY-MM-DD\"}`); int: equal, not_equal, gte, gt, lte, lt, empty, not_empty; bool: checked, not_checked; options: includes, does_not_include, empty, not_empty; govIdText: empty, not_empty. OAuth Scopes: report - :param dataset_name: The name of the dataset you want data from (required) + :param dataset_name: The machine-readable name of the dataset to query. Use \"List Datasets (v1.2)\" to discover available names. (required) :type dataset_name: str :param data_request: (required) :type data_request: DataRequest @@ -261,9 +268,10 @@ def get_data_from_dataset_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/datasets/{datasetName} is deprecated.", DeprecationWarning) - _param = self._get_data_from_dataset_serialize( + _param = self._get_data_from_dataset_v1_serialize( dataset_name=dataset_name, data_request=data_request, page=page, @@ -271,23 +279,19 @@ def get_data_from_dataset_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "EmployeeResponse", - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeeResponse", + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_data_from_dataset_serialize( + def _get_data_from_dataset_v1_serialize( self, dataset_name, data_request, @@ -301,68 +305,49 @@ def _get_data_from_dataset_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if dataset_name is not None: - _path_params['datasetName'] = dataset_name + _path_params["datasetName"] = dataset_name # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + _query_params.append(("page", page)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter if data_request is not None: _body_params = data_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/datasets/{datasetName}', + method="POST", + resource_path="/api/v1/datasets/{datasetName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -372,32 +357,37 @@ def _get_data_from_dataset_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_datasets( + def get_data_from_dataset_v2( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + dataset_name: Annotated[ + StrictStr | None, + Field( + description="Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1_2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`." + ), + ], + get_data_from_dataset_v2_request: Annotated[ + GetDataFromDatasetV2Request, Field(description="Request parameters for dataset data retrieval") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DatasetResponse: - """Get Datasets + ) -> DatasetDataResponseV2: + """Get Data from Dataset (v2) - Retrieve the list of available datasets that can be queried. Returns each dataset's machine-readable name (used in subsequent dataset API calls) and its human-readable label. Use the returned `name` values with POST /api/v1/datasets/{datasetName} to query data, and GET /api/v1/datasets/{datasetName}/fields to discover available fields. **Deprecation notice:** This endpoint is deprecated. Use GET /api/v1_2/datasets instead. + Queries the named dataset and returns the matching rows. The response is a JSON object with `data` (an array of row objects, each wrapping its values under a `fields` object whose keys match the requested field names), `links` (pagination navigation URLs; `prev` and/or `next`, omitted at boundaries), and `meta` (with `page`, `pageSize`, `totalPages`, `totalItems`). Use this for tabular reporting, custom field selection across many employees, and OData-style filtering against the full dataset field catalog. For multiple employees, use List Employees (`list-employees`). For the full set of fields on a single employee, use Get Employee (`get-employee`). Dataset access itself requires elevated permissions, so a caller without them receives `403` here regardless of which fields are requested. For information published in a coworker's company directory entry, such as job title, department, location, work contact details, or who they report to, use Get Employees Directory (`get-employees-directory`), which is governed by directory sharing settings rather than by per-employee record permissions and is available when directory or org-chart access is shared with the caller's access level. Discover valid `datasetName` values via List Datasets (v1.2) (`list-datasets-v1_2`). Discover valid field names for a dataset via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`); the field set is dataset-specific. Field-name vocabulary differs from the dedicated employee endpoints. The `employee` dataset uses fully qualified names such as `jobInformationJobTitle`, `jobInformationDepartment`, `jobInformationReportsTo`, and `employmentStatus`, where the employee endpoints use endpoint-specific shorter names — for example `jobTitleName` on List Employees (`list-employees`), and `jobTitle`, `department`, `supervisor`, and `workEmail` on Get Employee (`get-employee`). Identifier and contact fields also differ: the dataset's internal employee identifier is `eeid` (`get-employee` returns the same value as `id`, and `list-employees` as `employeeId`); the dataset's work-email field is `email` (`get-employee` uses `workEmail`). The dataset also exposes `employeeNumber` — the editable Employee # value, not the internal employee ID. Do not pass `employeeNumber` to employee ID inputs such as `filter[ids]` or `{id}` path parameters; it may fail with `404` or resolve to a different employee whose internal employee ID happens to match. Always source field names from Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`) — names from the employee endpoints will not necessarily resolve here. For routine `employee` dataset lookups, a useful starter field set is: `firstName`, `lastName`, `eeid` (internal employee ID), `employeeNumber` (Employee # / editable employee number), `email` (work email), `mobilePhone`, `hireDate`, `employmentStatus`, `jobInformationJobTitle`, `jobInformationDepartment`, `jobInformationLocation`, `jobInformationReportsTo` (supervisor's name), and `supervisorEid` (supervisor's `eeid`). The full catalog (over 450 fields) is discoverable via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`) — use it when you need anything beyond this starter set. Filter expressions use OData-style syntax with comparison operators `eq`, `ne`, `lt`, `le`, `gt`, `ge`, the list-membership operator `in (...)`, and logical operators `and` / `or`. The parser does not support `not in`; use `ne` for the inverse of `eq`, and on options-type fields `ne` already applies set-membership negation under the hood. A single filter expression may use `and` or `or`, but not both; mixed logical expressions return `422` with code `INVALID_FILTER`. Operator support varies by field type: `eq` / `ne` work on text, numeric, date, and options-type (single-select enum) fields like `status`, `employmentStatus`, and `jobInformationDepartment`; ordering operators `lt`, `le`, `gt`, `ge` are supported on numeric and date fields. The list operator `in` is the natural fit on options-type fields (e.g. `status in ('Active','Inactive')`), and is also accepted on text, numeric, and date fields when used with a single value (e.g. `firstName in ('Ashley')`, equivalent to `firstName eq 'Ashley'`); multi-value `in` on non-options fields returns `422`. To check a field's type, see the `type` value returned by Get Fields from Dataset (v1.2). Filter fields do not need to appear in the `fields` array; rows are filtered server-side. String literals in filter expressions are wrapped in single quotes, e.g. `firstName eq 'Ashley'` or `status in ('Active','Inactive')`. On date fields, the ordering operators also accept a relative-date duration literal in OData v4 / ISO 8601 form, e.g. `hireDate ge duration'P30D'`. The literal resolves against today at query time: with `lt` / `le` it resolves to today minus the duration, with `gt` / `ge` to today plus the duration (so `terminationDate lt duration'P6M'` matches dates before six months ago, and `hireDate ge duration'P30D'` matches dates from 30 days in the future onward). A negative duration reverses the direction — `hireDate ge duration'-P30D'` matches hire dates from 30 days ago onward (i.e. anyone hired in the last 30 days), including any future-dated hires. Exactly one date component is required — `PY` (years), `PM` (months), `PW` (weeks), or `PD` (days). Combined components (`P1Y6M`), time components (`PT12H`), and duration literals with `eq` / `ne` / `in` return `422` with code `INVALID_FILTER`. `orderBy` is a comma-separated list of ` ` rules. Every field used in `orderBy` must also appear in the `fields` array; omitting it returns a `400` with code `UE-1001`. `orderBy` is optional; with no `orderBy` the row order is unspecified. Field-level access is enforced server-side based on the authenticated caller's permissions and OAuth scopes. When a caller lacks permission to read a requested field, the field is still returned in each row with an empty value, and its canonical name is listed in that row's `_restrictedFields` array (e.g., `_restrictedFields: [\"employee_employeeNumber\"]`) — the request is not rejected, and other requested fields still come back. This differs from Get Employee (`get-employee`), which silently omits unauthorized fields with no marker, leaving an absent field ambiguous between \"not requested\" and \"not permitted\". Callers without dataset-level access receive `403`, and a dataset the caller cannot see at all returns `404` (\"not accessible\" rather than disclosing existence). Bad field names in `fields` or `filter` return `400` with `code: INVALID_ARGUMENT` and the offending name in the `detail` field (e.g., `\"Invalid field name: employee_workEmail\"`). The reported name carries the internal `_` prefix; the actual misspelling is the unprefixed form. Confirm spelling against Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`). Note: the field name appears in `detail` (singular); the `details` field (plural) remains empty in this error class. (Bad names in `orderBy` hit the must-be-in-`fields` check above first and return `UE-1001` rather than `INVALID_ARGUMENT`.) Pagination: `page` defaults to `1` and `pageSize` defaults to `100` (maximum `1000`). `meta.totalItems` is the count of rows matching the query across all pages, `meta.totalPages` is `ceil(totalItems / pageSize)`, and `data` contains at most `pageSize` rows for the requested page. `links.next` is present when more pages exist; `links.prev` is present when not on the first page. Errors follow RFC 7807 (`application/problem+json`). Note: Compared to Get Data from Dataset (v1) (`get-data-from-dataset-v1`), this version uses `filter` and `orderBy` request fields instead of the legacy `filters` and `sortBy` structures, moves pagination inputs to body fields (`page`, `pageSize`) instead of query parameters, returns pagination in `links` / `meta` objects instead of a legacy `pagination` object, and returns RFC 7807 compliant error responses with an `X-Request-ID` correlation header. OAuth Scopes: report + :param dataset_name: Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1_2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`. (required) + :type dataset_name: str + :param get_data_from_dataset_v2_request: Request parameters for dataset data retrieval (required) + :type get_data_from_dataset_v2_request: GetDataFromDatasetV2Request :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -418,51 +408,62 @@ def get_datasets( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_datasets_serialize( + _param = self._get_data_from_dataset_v2_serialize( + dataset_name=dataset_name, + get_data_from_dataset_v2_request=get_data_from_dataset_v2_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetResponse", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "DatasetDataResponseV2", + "400": "ProblemDetailsResponse", + "401": None, + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "413": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_datasets_with_http_info( + def get_data_from_dataset_v2_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + dataset_name: Annotated[ + StrictStr | None, + Field( + description="Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1_2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`." + ), + ], + get_data_from_dataset_v2_request: Annotated[ + GetDataFromDatasetV2Request, Field(description="Request parameters for dataset data retrieval") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DatasetResponse]: - """Get Datasets + ) -> ApiResponse[DatasetDataResponseV2]: + """Get Data from Dataset (v2) - Retrieve the list of available datasets that can be queried. Returns each dataset's machine-readable name (used in subsequent dataset API calls) and its human-readable label. Use the returned `name` values with POST /api/v1/datasets/{datasetName} to query data, and GET /api/v1/datasets/{datasetName}/fields to discover available fields. **Deprecation notice:** This endpoint is deprecated. Use GET /api/v1_2/datasets instead. + Queries the named dataset and returns the matching rows. The response is a JSON object with `data` (an array of row objects, each wrapping its values under a `fields` object whose keys match the requested field names), `links` (pagination navigation URLs; `prev` and/or `next`, omitted at boundaries), and `meta` (with `page`, `pageSize`, `totalPages`, `totalItems`). Use this for tabular reporting, custom field selection across many employees, and OData-style filtering against the full dataset field catalog. For multiple employees, use List Employees (`list-employees`). For the full set of fields on a single employee, use Get Employee (`get-employee`). Dataset access itself requires elevated permissions, so a caller without them receives `403` here regardless of which fields are requested. For information published in a coworker's company directory entry, such as job title, department, location, work contact details, or who they report to, use Get Employees Directory (`get-employees-directory`), which is governed by directory sharing settings rather than by per-employee record permissions and is available when directory or org-chart access is shared with the caller's access level. Discover valid `datasetName` values via List Datasets (v1.2) (`list-datasets-v1_2`). Discover valid field names for a dataset via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`); the field set is dataset-specific. Field-name vocabulary differs from the dedicated employee endpoints. The `employee` dataset uses fully qualified names such as `jobInformationJobTitle`, `jobInformationDepartment`, `jobInformationReportsTo`, and `employmentStatus`, where the employee endpoints use endpoint-specific shorter names — for example `jobTitleName` on List Employees (`list-employees`), and `jobTitle`, `department`, `supervisor`, and `workEmail` on Get Employee (`get-employee`). Identifier and contact fields also differ: the dataset's internal employee identifier is `eeid` (`get-employee` returns the same value as `id`, and `list-employees` as `employeeId`); the dataset's work-email field is `email` (`get-employee` uses `workEmail`). The dataset also exposes `employeeNumber` — the editable Employee # value, not the internal employee ID. Do not pass `employeeNumber` to employee ID inputs such as `filter[ids]` or `{id}` path parameters; it may fail with `404` or resolve to a different employee whose internal employee ID happens to match. Always source field names from Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`) — names from the employee endpoints will not necessarily resolve here. For routine `employee` dataset lookups, a useful starter field set is: `firstName`, `lastName`, `eeid` (internal employee ID), `employeeNumber` (Employee # / editable employee number), `email` (work email), `mobilePhone`, `hireDate`, `employmentStatus`, `jobInformationJobTitle`, `jobInformationDepartment`, `jobInformationLocation`, `jobInformationReportsTo` (supervisor's name), and `supervisorEid` (supervisor's `eeid`). The full catalog (over 450 fields) is discoverable via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`) — use it when you need anything beyond this starter set. Filter expressions use OData-style syntax with comparison operators `eq`, `ne`, `lt`, `le`, `gt`, `ge`, the list-membership operator `in (...)`, and logical operators `and` / `or`. The parser does not support `not in`; use `ne` for the inverse of `eq`, and on options-type fields `ne` already applies set-membership negation under the hood. A single filter expression may use `and` or `or`, but not both; mixed logical expressions return `422` with code `INVALID_FILTER`. Operator support varies by field type: `eq` / `ne` work on text, numeric, date, and options-type (single-select enum) fields like `status`, `employmentStatus`, and `jobInformationDepartment`; ordering operators `lt`, `le`, `gt`, `ge` are supported on numeric and date fields. The list operator `in` is the natural fit on options-type fields (e.g. `status in ('Active','Inactive')`), and is also accepted on text, numeric, and date fields when used with a single value (e.g. `firstName in ('Ashley')`, equivalent to `firstName eq 'Ashley'`); multi-value `in` on non-options fields returns `422`. To check a field's type, see the `type` value returned by Get Fields from Dataset (v1.2). Filter fields do not need to appear in the `fields` array; rows are filtered server-side. String literals in filter expressions are wrapped in single quotes, e.g. `firstName eq 'Ashley'` or `status in ('Active','Inactive')`. On date fields, the ordering operators also accept a relative-date duration literal in OData v4 / ISO 8601 form, e.g. `hireDate ge duration'P30D'`. The literal resolves against today at query time: with `lt` / `le` it resolves to today minus the duration, with `gt` / `ge` to today plus the duration (so `terminationDate lt duration'P6M'` matches dates before six months ago, and `hireDate ge duration'P30D'` matches dates from 30 days in the future onward). A negative duration reverses the direction — `hireDate ge duration'-P30D'` matches hire dates from 30 days ago onward (i.e. anyone hired in the last 30 days), including any future-dated hires. Exactly one date component is required — `PY` (years), `PM` (months), `PW` (weeks), or `PD` (days). Combined components (`P1Y6M`), time components (`PT12H`), and duration literals with `eq` / `ne` / `in` return `422` with code `INVALID_FILTER`. `orderBy` is a comma-separated list of ` ` rules. Every field used in `orderBy` must also appear in the `fields` array; omitting it returns a `400` with code `UE-1001`. `orderBy` is optional; with no `orderBy` the row order is unspecified. Field-level access is enforced server-side based on the authenticated caller's permissions and OAuth scopes. When a caller lacks permission to read a requested field, the field is still returned in each row with an empty value, and its canonical name is listed in that row's `_restrictedFields` array (e.g., `_restrictedFields: [\"employee_employeeNumber\"]`) — the request is not rejected, and other requested fields still come back. This differs from Get Employee (`get-employee`), which silently omits unauthorized fields with no marker, leaving an absent field ambiguous between \"not requested\" and \"not permitted\". Callers without dataset-level access receive `403`, and a dataset the caller cannot see at all returns `404` (\"not accessible\" rather than disclosing existence). Bad field names in `fields` or `filter` return `400` with `code: INVALID_ARGUMENT` and the offending name in the `detail` field (e.g., `\"Invalid field name: employee_workEmail\"`). The reported name carries the internal `_` prefix; the actual misspelling is the unprefixed form. Confirm spelling against Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`). Note: the field name appears in `detail` (singular); the `details` field (plural) remains empty in this error class. (Bad names in `orderBy` hit the must-be-in-`fields` check above first and return `UE-1001` rather than `INVALID_ARGUMENT`.) Pagination: `page` defaults to `1` and `pageSize` defaults to `100` (maximum `1000`). `meta.totalItems` is the count of rows matching the query across all pages, `meta.totalPages` is `ceil(totalItems / pageSize)`, and `data` contains at most `pageSize` rows for the requested page. `links.next` is present when more pages exist; `links.prev` is present when not on the first page. Errors follow RFC 7807 (`application/problem+json`). Note: Compared to Get Data from Dataset (v1) (`get-data-from-dataset-v1`), this version uses `filter` and `orderBy` request fields instead of the legacy `filters` and `sortBy` structures, moves pagination inputs to body fields (`page`, `pageSize`) instead of query parameters, returns pagination in `links` / `meta` objects instead of a legacy `pagination` object, and returns RFC 7807 compliant error responses with an `X-Request-ID` correlation header. OAuth Scopes: report + :param dataset_name: Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1_2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`. (required) + :type dataset_name: str + :param get_data_from_dataset_v2_request: Request parameters for dataset data retrieval (required) + :type get_data_from_dataset_v2_request: GetDataFromDatasetV2Request :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -483,51 +484,62 @@ def get_datasets_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_datasets_serialize( + _param = self._get_data_from_dataset_v2_serialize( + dataset_name=dataset_name, + get_data_from_dataset_v2_request=get_data_from_dataset_v2_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetResponse", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "DatasetDataResponseV2", + "400": "ProblemDetailsResponse", + "401": None, + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "413": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_datasets_without_preload_content( + def get_data_from_dataset_v2_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + dataset_name: Annotated[ + StrictStr | None, + Field( + description="Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1_2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`." + ), + ], + get_data_from_dataset_v2_request: Annotated[ + GetDataFromDatasetV2Request, Field(description="Request parameters for dataset data retrieval") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Datasets + """Get Data from Dataset (v2) - Retrieve the list of available datasets that can be queried. Returns each dataset's machine-readable name (used in subsequent dataset API calls) and its human-readable label. Use the returned `name` values with POST /api/v1/datasets/{datasetName} to query data, and GET /api/v1/datasets/{datasetName}/fields to discover available fields. **Deprecation notice:** This endpoint is deprecated. Use GET /api/v1_2/datasets instead. + Queries the named dataset and returns the matching rows. The response is a JSON object with `data` (an array of row objects, each wrapping its values under a `fields` object whose keys match the requested field names), `links` (pagination navigation URLs; `prev` and/or `next`, omitted at boundaries), and `meta` (with `page`, `pageSize`, `totalPages`, `totalItems`). Use this for tabular reporting, custom field selection across many employees, and OData-style filtering against the full dataset field catalog. For multiple employees, use List Employees (`list-employees`). For the full set of fields on a single employee, use Get Employee (`get-employee`). Dataset access itself requires elevated permissions, so a caller without them receives `403` here regardless of which fields are requested. For information published in a coworker's company directory entry, such as job title, department, location, work contact details, or who they report to, use Get Employees Directory (`get-employees-directory`), which is governed by directory sharing settings rather than by per-employee record permissions and is available when directory or org-chart access is shared with the caller's access level. Discover valid `datasetName` values via List Datasets (v1.2) (`list-datasets-v1_2`). Discover valid field names for a dataset via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`); the field set is dataset-specific. Field-name vocabulary differs from the dedicated employee endpoints. The `employee` dataset uses fully qualified names such as `jobInformationJobTitle`, `jobInformationDepartment`, `jobInformationReportsTo`, and `employmentStatus`, where the employee endpoints use endpoint-specific shorter names — for example `jobTitleName` on List Employees (`list-employees`), and `jobTitle`, `department`, `supervisor`, and `workEmail` on Get Employee (`get-employee`). Identifier and contact fields also differ: the dataset's internal employee identifier is `eeid` (`get-employee` returns the same value as `id`, and `list-employees` as `employeeId`); the dataset's work-email field is `email` (`get-employee` uses `workEmail`). The dataset also exposes `employeeNumber` — the editable Employee # value, not the internal employee ID. Do not pass `employeeNumber` to employee ID inputs such as `filter[ids]` or `{id}` path parameters; it may fail with `404` or resolve to a different employee whose internal employee ID happens to match. Always source field names from Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`) — names from the employee endpoints will not necessarily resolve here. For routine `employee` dataset lookups, a useful starter field set is: `firstName`, `lastName`, `eeid` (internal employee ID), `employeeNumber` (Employee # / editable employee number), `email` (work email), `mobilePhone`, `hireDate`, `employmentStatus`, `jobInformationJobTitle`, `jobInformationDepartment`, `jobInformationLocation`, `jobInformationReportsTo` (supervisor's name), and `supervisorEid` (supervisor's `eeid`). The full catalog (over 450 fields) is discoverable via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`) — use it when you need anything beyond this starter set. Filter expressions use OData-style syntax with comparison operators `eq`, `ne`, `lt`, `le`, `gt`, `ge`, the list-membership operator `in (...)`, and logical operators `and` / `or`. The parser does not support `not in`; use `ne` for the inverse of `eq`, and on options-type fields `ne` already applies set-membership negation under the hood. A single filter expression may use `and` or `or`, but not both; mixed logical expressions return `422` with code `INVALID_FILTER`. Operator support varies by field type: `eq` / `ne` work on text, numeric, date, and options-type (single-select enum) fields like `status`, `employmentStatus`, and `jobInformationDepartment`; ordering operators `lt`, `le`, `gt`, `ge` are supported on numeric and date fields. The list operator `in` is the natural fit on options-type fields (e.g. `status in ('Active','Inactive')`), and is also accepted on text, numeric, and date fields when used with a single value (e.g. `firstName in ('Ashley')`, equivalent to `firstName eq 'Ashley'`); multi-value `in` on non-options fields returns `422`. To check a field's type, see the `type` value returned by Get Fields from Dataset (v1.2). Filter fields do not need to appear in the `fields` array; rows are filtered server-side. String literals in filter expressions are wrapped in single quotes, e.g. `firstName eq 'Ashley'` or `status in ('Active','Inactive')`. On date fields, the ordering operators also accept a relative-date duration literal in OData v4 / ISO 8601 form, e.g. `hireDate ge duration'P30D'`. The literal resolves against today at query time: with `lt` / `le` it resolves to today minus the duration, with `gt` / `ge` to today plus the duration (so `terminationDate lt duration'P6M'` matches dates before six months ago, and `hireDate ge duration'P30D'` matches dates from 30 days in the future onward). A negative duration reverses the direction — `hireDate ge duration'-P30D'` matches hire dates from 30 days ago onward (i.e. anyone hired in the last 30 days), including any future-dated hires. Exactly one date component is required — `PY` (years), `PM` (months), `PW` (weeks), or `PD` (days). Combined components (`P1Y6M`), time components (`PT12H`), and duration literals with `eq` / `ne` / `in` return `422` with code `INVALID_FILTER`. `orderBy` is a comma-separated list of ` ` rules. Every field used in `orderBy` must also appear in the `fields` array; omitting it returns a `400` with code `UE-1001`. `orderBy` is optional; with no `orderBy` the row order is unspecified. Field-level access is enforced server-side based on the authenticated caller's permissions and OAuth scopes. When a caller lacks permission to read a requested field, the field is still returned in each row with an empty value, and its canonical name is listed in that row's `_restrictedFields` array (e.g., `_restrictedFields: [\"employee_employeeNumber\"]`) — the request is not rejected, and other requested fields still come back. This differs from Get Employee (`get-employee`), which silently omits unauthorized fields with no marker, leaving an absent field ambiguous between \"not requested\" and \"not permitted\". Callers without dataset-level access receive `403`, and a dataset the caller cannot see at all returns `404` (\"not accessible\" rather than disclosing existence). Bad field names in `fields` or `filter` return `400` with `code: INVALID_ARGUMENT` and the offending name in the `detail` field (e.g., `\"Invalid field name: employee_workEmail\"`). The reported name carries the internal `_` prefix; the actual misspelling is the unprefixed form. Confirm spelling against Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`). Note: the field name appears in `detail` (singular); the `details` field (plural) remains empty in this error class. (Bad names in `orderBy` hit the must-be-in-`fields` check above first and return `UE-1001` rather than `INVALID_ARGUMENT`.) Pagination: `page` defaults to `1` and `pageSize` defaults to `100` (maximum `1000`). `meta.totalItems` is the count of rows matching the query across all pages, `meta.totalPages` is `ceil(totalItems / pageSize)`, and `data` contains at most `pageSize` rows for the requested page. `links.next` is present when more pages exist; `links.prev` is present when not on the first page. Errors follow RFC 7807 (`application/problem+json`). Note: Compared to Get Data from Dataset (v1) (`get-data-from-dataset-v1`), this version uses `filter` and `orderBy` request fields instead of the legacy `filters` and `sortBy` structures, moves pagination inputs to body fields (`page`, `pageSize`) instead of query parameters, returns pagination in `links` / `meta` objects instead of a legacy `pagination` object, and returns RFC 7807 compliant error responses with an `X-Request-ID` correlation header. OAuth Scopes: report + :param dataset_name: Machine-readable name of the dataset to query. Discover valid values via List Datasets (v1.2) (`list-datasets-v1_2`); examples include `employee`, `benefit`, and `applicants`. Unknown or inaccessible names return `404`. (required) + :type dataset_name: str + :param get_data_from_dataset_v2_request: Request parameters for dataset data retrieval (required) + :type get_data_from_dataset_v2_request: GetDataFromDatasetV2Request :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -548,29 +560,34 @@ def get_datasets_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_datasets_serialize( + _param = self._get_data_from_dataset_v2_serialize( + dataset_name=dataset_name, + get_data_from_dataset_v2_request=get_data_from_dataset_v2_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetResponse", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "DatasetDataResponseV2", + "400": "ProblemDetailsResponse", + "401": None, + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "413": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_datasets_serialize( + def _get_data_from_dataset_v2_serialize( self, + dataset_name, + get_data_from_dataset_v2_request, _request_auth, _content_type, _headers, @@ -579,43 +596,45 @@ def _get_datasets_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters + if dataset_name is not None: + _path_params["datasetName"] = dataset_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter - + if get_data_from_dataset_v2_request is not None: + _body_params = get_data_from_dataset_v2_request # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/datasets', + method="POST", + resource_path="/api/v2/datasets/{datasetName}/data", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -625,32 +644,32 @@ def _get_datasets_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_datasets_v12( + def get_field_options_v1( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + dataset_name: Annotated[ + StrictStr | None, Field(description="The name of the dataset to retrieve field options for.") + ], + field_options_request_schema: FieldOptionsRequestSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DatasetsResponse: - """Get Datasets v1.2 + ) -> dict[str, list[FieldOptionsTransformer]]: + """(Deprecated) Get Field Options (v1) - Retrieve the list of available datasets that can be queried. Returns each dataset's machine-readable name (used in subsequent dataset API calls) and its human-readable label. Use the returned `name` values with POST /api/v1/datasets/{datasetName} to query data, and GET /api/v1_2/datasets/{datasetName}/fields to discover available fields. V1.2 endpoint: error responses use RFC 7807 `application/problem+json`. + Deprecated. Use \"Get Field Options (v1.2)\" instead. Returns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value. Unrecognised field names may produce a `500` response with a plain-text body rather than structured JSON. OAuth Scopes: field + :param dataset_name: The name of the dataset to retrieve field options for. (required) + :type dataset_name: str + :param field_options_request_schema: (required) + :type field_options_request_schema: FieldOptionsRequestSchema :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -671,51 +690,54 @@ def get_datasets_v12( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/datasets/{datasetName}/field-options is deprecated.", DeprecationWarning) - _param = self._get_datasets_v12_serialize( + _param = self._get_field_options_v1_serialize( + dataset_name=dataset_name, + field_options_request_schema=field_options_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetsResponse", - '403': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, List[FieldOptionsTransformer]]", + "400": "BadRequestV1", + "403": "ForbiddenV1", + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_datasets_v12_with_http_info( + def get_field_options_v1_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + dataset_name: Annotated[ + StrictStr | None, Field(description="The name of the dataset to retrieve field options for.") + ], + field_options_request_schema: FieldOptionsRequestSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DatasetsResponse]: - """Get Datasets v1.2 + ) -> ApiResponse[dict[str, list[FieldOptionsTransformer]]]: + """(Deprecated) Get Field Options (v1) - Retrieve the list of available datasets that can be queried. Returns each dataset's machine-readable name (used in subsequent dataset API calls) and its human-readable label. Use the returned `name` values with POST /api/v1/datasets/{datasetName} to query data, and GET /api/v1_2/datasets/{datasetName}/fields to discover available fields. V1.2 endpoint: error responses use RFC 7807 `application/problem+json`. + Deprecated. Use \"Get Field Options (v1.2)\" instead. Returns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value. Unrecognised field names may produce a `500` response with a plain-text body rather than structured JSON. OAuth Scopes: field + :param dataset_name: The name of the dataset to retrieve field options for. (required) + :type dataset_name: str + :param field_options_request_schema: (required) + :type field_options_request_schema: FieldOptionsRequestSchema :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -736,51 +758,54 @@ def get_datasets_v12_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/datasets/{datasetName}/field-options is deprecated.", DeprecationWarning) - _param = self._get_datasets_v12_serialize( + _param = self._get_field_options_v1_serialize( + dataset_name=dataset_name, + field_options_request_schema=field_options_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetsResponse", - '403': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, List[FieldOptionsTransformer]]", + "400": "BadRequestV1", + "403": "ForbiddenV1", + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_datasets_v12_without_preload_content( + def get_field_options_v1_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + dataset_name: Annotated[ + StrictStr | None, Field(description="The name of the dataset to retrieve field options for.") + ], + field_options_request_schema: FieldOptionsRequestSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Datasets v1.2 + """(Deprecated) Get Field Options (v1) - Retrieve the list of available datasets that can be queried. Returns each dataset's machine-readable name (used in subsequent dataset API calls) and its human-readable label. Use the returned `name` values with POST /api/v1/datasets/{datasetName} to query data, and GET /api/v1_2/datasets/{datasetName}/fields to discover available fields. V1.2 endpoint: error responses use RFC 7807 `application/problem+json`. + Deprecated. Use \"Get Field Options (v1.2)\" instead. Returns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value. Unrecognised field names may produce a `500` response with a plain-text body rather than structured JSON. OAuth Scopes: field + :param dataset_name: The name of the dataset to retrieve field options for. (required) + :type dataset_name: str + :param field_options_request_schema: (required) + :type field_options_request_schema: FieldOptionsRequestSchema :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -801,29 +826,31 @@ def get_datasets_v12_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/datasets/{datasetName}/field-options is deprecated.", DeprecationWarning) - _param = self._get_datasets_v12_serialize( + _param = self._get_field_options_v1_serialize( + dataset_name=dataset_name, + field_options_request_schema=field_options_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetsResponse", - '403': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, List[FieldOptionsTransformer]]", + "400": "BadRequestV1", + "403": "ForbiddenV1", + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_datasets_v12_serialize( + def _get_field_options_v1_serialize( self, + dataset_name, + field_options_request_schema, _request_auth, _content_type, _headers, @@ -832,44 +859,43 @@ def _get_datasets_v12_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters + if dataset_name is not None: + _path_params["datasetName"] = dataset_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter - + if field_options_request_schema is not None: + _body_params = field_options_request_schema # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/problem+json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1_2/datasets', + method="POST", + resource_path="/api/v1/datasets/{datasetName}/field-options", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -879,35 +905,32 @@ def _get_datasets_v12_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_field_options( + def get_field_options_v12( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want to see field options for")], + dataset_name: Annotated[ + StrictStr | None, + Field( + description='The name of the dataset you want to see field options for. Use "List Datasets (v1.2)" to discover available dataset names.' + ), + ], field_options_request_schema: FieldOptionsRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, List[FieldOptionsTransformer]]: - """Get Field Options + ) -> dict[str, list[FieldOptionsTransformer]]: + """Get Field Options (v1.2) - Retrieve the possible values for one or more dataset fields, for use as filter values in dataset queries. Pass the field names you want options for in the `fields` array. The response is an object keyed by field name, where each value is an array of `{id, value}` objects. Use the `id` values as filter values when querying POST /api/v1/datasets/{datasetName}. Optionally supply `filters` to scope the returned options (e.g., returning only option values that exist for active employees). **Deprecation notice:** For RFC 7807 compliant error responses, use POST /api/v1_2/datasets/{datasetName}/field-options instead. + Returns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset (v2)\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value. Use \"Get Fields from Dataset (v1.2)\" to discover valid field names for a dataset. Use this endpoint when you already have dataset field names from `get-fields-from-dataset-v1_2` and need valid filter/display options for those specific dataset fields. It is dataset-scoped: field names must be dataset field name values such as `jobInformationDepartment`, not account list aliases such as `department`. Note: Compared to \"Get Field Options (v1)\", error responses (`400`, `403`) use RFC 7807 `application/problem+json` format. Unrecognised field names may produce a `500` response with a plain-text body rather than structured JSON. OAuth Scopes: field - :param dataset_name: The name of the dataset you want to see field options for (required) + :param dataset_name: The name of the dataset you want to see field options for. Use \"List Datasets (v1.2)\" to discover available dataset names. (required) :type dataset_name: str :param field_options_request_schema: (required) :type field_options_request_schema: FieldOptionsRequestSchema @@ -931,57 +954,53 @@ def get_field_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_field_options_serialize( + _param = self._get_field_options_v12_serialize( dataset_name=dataset_name, field_options_request_schema=field_options_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, List[FieldOptionsTransformer]]", - '400': "BadRequest", - '403': "Forbidden", - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, List[FieldOptionsTransformer]]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_field_options_with_http_info( + def get_field_options_v12_with_http_info( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want to see field options for")], + dataset_name: Annotated[ + StrictStr | None, + Field( + description='The name of the dataset you want to see field options for. Use "List Datasets (v1.2)" to discover available dataset names.' + ), + ], field_options_request_schema: FieldOptionsRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, List[FieldOptionsTransformer]]]: - """Get Field Options + ) -> ApiResponse[dict[str, list[FieldOptionsTransformer]]]: + """Get Field Options (v1.2) - Retrieve the possible values for one or more dataset fields, for use as filter values in dataset queries. Pass the field names you want options for in the `fields` array. The response is an object keyed by field name, where each value is an array of `{id, value}` objects. Use the `id` values as filter values when querying POST /api/v1/datasets/{datasetName}. Optionally supply `filters` to scope the returned options (e.g., returning only option values that exist for active employees). **Deprecation notice:** For RFC 7807 compliant error responses, use POST /api/v1_2/datasets/{datasetName}/field-options instead. + Returns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset (v2)\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value. Use \"Get Fields from Dataset (v1.2)\" to discover valid field names for a dataset. Use this endpoint when you already have dataset field names from `get-fields-from-dataset-v1_2` and need valid filter/display options for those specific dataset fields. It is dataset-scoped: field names must be dataset field name values such as `jobInformationDepartment`, not account list aliases such as `department`. Note: Compared to \"Get Field Options (v1)\", error responses (`400`, `403`) use RFC 7807 `application/problem+json` format. Unrecognised field names may produce a `500` response with a plain-text body rather than structured JSON. OAuth Scopes: field - :param dataset_name: The name of the dataset you want to see field options for (required) + :param dataset_name: The name of the dataset you want to see field options for. Use \"List Datasets (v1.2)\" to discover available dataset names. (required) :type dataset_name: str :param field_options_request_schema: (required) :type field_options_request_schema: FieldOptionsRequestSchema @@ -1005,57 +1024,53 @@ def get_field_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_field_options_serialize( + _param = self._get_field_options_v12_serialize( dataset_name=dataset_name, field_options_request_schema=field_options_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, List[FieldOptionsTransformer]]", - '400': "BadRequest", - '403': "Forbidden", - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, List[FieldOptionsTransformer]]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_field_options_without_preload_content( + def get_field_options_v12_without_preload_content( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want to see field options for")], + dataset_name: Annotated[ + StrictStr | None, + Field( + description='The name of the dataset you want to see field options for. Use "List Datasets (v1.2)" to discover available dataset names.' + ), + ], field_options_request_schema: FieldOptionsRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Field Options + """Get Field Options (v1.2) - Retrieve the possible values for one or more dataset fields, for use as filter values in dataset queries. Pass the field names you want options for in the `fields` array. The response is an object keyed by field name, where each value is an array of `{id, value}` objects. Use the `id` values as filter values when querying POST /api/v1/datasets/{datasetName}. Optionally supply `filters` to scope the returned options (e.g., returning only option values that exist for active employees). **Deprecation notice:** For RFC 7807 compliant error responses, use POST /api/v1_2/datasets/{datasetName}/field-options instead. + Returns the allowed values for one or more fields in a dataset, for use as filter values when querying data via \"Get Data from Dataset (v2)\". Pass field names in the `fields` array of the request body; the response is an object keyed by field name, where each value is an array of `{id, value}` option objects. Optionally supply `filters` to narrow the returned options (e.g. only options that exist for active employees) and `dependentFields` when one field's options depend on another field's selected value. Use \"Get Fields from Dataset (v1.2)\" to discover valid field names for a dataset. Use this endpoint when you already have dataset field names from `get-fields-from-dataset-v1_2` and need valid filter/display options for those specific dataset fields. It is dataset-scoped: field names must be dataset field name values such as `jobInformationDepartment`, not account list aliases such as `department`. Note: Compared to \"Get Field Options (v1)\", error responses (`400`, `403`) use RFC 7807 `application/problem+json` format. Unrecognised field names may produce a `500` response with a plain-text body rather than structured JSON. OAuth Scopes: field - :param dataset_name: The name of the dataset you want to see field options for (required) + :param dataset_name: The name of the dataset you want to see field options for. Use \"List Datasets (v1.2)\" to discover available dataset names. (required) :type dataset_name: str :param field_options_request_schema: (required) :type field_options_request_schema: FieldOptionsRequestSchema @@ -1079,31 +1094,27 @@ def get_field_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_field_options_serialize( + _param = self._get_field_options_v12_serialize( dataset_name=dataset_name, field_options_request_schema=field_options_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, List[FieldOptionsTransformer]]", - '400': "BadRequest", - '403': "Forbidden", - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, List[FieldOptionsTransformer]]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_field_options_serialize( + def _get_field_options_v12_serialize( self, dataset_name, field_options_request_schema, @@ -1115,21 +1126,18 @@ def _get_field_options_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if dataset_name is not None: - _path_params['datasetName'] = dataset_name + _path_params["datasetName"] = dataset_name # process the query parameters # process the header parameters # process the form parameters @@ -1137,38 +1145,26 @@ def _get_field_options_serialize( if field_options_request_schema is not None: _body_params = field_options_request_schema - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/datasets/{datasetName}/field-options', + method="POST", + resource_path="/api/v1_2/datasets/{datasetName}/field-options", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1178,38 +1174,46 @@ def _get_field_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_field_options_v12( + def get_fields_from_dataset_v1( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want to see field options for")], - field_options_request_schema: FieldOptionsRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + dataset_name: Annotated[ + StrictStr | None, + Field( + description='The machine-readable name of the dataset to retrieve fields for. Use "List Datasets (v1.2)" to discover valid names.' + ), + ], + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field( + description="The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1." + ), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of field records to retrieve per page. Defaults to 500. Maximum is 1000."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, List[FieldOptionsTransformer]]: - """Get Field Options v1.2 + ) -> DatasetFieldsResponse: + """(Deprecated) Get Fields from Dataset (v1) - Retrieve the possible values for one or more dataset fields, for use as filter values in dataset queries. Pass the field names you want options for in the `fields` array. The response is an object keyed by field name, where each value is an array of `{id, value}` objects. Use the `id` values as filter values when querying dataset endpoints. Optionally supply `filters` to scope the returned options. V1.2 endpoint: `400` and `403` error responses use RFC 7807 `application/problem+json`. Note: unrecognised field names may result in a `500` response with a plain-text body rather than a structured error payload. + Deprecated. Use \"Get Fields from Dataset (v1.2)\" instead. Returns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, `parentType`, `parentName`, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset\". Use \"List Datasets (v1.2)\" to discover valid dataset names. Pagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. The `next_page` and `prev_page` links in the pagination object are absolute URLs. Error responses (400, 403, 500) return plain-text bodies, not JSON. OAuth Scopes: report - :param dataset_name: The name of the dataset you want to see field options for (required) + :param dataset_name: The machine-readable name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) :type dataset_name: str - :param field_options_request_schema: (required) - :type field_options_request_schema: FieldOptionsRequestSchema + :param page: The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. + :type page: int + :param page_size: The number of field records to retrieve per page. Defaults to 500. Maximum is 1000. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1230,60 +1234,69 @@ def get_field_options_v12( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("GET /api/v1/datasets/{datasetName}/fields is deprecated.", DeprecationWarning) - _param = self._get_field_options_v12_serialize( + _param = self._get_fields_from_dataset_v1_serialize( dataset_name=dataset_name, - field_options_request_schema=field_options_request_schema, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, List[FieldOptionsTransformer]]", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "DatasetFieldsResponse", + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_field_options_v12_with_http_info( + def get_fields_from_dataset_v1_with_http_info( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want to see field options for")], - field_options_request_schema: FieldOptionsRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + dataset_name: Annotated[ + StrictStr | None, + Field( + description='The machine-readable name of the dataset to retrieve fields for. Use "List Datasets (v1.2)" to discover valid names.' + ), + ], + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field( + description="The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1." + ), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of field records to retrieve per page. Defaults to 500. Maximum is 1000."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, List[FieldOptionsTransformer]]]: - """Get Field Options v1.2 + ) -> ApiResponse[DatasetFieldsResponse]: + """(Deprecated) Get Fields from Dataset (v1) - Retrieve the possible values for one or more dataset fields, for use as filter values in dataset queries. Pass the field names you want options for in the `fields` array. The response is an object keyed by field name, where each value is an array of `{id, value}` objects. Use the `id` values as filter values when querying dataset endpoints. Optionally supply `filters` to scope the returned options. V1.2 endpoint: `400` and `403` error responses use RFC 7807 `application/problem+json`. Note: unrecognised field names may result in a `500` response with a plain-text body rather than a structured error payload. + Deprecated. Use \"Get Fields from Dataset (v1.2)\" instead. Returns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, `parentType`, `parentName`, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset\". Use \"List Datasets (v1.2)\" to discover valid dataset names. Pagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. The `next_page` and `prev_page` links in the pagination object are absolute URLs. Error responses (400, 403, 500) return plain-text bodies, not JSON. OAuth Scopes: report - :param dataset_name: The name of the dataset you want to see field options for (required) + :param dataset_name: The machine-readable name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) :type dataset_name: str - :param field_options_request_schema: (required) - :type field_options_request_schema: FieldOptionsRequestSchema + :param page: The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. + :type page: int + :param page_size: The number of field records to retrieve per page. Defaults to 500. Maximum is 1000. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1304,60 +1317,69 @@ def get_field_options_v12_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("GET /api/v1/datasets/{datasetName}/fields is deprecated.", DeprecationWarning) - _param = self._get_field_options_v12_serialize( + _param = self._get_fields_from_dataset_v1_serialize( dataset_name=dataset_name, - field_options_request_schema=field_options_request_schema, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, List[FieldOptionsTransformer]]", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "DatasetFieldsResponse", + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_field_options_v12_without_preload_content( + def get_fields_from_dataset_v1_without_preload_content( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want to see field options for")], - field_options_request_schema: FieldOptionsRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + dataset_name: Annotated[ + StrictStr | None, + Field( + description='The machine-readable name of the dataset to retrieve fields for. Use "List Datasets (v1.2)" to discover valid names.' + ), + ], + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field( + description="The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1." + ), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of field records to retrieve per page. Defaults to 500. Maximum is 1000."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Field Options v1.2 + """(Deprecated) Get Fields from Dataset (v1) - Retrieve the possible values for one or more dataset fields, for use as filter values in dataset queries. Pass the field names you want options for in the `fields` array. The response is an object keyed by field name, where each value is an array of `{id, value}` objects. Use the `id` values as filter values when querying dataset endpoints. Optionally supply `filters` to scope the returned options. V1.2 endpoint: `400` and `403` error responses use RFC 7807 `application/problem+json`. Note: unrecognised field names may result in a `500` response with a plain-text body rather than a structured error payload. + Deprecated. Use \"Get Fields from Dataset (v1.2)\" instead. Returns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, `parentType`, `parentName`, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset\". Use \"List Datasets (v1.2)\" to discover valid dataset names. Pagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. The `next_page` and `prev_page` links in the pagination object are absolute URLs. Error responses (400, 403, 500) return plain-text bodies, not JSON. OAuth Scopes: report - :param dataset_name: The name of the dataset you want to see field options for (required) + :param dataset_name: The machine-readable name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) :type dataset_name: str - :param field_options_request_schema: (required) - :type field_options_request_schema: FieldOptionsRequestSchema + :param page: The page number to retrieve. Out-of-range values are clamped to the nearest valid page. Defaults to 1. + :type page: int + :param page_size: The number of field records to retrieve per page. Defaults to 500. Maximum is 1000. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1378,34 +1400,33 @@ def get_field_options_v12_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("GET /api/v1/datasets/{datasetName}/fields is deprecated.", DeprecationWarning) - _param = self._get_field_options_v12_serialize( + _param = self._get_fields_from_dataset_v1_serialize( dataset_name=dataset_name, - field_options_request_schema=field_options_request_schema, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, List[FieldOptionsTransformer]]", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "DatasetFieldsResponse", + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_field_options_v12_serialize( + def _get_fields_from_dataset_v1_serialize( self, dataset_name, - field_options_request_schema, + page, + page_size, _request_auth, _content_type, _headers, @@ -1414,61 +1435,39 @@ def _get_field_options_v12_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if dataset_name is not None: - _path_params['datasetName'] = dataset_name + _path_params["datasetName"] = dataset_name # process the query parameters + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - if field_options_request_schema is not None: - _body_params = field_options_request_schema - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/problem+json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1_2/datasets/{datasetName}/field-options', + method="GET", + resource_path="/api/v1/datasets/{datasetName}/fields", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1478,36 +1477,39 @@ def _get_field_options_v12_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_fields_from_dataset( + def get_fields_from_dataset_v12( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want to see fields for")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + dataset_name: Annotated[ + StrictStr | None, + Field( + description='The name of the dataset to retrieve fields for. Use "List Datasets (v1.2)" to discover valid names.' + ), + ], + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> DatasetFieldsResponse: - """Get Fields from Dataset + """Get Fields from Dataset (v1.2) - Retrieve the available fields for a given dataset. Returns a paginated list of field descriptors, each including the field's machine-readable name, human-readable label, parent section type and name, and the entity name. Use the returned field `name` values in the `fields` array when querying data from POST /api/v1/datasets/{datasetName}. **Deprecation notice:** This endpoint is deprecated. Use GET /api/v1_2/datasets/{datasetName}/fields instead. + Returns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, parent section type and name, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset (v2)\". Use \"List Datasets (v1.2)\" to discover valid `datasetName` values. Pagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Some datasets, especially `employee`, may return hundreds of fields. This endpoint does not support filtering by parent/entity/type; retrieve all pages and group client-side. The `employee` dataset field names are fully qualified with their section prefix and differ from the field names used by `list-employees` and `get-employee`. Do not assume a field name from one endpoint works in the other. For fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list. Note: Compared to \"Get Fields from Dataset (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header. OAuth Scopes: report - :param dataset_name: The name of the dataset you want to see fields for (required) + :param dataset_name: The name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) :type dataset_name: str :param page: The page number to retrieve. Defaults to 1. :type page: int @@ -1533,59 +1535,61 @@ def get_fields_from_dataset( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_fields_from_dataset_serialize( + _param = self._get_fields_from_dataset_v12_serialize( dataset_name=dataset_name, page=page, page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetFieldsResponse", - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "DatasetFieldsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_fields_from_dataset_with_http_info( + def get_fields_from_dataset_v12_with_http_info( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want to see fields for")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + dataset_name: Annotated[ + StrictStr | None, + Field( + description='The name of the dataset to retrieve fields for. Use "List Datasets (v1.2)" to discover valid names.' + ), + ], + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[DatasetFieldsResponse]: - """Get Fields from Dataset + """Get Fields from Dataset (v1.2) - Retrieve the available fields for a given dataset. Returns a paginated list of field descriptors, each including the field's machine-readable name, human-readable label, parent section type and name, and the entity name. Use the returned field `name` values in the `fields` array when querying data from POST /api/v1/datasets/{datasetName}. **Deprecation notice:** This endpoint is deprecated. Use GET /api/v1_2/datasets/{datasetName}/fields instead. + Returns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, parent section type and name, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset (v2)\". Use \"List Datasets (v1.2)\" to discover valid `datasetName` values. Pagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Some datasets, especially `employee`, may return hundreds of fields. This endpoint does not support filtering by parent/entity/type; retrieve all pages and group client-side. The `employee` dataset field names are fully qualified with their section prefix and differ from the field names used by `list-employees` and `get-employee`. Do not assume a field name from one endpoint works in the other. For fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list. Note: Compared to \"Get Fields from Dataset (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header. OAuth Scopes: report - :param dataset_name: The name of the dataset you want to see fields for (required) + :param dataset_name: The name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) :type dataset_name: str :param page: The page number to retrieve. Defaults to 1. :type page: int @@ -1611,59 +1615,61 @@ def get_fields_from_dataset_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_fields_from_dataset_serialize( + _param = self._get_fields_from_dataset_v12_serialize( dataset_name=dataset_name, page=page, page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetFieldsResponse", - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "DatasetFieldsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_fields_from_dataset_without_preload_content( + def get_fields_from_dataset_v12_without_preload_content( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want to see fields for")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + dataset_name: Annotated[ + StrictStr | None, + Field( + description='The name of the dataset to retrieve fields for. Use "List Datasets (v1.2)" to discover valid names.' + ), + ], + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Fields from Dataset + """Get Fields from Dataset (v1.2) - Retrieve the available fields for a given dataset. Returns a paginated list of field descriptors, each including the field's machine-readable name, human-readable label, parent section type and name, and the entity name. Use the returned field `name` values in the `fields` array when querying data from POST /api/v1/datasets/{datasetName}. **Deprecation notice:** This endpoint is deprecated. Use GET /api/v1_2/datasets/{datasetName}/fields instead. + Returns a paginated list of field descriptors for the specified dataset. Each field includes its machine-readable `name`, human-readable `label`, parent section type and name, and `entityName`. Use the returned field `name` values in the `fields` array when querying data via \"Get Data from Dataset (v2)\". Use \"List Datasets (v1.2)\" to discover valid `datasetName` values. Pagination defaults to page 1 with 500 fields per page (maximum 1000). Out-of-range page numbers are clamped to the nearest valid page. Some datasets, especially `employee`, may return hundreds of fields. This endpoint does not support filtering by parent/entity/type; retrieve all pages and group client-side. The `employee` dataset field names are fully qualified with their section prefix and differ from the field names used by `list-employees` and `get-employee`. Do not assume a field name from one endpoint works in the other. For fields whose type is `list`, `multilist`, or another option-backed type, the field `id` can be matched to `fieldId` from `list-list-fields` to retrieve the account-level option list. Note: Compared to \"Get Fields from Dataset (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header. OAuth Scopes: report - :param dataset_name: The name of the dataset you want to see fields for (required) + :param dataset_name: The name of the dataset to retrieve fields for. Use \"List Datasets (v1.2)\" to discover valid names. (required) :type dataset_name: str :param page: The page number to retrieve. Defaults to 1. :type page: int @@ -1689,32 +1695,28 @@ def get_fields_from_dataset_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_fields_from_dataset_serialize( + _param = self._get_fields_from_dataset_v12_serialize( dataset_name=dataset_name, page=page, page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetFieldsResponse", - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "DatasetFieldsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_fields_from_dataset_serialize( + def _get_fields_from_dataset_v12_serialize( self, dataset_name, page, @@ -1727,53 +1729,41 @@ def _get_fields_from_dataset_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if dataset_name is not None: - _path_params['datasetName'] = dataset_name + _path_params["datasetName"] = dataset_name # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + _query_params.append(("page", page)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/datasets/{datasetName}/fields', + method="GET", + resource_path="/api/v1_2/datasets/{datasetName}/fields", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1783,41 +1773,78 @@ def _get_fields_from_dataset_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) + @validate_call + def list_datasets_v1( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DatasetResponseV1: + """(Deprecated) List Datasets (v1) + Deprecated. Use \"List Datasets (v1.2)\" instead. Returns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries. The response includes `Deprecation` and `Link` headers pointing to the v1.2 successor endpoint. OAuth Scopes: report + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + warnings.warn("GET /api/v1/datasets is deprecated.", DeprecationWarning) + + _param = self._list_datasets_v1_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "DatasetResponseV1", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data @validate_call - def get_fields_from_dataset_v12( + def list_datasets_v1_with_http_info( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want to see fields for")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DatasetFieldsResponse: - """Get Fields from Dataset v1.2 + ) -> ApiResponse[DatasetResponseV1]: + """(Deprecated) List Datasets (v1) - Retrieve the available fields for a given dataset. Returns a paginated list of field descriptors, each including the field's machine-readable name, human-readable label, parent section type and name, and the entity name. Use the returned field `name` values in the `fields` array when querying data via POST /api/v1/datasets/{datasetName}. V1.2 endpoint: error responses use RFC 7807 `application/problem+json`. + Deprecated. Use \"List Datasets (v1.2)\" instead. Returns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries. The response includes `Deprecation` and `Link` headers pointing to the v1.2 successor endpoint. OAuth Scopes: report - :param dataset_name: The name of the dataset you want to see fields for (required) - :type dataset_name: str - :param page: The page number to retrieve. Defaults to 1. - :type page: int - :param page_size: The number of records to retrieve per page. Defaults to 500. Maximum is 1000. - :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1838,64 +1865,40 @@ def get_fields_from_dataset_v12( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("GET /api/v1/datasets is deprecated.", DeprecationWarning) - _param = self._get_fields_from_dataset_v12_serialize( - dataset_name=dataset_name, - page=page, - page_size=page_size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_datasets_v1_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetFieldsResponse", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "DatasetResponseV1", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ).data - + ) @validate_call - def get_fields_from_dataset_v12_with_http_info( + def list_datasets_v1_without_preload_content( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want to see fields for")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DatasetFieldsResponse]: - """Get Fields from Dataset v1.2 + ) -> RESTResponseType: + """(Deprecated) List Datasets (v1) - Retrieve the available fields for a given dataset. Returns a paginated list of field descriptors, each including the field's machine-readable name, human-readable label, parent section type and name, and the entity name. Use the returned field `name` values in the `fields` array when querying data via POST /api/v1/datasets/{datasetName}. V1.2 endpoint: error responses use RFC 7807 `application/problem+json`. + Deprecated. Use \"List Datasets (v1.2)\" instead. Returns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries. The response includes `Deprecation` and `Link` headers pointing to the v1.2 successor endpoint. OAuth Scopes: report - :param dataset_name: The name of the dataset you want to see fields for (required) - :type dataset_name: str - :param page: The page number to retrieve. Defaults to 1. - :type page: int - :param page_size: The number of records to retrieve per page. Defaults to 500. Maximum is 1000. - :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1916,64 +1919,189 @@ def get_fields_from_dataset_v12_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("GET /api/v1/datasets is deprecated.", DeprecationWarning) - _param = self._get_fields_from_dataset_v12_serialize( - dataset_name=dataset_name, - page=page, - page_size=page_size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_datasets_v1_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetFieldsResponse", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "DatasetResponseV1", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_datasets_v1_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/datasets", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_datasets_v12( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DatasetsResponseV12: + """List Datasets (v1.2) + + Returns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset (v2)\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries. Datasets are queryable reporting datasets for the Datasets API. They are not the same as saved custom reports (`list-reports`), employee tabular table aliases (`list-tabular-fields`), or account list-field definitions (`list-list-fields`). Note: Compared to \"List Datasets (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header. OAuth Scopes: report + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_datasets_v12_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) + + _response_types_map: dict[str, str | None] = { + "200": "DatasetsResponseV12", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + @validate_call + def list_datasets_v12_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DatasetsResponseV12]: + """List Datasets (v1.2) + + Returns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset (v2)\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries. Datasets are queryable reporting datasets for the Datasets API. They are not the same as saved custom reports (`list-reports`), employee tabular table aliases (`list-tabular-fields`), or account list-field definitions (`list-list-fields`). Note: Compared to \"List Datasets (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header. OAuth Scopes: report + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_datasets_v12_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) + _response_types_map: dict[str, str | None] = { + "200": "DatasetsResponseV12", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) @validate_call - def get_fields_from_dataset_v12_without_preload_content( + def list_datasets_v12_without_preload_content( self, - dataset_name: Annotated[StrictStr, Field(description="The name of the dataset you want to see fields for")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The page number to retrieve. Defaults to 1.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="The number of records to retrieve per page. Defaults to 500. Maximum is 1000.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Fields from Dataset v1.2 + """List Datasets (v1.2) - Retrieve the available fields for a given dataset. Returns a paginated list of field descriptors, each including the field's machine-readable name, human-readable label, parent section type and name, and the entity name. Use the returned field `name` values in the `fields` array when querying data via POST /api/v1/datasets/{datasetName}. V1.2 endpoint: error responses use RFC 7807 `application/problem+json`. + Returns the catalog of datasets available for querying via the Datasets API. Each entry includes a machine-readable `name` (used as the `datasetName` path parameter in \"Get Fields from Dataset (v1.2)\" and \"Get Data from Dataset (v2)\") and a human-readable `label`. Use this endpoint to discover which datasets the current account has access to before building queries. Datasets are queryable reporting datasets for the Datasets API. They are not the same as saved custom reports (`list-reports`), employee tabular table aliases (`list-tabular-fields`), or account list-field definitions (`list-list-fields`). Note: Compared to \"List Datasets (v1)\", this version returns RFC 7807 `application/problem+json` error responses and includes an `X-Request-ID` correlation header. OAuth Scopes: report - :param dataset_name: The name of the dataset you want to see fields for (required) - :type dataset_name: str - :param page: The page number to retrieve. Defaults to 1. - :type page: int - :param page_size: The number of records to retrieve per page. Defaults to 500. Maximum is 1000. - :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1994,36 +2122,22 @@ def get_fields_from_dataset_v12_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_fields_from_dataset_v12_serialize( - dataset_name=dataset_name, - page=page, - page_size=page_size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_datasets_v12_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetFieldsResponse", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "DatasetsResponseV12", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_fields_from_dataset_v12_serialize( + def _list_datasets_v12_serialize( self, - dataset_name, - page, - page_size, _request_auth, _content_type, _headers, @@ -2032,54 +2146,33 @@ def _get_fields_from_dataset_v12_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if dataset_name is not None: - _path_params['datasetName'] = dataset_name # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if page_size is not None: - - _query_params.append(('page_size', page_size)) - # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/problem+json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1_2/datasets/{datasetName}/fields', + method="GET", + resource_path="/api/v1_2/datasets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2089,7 +2182,5 @@ def _get_fields_from_dataset_v12_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/employee_files_api.py b/bamboohr_sdk/api/employee_files_api.py index 469e155..3b123cb 100644 --- a/bamboohr_sdk/api/employee_files_api.py +++ b/bamboohr_sdk/api/employee_files_api.py @@ -1,29 +1,22 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any -from pydantic import Field, StrictBytes, StrictInt, StrictStr, field_validator -from typing import List, Optional, Tuple, Union -from typing_extensions import Annotated -from bamboohr_sdk.models.employee_file_update import EmployeeFileUpdate -from bamboohr_sdk.models.json_employee_files import JsonEmployeeFiles +from pydantic import Field, StrictBytes, StrictFloat, StrictInt, StrictStr, validate_call from bamboohr_sdk.api_client import ApiClient, RequestSerialized from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.employee_file_update import EmployeeFileUpdate +from bamboohr_sdk.models.json_employee_files import JsonEmployeeFiles from bamboohr_sdk.rest import RESTResponseType @@ -39,27 +32,21 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call - def add_employee_file_category( + def create_employee_file_category( self, - request_body: List[StrictStr], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + request_body: list[StrictStr], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Create Employee File Category - Creates one or more employee file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, and 403 if the caller lacks permission. + Creates one or more employee file categories (not company file categories). The request body is a JSON array of category name strings or an equivalent XML document with `` elements. Each name must be non-empty and unique among existing employee file categories. An empty array returns 200 without creating anything. On success, returns 201 with no body. The admin user group is automatically granted edit permission on each new category. OAuth Scopes: employee:file.write :param request_body: (required) :type request_body: List[str] @@ -83,27 +70,24 @@ def add_employee_file_category( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._add_employee_file_category_serialize( + _param = self._create_employee_file_category_serialize( request_body=request_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '201': None, - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "201": None, + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -111,27 +95,21 @@ def add_employee_file_category( response_types_map=_response_types_map, ) - @validate_call - def add_employee_file_category_with_http_info( + def create_employee_file_category_with_http_info( self, - request_body: List[StrictStr], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + request_body: list[StrictStr], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Create Employee File Category - Creates one or more employee file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, and 403 if the caller lacks permission. + Creates one or more employee file categories (not company file categories). The request body is a JSON array of category name strings or an equivalent XML document with `` elements. Each name must be non-empty and unique among existing employee file categories. An empty array returns 200 without creating anything. On success, returns 201 with no body. The admin user group is automatically granted edit permission on each new category. OAuth Scopes: employee:file.write :param request_body: (required) :type request_body: List[str] @@ -155,54 +133,45 @@ def add_employee_file_category_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._add_employee_file_category_serialize( + _param = self._create_employee_file_category_serialize( request_body=request_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '201': None, - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "201": None, + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def add_employee_file_category_without_preload_content( + def create_employee_file_category_without_preload_content( self, - request_body: List[StrictStr], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + request_body: list[StrictStr], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Employee File Category - Creates one or more employee file categories. Accepts a JSON array of category name strings or an equivalent XML document. An empty payload returns 200 without creating anything. Returns 400 if a name is empty or already exists, and 403 if the caller lacks permission. + Creates one or more employee file categories (not company file categories). The request body is a JSON array of category name strings or an equivalent XML document with `` elements. Each name must be non-empty and unique among existing employee file categories. An empty array returns 200 without creating anything. On success, returns 201 with no body. The admin user group is automatically granted edit permission on each new category. OAuth Scopes: employee:file.write :param request_body: (required) :type request_body: List[str] @@ -226,31 +195,27 @@ def add_employee_file_category_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._add_employee_file_category_serialize( + _param = self._create_employee_file_category_serialize( request_body=request_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '201': None, - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "201": None, + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _add_employee_file_category_serialize( + def _create_employee_file_category_serialize( self, request_body, _request_auth, @@ -261,18 +226,16 @@ def _add_employee_file_category_serialize( _host = None - _collection_formats: Dict[str, str] = { - 'request_body': '', + _collection_formats: dict[str, str] = { + "request_body": "", } - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -282,32 +245,20 @@ def _add_employee_file_category_serialize( if request_body is not None: _body_params = request_body - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json", "application/xml"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/employees/files/categories', + method="POST", + resource_path="/api/v1/employees/files/categories", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -317,35 +268,32 @@ def _add_employee_file_category_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def delete_employee_file( self, - id: Annotated[StrictInt, Field(description="The ID of the employee whose file is being deleted. Pass 0 to use the employee associated with the API key.")], - file_id: Annotated[StrictInt, Field(description="The ID of the employee file to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[ + StrictInt | None, + Field( + description="The internal employee ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the authenticated caller." + ), + ], + file_id: Annotated[StrictInt | None, Field(description="The ID of the employee file to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Delete Employee File - Deletes the specified employee file. The special employee ID of zero (0) resolves to the employee associated with the API key. Successful deletions are idempotent: if the file was already deleted for that employee, the endpoint may still return 200. Returns 404 when the file is not associated with the specified employee, 403 if the caller lacks permission or the file is managed by BambooPayroll, and 500 on an internal error. + Permanently deletes an employee file. This action cannot be undone and removes the file from storage. The special employee ID of 0 resolves to the employee associated with the authenticated caller. Returns 200 even if the file was already deleted (idempotent). Returns 403 if the caller lacks permission or the file belongs to a BambooPayroll-managed section. Returns 404 if the file does not exist for the specified employee or the Files tool is not enabled for the company. Use 'List Employee Files' to obtain file IDs. OAuth Scopes: employee:file.write - :param id: The ID of the employee whose file is being deleted. Pass 0 to use the employee associated with the API key. (required) + :param id: The internal employee ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the authenticated caller. (required) :type id: int :param file_id: The ID of the employee file to delete. (required) :type file_id: int @@ -369,7 +317,7 @@ def delete_employee_file( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_employee_file_serialize( id=id, @@ -377,19 +325,16 @@ def delete_employee_file( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -397,30 +342,29 @@ def delete_employee_file( response_types_map=_response_types_map, ) - @validate_call def delete_employee_file_with_http_info( self, - id: Annotated[StrictInt, Field(description="The ID of the employee whose file is being deleted. Pass 0 to use the employee associated with the API key.")], - file_id: Annotated[StrictInt, Field(description="The ID of the employee file to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[ + StrictInt | None, + Field( + description="The internal employee ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the authenticated caller." + ), + ], + file_id: Annotated[StrictInt | None, Field(description="The ID of the employee file to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Delete Employee File - Deletes the specified employee file. The special employee ID of zero (0) resolves to the employee associated with the API key. Successful deletions are idempotent: if the file was already deleted for that employee, the endpoint may still return 200. Returns 404 when the file is not associated with the specified employee, 403 if the caller lacks permission or the file is managed by BambooPayroll, and 500 on an internal error. + Permanently deletes an employee file. This action cannot be undone and removes the file from storage. The special employee ID of 0 resolves to the employee associated with the authenticated caller. Returns 200 even if the file was already deleted (idempotent). Returns 403 if the caller lacks permission or the file belongs to a BambooPayroll-managed section. Returns 404 if the file does not exist for the specified employee or the Files tool is not enabled for the company. Use 'List Employee Files' to obtain file IDs. OAuth Scopes: employee:file.write - :param id: The ID of the employee whose file is being deleted. Pass 0 to use the employee associated with the API key. (required) + :param id: The internal employee ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the authenticated caller. (required) :type id: int :param file_id: The ID of the employee file to delete. (required) :type file_id: int @@ -444,7 +388,7 @@ def delete_employee_file_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_employee_file_serialize( id=id, @@ -452,49 +396,45 @@ def delete_employee_file_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def delete_employee_file_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The ID of the employee whose file is being deleted. Pass 0 to use the employee associated with the API key.")], - file_id: Annotated[StrictInt, Field(description="The ID of the employee file to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[ + StrictInt | None, + Field( + description="The internal employee ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the authenticated caller." + ), + ], + file_id: Annotated[StrictInt | None, Field(description="The ID of the employee file to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Delete Employee File - Deletes the specified employee file. The special employee ID of zero (0) resolves to the employee associated with the API key. Successful deletions are idempotent: if the file was already deleted for that employee, the endpoint may still return 200. Returns 404 when the file is not associated with the specified employee, 403 if the caller lacks permission or the file is managed by BambooPayroll, and 500 on an internal error. + Permanently deletes an employee file. This action cannot be undone and removes the file from storage. The special employee ID of 0 resolves to the employee associated with the authenticated caller. Returns 200 even if the file was already deleted (idempotent). Returns 403 if the caller lacks permission or the file belongs to a BambooPayroll-managed section. Returns 404 if the file does not exist for the specified employee or the Files tool is not enabled for the company. Use 'List Employee Files' to obtain file IDs. OAuth Scopes: employee:file.write - :param id: The ID of the employee whose file is being deleted. Pass 0 to use the employee associated with the API key. (required) + :param id: The internal employee ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the authenticated caller. (required) :type id: int :param file_id: The ID of the employee file to delete. (required) :type file_id: int @@ -518,7 +458,7 @@ def delete_employee_file_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_employee_file_serialize( id=id, @@ -526,22 +466,18 @@ def delete_employee_file_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_employee_file_serialize( self, id, @@ -554,40 +490,31 @@ def _delete_employee_file_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id if file_id is not None: - _path_params['fileId'] = file_id + _path_params["fileId"] = file_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/employees/{id}/files/{fileId}', + method="DELETE", + resource_path="/api/v1/employees/{id}/files/{fileId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -597,35 +524,32 @@ def _delete_employee_file_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_employee_file( self, - id: Annotated[StrictInt, Field(description="The ID of the employee whose file is being retrieved. Pass 0 to use the employee associated with the API key.")], - file_id: Annotated[StrictInt, Field(description="The ID of the employee file to download.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[ + StrictInt | None, + Field( + description="The internal employee ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the authenticated caller." + ), + ], + file_id: Annotated[StrictInt | None, Field(description="The ID of the employee file to download.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> bytearray: """Get Employee File - Downloads the binary content of an employee file. The special employee ID of zero (0) resolves to the employee associated with the API key. The response is sent as an attachment and the Content-Type header reflects the stored file's MIME type. Returns 403 if the caller cannot access the employee or the file's section, and 404 if the file does not exist or is archived. + Downloads the binary content of an employee file as an attachment. The response Content-Type header reflects the file's stored MIME type (e.g. application/pdf) and includes a Content-Disposition header with the original filename. The special employee ID of 0 resolves to the employee associated with the authenticated caller. Use \"List Employee Files\" to discover file IDs and their categories for a given employee. Archived or soft-deleted files are excluded and return 404. OAuth Scopes: employee:file - :param id: The ID of the employee whose file is being retrieved. Pass 0 to use the employee associated with the API key. (required) + :param id: The internal employee ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the authenticated caller. (required) :type id: int :param file_id: The ID of the employee file to download. (required) :type file_id: int @@ -649,7 +573,7 @@ def get_employee_file( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_file_serialize( id=id, @@ -657,48 +581,44 @@ def get_employee_file( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "bytearray", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_employee_file_with_http_info( self, - id: Annotated[StrictInt, Field(description="The ID of the employee whose file is being retrieved. Pass 0 to use the employee associated with the API key.")], - file_id: Annotated[StrictInt, Field(description="The ID of the employee file to download.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[ + StrictInt | None, + Field( + description="The internal employee ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the authenticated caller." + ), + ], + file_id: Annotated[StrictInt | None, Field(description="The ID of the employee file to download.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[bytearray]: """Get Employee File - Downloads the binary content of an employee file. The special employee ID of zero (0) resolves to the employee associated with the API key. The response is sent as an attachment and the Content-Type header reflects the stored file's MIME type. Returns 403 if the caller cannot access the employee or the file's section, and 404 if the file does not exist or is archived. + Downloads the binary content of an employee file as an attachment. The response Content-Type header reflects the file's stored MIME type (e.g. application/pdf) and includes a Content-Disposition header with the original filename. The special employee ID of 0 resolves to the employee associated with the authenticated caller. Use \"List Employee Files\" to discover file IDs and their categories for a given employee. Archived or soft-deleted files are excluded and return 404. OAuth Scopes: employee:file - :param id: The ID of the employee whose file is being retrieved. Pass 0 to use the employee associated with the API key. (required) + :param id: The internal employee ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the authenticated caller. (required) :type id: int :param file_id: The ID of the employee file to download. (required) :type file_id: int @@ -722,7 +642,7 @@ def get_employee_file_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_file_serialize( id=id, @@ -730,48 +650,44 @@ def get_employee_file_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "bytearray", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_employee_file_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The ID of the employee whose file is being retrieved. Pass 0 to use the employee associated with the API key.")], - file_id: Annotated[StrictInt, Field(description="The ID of the employee file to download.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[ + StrictInt | None, + Field( + description="The internal employee ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the authenticated caller." + ), + ], + file_id: Annotated[StrictInt | None, Field(description="The ID of the employee file to download.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Employee File - Downloads the binary content of an employee file. The special employee ID of zero (0) resolves to the employee associated with the API key. The response is sent as an attachment and the Content-Type header reflects the stored file's MIME type. Returns 403 if the caller cannot access the employee or the file's section, and 404 if the file does not exist or is archived. + Downloads the binary content of an employee file as an attachment. The response Content-Type header reflects the file's stored MIME type (e.g. application/pdf) and includes a Content-Disposition header with the original filename. The special employee ID of 0 resolves to the employee associated with the authenticated caller. Use \"List Employee Files\" to discover file IDs and their categories for a given employee. Archived or soft-deleted files are excluded and return 404. OAuth Scopes: employee:file - :param id: The ID of the employee whose file is being retrieved. Pass 0 to use the employee associated with the API key. (required) + :param id: The internal employee ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the authenticated caller. (required) :type id: int :param file_id: The ID of the employee file to download. (required) :type file_id: int @@ -795,7 +711,7 @@ def get_employee_file_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_file_serialize( id=id, @@ -803,21 +719,17 @@ def get_employee_file_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "bytearray", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_employee_file_serialize( self, id, @@ -830,47 +742,35 @@ def _get_employee_file_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id if file_id is not None: - _path_params['fileId'] = file_id + _path_params["fileId"] = file_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/octet-stream' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/octet-stream"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employees/{id}/files/{fileId}', + method="GET", + resource_path="/api/v1/employees/{id}/files/{fileId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -880,37 +780,37 @@ def _get_employee_file_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_employee_files( self, - id: Annotated[StrictInt, Field(description="The ID of the employee whose files are being listed.")], - accept: Annotated[Optional[StrictStr], Field(description="Set to 'application/json' to receive a JSON response. Any other value (or omitted) returns XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[ + str, + Field(strict=True, description="The internal employee ID of the employee whose files are being listed."), + ], + accept: Annotated[ + StrictStr | None, + Field( + description="Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> JsonEmployeeFiles: """List Employee Files - Lists the file categories and files visible to the caller for the specified employee. The response format is controlled by the Accept header: send 'application/json' for JSON or omit/send anything else for XML. Only categories and files the caller is permitted to see are included; employees viewing their own profile also see files shared with them. + Lists the file categories and files visible to the caller for the specified employee. This is a metadata listing (names, sizes, permissions); to download a file's content use `get-employee-file`. The response format is controlled by the Accept header: send `application/json` for JSON or omit/send anything else for XML. Only categories and files the caller is permitted to see are included; employees viewing their own profile also see files shared with them. Returns 404 when the employee has no accessible categories. OAuth Scopes: employee:file - :param id: The ID of the employee whose files are being listed. (required) - :type id: int - :param accept: Set to 'application/json' to receive a JSON response. Any other value (or omitted) returns XML. + :param id: The internal employee ID of the employee whose files are being listed. (required) + :type id: str + :param accept: Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML. :type accept: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -932,7 +832,7 @@ def list_employee_files( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_employee_files_serialize( id=id, @@ -940,50 +840,49 @@ def list_employee_files( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "JsonEmployeeFiles", - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "JsonEmployeeFiles", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_employee_files_with_http_info( self, - id: Annotated[StrictInt, Field(description="The ID of the employee whose files are being listed.")], - accept: Annotated[Optional[StrictStr], Field(description="Set to 'application/json' to receive a JSON response. Any other value (or omitted) returns XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[ + str, + Field(strict=True, description="The internal employee ID of the employee whose files are being listed."), + ], + accept: Annotated[ + StrictStr | None, + Field( + description="Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[JsonEmployeeFiles]: """List Employee Files - Lists the file categories and files visible to the caller for the specified employee. The response format is controlled by the Accept header: send 'application/json' for JSON or omit/send anything else for XML. Only categories and files the caller is permitted to see are included; employees viewing their own profile also see files shared with them. + Lists the file categories and files visible to the caller for the specified employee. This is a metadata listing (names, sizes, permissions); to download a file's content use `get-employee-file`. The response format is controlled by the Accept header: send `application/json` for JSON or omit/send anything else for XML. Only categories and files the caller is permitted to see are included; employees viewing their own profile also see files shared with them. Returns 404 when the employee has no accessible categories. OAuth Scopes: employee:file - :param id: The ID of the employee whose files are being listed. (required) - :type id: int - :param accept: Set to 'application/json' to receive a JSON response. Any other value (or omitted) returns XML. + :param id: The internal employee ID of the employee whose files are being listed. (required) + :type id: str + :param accept: Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML. :type accept: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1005,7 +904,7 @@ def list_employee_files_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_employee_files_serialize( id=id, @@ -1013,50 +912,49 @@ def list_employee_files_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "JsonEmployeeFiles", - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "JsonEmployeeFiles", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_employee_files_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The ID of the employee whose files are being listed.")], - accept: Annotated[Optional[StrictStr], Field(description="Set to 'application/json' to receive a JSON response. Any other value (or omitted) returns XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[ + str, + Field(strict=True, description="The internal employee ID of the employee whose files are being listed."), + ], + accept: Annotated[ + StrictStr | None, + Field( + description="Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Employee Files - Lists the file categories and files visible to the caller for the specified employee. The response format is controlled by the Accept header: send 'application/json' for JSON or omit/send anything else for XML. Only categories and files the caller is permitted to see are included; employees viewing their own profile also see files shared with them. + Lists the file categories and files visible to the caller for the specified employee. This is a metadata listing (names, sizes, permissions); to download a file's content use `get-employee-file`. The response format is controlled by the Accept header: send `application/json` for JSON or omit/send anything else for XML. Only categories and files the caller is permitted to see are included; employees viewing their own profile also see files shared with them. Returns 404 when the employee has no accessible categories. OAuth Scopes: employee:file - :param id: The ID of the employee whose files are being listed. (required) - :type id: int - :param accept: Set to 'application/json' to receive a JSON response. Any other value (or omitted) returns XML. + :param id: The internal employee ID of the employee whose files are being listed. (required) + :type id: str + :param accept: Set to `application/json` to receive a JSON response. Any other value (or omitted) returns XML. :type accept: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1078,7 +976,7 @@ def list_employee_files_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_employee_files_serialize( id=id, @@ -1086,21 +984,17 @@ def list_employee_files_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "JsonEmployeeFiles", - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "JsonEmployeeFiles", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_employee_files_serialize( self, id, @@ -1113,48 +1007,35 @@ def _list_employee_files_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters if accept is not None: - _header_params['Accept'] = accept + _header_params["Accept"] = accept # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employees/{id}/files/view', + method="GET", + resource_path="/api/v1/employees/{id}/files/view", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1164,36 +1045,31 @@ def _list_employee_files_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_employee_file( self, - id: Annotated[StrictInt, Field(description="The ID of the employee whose file is being updated.")], - file_id: Annotated[StrictInt, Field(description="The ID of the employee file to update.")], + id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee whose file is being updated."), + ], + file_id: Annotated[StrictInt | None, Field(description="The ID of the employee file to update.")], employee_file_update: EmployeeFileUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Update Employee File - Updates metadata for an existing employee file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML; only fields present in the request body are updated. An empty XML document no-ops successfully, while an empty JSON body is treated as malformed JSON. + Updates metadata for an existing employee file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML; only fields present in the request body are updated. An empty XML document no-ops successfully, while an empty JSON body returns 400. The `categoryId` field is silently ignored when the caller authenticated as the file creator but lacks full file permissions. Moving a file to a new category requires view/edit access to both the current and target category. Returns 403 if the file belongs to a read-only file section. Use 'List Employee Files' to obtain file IDs and category IDs. OAuth Scopes: employee:file.write - :param id: The ID of the employee whose file is being updated. (required) + :param id: The internal employee ID of the employee whose file is being updated. (required) :type id: int :param file_id: The ID of the employee file to update. (required) :type file_id: int @@ -1219,7 +1095,7 @@ def update_employee_file( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_employee_file_serialize( id=id, @@ -1228,20 +1104,17 @@ def update_employee_file( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -1249,31 +1122,28 @@ def update_employee_file( response_types_map=_response_types_map, ) - @validate_call def update_employee_file_with_http_info( self, - id: Annotated[StrictInt, Field(description="The ID of the employee whose file is being updated.")], - file_id: Annotated[StrictInt, Field(description="The ID of the employee file to update.")], + id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee whose file is being updated."), + ], + file_id: Annotated[StrictInt | None, Field(description="The ID of the employee file to update.")], employee_file_update: EmployeeFileUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Update Employee File - Updates metadata for an existing employee file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML; only fields present in the request body are updated. An empty XML document no-ops successfully, while an empty JSON body is treated as malformed JSON. + Updates metadata for an existing employee file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML; only fields present in the request body are updated. An empty XML document no-ops successfully, while an empty JSON body returns 400. The `categoryId` field is silently ignored when the caller authenticated as the file creator but lacks full file permissions. Moving a file to a new category requires view/edit access to both the current and target category. Returns 403 if the file belongs to a read-only file section. Use 'List Employee Files' to obtain file IDs and category IDs. OAuth Scopes: employee:file.write - :param id: The ID of the employee whose file is being updated. (required) + :param id: The internal employee ID of the employee whose file is being updated. (required) :type id: int :param file_id: The ID of the employee file to update. (required) :type file_id: int @@ -1299,7 +1169,7 @@ def update_employee_file_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_employee_file_serialize( id=id, @@ -1308,51 +1178,45 @@ def update_employee_file_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_employee_file_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The ID of the employee whose file is being updated.")], - file_id: Annotated[StrictInt, Field(description="The ID of the employee file to update.")], + id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee whose file is being updated."), + ], + file_id: Annotated[StrictInt | None, Field(description="The ID of the employee file to update.")], employee_file_update: EmployeeFileUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Employee File - Updates metadata for an existing employee file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML; only fields present in the request body are updated. An empty XML document no-ops successfully, while an empty JSON body is treated as malformed JSON. + Updates metadata for an existing employee file. Supports renaming the file, moving it to a different category, and toggling employee visibility. Accepts JSON or XML; only fields present in the request body are updated. An empty XML document no-ops successfully, while an empty JSON body returns 400. The `categoryId` field is silently ignored when the caller authenticated as the file creator but lacks full file permissions. Moving a file to a new category requires view/edit access to both the current and target category. Returns 403 if the file belongs to a read-only file section. Use 'List Employee Files' to obtain file IDs and category IDs. OAuth Scopes: employee:file.write - :param id: The ID of the employee whose file is being updated. (required) + :param id: The internal employee ID of the employee whose file is being updated. (required) :type id: int :param file_id: The ID of the employee file to update. (required) :type file_id: int @@ -1378,7 +1242,7 @@ def update_employee_file_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_employee_file_serialize( id=id, @@ -1387,23 +1251,19 @@ def update_employee_file_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_employee_file_serialize( self, id, @@ -1417,23 +1277,20 @@ def _update_employee_file_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id if file_id is not None: - _path_params['fileId'] = file_id + _path_params["fileId"] = file_id # process the query parameters # process the header parameters # process the form parameters @@ -1441,32 +1298,20 @@ def _update_employee_file_serialize( if employee_file_update is not None: _body_params = employee_file_update - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json", "application/xml"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/employees/{id}/files/{fileId}', + method="POST", + resource_path="/api/v1/employees/{id}/files/{fileId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1476,38 +1321,44 @@ def _update_employee_file_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def upload_employee_file( self, - id: Annotated[StrictStr, Field(description="{id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any).")], + id: Annotated[ + StrictStr, + Field( + description="The internal employee ID of the employee to upload the file for. The special employee ID of zero (0) means to use the employee ID associated with the authenticated caller, when one exists." + ), + ], file_name: Annotated[StrictStr, Field(description="The display name for the uploaded file.")], - category: Annotated[StrictInt, Field(description="The ID of the employee file section to upload the file into.")], - file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The file to upload.")], - share: Annotated[Optional[StrictStr], Field(description="Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + category: Annotated[ + StrictInt, Field(description="The ID of the employee file section to upload the file into.") + ], + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], Field(description="The file to upload.") + ], + share: Annotated[ + StrictStr | None, + Field( + description="Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Upload Employee File - Uploads a file to an employee's file section. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Pass `0` as the employee ID to use the employee associated with the API key. Employees may upload to their own folder if the company has employee document uploads enabled. + Uploads a file to an employee's file section. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Pass `0` as the employee ID to use the employee associated with the authenticated caller. Employees may upload to their own folder if the company has employee document uploads enabled. OAuth Scopes: employee:file.write - :param id: {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) + :param id: The internal employee ID of the employee to upload the file for. The special employee ID of zero (0) means to use the employee ID associated with the authenticated caller, when one exists. (required) :type id: str :param file_name: The display name for the uploaded file. (required) :type file_name: str @@ -1537,7 +1388,7 @@ def upload_employee_file( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._upload_employee_file_serialize( id=id, @@ -1548,21 +1399,18 @@ def upload_employee_file( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '403': None, - '404': None, - '413': None, - '503': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "403": None, + "404": None, + "413": None, + "503": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -1570,33 +1418,41 @@ def upload_employee_file( response_types_map=_response_types_map, ) - @validate_call def upload_employee_file_with_http_info( self, - id: Annotated[StrictStr, Field(description="{id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any).")], + id: Annotated[ + StrictStr, + Field( + description="The internal employee ID of the employee to upload the file for. The special employee ID of zero (0) means to use the employee ID associated with the authenticated caller, when one exists." + ), + ], file_name: Annotated[StrictStr, Field(description="The display name for the uploaded file.")], - category: Annotated[StrictInt, Field(description="The ID of the employee file section to upload the file into.")], - file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The file to upload.")], - share: Annotated[Optional[StrictStr], Field(description="Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + category: Annotated[ + StrictInt, Field(description="The ID of the employee file section to upload the file into.") + ], + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], Field(description="The file to upload.") + ], + share: Annotated[ + StrictStr | None, + Field( + description="Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Upload Employee File - Uploads a file to an employee's file section. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Pass `0` as the employee ID to use the employee associated with the API key. Employees may upload to their own folder if the company has employee document uploads enabled. + Uploads a file to an employee's file section. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Pass `0` as the employee ID to use the employee associated with the authenticated caller. Employees may upload to their own folder if the company has employee document uploads enabled. OAuth Scopes: employee:file.write - :param id: {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) + :param id: The internal employee ID of the employee to upload the file for. The special employee ID of zero (0) means to use the employee ID associated with the authenticated caller, when one exists. (required) :type id: str :param file_name: The display name for the uploaded file. (required) :type file_name: str @@ -1626,7 +1482,7 @@ def upload_employee_file_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._upload_employee_file_serialize( id=id, @@ -1637,54 +1493,59 @@ def upload_employee_file_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '403': None, - '404': None, - '413': None, - '503': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "403": None, + "404": None, + "413": None, + "503": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def upload_employee_file_without_preload_content( self, - id: Annotated[StrictStr, Field(description="{id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any).")], + id: Annotated[ + StrictStr, + Field( + description="The internal employee ID of the employee to upload the file for. The special employee ID of zero (0) means to use the employee ID associated with the authenticated caller, when one exists." + ), + ], file_name: Annotated[StrictStr, Field(description="The display name for the uploaded file.")], - category: Annotated[StrictInt, Field(description="The ID of the employee file section to upload the file into.")], - file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The file to upload.")], - share: Annotated[Optional[StrictStr], Field(description="Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + category: Annotated[ + StrictInt, Field(description="The ID of the employee file section to upload the file into.") + ], + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], Field(description="The file to upload.") + ], + share: Annotated[ + StrictStr | None, + Field( + description="Whether to share the file with the employee. Accepted values: `yes` or `no`. Defaults to `no`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Upload Employee File - Uploads a file to an employee's file section. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Pass `0` as the employee ID to use the employee associated with the API key. Employees may upload to their own folder if the company has employee document uploads enabled. + Uploads a file to an employee's file section. The request must be a `multipart/form-data` POST. On success, a `Location` header is returned with the URL of the newly created file resource. The file must be under 20MB and use a supported extension. Pass `0` as the employee ID to use the employee associated with the authenticated caller. Employees may upload to their own folder if the company has employee document uploads enabled. OAuth Scopes: employee:file.write - :param id: {id} is an employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) + :param id: The internal employee ID of the employee to upload the file for. The special employee ID of zero (0) means to use the employee ID associated with the authenticated caller, when one exists. (required) :type id: str :param file_name: The display name for the uploaded file. (required) :type file_name: str @@ -1714,7 +1575,7 @@ def upload_employee_file_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._upload_employee_file_serialize( id=id, @@ -1725,24 +1586,20 @@ def upload_employee_file_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '403': None, - '404': None, - '413': None, - '503': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "403": None, + "404": None, + "413": None, + "503": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _upload_employee_file_serialize( self, id, @@ -1758,59 +1615,45 @@ def _upload_employee_file_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters if file_name is not None: - _form_params.append(('fileName', file_name)) + _form_params.append(("fileName", file_name)) if category is not None: - _form_params.append(('category', category)) + _form_params.append(("category", category)) if share is not None: - _form_params.append(('share', share)) + _form_params.append(("share", share)) if file is not None: - _files['file'] = file + _files["file"] = file # process the body parameter - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'multipart/form-data' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/employees/{id}/files', + method="POST", + resource_path="/api/v1/employees/{id}/files", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1820,7 +1663,5 @@ def _upload_employee_file_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/tabular_data_api.py b/bamboohr_sdk/api/employee_tables_api.py similarity index 52% rename from bamboohr_sdk/api/tabular_data_api.py rename to bamboohr_sdk/api/employee_tables_api.py index b15203f..603db27 100644 --- a/bamboohr_sdk/api/tabular_data_api.py +++ b/bamboohr_sdk/api/employee_tables_api.py @@ -1,36 +1,28 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from datetime import datetime -from pydantic import Field, StrictStr, field_validator -from typing import List, Optional -from typing_extensions import Annotated -from bamboohr_sdk.models.changed_employee_table_data_response import ChangedEmployeeTableDataResponse -from bamboohr_sdk.models.employee_table_row import EmployeeTableRow -from bamboohr_sdk.models.table_row_delete_response import TableRowDeleteResponse -from bamboohr_sdk.models.table_row_update import TableRowUpdate +from typing import Annotated, Any + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call from bamboohr_sdk.api_client import ApiClient, RequestSerialized from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.employee_table_row import EmployeeTableRow +from bamboohr_sdk.models.table_row_delete_response import TableRowDeleteResponse +from bamboohr_sdk.models.table_row_update import TableRowUpdate from bamboohr_sdk.rest import RESTResponseType -class TabularDataApi: +class EmployeeTablesApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -42,33 +34,32 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call - def create_table_row( + def create_table_row_v1( self, id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table to add a row to (e.g., jobInfo, compensation).")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], table_row_update: TableRowUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Create Table Row + """(Deprecated) Create Table Row (v1) - Add a new row to the specified employee table by submitting field name/value pairs in JSON or XML. Use this endpoint to append records to tabular employee data such as job information or compensation history. + Deprecated. Use **Create Table Row (v1.1)** instead (`create-table-row-v1_1`). Add a new row to the specified employee table by submitting field name/value pairs in JSON or XML. Use this endpoint to append records to tabular employee data such as job information or compensation history. OAuth Scopes: employee, employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job, employee:job.write, sensitive_employee:creditcards.write :param id: The employee ID. (required) :type id: str - :param table: The name of the table to add a row to (e.g., jobInfo, compensation). (required) + :param table: The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) :type table: str :param table_row_update: (required) :type table_row_update: TableRowUpdate @@ -92,31 +83,29 @@ def create_table_row( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/employees/{id}/tables/{table} is deprecated.", DeprecationWarning) - _param = self._create_table_row_serialize( + _param = self._create_table_row_v1_serialize( id=id, table=table, table_row_update=table_row_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '406': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "406": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -124,33 +113,32 @@ def create_table_row( response_types_map=_response_types_map, ) - @validate_call - def create_table_row_with_http_info( + def create_table_row_v1_with_http_info( self, id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table to add a row to (e.g., jobInfo, compensation).")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], table_row_update: TableRowUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Create Table Row + """(Deprecated) Create Table Row (v1) - Add a new row to the specified employee table by submitting field name/value pairs in JSON or XML. Use this endpoint to append records to tabular employee data such as job information or compensation history. + Deprecated. Use **Create Table Row (v1.1)** instead (`create-table-row-v1_1`). Add a new row to the specified employee table by submitting field name/value pairs in JSON or XML. Use this endpoint to append records to tabular employee data such as job information or compensation history. OAuth Scopes: employee, employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job, employee:job.write, sensitive_employee:creditcards.write :param id: The employee ID. (required) :type id: str - :param table: The name of the table to add a row to (e.g., jobInfo, compensation). (required) + :param table: The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) :type table: str :param table_row_update: (required) :type table_row_update: TableRowUpdate @@ -174,64 +162,61 @@ def create_table_row_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/employees/{id}/tables/{table} is deprecated.", DeprecationWarning) - _param = self._create_table_row_serialize( + _param = self._create_table_row_v1_serialize( id=id, table=table, table_row_update=table_row_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '406': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "406": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def create_table_row_without_preload_content( + def create_table_row_v1_without_preload_content( self, id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table to add a row to (e.g., jobInfo, compensation).")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], table_row_update: TableRowUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Table Row + """(Deprecated) Create Table Row (v1) - Add a new row to the specified employee table by submitting field name/value pairs in JSON or XML. Use this endpoint to append records to tabular employee data such as job information or compensation history. + Deprecated. Use **Create Table Row (v1.1)** instead (`create-table-row-v1_1`). Add a new row to the specified employee table by submitting field name/value pairs in JSON or XML. Use this endpoint to append records to tabular employee data such as job information or compensation history. OAuth Scopes: employee, employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job, employee:job.write, sensitive_employee:creditcards.write :param id: The employee ID. (required) :type id: str - :param table: The name of the table to add a row to (e.g., jobInfo, compensation). (required) + :param table: The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) :type table: str :param table_row_update: (required) :type table_row_update: TableRowUpdate @@ -255,35 +240,32 @@ def create_table_row_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/employees/{id}/tables/{table} is deprecated.", DeprecationWarning) - _param = self._create_table_row_serialize( + _param = self._create_table_row_v1_serialize( id=id, table=table, table_row_update=table_row_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '406': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "406": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _create_table_row_serialize( + def _create_table_row_v1_serialize( self, id, table, @@ -296,23 +278,20 @@ def _create_table_row_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id if table is not None: - _path_params['table'] = table + _path_params["table"] = table # process the query parameters # process the header parameters # process the form parameters @@ -320,33 +299,22 @@ def _create_table_row_serialize( if table_row_update is not None: _body_params = table_row_update - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml', - 'text/xml' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "application/xml", "text/xml"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/employees/{id}/tables/{table}', + method="POST", + resource_path="/api/v1/employees/{id}/tables/{table}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -356,38 +324,35 @@ def _create_table_row_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def create_table_row_v11( self, id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table to add a row to (e.g., jobInfo, compensation).")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], table_row_update: TableRowUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Create Table Row v1.1 + """Create Table Row (v1.1) - Add a new row to the specified employee table using the v1.1 table-row creation endpoint. Submit the new row in JSON or XML. This version is largely compatible with v1 and supports the same tabular employee data use cases. + Add a new row to the specified employee table using the v1.1 table-row creation endpoint. Submit the new row in JSON or XML. This version is largely compatible with v1 and supports the same tabular employee data use cases. OAuth Scopes: employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job.write, sensitive_employee:creditcards.write :param id: The employee ID. (required) :type id: str - :param table: The name of the table to add a row to (e.g., jobInfo, compensation). (required) + :param table: The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) :type table: str :param table_row_update: (required) :type table_row_update: TableRowUpdate @@ -411,7 +376,7 @@ def create_table_row_v11( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_table_row_v11_serialize( id=id, @@ -420,22 +385,19 @@ def create_table_row_v11( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '406': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "406": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -443,33 +405,32 @@ def create_table_row_v11( response_types_map=_response_types_map, ) - @validate_call def create_table_row_v11_with_http_info( self, id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table to add a row to (e.g., jobInfo, compensation).")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], table_row_update: TableRowUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Create Table Row v1.1 + """Create Table Row (v1.1) - Add a new row to the specified employee table using the v1.1 table-row creation endpoint. Submit the new row in JSON or XML. This version is largely compatible with v1 and supports the same tabular employee data use cases. + Add a new row to the specified employee table using the v1.1 table-row creation endpoint. Submit the new row in JSON or XML. This version is largely compatible with v1 and supports the same tabular employee data use cases. OAuth Scopes: employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job.write, sensitive_employee:creditcards.write :param id: The employee ID. (required) :type id: str - :param table: The name of the table to add a row to (e.g., jobInfo, compensation). (required) + :param table: The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) :type table: str :param table_row_update: (required) :type table_row_update: TableRowUpdate @@ -493,7 +454,7 @@ def create_table_row_v11_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_table_row_v11_serialize( id=id, @@ -502,55 +463,51 @@ def create_table_row_v11_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '406': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "406": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_table_row_v11_without_preload_content( self, id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table to add a row to (e.g., jobInfo, compensation).")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], table_row_update: TableRowUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Table Row v1.1 + """Create Table Row (v1.1) - Add a new row to the specified employee table using the v1.1 table-row creation endpoint. Submit the new row in JSON or XML. This version is largely compatible with v1 and supports the same tabular employee data use cases. + Add a new row to the specified employee table using the v1.1 table-row creation endpoint. Submit the new row in JSON or XML. This version is largely compatible with v1 and supports the same tabular employee data use cases. OAuth Scopes: employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job.write, sensitive_employee:creditcards.write :param id: The employee ID. (required) :type id: str - :param table: The name of the table to add a row to (e.g., jobInfo, compensation). (required) + :param table: The API name of the table to add a row to. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) :type table: str :param table_row_update: (required) :type table_row_update: TableRowUpdate @@ -574,7 +531,7 @@ def create_table_row_v11_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_table_row_v11_serialize( id=id, @@ -583,25 +540,21 @@ def create_table_row_v11_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '406': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "406": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_table_row_v11_serialize( self, id, @@ -615,23 +568,20 @@ def _create_table_row_v11_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id if table is not None: - _path_params['table'] = table + _path_params["table"] = table # process the query parameters # process the header parameters # process the form parameters @@ -639,33 +589,22 @@ def _create_table_row_v11_serialize( if table_row_update is not None: _body_params = table_row_update - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml', - 'text/xml' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "application/xml", "text/xml"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1_1/employees/{id}/tables/{table}', + method="POST", + resource_path="/api/v1_1/employees/{id}/tables/{table}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -675,38 +614,35 @@ def _create_table_row_v11_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def delete_employee_table_row( self, - id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table containing the row to delete (e.g., jobInfo, compensation, customTabularField).")], - row_id: Annotated[StrictStr, Field(description="The ID of the specific row to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictStr | None, Field(description="The internal employee ID.")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list." + ), + ], + row_id: Annotated[StrictStr | None, Field(description="The ID of the specific row to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TableRowDeleteResponse: """Delete Employee Table Row - Deletes a specific row from an employee's tabular data. The table name identifies which tabular dataset to target (e.g., jobInfo, compensation, customTabularField). Returns `success: true` if the row was deleted, or `success: false` with an error message if the row was not found or could not be deleted. Deletion will fail with a 409 if the row has pending approval changes, or a 412 if the row is tied to an active pay schedule. + Deletes a specific row from an employee's tabular data. The table name identifies which tabular dataset to target (e.g., jobInfo, compensation, customTabularField). Returns `success: true` if the row was deleted, or `success: false` with an error message if the row was not found or could not be deleted. Deletion will fail with a 409 if the row has pending approval changes, or a 412 if the row is tied to an active pay schedule. Per-table field schemas are available as named OpenAPI components (e.g., `JobInfoTableRowRequest`, `CompensationTableRowRequest`). See the components/schemas section of this spec for the full list. OAuth Scopes: employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job.write, sensitive_employee:creditcards.write - :param id: The employee ID. (required) + :param id: The internal employee ID. (required) :type id: str - :param table: The name of the table containing the row to delete (e.g., jobInfo, compensation, customTabularField). (required) + :param table: The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list. (required) :type table: str :param row_id: The ID of the specific row to delete. (required) :type row_id: str @@ -730,7 +666,7 @@ def delete_employee_table_row( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_employee_table_row_serialize( id=id, @@ -739,54 +675,50 @@ def delete_employee_table_row( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TableRowDeleteResponse", - '400': None, - '401': None, - '403': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": "TableRowDeleteResponse", + "400": None, + "401": None, + "403": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def delete_employee_table_row_with_http_info( self, - id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table containing the row to delete (e.g., jobInfo, compensation, customTabularField).")], - row_id: Annotated[StrictStr, Field(description="The ID of the specific row to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictStr | None, Field(description="The internal employee ID.")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list." + ), + ], + row_id: Annotated[StrictStr | None, Field(description="The ID of the specific row to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TableRowDeleteResponse]: """Delete Employee Table Row - Deletes a specific row from an employee's tabular data. The table name identifies which tabular dataset to target (e.g., jobInfo, compensation, customTabularField). Returns `success: true` if the row was deleted, or `success: false` with an error message if the row was not found or could not be deleted. Deletion will fail with a 409 if the row has pending approval changes, or a 412 if the row is tied to an active pay schedule. + Deletes a specific row from an employee's tabular data. The table name identifies which tabular dataset to target (e.g., jobInfo, compensation, customTabularField). Returns `success: true` if the row was deleted, or `success: false` with an error message if the row was not found or could not be deleted. Deletion will fail with a 409 if the row has pending approval changes, or a 412 if the row is tied to an active pay schedule. Per-table field schemas are available as named OpenAPI components (e.g., `JobInfoTableRowRequest`, `CompensationTableRowRequest`). See the components/schemas section of this spec for the full list. OAuth Scopes: employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job.write, sensitive_employee:creditcards.write - :param id: The employee ID. (required) + :param id: The internal employee ID. (required) :type id: str - :param table: The name of the table containing the row to delete (e.g., jobInfo, compensation, customTabularField). (required) + :param table: The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list. (required) :type table: str :param row_id: The ID of the specific row to delete. (required) :type row_id: str @@ -810,7 +742,7 @@ def delete_employee_table_row_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_employee_table_row_serialize( id=id, @@ -819,54 +751,50 @@ def delete_employee_table_row_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TableRowDeleteResponse", - '400': None, - '401': None, - '403': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": "TableRowDeleteResponse", + "400": None, + "401": None, + "403": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def delete_employee_table_row_without_preload_content( self, - id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table containing the row to delete (e.g., jobInfo, compensation, customTabularField).")], - row_id: Annotated[StrictStr, Field(description="The ID of the specific row to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictStr | None, Field(description="The internal employee ID.")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list." + ), + ], + row_id: Annotated[StrictStr | None, Field(description="The ID of the specific row to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Delete Employee Table Row - Deletes a specific row from an employee's tabular data. The table name identifies which tabular dataset to target (e.g., jobInfo, compensation, customTabularField). Returns `success: true` if the row was deleted, or `success: false` with an error message if the row was not found or could not be deleted. Deletion will fail with a 409 if the row has pending approval changes, or a 412 if the row is tied to an active pay schedule. + Deletes a specific row from an employee's tabular data. The table name identifies which tabular dataset to target (e.g., jobInfo, compensation, customTabularField). Returns `success: true` if the row was deleted, or `success: false` with an error message if the row was not found or could not be deleted. Deletion will fail with a 409 if the row has pending approval changes, or a 412 if the row is tied to an active pay schedule. Per-table field schemas are available as named OpenAPI components (e.g., `JobInfoTableRowRequest`, `CompensationTableRowRequest`). See the components/schemas section of this spec for the full list. OAuth Scopes: employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job.write, sensitive_employee:creditcards.write - :param id: The employee ID. (required) + :param id: The internal employee ID. (required) :type id: str - :param table: The name of the table containing the row to delete (e.g., jobInfo, compensation, customTabularField). (required) + :param table: The API name of the table containing the row to delete. See the TableName schema for valid standard values; custom tables use a `custom` prefix (e.g., `customTabularField`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover the complete list. (required) :type table: str :param row_id: The ID of the specific row to delete. (required) :type row_id: str @@ -890,7 +818,7 @@ def delete_employee_table_row_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_employee_table_row_serialize( id=id, @@ -899,24 +827,20 @@ def delete_employee_table_row_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TableRowDeleteResponse", - '400': None, - '401': None, - '403': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": "TableRowDeleteResponse", + "400": None, + "401": None, + "403": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_employee_table_row_serialize( self, id, @@ -930,49 +854,37 @@ def _delete_employee_table_row_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id if table is not None: - _path_params['table'] = table + _path_params["table"] = table if row_id is not None: - _path_params['rowId'] = row_id + _path_params["rowId"] = row_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/employees/{id}/tables/{table}/{rowId}', + method="DELETE", + resource_path="/api/v1/employees/{id}/tables/{table}/{rowId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -982,333 +894,42 @@ def _delete_employee_table_row_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_changed_employee_table_data( - self, - table: Annotated[StrictStr, Field(description="The name of the table to retrieve changed data for (e.g., jobInfo, compensation).")], - since: Annotated[datetime, Field(description="ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ChangedEmployeeTableDataResponse: - """Get Changed Employee Table Data - - Returns table data for employees that have changed since the given timestamp. This is an optimization to avoid downloading all table data for all employees. It operates on an employee-last-changed-timestamp, which means that a change in ANY field in the employee record will cause ALL of that employee's table rows to show up via this API. The response includes the table rows grouped by employee ID with their last-changed timestamps. - - :param table: The name of the table to retrieve changed data for (e.g., jobInfo, compensation). (required) - :type table: str - :param since: ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) - :type since: datetime - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_changed_employee_table_data_serialize( - table=table, - since=since, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ChangedEmployeeTableDataResponse", - '400': None, - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_changed_employee_table_data_with_http_info( - self, - table: Annotated[StrictStr, Field(description="The name of the table to retrieve changed data for (e.g., jobInfo, compensation).")], - since: Annotated[datetime, Field(description="ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ChangedEmployeeTableDataResponse]: - """Get Changed Employee Table Data - - Returns table data for employees that have changed since the given timestamp. This is an optimization to avoid downloading all table data for all employees. It operates on an employee-last-changed-timestamp, which means that a change in ANY field in the employee record will cause ALL of that employee's table rows to show up via this API. The response includes the table rows grouped by employee ID with their last-changed timestamps. - - :param table: The name of the table to retrieve changed data for (e.g., jobInfo, compensation). (required) - :type table: str - :param since: ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) - :type since: datetime - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_changed_employee_table_data_serialize( - table=table, - since=since, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ChangedEmployeeTableDataResponse", - '400': None, - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_changed_employee_table_data_without_preload_content( - self, - table: Annotated[StrictStr, Field(description="The name of the table to retrieve changed data for (e.g., jobInfo, compensation).")], - since: Annotated[datetime, Field(description="ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Changed Employee Table Data - - Returns table data for employees that have changed since the given timestamp. This is an optimization to avoid downloading all table data for all employees. It operates on an employee-last-changed-timestamp, which means that a change in ANY field in the employee record will cause ALL of that employee's table rows to show up via this API. The response includes the table rows grouped by employee ID with their last-changed timestamps. - - :param table: The name of the table to retrieve changed data for (e.g., jobInfo, compensation). (required) - :type table: str - :param since: ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) - :type since: datetime - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_changed_employee_table_data_serialize( - table=table, - since=since, _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ChangedEmployeeTableDataResponse", - '400': None, - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_changed_employee_table_data_serialize( - self, - table, - since, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if table is not None: - _path_params['table'] = table - # process the query parameters - if since is not None: - if isinstance(since, datetime): - _query_params.append( - ( - 'since', - since.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('since', since)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employees/changed/tables/{table}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth ) - - - @validate_call def get_employee_table_data( self, - id: Annotated[StrictStr, Field(description="The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to.")], - table: Annotated[StrictStr, Field(description="The name of the table to retrieve (e.g., jobInfo, compensation, employmentStatus).")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[ + StrictStr | None, + Field( + description='The internal employee ID. Use the special value "all" to retrieve table data for all employees the authenticated caller has access to.' + ), + ], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names." + ), + ], + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[EmployeeTableRow]: + ) -> list[EmployeeTableRow]: """Get Employee Table Data - Returns all rows for a given employee and table combination. The result is not sorted in any particular order. Each row contains the fields defined for that table, subject to field-level permission checks. Fields the caller does not have access to are omitted from the response. + Returns all rows for a given employee and table combination. The result is not sorted in any particular order. Each row contains the fields defined for that table, subject to field-level permission checks. Fields the caller does not have access to are omitted from the response. OAuth Scopes: employee, employee:assets, employee:compensation, employee:custom_fields, employee:custom_fields_encrypted, employee:education, employee:emergency_contacts, employee:job, employee:job.write, sensitive_employee:creditcards - :param id: The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to. (required) + :param id: The internal employee ID. Use the special value \"all\" to retrieve table data for all employees the authenticated caller has access to. (required) :type id: str - :param table: The name of the table to retrieve (e.g., jobInfo, compensation, employmentStatus). (required) + :param table: The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names. (required) :type table: str :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -1332,7 +953,7 @@ def get_employee_table_data( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_table_data_serialize( id=id, @@ -1341,50 +962,53 @@ def get_employee_table_data( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EmployeeTableRow]", - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "List[EmployeeTableRow]", + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_employee_table_data_with_http_info( self, - id: Annotated[StrictStr, Field(description="The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to.")], - table: Annotated[StrictStr, Field(description="The name of the table to retrieve (e.g., jobInfo, compensation, employmentStatus).")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[ + StrictStr | None, + Field( + description='The internal employee ID. Use the special value "all" to retrieve table data for all employees the authenticated caller has access to.' + ), + ], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names." + ), + ], + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[EmployeeTableRow]]: + ) -> ApiResponse[list[EmployeeTableRow]]: """Get Employee Table Data - Returns all rows for a given employee and table combination. The result is not sorted in any particular order. Each row contains the fields defined for that table, subject to field-level permission checks. Fields the caller does not have access to are omitted from the response. + Returns all rows for a given employee and table combination. The result is not sorted in any particular order. Each row contains the fields defined for that table, subject to field-level permission checks. Fields the caller does not have access to are omitted from the response. OAuth Scopes: employee, employee:assets, employee:compensation, employee:custom_fields, employee:custom_fields_encrypted, employee:education, employee:emergency_contacts, employee:job, employee:job.write, sensitive_employee:creditcards - :param id: The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to. (required) + :param id: The internal employee ID. Use the special value \"all\" to retrieve table data for all employees the authenticated caller has access to. (required) :type id: str - :param table: The name of the table to retrieve (e.g., jobInfo, compensation, employmentStatus). (required) + :param table: The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names. (required) :type table: str :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -1408,7 +1032,7 @@ def get_employee_table_data_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_table_data_serialize( id=id, @@ -1417,50 +1041,53 @@ def get_employee_table_data_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EmployeeTableRow]", - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "List[EmployeeTableRow]", + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_employee_table_data_without_preload_content( self, - id: Annotated[StrictStr, Field(description="The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to.")], - table: Annotated[StrictStr, Field(description="The name of the table to retrieve (e.g., jobInfo, compensation, employmentStatus).")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[ + StrictStr | None, + Field( + description='The internal employee ID. Use the special value "all" to retrieve table data for all employees the authenticated caller has access to.' + ), + ], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names." + ), + ], + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Employee Table Data - Returns all rows for a given employee and table combination. The result is not sorted in any particular order. Each row contains the fields defined for that table, subject to field-level permission checks. Fields the caller does not have access to are omitted from the response. + Returns all rows for a given employee and table combination. The result is not sorted in any particular order. Each row contains the fields defined for that table, subject to field-level permission checks. Fields the caller does not have access to are omitted from the response. OAuth Scopes: employee, employee:assets, employee:compensation, employee:custom_fields, employee:custom_fields_encrypted, employee:education, employee:emergency_contacts, employee:job, employee:job.write, sensitive_employee:creditcards - :param id: The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user has access to. (required) + :param id: The internal employee ID. Use the special value \"all\" to retrieve table data for all employees the authenticated caller has access to. (required) :type id: str - :param table: The name of the table to retrieve (e.g., jobInfo, compensation, employmentStatus). (required) + :param table: The API name of the table to retrieve. See the TableName schema for standard values; custom tables also accepted (e.g., `custom1`, `custom42`). Use the `list-tabular-fields` tool (GET /api/v1/meta/tables) to discover custom table names. (required) :type table: str :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -1484,7 +1111,7 @@ def get_employee_table_data_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_table_data_serialize( id=id, @@ -1493,20 +1120,16 @@ def get_employee_table_data_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EmployeeTableRow]", - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "List[EmployeeTableRow]", + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_employee_table_data_serialize( self, id, @@ -1520,50 +1143,37 @@ def _get_employee_table_data_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id if table is not None: - _path_params['table'] = table + _path_params["table"] = table # process the query parameters # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employees/{id}/tables/{table}', + method="GET", + resource_path="/api/v1/employees/{id}/tables/{table}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1573,39 +1183,36 @@ def _get_employee_table_data_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def update_table_row( + def update_table_row_v1( self, id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table containing the row to update (e.g., jobInfo, compensation).")], - row_id: Annotated[StrictStr, Field(description="The ID of the row to update.")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], + row_id: Annotated[StrictStr | None, Field(description="The ID of the row to update.")], table_row_update: TableRowUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Update Table Row + """(Deprecated) Update Table Row (v1) - Update an existing row in the specified employee table by submitting field name/value pairs for the fields to change in JSON or XML. + Deprecated. Use **Update Table Row (v1.1)** instead (`update-table-row-v1_1`). Update an existing row in the specified employee table by submitting field name/value pairs for the fields to change in JSON or XML. OAuth Scopes: employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job.write, sensitive_employee:creditcards.write :param id: The employee ID. (required) :type id: str - :param table: The name of the table containing the row to update (e.g., jobInfo, compensation). (required) + :param table: The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) :type table: str :param row_id: The ID of the row to update. (required) :type row_id: str @@ -1631,9 +1238,10 @@ def update_table_row( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/employees/{id}/tables/{table}/{rowId} is deprecated.", DeprecationWarning) - _param = self._update_table_row_serialize( + _param = self._update_table_row_v1_serialize( id=id, table=table, row_id=row_id, @@ -1641,22 +1249,19 @@ def update_table_row( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '406': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "406": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -1664,34 +1269,33 @@ def update_table_row( response_types_map=_response_types_map, ) - @validate_call - def update_table_row_with_http_info( + def update_table_row_v1_with_http_info( self, id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table containing the row to update (e.g., jobInfo, compensation).")], - row_id: Annotated[StrictStr, Field(description="The ID of the row to update.")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], + row_id: Annotated[StrictStr | None, Field(description="The ID of the row to update.")], table_row_update: TableRowUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Update Table Row + """(Deprecated) Update Table Row (v1) - Update an existing row in the specified employee table by submitting field name/value pairs for the fields to change in JSON or XML. + Deprecated. Use **Update Table Row (v1.1)** instead (`update-table-row-v1_1`). Update an existing row in the specified employee table by submitting field name/value pairs for the fields to change in JSON or XML. OAuth Scopes: employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job.write, sensitive_employee:creditcards.write :param id: The employee ID. (required) :type id: str - :param table: The name of the table containing the row to update (e.g., jobInfo, compensation). (required) + :param table: The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) :type table: str :param row_id: The ID of the row to update. (required) :type row_id: str @@ -1717,9 +1321,10 @@ def update_table_row_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/employees/{id}/tables/{table}/{rowId} is deprecated.", DeprecationWarning) - _param = self._update_table_row_serialize( + _param = self._update_table_row_v1_serialize( id=id, table=table, row_id=row_id, @@ -1727,56 +1332,52 @@ def update_table_row_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '406': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "406": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def update_table_row_without_preload_content( + def update_table_row_v1_without_preload_content( self, id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table containing the row to update (e.g., jobInfo, compensation).")], - row_id: Annotated[StrictStr, Field(description="The ID of the row to update.")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], + row_id: Annotated[StrictStr | None, Field(description="The ID of the row to update.")], table_row_update: TableRowUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Table Row + """(Deprecated) Update Table Row (v1) - Update an existing row in the specified employee table by submitting field name/value pairs for the fields to change in JSON or XML. + Deprecated. Use **Update Table Row (v1.1)** instead (`update-table-row-v1_1`). Update an existing row in the specified employee table by submitting field name/value pairs for the fields to change in JSON or XML. OAuth Scopes: employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job.write, sensitive_employee:creditcards.write :param id: The employee ID. (required) :type id: str - :param table: The name of the table containing the row to update (e.g., jobInfo, compensation). (required) + :param table: The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) :type table: str :param row_id: The ID of the row to update. (required) :type row_id: str @@ -1802,9 +1403,10 @@ def update_table_row_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/employees/{id}/tables/{table}/{rowId} is deprecated.", DeprecationWarning) - _param = self._update_table_row_serialize( + _param = self._update_table_row_v1_serialize( id=id, table=table, row_id=row_id, @@ -1812,26 +1414,22 @@ def update_table_row_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '406': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "406": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _update_table_row_serialize( + def _update_table_row_v1_serialize( self, id, table, @@ -1845,25 +1443,22 @@ def _update_table_row_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id if table is not None: - _path_params['table'] = table + _path_params["table"] = table if row_id is not None: - _path_params['rowId'] = row_id + _path_params["rowId"] = row_id # process the query parameters # process the header parameters # process the form parameters @@ -1871,33 +1466,22 @@ def _update_table_row_serialize( if table_row_update is not None: _body_params = table_row_update - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml', - 'text/xml' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "application/xml", "text/xml"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/employees/{id}/tables/{table}/{rowId}', + method="POST", + resource_path="/api/v1/employees/{id}/tables/{table}/{rowId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1907,39 +1491,36 @@ def _update_table_row_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_table_row_v11( self, id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table containing the row to update (e.g., jobInfo, compensation).")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], row_id: Annotated[StrictStr, Field(description="The ID of the row to update.")], table_row_update: TableRowUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Update Table Row v1.1 + """Update Table Row (v1.1) - Update an existing row in the specified employee table using the v1.1 table-row update endpoint. Submit the field changes in JSON or XML. This version is largely compatible with v1 and is intended for the same tabular employee data use cases. + Update an existing row in the specified employee table using the v1.1 table-row update endpoint. Submit the field changes in JSON or XML. This version is largely compatible with v1 and is intended for the same tabular employee data use cases. OAuth Scopes: employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job.write, sensitive_employee:creditcards.write :param id: The employee ID. (required) :type id: str - :param table: The name of the table containing the row to update (e.g., jobInfo, compensation). (required) + :param table: The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) :type table: str :param row_id: The ID of the row to update. (required) :type row_id: str @@ -1965,7 +1546,7 @@ def update_table_row_v11( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_table_row_v11_serialize( id=id, @@ -1975,22 +1556,19 @@ def update_table_row_v11( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '406': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "406": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -1998,34 +1576,33 @@ def update_table_row_v11( response_types_map=_response_types_map, ) - @validate_call def update_table_row_v11_with_http_info( self, id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table containing the row to update (e.g., jobInfo, compensation).")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], row_id: Annotated[StrictStr, Field(description="The ID of the row to update.")], table_row_update: TableRowUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Update Table Row v1.1 + """Update Table Row (v1.1) - Update an existing row in the specified employee table using the v1.1 table-row update endpoint. Submit the field changes in JSON or XML. This version is largely compatible with v1 and is intended for the same tabular employee data use cases. + Update an existing row in the specified employee table using the v1.1 table-row update endpoint. Submit the field changes in JSON or XML. This version is largely compatible with v1 and is intended for the same tabular employee data use cases. OAuth Scopes: employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job.write, sensitive_employee:creditcards.write :param id: The employee ID. (required) :type id: str - :param table: The name of the table containing the row to update (e.g., jobInfo, compensation). (required) + :param table: The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) :type table: str :param row_id: The ID of the row to update. (required) :type row_id: str @@ -2051,7 +1628,7 @@ def update_table_row_v11_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_table_row_v11_serialize( id=id, @@ -2061,56 +1638,52 @@ def update_table_row_v11_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '406': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "406": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_table_row_v11_without_preload_content( self, id: Annotated[StrictStr, Field(description="The employee ID.")], - table: Annotated[StrictStr, Field(description="The name of the table containing the row to update (e.g., jobInfo, compensation).")], + table: Annotated[ + StrictStr, + Field( + description="The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list." + ), + ], row_id: Annotated[StrictStr, Field(description="The ID of the row to update.")], table_row_update: TableRowUpdate, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Table Row v1.1 + """Update Table Row (v1.1) - Update an existing row in the specified employee table using the v1.1 table-row update endpoint. Submit the field changes in JSON or XML. This version is largely compatible with v1 and is intended for the same tabular employee data use cases. + Update an existing row in the specified employee table using the v1.1 table-row update endpoint. Submit the field changes in JSON or XML. This version is largely compatible with v1 and is intended for the same tabular employee data use cases. OAuth Scopes: employee.write, employee:assets.write, employee:compensation.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:education.write, employee:emergency_contacts.write, employee:job.write, sensitive_employee:creditcards.write :param id: The employee ID. (required) :type id: str - :param table: The name of the table containing the row to update (e.g., jobInfo, compensation). (required) + :param table: The API name of the table containing the row to update. See the TableName schema for valid standard values; custom tables use a `custom` prefix. Use GET /api/v1/meta/tables to discover the complete list. (required) :type table: str :param row_id: The ID of the row to update. (required) :type row_id: str @@ -2136,7 +1709,7 @@ def update_table_row_v11_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_table_row_v11_serialize( id=id, @@ -2146,25 +1719,21 @@ def update_table_row_v11_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '406': None, - '409': None, - '412': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "403": None, + "404": None, + "406": None, + "409": None, + "412": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_table_row_v11_serialize( self, id, @@ -2179,25 +1748,22 @@ def _update_table_row_v11_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id if table is not None: - _path_params['table'] = table + _path_params["table"] = table if row_id is not None: - _path_params['rowId'] = row_id + _path_params["rowId"] = row_id # process the query parameters # process the header parameters # process the form parameters @@ -2205,33 +1771,22 @@ def _update_table_row_v11_serialize( if table_row_update is not None: _body_params = table_row_update - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml', - 'text/xml' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "application/xml", "text/xml"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1_1/employees/{id}/tables/{table}/{rowId}', + method="POST", + resource_path="/api/v1_1/employees/{id}/tables/{table}/{rowId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2241,7 +1796,5 @@ def _update_table_row_v11_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/employee_verification_api.py b/bamboohr_sdk/api/employee_verification_api.py new file mode 100644 index 0000000..4646a7e --- /dev/null +++ b/bamboohr_sdk/api/employee_verification_api.py @@ -0,0 +1,1270 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.employee_verification_integration_response import EmployeeVerificationIntegrationResponse +from bamboohr_sdk.models.employee_verification_lifecycle_email_accepted_response import ( + EmployeeVerificationLifecycleEmailAcceptedResponse, +) +from bamboohr_sdk.models.employee_verification_update_response import EmployeeVerificationUpdateResponse +from bamboohr_sdk.models.employee_verifications_list_response import EmployeeVerificationsListResponse +from bamboohr_sdk.models.send_employee_verification_lifecycle_email_by_user_request import ( + SendEmployeeVerificationLifecycleEmailByUserRequest, +) +from bamboohr_sdk.models.update_employee_verification_integration_request import ( + UpdateEmployeeVerificationIntegrationRequest, +) +from bamboohr_sdk.models.update_employee_verification_request import UpdateEmployeeVerificationRequest +from bamboohr_sdk.rest import RESTResponseType + + +class EmployeeVerificationApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def get_employee_verification_integration( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmployeeVerificationIntegrationResponse: + """Get employee verification integration status + + Returns the install state and partner metadata for the company's employee verification integration. Scoped to the authenticated OAuth company context. The `enabled` flag reflects whether the partner app is installed and usable; `integrationType` identifies the configured verification partner. OAuth Scopes: employee_verifications + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_employee_verification_integration_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "EmployeeVerificationIntegrationResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_employee_verification_integration_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmployeeVerificationIntegrationResponse]: + """Get employee verification integration status + + Returns the install state and partner metadata for the company's employee verification integration. Scoped to the authenticated OAuth company context. The `enabled` flag reflects whether the partner app is installed and usable; `integrationType` identifies the configured verification partner. OAuth Scopes: employee_verifications + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_employee_verification_integration_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "EmployeeVerificationIntegrationResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_employee_verification_integration_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get employee verification integration status + + Returns the install state and partner metadata for the company's employee verification integration. Scoped to the authenticated OAuth company context. The `enabled` flag reflects whether the partner app is installed and usable; `integrationType` identifies the configured verification partner. OAuth Scopes: employee_verifications + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_employee_verification_integration_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "EmployeeVerificationIntegrationResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_employee_verification_integration_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/employee-verifications/integration", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_employee_verifications_by_employee( + self, + employee_id: Annotated[ + StrictInt, + Field(description="The internal employee ID of the employee whose verification history is returned."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmployeeVerificationsListResponse: + """List employee verification records for an employee + + Returns every employee verification row for the given employee (including archived), newest first. Intended for admin-level API consumers with the employee verifications OAuth scope; callers must have onboarding access and permission to view the employee (same rules as the active-verification employee verification API), except when the OAuth context is the employee themselves. OAuth Scopes: employee_verifications + + :param employee_id: The internal employee ID of the employee whose verification history is returned. (required) + :type employee_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_employee_verifications_by_employee_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "EmployeeVerificationsListResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_employee_verifications_by_employee_with_http_info( + self, + employee_id: Annotated[ + StrictInt, + Field(description="The internal employee ID of the employee whose verification history is returned."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmployeeVerificationsListResponse]: + """List employee verification records for an employee + + Returns every employee verification row for the given employee (including archived), newest first. Intended for admin-level API consumers with the employee verifications OAuth scope; callers must have onboarding access and permission to view the employee (same rules as the active-verification employee verification API), except when the OAuth context is the employee themselves. OAuth Scopes: employee_verifications + + :param employee_id: The internal employee ID of the employee whose verification history is returned. (required) + :type employee_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_employee_verifications_by_employee_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "EmployeeVerificationsListResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_employee_verifications_by_employee_without_preload_content( + self, + employee_id: Annotated[ + StrictInt, + Field(description="The internal employee ID of the employee whose verification history is returned."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List employee verification records for an employee + + Returns every employee verification row for the given employee (including archived), newest first. Intended for admin-level API consumers with the employee verifications OAuth scope; callers must have onboarding access and permission to view the employee (same rules as the active-verification employee verification API), except when the OAuth context is the employee themselves. OAuth Scopes: employee_verifications + + :param employee_id: The internal employee ID of the employee whose verification history is returned. (required) + :type employee_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_employee_verifications_by_employee_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "EmployeeVerificationsListResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_employee_verifications_by_employee_serialize( + self, + employee_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if employee_id is not None: + _path_params["employeeId"] = employee_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/employee-verifications/employees/{employeeId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def send_employee_verification_lifecycle_email_by_user( + self, + user_id: Annotated[ + StrictInt, + Field( + description="Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send." + ), + ], + send_employee_verification_lifecycle_email_by_user_request: SendEmployeeVerificationLifecycleEmailByUserRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmployeeVerificationLifecycleEmailAcceptedResponse: + """Send employee verification lifecycle email by user and email type + + Accepts a Bamboo `userId` (path) and an `emailType` (body) and queues the corresponding employee verification lifecycle email—the same templates as the in-app auth listener (`signup_survey` after signup, `app_installed` after the integration app is installed). Delivered to the company owner contact with template context for that user id. Not an employee I-9 reminder. Requires the employee verification integration enabled, onboarding edit access, and `employee_verifications.write`. OAuth Scopes: employee_verifications.write + + :param user_id: Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send. (required) + :type user_id: int + :param send_employee_verification_lifecycle_email_by_user_request: (required) + :type send_employee_verification_lifecycle_email_by_user_request: SendEmployeeVerificationLifecycleEmailByUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._send_employee_verification_lifecycle_email_by_user_serialize( + user_id=user_id, + send_employee_verification_lifecycle_email_by_user_request=send_employee_verification_lifecycle_email_by_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "202": "EmployeeVerificationLifecycleEmailAcceptedResponse", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def send_employee_verification_lifecycle_email_by_user_with_http_info( + self, + user_id: Annotated[ + StrictInt, + Field( + description="Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send." + ), + ], + send_employee_verification_lifecycle_email_by_user_request: SendEmployeeVerificationLifecycleEmailByUserRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmployeeVerificationLifecycleEmailAcceptedResponse]: + """Send employee verification lifecycle email by user and email type + + Accepts a Bamboo `userId` (path) and an `emailType` (body) and queues the corresponding employee verification lifecycle email—the same templates as the in-app auth listener (`signup_survey` after signup, `app_installed` after the integration app is installed). Delivered to the company owner contact with template context for that user id. Not an employee I-9 reminder. Requires the employee verification integration enabled, onboarding edit access, and `employee_verifications.write`. OAuth Scopes: employee_verifications.write + + :param user_id: Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send. (required) + :type user_id: int + :param send_employee_verification_lifecycle_email_by_user_request: (required) + :type send_employee_verification_lifecycle_email_by_user_request: SendEmployeeVerificationLifecycleEmailByUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._send_employee_verification_lifecycle_email_by_user_serialize( + user_id=user_id, + send_employee_verification_lifecycle_email_by_user_request=send_employee_verification_lifecycle_email_by_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "202": "EmployeeVerificationLifecycleEmailAcceptedResponse", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def send_employee_verification_lifecycle_email_by_user_without_preload_content( + self, + user_id: Annotated[ + StrictInt, + Field( + description="Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send." + ), + ], + send_employee_verification_lifecycle_email_by_user_request: SendEmployeeVerificationLifecycleEmailByUserRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send employee verification lifecycle email by user and email type + + Accepts a Bamboo `userId` (path) and an `emailType` (body) and queues the corresponding employee verification lifecycle email—the same templates as the in-app auth listener (`signup_survey` after signup, `app_installed` after the integration app is installed). Delivered to the company owner contact with template context for that user id. Not an employee I-9 reminder. Requires the employee verification integration enabled, onboarding edit access, and `employee_verifications.write`. OAuth Scopes: employee_verifications.write + + :param user_id: Bamboo user id for the requesting user in the email template (same role as the listener’s event user id). Together with body `emailType`, selects which verification email to send. (required) + :type user_id: int + :param send_employee_verification_lifecycle_email_by_user_request: (required) + :type send_employee_verification_lifecycle_email_by_user_request: SendEmployeeVerificationLifecycleEmailByUserRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._send_employee_verification_lifecycle_email_by_user_serialize( + user_id=user_id, + send_employee_verification_lifecycle_email_by_user_request=send_employee_verification_lifecycle_email_by_user_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "202": "EmployeeVerificationLifecycleEmailAcceptedResponse", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _send_employee_verification_lifecycle_email_by_user_serialize( + self, + user_id, + send_employee_verification_lifecycle_email_by_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if user_id is not None: + _path_params["userId"] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if send_employee_verification_lifecycle_email_by_user_request is not None: + _body_params = send_employee_verification_lifecycle_email_by_user_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/employee-verifications/users/{userId}/send-email", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_employee_verification( + self, + employee_id: Annotated[ + StrictInt, Field(description="The internal employee ID of the employee who owns the verification row.") + ], + verification_id: Annotated[StrictInt, Field(description="Identifier of the verification record to update.")], + update_employee_verification_request: Annotated[ + UpdateEmployeeVerificationRequest, + Field(description="Fields to update on the verification record. At least one field must be supplied."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmployeeVerificationUpdateResponse: + """Update an employee verification record + + Partial update of a single employee verification row. Any field omitted from the request body is left unchanged. Returns 404 when the verification id does not exist or does not belong to {employeeId}. Most verification updates flow in via partner webhooks; this endpoint exists for admin-level integrations that need to correct or annotate a record out-of-band, and requires onboarding view-and-edit permission on the employee. OAuth Scopes: employee_verifications.write + + :param employee_id: The internal employee ID of the employee who owns the verification row. (required) + :type employee_id: int + :param verification_id: Identifier of the verification record to update. (required) + :type verification_id: int + :param update_employee_verification_request: Fields to update on the verification record. At least one field must be supplied. (required) + :type update_employee_verification_request: UpdateEmployeeVerificationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_employee_verification_serialize( + employee_id=employee_id, + verification_id=verification_id, + update_employee_verification_request=update_employee_verification_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "EmployeeVerificationUpdateResponse", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_employee_verification_with_http_info( + self, + employee_id: Annotated[ + StrictInt, Field(description="The internal employee ID of the employee who owns the verification row.") + ], + verification_id: Annotated[StrictInt, Field(description="Identifier of the verification record to update.")], + update_employee_verification_request: Annotated[ + UpdateEmployeeVerificationRequest, + Field(description="Fields to update on the verification record. At least one field must be supplied."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmployeeVerificationUpdateResponse]: + """Update an employee verification record + + Partial update of a single employee verification row. Any field omitted from the request body is left unchanged. Returns 404 when the verification id does not exist or does not belong to {employeeId}. Most verification updates flow in via partner webhooks; this endpoint exists for admin-level integrations that need to correct or annotate a record out-of-band, and requires onboarding view-and-edit permission on the employee. OAuth Scopes: employee_verifications.write + + :param employee_id: The internal employee ID of the employee who owns the verification row. (required) + :type employee_id: int + :param verification_id: Identifier of the verification record to update. (required) + :type verification_id: int + :param update_employee_verification_request: Fields to update on the verification record. At least one field must be supplied. (required) + :type update_employee_verification_request: UpdateEmployeeVerificationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_employee_verification_serialize( + employee_id=employee_id, + verification_id=verification_id, + update_employee_verification_request=update_employee_verification_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "EmployeeVerificationUpdateResponse", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_employee_verification_without_preload_content( + self, + employee_id: Annotated[ + StrictInt, Field(description="The internal employee ID of the employee who owns the verification row.") + ], + verification_id: Annotated[StrictInt, Field(description="Identifier of the verification record to update.")], + update_employee_verification_request: Annotated[ + UpdateEmployeeVerificationRequest, + Field(description="Fields to update on the verification record. At least one field must be supplied."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update an employee verification record + + Partial update of a single employee verification row. Any field omitted from the request body is left unchanged. Returns 404 when the verification id does not exist or does not belong to {employeeId}. Most verification updates flow in via partner webhooks; this endpoint exists for admin-level integrations that need to correct or annotate a record out-of-band, and requires onboarding view-and-edit permission on the employee. OAuth Scopes: employee_verifications.write + + :param employee_id: The internal employee ID of the employee who owns the verification row. (required) + :type employee_id: int + :param verification_id: Identifier of the verification record to update. (required) + :type verification_id: int + :param update_employee_verification_request: Fields to update on the verification record. At least one field must be supplied. (required) + :type update_employee_verification_request: UpdateEmployeeVerificationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_employee_verification_serialize( + employee_id=employee_id, + verification_id=verification_id, + update_employee_verification_request=update_employee_verification_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "EmployeeVerificationUpdateResponse", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_employee_verification_serialize( + self, + employee_id, + verification_id, + update_employee_verification_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if employee_id is not None: + _path_params["employeeId"] = employee_id + if verification_id is not None: + _path_params["verificationId"] = verification_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_employee_verification_request is not None: + _body_params = update_employee_verification_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/employee-verifications/employees/{employeeId}/{verificationId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_employee_verification_integration( + self, + update_employee_verification_integration_request: UpdateEmployeeVerificationIntegrationRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> EmployeeVerificationIntegrationResponse: + """Enable or disable the employee verification integration + + Enables or disables the company's employee verification integration. Enabling installs the configured partner app and schedules the daily sync; the company must have a valid US work location before enabling, otherwise a 400 is returned. Disabling tears down the partner app. The call is idempotent: a request to enable when already enabled (or disable when already disabled) returns 200 with the current state. Requires the employee_verifications.write OAuth scope, intended for admin-level API consumers. OAuth Scopes: employee_verifications.write + + :param update_employee_verification_integration_request: (required) + :type update_employee_verification_integration_request: UpdateEmployeeVerificationIntegrationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_employee_verification_integration_serialize( + update_employee_verification_integration_request=update_employee_verification_integration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "EmployeeVerificationIntegrationResponse", + "400": "ErrorResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_employee_verification_integration_with_http_info( + self, + update_employee_verification_integration_request: UpdateEmployeeVerificationIntegrationRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[EmployeeVerificationIntegrationResponse]: + """Enable or disable the employee verification integration + + Enables or disables the company's employee verification integration. Enabling installs the configured partner app and schedules the daily sync; the company must have a valid US work location before enabling, otherwise a 400 is returned. Disabling tears down the partner app. The call is idempotent: a request to enable when already enabled (or disable when already disabled) returns 200 with the current state. Requires the employee_verifications.write OAuth scope, intended for admin-level API consumers. OAuth Scopes: employee_verifications.write + + :param update_employee_verification_integration_request: (required) + :type update_employee_verification_integration_request: UpdateEmployeeVerificationIntegrationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_employee_verification_integration_serialize( + update_employee_verification_integration_request=update_employee_verification_integration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "EmployeeVerificationIntegrationResponse", + "400": "ErrorResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_employee_verification_integration_without_preload_content( + self, + update_employee_verification_integration_request: UpdateEmployeeVerificationIntegrationRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Enable or disable the employee verification integration + + Enables or disables the company's employee verification integration. Enabling installs the configured partner app and schedules the daily sync; the company must have a valid US work location before enabling, otherwise a 400 is returned. Disabling tears down the partner app. The call is idempotent: a request to enable when already enabled (or disable when already disabled) returns 200 with the current state. Requires the employee_verifications.write OAuth scope, intended for admin-level API consumers. OAuth Scopes: employee_verifications.write + + :param update_employee_verification_integration_request: (required) + :type update_employee_verification_integration_request: UpdateEmployeeVerificationIntegrationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_employee_verification_integration_serialize( + update_employee_verification_integration_request=update_employee_verification_integration_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "EmployeeVerificationIntegrationResponse", + "400": "ErrorResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_employee_verification_integration_serialize( + self, + update_employee_verification_integration_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_employee_verification_integration_request is not None: + _body_params = update_employee_verification_integration_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/employee-verifications/integration", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/employees_api.py b/bamboohr_sdk/api/employees_api.py index 6b3b72c..7b938ff 100644 --- a/bamboohr_sdk/api/employees_api.py +++ b/bamboohr_sdk/api/employees_api.py @@ -1,35 +1,29 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any -from pydantic import Field, StrictBool, StrictStr, field_validator -from typing import Dict, Optional -from typing_extensions import Annotated +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.models.company_information import CompanyInformation -from bamboohr_sdk.models.cursor_pagination_query_object import CursorPaginationQueryObject from bamboohr_sdk.models.employee import Employee -from bamboohr_sdk.models.employee_value import EmployeeValue +from bamboohr_sdk.models.employee_cursor_pagination_query_object import EmployeeCursorPaginationQueryObject +from bamboohr_sdk.models.employee_optional_field import EmployeeOptionalField +from bamboohr_sdk.models.employees_directory_json_response import EmployeesDirectoryJsonResponse +from bamboohr_sdk.models.get_employee_response import GetEmployeeResponse from bamboohr_sdk.models.get_employees_filter_request_object import GetEmployeesFilterRequestObject from bamboohr_sdk.models.get_employees_response_object import GetEmployeesResponseObject -from bamboohr_sdk.models.json_directory_employee import JsonDirectoryEmployee from bamboohr_sdk.models.post_new_employee import PostNewEmployee - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.rest import RESTResponseType @@ -45,27 +39,21 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def create_employee( self, post_new_employee: PostNewEmployee, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> GetEmployeeResponse: """Create Employee - Create a new employee. At minimum, provide a first name and last name in a JSON object or XML document. The request body schema lists commonly used fields, but any valid employee field name may be included as a key. To discover available field names, call the list-fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Trax Payroll note: Employees added to a pay schedule synced with Trax Payroll must include the required payroll-related employee fields: employeeNumber, firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, country, employmentHistoryStatus, exempt, payType, payRate, payPer, location, department, and division. + Create a new employee. At minimum, provide a first name and last name in a JSON object or XML document. The request body schema lists commonly used fields, but any valid writable employee field name may be included as a key. To discover available field names, call **List Fields** (`list-fields`). This endpoint does not upload, set, or remove the employee profile photo. Photo-related keys (e.g. `photo`, `photoUrl`) included in the body are silently ignored: the request still creates the employee and returns 201, but no photo is attached. After creation, use the Upload Employee Photo endpoint (`upload-employee-photo`) to attach a profile photo. AI connectors cannot use that endpoint reliably and should redirect the user to the BambooHR web UI. Trax Payroll note: Employees added to a pay schedule synced with Trax Payroll must include the required payroll-related employee fields: employeeNumber (unless the company has automatic employee numbers enabled), firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, zipcode, country, employmentHistoryStatus, exempt, payType, payRate, payPer, overtimeRate, and location. OAuth Scopes: employee, employee.write, employee:assets.write, employee:compensation.write, employee:contact.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:demographic.write, employee:dependent.write, employee:dependent:ssn.write, employee:education.write, employee:emergency_contacts.write, employee:identification.write, employee:job, employee:job.write, employee:management.write, employee:name.write, employee:payroll.write, employee:photo.write, employee:vaccination.write, sensitive_employee:address.write, sensitive_employee:creditcards.write, sensitive_employee:protected_info.write :param post_new_employee: (required) :type post_new_employee: PostNewEmployee @@ -89,54 +77,44 @@ def create_employee( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_employee_serialize( post_new_employee=post_new_employee, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '403': None, - '409': None, + _response_types_map: dict[str, str | None] = { + "201": "GetEmployeeResponse", + "400": None, + "403": None, + "409": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call def create_employee_with_http_info( self, post_new_employee: PostNewEmployee, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[GetEmployeeResponse]: """Create Employee - Create a new employee. At minimum, provide a first name and last name in a JSON object or XML document. The request body schema lists commonly used fields, but any valid employee field name may be included as a key. To discover available field names, call the list-fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Trax Payroll note: Employees added to a pay schedule synced with Trax Payroll must include the required payroll-related employee fields: employeeNumber, firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, country, employmentHistoryStatus, exempt, payType, payRate, payPer, location, department, and division. + Create a new employee. At minimum, provide a first name and last name in a JSON object or XML document. The request body schema lists commonly used fields, but any valid writable employee field name may be included as a key. To discover available field names, call **List Fields** (`list-fields`). This endpoint does not upload, set, or remove the employee profile photo. Photo-related keys (e.g. `photo`, `photoUrl`) included in the body are silently ignored: the request still creates the employee and returns 201, but no photo is attached. After creation, use the Upload Employee Photo endpoint (`upload-employee-photo`) to attach a profile photo. AI connectors cannot use that endpoint reliably and should redirect the user to the BambooHR web UI. Trax Payroll note: Employees added to a pay schedule synced with Trax Payroll must include the required payroll-related employee fields: employeeNumber (unless the company has automatic employee numbers enabled), firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, zipcode, country, employmentHistoryStatus, exempt, payType, payRate, payPer, overtimeRate, and location. OAuth Scopes: employee, employee.write, employee:assets.write, employee:compensation.write, employee:contact.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:demographic.write, employee:dependent.write, employee:dependent:ssn.write, employee:education.write, employee:emergency_contacts.write, employee:identification.write, employee:job, employee:job.write, employee:management.write, employee:name.write, employee:payroll.write, employee:photo.write, employee:vaccination.write, sensitive_employee:address.write, sensitive_employee:creditcards.write, sensitive_employee:protected_info.write :param post_new_employee: (required) :type post_new_employee: PostNewEmployee @@ -160,53 +138,44 @@ def create_employee_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_employee_serialize( post_new_employee=post_new_employee, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '403': None, - '409': None, + _response_types_map: dict[str, str | None] = { + "201": "GetEmployeeResponse", + "400": None, + "403": None, + "409": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_employee_without_preload_content( self, post_new_employee: PostNewEmployee, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Employee - Create a new employee. At minimum, provide a first name and last name in a JSON object or XML document. The request body schema lists commonly used fields, but any valid employee field name may be included as a key. To discover available field names, call the list-fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Trax Payroll note: Employees added to a pay schedule synced with Trax Payroll must include the required payroll-related employee fields: employeeNumber, firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, country, employmentHistoryStatus, exempt, payType, payRate, payPer, location, department, and division. + Create a new employee. At minimum, provide a first name and last name in a JSON object or XML document. The request body schema lists commonly used fields, but any valid writable employee field name may be included as a key. To discover available field names, call **List Fields** (`list-fields`). This endpoint does not upload, set, or remove the employee profile photo. Photo-related keys (e.g. `photo`, `photoUrl`) included in the body are silently ignored: the request still creates the employee and returns 201, but no photo is attached. After creation, use the Upload Employee Photo endpoint (`upload-employee-photo`) to attach a profile photo. AI connectors cannot use that endpoint reliably and should redirect the user to the BambooHR web UI. Trax Payroll note: Employees added to a pay schedule synced with Trax Payroll must include the required payroll-related employee fields: employeeNumber (unless the company has automatic employee numbers enabled), firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, zipcode, country, employmentHistoryStatus, exempt, payType, payRate, payPer, overtimeRate, and location. OAuth Scopes: employee, employee.write, employee:assets.write, employee:compensation.write, employee:contact.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:demographic.write, employee:dependent.write, employee:dependent:ssn.write, employee:education.write, employee:emergency_contacts.write, employee:identification.write, employee:job, employee:job.write, employee:management.write, employee:name.write, employee:payroll.write, employee:photo.write, employee:vaccination.write, sensitive_employee:address.write, sensitive_employee:creditcards.write, sensitive_employee:protected_info.write :param post_new_employee: (required) :type post_new_employee: PostNewEmployee @@ -230,29 +199,25 @@ def create_employee_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_employee_serialize( post_new_employee=post_new_employee, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '403': None, - '409': None, + _response_types_map: dict[str, str | None] = { + "201": "GetEmployeeResponse", + "400": None, + "403": None, + "409": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_employee_serialize( self, post_new_employee, @@ -264,17 +229,14 @@ def _create_employee_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -284,33 +246,26 @@ def _create_employee_serialize( if post_new_employee is not None: _body_params = post_new_employee - + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml', - 'text/xml' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "application/xml", "text/xml"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/employees', + method="POST", + resource_path="/api/v1/employees", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -320,31 +275,252 @@ def _create_employee_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, + ) + + @validate_call + def delete_employee( + self, + id: Annotated[ + StrictInt | None, + Field( + description="The internal employee ID of the employee to delete. Use `id` from Get Employee (`get-employee`), `employeeId` from List Employees (`list-employees`), or `eeid` from the `employee` dataset. Do not pass `employeeNumber` (the editable Employee # value); it may fail with `404` or target a different employee if its value matches another employee's internal employee ID." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete employee + + Permanently deletes an employee record and all associated data. OAuth Scopes: employee.write + + :param id: The internal employee ID of the employee to delete. Use `id` from Get Employee (`get-employee`), `employeeId` from List Employees (`list-employees`), or `eeid` from the `employee` dataset. Do not pass `employeeNumber` (the editable Employee # value); it may fail with `404` or target a different employee if its value matches another employee's internal employee ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_employee_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) + _response_types_map: dict[str, str | None] = { + "204": None, + "403": None, + "500": None, + "404": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_employee_with_http_info( + self, + id: Annotated[ + StrictInt | None, + Field( + description="The internal employee ID of the employee to delete. Use `id` from Get Employee (`get-employee`), `employeeId` from List Employees (`list-employees`), or `eeid` from the `employee` dataset. Do not pass `employeeNumber` (the editable Employee # value); it may fail with `404` or target a different employee if its value matches another employee's internal employee ID." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete employee + + Permanently deletes an employee record and all associated data. OAuth Scopes: employee.write + :param id: The internal employee ID of the employee to delete. Use `id` from Get Employee (`get-employee`), `employeeId` from List Employees (`list-employees`), or `eeid` from the `employee` dataset. Do not pass `employeeNumber` (the editable Employee # value); it may fail with `404` or target a different employee if its value matches another employee's internal employee ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + _param = self._delete_employee_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": None, + "500": None, + "404": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_employee_without_preload_content( + self, + id: Annotated[ + StrictInt | None, + Field( + description="The internal employee ID of the employee to delete. Use `id` from Get Employee (`get-employee`), `employeeId` from List Employees (`list-employees`), or `eeid` from the `employee` dataset. Do not pass `employeeNumber` (the editable Employee # value); it may fail with `404` or target a different employee if its value matches another employee's internal employee ID." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete employee + + Permanently deletes an employee record and all associated data. OAuth Scopes: employee.write + + :param id: The internal employee ID of the employee to delete. Use `id` from Get Employee (`get-employee`), `employeeId` from List Employees (`list-employees`), or `eeid` from the `employee` dataset. Do not pass `employeeNumber` (the editable Employee # value); it may fail with `404` or target a different employee if its value matches another employee's internal employee ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_employee_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": None, + "500": None, + "404": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_employee_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/employees/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) @validate_call def get_company_information( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CompanyInformation: """Get Company Information - Returns basic profile information for the company, including its legal name, display name, primary address, and contact phone number. For companies using BambooHR Payroll, the legal name and address are sourced from the active payroll client metadata; for all other companies, the data comes from the company's account settings. + Returns basic profile information for the company, including its legal name, display name, primary address, and contact phone number. For companies using BambooHR Payroll, the legal name and address are sourced from the active payroll client metadata; for all other companies, the data comes from the company's account settings. This information is treated as non-sensitive, publicly-derivable business information (comparable to what's on public business registries or a paycheck) and is available to any authenticated caller holding the company:info scope, regardless of admin status. OAuth Scopes: company:info :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -366,49 +542,36 @@ def get_company_information( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_company_information_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompanyInformation", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "CompanyInformation", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_company_information_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CompanyInformation]: """Get Company Information - Returns basic profile information for the company, including its legal name, display name, primary address, and contact phone number. For companies using BambooHR Payroll, the legal name and address are sourced from the active payroll client metadata; for all other companies, the data comes from the company's account settings. + Returns basic profile information for the company, including its legal name, display name, primary address, and contact phone number. For companies using BambooHR Payroll, the legal name and address are sourced from the active payroll client metadata; for all other companies, the data comes from the company's account settings. This information is treated as non-sensitive, publicly-derivable business information (comparable to what's on public business registries or a paycheck) and is available to any authenticated caller holding the company:info scope, regardless of admin status. OAuth Scopes: company:info :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -430,49 +593,36 @@ def get_company_information_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_company_information_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompanyInformation", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "CompanyInformation", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_company_information_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Company Information - Returns basic profile information for the company, including its legal name, display name, primary address, and contact phone number. For companies using BambooHR Payroll, the legal name and address are sourced from the active payroll client metadata; for all other companies, the data comes from the company's account settings. + Returns basic profile information for the company, including its legal name, display name, primary address, and contact phone number. For companies using BambooHR Payroll, the legal name and address are sourced from the active payroll client metadata; for all other companies, the data comes from the company's account settings. This information is treated as non-sensitive, publicly-derivable business information (comparable to what's on public business registries or a paycheck) and is available to any authenticated caller holding the company:info scope, regardless of admin status. OAuth Scopes: company:info :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -494,26 +644,18 @@ def get_company_information_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_company_information_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompanyInformation", - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "CompanyInformation", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_company_information_serialize( self, _request_auth, @@ -524,17 +666,14 @@ def _get_company_information_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -542,25 +681,16 @@ def _get_company_information_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/company_information', + method="GET", + resource_path="/api/v1/company_information", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -570,41 +700,50 @@ def _get_company_information_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_employee( self, - id: Annotated[StrictStr, Field(description="The employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any).")], - fields: Annotated[Optional[StrictStr], Field(description="Comma-separated list of field names to include in the response. See the List Fields endpoint for valid field names.")] = None, - only_current: Annotated[Optional[StrictBool], Field(description="Setting to false will return future-dated values from history table fields. Defaults to true.")] = None, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[ + StrictStr | None, + Field( + description='The internal employee ID of the employee to retrieve. Use `id` from this endpoint, `employeeId` from `list-employees`, or `eeid` from the `employee` dataset. Do not pass `employeeNumber` (the editable Employee # value); it may fail with `404` or resolve to a different employee if its value matches another employee\'s internal employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{"id": "0"}` with no other fields. `list-employees` does not accept this sentinel.' + ), + ], + fields: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response." + ), + ] = None, + only_current: Annotated[ + StrictBool | None, + Field( + description="When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, EmployeeValue]: + ) -> GetEmployeeResponse: """Get Employee - Returns employee data for the specified employee ID. Specify which fields to return using the `fields` query parameter (comma-separated list of field names). See the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields) for available field names. This endpoint is suitable for retrieving basic employee information, including current values from historical tables such as job title or compensation. By default only current values are returned; set `onlyCurrent` to false to include future-dated values from historical table fields. Usage note: The maximum number of fields per request is 400. + Returns a single employee record as a JSON object (or XML when `Accept: application/xml`). The `id` field is always present and is returned as a string; it is the internal employee ID — see the `id` and `employeeNumber` field documentation in the response schema for the distinction between the internal ID and the editable Employee # value. Pass the id `0` to read the authenticated caller's own record. **Requesting fields.** Every other field is included only when explicitly named in the `fields` query parameter. With no `fields` parameter, the response contains only `id` — there is no implicit default field set. Field names come from List Fields (`list-fields`), which also exposes custom-field aliases usable here. The maximum number of fields per request is 400. **Field-name vocabulary.** The names used here differ from the `employee` dataset (queried via Get Data from Dataset (v2) (`get-data-from-dataset-v2`)): this endpoint uses short names (`workEmail`, `jobTitle`, `department`, `supervisor`) where the dataset uses qualified names (`email`, `jobInformationJobTitle`, `jobInformationDepartment`, `jobInformationReportsTo`). **Effective-dated values.** By default only currently effective values from historical tables (job title, compensation, employment status, etc.) are returned; pass `onlyCurrent=false` to include future-dated values. **Permissions.** Field-level permissions are applied silently: any requested field the authenticated caller cannot view is omitted from the response with no marker — an absent field may indicate either that it was not requested or that the caller lacks permission to view it. This differs from `get-data-from-dataset-v2` for the `employee` dataset, which always returns every requested field but represents inaccessible values as empty and lists the withheld field names in a per-record `_restrictedFields` array. Record-level permissions apply in addition to field-level ones. Which employees a caller can view depends on their access-level configuration, which may be limited to themselves, to their direct or indirect reports, or to another configured set. If the caller cannot view the requested employee, the endpoint returns `403` with `Insufficient Permissions to view this employee` rather than a partial record. **Related endpoints.** Use this for fetching arbitrary fields on a single known employee. For multiple employees, use `list-employees`. For complex filtering or tabular reports, use `get-data-from-dataset-v2`. To look up information published in a coworker's company directory entry, such as job title, department, location, work contact details, or who they report to, use Get Employees Directory (`get-employees-directory`), which is governed by directory sharing settings rather than by per-employee record permissions and is available when directory or org-chart access is shared with the caller's access level. OAuth Scopes: employee, employee:assets, employee:compensation, employee:contact, employee:custom_fields, employee:custom_fields_encrypted, employee:demographic, employee:dependent, employee:dependent:ssn, employee:education, employee:emergency_contacts, employee:identification, employee:job, employee:job.write, employee:management, employee:name, employee:photo, employee:vaccination, sensitive_employee:address, sensitive_employee:creditcards, sensitive_employee:protected_info - :param id: The employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) + :param id: The internal employee ID of the employee to retrieve. Use `id` from this endpoint, `employeeId` from `list-employees`, or `eeid` from the `employee` dataset. Do not pass `employeeNumber` (the editable Employee # value); it may fail with `404` or resolve to a different employee if its value matches another employee's internal employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{\"id\": \"0\"}` with no other fields. `list-employees` does not accept this sentinel. (required) :type id: str - :param fields: Comma-separated list of field names to include in the response. See the List Fields endpoint for valid field names. + :param fields: Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response. :type fields: str - :param only_current: Setting to false will return future-dated values from history table fields. Defaults to true. + :param only_current: When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned. :type only_current: bool :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -628,7 +767,7 @@ def get_employee( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_serialize( id=id, @@ -638,55 +777,64 @@ def get_employee( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, EmployeeValue]", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GetEmployeeResponse", + "400": None, + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_employee_with_http_info( self, - id: Annotated[StrictStr, Field(description="The employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any).")], - fields: Annotated[Optional[StrictStr], Field(description="Comma-separated list of field names to include in the response. See the List Fields endpoint for valid field names.")] = None, - only_current: Annotated[Optional[StrictBool], Field(description="Setting to false will return future-dated values from history table fields. Defaults to true.")] = None, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[ + StrictStr | None, + Field( + description='The internal employee ID of the employee to retrieve. Use `id` from this endpoint, `employeeId` from `list-employees`, or `eeid` from the `employee` dataset. Do not pass `employeeNumber` (the editable Employee # value); it may fail with `404` or resolve to a different employee if its value matches another employee\'s internal employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{"id": "0"}` with no other fields. `list-employees` does not accept this sentinel.' + ), + ], + fields: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response." + ), + ] = None, + only_current: Annotated[ + StrictBool | None, + Field( + description="When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned." + ), + ] = None, + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, EmployeeValue]]: + ) -> ApiResponse[GetEmployeeResponse]: """Get Employee - Returns employee data for the specified employee ID. Specify which fields to return using the `fields` query parameter (comma-separated list of field names). See the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields) for available field names. This endpoint is suitable for retrieving basic employee information, including current values from historical tables such as job title or compensation. By default only current values are returned; set `onlyCurrent` to false to include future-dated values from historical table fields. Usage note: The maximum number of fields per request is 400. + Returns a single employee record as a JSON object (or XML when `Accept: application/xml`). The `id` field is always present and is returned as a string; it is the internal employee ID — see the `id` and `employeeNumber` field documentation in the response schema for the distinction between the internal ID and the editable Employee # value. Pass the id `0` to read the authenticated caller's own record. **Requesting fields.** Every other field is included only when explicitly named in the `fields` query parameter. With no `fields` parameter, the response contains only `id` — there is no implicit default field set. Field names come from List Fields (`list-fields`), which also exposes custom-field aliases usable here. The maximum number of fields per request is 400. **Field-name vocabulary.** The names used here differ from the `employee` dataset (queried via Get Data from Dataset (v2) (`get-data-from-dataset-v2`)): this endpoint uses short names (`workEmail`, `jobTitle`, `department`, `supervisor`) where the dataset uses qualified names (`email`, `jobInformationJobTitle`, `jobInformationDepartment`, `jobInformationReportsTo`). **Effective-dated values.** By default only currently effective values from historical tables (job title, compensation, employment status, etc.) are returned; pass `onlyCurrent=false` to include future-dated values. **Permissions.** Field-level permissions are applied silently: any requested field the authenticated caller cannot view is omitted from the response with no marker — an absent field may indicate either that it was not requested or that the caller lacks permission to view it. This differs from `get-data-from-dataset-v2` for the `employee` dataset, which always returns every requested field but represents inaccessible values as empty and lists the withheld field names in a per-record `_restrictedFields` array. Record-level permissions apply in addition to field-level ones. Which employees a caller can view depends on their access-level configuration, which may be limited to themselves, to their direct or indirect reports, or to another configured set. If the caller cannot view the requested employee, the endpoint returns `403` with `Insufficient Permissions to view this employee` rather than a partial record. **Related endpoints.** Use this for fetching arbitrary fields on a single known employee. For multiple employees, use `list-employees`. For complex filtering or tabular reports, use `get-data-from-dataset-v2`. To look up information published in a coworker's company directory entry, such as job title, department, location, work contact details, or who they report to, use Get Employees Directory (`get-employees-directory`), which is governed by directory sharing settings rather than by per-employee record permissions and is available when directory or org-chart access is shared with the caller's access level. OAuth Scopes: employee, employee:assets, employee:compensation, employee:contact, employee:custom_fields, employee:custom_fields_encrypted, employee:demographic, employee:dependent, employee:dependent:ssn, employee:education, employee:emergency_contacts, employee:identification, employee:job, employee:job.write, employee:management, employee:name, employee:photo, employee:vaccination, sensitive_employee:address, sensitive_employee:creditcards, sensitive_employee:protected_info - :param id: The employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) + :param id: The internal employee ID of the employee to retrieve. Use `id` from this endpoint, `employeeId` from `list-employees`, or `eeid` from the `employee` dataset. Do not pass `employeeNumber` (the editable Employee # value); it may fail with `404` or resolve to a different employee if its value matches another employee's internal employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{\"id\": \"0\"}` with no other fields. `list-employees` does not accept this sentinel. (required) :type id: str - :param fields: Comma-separated list of field names to include in the response. See the List Fields endpoint for valid field names. + :param fields: Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response. :type fields: str - :param only_current: Setting to false will return future-dated values from history table fields. Defaults to true. + :param only_current: When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned. :type only_current: bool :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -710,7 +858,7 @@ def get_employee_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_serialize( id=id, @@ -720,55 +868,64 @@ def get_employee_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, EmployeeValue]", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GetEmployeeResponse", + "400": None, + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_employee_without_preload_content( self, - id: Annotated[StrictStr, Field(description="The employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any).")], - fields: Annotated[Optional[StrictStr], Field(description="Comma-separated list of field names to include in the response. See the List Fields endpoint for valid field names.")] = None, - only_current: Annotated[Optional[StrictBool], Field(description="Setting to false will return future-dated values from history table fields. Defaults to true.")] = None, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[ + StrictStr | None, + Field( + description='The internal employee ID of the employee to retrieve. Use `id` from this endpoint, `employeeId` from `list-employees`, or `eeid` from the `employee` dataset. Do not pass `employeeNumber` (the editable Employee # value); it may fail with `404` or resolve to a different employee if its value matches another employee\'s internal employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{"id": "0"}` with no other fields. `list-employees` does not accept this sentinel.' + ), + ], + fields: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + only_current: Annotated[ + StrictBool | None, + Field( + description="When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned." + ), + ] = None, + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Employee - Returns employee data for the specified employee ID. Specify which fields to return using the `fields` query parameter (comma-separated list of field names). See the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/fields) for available field names. This endpoint is suitable for retrieving basic employee information, including current values from historical tables such as job title or compensation. By default only current values are returned; set `onlyCurrent` to false to include future-dated values from historical table fields. Usage note: The maximum number of fields per request is 400. + Returns a single employee record as a JSON object (or XML when `Accept: application/xml`). The `id` field is always present and is returned as a string; it is the internal employee ID — see the `id` and `employeeNumber` field documentation in the response schema for the distinction between the internal ID and the editable Employee # value. Pass the id `0` to read the authenticated caller's own record. **Requesting fields.** Every other field is included only when explicitly named in the `fields` query parameter. With no `fields` parameter, the response contains only `id` — there is no implicit default field set. Field names come from List Fields (`list-fields`), which also exposes custom-field aliases usable here. The maximum number of fields per request is 400. **Field-name vocabulary.** The names used here differ from the `employee` dataset (queried via Get Data from Dataset (v2) (`get-data-from-dataset-v2`)): this endpoint uses short names (`workEmail`, `jobTitle`, `department`, `supervisor`) where the dataset uses qualified names (`email`, `jobInformationJobTitle`, `jobInformationDepartment`, `jobInformationReportsTo`). **Effective-dated values.** By default only currently effective values from historical tables (job title, compensation, employment status, etc.) are returned; pass `onlyCurrent=false` to include future-dated values. **Permissions.** Field-level permissions are applied silently: any requested field the authenticated caller cannot view is omitted from the response with no marker — an absent field may indicate either that it was not requested or that the caller lacks permission to view it. This differs from `get-data-from-dataset-v2` for the `employee` dataset, which always returns every requested field but represents inaccessible values as empty and lists the withheld field names in a per-record `_restrictedFields` array. Record-level permissions apply in addition to field-level ones. Which employees a caller can view depends on their access-level configuration, which may be limited to themselves, to their direct or indirect reports, or to another configured set. If the caller cannot view the requested employee, the endpoint returns `403` with `Insufficient Permissions to view this employee` rather than a partial record. **Related endpoints.** Use this for fetching arbitrary fields on a single known employee. For multiple employees, use `list-employees`. For complex filtering or tabular reports, use `get-data-from-dataset-v2`. To look up information published in a coworker's company directory entry, such as job title, department, location, work contact details, or who they report to, use Get Employees Directory (`get-employees-directory`), which is governed by directory sharing settings rather than by per-employee record permissions and is available when directory or org-chart access is shared with the caller's access level. OAuth Scopes: employee, employee:assets, employee:compensation, employee:contact, employee:custom_fields, employee:custom_fields_encrypted, employee:demographic, employee:dependent, employee:dependent:ssn, employee:education, employee:emergency_contacts, employee:identification, employee:job, employee:job.write, employee:management, employee:name, employee:photo, employee:vaccination, sensitive_employee:address, sensitive_employee:creditcards, sensitive_employee:protected_info - :param id: The employee ID. The special employee ID of zero (0) means to use the employee ID associated with the API key (if any). (required) + :param id: The internal employee ID of the employee to retrieve. Use `id` from this endpoint, `employeeId` from `list-employees`, or `eeid` from the `employee` dataset. Do not pass `employeeNumber` (the editable Employee # value); it may fail with `404` or resolve to a different employee if its value matches another employee's internal employee ID. The sentinel value `0` resolves to the employee record bound to the authenticated user, when one exists; if the credentials are not bound to an employee (for example an integration-style account), `0` returns only `{\"id\": \"0\"}` with no other fields. `list-employees` does not accept this sentinel. (required) :type id: str - :param fields: Comma-separated list of field names to include in the response. See the List Fields endpoint for valid field names. + :param fields: Comma-separated list of fields to include in the response. Three reference forms are accepted and may be mixed in a single request: standard field names (e.g. `firstName`, `workEmail`), numeric field IDs (e.g. `1349`), and custom-field aliases (e.g. `customStartDate`). Discover all three via List Fields (`list-fields`) — its response includes `id`, `name`, and `alias` for every available field. Example mixing all three: `firstName,1349,customStartDate`. When omitted, the response includes only `id`. Bracket-array (`fields[]=...`) and repeated-key (`fields=a&fields=b`) forms are not supported on this endpoint — use the comma-separated form. Unknown or unauthorized fields are silently dropped from the response. :type fields: str - :param only_current: Setting to false will return future-dated values from history table fields. Defaults to true. + :param only_current: When `true` (the default), returns only currently effective values from historical tables (job, compensation, employment status, etc.). When `false`, future-dated history rows are also returned. :type only_current: bool :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -792,7 +949,7 @@ def get_employee_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_serialize( id=id, @@ -802,22 +959,19 @@ def get_employee_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, EmployeeValue]", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GetEmployeeResponse", + "400": None, + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_employee_serialize( self, id, @@ -832,56 +986,41 @@ def _get_employee_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters if fields is not None: - - _query_params.append(('fields', fields)) - + _query_params.append(("fields", fields)) + if only_current is not None: - - _query_params.append(('onlyCurrent', only_current)) - + _query_params.append(("onlyCurrent", only_current)) + # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employees/{id}', + method="GET", + resource_path="/api/v1/employees/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -891,37 +1030,36 @@ def _get_employee_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_employees_directory( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - only_current: Annotated[Optional[StrictBool], Field(description="When true (the default), only active employees are returned. Set to false to include terminated employees.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + only_current: Annotated[ + StrictBool | None, + Field( + description="When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> JsonDirectoryEmployee: - """Get Employee Directory + ) -> EmployeesDirectoryJsonResponse: + """Get Employees Directory - Returns the company employee directory, including a fieldset definition and an array of employee records. By default only current (active) employees are returned; pass onlyCurrent=false to include terminated employees. If the caller has org-chart access but not full directory access, a reduced fieldset is returned. Returns 403 if neither directory nor org-chart sharing is enabled for the company. Returns 404 if the directory is empty. The response format is controlled by the Accept header. + Returns the company's published employee directory: a fieldset definition plus an array of employee records whose keys match the field ids. **When to use this endpoint.** Use it for basic, non-sensitive information about coworkers who appear in the company's published directory, especially coworkers the caller does not manage. For the authenticated caller's own record, use **Get Employee** (`get-employee`) with the id `0` instead. It answers questions such as who a coworker is, their job title, department, division, or location, how to reach them at work, and who they report to. When the company shares its full directory, every record includes `supervisor`, which makes this the most direct way to answer org chart and reporting structure questions such as who reports to a given manager. Do not assume that field is present: always read the `fields` array in the response to see what a given company actually exposes, because a company that shares only its org chart returns a reduced fieldset that omits `supervisor` (see Coverage and limits below). **Access.** Directory access is governed by the company's Company Directory and Company Org Chart sharing settings (Settings > Company Directory in the BambooHR web app), together with whether those features are shared with the caller's access level. It is not governed by per-employee record permissions, so when the directory is shared with the caller the employee data is not narrowed to the people whose records they can otherwise read, and an employee with no managerial or administrative access can normally read the full directory. The `canUploadPhoto` value remains caller-specific. **Fields returned.** The fieldset is fixed by company directory configuration and callers cannot request additional fields. The `fields` array in each response lists exactly which fields that company exposes, so treat it as authoritative rather than assuming a fixed set. With full directory sharing it covers names, job title, department, division, location, manager (`supervisor`), work email, work and mobile phone, pronouns, social profile links, and photo information. It never includes compensation, national identifiers such as SSN, birth date, home address, home contact details, or employment status and history, in any configuration. **Coverage and limits.** This endpoint returns the whole directory in one response and accepts no name, department, or field filters, so narrow the results on the client side. Companies choose which employees appear in the directory, and anyone excluded is absent with no indicator that they exist. Inactive and former employees are also excluded, so an administrator researching someone who has left the company will not find them here even though the record still exists; use `get-employee` or `list-employees` for those. Absence from this response therefore means the employee is not in the published directory, not that no such employee exists, so do not conclude from this endpoint alone that someone does not work at the company. For the same reason it is not an authoritative roster; prefer `list-employees` or `get-data-from-dataset-v2` when completeness matters. **Related endpoints.** To read fields this endpoint does not expose, or to select arbitrary fields for a single employee, use **Get Employee** (`get-employee`), passing the id `0` for the authenticated caller's own record. For a coworker name, department, or location lookup, retrieve this directory and narrow the `employees` array on the client side rather than filtering elsewhere. Use **List Employees** (`list-employees`) for roster, pagination, sorting, or batch-by-id workflows where the caller can read the relevant fields, and **Get Data from Dataset (v2)** (`get-data-from-dataset-v2`) for tabular reporting, custom field selection, or analytical queries across many employees. Those endpoints apply stricter, endpoint-specific permissions and may return `403`, null or omitted field values, or filtered-out rows; this endpoint is the appropriate choice for general coworker and org chart lookups. **Response format.** Follows the `Accept` header: `application/json` returns a JSON object with `fields` and `employees` arrays; `application/xml` (the default when `Accept` is missing or any non-JSON value) returns a `` document with `
` and `` children. Employee `id` values are internal employee IDs returned as strings in both formats. The response also varies with per-company configuration, where Company Directory sharing takes precedence: when it is enabled the full fieldset is returned whether or not Company Org Chart sharing is also on. When the caller has neither usable Company Directory nor Company Org Chart access the endpoint returns 403 with an empty body and the header `x-bamboohr-error-message: Directory disabled for this account`. That can mean the features are disabled company-wide or that they are not shared with the caller's access level, and the response does not distinguish those cases; when both company toggles are off, every caller including administrators receives it. When only org-chart sharing is available (Company Directory off, Company Org Chart on) the response still lists every directory employee but uses a reduced fieldset, observed as `displayName`, `firstName`, `lastName`, `preferredName`, `jobTitle`, `pronouns`, and the photo fields, which means `supervisor`, `department`, `division`, `location`, work email, and phone numbers are all absent and reporting-structure or work-contact questions cannot be answered from that configuration; when the resulting directory has no employees the endpoint returns 404 rather than an empty list. OAuth Scopes: employee_directory :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str - :param only_current: When true (the default), only active employees are returned. Set to false to include terminated employees. + :param only_current: When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected. :type only_current: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -943,7 +1081,7 @@ def get_employees_directory( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employees_directory_serialize( accept_header_parameter=accept_header_parameter, @@ -951,51 +1089,50 @@ def get_employees_directory( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "JsonDirectoryEmployee", - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeesDirectoryJsonResponse", + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_employees_directory_with_http_info( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - only_current: Annotated[Optional[StrictBool], Field(description="When true (the default), only active employees are returned. Set to false to include terminated employees.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + only_current: Annotated[ + StrictBool | None, + Field( + description="When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[JsonDirectoryEmployee]: - """Get Employee Directory + ) -> ApiResponse[EmployeesDirectoryJsonResponse]: + """Get Employees Directory - Returns the company employee directory, including a fieldset definition and an array of employee records. By default only current (active) employees are returned; pass onlyCurrent=false to include terminated employees. If the caller has org-chart access but not full directory access, a reduced fieldset is returned. Returns 403 if neither directory nor org-chart sharing is enabled for the company. Returns 404 if the directory is empty. The response format is controlled by the Accept header. + Returns the company's published employee directory: a fieldset definition plus an array of employee records whose keys match the field ids. **When to use this endpoint.** Use it for basic, non-sensitive information about coworkers who appear in the company's published directory, especially coworkers the caller does not manage. For the authenticated caller's own record, use **Get Employee** (`get-employee`) with the id `0` instead. It answers questions such as who a coworker is, their job title, department, division, or location, how to reach them at work, and who they report to. When the company shares its full directory, every record includes `supervisor`, which makes this the most direct way to answer org chart and reporting structure questions such as who reports to a given manager. Do not assume that field is present: always read the `fields` array in the response to see what a given company actually exposes, because a company that shares only its org chart returns a reduced fieldset that omits `supervisor` (see Coverage and limits below). **Access.** Directory access is governed by the company's Company Directory and Company Org Chart sharing settings (Settings > Company Directory in the BambooHR web app), together with whether those features are shared with the caller's access level. It is not governed by per-employee record permissions, so when the directory is shared with the caller the employee data is not narrowed to the people whose records they can otherwise read, and an employee with no managerial or administrative access can normally read the full directory. The `canUploadPhoto` value remains caller-specific. **Fields returned.** The fieldset is fixed by company directory configuration and callers cannot request additional fields. The `fields` array in each response lists exactly which fields that company exposes, so treat it as authoritative rather than assuming a fixed set. With full directory sharing it covers names, job title, department, division, location, manager (`supervisor`), work email, work and mobile phone, pronouns, social profile links, and photo information. It never includes compensation, national identifiers such as SSN, birth date, home address, home contact details, or employment status and history, in any configuration. **Coverage and limits.** This endpoint returns the whole directory in one response and accepts no name, department, or field filters, so narrow the results on the client side. Companies choose which employees appear in the directory, and anyone excluded is absent with no indicator that they exist. Inactive and former employees are also excluded, so an administrator researching someone who has left the company will not find them here even though the record still exists; use `get-employee` or `list-employees` for those. Absence from this response therefore means the employee is not in the published directory, not that no such employee exists, so do not conclude from this endpoint alone that someone does not work at the company. For the same reason it is not an authoritative roster; prefer `list-employees` or `get-data-from-dataset-v2` when completeness matters. **Related endpoints.** To read fields this endpoint does not expose, or to select arbitrary fields for a single employee, use **Get Employee** (`get-employee`), passing the id `0` for the authenticated caller's own record. For a coworker name, department, or location lookup, retrieve this directory and narrow the `employees` array on the client side rather than filtering elsewhere. Use **List Employees** (`list-employees`) for roster, pagination, sorting, or batch-by-id workflows where the caller can read the relevant fields, and **Get Data from Dataset (v2)** (`get-data-from-dataset-v2`) for tabular reporting, custom field selection, or analytical queries across many employees. Those endpoints apply stricter, endpoint-specific permissions and may return `403`, null or omitted field values, or filtered-out rows; this endpoint is the appropriate choice for general coworker and org chart lookups. **Response format.** Follows the `Accept` header: `application/json` returns a JSON object with `fields` and `employees` arrays; `application/xml` (the default when `Accept` is missing or any non-JSON value) returns a `` document with `
` and `` children. Employee `id` values are internal employee IDs returned as strings in both formats. The response also varies with per-company configuration, where Company Directory sharing takes precedence: when it is enabled the full fieldset is returned whether or not Company Org Chart sharing is also on. When the caller has neither usable Company Directory nor Company Org Chart access the endpoint returns 403 with an empty body and the header `x-bamboohr-error-message: Directory disabled for this account`. That can mean the features are disabled company-wide or that they are not shared with the caller's access level, and the response does not distinguish those cases; when both company toggles are off, every caller including administrators receives it. When only org-chart sharing is available (Company Directory off, Company Org Chart on) the response still lists every directory employee but uses a reduced fieldset, observed as `displayName`, `firstName`, `lastName`, `preferredName`, `jobTitle`, `pronouns`, and the photo fields, which means `supervisor`, `department`, `division`, `location`, work email, and phone numbers are all absent and reporting-structure or work-contact questions cannot be answered from that configuration; when the resulting directory has no employees the endpoint returns 404 rather than an empty list. OAuth Scopes: employee_directory :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str - :param only_current: When true (the default), only active employees are returned. Set to false to include terminated employees. + :param only_current: When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected. :type only_current: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1017,7 +1154,7 @@ def get_employees_directory_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employees_directory_serialize( accept_header_parameter=accept_header_parameter, @@ -1025,51 +1162,50 @@ def get_employees_directory_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "JsonDirectoryEmployee", - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeesDirectoryJsonResponse", + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_employees_directory_without_preload_content( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - only_current: Annotated[Optional[StrictBool], Field(description="When true (the default), only active employees are returned. Set to false to include terminated employees.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + only_current: Annotated[ + StrictBool | None, + Field( + description="When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Employee Directory + """Get Employees Directory - Returns the company employee directory, including a fieldset definition and an array of employee records. By default only current (active) employees are returned; pass onlyCurrent=false to include terminated employees. If the caller has org-chart access but not full directory access, a reduced fieldset is returned. Returns 403 if neither directory nor org-chart sharing is enabled for the company. Returns 404 if the directory is empty. The response format is controlled by the Accept header. + Returns the company's published employee directory: a fieldset definition plus an array of employee records whose keys match the field ids. **When to use this endpoint.** Use it for basic, non-sensitive information about coworkers who appear in the company's published directory, especially coworkers the caller does not manage. For the authenticated caller's own record, use **Get Employee** (`get-employee`) with the id `0` instead. It answers questions such as who a coworker is, their job title, department, division, or location, how to reach them at work, and who they report to. When the company shares its full directory, every record includes `supervisor`, which makes this the most direct way to answer org chart and reporting structure questions such as who reports to a given manager. Do not assume that field is present: always read the `fields` array in the response to see what a given company actually exposes, because a company that shares only its org chart returns a reduced fieldset that omits `supervisor` (see Coverage and limits below). **Access.** Directory access is governed by the company's Company Directory and Company Org Chart sharing settings (Settings > Company Directory in the BambooHR web app), together with whether those features are shared with the caller's access level. It is not governed by per-employee record permissions, so when the directory is shared with the caller the employee data is not narrowed to the people whose records they can otherwise read, and an employee with no managerial or administrative access can normally read the full directory. The `canUploadPhoto` value remains caller-specific. **Fields returned.** The fieldset is fixed by company directory configuration and callers cannot request additional fields. The `fields` array in each response lists exactly which fields that company exposes, so treat it as authoritative rather than assuming a fixed set. With full directory sharing it covers names, job title, department, division, location, manager (`supervisor`), work email, work and mobile phone, pronouns, social profile links, and photo information. It never includes compensation, national identifiers such as SSN, birth date, home address, home contact details, or employment status and history, in any configuration. **Coverage and limits.** This endpoint returns the whole directory in one response and accepts no name, department, or field filters, so narrow the results on the client side. Companies choose which employees appear in the directory, and anyone excluded is absent with no indicator that they exist. Inactive and former employees are also excluded, so an administrator researching someone who has left the company will not find them here even though the record still exists; use `get-employee` or `list-employees` for those. Absence from this response therefore means the employee is not in the published directory, not that no such employee exists, so do not conclude from this endpoint alone that someone does not work at the company. For the same reason it is not an authoritative roster; prefer `list-employees` or `get-data-from-dataset-v2` when completeness matters. **Related endpoints.** To read fields this endpoint does not expose, or to select arbitrary fields for a single employee, use **Get Employee** (`get-employee`), passing the id `0` for the authenticated caller's own record. For a coworker name, department, or location lookup, retrieve this directory and narrow the `employees` array on the client side rather than filtering elsewhere. Use **List Employees** (`list-employees`) for roster, pagination, sorting, or batch-by-id workflows where the caller can read the relevant fields, and **Get Data from Dataset (v2)** (`get-data-from-dataset-v2`) for tabular reporting, custom field selection, or analytical queries across many employees. Those endpoints apply stricter, endpoint-specific permissions and may return `403`, null or omitted field values, or filtered-out rows; this endpoint is the appropriate choice for general coworker and org chart lookups. **Response format.** Follows the `Accept` header: `application/json` returns a JSON object with `fields` and `employees` arrays; `application/xml` (the default when `Accept` is missing or any non-JSON value) returns a `` document with `
` and `` children. Employee `id` values are internal employee IDs returned as strings in both formats. The response also varies with per-company configuration, where Company Directory sharing takes precedence: when it is enabled the full fieldset is returned whether or not Company Org Chart sharing is also on. When the caller has neither usable Company Directory nor Company Org Chart access the endpoint returns 403 with an empty body and the header `x-bamboohr-error-message: Directory disabled for this account`. That can mean the features are disabled company-wide or that they are not shared with the caller's access level, and the response does not distinguish those cases; when both company toggles are off, every caller including administrators receives it. When only org-chart sharing is available (Company Directory off, Company Org Chart on) the response still lists every directory employee but uses a reduced fieldset, observed as `displayName`, `firstName`, `lastName`, `preferredName`, `jobTitle`, `pronouns`, and the photo fields, which means `supervisor`, `department`, `division`, `location`, work email, and phone numbers are all absent and reporting-structure or work-contact questions cannot be answered from that configuration; when the resulting directory has no employees the endpoint returns 404 rather than an empty list. OAuth Scopes: employee_directory :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str - :param only_current: When true (the default), only active employees are returned. Set to false to include terminated employees. + :param only_current: When true (the default), only employees whose hire date and employment-status effective date are on or before today are returned. Set to false to also include employees with a future hire date or future employment-status effective date (typically pre-boarding hires). The fieldset is unaffected. :type only_current: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1091,7 +1227,7 @@ def get_employees_directory_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employees_directory_serialize( accept_header_parameter=accept_header_parameter, @@ -1099,22 +1235,19 @@ def get_employees_directory_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "JsonDirectoryEmployee", - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "EmployeesDirectoryJsonResponse", + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_employees_directory_serialize( self, accept_header_parameter, @@ -1127,50 +1260,36 @@ def _get_employees_directory_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters if only_current is not None: - - _query_params.append(('onlyCurrent', only_current)) - + _query_params.append(("onlyCurrent", only_current)) + # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employees/directory', + method="GET", + resource_path="/api/v1/employees/directory", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1180,44 +1299,56 @@ def _get_employees_directory_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_employees( self, - filter: Annotated[Optional[GetEmployeesFilterRequestObject], Field(description="Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information.")] = None, - fields: Annotated[Optional[StrictStr], Field(description="Comma-separated list of additional fields to include in the response beyond the default set. Supported values: `workEmail`, `homeEmail`, `bestEmail`, `middleName`, `workPhone`, `workPhoneExtension`, `mobilePhone`, `homePhone`, `skypeUsername`, `linkedinUrl`, `facebookUrl`, `instagramUrl`, `twitterUrl`, `pinterestUrl`. Unrecognized field names are silently ignored. Field values are subject to permission checks — restricted fields will be null or omitted and the field name will appear in `_restrictedFields`.")] = None, - page: Annotated[Optional[CursorPaginationQueryObject], Field(description="Cursor-based pagination parameters (`limit`, `after`, `before`).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + GetEmployeesFilterRequestObject | None, + Field( + description="Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error." + ), + ] = None, + fields: Annotated[ + list[EmployeeOptionalField] | None, + Field( + description="Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array." + ), + ] = None, + page: Annotated[ + EmployeeCursorPaginationQueryObject | None, + Field( + description="Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GetEmployeesResponseObject: """List Employees - Returns a paginated list of employees with optional filtering and sorting. Each employee record always includes: `employeeId`, `firstName`, `lastName`, `preferredName`, `photoUrl`, `jobTitleName`, and `status`. The `_restrictedFields` property is only present when at least one requested field is restricted by permissions — it is omitted entirely on unrestricted records. Use the `fields` parameter to request up to 14 additional contact/social fields. The `status` field is returned as title-case (e.g., `Active`, `Inactive`). For richer employee field data, use the Get Employee endpoint or the Datasets API. + Lists all employees in the authenticated caller's company as a cursor-paginated list. Use this to list employees, fetch the employee roster, or batch-lookup multiple employees by ID. **Response shape.** The response is a JSON object with `data` (an array of employee records), `meta.total` (count of all employees matching the filter, not just the current page), `meta.page` (cursor pagination state), and `_links` (`self`, plus `next` / `prev` when more pages exist). Each employee record always includes the default identity and job fields, plus any additional fields requested via `fields`. `employeeId` is returned as a string and is the internal employee ID — see the `employeeId` and `employeeNumber` field documentation in the response schema for the distinction between the internal ID and the editable Employee # value. IDs for `filter[ids]` come from prior responses of this endpoint. **Employee photos.** Each record includes a `photoUrl` field with a time-limited signed URL. This is the recommended way for AI connectors to display or link to an employee photo, since fetching raw photo bytes through `get-employee-photo` produces base64 payloads too large for an AI model to consume reliably. **Permissions.** Field values the caller cannot read are returned as `null`, and the names of those suppressed fields are listed on the record in `_restrictedFields`. On an unfiltered request an employee remains in `data` even when the caller can read none of the requested fields: `employeeId` still carries its real value, every unreadable field is `null` and named in `_restrictedFields`, values that are not permission-gated such as `photoUrl` may still be populated, and `meta.total` counts the row. Separately, if the caller cannot read a field used in `filter` or `sort`, the affected employee is dropped from the result set entirely to avoid leaking presence, so a name search can return `meta.total: 0` even though matching employees exist. Neither an empty result nor a fully nulled row means no such employee exists. **Counts and aggregates are only valid when the caller can read every field being grouped on.** A caller with full access can safely count and group these rows. A restricted caller cannot: unreadable values come back `null` and filtered queries drop employees entirely, so grouping what such a caller receives understates the real figures and produces a confident but wrong total. Before reporting any count, headcount, department or location breakdown, or turnover figure, compare `meta.total` against the number of rows carrying readable values for the field in question. If those differ, the aggregate is incomplete: either state plainly how many employees were actually readable, or use **Get Data from Dataset (v2)** (`get-data-from-dataset-v2`) or the custom report endpoints instead, which require broader access and fail loudly rather than returning a partial answer. **Related endpoints.** For a single employee with the full set of fields, use `get-employee`. For complex filtering, arbitrary sorting, or tabular reports across many fields, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`). To look up information published in a coworker's company directory entry, such as job title, department, location, work contact details, or who they report to, use Get Employees Directory (`get-employees-directory`), which is governed by directory sharing settings rather than by per-employee record permissions and is available when directory or org-chart access is shared with the caller's access level. OAuth Scopes: employee, employee:job, employee:name, employee_directory, sensitive_employee:protected_info - :param filter: Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data. + :param filter: Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported. :type filter: GetEmployeesFilterRequestObject - :param sort: Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information. + :param sort: Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error. :type sort: str - :param fields: Comma-separated list of additional fields to include in the response beyond the default set. Supported values: `workEmail`, `homeEmail`, `bestEmail`, `middleName`, `workPhone`, `workPhoneExtension`, `mobilePhone`, `homePhone`, `skypeUsername`, `linkedinUrl`, `facebookUrl`, `instagramUrl`, `twitterUrl`, `pinterestUrl`. Unrecognized field names are silently ignored. Field values are subject to permission checks — restricted fields will be null or omitted and the field name will appear in `_restrictedFields`. - :type fields: str - :param page: Cursor-based pagination parameters (`limit`, `after`, `before`). - :type page: CursorPaginationQueryObject + :param fields: Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array. + :type fields: List[EmployeeOptionalField] + :param page: Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page. + :type page: EmployeeCursorPaginationQueryObject :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1238,7 +1369,7 @@ def list_employees( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_employees_serialize( filter=filter, @@ -1248,59 +1379,70 @@ def list_employees( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetEmployeesResponseObject", - '400': "InvalidRequest", - '401': None, - '429': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "GetEmployeesResponseObject", + "400": "EmployeeStringCodeErrorResponseV1", + "401": None, + "429": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_employees_with_http_info( self, - filter: Annotated[Optional[GetEmployeesFilterRequestObject], Field(description="Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information.")] = None, - fields: Annotated[Optional[StrictStr], Field(description="Comma-separated list of additional fields to include in the response beyond the default set. Supported values: `workEmail`, `homeEmail`, `bestEmail`, `middleName`, `workPhone`, `workPhoneExtension`, `mobilePhone`, `homePhone`, `skypeUsername`, `linkedinUrl`, `facebookUrl`, `instagramUrl`, `twitterUrl`, `pinterestUrl`. Unrecognized field names are silently ignored. Field values are subject to permission checks — restricted fields will be null or omitted and the field name will appear in `_restrictedFields`.")] = None, - page: Annotated[Optional[CursorPaginationQueryObject], Field(description="Cursor-based pagination parameters (`limit`, `after`, `before`).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + GetEmployeesFilterRequestObject | None, + Field( + description="Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + fields: Annotated[ + list[EmployeeOptionalField] | None, + Field( + description="Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array." + ), + ] = None, + page: Annotated[ + EmployeeCursorPaginationQueryObject | None, + Field( + description="Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GetEmployeesResponseObject]: """List Employees - Returns a paginated list of employees with optional filtering and sorting. Each employee record always includes: `employeeId`, `firstName`, `lastName`, `preferredName`, `photoUrl`, `jobTitleName`, and `status`. The `_restrictedFields` property is only present when at least one requested field is restricted by permissions — it is omitted entirely on unrestricted records. Use the `fields` parameter to request up to 14 additional contact/social fields. The `status` field is returned as title-case (e.g., `Active`, `Inactive`). For richer employee field data, use the Get Employee endpoint or the Datasets API. + Lists all employees in the authenticated caller's company as a cursor-paginated list. Use this to list employees, fetch the employee roster, or batch-lookup multiple employees by ID. **Response shape.** The response is a JSON object with `data` (an array of employee records), `meta.total` (count of all employees matching the filter, not just the current page), `meta.page` (cursor pagination state), and `_links` (`self`, plus `next` / `prev` when more pages exist). Each employee record always includes the default identity and job fields, plus any additional fields requested via `fields`. `employeeId` is returned as a string and is the internal employee ID — see the `employeeId` and `employeeNumber` field documentation in the response schema for the distinction between the internal ID and the editable Employee # value. IDs for `filter[ids]` come from prior responses of this endpoint. **Employee photos.** Each record includes a `photoUrl` field with a time-limited signed URL. This is the recommended way for AI connectors to display or link to an employee photo, since fetching raw photo bytes through `get-employee-photo` produces base64 payloads too large for an AI model to consume reliably. **Permissions.** Field values the caller cannot read are returned as `null`, and the names of those suppressed fields are listed on the record in `_restrictedFields`. On an unfiltered request an employee remains in `data` even when the caller can read none of the requested fields: `employeeId` still carries its real value, every unreadable field is `null` and named in `_restrictedFields`, values that are not permission-gated such as `photoUrl` may still be populated, and `meta.total` counts the row. Separately, if the caller cannot read a field used in `filter` or `sort`, the affected employee is dropped from the result set entirely to avoid leaking presence, so a name search can return `meta.total: 0` even though matching employees exist. Neither an empty result nor a fully nulled row means no such employee exists. **Counts and aggregates are only valid when the caller can read every field being grouped on.** A caller with full access can safely count and group these rows. A restricted caller cannot: unreadable values come back `null` and filtered queries drop employees entirely, so grouping what such a caller receives understates the real figures and produces a confident but wrong total. Before reporting any count, headcount, department or location breakdown, or turnover figure, compare `meta.total` against the number of rows carrying readable values for the field in question. If those differ, the aggregate is incomplete: either state plainly how many employees were actually readable, or use **Get Data from Dataset (v2)** (`get-data-from-dataset-v2`) or the custom report endpoints instead, which require broader access and fail loudly rather than returning a partial answer. **Related endpoints.** For a single employee with the full set of fields, use `get-employee`. For complex filtering, arbitrary sorting, or tabular reports across many fields, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`). To look up information published in a coworker's company directory entry, such as job title, department, location, work contact details, or who they report to, use Get Employees Directory (`get-employees-directory`), which is governed by directory sharing settings rather than by per-employee record permissions and is available when directory or org-chart access is shared with the caller's access level. OAuth Scopes: employee, employee:job, employee:name, employee_directory, sensitive_employee:protected_info - :param filter: Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data. + :param filter: Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported. :type filter: GetEmployeesFilterRequestObject - :param sort: Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information. + :param sort: Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error. :type sort: str - :param fields: Comma-separated list of additional fields to include in the response beyond the default set. Supported values: `workEmail`, `homeEmail`, `bestEmail`, `middleName`, `workPhone`, `workPhoneExtension`, `mobilePhone`, `homePhone`, `skypeUsername`, `linkedinUrl`, `facebookUrl`, `instagramUrl`, `twitterUrl`, `pinterestUrl`. Unrecognized field names are silently ignored. Field values are subject to permission checks — restricted fields will be null or omitted and the field name will appear in `_restrictedFields`. - :type fields: str - :param page: Cursor-based pagination parameters (`limit`, `after`, `before`). - :type page: CursorPaginationQueryObject + :param fields: Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array. + :type fields: List[EmployeeOptionalField] + :param page: Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page. + :type page: EmployeeCursorPaginationQueryObject :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1321,7 +1463,7 @@ def list_employees_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_employees_serialize( filter=filter, @@ -1331,59 +1473,70 @@ def list_employees_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetEmployeesResponseObject", - '400': "InvalidRequest", - '401': None, - '429': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "GetEmployeesResponseObject", + "400": "EmployeeStringCodeErrorResponseV1", + "401": None, + "429": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_employees_without_preload_content( self, - filter: Annotated[Optional[GetEmployeesFilterRequestObject], Field(description="Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information.")] = None, - fields: Annotated[Optional[StrictStr], Field(description="Comma-separated list of additional fields to include in the response beyond the default set. Supported values: `workEmail`, `homeEmail`, `bestEmail`, `middleName`, `workPhone`, `workPhoneExtension`, `mobilePhone`, `homePhone`, `skypeUsername`, `linkedinUrl`, `facebookUrl`, `instagramUrl`, `twitterUrl`, `pinterestUrl`. Unrecognized field names are silently ignored. Field values are subject to permission checks — restricted fields will be null or omitted and the field name will appear in `_restrictedFields`.")] = None, - page: Annotated[Optional[CursorPaginationQueryObject], Field(description="Cursor-based pagination parameters (`limit`, `after`, `before`).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + GetEmployeesFilterRequestObject | None, + Field( + description="Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error." + ), + ] = None, + fields: Annotated[ + list[EmployeeOptionalField] | None, + Field( + description="Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array." + ), + ] = None, + page: Annotated[ + EmployeeCursorPaginationQueryObject | None, + Field( + description="Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Employees - Returns a paginated list of employees with optional filtering and sorting. Each employee record always includes: `employeeId`, `firstName`, `lastName`, `preferredName`, `photoUrl`, `jobTitleName`, and `status`. The `_restrictedFields` property is only present when at least one requested field is restricted by permissions — it is omitted entirely on unrestricted records. Use the `fields` parameter to request up to 14 additional contact/social fields. The `status` field is returned as title-case (e.g., `Active`, `Inactive`). For richer employee field data, use the Get Employee endpoint or the Datasets API. + Lists all employees in the authenticated caller's company as a cursor-paginated list. Use this to list employees, fetch the employee roster, or batch-lookup multiple employees by ID. **Response shape.** The response is a JSON object with `data` (an array of employee records), `meta.total` (count of all employees matching the filter, not just the current page), `meta.page` (cursor pagination state), and `_links` (`self`, plus `next` / `prev` when more pages exist). Each employee record always includes the default identity and job fields, plus any additional fields requested via `fields`. `employeeId` is returned as a string and is the internal employee ID — see the `employeeId` and `employeeNumber` field documentation in the response schema for the distinction between the internal ID and the editable Employee # value. IDs for `filter[ids]` come from prior responses of this endpoint. **Employee photos.** Each record includes a `photoUrl` field with a time-limited signed URL. This is the recommended way for AI connectors to display or link to an employee photo, since fetching raw photo bytes through `get-employee-photo` produces base64 payloads too large for an AI model to consume reliably. **Permissions.** Field values the caller cannot read are returned as `null`, and the names of those suppressed fields are listed on the record in `_restrictedFields`. On an unfiltered request an employee remains in `data` even when the caller can read none of the requested fields: `employeeId` still carries its real value, every unreadable field is `null` and named in `_restrictedFields`, values that are not permission-gated such as `photoUrl` may still be populated, and `meta.total` counts the row. Separately, if the caller cannot read a field used in `filter` or `sort`, the affected employee is dropped from the result set entirely to avoid leaking presence, so a name search can return `meta.total: 0` even though matching employees exist. Neither an empty result nor a fully nulled row means no such employee exists. **Counts and aggregates are only valid when the caller can read every field being grouped on.** A caller with full access can safely count and group these rows. A restricted caller cannot: unreadable values come back `null` and filtered queries drop employees entirely, so grouping what such a caller receives understates the real figures and produces a confident but wrong total. Before reporting any count, headcount, department or location breakdown, or turnover figure, compare `meta.total` against the number of rows carrying readable values for the field in question. If those differ, the aggregate is incomplete: either state plainly how many employees were actually readable, or use **Get Data from Dataset (v2)** (`get-data-from-dataset-v2`) or the custom report endpoints instead, which require broader access and fail loudly rather than returning a partial answer. **Related endpoints.** For a single employee with the full set of fields, use `get-employee`. For complex filtering, arbitrary sorting, or tabular reports across many fields, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`). To look up information published in a coworker's company directory entry, such as job title, department, location, work contact details, or who they report to, use Get Employees Directory (`get-employees-directory`), which is governed by directory sharing settings rather than by per-employee record permissions and is available when directory or org-chart access is shared with the caller's access level. OAuth Scopes: employee, employee:job, employee:name, employee_directory, sensitive_employee:protected_info - :param filter: Filters used to match employees. Encode filter properties using deepObject style. If the caller does not have access to the filtered field on a matching employee, that employee is excluded from the results to avoid leaking sensitive data. + :param filter: Filters used to match employees. Encode filter properties using deepObject style (`filter[firstName]=Ava`). Multiple filter fields are combined with AND. `filter[ids]` accepts either repeated keys (`filter[ids][]=123&filter[ids][]=124`) or a single comma-separated string (`filter[ids]=123,124`); both forms are supported. :type filter: GetEmployeesFilterRequestObject - :param sort: Comma-separated list of sortable fields. Prefix a field with \"-\" for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. If the caller does not have access to the sort field for an employee, that employee is excluded from the final result set to avoid leaking sensitive information. + :param sort: Comma-separated list of sortable fields. Prefix a field with `-` for descending order. Allowed fields: `employeeId`, `firstName`, `lastName`, `preferredName`, `jobTitleName`, `status`. Nulls sort first in ascending order and last in descending order. An invalid sort field returns a `BadRequest` error. :type sort: str - :param fields: Comma-separated list of additional fields to include in the response beyond the default set. Supported values: `workEmail`, `homeEmail`, `bestEmail`, `middleName`, `workPhone`, `workPhoneExtension`, `mobilePhone`, `homePhone`, `skypeUsername`, `linkedinUrl`, `facebookUrl`, `instagramUrl`, `twitterUrl`, `pinterestUrl`. Unrecognized field names are silently ignored. Field values are subject to permission checks — restricted fields will be null or omitted and the field name will appear in `_restrictedFields`. - :type fields: str - :param page: Cursor-based pagination parameters (`limit`, `after`, `before`). - :type page: CursorPaginationQueryObject + :param fields: Additional fields to include in each employee record beyond the default set. The canonical form is a comma-separated list (`fields=workEmail,mobilePhone`); for backward compatibility the endpoint also accepts the bracket-array form (`fields[]=workEmail&fields[]=mobilePhone`). Note: plain repeated keys without brackets (`fields=workEmail&fields=mobilePhone`) are unreliable — most HTTP stacks keep only the last value, silently dropping earlier ones; use the comma-separated form instead. Unrecognized field names are silently ignored. Returned values are subject to permission checks — fields the caller cannot read are returned as `null` and their names are listed in the record's `_restrictedFields` array. + :type fields: List[EmployeeOptionalField] + :param page: Cursor-based pagination parameters. `page[limit]` controls page size (default 250, maximum 2500). `page[after]` and `page[before]` accept opaque cursors returned in the previous response's `meta.page.nextCursor` / `prevCursor`; do not specify both at once. The response's `_links.next` / `_links.prev` are pre-built URLs that already encode the correct cursor for the next or previous page. + :type page: EmployeeCursorPaginationQueryObject :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1404,7 +1557,7 @@ def list_employees_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_employees_serialize( filter=filter, @@ -1414,23 +1567,19 @@ def list_employees_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetEmployeesResponseObject", - '400': "InvalidRequest", - '401': None, - '429': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "GetEmployeesResponseObject", + "400": "EmployeeStringCodeErrorResponseV1", + "401": None, + "429": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_employees_serialize( self, filter, @@ -1445,58 +1594,45 @@ def _list_employees_serialize( _host = None - _collection_formats: Dict[str, str] = { + _collection_formats: dict[str, str] = { + "fields": "csv", } - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters if filter is not None: - - _query_params.append(('filter', filter)) - + _query_params.append(("filter", filter)) + if sort is not None: - - _query_params.append(('sort', sort)) - + _query_params.append(("sort", sort)) + if fields is not None: - - _query_params.append(('fields', fields)) - + _query_params.append(("fields", fields)) + if page is not None: - - _query_params.append(('page', page)) - + _query_params.append(("page", page)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employees', + method="GET", + resource_path="/api/v1/employees", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1506,33 +1642,25 @@ def _list_employees_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_employee( self, - id: Annotated[StrictStr, Field(description="The employee ID.")], + id: Annotated[StrictStr | None, Field(description="The employee ID.")], employee: Employee, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> GetEmployeeResponse: """Update Employee - Update an employee's fields by submitting a JSON object or XML document containing field name/value pairs. The request body schema lists commonly used fields, but any valid employee field name may be used as a key. To discover available field names, call the list-fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Trax Payroll note: If the employee is currently on a pay schedule syncing with Trax Payroll, or is being added to one, the request must include the required payroll-related employee fields: employeeNumber, firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, country, employmentHistoryStatus, exempt, payType, payRate, payPer, location, department, and division. + Update an employee's fields by submitting a JSON object or XML document containing field name/value pairs. The request body schema lists commonly used fields, but any valid writable employee field name may be used as a key. To discover available field names, call **List Fields** (`list-fields`). This endpoint does not upload, replace, or remove the employee profile photo, and does not accept any binary or file uploads in general. Photo-related keys (e.g. `photo`, `photoUrl`) included in the body are silently ignored: the request still returns 200, but no photo change is made. To change a profile photo, use the Upload Employee Photo endpoint (`upload-employee-photo`). AI connectors cannot use that endpoint reliably and should redirect the user to the BambooHR web UI. Trax Payroll note: If the employee is currently on a pay schedule syncing with Trax Payroll, or is being added to one, the request must include the required payroll-related employee fields: employeeNumber (unless the company has automatic employee numbers enabled), firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, zipcode, country, employmentHistoryStatus, exempt, payType, payRate, payPer, overtimeRate, and location. OAuth Scopes: employee, employee.write, employee:assets.write, employee:compensation.write, employee:contact.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:demographic.write, employee:dependent.write, employee:dependent:ssn.write, employee:education.write, employee:emergency_contacts.write, employee:identification.write, employee:job, employee:job.write, employee:management.write, employee:name.write, employee:payroll.write, employee:photo.write, employee:vaccination.write, sensitive_employee:address.write, sensitive_employee:creditcards.write, sensitive_employee:protected_info.write :param id: The employee ID. (required) :type id: str @@ -1558,7 +1686,7 @@ def update_employee( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_employee_serialize( id=id, @@ -1566,49 +1694,39 @@ def update_employee( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '409': None, + _response_types_map: dict[str, str | None] = { + "200": "GetEmployeeResponse", + "400": None, + "403": None, + "404": None, + "409": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call def update_employee_with_http_info( self, - id: Annotated[StrictStr, Field(description="The employee ID.")], + id: Annotated[StrictStr | None, Field(description="The employee ID.")], employee: Employee, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[GetEmployeeResponse]: """Update Employee - Update an employee's fields by submitting a JSON object or XML document containing field name/value pairs. The request body schema lists commonly used fields, but any valid employee field name may be used as a key. To discover available field names, call the list-fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Trax Payroll note: If the employee is currently on a pay schedule syncing with Trax Payroll, or is being added to one, the request must include the required payroll-related employee fields: employeeNumber, firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, country, employmentHistoryStatus, exempt, payType, payRate, payPer, location, department, and division. + Update an employee's fields by submitting a JSON object or XML document containing field name/value pairs. The request body schema lists commonly used fields, but any valid writable employee field name may be used as a key. To discover available field names, call **List Fields** (`list-fields`). This endpoint does not upload, replace, or remove the employee profile photo, and does not accept any binary or file uploads in general. Photo-related keys (e.g. `photo`, `photoUrl`) included in the body are silently ignored: the request still returns 200, but no photo change is made. To change a profile photo, use the Upload Employee Photo endpoint (`upload-employee-photo`). AI connectors cannot use that endpoint reliably and should redirect the user to the BambooHR web UI. Trax Payroll note: If the employee is currently on a pay schedule syncing with Trax Payroll, or is being added to one, the request must include the required payroll-related employee fields: employeeNumber (unless the company has automatic employee numbers enabled), firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, zipcode, country, employmentHistoryStatus, exempt, payType, payRate, payPer, overtimeRate, and location. OAuth Scopes: employee, employee.write, employee:assets.write, employee:compensation.write, employee:contact.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:demographic.write, employee:dependent.write, employee:dependent:ssn.write, employee:education.write, employee:emergency_contacts.write, employee:identification.write, employee:job, employee:job.write, employee:management.write, employee:name.write, employee:payroll.write, employee:photo.write, employee:vaccination.write, sensitive_employee:address.write, sensitive_employee:creditcards.write, sensitive_employee:protected_info.write :param id: The employee ID. (required) :type id: str @@ -1634,7 +1752,7 @@ def update_employee_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_employee_serialize( id=id, @@ -1642,48 +1760,39 @@ def update_employee_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '409': None, + _response_types_map: dict[str, str | None] = { + "200": "GetEmployeeResponse", + "400": None, + "403": None, + "404": None, + "409": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_employee_without_preload_content( self, - id: Annotated[StrictStr, Field(description="The employee ID.")], + id: Annotated[StrictStr | None, Field(description="The employee ID.")], employee: Employee, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Employee - Update an employee's fields by submitting a JSON object or XML document containing field name/value pairs. The request body schema lists commonly used fields, but any valid employee field name may be used as a key. To discover available field names, call the list-fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Trax Payroll note: If the employee is currently on a pay schedule syncing with Trax Payroll, or is being added to one, the request must include the required payroll-related employee fields: employeeNumber, firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, country, employmentHistoryStatus, exempt, payType, payRate, payPer, location, department, and division. + Update an employee's fields by submitting a JSON object or XML document containing field name/value pairs. The request body schema lists commonly used fields, but any valid writable employee field name may be used as a key. To discover available field names, call **List Fields** (`list-fields`). This endpoint does not upload, replace, or remove the employee profile photo, and does not accept any binary or file uploads in general. Photo-related keys (e.g. `photo`, `photoUrl`) included in the body are silently ignored: the request still returns 200, but no photo change is made. To change a profile photo, use the Upload Employee Photo endpoint (`upload-employee-photo`). AI connectors cannot use that endpoint reliably and should redirect the user to the BambooHR web UI. Trax Payroll note: If the employee is currently on a pay schedule syncing with Trax Payroll, or is being added to one, the request must include the required payroll-related employee fields: employeeNumber (unless the company has automatic employee numbers enabled), firstName, lastName, dateOfBirth, ssn or ein, gender, maritalStatus, hireDate, address1, city, state, zipcode, country, employmentHistoryStatus, exempt, payType, payRate, payPer, overtimeRate, and location. OAuth Scopes: employee, employee.write, employee:assets.write, employee:compensation.write, employee:contact.write, employee:custom_fields.write, employee:custom_fields_encrypted.write, employee:demographic.write, employee:dependent.write, employee:dependent:ssn.write, employee:education.write, employee:emergency_contacts.write, employee:identification.write, employee:job, employee:job.write, employee:management.write, employee:name.write, employee:payroll.write, employee:photo.write, employee:vaccination.write, sensitive_employee:address.write, sensitive_employee:creditcards.write, sensitive_employee:protected_info.write :param id: The employee ID. (required) :type id: str @@ -1709,7 +1818,7 @@ def update_employee_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_employee_serialize( id=id, @@ -1717,23 +1826,19 @@ def update_employee_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '403': None, - '404': None, - '409': None, + _response_types_map: dict[str, str | None] = { + "200": "GetEmployeeResponse", + "400": None, + "403": None, + "404": None, + "409": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_employee_serialize( self, id, @@ -1746,21 +1851,18 @@ def _update_employee_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters @@ -1768,33 +1870,26 @@ def _update_employee_serialize( if employee is not None: _body_params = employee - + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml', - 'text/xml' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "application/xml", "text/xml"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/employees/{id}', + method="POST", + resource_path="/api/v1/employees/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1804,7 +1899,5 @@ def _update_employee_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/goals_api.py b/bamboohr_sdk/api/goals_api.py index 052a563..9803795 100644 --- a/bamboohr_sdk/api/goals_api.py +++ b/bamboohr_sdk/api/goals_api.py @@ -1,49 +1,44 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any -from pydantic import Field, StrictInt, StrictStr -from typing import Optional -from typing_extensions import Annotated +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.models.alignment_options_response import AlignmentOptionsResponse from bamboohr_sdk.models.can_create_goals_response import CanCreateGoalsResponse -from bamboohr_sdk.models.goal import Goal +from bamboohr_sdk.models.close_goal_request import CloseGoalRequest +from bamboohr_sdk.models.create_goal_comment_request import CreateGoalCommentRequest +from bamboohr_sdk.models.create_goal_request import CreateGoalRequest from bamboohr_sdk.models.goal_aggregate import GoalAggregate from bamboohr_sdk.models.goal_comment_response import GoalCommentResponse from bamboohr_sdk.models.goal_comments_response import GoalCommentsResponse from bamboohr_sdk.models.goal_filters_v1 import GoalFiltersV1 from bamboohr_sdk.models.goal_filters_v11 import GoalFiltersV11 +from bamboohr_sdk.models.goal_response import GoalResponse from bamboohr_sdk.models.goals_aggregate_v1 import GoalsAggregateV1 from bamboohr_sdk.models.goals_aggregate_v11 import GoalsAggregateV11 from bamboohr_sdk.models.goals_aggregate_v12 import GoalsAggregateV12 from bamboohr_sdk.models.goals_list import GoalsList -from bamboohr_sdk.models.post_goal_comment_request import PostGoalCommentRequest -from bamboohr_sdk.models.post_goal_request import PostGoalRequest -from bamboohr_sdk.models.put_goal_comment_request import PutGoalCommentRequest -from bamboohr_sdk.models.put_goal_milestone_progress_request import PutGoalMilestoneProgressRequest -from bamboohr_sdk.models.put_goal_progress_request import PutGoalProgressRequest -from bamboohr_sdk.models.put_goal_shared_with_request import PutGoalSharedWithRequest -from bamboohr_sdk.models.put_goal_v11_request import PutGoalV11Request from bamboohr_sdk.models.share_options_response import ShareOptionsResponse from bamboohr_sdk.models.transformed_api_employee_goal_details import TransformedApiEmployeeGoalDetails -from bamboohr_sdk.models.transformed_api_goal import TransformedApiGoal - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.update_goal_comment_request import UpdateGoalCommentRequest +from bamboohr_sdk.models.update_goal_milestone_progress_request import UpdateGoalMilestoneProgressRequest +from bamboohr_sdk.models.update_goal_progress_request import UpdateGoalProgressRequest +from bamboohr_sdk.models.update_goal_sharing_request import UpdateGoalSharingRequest +from bamboohr_sdk.models.update_goal_v1 import UpdateGoalV1 +from bamboohr_sdk.models.update_goal_v11_request import UpdateGoalV11Request from bamboohr_sdk.rest import RESTResponseType @@ -59,33 +54,34 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call - def delete_goal( + def close_goal( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + close_goal_request: Annotated[ + CloseGoalRequest | None, Field(description="An optional comment to record when closing the goal.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Goal + ) -> GoalResponse: + """Close Goal - Delete a goal. + Closes a goal, moving it to the closed status. An optional comment may be included in the request body to record a note at closing time. Returns the updated goal object. Validate the result using the returned `status`, `percentComplete`, and `completionDate` fields; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. Note: Cascading goals with visible children cannot be closed. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str + :param close_goal_request: An optional comment to record when closing the goal. + :type close_goal_request: CloseGoalRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -106,60 +102,59 @@ def delete_goal( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_goal_serialize( + _param = self._close_goal_serialize( employee_id=employee_id, goal_id=goal_id, + close_goal_request=close_goal_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "201": "GoalResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call - def delete_goal_with_http_info( + def close_goal_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + close_goal_request: Annotated[ + CloseGoalRequest | None, Field(description="An optional comment to record when closing the goal.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Goal + ) -> ApiResponse[GoalResponse]: + """Close Goal - Delete a goal. + Closes a goal, moving it to the closed status. An optional comment may be included in the request body to record a note at closing time. Returns the updated goal object. Validate the result using the returned `status`, `percentComplete`, and `completionDate` fields; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. Note: Cascading goals with visible children cannot be closed. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str + :param close_goal_request: An optional comment to record when closing the goal. + :type close_goal_request: CloseGoalRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -180,59 +175,59 @@ def delete_goal_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_goal_serialize( + _param = self._close_goal_serialize( employee_id=employee_id, goal_id=goal_id, + close_goal_request=close_goal_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "201": "GoalResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def delete_goal_without_preload_content( + def close_goal_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + close_goal_request: Annotated[ + CloseGoalRequest | None, Field(description="An optional comment to record when closing the goal.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Goal + """Close Goal - Delete a goal. + Closes a goal, moving it to the closed status. An optional comment may be included in the request body to record a note at closing time. Returns the updated goal object. Validate the result using the returned `status`, `percentComplete`, and `completionDate` fields; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. Note: Cascading goals with visible children cannot be closed. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str + :param close_goal_request: An optional comment to record when closing the goal. + :type close_goal_request: CloseGoalRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -253,33 +248,32 @@ def delete_goal_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_goal_serialize( + _param = self._close_goal_serialize( employee_id=employee_id, goal_id=goal_id, + close_goal_request=close_goal_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "201": "GoalResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _delete_goal_serialize( + def _close_goal_serialize( self, employee_id, goal_id, + close_goal_request, _request_auth, _content_type, _headers, @@ -288,40 +282,45 @@ def _delete_goal_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id if goal_id is not None: - _path_params['goalId'] = goal_id + _path_params["goalId"] = goal_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if close_goal_request is not None: + _body_params = close_goal_request + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/performance/employees/{employeeId}/goals/{goalId}', + method="POST", + resource_path="/api/v1/performance/employees/{employeeId}/goals/{goalId}/close", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -331,41 +330,32 @@ def _delete_goal_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def delete_goal_comment( + def create_goal( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - comment_id: Annotated[StrictStr, Field(description="commentId is the ID of a specific comment for the specified goal.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr | None, Field(description="The internal employee ID of the employee who owns the new goal.") + ], + create_goal_request: CreateGoalRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Goal Comment + ) -> TransformedApiEmployeeGoalDetails: + """Create Goal - Delete a goal comment. + Create a new goal for an employee. To create a simple goal without milestones, omit the `milestones` field; the goal's progress can then be changed with `update-goal-progress`. To create a milestone-based goal, provide `milestones` as a non-empty array of `{ \"title\": string }` objects; the goal's percent complete is then derived from milestone completion and should be changed via `update-goal-milestone-progress`. Sending `milestones: null` is treated as omitted (creates a simple goal). OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee who owns the new goal. (required) :type employee_id: str - :param goal_id: goalId is the goal ID for the specified employee. (required) - :type goal_id: str - :param comment_id: commentId is the ID of a specific comment for the specified goal. (required) - :type comment_id: str + :param create_goal_request: (required) + :type create_goal_request: CreateGoalRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -386,65 +376,53 @@ def delete_goal_comment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_goal_comment_serialize( + _param = self._create_goal_serialize( employee_id=employee_id, - goal_id=goal_id, - comment_id=comment_id, + create_goal_request=create_goal_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "201": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call - def delete_goal_comment_with_http_info( + def create_goal_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - comment_id: Annotated[StrictStr, Field(description="commentId is the ID of a specific comment for the specified goal.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr | None, Field(description="The internal employee ID of the employee who owns the new goal.") + ], + create_goal_request: CreateGoalRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Goal Comment + ) -> ApiResponse[TransformedApiEmployeeGoalDetails]: + """Create Goal - Delete a goal comment. + Create a new goal for an employee. To create a simple goal without milestones, omit the `milestones` field; the goal's progress can then be changed with `update-goal-progress`. To create a milestone-based goal, provide `milestones` as a non-empty array of `{ \"title\": string }` objects; the goal's percent complete is then derived from milestone completion and should be changed via `update-goal-milestone-progress`. Sending `milestones: null` is treated as omitted (creates a simple goal). OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee who owns the new goal. (required) :type employee_id: str - :param goal_id: goalId is the goal ID for the specified employee. (required) - :type goal_id: str - :param comment_id: commentId is the ID of a specific comment for the specified goal. (required) - :type comment_id: str + :param create_goal_request: (required) + :type create_goal_request: CreateGoalRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -465,64 +443,53 @@ def delete_goal_comment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_goal_comment_serialize( + _param = self._create_goal_serialize( employee_id=employee_id, - goal_id=goal_id, - comment_id=comment_id, + create_goal_request=create_goal_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "201": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def delete_goal_comment_without_preload_content( + def create_goal_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - comment_id: Annotated[StrictStr, Field(description="commentId is the ID of a specific comment for the specified goal.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr | None, Field(description="The internal employee ID of the employee who owns the new goal.") + ], + create_goal_request: CreateGoalRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Goal Comment + """Create Goal - Delete a goal comment. + Create a new goal for an employee. To create a simple goal without milestones, omit the `milestones` field; the goal's progress can then be changed with `update-goal-progress`. To create a milestone-based goal, provide `milestones` as a non-empty array of `{ \"title\": string }` objects; the goal's percent complete is then derived from milestone completion and should be changed via `update-goal-milestone-progress`. Sending `milestones: null` is treated as omitted (creates a simple goal). OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee who owns the new goal. (required) :type employee_id: str - :param goal_id: goalId is the goal ID for the specified employee. (required) - :type goal_id: str - :param comment_id: commentId is the ID of a specific comment for the specified goal. (required) - :type comment_id: str + :param create_goal_request: (required) + :type create_goal_request: CreateGoalRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -543,36 +510,30 @@ def delete_goal_comment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_goal_comment_serialize( + _param = self._create_goal_serialize( employee_id=employee_id, - goal_id=goal_id, - comment_id=comment_id, + create_goal_request=create_goal_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "201": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _delete_goal_comment_serialize( + def _create_goal_serialize( self, employee_id, - goal_id, - comment_id, + create_goal_request, _request_auth, _content_type, _headers, @@ -581,49 +542,43 @@ def _delete_goal_comment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id - if goal_id is not None: - _path_params['goalId'] = goal_id - if comment_id is not None: - _path_params['commentId'] = comment_id + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - + if create_goal_request is not None: + _body_params = create_goal_request # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId}', + method="POST", + resource_path="/api/v1/performance/employees/{employeeId}/goals", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -633,35 +588,35 @@ def _delete_goal_comment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_can_create_goal( + def create_goal_comment( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + create_goal_comment_request: CreateGoalCommentRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CanCreateGoalsResponse: - """Check Goal Creation Permission + ) -> GoalCommentResponse: + """Create Goal Comment - Determine if the API user has permission to create a goal for this employee. + Creates a new comment on a goal. The goal must belong to the specified employee. Returns the newly created comment object including its assigned ID. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str + :param goal_id: goalId is the goal ID for the specified employee. (required) + :type goal_id: str + :param create_goal_comment_request: (required) + :type create_goal_comment_request: CreateGoalCommentRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -682,55 +637,57 @@ def get_can_create_goal( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_can_create_goal_serialize( + _param = self._create_goal_comment_serialize( employee_id=employee_id, + goal_id=goal_id, + create_goal_comment_request=create_goal_comment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CanCreateGoalsResponse", - '400': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "201": "GoalCommentResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_can_create_goal_with_http_info( + def create_goal_comment_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + create_goal_comment_request: CreateGoalCommentRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CanCreateGoalsResponse]: - """Check Goal Creation Permission + ) -> ApiResponse[GoalCommentResponse]: + """Create Goal Comment - Determine if the API user has permission to create a goal for this employee. + Creates a new comment on a goal. The goal must belong to the specified employee. Returns the newly created comment object including its assigned ID. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str + :param goal_id: goalId is the goal ID for the specified employee. (required) + :type goal_id: str + :param create_goal_comment_request: (required) + :type create_goal_comment_request: CreateGoalCommentRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -751,55 +708,57 @@ def get_can_create_goal_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_can_create_goal_serialize( + _param = self._create_goal_comment_serialize( employee_id=employee_id, + goal_id=goal_id, + create_goal_comment_request=create_goal_comment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CanCreateGoalsResponse", - '400': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "201": "GoalCommentResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_can_create_goal_without_preload_content( + def create_goal_comment_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + create_goal_comment_request: CreateGoalCommentRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Check Goal Creation Permission + """Create Goal Comment - Determine if the API user has permission to create a goal for this employee. + Creates a new comment on a goal. The goal must belong to the specified employee. Returns the newly created comment object including its assigned ID. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str + :param goal_id: goalId is the goal ID for the specified employee. (required) + :type goal_id: str + :param create_goal_comment_request: (required) + :type create_goal_comment_request: CreateGoalCommentRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -820,31 +779,32 @@ def get_can_create_goal_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_can_create_goal_serialize( + _param = self._create_goal_comment_serialize( employee_id=employee_id, + goal_id=goal_id, + create_goal_comment_request=create_goal_comment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "CanCreateGoalsResponse", - '400': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "201": "GoalCommentResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_can_create_goal_serialize( + def _create_goal_comment_serialize( self, employee_id, + goal_id, + create_goal_comment_request, _request_auth, _content_type, _headers, @@ -853,45 +813,45 @@ def _get_can_create_goal_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id + if goal_id is not None: + _path_params["goalId"] = goal_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - + if create_goal_comment_request is not None: + _body_params = create_goal_comment_request # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/performance/employees/{employeeId}/goals/canCreateGoals', + method="POST", + resource_path="/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -901,37 +861,37 @@ def _get_can_create_goal_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_goal_aggregate( + def delete_goal( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the Goal ID used to generate the aggregate information.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee the goal is associated with."), + ], + goal_id: Annotated[ + StrictStr | None, + Field( + description="The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GoalAggregate: - """Get Goal Aggregate + ) -> ApiResponse[None]: + """Delete Goal - Provides goal information, goal comments, and employees shared with goals or who have commented on the given goal. + Permanently deletes a goal for an employee. The goal must belong to the specified employee. Returns 204 with no response body on success. For natural-language requests that identify a goal by title or partial title, first call `list-goals` with `filter=status-all` and resolve exactly one matching goal. Do not delete if there are multiple matches or no match; ask for clarification or report that the goal was not found. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str - :param goal_id: goalId is the Goal ID used to generate the aggregate information. (required) + :param goal_id: The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`. (required) :type goal_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -953,56 +913,58 @@ def get_goal_aggregate( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_goal_aggregate_serialize( + _param = self._delete_goal_serialize( employee_id=employee_id, goal_id=goal_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalAggregate", + _response_types_map: dict[str, str | None] = { + "204": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ).data - + ) @validate_call - def get_goal_aggregate_with_http_info( + def delete_goal_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the Goal ID used to generate the aggregate information.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee the goal is associated with."), + ], + goal_id: Annotated[ + StrictStr | None, + Field( + description="The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GoalAggregate]: - """Get Goal Aggregate + ) -> ApiResponse[None]: + """Delete Goal - Provides goal information, goal comments, and employees shared with goals or who have commented on the given goal. + Permanently deletes a goal for an employee. The goal must belong to the specified employee. Returns 204 with no response body on success. For natural-language requests that identify a goal by title or partial title, first call `list-goals` with `filter=status-all` and resolve exactly one matching goal. Do not delete if there are multiple matches or no match; ask for clarification or report that the goal was not found. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str - :param goal_id: goalId is the Goal ID used to generate the aggregate information. (required) + :param goal_id: The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`. (required) :type goal_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1024,56 +986,57 @@ def get_goal_aggregate_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_goal_aggregate_serialize( + _param = self._delete_goal_serialize( employee_id=employee_id, goal_id=goal_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalAggregate", + _response_types_map: dict[str, str | None] = { + "204": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_goal_aggregate_without_preload_content( + def delete_goal_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the Goal ID used to generate the aggregate information.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee the goal is associated with."), + ], + goal_id: Annotated[ + StrictStr | None, + Field( + description="The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Goal Aggregate + """Delete Goal - Provides goal information, goal comments, and employees shared with goals or who have commented on the given goal. + Permanently deletes a goal for an employee. The goal must belong to the specified employee. Returns 204 with no response body on success. For natural-language requests that identify a goal by title or partial title, first call `list-goals` with `filter=status-all` and resolve exactly one matching goal. Do not delete if there are multiple matches or no match; ask for clarification or report that the goal was not found. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str - :param goal_id: goalId is the Goal ID used to generate the aggregate information. (required) + :param goal_id: The exact goal ID for the specified employee. Do not infer this from a partial title unless you have resolved a single matching goal via `list-goals`. (required) :type goal_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1095,28 +1058,26 @@ def get_goal_aggregate_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_goal_aggregate_serialize( + _param = self._delete_goal_serialize( employee_id=employee_id, goal_id=goal_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalAggregate", + _response_types_map: dict[str, str | None] = { + "204": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_goal_aggregate_serialize( + def _delete_goal_serialize( self, employee_id, goal_id, @@ -1128,47 +1089,31 @@ def _get_goal_aggregate_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id if goal_id is not None: - _path_params['goalId'] = goal_id + _path_params["goalId"] = goal_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate', + method="DELETE", + resource_path="/api/v1/performance/employees/{employeeId}/goals/{goalId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1178,38 +1123,37 @@ def _get_goal_aggregate_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_goal_comments( + def delete_goal_comment( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + comment_id: Annotated[ + StrictStr | None, Field(description="commentId is the ID of a specific comment for the specified goal.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GoalCommentsResponse: - """Get Goal Comments + ) -> ApiResponse[None]: + """Delete Goal Comment - Get comments for a goal. + Deletes a goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns 204 with no response body on success. If the user does not provide a comment ID, first call `list-goal-comments` and select a single deletable comment (`canDelete` is true) matching the user's description. If multiple comments match or none are deletable, do not delete; ask for clarification. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str + :param comment_id: commentId is the ID of a specific comment for the specified goal. (required) + :type comment_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1230,59 +1174,60 @@ def get_goal_comments( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_goal_comments_serialize( + _param = self._delete_goal_comment_serialize( employee_id=employee_id, goal_id=goal_id, + comment_id=comment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalCommentsResponse", - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "204": None, + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ).data - + ) @validate_call - def get_goal_comments_with_http_info( + def delete_goal_comment_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + comment_id: Annotated[ + StrictStr | None, Field(description="commentId is the ID of a specific comment for the specified goal.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GoalCommentsResponse]: - """Get Goal Comments + ) -> ApiResponse[None]: + """Delete Goal Comment - Get comments for a goal. + Deletes a goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns 204 with no response body on success. If the user does not provide a comment ID, first call `list-goal-comments` and select a single deletable comment (`canDelete` is true) matching the user's description. If multiple comments match or none are deletable, do not delete; ask for clarification. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str + :param comment_id: commentId is the ID of a specific comment for the specified goal. (required) + :type comment_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1303,59 +1248,59 @@ def get_goal_comments_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_goal_comments_serialize( + _param = self._delete_goal_comment_serialize( employee_id=employee_id, goal_id=goal_id, + comment_id=comment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalCommentsResponse", - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "204": None, + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_goal_comments_without_preload_content( + def delete_goal_comment_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + comment_id: Annotated[ + StrictStr | None, Field(description="commentId is the ID of a specific comment for the specified goal.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Goal Comments + """Delete Goal Comment - Get comments for a goal. + Deletes a goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns 204 with no response body on success. If the user does not provide a comment ID, first call `list-goal-comments` and select a single deletable comment (`canDelete` is true) matching the user's description. If multiple comments match or none are deletable, do not delete; ask for clarification. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str + :param comment_id: commentId is the ID of a specific comment for the specified goal. (required) + :type comment_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1376,33 +1321,32 @@ def get_goal_comments_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_goal_comments_serialize( + _param = self._delete_goal_comment_serialize( employee_id=employee_id, goal_id=goal_id, + comment_id=comment_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalCommentsResponse", - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "204": None, + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_goal_comments_serialize( + def _delete_goal_comment_serialize( self, employee_id, goal_id, + comment_id, _request_auth, _content_type, _headers, @@ -1411,47 +1355,37 @@ def _get_goal_comments_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id if goal_id is not None: - _path_params['goalId'] = goal_id + _path_params["goalId"] = goal_id + if comment_id is not None: + _path_params["commentId"] = comment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments', + method="DELETE", + resource_path="/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1461,38 +1395,38 @@ def _get_goal_comments_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_goals( + def get_alignable_goal_options( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - filter: Annotated[Optional[StrictStr], Field(description="A filter that can be applied to only show the goals that are in a certain state.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose alignable goal options are returned."), + ], + goal_id: Annotated[ + StrictInt | None, + Field( + description="Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GoalsList: - """Get Goals + ) -> AlignmentOptionsResponse: + """Get Alignable Goal Options - Get goals for an employee. + Returns goals that can be used as alignment targets. When a `goalId` query parameter is provided, the currently aligned goal is included in the results even if it would otherwise be excluded. When `goalId` is omitted, returns alignment options for the authenticated caller. This endpoint is permission-sensitive: the caller may be able to view a goal through `list-goals` or `get-goal-aggregate` but still receive 403 here if they lack permission to view alignment options for the selected goal. Treat 403 as \"alignment options are permission-restricted,\" not as proof that the goal ID is invalid. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: The internal employee ID of the employee whose alignable goal options are returned. (required) :type employee_id: str - :param filter: A filter that can be applied to only show the goals that are in a certain state. - :type filter: str + :param goal_id: Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid. + :type goal_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1513,57 +1447,59 @@ def get_goals( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_goals_serialize( + _param = self._get_alignable_goal_options_serialize( employee_id=employee_id, - filter=filter, + goal_id=goal_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalsList", + _response_types_map: dict[str, str | None] = { + "200": "AlignmentOptionsResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_goals_with_http_info( + def get_alignable_goal_options_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - filter: Annotated[Optional[StrictStr], Field(description="A filter that can be applied to only show the goals that are in a certain state.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose alignable goal options are returned."), + ], + goal_id: Annotated[ + StrictInt | None, + Field( + description="Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GoalsList]: - """Get Goals + ) -> ApiResponse[AlignmentOptionsResponse]: + """Get Alignable Goal Options - Get goals for an employee. + Returns goals that can be used as alignment targets. When a `goalId` query parameter is provided, the currently aligned goal is included in the results even if it would otherwise be excluded. When `goalId` is omitted, returns alignment options for the authenticated caller. This endpoint is permission-sensitive: the caller may be able to view a goal through `list-goals` or `get-goal-aggregate` but still receive 403 here if they lack permission to view alignment options for the selected goal. Treat 403 as \"alignment options are permission-restricted,\" not as proof that the goal ID is invalid. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: The internal employee ID of the employee whose alignable goal options are returned. (required) :type employee_id: str - :param filter: A filter that can be applied to only show the goals that are in a certain state. - :type filter: str + :param goal_id: Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid. + :type goal_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1584,57 +1520,59 @@ def get_goals_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_goals_serialize( + _param = self._get_alignable_goal_options_serialize( employee_id=employee_id, - filter=filter, + goal_id=goal_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalsList", + _response_types_map: dict[str, str | None] = { + "200": "AlignmentOptionsResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_goals_without_preload_content( + def get_alignable_goal_options_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - filter: Annotated[Optional[StrictStr], Field(description="A filter that can be applied to only show the goals that are in a certain state.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose alignable goal options are returned."), + ], + goal_id: Annotated[ + StrictInt | None, + Field( + description="Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Goals + """Get Alignable Goal Options - Get goals for an employee. + Returns goals that can be used as alignment targets. When a `goalId` query parameter is provided, the currently aligned goal is included in the results even if it would otherwise be excluded. When `goalId` is omitted, returns alignment options for the authenticated caller. This endpoint is permission-sensitive: the caller may be able to view a goal through `list-goals` or `get-goal-aggregate` but still receive 403 here if they lack permission to view alignment options for the selected goal. Treat 403 as \"alignment options are permission-restricted,\" not as proof that the goal ID is invalid. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: The internal employee ID of the employee whose alignable goal options are returned. (required) :type employee_id: str - :param filter: A filter that can be applied to only show the goals that are in a certain state. - :type filter: str + :param goal_id: Optional goal ID whose current alignment should be included in the results. Only pass a goal ID that belongs to the specified employee. If this endpoint returns 403 for an otherwise visible goal, report that alignment options are restricted by permissions rather than treating the goal ID as invalid. + :type goal_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1655,31 +1593,30 @@ def get_goals_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_goals_serialize( + _param = self._get_alignable_goal_options_serialize( employee_id=employee_id, - filter=filter, + goal_id=goal_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalsList", + _response_types_map: dict[str, str | None] = { + "200": "AlignmentOptionsResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_goals_serialize( + def _get_alignable_goal_options_serialize( self, employee_id, - filter, + goal_id, _request_auth, _content_type, _headers, @@ -1688,49 +1625,36 @@ def _get_goals_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters - if filter is not None: - - _query_params.append(('filter', filter)) - + if goal_id is not None: + _query_params.append(("goalId", goal_id)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/performance/employees/{employeeId}/goals', + method="GET", + resource_path="/api/v1/performance/employees/{employeeId}/goals/alignmentOptions", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1740,38 +1664,34 @@ def _get_goals_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_goals_aggregate_v1( + def get_goal_aggregate( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID used to generate the aggregate information.")], - filter: Annotated[Optional[StrictStr], Field(description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr, Field(description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[ + StrictStr | None, Field(description="goalId is the Goal ID used to generate the aggregate information.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GoalsAggregateV1: - """(Deprecated) Get Goals Aggregate + ) -> GoalAggregate: + """Get Goal Aggregate - Provides a list of all goals, type counts, goal comment counts, and employees shared with goals for the given employee. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. + Returns a single goal with its comments, alignment options, and a list of all persons who are either shared on the goal or have commented on it. Useful for rendering a full goal detail view in a single request. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str - :param filter: Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. - :type filter: str + :param goal_id: goalId is the Goal ID used to generate the aggregate information. (required) + :type goal_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1792,58 +1712,54 @@ def get_goals_aggregate_v1( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /api/v1/performance/employees/{employeeId}/goals/aggregate is deprecated.", DeprecationWarning) + """ - _param = self._get_goals_aggregate_v1_serialize( + _param = self._get_goal_aggregate_serialize( employee_id=employee_id, - filter=filter, + goal_id=goal_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalsAggregateV1", + _response_types_map: dict[str, str | None] = { + "200": "GoalAggregate", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_goals_aggregate_v1_with_http_info( + def get_goal_aggregate_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID used to generate the aggregate information.")], - filter: Annotated[Optional[StrictStr], Field(description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr, Field(description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[ + StrictStr | None, Field(description="goalId is the Goal ID used to generate the aggregate information.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GoalsAggregateV1]: - """(Deprecated) Get Goals Aggregate + ) -> ApiResponse[GoalAggregate]: + """Get Goal Aggregate - Provides a list of all goals, type counts, goal comment counts, and employees shared with goals for the given employee. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. + Returns a single goal with its comments, alignment options, and a list of all persons who are either shared on the goal or have commented on it. Useful for rendering a full goal detail view in a single request. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str - :param filter: Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. - :type filter: str + :param goal_id: goalId is the Goal ID used to generate the aggregate information. (required) + :type goal_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1864,58 +1780,54 @@ def get_goals_aggregate_v1_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /api/v1/performance/employees/{employeeId}/goals/aggregate is deprecated.", DeprecationWarning) + """ - _param = self._get_goals_aggregate_v1_serialize( + _param = self._get_goal_aggregate_serialize( employee_id=employee_id, - filter=filter, + goal_id=goal_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalsAggregateV1", + _response_types_map: dict[str, str | None] = { + "200": "GoalAggregate", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_goals_aggregate_v1_without_preload_content( + def get_goal_aggregate_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID used to generate the aggregate information.")], - filter: Annotated[Optional[StrictStr], Field(description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr, Field(description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[ + StrictStr | None, Field(description="goalId is the Goal ID used to generate the aggregate information.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Get Goals Aggregate + """Get Goal Aggregate - Provides a list of all goals, type counts, goal comment counts, and employees shared with goals for the given employee. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. + Returns a single goal with its comments, alignment options, and a list of all persons who are either shared on the goal or have commented on it. Useful for rendering a full goal detail view in a single request. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str - :param filter: Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. - :type filter: str + :param goal_id: goalId is the Goal ID used to generate the aggregate information. (required) + :type goal_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1936,32 +1848,29 @@ def get_goals_aggregate_v1_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /api/v1/performance/employees/{employeeId}/goals/aggregate is deprecated.", DeprecationWarning) + """ - _param = self._get_goals_aggregate_v1_serialize( + _param = self._get_goal_aggregate_serialize( employee_id=employee_id, - filter=filter, + goal_id=goal_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalsAggregateV1", + _response_types_map: dict[str, str | None] = { + "200": "GoalAggregate", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_goals_aggregate_v1_serialize( + def _get_goal_aggregate_serialize( self, employee_id, - filter, + goal_id, _request_auth, _content_type, _headers, @@ -1970,49 +1879,35 @@ def _get_goals_aggregate_v1_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id + if goal_id is not None: + _path_params["goalId"] = goal_id # process the query parameters - if filter is not None: - - _query_params.append(('filter', filter)) - # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/performance/employees/{employeeId}/goals/aggregate', + method="GET", + resource_path="/api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2022,38 +1917,30 @@ def _get_goals_aggregate_v1_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_goals_aggregate_v1_1( + def get_goal_creation_permission( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID used to generate the aggregate information.")], - filter: Annotated[Optional[StrictStr], Field(description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose goal creation permission is returned."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GoalsAggregateV11: - """(Deprecated) Get Goals Aggregate v1.1 + ) -> CanCreateGoalsResponse: + """Get Goal Creation Permission - Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Difference from Version 1: Returns goals in the closed filter and provides filter actions for each filter. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. + Determine if the authenticated caller has permission to create a goal for this employee. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) + :param employee_id: The internal employee ID of the employee whose goal creation permission is returned. (required) :type employee_id: str - :param filter: Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. - :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2074,58 +1961,49 @@ def get_goals_aggregate_v1_1( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate is deprecated.", DeprecationWarning) + """ - _param = self._get_goals_aggregate_v1_1_serialize( + _param = self._get_goal_creation_permission_serialize( employee_id=employee_id, - filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalsAggregateV11", + _response_types_map: dict[str, str | None] = { + "200": "CanCreateGoalsResponse", + "400": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_goals_aggregate_v1_1_with_http_info( + def get_goal_creation_permission_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID used to generate the aggregate information.")], - filter: Annotated[Optional[StrictStr], Field(description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose goal creation permission is returned."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GoalsAggregateV11]: - """(Deprecated) Get Goals Aggregate v1.1 + ) -> ApiResponse[CanCreateGoalsResponse]: + """Get Goal Creation Permission - Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Difference from Version 1: Returns goals in the closed filter and provides filter actions for each filter. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. + Determine if the authenticated caller has permission to create a goal for this employee. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) + :param employee_id: The internal employee ID of the employee whose goal creation permission is returned. (required) :type employee_id: str - :param filter: Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. - :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2146,58 +2024,49 @@ def get_goals_aggregate_v1_1_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate is deprecated.", DeprecationWarning) + """ - _param = self._get_goals_aggregate_v1_1_serialize( + _param = self._get_goal_creation_permission_serialize( employee_id=employee_id, - filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalsAggregateV11", + _response_types_map: dict[str, str | None] = { + "200": "CanCreateGoalsResponse", + "400": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_goals_aggregate_v1_1_without_preload_content( + def get_goal_creation_permission_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID used to generate the aggregate information.")], - filter: Annotated[Optional[StrictStr], Field(description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose goal creation permission is returned."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Get Goals Aggregate v1.1 + """Get Goal Creation Permission - Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Difference from Version 1: Returns goals in the closed filter and provides filter actions for each filter. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. + Determine if the authenticated caller has permission to create a goal for this employee. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) + :param employee_id: The internal employee ID of the employee whose goal creation permission is returned. (required) :type employee_id: str - :param filter: Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. - :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2218,32 +2087,27 @@ def get_goals_aggregate_v1_1_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate is deprecated.", DeprecationWarning) + """ - _param = self._get_goals_aggregate_v1_1_serialize( + _param = self._get_goal_creation_permission_serialize( employee_id=employee_id, - filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalsAggregateV11", + _response_types_map: dict[str, str | None] = { + "200": "CanCreateGoalsResponse", + "400": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_goals_aggregate_v1_1_serialize( + def _get_goal_creation_permission_serialize( self, employee_id, - filter, _request_auth, _content_type, _headers, @@ -2252,49 +2116,33 @@ def _get_goals_aggregate_v1_1_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters - if filter is not None: - - _query_params.append(('filter', filter)) - # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1_1/performance/employees/{employeeId}/goals/aggregate', + method="GET", + resource_path="/api/v1/performance/employees/{employeeId}/goals/canCreateGoals", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2304,36 +2152,36 @@ def _get_goals_aggregate_v1_1_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_goals_aggregate_v1_2( + def get_goals_aggregate_v1( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID used to generate the aggregate information.")], - filter: Annotated[Optional[StrictStr], Field(description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose goals are aggregated."), + ], + filter: Annotated[ + StrictStr | None, + Field( + description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GoalsAggregateV12: - """Get Goals Aggregate v1.2 + ) -> GoalsAggregateV1: + """(Deprecated) Get Goals Aggregate (v1) - Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Difference from Version 1.1: Returns all goals, including goals that contain milestones. + Deprecated. Use \"Get Goals Aggregate (v1.1)\" instead. Provides a list of all goals, type counts, goal comment counts, and employees shared with goals for the given employee. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee whose goals are aggregated. (required) + :type employee_id: str :param filter: Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. :type filter: str :param _request_timeout: timeout setting for this request. If one @@ -2356,55 +2204,58 @@ def get_goals_aggregate_v1_2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn( + "GET /api/v1/performance/employees/{employeeId}/goals/aggregate is deprecated.", DeprecationWarning + ) - _param = self._get_goals_aggregate_v1_2_serialize( + _param = self._get_goals_aggregate_v1_serialize( employee_id=employee_id, filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalsAggregateV12", + _response_types_map: dict[str, str | None] = { + "200": "GoalsAggregateV1", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_goals_aggregate_v1_2_with_http_info( + def get_goals_aggregate_v1_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID used to generate the aggregate information.")], - filter: Annotated[Optional[StrictStr], Field(description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose goals are aggregated."), + ], + filter: Annotated[ + StrictStr | None, + Field( + description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GoalsAggregateV12]: - """Get Goals Aggregate v1.2 + ) -> ApiResponse[GoalsAggregateV1]: + """(Deprecated) Get Goals Aggregate (v1) - Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Difference from Version 1.1: Returns all goals, including goals that contain milestones. + Deprecated. Use \"Get Goals Aggregate (v1.1)\" instead. Provides a list of all goals, type counts, goal comment counts, and employees shared with goals for the given employee. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee whose goals are aggregated. (required) + :type employee_id: str :param filter: Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. :type filter: str :param _request_timeout: timeout setting for this request. If one @@ -2427,55 +2278,58 @@ def get_goals_aggregate_v1_2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn( + "GET /api/v1/performance/employees/{employeeId}/goals/aggregate is deprecated.", DeprecationWarning + ) - _param = self._get_goals_aggregate_v1_2_serialize( + _param = self._get_goals_aggregate_v1_serialize( employee_id=employee_id, filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalsAggregateV12", + _response_types_map: dict[str, str | None] = { + "200": "GoalsAggregateV1", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_goals_aggregate_v1_2_without_preload_content( + def get_goals_aggregate_v1_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID used to generate the aggregate information.")], - filter: Annotated[Optional[StrictStr], Field(description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose goals are aggregated."), + ], + filter: Annotated[ + StrictStr | None, + Field( + description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Goals Aggregate v1.2 + """(Deprecated) Get Goals Aggregate (v1) - Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Difference from Version 1.1: Returns all goals, including goals that contain milestones. + Deprecated. Use \"Get Goals Aggregate (v1.1)\" instead. Provides a list of all goals, type counts, goal comment counts, and employees shared with goals for the given employee. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee whose goals are aggregated. (required) + :type employee_id: str :param filter: Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. :type filter: str :param _request_timeout: timeout setting for this request. If one @@ -2498,28 +2352,28 @@ def get_goals_aggregate_v1_2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn( + "GET /api/v1/performance/employees/{employeeId}/goals/aggregate is deprecated.", DeprecationWarning + ) - _param = self._get_goals_aggregate_v1_2_serialize( + _param = self._get_goals_aggregate_v1_serialize( employee_id=employee_id, filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalsAggregateV12", + _response_types_map: dict[str, str | None] = { + "200": "GoalsAggregateV1", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_goals_aggregate_v1_2_serialize( + def _get_goals_aggregate_v1_serialize( self, employee_id, filter, @@ -2531,49 +2385,36 @@ def _get_goals_aggregate_v1_2_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters if filter is not None: - - _query_params.append(('filter', filter)) - + _query_params.append(("filter", filter)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1_2/performance/employees/{employeeId}/goals/aggregate', + method="GET", + resource_path="/api/v1/performance/employees/{employeeId}/goals/aggregate", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2583,38 +2424,37 @@ def _get_goals_aggregate_v1_2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_goals_alignment_options( + def get_goals_aggregate_v11( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID to get alignable goal options for.")], - goal_id: Annotated[Optional[StrictInt], Field(description="Optional. When provided, the response includes the option currently aligned with this goal. If omitted, returns alignment options for the API user.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr, Field(description="The internal employee ID of the employee whose goals are aggregated.") + ], + filter: Annotated[ + StrictStr | None, + Field( + description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AlignmentOptionsResponse: - """Get Alignable Goal Options + ) -> GoalsAggregateV11: + """(Deprecated) Get Goals Aggregate (v1.1) - Get alignable goal options for an employee. + Deprecated. Use \"Get Goals Aggregate (v1.2)\" instead. Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Note: Compared to \"Get Goals Aggregate (v1)\", this version returns goals in the closed filter and provides filter actions for each filter. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to get alignable goal options for. (required) + :param employee_id: The internal employee ID of the employee whose goals are aggregated. (required) :type employee_id: str - :param goal_id: Optional. When provided, the response includes the option currently aligned with this goal. If omitted, returns alignment options for the API user. - :type goal_id: int + :param filter: Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. + :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2635,60 +2475,59 @@ def get_goals_alignment_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn( + "GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate is deprecated.", DeprecationWarning + ) - _param = self._get_goals_alignment_options_serialize( + _param = self._get_goals_aggregate_v11_serialize( employee_id=employee_id, - goal_id=goal_id, + filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "AlignmentOptionsResponse", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalsAggregateV11", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_goals_alignment_options_with_http_info( + def get_goals_aggregate_v11_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID to get alignable goal options for.")], - goal_id: Annotated[Optional[StrictInt], Field(description="Optional. When provided, the response includes the option currently aligned with this goal. If omitted, returns alignment options for the API user.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr, Field(description="The internal employee ID of the employee whose goals are aggregated.") + ], + filter: Annotated[ + StrictStr | None, + Field( + description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AlignmentOptionsResponse]: - """Get Alignable Goal Options + ) -> ApiResponse[GoalsAggregateV11]: + """(Deprecated) Get Goals Aggregate (v1.1) - Get alignable goal options for an employee. + Deprecated. Use \"Get Goals Aggregate (v1.2)\" instead. Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Note: Compared to \"Get Goals Aggregate (v1)\", this version returns goals in the closed filter and provides filter actions for each filter. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to get alignable goal options for. (required) + :param employee_id: The internal employee ID of the employee whose goals are aggregated. (required) :type employee_id: str - :param goal_id: Optional. When provided, the response includes the option currently aligned with this goal. If omitted, returns alignment options for the API user. - :type goal_id: int + :param filter: Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. + :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2709,60 +2548,59 @@ def get_goals_alignment_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn( + "GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate is deprecated.", DeprecationWarning + ) - _param = self._get_goals_alignment_options_serialize( + _param = self._get_goals_aggregate_v11_serialize( employee_id=employee_id, - goal_id=goal_id, + filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "AlignmentOptionsResponse", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalsAggregateV11", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_goals_alignment_options_without_preload_content( + def get_goals_aggregate_v11_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID to get alignable goal options for.")], - goal_id: Annotated[Optional[StrictInt], Field(description="Optional. When provided, the response includes the option currently aligned with this goal. If omitted, returns alignment options for the API user.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr, Field(description="The internal employee ID of the employee whose goals are aggregated.") + ], + filter: Annotated[ + StrictStr | None, + Field( + description="Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Alignable Goal Options + """(Deprecated) Get Goals Aggregate (v1.1) - Get alignable goal options for an employee. + Deprecated. Use \"Get Goals Aggregate (v1.2)\" instead. Provides a list of all goals, type counts, filter actions, goal comment counts, and employees shared with goals for the given employee. Note: Compared to \"Get Goals Aggregate (v1)\", this version returns goals in the closed filter and provides filter actions for each filter. This version of the endpoint will not return any goals with milestones. Milestone functionality for this endpoint begins in version 1.2. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to get alignable goal options for. (required) + :param employee_id: The internal employee ID of the employee whose goals are aggregated. (required) :type employee_id: str - :param goal_id: Optional. When provided, the response includes the option currently aligned with this goal. If omitted, returns alignment options for the API user. - :type goal_id: int + :param filter: Filter goals by status. Accepts filter IDs returned by the filters endpoint (e.g. status-inProgress). If omitted or invalid, defaults to the first available filter. The API accepts arbitrary strings and returns 200. + :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2783,34 +2621,31 @@ def get_goals_alignment_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn( + "GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate is deprecated.", DeprecationWarning + ) - _param = self._get_goals_alignment_options_serialize( + _param = self._get_goals_aggregate_v11_serialize( employee_id=employee_id, - goal_id=goal_id, + filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "AlignmentOptionsResponse", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalsAggregateV11", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_goals_alignment_options_serialize( + def _get_goals_aggregate_v11_serialize( self, employee_id, - goal_id, + filter, _request_auth, _content_type, _headers, @@ -2819,49 +2654,36 @@ def _get_goals_alignment_options_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters - if goal_id is not None: - - _query_params.append(('goalId', goal_id)) - + if filter is not None: + _query_params.append(("filter", filter)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/performance/employees/{employeeId}/goals/alignmentOptions', + method="GET", + resource_path="/api/v1_1/performance/employees/{employeeId}/goals/aggregate", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2871,35 +2693,37 @@ def _get_goals_alignment_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_goals_filters_v1( + def get_goals_aggregate_v12( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee whose goals are aggregated.") + ], + filter: Annotated[ + StrictStr | None, + Field( + description="Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GoalFiltersV1: - """(Deprecated) Get Goal Filters + ) -> GoalsAggregateV12: + """Get Goals Aggregate (v1.2) - Get the number of goals per status for an employee. + Provides a goals dashboard for an employee: goals matching the selected filter, status filter counts/actions, comment counts, and people shared with or commenting on those goals. This v1.2 endpoint includes milestone-based goals in the returned goal list. Use the optional `filter` query parameter to control which statuses are included; use `status-all` when the user asks for a complete dashboard across active, completed, and closed goals. Note: Compared to \"Get Goals Aggregate (v1.1)\", this version returns goals that contain milestones. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee whose goals are aggregated. (required) + :type employee_id: str + :param filter: Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list. + :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2920,56 +2744,56 @@ def get_goals_filters_v1( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /api/v1/performance/employees/{employeeId}/goals/filters is deprecated.", DeprecationWarning) + """ - _param = self._get_goals_filters_v1_serialize( + _param = self._get_goals_aggregate_v12_serialize( employee_id=employee_id, + filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalFiltersV1", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalsAggregateV12", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_goals_filters_v1_with_http_info( + def get_goals_aggregate_v12_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee whose goals are aggregated.") + ], + filter: Annotated[ + StrictStr | None, + Field( + description="Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GoalFiltersV1]: - """(Deprecated) Get Goal Filters + ) -> ApiResponse[GoalsAggregateV12]: + """Get Goals Aggregate (v1.2) - Get the number of goals per status for an employee. + Provides a goals dashboard for an employee: goals matching the selected filter, status filter counts/actions, comment counts, and people shared with or commenting on those goals. This v1.2 endpoint includes milestone-based goals in the returned goal list. Use the optional `filter` query parameter to control which statuses are included; use `status-all` when the user asks for a complete dashboard across active, completed, and closed goals. Note: Compared to \"Get Goals Aggregate (v1.1)\", this version returns goals that contain milestones. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee whose goals are aggregated. (required) + :type employee_id: str + :param filter: Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list. + :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2990,56 +2814,56 @@ def get_goals_filters_v1_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /api/v1/performance/employees/{employeeId}/goals/filters is deprecated.", DeprecationWarning) + """ - _param = self._get_goals_filters_v1_serialize( + _param = self._get_goals_aggregate_v12_serialize( employee_id=employee_id, + filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalFiltersV1", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalsAggregateV12", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_goals_filters_v1_without_preload_content( + def get_goals_aggregate_v12_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee whose goals are aggregated.") + ], + filter: Annotated[ + StrictStr | None, + Field( + description="Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Get Goal Filters + """Get Goals Aggregate (v1.2) - Get the number of goals per status for an employee. + Provides a goals dashboard for an employee: goals matching the selected filter, status filter counts/actions, comment counts, and people shared with or commenting on those goals. This v1.2 endpoint includes milestone-based goals in the returned goal list. Use the optional `filter` query parameter to control which statuses are included; use `status-all` when the user asks for a complete dashboard across active, completed, and closed goals. Note: Compared to \"Get Goals Aggregate (v1.1)\", this version returns goals that contain milestones. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee whose goals are aggregated. (required) + :type employee_id: str + :param filter: Optional status filter for the goals collection in the aggregate response. Use `status-all` for a full dashboard across statuses; otherwise pass `status-inProgress`, `status-completed`, or `status-closed`. If omitted or invalid, defaults to the first available filter. The response's `filters` counts may include statuses beyond the selected goal list. + :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3060,32 +2884,28 @@ def get_goals_filters_v1_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /api/v1/performance/employees/{employeeId}/goals/filters is deprecated.", DeprecationWarning) + """ - _param = self._get_goals_filters_v1_serialize( + _param = self._get_goals_aggregate_v12_serialize( employee_id=employee_id, + filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalFiltersV1", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalsAggregateV12", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_goals_filters_v1_serialize( + def _get_goals_aggregate_v12_serialize( self, employee_id, + filter, _request_auth, _content_type, _headers, @@ -3094,45 +2914,36 @@ def _get_goals_filters_v1_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters + if filter is not None: + _query_params.append(("filter", filter)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/performance/employees/{employeeId}/goals/filters', + method="GET", + resource_path="/api/v1_2/performance/employees/{employeeId}/goals/aggregate", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3142,34 +2953,29 @@ def _get_goals_filters_v1_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_goals_filters_v1_1( + def get_goals_filters_v1( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee the goals are assigned to."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GoalFiltersV11: - """(Deprecated) Get Goal Filters v1.1 + ) -> GoalFiltersV1: + """(Deprecated) Get Goal Filters (v1) - Get the number of goals per status for an employee. Difference from Version 1: Includes actions. + Deprecated. Use \"Get Goal Filters (v1.1)\" instead. Get the number of goals per status for an employee. Returns a count of goals in each status (In Progress, Completed) for the specified employee. Goals with milestones are excluded from counts in this version. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: The internal employee ID of the employee the goals are assigned to. (required) :type employee_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3191,55 +2997,49 @@ def get_goals_filters_v1_1( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /api/v1_1/performance/employees/{employeeId}/goals/filters is deprecated.", DeprecationWarning) + """ + warnings.warn("GET /api/v1/performance/employees/{employeeId}/goals/filters is deprecated.", DeprecationWarning) - _param = self._get_goals_filters_v1_1_serialize( + _param = self._get_goals_filters_v1_serialize( employee_id=employee_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalFiltersV11", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalFiltersV1", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_goals_filters_v1_1_with_http_info( + def get_goals_filters_v1_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee the goals are assigned to."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GoalFiltersV11]: - """(Deprecated) Get Goal Filters v1.1 + ) -> ApiResponse[GoalFiltersV1]: + """(Deprecated) Get Goal Filters (v1) - Get the number of goals per status for an employee. Difference from Version 1: Includes actions. + Deprecated. Use \"Get Goal Filters (v1.1)\" instead. Get the number of goals per status for an employee. Returns a count of goals in each status (In Progress, Completed) for the specified employee. Goals with milestones are excluded from counts in this version. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: The internal employee ID of the employee the goals are assigned to. (required) :type employee_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3261,55 +3061,49 @@ def get_goals_filters_v1_1_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /api/v1_1/performance/employees/{employeeId}/goals/filters is deprecated.", DeprecationWarning) + """ + warnings.warn("GET /api/v1/performance/employees/{employeeId}/goals/filters is deprecated.", DeprecationWarning) - _param = self._get_goals_filters_v1_1_serialize( + _param = self._get_goals_filters_v1_serialize( employee_id=employee_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalFiltersV11", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalFiltersV1", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_goals_filters_v1_1_without_preload_content( + def get_goals_filters_v1_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee the goals are assigned to."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Get Goal Filters v1.1 + """(Deprecated) Get Goal Filters (v1) - Get the number of goals per status for an employee. Difference from Version 1: Includes actions. + Deprecated. Use \"Get Goal Filters (v1.1)\" instead. Get the number of goals per status for an employee. Returns a count of goals in each status (In Progress, Completed) for the specified employee. Goals with milestones are excluded from counts in this version. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: The internal employee ID of the employee the goals are assigned to. (required) :type employee_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3331,30 +3125,26 @@ def get_goals_filters_v1_1_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /api/v1_1/performance/employees/{employeeId}/goals/filters is deprecated.", DeprecationWarning) + """ + warnings.warn("GET /api/v1/performance/employees/{employeeId}/goals/filters is deprecated.", DeprecationWarning) - _param = self._get_goals_filters_v1_1_serialize( + _param = self._get_goals_filters_v1_serialize( employee_id=employee_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalFiltersV11", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalFiltersV1", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_goals_filters_v1_1_serialize( + def _get_goals_filters_v1_serialize( self, employee_id, _request_auth, @@ -3365,45 +3155,33 @@ def _get_goals_filters_v1_1_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1_1/performance/employees/{employeeId}/goals/filters', + method="GET", + resource_path="/api/v1/performance/employees/{employeeId}/goals/filters", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3413,34 +3191,28 @@ def _get_goals_filters_v1_1_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_goals_filters_v1_2( + def get_goals_filters_v11( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt, Field(description="The internal employee ID of the employee the goals are assigned to.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GoalFiltersV11: - """Get Goal Status Counts v1.2 + """(Deprecated) Get Goal Filters (v1.1) - Get the number of goals per status for an employee. Difference from Version 1_1: Returns goals with milestones. + Deprecated. Use \"Get Goal Filters (v1.2)\" instead. Get the number of goals per status for an employee. Note: Compared to \"Get Goal Filters (v1)\", this version includes actions. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: The internal employee ID of the employee the goals are assigned to. (required) :type employee_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3462,54 +3234,50 @@ def get_goals_filters_v1_2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn( + "GET /api/v1_1/performance/employees/{employeeId}/goals/filters is deprecated.", DeprecationWarning + ) - _param = self._get_goals_filters_v1_2_serialize( + _param = self._get_goals_filters_v11_serialize( employee_id=employee_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalFiltersV11", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalFiltersV11", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_goals_filters_v1_2_with_http_info( + def get_goals_filters_v11_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt, Field(description="The internal employee ID of the employee the goals are assigned to.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GoalFiltersV11]: - """Get Goal Status Counts v1.2 + """(Deprecated) Get Goal Filters (v1.1) - Get the number of goals per status for an employee. Difference from Version 1_1: Returns goals with milestones. + Deprecated. Use \"Get Goal Filters (v1.2)\" instead. Get the number of goals per status for an employee. Note: Compared to \"Get Goal Filters (v1)\", this version includes actions. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: The internal employee ID of the employee the goals are assigned to. (required) :type employee_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3531,54 +3299,50 @@ def get_goals_filters_v1_2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn( + "GET /api/v1_1/performance/employees/{employeeId}/goals/filters is deprecated.", DeprecationWarning + ) - _param = self._get_goals_filters_v1_2_serialize( + _param = self._get_goals_filters_v11_serialize( employee_id=employee_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalFiltersV11", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalFiltersV11", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_goals_filters_v1_2_without_preload_content( + def get_goals_filters_v11_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt, Field(description="The internal employee ID of the employee the goals are assigned to.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Goal Status Counts v1.2 + """(Deprecated) Get Goal Filters (v1.1) - Get the number of goals per status for an employee. Difference from Version 1_1: Returns goals with milestones. + Deprecated. Use \"Get Goal Filters (v1.2)\" instead. Get the number of goals per status for an employee. Note: Compared to \"Get Goal Filters (v1)\", this version includes actions. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: The internal employee ID of the employee the goals are assigned to. (required) :type employee_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3600,29 +3364,28 @@ def get_goals_filters_v1_2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn( + "GET /api/v1_1/performance/employees/{employeeId}/goals/filters is deprecated.", DeprecationWarning + ) - _param = self._get_goals_filters_v1_2_serialize( + _param = self._get_goals_filters_v11_serialize( employee_id=employee_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalFiltersV11", - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalFiltersV11", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_goals_filters_v1_2_serialize( + def _get_goals_filters_v11_serialize( self, employee_id, _request_auth, @@ -3633,45 +3396,33 @@ def _get_goals_filters_v1_2_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1_2/performance/employees/{employeeId}/goals/filters', + method="GET", + resource_path="/api/v1_1/performance/employees/{employeeId}/goals/filters", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3681,41 +3432,29 @@ def _get_goals_filters_v1_2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_goals_share_options( + def get_goals_filters_v12( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID to get sharing options for.")], - search: Annotated[StrictStr, Field(description="The search term used to filter employees returned. Will search name, employee ID and email.")], - limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of employees to return. Defaults to 10, maximum 100.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goals are assigned to.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ShareOptionsResponse: - """Get Available Goal Sharing Options + ) -> GoalFiltersV11: + """Get Goal Filters (v1.2) - Provides a list of employees with whom the specified employee\\'s goals may be shared. + Get the number of goals per status for an employee, including goals with milestones. Note: Compared to \"Get Goal Filters (v1.1)\", this version returns goals with milestones. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to get sharing options for. (required) + :param employee_id: The internal employee ID of the employee the goals are assigned to. (required) :type employee_id: str - :param search: The search term used to filter employees returned. Will search name, employee ID and email. (required) - :type search: str - :param limit: Maximum number of employees to return. Defaults to 10, maximum 100. - :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3736,63 +3475,48 @@ def get_goals_share_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_goals_share_options_serialize( + _param = self._get_goals_filters_v12_serialize( employee_id=employee_id, - search=search, - limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareOptionsResponse", - '400': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalFiltersV11", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_goals_share_options_with_http_info( + def get_goals_filters_v12_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID to get sharing options for.")], - search: Annotated[StrictStr, Field(description="The search term used to filter employees returned. Will search name, employee ID and email.")], - limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of employees to return. Defaults to 10, maximum 100.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goals are assigned to.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ShareOptionsResponse]: - """Get Available Goal Sharing Options + ) -> ApiResponse[GoalFiltersV11]: + """Get Goal Filters (v1.2) - Provides a list of employees with whom the specified employee\\'s goals may be shared. + Get the number of goals per status for an employee, including goals with milestones. Note: Compared to \"Get Goal Filters (v1.1)\", this version returns goals with milestones. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to get sharing options for. (required) + :param employee_id: The internal employee ID of the employee the goals are assigned to. (required) :type employee_id: str - :param search: The search term used to filter employees returned. Will search name, employee ID and email. (required) - :type search: str - :param limit: Maximum number of employees to return. Defaults to 10, maximum 100. - :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3813,63 +3537,48 @@ def get_goals_share_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_goals_share_options_serialize( + _param = self._get_goals_filters_v12_serialize( employee_id=employee_id, - search=search, - limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareOptionsResponse", - '400': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalFiltersV11", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_goals_share_options_without_preload_content( + def get_goals_filters_v12_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID to get sharing options for.")], - search: Annotated[StrictStr, Field(description="The search term used to filter employees returned. Will search name, employee ID and email.")], - limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of employees to return. Defaults to 10, maximum 100.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goals are assigned to.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Available Goal Sharing Options + """Get Goal Filters (v1.2) - Provides a list of employees with whom the specified employee\\'s goals may be shared. + Get the number of goals per status for an employee, including goals with milestones. Note: Compared to \"Get Goal Filters (v1.1)\", this version returns goals with milestones. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID to get sharing options for. (required) + :param employee_id: The internal employee ID of the employee the goals are assigned to. (required) :type employee_id: str - :param search: The search term used to filter employees returned. Will search name, employee ID and email. (required) - :type search: str - :param limit: Maximum number of employees to return. Defaults to 10, maximum 100. - :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3890,35 +3599,27 @@ def get_goals_share_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_goals_share_options_serialize( + _param = self._get_goals_filters_v12_serialize( employee_id=employee_id, - search=search, - limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareOptionsResponse", - '400': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalFiltersV11", + "403": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_goals_share_options_serialize( + def _get_goals_filters_v12_serialize( self, - employee_id, - search, - limit, + employee_id, _request_auth, _content_type, _headers, @@ -3927,53 +3628,33 @@ def _get_goals_share_options_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters - if search is not None: - - _query_params.append(('search', search)) - - if limit is not None: - - _query_params.append(('limit', limit)) - # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/performance/employees/{employeeId}/goals/shareOptions', + method="GET", + resource_path="/api/v1_2/performance/employees/{employeeId}/goals/filters", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3983,41 +3664,32 @@ def _get_goals_share_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def post_close_goal( + def list_goal_comments( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - body: Annotated[Optional[StrictStr], Field(description="Comment field is optional.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TransformedApiGoal: - """Close Goal + ) -> GoalCommentsResponse: + """List Goal Comments - Close a goal. + Returns comments for a goal, including each comment's ID, author, text, creation time, and edit/delete permissions. Use this endpoint before updating or deleting a comment when the user identifies a comment by text or says \"my comment\" rather than providing a comment ID. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str - :param body: Comment field is optional. - :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4038,64 +3710,52 @@ def post_close_goal( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._post_close_goal_serialize( + _param = self._list_goal_comments_serialize( employee_id=employee_id, goal_id=goal_id, - body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TransformedApiGoal", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalCommentsResponse", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def post_close_goal_with_http_info( + def list_goal_comments_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - body: Annotated[Optional[StrictStr], Field(description="Comment field is optional.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TransformedApiGoal]: - """Close Goal + ) -> ApiResponse[GoalCommentsResponse]: + """List Goal Comments - Close a goal. + Returns comments for a goal, including each comment's ID, author, text, creation time, and edit/delete permissions. Use this endpoint before updating or deleting a comment when the user identifies a comment by text or says \"my comment\" rather than providing a comment ID. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str - :param body: Comment field is optional. - :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4116,64 +3776,52 @@ def post_close_goal_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._post_close_goal_serialize( + _param = self._list_goal_comments_serialize( employee_id=employee_id, goal_id=goal_id, - body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TransformedApiGoal", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalCommentsResponse", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def post_close_goal_without_preload_content( + def list_goal_comments_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - body: Annotated[Optional[StrictStr], Field(description="Comment field is optional.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Close Goal + """List Goal Comments - Close a goal. + Returns comments for a goal, including each comment's ID, author, text, creation time, and edit/delete permissions. Use this endpoint before updating or deleting a comment when the user identifies a comment by text or says \"my comment\" rather than providing a comment ID. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str - :param body: Comment field is optional. - :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4194,36 +3842,29 @@ def post_close_goal_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._post_close_goal_serialize( + _param = self._list_goal_comments_serialize( employee_id=employee_id, goal_id=goal_id, - body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TransformedApiGoal", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalCommentsResponse", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _post_close_goal_serialize( + def _list_goal_comments_serialize( self, employee_id, goal_id, - body, _request_auth, _content_type, _headers, @@ -4232,62 +3873,35 @@ def _post_close_goal_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id if goal_id is not None: - _path_params['goalId'] = goal_id + _path_params["goalId"] = goal_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if body is not None: - _body_params = body - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/performance/employees/{employeeId}/goals/{goalId}/close', + method="GET", + resource_path="/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4297,38 +3911,44 @@ def _post_close_goal_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def post_goal( + def list_goal_share_options( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - post_goal_request: PostGoalRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose goal sharing options are returned."), + ], + search: Annotated[ + StrictStr | None, + Field( + description="The search term used to filter employees returned. Will search name, internal employee ID, and email." + ), + ], + limit: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=1)] | None, + Field(description="Maximum number of employees to return. Defaults to 10, maximum 100."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TransformedApiEmployeeGoalDetails: - """Create Goal + ) -> ShareOptionsResponse: + """List Goal Sharing Options - Create a new goal for an employee. + Provides a list of employees with whom the specified employee\\'s goals may be shared. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee whose goal sharing options are returned. (required) :type employee_id: str - :param post_goal_request: (required) - :type post_goal_request: PostGoalRequest + :param search: The search term used to filter employees returned. Will search name, internal employee ID, and email. (required) + :type search: str + :param limit: Maximum number of employees to return. Defaults to 10, maximum 100. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4349,60 +3969,65 @@ def post_goal( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._post_goal_serialize( + _param = self._list_goal_share_options_serialize( employee_id=employee_id, - post_goal_request=post_goal_request, + search=search, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "ShareOptionsResponse", + "400": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def post_goal_with_http_info( + def list_goal_share_options_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - post_goal_request: PostGoalRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose goal sharing options are returned."), + ], + search: Annotated[ + StrictStr | None, + Field( + description="The search term used to filter employees returned. Will search name, internal employee ID, and email." + ), + ], + limit: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=1)] | None, + Field(description="Maximum number of employees to return. Defaults to 10, maximum 100."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TransformedApiEmployeeGoalDetails]: - """Create Goal + ) -> ApiResponse[ShareOptionsResponse]: + """List Goal Sharing Options - Create a new goal for an employee. + Provides a list of employees with whom the specified employee\\'s goals may be shared. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee whose goal sharing options are returned. (required) :type employee_id: str - :param post_goal_request: (required) - :type post_goal_request: PostGoalRequest + :param search: The search term used to filter employees returned. Will search name, internal employee ID, and email. (required) + :type search: str + :param limit: Maximum number of employees to return. Defaults to 10, maximum 100. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4423,60 +4048,65 @@ def post_goal_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._post_goal_serialize( + _param = self._list_goal_share_options_serialize( employee_id=employee_id, - post_goal_request=post_goal_request, + search=search, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "ShareOptionsResponse", + "400": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def post_goal_without_preload_content( + def list_goal_share_options_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - post_goal_request: PostGoalRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose goal sharing options are returned."), + ], + search: Annotated[ + StrictStr | None, + Field( + description="The search term used to filter employees returned. Will search name, internal employee ID, and email." + ), + ], + limit: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=1)] | None, + Field(description="Maximum number of employees to return. Defaults to 10, maximum 100."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Goal + """List Goal Sharing Options - Create a new goal for an employee. + Provides a list of employees with whom the specified employee\\'s goals may be shared. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee whose goal sharing options are returned. (required) :type employee_id: str - :param post_goal_request: (required) - :type post_goal_request: PostGoalRequest + :param search: The search term used to filter employees returned. Will search name, internal employee ID, and email. (required) + :type search: str + :param limit: Maximum number of employees to return. Defaults to 10, maximum 100. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4497,34 +4127,31 @@ def post_goal_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._post_goal_serialize( + _param = self._list_goal_share_options_serialize( employee_id=employee_id, - post_goal_request=post_goal_request, + search=search, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "ShareOptionsResponse", + "400": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _post_goal_serialize( + def _list_goal_share_options_serialize( self, employee_id, - post_goal_request, + search, + limit, _request_auth, _content_type, _headers, @@ -4533,60 +4160,39 @@ def _post_goal_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters + if search is not None: + _query_params.append(("search", search)) + + if limit is not None: + _query_params.append(("limit", limit)) + # process the header parameters # process the form parameters # process the body parameter - if post_goal_request is not None: - _body_params = post_goal_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/performance/employees/{employeeId}/goals', + method="GET", + resource_path="/api/v1/performance/employees/{employeeId}/goals/shareOptions", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4596,41 +4202,38 @@ def _post_goal_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def post_goal_comment( + def list_goals( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - post_goal_comment_request: PostGoalCommentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee the goals are assigned to."), + ], + filter: Annotated[ + StrictStr | None, + Field( + description="Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GoalCommentResponse: - """Create Goal Comment + ) -> GoalsList: + """List Goals - Create a new goal comment. + Returns goals for an employee. Use this endpoint to locate goals by title before updating, commenting on, closing, reopening, or deleting them. Use `filter=status-inProgress` when the user asks for current/active goals, `filter=status-completed` for completed goals, `filter=status-closed` for closed goals, and `filter=status-all` when the user says \"all goals\", \"including closed\", or you are resolving a goal by title for a write operation where the status is unknown. If no filter is provided, closed goals are excluded. Results are capped at 50 goals; if a title lookup is ambiguous or absent, do not update or delete a different goal. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goals are assigned to. (required) :type employee_id: str - :param goal_id: goalId is the goal ID for the specified employee. (required) - :type goal_id: str - :param post_goal_comment_request: (required) - :type post_goal_comment_request: PostGoalCommentRequest + :param filter: Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission. + :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4651,63 +4254,57 @@ def post_goal_comment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._post_goal_comment_serialize( + _param = self._list_goals_serialize( employee_id=employee_id, - goal_id=goal_id, - post_goal_comment_request=post_goal_comment_request, + filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "GoalCommentResponse", - '400': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalsList", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def post_goal_comment_with_http_info( + def list_goals_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - post_goal_comment_request: PostGoalCommentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee the goals are assigned to."), + ], + filter: Annotated[ + StrictStr | None, + Field( + description="Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GoalCommentResponse]: - """Create Goal Comment + ) -> ApiResponse[GoalsList]: + """List Goals - Create a new goal comment. + Returns goals for an employee. Use this endpoint to locate goals by title before updating, commenting on, closing, reopening, or deleting them. Use `filter=status-inProgress` when the user asks for current/active goals, `filter=status-completed` for completed goals, `filter=status-closed` for closed goals, and `filter=status-all` when the user says \"all goals\", \"including closed\", or you are resolving a goal by title for a write operation where the status is unknown. If no filter is provided, closed goals are excluded. Results are capped at 50 goals; if a title lookup is ambiguous or absent, do not update or delete a different goal. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goals are assigned to. (required) :type employee_id: str - :param goal_id: goalId is the goal ID for the specified employee. (required) - :type goal_id: str - :param post_goal_comment_request: (required) - :type post_goal_comment_request: PostGoalCommentRequest + :param filter: Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission. + :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4728,63 +4325,57 @@ def post_goal_comment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._post_goal_comment_serialize( + _param = self._list_goals_serialize( employee_id=employee_id, - goal_id=goal_id, - post_goal_comment_request=post_goal_comment_request, + filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "GoalCommentResponse", - '400': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalsList", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def post_goal_comment_without_preload_content( + def list_goals_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - post_goal_comment_request: PostGoalCommentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee the goals are assigned to."), + ], + filter: Annotated[ + StrictStr | None, + Field( + description="Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Goal Comment + """List Goals - Create a new goal comment. + Returns goals for an employee. Use this endpoint to locate goals by title before updating, commenting on, closing, reopening, or deleting them. Use `filter=status-inProgress` when the user asks for current/active goals, `filter=status-completed` for completed goals, `filter=status-closed` for closed goals, and `filter=status-all` when the user says \"all goals\", \"including closed\", or you are resolving a goal by title for a write operation where the status is unknown. If no filter is provided, closed goals are excluded. Results are capped at 50 goals; if a title lookup is ambiguous or absent, do not update or delete a different goal. OAuth Scopes: goal - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goals are assigned to. (required) :type employee_id: str - :param goal_id: goalId is the goal ID for the specified employee. (required) - :type goal_id: str - :param post_goal_comment_request: (required) - :type post_goal_comment_request: PostGoalCommentRequest + :param filter: Goal status filter. Use `status-inProgress` for current active goals, `status-completed` for completed goals, `status-closed` for closed goals, and `status-all` when locating a goal by title for update/delete/reopen or when the user asks for all goals. If omitted, closed goals are excluded. Unrecognized values behave like omission. + :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4805,35 +4396,28 @@ def post_goal_comment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._post_goal_comment_serialize( + _param = self._list_goals_serialize( employee_id=employee_id, - goal_id=goal_id, - post_goal_comment_request=post_goal_comment_request, + filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "GoalCommentResponse", - '400': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalsList", + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _post_goal_comment_serialize( + def _list_goals_serialize( self, employee_id, - goal_id, - post_goal_comment_request, + filter, _request_auth, _content_type, _headers, @@ -4842,62 +4426,36 @@ def _post_goal_comment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id - if goal_id is not None: - _path_params['goalId'] = goal_id + _path_params["employeeId"] = employee_id # process the query parameters + if filter is not None: + _query_params.append(("filter", filter)) + # process the header parameters # process the form parameters # process the body parameter - if post_goal_comment_request is not None: - _body_params = post_goal_comment_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments', + method="GET", + resource_path="/api/v1/performance/employees/{employeeId}/goals", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4907,35 +4465,29 @@ def _post_goal_comment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def post_reopen_goal( + def reopen_goal( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TransformedApiGoal: + ) -> GoalResponse: """Reopen Goal - Reopen a goal. + Reopens a closed goal, returning it to the in-progress status. Returns the updated goal object. Validate the result using the returned `status` and `percentComplete` fields; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str @@ -4959,57 +4511,50 @@ def post_reopen_goal( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._post_reopen_goal_serialize( + _param = self._reopen_goal_serialize( employee_id=employee_id, goal_id=goal_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TransformedApiGoal", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "201": "GoalResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def post_reopen_goal_with_http_info( + def reopen_goal_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TransformedApiGoal]: + ) -> ApiResponse[GoalResponse]: """Reopen Goal - Reopen a goal. + Reopens a closed goal, returning it to the in-progress status. Returns the updated goal object. Validate the result using the returned `status` and `percentComplete` fields; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str @@ -5033,57 +4578,50 @@ def post_reopen_goal_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._post_reopen_goal_serialize( + _param = self._reopen_goal_serialize( employee_id=employee_id, goal_id=goal_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TransformedApiGoal", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "201": "GoalResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def post_reopen_goal_without_preload_content( + def reopen_goal_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Reopen Goal - Reopen a goal. + Reopens a closed goal, returning it to the in-progress status. Returns the updated goal object. Validate the result using the returned `status` and `percentComplete` fields; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str @@ -5107,31 +4645,27 @@ def post_reopen_goal_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._post_reopen_goal_serialize( + _param = self._reopen_goal_serialize( employee_id=employee_id, goal_id=goal_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TransformedApiGoal", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "201": "GoalResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _post_reopen_goal_serialize( + def _reopen_goal_serialize( self, employee_id, goal_id, @@ -5143,47 +4677,35 @@ def _post_reopen_goal_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id if goal_id is not None: - _path_params['goalId'] = goal_id + _path_params["goalId"] = goal_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen', + method="POST", + resource_path="/api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5193,44 +4715,40 @@ def _post_reopen_goal_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def put_goal_comment( + def update_goal_comment( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - comment_id: Annotated[StrictStr, Field(description="commentId is the comment ID for the specified goal.")], - put_goal_comment_request: PutGoalCommentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + comment_id: Annotated[ + StrictStr | None, Field(description="commentId is the comment ID for the specified goal.") + ], + update_goal_comment_request: UpdateGoalCommentRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GoalCommentResponse: """Update Goal Comment - Update a goal comment. + Updates the text of an existing goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns the updated comment object. If the user does not provide a comment ID, first call `list-goal-comments` and select a single editable comment (`canEdit` is true) matching the user's description. If multiple comments match or none are editable, do not update; ask for clarification. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str :param comment_id: commentId is the comment ID for the specified goal. (required) :type comment_id: str - :param put_goal_comment_request: (required) - :type put_goal_comment_request: PutGoalCommentRequest + :param update_goal_comment_request: (required) + :type update_goal_comment_request: UpdateGoalCommentRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5251,68 +4769,63 @@ def put_goal_comment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_comment_serialize( + _param = self._update_goal_comment_serialize( employee_id=employee_id, goal_id=goal_id, comment_id=comment_id, - put_goal_comment_request=put_goal_comment_request, + update_goal_comment_request=update_goal_comment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalCommentResponse", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalCommentResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def put_goal_comment_with_http_info( + def update_goal_comment_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - comment_id: Annotated[StrictStr, Field(description="commentId is the comment ID for the specified goal.")], - put_goal_comment_request: PutGoalCommentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + comment_id: Annotated[ + StrictStr | None, Field(description="commentId is the comment ID for the specified goal.") + ], + update_goal_comment_request: UpdateGoalCommentRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GoalCommentResponse]: """Update Goal Comment - Update a goal comment. + Updates the text of an existing goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns the updated comment object. If the user does not provide a comment ID, first call `list-goal-comments` and select a single editable comment (`canEdit` is true) matching the user's description. If multiple comments match or none are editable, do not update; ask for clarification. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str :param comment_id: commentId is the comment ID for the specified goal. (required) :type comment_id: str - :param put_goal_comment_request: (required) - :type put_goal_comment_request: PutGoalCommentRequest + :param update_goal_comment_request: (required) + :type update_goal_comment_request: UpdateGoalCommentRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5333,68 +4846,63 @@ def put_goal_comment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_comment_serialize( + _param = self._update_goal_comment_serialize( employee_id=employee_id, goal_id=goal_id, comment_id=comment_id, - put_goal_comment_request=put_goal_comment_request, + update_goal_comment_request=update_goal_comment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalCommentResponse", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalCommentResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def put_goal_comment_without_preload_content( + def update_goal_comment_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - comment_id: Annotated[StrictStr, Field(description="commentId is the comment ID for the specified goal.")], - put_goal_comment_request: PutGoalCommentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + comment_id: Annotated[ + StrictStr | None, Field(description="commentId is the comment ID for the specified goal.") + ], + update_goal_comment_request: UpdateGoalCommentRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Goal Comment - Update a goal comment. + Updates the text of an existing goal comment. The comment must belong to the specified goal, and the goal must belong to the specified employee. Returns the updated comment object. If the user does not provide a comment ID, first call `list-goal-comments` and select a single editable comment (`canEdit` is true) matching the user's description. If multiple comments match or none are editable, do not update; ask for clarification. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str :param comment_id: commentId is the comment ID for the specified goal. (required) :type comment_id: str - :param put_goal_comment_request: (required) - :type put_goal_comment_request: PutGoalCommentRequest + :param update_goal_comment_request: (required) + :type update_goal_comment_request: UpdateGoalCommentRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5415,38 +4923,34 @@ def put_goal_comment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_comment_serialize( + _param = self._update_goal_comment_serialize( employee_id=employee_id, goal_id=goal_id, comment_id=comment_id, - put_goal_comment_request=put_goal_comment_request, + update_goal_comment_request=update_goal_comment_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GoalCommentResponse", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalCommentResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _put_goal_comment_serialize( + def _update_goal_comment_serialize( self, employee_id, goal_id, comment_id, - put_goal_comment_request, + update_goal_comment_request, _request_auth, _content_type, _headers, @@ -5455,64 +4959,47 @@ def _put_goal_comment_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id if goal_id is not None: - _path_params['goalId'] = goal_id + _path_params["goalId"] = goal_id if comment_id is not None: - _path_params['commentId'] = comment_id + _path_params["commentId"] = comment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if put_goal_comment_request is not None: - _body_params = put_goal_comment_request - + if update_goal_comment_request is not None: + _body_params = update_goal_comment_request # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId}', + method="PUT", + resource_path="/api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5522,44 +5009,40 @@ def _put_goal_comment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def put_goal_milestone_progress( + def update_goal_milestone_progress( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - milestone_id: Annotated[StrictStr, Field(description="milestoneId is the milestone ID for the specified goal.")], - put_goal_milestone_progress_request: PutGoalMilestoneProgressRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr, Field(description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[StrictStr | None, Field(description="goalId is the goal ID for the specified employee.")], + milestone_id: Annotated[ + StrictStr | None, Field(description="milestoneId is the milestone ID for the specified goal.") + ], + update_goal_milestone_progress_request: UpdateGoalMilestoneProgressRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TransformedApiEmployeeGoalDetails: """Update Milestone Progress - Update the progress of a milestone in a goal. + Update the progress of a milestone in a goal. Validate the result using returned domain fields such as the milestone's `completedDateTime`, plus the goal's `status` and `percentComplete`; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str :param milestone_id: milestoneId is the milestone ID for the specified goal. (required) :type milestone_id: str - :param put_goal_milestone_progress_request: (required) - :type put_goal_milestone_progress_request: PutGoalMilestoneProgressRequest + :param update_goal_milestone_progress_request: (required) + :type update_goal_milestone_progress_request: UpdateGoalMilestoneProgressRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5580,69 +5063,64 @@ def put_goal_milestone_progress( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_milestone_progress_serialize( + _param = self._update_goal_milestone_progress_serialize( employee_id=employee_id, goal_id=goal_id, milestone_id=milestone_id, - put_goal_milestone_progress_request=put_goal_milestone_progress_request, + update_goal_milestone_progress_request=update_goal_milestone_progress_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def put_goal_milestone_progress_with_http_info( + def update_goal_milestone_progress_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - milestone_id: Annotated[StrictStr, Field(description="milestoneId is the milestone ID for the specified goal.")], - put_goal_milestone_progress_request: PutGoalMilestoneProgressRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr, Field(description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[StrictStr | None, Field(description="goalId is the goal ID for the specified employee.")], + milestone_id: Annotated[ + StrictStr | None, Field(description="milestoneId is the milestone ID for the specified goal.") + ], + update_goal_milestone_progress_request: UpdateGoalMilestoneProgressRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TransformedApiEmployeeGoalDetails]: """Update Milestone Progress - Update the progress of a milestone in a goal. + Update the progress of a milestone in a goal. Validate the result using returned domain fields such as the milestone's `completedDateTime`, plus the goal's `status` and `percentComplete`; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str :param milestone_id: milestoneId is the milestone ID for the specified goal. (required) :type milestone_id: str - :param put_goal_milestone_progress_request: (required) - :type put_goal_milestone_progress_request: PutGoalMilestoneProgressRequest + :param update_goal_milestone_progress_request: (required) + :type update_goal_milestone_progress_request: UpdateGoalMilestoneProgressRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5663,69 +5141,64 @@ def put_goal_milestone_progress_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_milestone_progress_serialize( + _param = self._update_goal_milestone_progress_serialize( employee_id=employee_id, goal_id=goal_id, milestone_id=milestone_id, - put_goal_milestone_progress_request=put_goal_milestone_progress_request, + update_goal_milestone_progress_request=update_goal_milestone_progress_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def put_goal_milestone_progress_without_preload_content( + def update_goal_milestone_progress_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID to whom the goals are assigned.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - milestone_id: Annotated[StrictStr, Field(description="milestoneId is the milestone ID for the specified goal.")], - put_goal_milestone_progress_request: PutGoalMilestoneProgressRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr, Field(description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[StrictStr | None, Field(description="goalId is the goal ID for the specified employee.")], + milestone_id: Annotated[ + StrictStr | None, Field(description="milestoneId is the milestone ID for the specified goal.") + ], + update_goal_milestone_progress_request: UpdateGoalMilestoneProgressRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Milestone Progress - Update the progress of a milestone in a goal. + Update the progress of a milestone in a goal. Validate the result using returned domain fields such as the milestone's `completedDateTime`, plus the goal's `status` and `percentComplete`; do not rely solely on `lastChangedDateTime` as the confirmation timestamp, because it may not match the HTTP response time or may reflect BambooHR's internal timezone/update semantics. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str :param milestone_id: milestoneId is the milestone ID for the specified goal. (required) :type milestone_id: str - :param put_goal_milestone_progress_request: (required) - :type put_goal_milestone_progress_request: PutGoalMilestoneProgressRequest + :param update_goal_milestone_progress_request: (required) + :type update_goal_milestone_progress_request: UpdateGoalMilestoneProgressRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5746,39 +5219,35 @@ def put_goal_milestone_progress_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_milestone_progress_serialize( + _param = self._update_goal_milestone_progress_serialize( employee_id=employee_id, goal_id=goal_id, milestone_id=milestone_id, - put_goal_milestone_progress_request=put_goal_milestone_progress_request, + update_goal_milestone_progress_request=update_goal_milestone_progress_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _put_goal_milestone_progress_serialize( + def _update_goal_milestone_progress_serialize( self, employee_id, goal_id, milestone_id, - put_goal_milestone_progress_request, + update_goal_milestone_progress_request, _request_auth, _content_type, _headers, @@ -5787,64 +5256,47 @@ def _put_goal_milestone_progress_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id if goal_id is not None: - _path_params['goalId'] = goal_id + _path_params["goalId"] = goal_id if milestone_id is not None: - _path_params['milestoneId'] = milestone_id + _path_params["milestoneId"] = milestone_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if put_goal_milestone_progress_request is not None: - _body_params = put_goal_milestone_progress_request - + if update_goal_milestone_progress_request is not None: + _body_params = update_goal_milestone_progress_request # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress', + method="PUT", + resource_path="/api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5854,41 +5306,40 @@ def _put_goal_milestone_progress_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def put_goal_progress( + def update_goal_progress( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictInt, Field(description="goalId is the goal ID for the specified employee.")], - put_goal_progress_request: Annotated[PutGoalProgressRequest, Field(description="Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\".")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + update_goal_progress_request: Annotated[ + UpdateGoalProgressRequest, + Field( + description="The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TransformedApiEmployeeGoalDetails: """Update Goal Progress - Update the progress percentage of an individual goal. + Update the progress percentage of a simple, non-milestone goal. Do not use this endpoint for goals that contain milestones; BambooHR derives percent complete for milestone-based goals from milestone completion and will reject manual percent updates with a 400 response (`UPDATE_GOAL_WITH_MILESTONE_PROGRESS_ERROR`). For milestone-based goals, use `update-goal-milestone-progress` to mark individual milestones complete or incomplete. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) + :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) - :type goal_id: int - :param put_goal_progress_request: Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - :type put_goal_progress_request: PutGoalProgressRequest + :type goal_id: str + :param update_goal_progress_request: The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead. (required) + :type update_goal_progress_request: UpdateGoalProgressRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5909,64 +5360,62 @@ def put_goal_progress( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_progress_serialize( + _param = self._update_goal_progress_serialize( employee_id=employee_id, goal_id=goal_id, - put_goal_progress_request=put_goal_progress_request, + update_goal_progress_request=update_goal_progress_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def put_goal_progress_with_http_info( + def update_goal_progress_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictInt, Field(description="goalId is the goal ID for the specified employee.")], - put_goal_progress_request: Annotated[PutGoalProgressRequest, Field(description="Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\".")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + update_goal_progress_request: Annotated[ + UpdateGoalProgressRequest, + Field( + description="The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TransformedApiEmployeeGoalDetails]: """Update Goal Progress - Update the progress percentage of an individual goal. + Update the progress percentage of a simple, non-milestone goal. Do not use this endpoint for goals that contain milestones; BambooHR derives percent complete for milestone-based goals from milestone completion and will reject manual percent updates with a 400 response (`UPDATE_GOAL_WITH_MILESTONE_PROGRESS_ERROR`). For milestone-based goals, use `update-goal-milestone-progress` to mark individual milestones complete or incomplete. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) + :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) - :type goal_id: int - :param put_goal_progress_request: Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - :type put_goal_progress_request: PutGoalProgressRequest + :type goal_id: str + :param update_goal_progress_request: The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead. (required) + :type update_goal_progress_request: UpdateGoalProgressRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5987,64 +5436,62 @@ def put_goal_progress_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_progress_serialize( + _param = self._update_goal_progress_serialize( employee_id=employee_id, goal_id=goal_id, - put_goal_progress_request=put_goal_progress_request, + update_goal_progress_request=update_goal_progress_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def put_goal_progress_without_preload_content( + def update_goal_progress_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictInt, Field(description="goalId is the goal ID for the specified employee.")], - put_goal_progress_request: Annotated[PutGoalProgressRequest, Field(description="Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\".")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + update_goal_progress_request: Annotated[ + UpdateGoalProgressRequest, + Field( + description="The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Goal Progress - Update the progress percentage of an individual goal. + Update the progress percentage of a simple, non-milestone goal. Do not use this endpoint for goals that contain milestones; BambooHR derives percent complete for milestone-based goals from milestone completion and will reject manual percent updates with a 400 response (`UPDATE_GOAL_WITH_MILESTONE_PROGRESS_ERROR`). For milestone-based goals, use `update-goal-milestone-progress` to mark individual milestones complete or incomplete. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) + :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) - :type goal_id: int - :param put_goal_progress_request: Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - :type put_goal_progress_request: PutGoalProgressRequest + :type goal_id: str + :param update_goal_progress_request: The updated progress for a simple goal. Provide `percentComplete` from 0–100. When `percentComplete` is 100, provide `completionDate`; when less than 100, omit `completionDate` or set it to null. This endpoint is rejected for goals with milestones — use `update-goal-milestone-progress` instead. (required) + :type update_goal_progress_request: UpdateGoalProgressRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6065,36 +5512,32 @@ def put_goal_progress_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_progress_serialize( + _param = self._update_goal_progress_serialize( employee_id=employee_id, goal_id=goal_id, - put_goal_progress_request=put_goal_progress_request, + update_goal_progress_request=update_goal_progress_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _put_goal_progress_serialize( + def _update_goal_progress_serialize( self, employee_id, goal_id, - put_goal_progress_request, + update_goal_progress_request, _request_auth, _content_type, _headers, @@ -6103,62 +5546,45 @@ def _put_goal_progress_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id if goal_id is not None: - _path_params['goalId'] = goal_id + _path_params["goalId"] = goal_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if put_goal_progress_request is not None: - _body_params = put_goal_progress_request - + if update_goal_progress_request is not None: + _body_params = update_goal_progress_request # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress', + method="PUT", + resource_path="/api/v1/performance/employees/{employeeId}/goals/{goalId}/progress", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6168,41 +5594,40 @@ def _put_goal_progress_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def put_goal_shared_with( + def update_goal_sharing( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - put_goal_shared_with_request: Annotated[PutGoalSharedWithRequest, Field(description="Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\".")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + update_goal_sharing_request: Annotated[ + UpdateGoalSharingRequest, + Field( + description='Internal employee IDs of employees with whom the goal is shared. All goal owners are considered "shared with".' + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TransformedApiGoal: + ) -> GoalResponse: """Update Goal Sharing - Updates which employees this goal is shared with. + Replaces the full list of employees this goal is shared with. The provided `sharedWithEmployeeIds` array must include the goal owner's internal employee ID. Returns the updated goal object. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str - :param put_goal_shared_with_request: Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - :type put_goal_shared_with_request: PutGoalSharedWithRequest + :param update_goal_sharing_request: Internal employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) + :type update_goal_sharing_request: UpdateGoalSharingRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6223,64 +5648,62 @@ def put_goal_shared_with( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_shared_with_serialize( + _param = self._update_goal_sharing_serialize( employee_id=employee_id, goal_id=goal_id, - put_goal_shared_with_request=put_goal_shared_with_request, + update_goal_sharing_request=update_goal_sharing_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiGoal", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def put_goal_shared_with_with_http_info( + def update_goal_sharing_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - put_goal_shared_with_request: Annotated[PutGoalSharedWithRequest, Field(description="Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\".")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + update_goal_sharing_request: Annotated[ + UpdateGoalSharingRequest, + Field( + description='Internal employee IDs of employees with whom the goal is shared. All goal owners are considered "shared with".' + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TransformedApiGoal]: + ) -> ApiResponse[GoalResponse]: """Update Goal Sharing - Updates which employees this goal is shared with. + Replaces the full list of employees this goal is shared with. The provided `sharedWithEmployeeIds` array must include the goal owner's internal employee ID. Returns the updated goal object. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str - :param put_goal_shared_with_request: Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - :type put_goal_shared_with_request: PutGoalSharedWithRequest + :param update_goal_sharing_request: Internal employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) + :type update_goal_sharing_request: UpdateGoalSharingRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6301,64 +5724,62 @@ def put_goal_shared_with_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_shared_with_serialize( + _param = self._update_goal_sharing_serialize( employee_id=employee_id, goal_id=goal_id, - put_goal_shared_with_request=put_goal_shared_with_request, + update_goal_sharing_request=update_goal_sharing_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiGoal", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def put_goal_shared_with_without_preload_content( + def update_goal_sharing_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - put_goal_shared_with_request: Annotated[PutGoalSharedWithRequest, Field(description="Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\".")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + update_goal_sharing_request: Annotated[ + UpdateGoalSharingRequest, + Field( + description='Internal employee IDs of employees with whom the goal is shared. All goal owners are considered "shared with".' + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Goal Sharing - Updates which employees this goal is shared with. + Replaces the full list of employees this goal is shared with. The provided `sharedWithEmployeeIds` array must include the goal owner's internal employee ID. Returns the updated goal object. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str - :param put_goal_shared_with_request: Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) - :type put_goal_shared_with_request: PutGoalSharedWithRequest + :param update_goal_sharing_request: Internal employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\". (required) + :type update_goal_sharing_request: UpdateGoalSharingRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6379,36 +5800,32 @@ def put_goal_shared_with_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_shared_with_serialize( + _param = self._update_goal_sharing_serialize( employee_id=employee_id, goal_id=goal_id, - put_goal_shared_with_request=put_goal_shared_with_request, + update_goal_sharing_request=update_goal_sharing_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiGoal", - '400': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GoalResponse", + "400": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _put_goal_shared_with_serialize( + def _update_goal_sharing_serialize( self, employee_id, goal_id, - put_goal_shared_with_request, + update_goal_sharing_request, _request_auth, _content_type, _headers, @@ -6417,62 +5834,45 @@ def _put_goal_shared_with_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id if goal_id is not None: - _path_params['goalId'] = goal_id + _path_params["goalId"] = goal_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if put_goal_shared_with_request is not None: - _body_params = put_goal_shared_with_request - + if update_goal_sharing_request is not None: + _body_params = update_goal_sharing_request # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith', + method="PUT", + resource_path="/api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6482,41 +5882,40 @@ def _put_goal_shared_with_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def put_goal_v1( + def update_goal_v1( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - goal: Annotated[Goal, Field(description="Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + update_goal_v1: Annotated[ + UpdateGoalV1, + Field( + description="Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TransformedApiEmployeeGoalDetails: - """(Deprecated) Update Goal + """(Deprecated) Update Goal (v1) - Update a goal. This version will not update a goal to contain milestones, that functionality is added in version 1.1 + Deprecated. Use \"Update Goal (v1.1)\" instead. Update a goal. This version will not update a goal to contain milestones, that functionality is added in version 1.1. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str - :param goal: Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - :type goal: Goal + :param update_goal_v1: Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details. (required) + :type update_goal_v1: UpdateGoalV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6537,66 +5936,66 @@ def put_goal_v1( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} is deprecated.", DeprecationWarning) + """ + warnings.warn( + "PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} is deprecated.", DeprecationWarning + ) - _param = self._put_goal_v1_serialize( + _param = self._update_goal_v1_serialize( employee_id=employee_id, goal_id=goal_id, - goal=goal, + update_goal_v1=update_goal_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def put_goal_v1_with_http_info( + def update_goal_v1_with_http_info( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - goal: Annotated[Goal, Field(description="Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + update_goal_v1: Annotated[ + UpdateGoalV1, + Field( + description="Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TransformedApiEmployeeGoalDetails]: - """(Deprecated) Update Goal + """(Deprecated) Update Goal (v1) - Update a goal. This version will not update a goal to contain milestones, that functionality is added in version 1.1 + Deprecated. Use \"Update Goal (v1.1)\" instead. Update a goal. This version will not update a goal to contain milestones, that functionality is added in version 1.1. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str - :param goal: Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - :type goal: Goal + :param update_goal_v1: Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details. (required) + :type update_goal_v1: UpdateGoalV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6617,66 +6016,66 @@ def put_goal_v1_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} is deprecated.", DeprecationWarning) + """ + warnings.warn( + "PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} is deprecated.", DeprecationWarning + ) - _param = self._put_goal_v1_serialize( + _param = self._update_goal_v1_serialize( employee_id=employee_id, goal_id=goal_id, - goal=goal, + update_goal_v1=update_goal_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def put_goal_v1_without_preload_content( + def update_goal_v1_without_preload_content( self, - employee_id: Annotated[StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictStr, Field(description="goalId is the goal ID for the specified employee.")], - goal: Annotated[Goal, Field(description="Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + update_goal_v1: Annotated[ + UpdateGoalV1, + Field( + description="Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Update Goal + """(Deprecated) Update Goal (v1) - Update a goal. This version will not update a goal to contain milestones, that functionality is added in version 1.1 + Deprecated. Use \"Update Goal (v1.1)\" instead. Update a goal. This version will not update a goal to contain milestones, that functionality is added in version 1.1. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) :type goal_id: str - :param goal: Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - :type goal: Goal + :param update_goal_v1: Required fields: title, sharedWithEmployeeIds, dueDate. Omitted optional fields overwrite existing values using the endpoint's default behavior; see individual field descriptions for details. (required) + :type update_goal_v1: UpdateGoalV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6697,38 +6096,36 @@ def put_goal_v1_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 - warnings.warn("PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} is deprecated.", DeprecationWarning) + """ + warnings.warn( + "PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} is deprecated.", DeprecationWarning + ) - _param = self._put_goal_v1_serialize( + _param = self._update_goal_v1_serialize( employee_id=employee_id, goal_id=goal_id, - goal=goal, + update_goal_v1=update_goal_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _put_goal_v1_serialize( + def _update_goal_v1_serialize( self, employee_id, goal_id, - goal, + update_goal_v1, _request_auth, _content_type, _headers, @@ -6737,62 +6134,45 @@ def _put_goal_v1_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id if goal_id is not None: - _path_params['goalId'] = goal_id + _path_params["goalId"] = goal_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if goal is not None: - _body_params = goal - + if update_goal_v1 is not None: + _body_params = update_goal_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/performance/employees/{employeeId}/goals/{goalId}', + method="PUT", + resource_path="/api/v1/performance/employees/{employeeId}/goals/{goalId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6802,41 +6182,40 @@ def _put_goal_v1_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def put_goal_v1_1( + def update_goal_v11( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictInt, Field(description="goalId is the goal ID for the specified employee.")], - put_goal_v11_request: Annotated[PutGoalV11Request, Field(description="Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + update_goal_v11_request: Annotated[ + UpdateGoalV11Request, + Field( + description="Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TransformedApiEmployeeGoalDetails: - """Update Goal v1.1 + """Update Goal (v1.1) - Update a goal. Version 1.1 allows the updating of the milestones contained within the goal, unlike Version 1. + Update a goal's top-level fields and optionally add or delete milestones. Milestone handling is not a full replace or upsert: objects passed in `milestones` are always added as new milestones, even if their titles match existing milestones. To keep existing milestones unchanged while editing title, description, due date, sharing, or alignment, omit the `milestones` field. To remove milestones, pass their IDs in `deletedMilestoneIds`. There is no field for editing an existing milestone title in place. Note: Compared to \"Update Goal (v1)\", this version adds milestone updates. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) + :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) - :type goal_id: int - :param put_goal_v11_request: Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - :type put_goal_v11_request: PutGoalV11Request + :type goal_id: str + :param update_goal_v11_request: Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced. (required) + :type update_goal_v11_request: UpdateGoalV11Request :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6857,65 +6236,63 @@ def put_goal_v1_1( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_v1_1_serialize( + _param = self._update_goal_v11_serialize( employee_id=employee_id, goal_id=goal_id, - put_goal_v11_request=put_goal_v11_request, + update_goal_v11_request=update_goal_v11_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def put_goal_v1_1_with_http_info( + def update_goal_v11_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictInt, Field(description="goalId is the goal ID for the specified employee.")], - put_goal_v11_request: Annotated[PutGoalV11Request, Field(description="Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + update_goal_v11_request: Annotated[ + UpdateGoalV11Request, + Field( + description="Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TransformedApiEmployeeGoalDetails]: - """Update Goal v1.1 + """Update Goal (v1.1) - Update a goal. Version 1.1 allows the updating of the milestones contained within the goal, unlike Version 1. + Update a goal's top-level fields and optionally add or delete milestones. Milestone handling is not a full replace or upsert: objects passed in `milestones` are always added as new milestones, even if their titles match existing milestones. To keep existing milestones unchanged while editing title, description, due date, sharing, or alignment, omit the `milestones` field. To remove milestones, pass their IDs in `deletedMilestoneIds`. There is no field for editing an existing milestone title in place. Note: Compared to \"Update Goal (v1)\", this version adds milestone updates. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) + :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) - :type goal_id: int - :param put_goal_v11_request: Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - :type put_goal_v11_request: PutGoalV11Request + :type goal_id: str + :param update_goal_v11_request: Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced. (required) + :type update_goal_v11_request: UpdateGoalV11Request :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6936,65 +6313,63 @@ def put_goal_v1_1_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_v1_1_serialize( + _param = self._update_goal_v11_serialize( employee_id=employee_id, goal_id=goal_id, - put_goal_v11_request=put_goal_v11_request, + update_goal_v11_request=update_goal_v11_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def put_goal_v1_1_without_preload_content( + def update_goal_v11_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID with whom the goal is associated.")], - goal_id: Annotated[StrictInt, Field(description="goalId is the goal ID for the specified employee.")], - put_goal_v11_request: Annotated[PutGoalV11Request, Field(description="Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + str, Field(strict=True, description="The internal employee ID of the employee the goal is associated with.") + ], + goal_id: Annotated[str, Field(strict=True, description="goalId is the goal ID for the specified employee.")], + update_goal_v11_request: Annotated[ + UpdateGoalV11Request, + Field( + description="Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Goal v1.1 + """Update Goal (v1.1) - Update a goal. Version 1.1 allows the updating of the milestones contained within the goal, unlike Version 1. + Update a goal's top-level fields and optionally add or delete milestones. Milestone handling is not a full replace or upsert: objects passed in `milestones` are always added as new milestones, even if their titles match existing milestones. To keep existing milestones unchanged while editing title, description, due date, sharing, or alignment, omit the `milestones` field. To remove milestones, pass their IDs in `deletedMilestoneIds`. There is no field for editing an existing milestone title in place. Note: Compared to \"Update Goal (v1)\", this version adds milestone updates. OAuth Scopes: goal.write - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee the goal is associated with. (required) + :type employee_id: str :param goal_id: goalId is the goal ID for the specified employee. (required) - :type goal_id: int - :param put_goal_v11_request: Required fields: title, sharedWithEmployeeIds, dueDate. Any non-required field not provided will overwrite existing data with a NULL value. (required) - :type put_goal_v11_request: PutGoalV11Request + :type goal_id: str + :param update_goal_v11_request: Required fields: `title`, `sharedWithEmployeeIds`, and `dueDate`. Omit optional fields that should remain unchanged. In particular, omit `milestones` unless adding new milestones; included milestones are appended, not reconciled or replaced. (required) + :type update_goal_v11_request: UpdateGoalV11Request :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7015,37 +6390,33 @@ def put_goal_v1_1_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._put_goal_v1_1_serialize( + _param = self._update_goal_v11_serialize( employee_id=employee_id, goal_id=goal_id, - put_goal_v11_request=put_goal_v11_request, + update_goal_v11_request=update_goal_v11_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TransformedApiEmployeeGoalDetails", - '400': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TransformedApiEmployeeGoalDetails", + "400": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _put_goal_v1_1_serialize( + def _update_goal_v11_serialize( self, employee_id, goal_id, - put_goal_v11_request, + update_goal_v11_request, _request_auth, _content_type, _headers, @@ -7054,62 +6425,45 @@ def _put_goal_v1_1_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id if goal_id is not None: - _path_params['goalId'] = goal_id + _path_params["goalId"] = goal_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if put_goal_v11_request is not None: - _body_params = put_goal_v11_request - + if update_goal_v11_request is not None: + _body_params = update_goal_v11_request # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1_1/performance/employees/{employeeId}/goals/{goalId}', + method="PUT", + resource_path="/api/v1_1/performance/employees/{employeeId}/goals/{goalId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7119,7 +6473,5 @@ def _put_goal_v1_1_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/holidays_api.py b/bamboohr_sdk/api/holidays_api.py new file mode 100644 index 0000000..714818a --- /dev/null +++ b/bamboohr_sdk/api/holidays_api.py @@ -0,0 +1,2237 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any +from uuid import UUID + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.global_holiday_global_holiday_v1 import GlobalHolidayGlobalHolidayV1 +from bamboohr_sdk.models.holiday_bulk_insert_company_holidays_response_v1 import ( + HolidayBulkInsertCompanyHolidaysResponseV1, +) +from bamboohr_sdk.models.holiday_catalog_holiday_list_response_v1 import HolidayCatalogHolidayListResponseV1 +from bamboohr_sdk.models.holiday_company_holiday_list_response_v1 import HolidayCompanyHolidayListResponseV1 +from bamboohr_sdk.models.holiday_company_holiday_v1 import HolidayCompanyHolidayV1 +from bamboohr_sdk.models.holiday_create_company_holiday_request_v1 import HolidayCreateCompanyHolidayRequestV1 +from bamboohr_sdk.models.holiday_update_company_holiday_request_v1 import HolidayUpdateCompanyHolidayRequestV1 +from bamboohr_sdk.rest import RESTResponseType + + +class HolidaysApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def bulk_insert_company_holidays( + self, + holiday_create_company_holiday_request_v1: Annotated[ + list[HolidayCreateCompanyHolidayRequestV1], Field(min_length=1, max_length=100) + ], + atomic: Annotated[ + StrictBool | None, + Field( + description="When true, the entire batch is committed in a single transaction and any per-record failure aborts the whole request with a 422 (no records are created). When false, each record commits independently and failures are reported per record in a 207 response. Accepted values: true/false, 1/0, yes/no, on/off." + ), + ] = None, + return_records: Annotated[ + StrictBool | None, + Field( + description="When true, each entry in the response records array also includes the full created company holiday under the record key. Accepted values: true/false, 1/0, yes/no, on/off." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HolidayBulkInsertCompanyHolidaysResponseV1: + """Bulk Create Company Holidays + + Creates multiple company holidays in one synchronous call. Each record follows the single-create semantics: it may be fully-specified or carry a globalHolidayUuid that seeds name, dates, and countries from the global catalog entry (mix-and-match within the same request). Records are processed in request order. OAuth Scopes: holidays.write + + :param holiday_create_company_holiday_request_v1: (required) + :type holiday_create_company_holiday_request_v1: List[HolidayCreateCompanyHolidayRequestV1] + :param atomic: When true, the entire batch is committed in a single transaction and any per-record failure aborts the whole request with a 422 (no records are created). When false, each record commits independently and failures are reported per record in a 207 response. Accepted values: true/false, 1/0, yes/no, on/off. + :type atomic: bool + :param return_records: When true, each entry in the response records array also includes the full created company holiday under the record key. Accepted values: true/false, 1/0, yes/no, on/off. + :type return_records: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._bulk_insert_company_holidays_serialize( + holiday_create_company_holiday_request_v1=holiday_create_company_holiday_request_v1, + atomic=atomic, + return_records=return_records, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayBulkInsertCompanyHolidaysResponseV1", + "207": "HolidayBulkInsertCompanyHolidaysResponseV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "HolidayBulkInsertCompanyHolidaysFailureResponseV1", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def bulk_insert_company_holidays_with_http_info( + self, + holiday_create_company_holiday_request_v1: Annotated[ + list[HolidayCreateCompanyHolidayRequestV1], Field(min_length=1, max_length=100) + ], + atomic: Annotated[ + StrictBool | None, + Field( + description="When true, the entire batch is committed in a single transaction and any per-record failure aborts the whole request with a 422 (no records are created). When false, each record commits independently and failures are reported per record in a 207 response. Accepted values: true/false, 1/0, yes/no, on/off." + ), + ] = None, + return_records: Annotated[ + StrictBool | None, + Field( + description="When true, each entry in the response records array also includes the full created company holiday under the record key. Accepted values: true/false, 1/0, yes/no, on/off." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HolidayBulkInsertCompanyHolidaysResponseV1]: + """Bulk Create Company Holidays + + Creates multiple company holidays in one synchronous call. Each record follows the single-create semantics: it may be fully-specified or carry a globalHolidayUuid that seeds name, dates, and countries from the global catalog entry (mix-and-match within the same request). Records are processed in request order. OAuth Scopes: holidays.write + + :param holiday_create_company_holiday_request_v1: (required) + :type holiday_create_company_holiday_request_v1: List[HolidayCreateCompanyHolidayRequestV1] + :param atomic: When true, the entire batch is committed in a single transaction and any per-record failure aborts the whole request with a 422 (no records are created). When false, each record commits independently and failures are reported per record in a 207 response. Accepted values: true/false, 1/0, yes/no, on/off. + :type atomic: bool + :param return_records: When true, each entry in the response records array also includes the full created company holiday under the record key. Accepted values: true/false, 1/0, yes/no, on/off. + :type return_records: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._bulk_insert_company_holidays_serialize( + holiday_create_company_holiday_request_v1=holiday_create_company_holiday_request_v1, + atomic=atomic, + return_records=return_records, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayBulkInsertCompanyHolidaysResponseV1", + "207": "HolidayBulkInsertCompanyHolidaysResponseV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "HolidayBulkInsertCompanyHolidaysFailureResponseV1", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def bulk_insert_company_holidays_without_preload_content( + self, + holiday_create_company_holiday_request_v1: Annotated[ + list[HolidayCreateCompanyHolidayRequestV1], Field(min_length=1, max_length=100) + ], + atomic: Annotated[ + StrictBool | None, + Field( + description="When true, the entire batch is committed in a single transaction and any per-record failure aborts the whole request with a 422 (no records are created). When false, each record commits independently and failures are reported per record in a 207 response. Accepted values: true/false, 1/0, yes/no, on/off." + ), + ] = None, + return_records: Annotated[ + StrictBool | None, + Field( + description="When true, each entry in the response records array also includes the full created company holiday under the record key. Accepted values: true/false, 1/0, yes/no, on/off." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Bulk Create Company Holidays + + Creates multiple company holidays in one synchronous call. Each record follows the single-create semantics: it may be fully-specified or carry a globalHolidayUuid that seeds name, dates, and countries from the global catalog entry (mix-and-match within the same request). Records are processed in request order. OAuth Scopes: holidays.write + + :param holiday_create_company_holiday_request_v1: (required) + :type holiday_create_company_holiday_request_v1: List[HolidayCreateCompanyHolidayRequestV1] + :param atomic: When true, the entire batch is committed in a single transaction and any per-record failure aborts the whole request with a 422 (no records are created). When false, each record commits independently and failures are reported per record in a 207 response. Accepted values: true/false, 1/0, yes/no, on/off. + :type atomic: bool + :param return_records: When true, each entry in the response records array also includes the full created company holiday under the record key. Accepted values: true/false, 1/0, yes/no, on/off. + :type return_records: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._bulk_insert_company_holidays_serialize( + holiday_create_company_holiday_request_v1=holiday_create_company_holiday_request_v1, + atomic=atomic, + return_records=return_records, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayBulkInsertCompanyHolidaysResponseV1", + "207": "HolidayBulkInsertCompanyHolidaysResponseV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "HolidayBulkInsertCompanyHolidaysFailureResponseV1", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _bulk_insert_company_holidays_serialize( + self, + holiday_create_company_holiday_request_v1, + atomic, + return_records, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = { + "HolidayCreateCompanyHolidayRequestV1": "", + } + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if atomic is not None: + _query_params.append(("atomic", atomic)) + + if return_records is not None: + _query_params.append(("returnRecords", return_records)) + + # process the header parameters + # process the form parameters + # process the body parameter + if holiday_create_company_holiday_request_v1 is not None: + _body_params = holiday_create_company_holiday_request_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/holidays/bulk-insert", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_company_holiday( + self, + holiday_create_company_holiday_request_v1: HolidayCreateCompanyHolidayRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HolidayCompanyHolidayV1: + """Create Company Holiday + + Creates a company holiday. The body may be fully-specified or carry a globalHolidayUuid that seeds name, dates, and countries from the global catalog entry; partner-supplied values override the catalog defaults. OAuth Scopes: holidays.write + + :param holiday_create_company_holiday_request_v1: (required) + :type holiday_create_company_holiday_request_v1: HolidayCreateCompanyHolidayRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_company_holiday_serialize( + holiday_create_company_holiday_request_v1=holiday_create_company_holiday_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "HolidayCompanyHolidayV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_company_holiday_with_http_info( + self, + holiday_create_company_holiday_request_v1: HolidayCreateCompanyHolidayRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HolidayCompanyHolidayV1]: + """Create Company Holiday + + Creates a company holiday. The body may be fully-specified or carry a globalHolidayUuid that seeds name, dates, and countries from the global catalog entry; partner-supplied values override the catalog defaults. OAuth Scopes: holidays.write + + :param holiday_create_company_holiday_request_v1: (required) + :type holiday_create_company_holiday_request_v1: HolidayCreateCompanyHolidayRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_company_holiday_serialize( + holiday_create_company_holiday_request_v1=holiday_create_company_holiday_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "HolidayCompanyHolidayV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_company_holiday_without_preload_content( + self, + holiday_create_company_holiday_request_v1: HolidayCreateCompanyHolidayRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Company Holiday + + Creates a company holiday. The body may be fully-specified or carry a globalHolidayUuid that seeds name, dates, and countries from the global catalog entry; partner-supplied values override the catalog defaults. OAuth Scopes: holidays.write + + :param holiday_create_company_holiday_request_v1: (required) + :type holiday_create_company_holiday_request_v1: HolidayCreateCompanyHolidayRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_company_holiday_serialize( + holiday_create_company_holiday_request_v1=holiday_create_company_holiday_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "HolidayCompanyHolidayV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_company_holiday_serialize( + self, + holiday_create_company_holiday_request_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if holiday_create_company_holiday_request_v1 is not None: + _body_params = holiday_create_company_holiday_request_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/holidays", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_company_holiday( + self, + id: Annotated[StrictInt, Field(description="The company holiday ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Company Holiday + + Soft-deletes a company holiday and removes its audience, pay, and country sub-rows. Idempotent: deleting a missing or already-deleted holiday also returns 204. OAuth Scopes: holidays.write + + :param id: The company holiday ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_company_holiday_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_company_holiday_with_http_info( + self, + id: Annotated[StrictInt, Field(description="The company holiday ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Company Holiday + + Soft-deletes a company holiday and removes its audience, pay, and country sub-rows. Idempotent: deleting a missing or already-deleted holiday also returns 204. OAuth Scopes: holidays.write + + :param id: The company holiday ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_company_holiday_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_company_holiday_without_preload_content( + self, + id: Annotated[StrictInt, Field(description="The company holiday ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Company Holiday + + Soft-deletes a company holiday and removes its audience, pay, and country sub-rows. Idempotent: deleting a missing or already-deleted holiday also returns 204. OAuth Scopes: holidays.write + + :param id: The company holiday ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_company_holiday_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_company_holiday_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/holidays/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_catalog_holiday( + self, + uuid: Annotated[UUID, Field(description="The catalog entry UUID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GlobalHolidayGlobalHolidayV1: + """Get Catalog Holiday + + Gets a global holiday catalog entry by UUID. OAuth Scopes: holidays + + :param uuid: The catalog entry UUID. (required) + :type uuid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_catalog_holiday_serialize( + uuid=uuid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "GlobalHolidayGlobalHolidayV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_catalog_holiday_with_http_info( + self, + uuid: Annotated[UUID, Field(description="The catalog entry UUID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GlobalHolidayGlobalHolidayV1]: + """Get Catalog Holiday + + Gets a global holiday catalog entry by UUID. OAuth Scopes: holidays + + :param uuid: The catalog entry UUID. (required) + :type uuid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_catalog_holiday_serialize( + uuid=uuid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "GlobalHolidayGlobalHolidayV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_catalog_holiday_without_preload_content( + self, + uuid: Annotated[UUID, Field(description="The catalog entry UUID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Catalog Holiday + + Gets a global holiday catalog entry by UUID. OAuth Scopes: holidays + + :param uuid: The catalog entry UUID. (required) + :type uuid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_catalog_holiday_serialize( + uuid=uuid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "GlobalHolidayGlobalHolidayV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_catalog_holiday_serialize( + self, + uuid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if uuid is not None: + _path_params["uuid"] = uuid + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/holidays/catalog/{uuid}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_company_holiday( + self, + id: Annotated[StrictInt | None, Field(description="The company holiday ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HolidayCompanyHolidayV1: + """Get Company Holiday + + Gets a company holiday by ID. OAuth Scopes: holidays + + :param id: The company holiday ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_company_holiday_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayCompanyHolidayV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_company_holiday_with_http_info( + self, + id: Annotated[StrictInt | None, Field(description="The company holiday ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HolidayCompanyHolidayV1]: + """Get Company Holiday + + Gets a company holiday by ID. OAuth Scopes: holidays + + :param id: The company holiday ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_company_holiday_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayCompanyHolidayV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_company_holiday_without_preload_content( + self, + id: Annotated[StrictInt | None, Field(description="The company holiday ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Company Holiday + + Gets a company holiday by ID. OAuth Scopes: holidays + + :param id: The company holiday ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_company_holiday_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayCompanyHolidayV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_company_holiday_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/holidays/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_catalog_holidays( + self, + country_code: Annotated[ + Annotated[str, Field(strict=True)] | None, + Field(description="ISO 3166-1 alpha-2 country code. Filters the catalog to entries for the given country."), + ] = None, + year: Annotated[ + StrictInt | None, + Field(description="Calendar year. Filters the catalog to entries whose startDate falls in the given year."), + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Supported fields: name, type, countryCode, startDate. Example: startDate ge '2026-01-01' and type eq 'PUBLIC'" + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field(description="Sort expression. Allowed fields: startDate, name, with optional asc/desc direction."), + ] = None, + page: Annotated[Annotated[int, Field(strict=True, ge=1)] | None, Field(description="Page number.")] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=1)] | None, Field(description="Page size.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HolidayCatalogHolidayListResponseV1: + """List Catalog Holidays + + Lists entries in the global holiday catalog. The catalog is read-only system reference data; use the returned uuid values to seed company holidays. OAuth Scopes: holidays + + :param country_code: ISO 3166-1 alpha-2 country code. Filters the catalog to entries for the given country. + :type country_code: str + :param year: Calendar year. Filters the catalog to entries whose startDate falls in the given year. + :type year: int + :param filter: OData v4 filter expression. Supported fields: name, type, countryCode, startDate. Example: startDate ge '2026-01-01' and type eq 'PUBLIC' + :type filter: str + :param order_by: Sort expression. Allowed fields: startDate, name, with optional asc/desc direction. + :type order_by: str + :param page: Page number. + :type page: int + :param page_size: Page size. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_catalog_holidays_serialize( + country_code=country_code, + year=year, + filter=filter, + order_by=order_by, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayCatalogHolidayListResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_catalog_holidays_with_http_info( + self, + country_code: Annotated[ + Annotated[str, Field(strict=True)] | None, + Field(description="ISO 3166-1 alpha-2 country code. Filters the catalog to entries for the given country."), + ] = None, + year: Annotated[ + StrictInt | None, + Field(description="Calendar year. Filters the catalog to entries whose startDate falls in the given year."), + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Supported fields: name, type, countryCode, startDate. Example: startDate ge '2026-01-01' and type eq 'PUBLIC'" + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field(description="Sort expression. Allowed fields: startDate, name, with optional asc/desc direction."), + ] = None, + page: Annotated[Annotated[int, Field(strict=True, ge=1)] | None, Field(description="Page number.")] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=1)] | None, Field(description="Page size.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HolidayCatalogHolidayListResponseV1]: + """List Catalog Holidays + + Lists entries in the global holiday catalog. The catalog is read-only system reference data; use the returned uuid values to seed company holidays. OAuth Scopes: holidays + + :param country_code: ISO 3166-1 alpha-2 country code. Filters the catalog to entries for the given country. + :type country_code: str + :param year: Calendar year. Filters the catalog to entries whose startDate falls in the given year. + :type year: int + :param filter: OData v4 filter expression. Supported fields: name, type, countryCode, startDate. Example: startDate ge '2026-01-01' and type eq 'PUBLIC' + :type filter: str + :param order_by: Sort expression. Allowed fields: startDate, name, with optional asc/desc direction. + :type order_by: str + :param page: Page number. + :type page: int + :param page_size: Page size. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_catalog_holidays_serialize( + country_code=country_code, + year=year, + filter=filter, + order_by=order_by, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayCatalogHolidayListResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_catalog_holidays_without_preload_content( + self, + country_code: Annotated[ + Annotated[str, Field(strict=True)] | None, + Field(description="ISO 3166-1 alpha-2 country code. Filters the catalog to entries for the given country."), + ] = None, + year: Annotated[ + StrictInt | None, + Field(description="Calendar year. Filters the catalog to entries whose startDate falls in the given year."), + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Supported fields: name, type, countryCode, startDate. Example: startDate ge '2026-01-01' and type eq 'PUBLIC'" + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field(description="Sort expression. Allowed fields: startDate, name, with optional asc/desc direction."), + ] = None, + page: Annotated[Annotated[int, Field(strict=True, ge=1)] | None, Field(description="Page number.")] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=1)] | None, Field(description="Page size.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Catalog Holidays + + Lists entries in the global holiday catalog. The catalog is read-only system reference data; use the returned uuid values to seed company holidays. OAuth Scopes: holidays + + :param country_code: ISO 3166-1 alpha-2 country code. Filters the catalog to entries for the given country. + :type country_code: str + :param year: Calendar year. Filters the catalog to entries whose startDate falls in the given year. + :type year: int + :param filter: OData v4 filter expression. Supported fields: name, type, countryCode, startDate. Example: startDate ge '2026-01-01' and type eq 'PUBLIC' + :type filter: str + :param order_by: Sort expression. Allowed fields: startDate, name, with optional asc/desc direction. + :type order_by: str + :param page: Page number. + :type page: int + :param page_size: Page size. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_catalog_holidays_serialize( + country_code=country_code, + year=year, + filter=filter, + order_by=order_by, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayCatalogHolidayListResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_catalog_holidays_serialize( + self, + country_code, + year, + filter, + order_by, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if country_code is not None: + _query_params.append(("countryCode", country_code)) + + if year is not None: + _query_params.append(("year", year)) + + if filter is not None: + _query_params.append(("filter", filter)) + + if order_by is not None: + _query_params.append(("orderBy", order_by)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/holidays/catalog", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_company_holidays( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to company holidays. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `name`, `startDate`, `endDate`, `isPublic`, `globalHolidayUuid`. Examples: `startDate ge '2026-01-01'`, `isPublic eq true and endDate ne null`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of sort terms, each a field optionally followed by `asc` or `desc`. Allowed sort fields: `name`, `startDate`, `endDate`, `createdAt`, `updatedAt`." + ), + ] = None, + select: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of properties to include in each returned holiday. Reduces payload size. Example: `id,name,startDate`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page number to retrieve.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=1)] | None, + Field(description="The number of items to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HolidayCompanyHolidayListResponseV1: + """List Company Holidays + + Returns a paginated list of active company holidays. Soft-deleted holidays are never returned. Supports OData filtering via `filter`, sorting via `orderBy`, field projection via `select`, and page-based pagination. OAuth Scopes: holidays + + :param filter: OData filter expression applied to company holidays. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `name`, `startDate`, `endDate`, `isPublic`, `globalHolidayUuid`. Examples: `startDate ge '2026-01-01'`, `isPublic eq true and endDate ne null`. + :type filter: str + :param order_by: Comma-separated list of sort terms, each a field optionally followed by `asc` or `desc`. Allowed sort fields: `name`, `startDate`, `endDate`, `createdAt`, `updatedAt`. + :type order_by: str + :param select: Comma-separated list of properties to include in each returned holiday. Reduces payload size. Example: `id,name,startDate`. + :type select: str + :param page: The page number to retrieve. + :type page: int + :param page_size: The number of items to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_company_holidays_serialize( + filter=filter, + order_by=order_by, + select=select, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayCompanyHolidayListResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_company_holidays_with_http_info( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to company holidays. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `name`, `startDate`, `endDate`, `isPublic`, `globalHolidayUuid`. Examples: `startDate ge '2026-01-01'`, `isPublic eq true and endDate ne null`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of sort terms, each a field optionally followed by `asc` or `desc`. Allowed sort fields: `name`, `startDate`, `endDate`, `createdAt`, `updatedAt`." + ), + ] = None, + select: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of properties to include in each returned holiday. Reduces payload size. Example: `id,name,startDate`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page number to retrieve.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=1)] | None, + Field(description="The number of items to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HolidayCompanyHolidayListResponseV1]: + """List Company Holidays + + Returns a paginated list of active company holidays. Soft-deleted holidays are never returned. Supports OData filtering via `filter`, sorting via `orderBy`, field projection via `select`, and page-based pagination. OAuth Scopes: holidays + + :param filter: OData filter expression applied to company holidays. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `name`, `startDate`, `endDate`, `isPublic`, `globalHolidayUuid`. Examples: `startDate ge '2026-01-01'`, `isPublic eq true and endDate ne null`. + :type filter: str + :param order_by: Comma-separated list of sort terms, each a field optionally followed by `asc` or `desc`. Allowed sort fields: `name`, `startDate`, `endDate`, `createdAt`, `updatedAt`. + :type order_by: str + :param select: Comma-separated list of properties to include in each returned holiday. Reduces payload size. Example: `id,name,startDate`. + :type select: str + :param page: The page number to retrieve. + :type page: int + :param page_size: The number of items to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_company_holidays_serialize( + filter=filter, + order_by=order_by, + select=select, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayCompanyHolidayListResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_company_holidays_without_preload_content( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to company holidays. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `name`, `startDate`, `endDate`, `isPublic`, `globalHolidayUuid`. Examples: `startDate ge '2026-01-01'`, `isPublic eq true and endDate ne null`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of sort terms, each a field optionally followed by `asc` or `desc`. Allowed sort fields: `name`, `startDate`, `endDate`, `createdAt`, `updatedAt`." + ), + ] = None, + select: Annotated[ + StrictStr | None, + Field( + description="Comma-separated list of properties to include in each returned holiday. Reduces payload size. Example: `id,name,startDate`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page number to retrieve.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=1)] | None, + Field(description="The number of items to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Company Holidays + + Returns a paginated list of active company holidays. Soft-deleted holidays are never returned. Supports OData filtering via `filter`, sorting via `orderBy`, field projection via `select`, and page-based pagination. OAuth Scopes: holidays + + :param filter: OData filter expression applied to company holidays. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `name`, `startDate`, `endDate`, `isPublic`, `globalHolidayUuid`. Examples: `startDate ge '2026-01-01'`, `isPublic eq true and endDate ne null`. + :type filter: str + :param order_by: Comma-separated list of sort terms, each a field optionally followed by `asc` or `desc`. Allowed sort fields: `name`, `startDate`, `endDate`, `createdAt`, `updatedAt`. + :type order_by: str + :param select: Comma-separated list of properties to include in each returned holiday. Reduces payload size. Example: `id,name,startDate`. + :type select: str + :param page: The page number to retrieve. + :type page: int + :param page_size: The number of items to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_company_holidays_serialize( + filter=filter, + order_by=order_by, + select=select, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayCompanyHolidayListResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_company_holidays_serialize( + self, + filter, + order_by, + select, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if filter is not None: + _query_params.append(("filter", filter)) + + if order_by is not None: + _query_params.append(("orderBy", order_by)) + + if select is not None: + _query_params.append(("select", select)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/holidays", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_company_holiday( + self, + id: Annotated[StrictInt, Field(description="The company holiday ID.")], + holiday_update_company_holiday_request_v1: HolidayUpdateCompanyHolidayRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HolidayCompanyHolidayV1: + """Update Company Holiday + + Updates a company holiday with a JSON Merge Patch (RFC 7396) document. Only the fields present in the patch change; countryCodes, audience, and holidayPay replace their stored blocks wholesale when supplied. Send null for endDate to revert to a single-day holiday and null for holidayPay to clear the pay treatment. globalHolidayUuid is read-only and rejected if present. OAuth Scopes: holidays.write + + :param id: The company holiday ID. (required) + :type id: int + :param holiday_update_company_holiday_request_v1: (required) + :type holiday_update_company_holiday_request_v1: HolidayUpdateCompanyHolidayRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_company_holiday_serialize( + id=id, + holiday_update_company_holiday_request_v1=holiday_update_company_holiday_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayCompanyHolidayV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "415": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_company_holiday_with_http_info( + self, + id: Annotated[StrictInt, Field(description="The company holiday ID.")], + holiday_update_company_holiday_request_v1: HolidayUpdateCompanyHolidayRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HolidayCompanyHolidayV1]: + """Update Company Holiday + + Updates a company holiday with a JSON Merge Patch (RFC 7396) document. Only the fields present in the patch change; countryCodes, audience, and holidayPay replace their stored blocks wholesale when supplied. Send null for endDate to revert to a single-day holiday and null for holidayPay to clear the pay treatment. globalHolidayUuid is read-only and rejected if present. OAuth Scopes: holidays.write + + :param id: The company holiday ID. (required) + :type id: int + :param holiday_update_company_holiday_request_v1: (required) + :type holiday_update_company_holiday_request_v1: HolidayUpdateCompanyHolidayRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_company_holiday_serialize( + id=id, + holiday_update_company_holiday_request_v1=holiday_update_company_holiday_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayCompanyHolidayV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "415": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_company_holiday_without_preload_content( + self, + id: Annotated[StrictInt, Field(description="The company holiday ID.")], + holiday_update_company_holiday_request_v1: HolidayUpdateCompanyHolidayRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Company Holiday + + Updates a company holiday with a JSON Merge Patch (RFC 7396) document. Only the fields present in the patch change; countryCodes, audience, and holidayPay replace their stored blocks wholesale when supplied. Send null for endDate to revert to a single-day holiday and null for holidayPay to clear the pay treatment. globalHolidayUuid is read-only and rejected if present. OAuth Scopes: holidays.write + + :param id: The company holiday ID. (required) + :type id: int + :param holiday_update_company_holiday_request_v1: (required) + :type holiday_update_company_holiday_request_v1: HolidayUpdateCompanyHolidayRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_company_holiday_serialize( + id=id, + holiday_update_company_holiday_request_v1=holiday_update_company_holiday_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "HolidayCompanyHolidayV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "415": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_company_holiday_serialize( + self, + id, + holiday_update_company_holiday_request_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if holiday_update_company_holiday_request_v1 is not None: + _body_params = holiday_update_company_holiday_request_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/merge-patch+json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="PATCH", + resource_path="/api/v1/holidays/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/hours_api.py b/bamboohr_sdk/api/hours_api.py index 4146842..e82b73b 100644 --- a/bamboohr_sdk/api/hours_api.py +++ b/bamboohr_sdk/api/hours_api.py @@ -1,33 +1,26 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any -from pydantic import Field, StrictStr -from typing import List -from typing_extensions import Annotated +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.models.adjust_time_tracking_request_schema import AdjustTimeTrackingRequestSchema from bamboohr_sdk.models.time_tracking_bulk_response_schema import TimeTrackingBulkResponseSchema from bamboohr_sdk.models.time_tracking_delete_response_schema import TimeTrackingDeleteResponseSchema from bamboohr_sdk.models.time_tracking_id_response_schema import TimeTrackingIdResponseSchema from bamboohr_sdk.models.time_tracking_record import TimeTrackingRecord from bamboohr_sdk.models.time_tracking_record_schema import TimeTrackingRecordSchema - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.rest import RESTResponseType @@ -43,27 +36,21 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def create_or_update_time_tracking_hour_records( self, - time_tracking_record: List[TimeTrackingRecord], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + time_tracking_record: list[TimeTrackingRecord], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TimeTrackingBulkResponseSchema: """Create or Update Hour Records - Bulk add/edit hour records. The endpoint can return HTTP 201 even when individual items fail validation; inspect each item's `success` flag and per-item `response.message` for partial failures. + Bulk add/edit hour records. The endpoint can return HTTP 201 even when individual items fail validation; inspect each item's `success` flag and per-item `response.message` for partial failures. OAuth Scopes: time_tracking.write :param time_tracking_record: (required) :type time_tracking_record: List[TimeTrackingRecord] @@ -87,51 +74,42 @@ def create_or_update_time_tracking_hour_records( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_or_update_time_tracking_hour_records_serialize( time_tracking_record=time_tracking_record, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingBulkResponseSchema", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingBulkResponseSchema", + "403": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def create_or_update_time_tracking_hour_records_with_http_info( self, - time_tracking_record: List[TimeTrackingRecord], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + time_tracking_record: list[TimeTrackingRecord], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TimeTrackingBulkResponseSchema]: """Create or Update Hour Records - Bulk add/edit hour records. The endpoint can return HTTP 201 even when individual items fail validation; inspect each item's `success` flag and per-item `response.message` for partial failures. + Bulk add/edit hour records. The endpoint can return HTTP 201 even when individual items fail validation; inspect each item's `success` flag and per-item `response.message` for partial failures. OAuth Scopes: time_tracking.write :param time_tracking_record: (required) :type time_tracking_record: List[TimeTrackingRecord] @@ -155,51 +133,42 @@ def create_or_update_time_tracking_hour_records_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_or_update_time_tracking_hour_records_serialize( time_tracking_record=time_tracking_record, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingBulkResponseSchema", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingBulkResponseSchema", + "403": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_or_update_time_tracking_hour_records_without_preload_content( self, - time_tracking_record: List[TimeTrackingRecord], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + time_tracking_record: list[TimeTrackingRecord], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create or Update Hour Records - Bulk add/edit hour records. The endpoint can return HTTP 201 even when individual items fail validation; inspect each item's `success` flag and per-item `response.message` for partial failures. + Bulk add/edit hour records. The endpoint can return HTTP 201 even when individual items fail validation; inspect each item's `success` flag and per-item `response.message` for partial failures. OAuth Scopes: time_tracking.write :param time_tracking_record: (required) :type time_tracking_record: List[TimeTrackingRecord] @@ -223,27 +192,23 @@ def create_or_update_time_tracking_hour_records_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_or_update_time_tracking_hour_records_serialize( time_tracking_record=time_tracking_record, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingBulkResponseSchema", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingBulkResponseSchema", + "403": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_or_update_time_tracking_hour_records_serialize( self, time_tracking_record, @@ -255,18 +220,16 @@ def _create_or_update_time_tracking_hour_records_serialize( _host = None - _collection_formats: Dict[str, str] = { - 'TimeTrackingRecord': '', + _collection_formats: dict[str, str] = { + "TimeTrackingRecord": "", } - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -276,38 +239,24 @@ def _create_or_update_time_tracking_hour_records_serialize( if time_tracking_record is not None: _body_params = time_tracking_record - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/timetracking/record', + method="POST", + resource_path="/api/v1/timetracking/record", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -317,32 +266,24 @@ def _create_or_update_time_tracking_hour_records_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def create_time_tracking_hour_record( self, time_tracking_record: TimeTrackingRecord, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TimeTrackingIdResponseSchema: """Create Hour Record - Adds a single hour record. Use this endpoint when creating one record at a time. For bulk imports, use create-or-update-time-tracking-hour-records. + Adds a single hour record. Use this endpoint when creating one record at a time. For bulk imports, use create-or-update-time-tracking-hour-records. OAuth Scopes: time_tracking.write :param time_tracking_record: (required) :type time_tracking_record: TimeTrackingRecord @@ -366,52 +307,43 @@ def create_time_tracking_hour_record( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_time_tracking_hour_record_serialize( time_tracking_record=time_tracking_record, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingIdResponseSchema", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingIdResponseSchema", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def create_time_tracking_hour_record_with_http_info( self, time_tracking_record: TimeTrackingRecord, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TimeTrackingIdResponseSchema]: """Create Hour Record - Adds a single hour record. Use this endpoint when creating one record at a time. For bulk imports, use create-or-update-time-tracking-hour-records. + Adds a single hour record. Use this endpoint when creating one record at a time. For bulk imports, use create-or-update-time-tracking-hour-records. OAuth Scopes: time_tracking.write :param time_tracking_record: (required) :type time_tracking_record: TimeTrackingRecord @@ -435,52 +367,43 @@ def create_time_tracking_hour_record_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_time_tracking_hour_record_serialize( time_tracking_record=time_tracking_record, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingIdResponseSchema", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingIdResponseSchema", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_time_tracking_hour_record_without_preload_content( self, time_tracking_record: TimeTrackingRecord, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Hour Record - Adds a single hour record. Use this endpoint when creating one record at a time. For bulk imports, use create-or-update-time-tracking-hour-records. + Adds a single hour record. Use this endpoint when creating one record at a time. For bulk imports, use create-or-update-time-tracking-hour-records. OAuth Scopes: time_tracking.write :param time_tracking_record: (required) :type time_tracking_record: TimeTrackingRecord @@ -504,28 +427,24 @@ def create_time_tracking_hour_record_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_time_tracking_hour_record_serialize( time_tracking_record=time_tracking_record, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingIdResponseSchema", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingIdResponseSchema", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_time_tracking_hour_record_serialize( self, time_tracking_record, @@ -537,17 +456,14 @@ def _create_time_tracking_hour_record_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -557,38 +473,24 @@ def _create_time_tracking_hour_record_serialize( if time_tracking_record is not None: _body_params = time_tracking_record - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/timetracking/add', + method="POST", + resource_path="/api/v1/timetracking/add", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -598,32 +500,29 @@ def _create_time_tracking_hour_record_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def delete_time_tracking_hour_record( self, - id: Annotated[StrictStr, Field(description="The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID).")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[ + StrictStr | None, + Field( + description="The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID)." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TimeTrackingDeleteResponseSchema: """Delete Hour Record - Deletes an hour record by `timeTrackingId` (`id` path parameter). This removes all stored revisions associated with that logical time tracking record. Not-found and invalid-id cases are currently returned as a 400 invalid-argument response for backward compatibility. + Deletes an hour record by `timeTrackingId` (`id` path parameter). This removes all stored revisions associated with that logical time tracking record. Not-found and invalid-id cases are currently returned as a 400 invalid-argument response for backward compatibility. OAuth Scopes: time_tracking.write :param id: The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID). (required) :type id: str @@ -647,52 +546,44 @@ def delete_time_tracking_hour_record( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_time_tracking_hour_record_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingDeleteResponseSchema", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingDeleteResponseSchema", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def delete_time_tracking_hour_record_with_http_info( self, - id: Annotated[StrictStr, Field(description="The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID).")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[ + StrictStr | None, + Field( + description="The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID)." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TimeTrackingDeleteResponseSchema]: """Delete Hour Record - Deletes an hour record by `timeTrackingId` (`id` path parameter). This removes all stored revisions associated with that logical time tracking record. Not-found and invalid-id cases are currently returned as a 400 invalid-argument response for backward compatibility. + Deletes an hour record by `timeTrackingId` (`id` path parameter). This removes all stored revisions associated with that logical time tracking record. Not-found and invalid-id cases are currently returned as a 400 invalid-argument response for backward compatibility. OAuth Scopes: time_tracking.write :param id: The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID). (required) :type id: str @@ -716,52 +607,44 @@ def delete_time_tracking_hour_record_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_time_tracking_hour_record_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingDeleteResponseSchema", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingDeleteResponseSchema", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def delete_time_tracking_hour_record_without_preload_content( self, - id: Annotated[StrictStr, Field(description="The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID).")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[ + StrictStr | None, + Field( + description="The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID)." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Delete Hour Record - Deletes an hour record by `timeTrackingId` (`id` path parameter). This removes all stored revisions associated with that logical time tracking record. Not-found and invalid-id cases are currently returned as a 400 invalid-argument response for backward compatibility. + Deletes an hour record by `timeTrackingId` (`id` path parameter). This removes all stored revisions associated with that logical time tracking record. Not-found and invalid-id cases are currently returned as a 400 invalid-argument response for backward compatibility. OAuth Scopes: time_tracking.write :param id: The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID). (required) :type id: str @@ -785,28 +668,20 @@ def delete_time_tracking_hour_record_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_time_tracking_hour_record_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingDeleteResponseSchema", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingDeleteResponseSchema", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_time_tracking_hour_record_serialize( self, id, @@ -818,45 +693,33 @@ def _delete_time_tracking_hour_record_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/timetracking/delete/{id}', + method="DELETE", + resource_path="/api/v1/timetracking/delete/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -866,32 +729,26 @@ def _delete_time_tracking_hour_record_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_time_tracking_record( self, - id: Annotated[StrictStr, Field(description="The time tracking record ID used to originally create the record.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[ + StrictStr | None, Field(description="The time tracking record ID used to originally create the record.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TimeTrackingRecordSchema: """Get Time Tracking Record - Retrieves a single time tracking hour record by its ID. Returns the full record details including hours, date, employee, project, task, and shift differential information. The `project` and `shiftDifferential` fields are null when not applicable. For historical compatibility, missing records may surface as an empty/null payload rather than a strict not-found response. + Retrieves a single time tracking hour record by its ID. Returns the full record details including hours, date, employee, project, task, and shift differential information. The `project` and `shiftDifferential` fields are null when not applicable. For historical compatibility, missing records may surface as an empty/null payload rather than a strict not-found response. OAuth Scopes: time_tracking :param id: The time tracking record ID used to originally create the record. (required) :type id: str @@ -915,54 +772,43 @@ def get_time_tracking_record( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_time_tracking_record_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingRecordSchema", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingRecordSchema", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_time_tracking_record_with_http_info( self, - id: Annotated[StrictStr, Field(description="The time tracking record ID used to originally create the record.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[ + StrictStr | None, Field(description="The time tracking record ID used to originally create the record.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TimeTrackingRecordSchema]: """Get Time Tracking Record - Retrieves a single time tracking hour record by its ID. Returns the full record details including hours, date, employee, project, task, and shift differential information. The `project` and `shiftDifferential` fields are null when not applicable. For historical compatibility, missing records may surface as an empty/null payload rather than a strict not-found response. + Retrieves a single time tracking hour record by its ID. Returns the full record details including hours, date, employee, project, task, and shift differential information. The `project` and `shiftDifferential` fields are null when not applicable. For historical compatibility, missing records may surface as an empty/null payload rather than a strict not-found response. OAuth Scopes: time_tracking :param id: The time tracking record ID used to originally create the record. (required) :type id: str @@ -986,54 +832,43 @@ def get_time_tracking_record_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_time_tracking_record_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingRecordSchema", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingRecordSchema", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_time_tracking_record_without_preload_content( self, - id: Annotated[StrictStr, Field(description="The time tracking record ID used to originally create the record.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[ + StrictStr | None, Field(description="The time tracking record ID used to originally create the record.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Time Tracking Record - Retrieves a single time tracking hour record by its ID. Returns the full record details including hours, date, employee, project, task, and shift differential information. The `project` and `shiftDifferential` fields are null when not applicable. For historical compatibility, missing records may surface as an empty/null payload rather than a strict not-found response. + Retrieves a single time tracking hour record by its ID. Returns the full record details including hours, date, employee, project, task, and shift differential information. The `project` and `shiftDifferential` fields are null when not applicable. For historical compatibility, missing records may surface as an empty/null payload rather than a strict not-found response. OAuth Scopes: time_tracking :param id: The time tracking record ID used to originally create the record. (required) :type id: str @@ -1057,30 +892,22 @@ def get_time_tracking_record_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_time_tracking_record_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingRecordSchema", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingRecordSchema", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_time_tracking_record_serialize( self, id, @@ -1092,45 +919,33 @@ def _get_time_tracking_record_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/timetracking/record/{id}', + method="GET", + resource_path="/api/v1/timetracking/record/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1140,32 +955,24 @@ def _get_time_tracking_record_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_time_tracking_record( self, adjust_time_tracking_request_schema: AdjustTimeTrackingRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TimeTrackingIdResponseSchema: """Update Hour Record - Edits an existing hour record by `timeTrackingId`. + Edits an existing hour record by `timeTrackingId`. OAuth Scopes: time_tracking.write :param adjust_time_tracking_request_schema: (required) :type adjust_time_tracking_request_schema: AdjustTimeTrackingRequestSchema @@ -1189,52 +996,43 @@ def update_time_tracking_record( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_time_tracking_record_serialize( adjust_time_tracking_request_schema=adjust_time_tracking_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingIdResponseSchema", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingIdResponseSchema", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def update_time_tracking_record_with_http_info( self, adjust_time_tracking_request_schema: AdjustTimeTrackingRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TimeTrackingIdResponseSchema]: """Update Hour Record - Edits an existing hour record by `timeTrackingId`. + Edits an existing hour record by `timeTrackingId`. OAuth Scopes: time_tracking.write :param adjust_time_tracking_request_schema: (required) :type adjust_time_tracking_request_schema: AdjustTimeTrackingRequestSchema @@ -1258,52 +1056,43 @@ def update_time_tracking_record_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_time_tracking_record_serialize( adjust_time_tracking_request_schema=adjust_time_tracking_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingIdResponseSchema", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingIdResponseSchema", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_time_tracking_record_without_preload_content( self, adjust_time_tracking_request_schema: AdjustTimeTrackingRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Hour Record - Edits an existing hour record by `timeTrackingId`. + Edits an existing hour record by `timeTrackingId`. OAuth Scopes: time_tracking.write :param adjust_time_tracking_request_schema: (required) :type adjust_time_tracking_request_schema: AdjustTimeTrackingRequestSchema @@ -1327,28 +1116,24 @@ def update_time_tracking_record_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_time_tracking_record_serialize( adjust_time_tracking_request_schema=adjust_time_tracking_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingIdResponseSchema", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingIdResponseSchema", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_time_tracking_record_serialize( self, adjust_time_tracking_request_schema, @@ -1360,17 +1145,14 @@ def _update_time_tracking_record_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -1380,38 +1162,24 @@ def _update_time_tracking_record_serialize( if adjust_time_tracking_request_schema is not None: _body_params = adjust_time_tracking_request_schema - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/timetracking/adjust', + method="PUT", + resource_path="/api/v1/timetracking/adjust", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1421,7 +1189,5 @@ def _update_time_tracking_record_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/last_change_information_api.py b/bamboohr_sdk/api/last_change_information_api.py deleted file mode 100644 index 39db2ef..0000000 --- a/bamboohr_sdk/api/last_change_information_api.py +++ /dev/null @@ -1,334 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from datetime import datetime -from pydantic import Field, StrictStr, field_validator -from typing import Optional -from typing_extensions import Annotated -from bamboohr_sdk.models.changed_employee_ids_response import ChangedEmployeeIdsResponse - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse -from bamboohr_sdk.rest import RESTResponseType - - -class LastChangeInformationApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def get_changed_employee_ids( - self, - since: Annotated[datetime, Field(description="ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned.")], - type: Annotated[Optional[StrictStr], Field(description="Filter by change type. If omitted, all change types are returned.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ChangedEmployeeIdsResponse: - """Get Changed Employee IDs - - Returns a list of employee IDs that have changed since the given timestamp. This allows for efficient syncing of employee data — rather than downloading all employees, only those that have changed are returned. A change in ANY individual field in the employee record, as well as any change to the employment status, job info, or compensation tables, will cause that employee to be returned. Each entry includes the employee ID, the type of change (Inserted, Updated, or Deleted), and the last-changed timestamp. - - :param since: ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) - :type since: datetime - :param type: Filter by change type. If omitted, all change types are returned. - :type type: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_changed_employee_ids_serialize( - since=since, - type=type, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ChangedEmployeeIdsResponse", - '400': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_changed_employee_ids_with_http_info( - self, - since: Annotated[datetime, Field(description="ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned.")], - type: Annotated[Optional[StrictStr], Field(description="Filter by change type. If omitted, all change types are returned.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ChangedEmployeeIdsResponse]: - """Get Changed Employee IDs - - Returns a list of employee IDs that have changed since the given timestamp. This allows for efficient syncing of employee data — rather than downloading all employees, only those that have changed are returned. A change in ANY individual field in the employee record, as well as any change to the employment status, job info, or compensation tables, will cause that employee to be returned. Each entry includes the employee ID, the type of change (Inserted, Updated, or Deleted), and the last-changed timestamp. - - :param since: ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) - :type since: datetime - :param type: Filter by change type. If omitted, all change types are returned. - :type type: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_changed_employee_ids_serialize( - since=since, - type=type, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ChangedEmployeeIdsResponse", - '400': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_changed_employee_ids_without_preload_content( - self, - since: Annotated[datetime, Field(description="ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned.")], - type: Annotated[Optional[StrictStr], Field(description="Filter by change type. If omitted, all change types are returned.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Changed Employee IDs - - Returns a list of employee IDs that have changed since the given timestamp. This allows for efficient syncing of employee data — rather than downloading all employees, only those that have changed are returned. A change in ANY individual field in the employee record, as well as any change to the employment status, job info, or compensation tables, will cause that employee to be returned. Each entry includes the employee ID, the type of change (Inserted, Updated, or Deleted), and the last-changed timestamp. - - :param since: ISO 8601 timestamp (URL-encoded). Only employees changed since this timestamp will be returned. (required) - :type since: datetime - :param type: Filter by change type. If omitted, all change types are returned. - :type type: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_changed_employee_ids_serialize( - since=since, - type=type, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ChangedEmployeeIdsResponse", - '400': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_changed_employee_ids_serialize( - self, - since, - type, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if since is not None: - if isinstance(since, datetime): - _query_params.append( - ( - 'since', - since.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('since', since)) - - if type is not None: - - _query_params.append(('type', type)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employees/changed', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/bamboohr_sdk/api/locations_api.py b/bamboohr_sdk/api/locations_api.py new file mode 100644 index 0000000..736cfb9 --- /dev/null +++ b/bamboohr_sdk/api/locations_api.py @@ -0,0 +1,1406 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.create_location_request import CreateLocationRequest +from bamboohr_sdk.models.location_response_object import LocationResponseObject +from bamboohr_sdk.models.paged_location_response import PagedLocationResponse +from bamboohr_sdk.models.update_location_request import UpdateLocationRequest +from bamboohr_sdk.rest import RESTResponseType + + +class LocationsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def create_location( + self, + create_location_request: CreateLocationRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LocationResponseObject: + """Create a job location + + Creates a new job location. Requires a label and address. If remoteLocation is true, address fields are optional. OAuth Scopes: field.write + + :param create_location_request: (required) + :type create_location_request: CreateLocationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_location_serialize( + create_location_request=create_location_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "LocationResponseObject", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_location_with_http_info( + self, + create_location_request: CreateLocationRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LocationResponseObject]: + """Create a job location + + Creates a new job location. Requires a label and address. If remoteLocation is true, address fields are optional. OAuth Scopes: field.write + + :param create_location_request: (required) + :type create_location_request: CreateLocationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_location_serialize( + create_location_request=create_location_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "LocationResponseObject", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_location_without_preload_content( + self, + create_location_request: CreateLocationRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create a job location + + Creates a new job location. Requires a label and address. If remoteLocation is true, address fields are optional. OAuth Scopes: field.write + + :param create_location_request: (required) + :type create_location_request: CreateLocationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_location_serialize( + create_location_request=create_location_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "LocationResponseObject", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_location_serialize( + self, + create_location_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_location_request is not None: + _body_params = create_location_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/hris/org/locations", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_location( + self, + id: Annotated[StrictStr | None, Field(description="The ID of the location to delete")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a job location + + Deletes a job location by its ID. Returns 204 No Content on success. OAuth Scopes: field.write + + :param id: The ID of the location to delete (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_location_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_location_with_http_info( + self, + id: Annotated[StrictStr | None, Field(description="The ID of the location to delete")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a job location + + Deletes a job location by its ID. Returns 204 No Content on success. OAuth Scopes: field.write + + :param id: The ID of the location to delete (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_location_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_location_without_preload_content( + self, + id: Annotated[StrictStr | None, Field(description="The ID of the location to delete")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a job location + + Deletes a job location by its ID. Returns 204 No Content on success. OAuth Scopes: field.write + + :param id: The ID of the location to delete (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_location_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_location_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/problem+json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/hris/org/locations/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_location( + self, + id: Annotated[StrictStr | None, Field(description="The ID of the location")], + expand: Annotated[ + list[StrictStr] | None, + Field( + description="Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country" + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LocationResponseObject: + """Get a job location + + Retrieves a single job location by its ID. Returns the full location resource including address details. OAuth Scopes: field + + :param id: The ID of the location (required) + :type id: str + :param expand: Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country + :type expand: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_location_serialize( + id=id, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "LocationResponseObject", + "422": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_location_with_http_info( + self, + id: Annotated[StrictStr | None, Field(description="The ID of the location")], + expand: Annotated[ + list[StrictStr] | None, + Field( + description="Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country" + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LocationResponseObject]: + """Get a job location + + Retrieves a single job location by its ID. Returns the full location resource including address details. OAuth Scopes: field + + :param id: The ID of the location (required) + :type id: str + :param expand: Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country + :type expand: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_location_serialize( + id=id, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "LocationResponseObject", + "422": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_location_without_preload_content( + self, + id: Annotated[StrictStr | None, Field(description="The ID of the location")], + expand: Annotated[ + list[StrictStr] | None, + Field( + description="Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country" + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a job location + + Retrieves a single job location by its ID. Returns the full location resource including address details. OAuth Scopes: field + + :param id: The ID of the location (required) + :type id: str + :param expand: Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country + :type expand: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_location_serialize( + id=id, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "LocationResponseObject", + "422": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_location_serialize( + self, + id, + expand, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = { + "expand": "csv", + } + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + if expand is not None: + _query_params.append(("expand", expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/hris/org/locations/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_locations( + self, + page_size: Annotated[StrictInt | None, Field(description="The number of items to return per page.")] = None, + page: Annotated[StrictInt | None, Field(description="The page number to retrieve.")] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt" + ), + ] = None, + select: Annotated[ + StrictStr | None, + Field( + description="Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt" + ), + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation" + ), + ] = None, + expand: Annotated[ + list[StrictStr] | None, + Field( + description="Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country" + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PagedLocationResponse: + """List job locations + + Retrieves a paginated list of job locations. Returns active locations by default. Supports pagination via page and pageSize query parameters. OAuth Scopes: field + + :param page_size: The number of items to return per page. + :type page_size: int + :param page: The page number to retrieve. + :type page: int + :param sort: Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt + :type sort: str + :param select: Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt + :type select: str + :param filter: Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation + :type filter: str + :param expand: Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country + :type expand: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_locations_serialize( + page_size=page_size, + page=page, + sort=sort, + select=select, + filter=filter, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PagedLocationResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "429": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_locations_with_http_info( + self, + page_size: Annotated[StrictInt | None, Field(description="The number of items to return per page.")] = None, + page: Annotated[StrictInt | None, Field(description="The page number to retrieve.")] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt" + ), + ] = None, + select: Annotated[ + StrictStr | None, + Field( + description="Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt" + ), + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation" + ), + ] = None, + expand: Annotated[ + list[StrictStr] | None, + Field( + description="Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country" + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PagedLocationResponse]: + """List job locations + + Retrieves a paginated list of job locations. Returns active locations by default. Supports pagination via page and pageSize query parameters. OAuth Scopes: field + + :param page_size: The number of items to return per page. + :type page_size: int + :param page: The page number to retrieve. + :type page: int + :param sort: Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt + :type sort: str + :param select: Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt + :type select: str + :param filter: Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation + :type filter: str + :param expand: Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country + :type expand: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_locations_serialize( + page_size=page_size, + page=page, + sort=sort, + select=select, + filter=filter, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PagedLocationResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "429": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_locations_without_preload_content( + self, + page_size: Annotated[StrictInt | None, Field(description="The number of items to return per page.")] = None, + page: Annotated[StrictInt | None, Field(description="The page number to retrieve.")] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt" + ), + ] = None, + select: Annotated[ + StrictStr | None, + Field( + description="Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt" + ), + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation" + ), + ] = None, + expand: Annotated[ + list[StrictStr] | None, + Field( + description="Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country" + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List job locations + + Retrieves a paginated list of job locations. Returns active locations by default. Supports pagination via page and pageSize query parameters. OAuth Scopes: field + + :param page_size: The number of items to return per page. + :type page_size: int + :param page: The page number to retrieve. + :type page: int + :param sort: Ordering by OData (Open Data Protocol) v4 specification. Supported fields: label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt + :type sort: str + :param select: Projection (field selection) by OData specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation, createdAt, archivedAt + :type select: str + :param filter: Filter by an OData (Open Data Protocol) v4 specification. Supported fields: id, label, archived, manageable, address/address1, address/address2, address/city, address/stateId, address/zipcode, address/countryId, address/timezone, address/remoteLocation + :type filter: str + :param expand: Comma-separated list of related resources to expand. Supported values: state, country. Example: expand=state,country + :type expand: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_locations_serialize( + page_size=page_size, + page=page, + sort=sort, + select=select, + filter=filter, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PagedLocationResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "429": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_locations_serialize( + self, + page_size, + page, + sort, + select, + filter, + expand, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = { + "expand": "csv", + } + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + if page is not None: + _query_params.append(("page", page)) + + if sort is not None: + _query_params.append(("sort", sort)) + + if select is not None: + _query_params.append(("select", select)) + + if filter is not None: + _query_params.append(("filter", filter)) + + if expand is not None: + _query_params.append(("expand", expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/hris/org/locations", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_location( + self, + id: Annotated[StrictStr | None, Field(description="The ID of the location to update")], + update_location_request: UpdateLocationRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LocationResponseObject: + """Update a job location + + Updates an existing job location. OAuth Scopes: field.write + + :param id: The ID of the location to update (required) + :type id: str + :param update_location_request: (required) + :type update_location_request: UpdateLocationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_location_serialize( + id=id, + update_location_request=update_location_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "LocationResponseObject", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_location_with_http_info( + self, + id: Annotated[StrictStr | None, Field(description="The ID of the location to update")], + update_location_request: UpdateLocationRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LocationResponseObject]: + """Update a job location + + Updates an existing job location. OAuth Scopes: field.write + + :param id: The ID of the location to update (required) + :type id: str + :param update_location_request: (required) + :type update_location_request: UpdateLocationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_location_serialize( + id=id, + update_location_request=update_location_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "LocationResponseObject", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_location_without_preload_content( + self, + id: Annotated[StrictStr | None, Field(description="The ID of the location to update")], + update_location_request: UpdateLocationRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update a job location + + Updates an existing job location. OAuth Scopes: field.write + + :param id: The ID of the location to update (required) + :type id: str + :param update_location_request: (required) + :type update_location_request: UpdateLocationRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_location_serialize( + id=id, + update_location_request=update_location_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "LocationResponseObject", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_location_serialize( + self, + id, + update_location_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_location_request is not None: + _body_params = update_location_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/hris/org/locations/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/login_api.py b/bamboohr_sdk/api/login_api.py index c5f69f6..d72812f 100644 --- a/bamboohr_sdk/api/login_api.py +++ b/bamboohr_sdk/api/login_api.py @@ -1,28 +1,22 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any -from pydantic import Field, StrictStr, field_validator -from typing import Optional -from typing_extensions import Annotated -from bamboohr_sdk.models.login_response import LoginResponse +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call from bamboohr_sdk.api_client import ApiClient, RequestSerialized from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.login_response import LoginResponse from bamboohr_sdk.rest import RESTResponseType @@ -38,32 +32,41 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def login( self, - application_key: Annotated[StrictStr, Field(description="The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted.")], + application_key: Annotated[ + StrictStr, + Field( + description="The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted." + ), + ], user: Annotated[StrictStr, Field(description="The user's email address or username.")], password: Annotated[StrictStr, Field(description="The user's password.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - format: Annotated[Optional[StrictStr], Field(description="When set to `json`, forces a JSON response regardless of the `Accept` header.")] = None, - device_id: Annotated[Optional[StrictStr], Field(description="Optional device identifier. When provided, the generated API key is associated with this device.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + format: Annotated[ + StrictStr | None, + Field(description="When set to `json`, forces a JSON response regardless of the `Accept` header."), + ] = None, + device_id: Annotated[ + StrictStr | None, + Field( + description="Optional device identifier. When provided, the generated API key is associated with this device." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> LoginResponse: """(Deprecated) Login - Exchanges username, password, and application key for a persistent API key scoped to that user and application. No pre-existing authentication is required; credentials are passed in the request body. This endpoint is deprecated. Prefer OAuth or OpenID for new integrations. `applicationKey` must correspond to a registered non-mobile application; iOS and Android app keys are explicitly rejected with a 403 (no body). The optional `deviceId` associates the generated key with a specific device. Response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. Alternatively, set `?format=json` in the query string to force JSON regardless of the `Accept` header. + Exchanges username, password, and application key for a persistent API key scoped to that user and application. No pre-existing authentication is required; credentials are passed in the request body. On success, returns a persistent API key, the authenticated user ID, the linked employee ID (null when no employee record is associated), and the base API URL to use for subsequent requests. This endpoint is deprecated. New integrations should prefer OAuth or OpenID Connect instead. `applicationKey` must correspond to a registered non-mobile application; iOS and Android app keys are explicitly rejected with a 403 (no body). The optional `deviceId` associates the generated key with a specific device. Response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. Alternatively, set `?format=json` in the query string to force JSON regardless of the `Accept` header. Note: If the company has SSO enabled and password login is disabled, this endpoint returns HTTP 200 with a plain-text error message rather than a structured error response. :param application_key: The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted. (required) :type application_key: str @@ -97,7 +100,7 @@ def login( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ warnings.warn("POST /api/v1/login is deprecated.", DeprecationWarning) _param = self._login_serialize( @@ -110,50 +113,56 @@ def login( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "LoginResponse", - '403': "LoginFailureResponse", - '500': "LoginFailureResponse", + _response_types_map: dict[str, str | None] = { + "200": "LoginResponse", + "403": "LoginFailureResponse", + "500": "LoginFailureResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def login_with_http_info( self, - application_key: Annotated[StrictStr, Field(description="The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted.")], + application_key: Annotated[ + StrictStr, + Field( + description="The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted." + ), + ], user: Annotated[StrictStr, Field(description="The user's email address or username.")], password: Annotated[StrictStr, Field(description="The user's password.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - format: Annotated[Optional[StrictStr], Field(description="When set to `json`, forces a JSON response regardless of the `Accept` header.")] = None, - device_id: Annotated[Optional[StrictStr], Field(description="Optional device identifier. When provided, the generated API key is associated with this device.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + format: Annotated[ + StrictStr | None, + Field(description="When set to `json`, forces a JSON response regardless of the `Accept` header."), + ] = None, + device_id: Annotated[ + StrictStr | None, + Field( + description="Optional device identifier. When provided, the generated API key is associated with this device." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[LoginResponse]: """(Deprecated) Login - Exchanges username, password, and application key for a persistent API key scoped to that user and application. No pre-existing authentication is required; credentials are passed in the request body. This endpoint is deprecated. Prefer OAuth or OpenID for new integrations. `applicationKey` must correspond to a registered non-mobile application; iOS and Android app keys are explicitly rejected with a 403 (no body). The optional `deviceId` associates the generated key with a specific device. Response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. Alternatively, set `?format=json` in the query string to force JSON regardless of the `Accept` header. + Exchanges username, password, and application key for a persistent API key scoped to that user and application. No pre-existing authentication is required; credentials are passed in the request body. On success, returns a persistent API key, the authenticated user ID, the linked employee ID (null when no employee record is associated), and the base API URL to use for subsequent requests. This endpoint is deprecated. New integrations should prefer OAuth or OpenID Connect instead. `applicationKey` must correspond to a registered non-mobile application; iOS and Android app keys are explicitly rejected with a 403 (no body). The optional `deviceId` associates the generated key with a specific device. Response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. Alternatively, set `?format=json` in the query string to force JSON regardless of the `Accept` header. Note: If the company has SSO enabled and password login is disabled, this endpoint returns HTTP 200 with a plain-text error message rather than a structured error response. :param application_key: The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted. (required) :type application_key: str @@ -187,7 +196,7 @@ def login_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ warnings.warn("POST /api/v1/login is deprecated.", DeprecationWarning) _param = self._login_serialize( @@ -200,50 +209,56 @@ def login_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "LoginResponse", - '403': "LoginFailureResponse", - '500': "LoginFailureResponse", + _response_types_map: dict[str, str | None] = { + "200": "LoginResponse", + "403": "LoginFailureResponse", + "500": "LoginFailureResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def login_without_preload_content( self, - application_key: Annotated[StrictStr, Field(description="The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted.")], + application_key: Annotated[ + StrictStr, + Field( + description="The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted." + ), + ], user: Annotated[StrictStr, Field(description="The user's email address or username.")], password: Annotated[StrictStr, Field(description="The user's password.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - format: Annotated[Optional[StrictStr], Field(description="When set to `json`, forces a JSON response regardless of the `Accept` header.")] = None, - device_id: Annotated[Optional[StrictStr], Field(description="Optional device identifier. When provided, the generated API key is associated with this device.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + format: Annotated[ + StrictStr | None, + Field(description="When set to `json`, forces a JSON response regardless of the `Accept` header."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + device_id: Annotated[ + StrictStr | None, + Field( + description="Optional device identifier. When provided, the generated API key is associated with this device." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """(Deprecated) Login - Exchanges username, password, and application key for a persistent API key scoped to that user and application. No pre-existing authentication is required; credentials are passed in the request body. This endpoint is deprecated. Prefer OAuth or OpenID for new integrations. `applicationKey` must correspond to a registered non-mobile application; iOS and Android app keys are explicitly rejected with a 403 (no body). The optional `deviceId` associates the generated key with a specific device. Response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. Alternatively, set `?format=json` in the query string to force JSON regardless of the `Accept` header. + Exchanges username, password, and application key for a persistent API key scoped to that user and application. No pre-existing authentication is required; credentials are passed in the request body. On success, returns a persistent API key, the authenticated user ID, the linked employee ID (null when no employee record is associated), and the base API URL to use for subsequent requests. This endpoint is deprecated. New integrations should prefer OAuth or OpenID Connect instead. `applicationKey` must correspond to a registered non-mobile application; iOS and Android app keys are explicitly rejected with a 403 (no body). The optional `deviceId` associates the generated key with a specific device. Response format is determined by the `Accept` request header. Send `Accept: application/json` to receive JSON; omit the header or send any other value to receive XML. Alternatively, set `?format=json` in the query string to force JSON regardless of the `Accept` header. Note: If the company has SSO enabled and password login is disabled, this endpoint returns HTTP 200 with a plain-text error message rather than a structured error response. :param application_key: The API key of the registered application making the login request. Mobile application keys (iOS/Android) are not accepted. (required) :type application_key: str @@ -277,7 +292,7 @@ def login_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ warnings.warn("POST /api/v1/login is deprecated.", DeprecationWarning) _param = self._login_serialize( @@ -290,21 +305,17 @@ def login_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "LoginResponse", - '403': "LoginFailureResponse", - '500': "LoginFailureResponse", + _response_types_map: dict[str, str | None] = { + "200": "LoginResponse", + "403": "LoginFailureResponse", + "500": "LoginFailureResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _login_serialize( self, application_key, @@ -321,69 +332,52 @@ def _login_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters if format is not None: - - _query_params.append(('format', format)) - + _query_params.append(("format", format)) + # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters if application_key is not None: - _form_params.append(('applicationKey', application_key)) + _form_params.append(("applicationKey", application_key)) if user is not None: - _form_params.append(('user', user)) + _form_params.append(("user", user)) if password is not None: - _form_params.append(('password', password)) + _form_params.append(("password", password)) if device_id is not None: - _form_params.append(('deviceId', device_id)) + _form_params.append(("deviceId", device_id)) # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/x-www-form-urlencoded"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - ] + _auth_settings: list[str] = [] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/login', + method="POST", + resource_path="/api/v1/login", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -393,7 +387,5 @@ def _login_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/manual_api.py b/bamboohr_sdk/api/manual_api.py index 3939148..1c55894 100644 --- a/bamboohr_sdk/api/manual_api.py +++ b/bamboohr_sdk/api/manual_api.py @@ -26,12 +26,11 @@ import json import logging -from typing import Any, Dict, List, Optional, Tuple, Union -from urllib.parse import urlencode +from typing import Any +from bamboohr_sdk import rest from bamboohr_sdk.api_client import ApiClient from bamboohr_sdk.api_response import ApiResponse -from bamboohr_sdk import rest from bamboohr_sdk.exceptions import ApiException logger = logging.getLogger("bamboohr_sdk") @@ -55,7 +54,7 @@ class ManualApi: :class:`~bamboohr_sdk.client.bamboohr_client.BambooHRClient`). """ - def __init__(self, api_client: Optional[ApiClient] = None) -> None: + def __init__(self, api_client: ApiClient | None = None) -> None: if api_client is None: api_client = ApiClient.get_default() self.api_client = api_client @@ -67,9 +66,9 @@ def __init__(self, api_client: Optional[ApiClient] = None) -> None: def get( self, resource_path: str, - query_params: Optional[Dict[str, Any]] = None, - headers: Optional[Dict[str, str]] = None, - _request_timeout: Optional[Union[float, Tuple[float, float]]] = None, + query_params: dict[str, Any] | None = None, + headers: dict[str, str] | None = None, + _request_timeout: float | tuple[float, float] | None = None, ) -> ApiResponse: """Perform a GET request. @@ -79,15 +78,17 @@ def get( :param _request_timeout: Per-request timeout override. :return: :class:`ApiResponse` with ``status_code``, ``data``, ``headers``, and ``raw_data``. """ - return self.request("GET", resource_path, query_params=query_params, headers=headers, _request_timeout=_request_timeout) + return self.request( + "GET", resource_path, query_params=query_params, headers=headers, _request_timeout=_request_timeout + ) def post( self, resource_path: str, - query_params: Optional[Dict[str, Any]] = None, - headers: Optional[Dict[str, str]] = None, + query_params: dict[str, Any] | None = None, + headers: dict[str, str] | None = None, body: Any = None, - _request_timeout: Optional[Union[float, Tuple[float, float]]] = None, + _request_timeout: float | tuple[float, float] | None = None, ) -> ApiResponse: """Perform a POST request. @@ -98,15 +99,22 @@ def post( :param _request_timeout: Per-request timeout override. :return: :class:`ApiResponse`. """ - return self.request("POST", resource_path, query_params=query_params, headers=headers, body=body, _request_timeout=_request_timeout) + return self.request( + "POST", + resource_path, + query_params=query_params, + headers=headers, + body=body, + _request_timeout=_request_timeout, + ) def put( self, resource_path: str, - query_params: Optional[Dict[str, Any]] = None, - headers: Optional[Dict[str, str]] = None, + query_params: dict[str, Any] | None = None, + headers: dict[str, str] | None = None, body: Any = None, - _request_timeout: Optional[Union[float, Tuple[float, float]]] = None, + _request_timeout: float | tuple[float, float] | None = None, ) -> ApiResponse: """Perform a PUT request. @@ -117,15 +125,22 @@ def put( :param _request_timeout: Per-request timeout override. :return: :class:`ApiResponse`. """ - return self.request("PUT", resource_path, query_params=query_params, headers=headers, body=body, _request_timeout=_request_timeout) + return self.request( + "PUT", + resource_path, + query_params=query_params, + headers=headers, + body=body, + _request_timeout=_request_timeout, + ) def delete( self, resource_path: str, - query_params: Optional[Dict[str, Any]] = None, - headers: Optional[Dict[str, str]] = None, + query_params: dict[str, Any] | None = None, + headers: dict[str, str] | None = None, body: Any = None, - _request_timeout: Optional[Union[float, Tuple[float, float]]] = None, + _request_timeout: float | tuple[float, float] | None = None, ) -> ApiResponse: """Perform a DELETE request. @@ -136,7 +151,14 @@ def delete( :param _request_timeout: Per-request timeout override. :return: :class:`ApiResponse`. """ - return self.request("DELETE", resource_path, query_params=query_params, headers=headers, body=body, _request_timeout=_request_timeout) + return self.request( + "DELETE", + resource_path, + query_params=query_params, + headers=headers, + body=body, + _request_timeout=_request_timeout, + ) # ------------------------------------------------------------------ # Core request method @@ -146,10 +168,10 @@ def request( self, method: str, resource_path: str, - query_params: Optional[Dict[str, Any]] = None, - headers: Optional[Dict[str, str]] = None, + query_params: dict[str, Any] | None = None, + headers: dict[str, str] | None = None, body: Any = None, - _request_timeout: Optional[Union[float, Tuple[float, float]]] = None, + _request_timeout: float | tuple[float, float] | None = None, ) -> ApiResponse: """Perform an arbitrary HTTP request through the SDK infrastructure. @@ -215,8 +237,8 @@ def _prepare_body(body: Any) -> Any: @staticmethod def _dict_to_query_tuples( - params: Optional[Dict[str, Any]], - ) -> Optional[List[Tuple[str, str]]]: + params: dict[str, Any] | None, + ) -> list[tuple[str, str]] | None: """Convert a flat dict to the list-of-tuples format expected by :meth:`ApiClient.param_serialize`. """ diff --git a/bamboohr_sdk/api/meal_rest_breaks_api.py b/bamboohr_sdk/api/meal_rest_breaks_api.py new file mode 100644 index 0000000..4509d6f --- /dev/null +++ b/bamboohr_sdk/api/meal_rest_breaks_api.py @@ -0,0 +1,5171 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any +from uuid import UUID + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.assign_employees_to_break_policy_request import AssignEmployeesToBreakPolicyRequest +from bamboohr_sdk.models.get_break_policy_suggestions_request import GetBreakPolicySuggestionsRequest +from bamboohr_sdk.models.set_break_policy_employees_request import SetBreakPolicyEmployeesRequest +from bamboohr_sdk.models.time_tracking_break_policy_suggestions_response_v1 import ( + TimeTrackingBreakPolicySuggestionsResponseV1, +) +from bamboohr_sdk.models.time_tracking_create_or_update_time_tracking_break_without_policy_v1 import ( + TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1, +) +from bamboohr_sdk.models.time_tracking_create_time_tracking_break_policy_v1 import ( + TimeTrackingCreateTimeTrackingBreakPolicyV1, +) +from bamboohr_sdk.models.time_tracking_create_time_tracking_break_v1 import TimeTrackingCreateTimeTrackingBreakV1 +from bamboohr_sdk.models.time_tracking_paginated_break_assessments_response_v1 import ( + TimeTrackingPaginatedBreakAssessmentsResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_break_policies_response_v1 import ( + TimeTrackingPaginatedBreakPoliciesResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_break_policy_employees_response_v1 import ( + TimeTrackingPaginatedBreakPolicyEmployeesResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_breaks_response_v1 import TimeTrackingPaginatedBreaksResponseV1 +from bamboohr_sdk.models.time_tracking_sync_time_tracking_break_policy_v1 import ( + TimeTrackingSyncTimeTrackingBreakPolicyV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_break_availability_v1 import ( + TimeTrackingTimeTrackingBreakAvailabilityV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_break_policy_v1 import TimeTrackingTimeTrackingBreakPolicyV1 +from bamboohr_sdk.models.time_tracking_time_tracking_break_policy_with_relations_v1 import ( + TimeTrackingTimeTrackingBreakPolicyWithRelationsV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_break_v1 import TimeTrackingTimeTrackingBreakV1 +from bamboohr_sdk.models.time_tracking_update_time_tracking_break_policy_v1 import ( + TimeTrackingUpdateTimeTrackingBreakPolicyV1, +) +from bamboohr_sdk.models.time_tracking_update_time_tracking_break_v1 import TimeTrackingUpdateTimeTrackingBreakV1 +from bamboohr_sdk.models.unassign_employees_from_break_policy_request import UnassignEmployeesFromBreakPolicyRequest +from bamboohr_sdk.rest import RESTResponseType + + +class MealRestBreaksApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def assign_employees_to_break_policy( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + assign_employees_to_break_policy_request: AssignEmployeesToBreakPolicyRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Assign Employees to Break Policy + + Assigns employees to a break policy. Adds the specified employees to the policy without removing existing assignments. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param assign_employees_to_break_policy_request: (required) + :type assign_employees_to_break_policy_request: AssignEmployeesToBreakPolicyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._assign_employees_to_break_policy_serialize( + id=id, + assign_employees_to_break_policy_request=assign_employees_to_break_policy_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def assign_employees_to_break_policy_with_http_info( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + assign_employees_to_break_policy_request: AssignEmployeesToBreakPolicyRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Assign Employees to Break Policy + + Assigns employees to a break policy. Adds the specified employees to the policy without removing existing assignments. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param assign_employees_to_break_policy_request: (required) + :type assign_employees_to_break_policy_request: AssignEmployeesToBreakPolicyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._assign_employees_to_break_policy_serialize( + id=id, + assign_employees_to_break_policy_request=assign_employees_to_break_policy_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def assign_employees_to_break_policy_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + assign_employees_to_break_policy_request: AssignEmployeesToBreakPolicyRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Assign Employees to Break Policy + + Assigns employees to a break policy. Adds the specified employees to the policy without removing existing assignments. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param assign_employees_to_break_policy_request: (required) + :type assign_employees_to_break_policy_request: AssignEmployeesToBreakPolicyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._assign_employees_to_break_policy_serialize( + id=id, + assign_employees_to_break_policy_request=assign_employees_to_break_policy_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _assign_employees_to_break_policy_serialize( + self, + id, + assign_employees_to_break_policy_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if assign_employees_to_break_policy_request is not None: + _body_params = assign_employees_to_break_policy_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/time-tracking/break-policies/{id}/assign", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_break( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + time_tracking_create_time_tracking_break_v1: TimeTrackingCreateTimeTrackingBreakV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingTimeTrackingBreakV1: + """Create Break + + Creates a new break and associates it with the specified break policy. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param time_tracking_create_time_tracking_break_v1: (required) + :type time_tracking_create_time_tracking_break_v1: TimeTrackingCreateTimeTrackingBreakV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_break_serialize( + id=id, + time_tracking_create_time_tracking_break_v1=time_tracking_create_time_tracking_break_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingTimeTrackingBreakV1", + "422": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_break_with_http_info( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + time_tracking_create_time_tracking_break_v1: TimeTrackingCreateTimeTrackingBreakV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingTimeTrackingBreakV1]: + """Create Break + + Creates a new break and associates it with the specified break policy. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param time_tracking_create_time_tracking_break_v1: (required) + :type time_tracking_create_time_tracking_break_v1: TimeTrackingCreateTimeTrackingBreakV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_break_serialize( + id=id, + time_tracking_create_time_tracking_break_v1=time_tracking_create_time_tracking_break_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingTimeTrackingBreakV1", + "422": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_break_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + time_tracking_create_time_tracking_break_v1: TimeTrackingCreateTimeTrackingBreakV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Break + + Creates a new break and associates it with the specified break policy. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param time_tracking_create_time_tracking_break_v1: (required) + :type time_tracking_create_time_tracking_break_v1: TimeTrackingCreateTimeTrackingBreakV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_break_serialize( + id=id, + time_tracking_create_time_tracking_break_v1=time_tracking_create_time_tracking_break_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingTimeTrackingBreakV1", + "422": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_break_serialize( + self, + id, + time_tracking_create_time_tracking_break_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if time_tracking_create_time_tracking_break_v1 is not None: + _body_params = time_tracking_create_time_tracking_break_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/time-tracking/break-policies/{id}/breaks", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_break_policy( + self, + time_tracking_create_time_tracking_break_policy_v1: TimeTrackingCreateTimeTrackingBreakPolicyV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingTimeTrackingBreakPolicyWithRelationsV1: + """Create Break Policy + + Create a break policy. Breaks and assignments can be optionally included and created at the same time. OAuth Scopes: time_tracking:breaks.write + + :param time_tracking_create_time_tracking_break_policy_v1: (required) + :type time_tracking_create_time_tracking_break_policy_v1: TimeTrackingCreateTimeTrackingBreakPolicyV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_break_policy_serialize( + time_tracking_create_time_tracking_break_policy_v1=time_tracking_create_time_tracking_break_policy_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_break_policy_with_http_info( + self, + time_tracking_create_time_tracking_break_policy_v1: TimeTrackingCreateTimeTrackingBreakPolicyV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingTimeTrackingBreakPolicyWithRelationsV1]: + """Create Break Policy + + Create a break policy. Breaks and assignments can be optionally included and created at the same time. OAuth Scopes: time_tracking:breaks.write + + :param time_tracking_create_time_tracking_break_policy_v1: (required) + :type time_tracking_create_time_tracking_break_policy_v1: TimeTrackingCreateTimeTrackingBreakPolicyV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_break_policy_serialize( + time_tracking_create_time_tracking_break_policy_v1=time_tracking_create_time_tracking_break_policy_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_break_policy_without_preload_content( + self, + time_tracking_create_time_tracking_break_policy_v1: TimeTrackingCreateTimeTrackingBreakPolicyV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Break Policy + + Create a break policy. Breaks and assignments can be optionally included and created at the same time. OAuth Scopes: time_tracking:breaks.write + + :param time_tracking_create_time_tracking_break_policy_v1: (required) + :type time_tracking_create_time_tracking_break_policy_v1: TimeTrackingCreateTimeTrackingBreakPolicyV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_break_policy_serialize( + time_tracking_create_time_tracking_break_policy_v1=time_tracking_create_time_tracking_break_policy_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_break_policy_serialize( + self, + time_tracking_create_time_tracking_break_policy_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if time_tracking_create_time_tracking_break_policy_v1 is not None: + _body_params = time_tracking_create_time_tracking_break_policy_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/time-tracking/break-policies", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_break( + self, + id: Annotated[UUID, Field(description="The break ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Break + + Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. OAuth Scopes: time_tracking:breaks.write + + :param id: The break ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_break_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_break_with_http_info( + self, + id: Annotated[UUID, Field(description="The break ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Break + + Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. OAuth Scopes: time_tracking:breaks.write + + :param id: The break ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_break_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_break_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Break + + Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. OAuth Scopes: time_tracking:breaks.write + + :param id: The break ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_break_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_break_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/time-tracking/breaks/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_break_policy( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Break Policy + + Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_break_policy_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_break_policy_with_http_info( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Break Policy + + Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_break_policy_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_break_policy_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Break Policy + + Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_break_policy_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_break_policy_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/time-tracking/break-policies/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_break( + self, + id: Annotated[UUID, Field(description="The break ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingTimeTrackingBreakV1: + """Get Break + + Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration. OAuth Scopes: time_tracking:breaks + + :param id: The break ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_break_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_break_with_http_info( + self, + id: Annotated[UUID, Field(description="The break ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingTimeTrackingBreakV1]: + """Get Break + + Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration. OAuth Scopes: time_tracking:breaks + + :param id: The break ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_break_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_break_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Break + + Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration. OAuth Scopes: time_tracking:breaks + + :param id: The break ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_break_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_break_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/breaks/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_break_policy( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + include_counts: Annotated[StrictBool | None, Field(description="Include employee and break counts")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingTimeTrackingBreakPolicyV1: + """Get Break Policy + + Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks. OAuth Scopes: time_tracking:breaks + + :param id: The break policy ID. (required) + :type id: str + :param include_counts: Include employee and break counts + :type include_counts: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_break_policy_serialize( + id=id, + include_counts=include_counts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakPolicyV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_break_policy_with_http_info( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + include_counts: Annotated[StrictBool | None, Field(description="Include employee and break counts")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingTimeTrackingBreakPolicyV1]: + """Get Break Policy + + Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks. OAuth Scopes: time_tracking:breaks + + :param id: The break policy ID. (required) + :type id: str + :param include_counts: Include employee and break counts + :type include_counts: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_break_policy_serialize( + id=id, + include_counts=include_counts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakPolicyV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_break_policy_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + include_counts: Annotated[StrictBool | None, Field(description="Include employee and break counts")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Break Policy + + Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks. OAuth Scopes: time_tracking:breaks + + :param id: The break policy ID. (required) + :type id: str + :param include_counts: Include employee and break counts + :type include_counts: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_break_policy_serialize( + id=id, + include_counts=include_counts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakPolicyV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_break_policy_serialize( + self, + id, + include_counts, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + if include_counts is not None: + _query_params.append(("includeCounts", include_counts)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/break-policies/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_break_policy_suggestions( + self, + get_break_policy_suggestions_request: GetBreakPolicySuggestionsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingBreakPolicySuggestionsResponseV1: + """Get Break Policy Suggestions + + Uses an AI agent to analyze existing break policies and company context, then returns structured meal and rest break policy recommendations ready for form pre-fill. OAuth Scopes: time_tracking:breaks + + :param get_break_policy_suggestions_request: (required) + :type get_break_policy_suggestions_request: GetBreakPolicySuggestionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_break_policy_suggestions_serialize( + get_break_policy_suggestions_request=get_break_policy_suggestions_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingBreakPolicySuggestionsResponseV1", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_break_policy_suggestions_with_http_info( + self, + get_break_policy_suggestions_request: GetBreakPolicySuggestionsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingBreakPolicySuggestionsResponseV1]: + """Get Break Policy Suggestions + + Uses an AI agent to analyze existing break policies and company context, then returns structured meal and rest break policy recommendations ready for form pre-fill. OAuth Scopes: time_tracking:breaks + + :param get_break_policy_suggestions_request: (required) + :type get_break_policy_suggestions_request: GetBreakPolicySuggestionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_break_policy_suggestions_serialize( + get_break_policy_suggestions_request=get_break_policy_suggestions_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingBreakPolicySuggestionsResponseV1", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_break_policy_suggestions_without_preload_content( + self, + get_break_policy_suggestions_request: GetBreakPolicySuggestionsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Break Policy Suggestions + + Uses an AI agent to analyze existing break policies and company context, then returns structured meal and rest break policy recommendations ready for form pre-fill. OAuth Scopes: time_tracking:breaks + + :param get_break_policy_suggestions_request: (required) + :type get_break_policy_suggestions_request: GetBreakPolicySuggestionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_break_policy_suggestions_serialize( + get_break_policy_suggestions_request=get_break_policy_suggestions_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingBreakPolicySuggestionsResponseV1", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_break_policy_suggestions_serialize( + self, + get_break_policy_suggestions_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if get_break_policy_suggestions_request is not None: + _body_params = get_break_policy_suggestions_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/time-tracking/break-policies/suggestions", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_break_assessments( + self, + offset: Annotated[ + Annotated[int, Field(strict=True, ge=0)] | None, + Field(description="Number of items to skip before returning results. Defaults to 0."), + ] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True, ge=0)] | None, + Field(description="Maximum number of items to return. Defaults to 100. Maximum is 500."), + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingPaginatedBreakAssessmentsResponseV1: + """List Break Assessments + + Returns a paginated list of break assessments. A break assessment records whether an employee complied with their assigned break policy for a given day, along with any violations. Use the `filter` parameter to scope results by employee, date, result, or other fields. Use `offset` and `limit` for pagination; `limit` defaults to 100 and may not exceed 500. OAuth Scopes: time_tracking:breaks + + :param offset: Number of items to skip before returning results. Defaults to 0. + :type offset: int + :param limit: Maximum number of items to return. Defaults to 100. Maximum is 500. + :type limit: int + :param filter: OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`. + :type filter: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_break_assessments_serialize( + offset=offset, + limit=limit, + filter=filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreakAssessmentsResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_break_assessments_with_http_info( + self, + offset: Annotated[ + Annotated[int, Field(strict=True, ge=0)] | None, + Field(description="Number of items to skip before returning results. Defaults to 0."), + ] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True, ge=0)] | None, + Field(description="Maximum number of items to return. Defaults to 100. Maximum is 500."), + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingPaginatedBreakAssessmentsResponseV1]: + """List Break Assessments + + Returns a paginated list of break assessments. A break assessment records whether an employee complied with their assigned break policy for a given day, along with any violations. Use the `filter` parameter to scope results by employee, date, result, or other fields. Use `offset` and `limit` for pagination; `limit` defaults to 100 and may not exceed 500. OAuth Scopes: time_tracking:breaks + + :param offset: Number of items to skip before returning results. Defaults to 0. + :type offset: int + :param limit: Maximum number of items to return. Defaults to 100. Maximum is 500. + :type limit: int + :param filter: OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`. + :type filter: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_break_assessments_serialize( + offset=offset, + limit=limit, + filter=filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreakAssessmentsResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_break_assessments_without_preload_content( + self, + offset: Annotated[ + Annotated[int, Field(strict=True, ge=0)] | None, + Field(description="Number of items to skip before returning results. Defaults to 0."), + ] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True, ge=0)] | None, + Field(description="Maximum number of items to return. Defaults to 100. Maximum is 500."), + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Break Assessments + + Returns a paginated list of break assessments. A break assessment records whether an employee complied with their assigned break policy for a given day, along with any violations. Use the `filter` parameter to scope results by employee, date, result, or other fields. Use `offset` and `limit` for pagination; `limit` defaults to 100 and may not exceed 500. OAuth Scopes: time_tracking:breaks + + :param offset: Number of items to skip before returning results. Defaults to 0. + :type offset: int + :param limit: Maximum number of items to return. Defaults to 100. Maximum is 500. + :type limit: int + :param filter: OData filter expression applied to break assessments. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `expectedDuration`, `recordedDuration`, `durationDifference`, `createdAt`, `updatedAt`. Examples: `employeeId eq 614`, `employeeId in (614, 615, 616)`, `breakId eq 'abc-123' and employeeId eq 614`. + :type filter: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_break_assessments_serialize( + offset=offset, + limit=limit, + filter=filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreakAssessmentsResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_break_assessments_serialize( + self, + offset, + limit, + filter, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if offset is not None: + _query_params.append(("offset", offset)) + + if limit is not None: + _query_params.append(("limit", limit)) + + if filter is not None: + _query_params.append(("filter", filter)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/break-assessments", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_break_policies( + self, + offset: Annotated[StrictInt | None, Field(description="The offset of items to retrieve")] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True)] | None, Field(description="The maximum items to retrieve") + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`." + ), + ] = None, + include_counts: Annotated[StrictBool | None, Field(description="Include employee and break counts")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingPaginatedBreakPoliciesResponseV1: + """List Break Policies + + Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy. OAuth Scopes: time_tracking:breaks + + :param offset: The offset of items to retrieve + :type offset: int + :param limit: The maximum items to retrieve + :type limit: int + :param filter: OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`. + :type filter: str + :param include_counts: Include employee and break counts + :type include_counts: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_break_policies_serialize( + offset=offset, + limit=limit, + filter=filter, + include_counts=include_counts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreakPoliciesResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_break_policies_with_http_info( + self, + offset: Annotated[StrictInt | None, Field(description="The offset of items to retrieve")] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True)] | None, Field(description="The maximum items to retrieve") + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`." + ), + ] = None, + include_counts: Annotated[StrictBool | None, Field(description="Include employee and break counts")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingPaginatedBreakPoliciesResponseV1]: + """List Break Policies + + Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy. OAuth Scopes: time_tracking:breaks + + :param offset: The offset of items to retrieve + :type offset: int + :param limit: The maximum items to retrieve + :type limit: int + :param filter: OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`. + :type filter: str + :param include_counts: Include employee and break counts + :type include_counts: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_break_policies_serialize( + offset=offset, + limit=limit, + filter=filter, + include_counts=include_counts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreakPoliciesResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_break_policies_without_preload_content( + self, + offset: Annotated[StrictInt | None, Field(description="The offset of items to retrieve")] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True)] | None, Field(description="The maximum items to retrieve") + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`." + ), + ] = None, + include_counts: Annotated[StrictBool | None, Field(description="Include employee and break counts")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Break Policies + + Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy. OAuth Scopes: time_tracking:breaks + + :param offset: The offset of items to retrieve + :type offset: int + :param limit: The maximum items to retrieve + :type limit: int + :param filter: OData filter expression applied to break policies. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `description`, `allEmployeesAssigned`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Standard Lunch'`, `description eq null`, `allEmployeesAssigned eq true and name ne 'Legacy'`. + :type filter: str + :param include_counts: Include employee and break counts + :type include_counts: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_break_policies_serialize( + offset=offset, + limit=limit, + filter=filter, + include_counts=include_counts, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreakPoliciesResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_break_policies_serialize( + self, + offset, + limit, + filter, + include_counts, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if offset is not None: + _query_params.append(("offset", offset)) + + if limit is not None: + _query_params.append(("limit", limit)) + + if filter is not None: + _query_params.append(("filter", filter)) + + if include_counts is not None: + _query_params.append(("includeCounts", include_counts)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/break-policies", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_break_policy_breaks( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + offset: Annotated[StrictInt | None, Field(description="The offset of items to retrieve")] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True)] | None, Field(description="The maximum items to retrieve") + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingPaginatedBreaksResponseV1: + """List Breaks for Break Policy + + Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering. OAuth Scopes: time_tracking:breaks + + :param id: The break policy ID. (required) + :type id: str + :param offset: The offset of items to retrieve + :type offset: int + :param limit: The maximum items to retrieve + :type limit: int + :param filter: OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`. + :type filter: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_break_policy_breaks_serialize( + id=id, + offset=offset, + limit=limit, + filter=filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreaksResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_break_policy_breaks_with_http_info( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + offset: Annotated[StrictInt | None, Field(description="The offset of items to retrieve")] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True)] | None, Field(description="The maximum items to retrieve") + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingPaginatedBreaksResponseV1]: + """List Breaks for Break Policy + + Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering. OAuth Scopes: time_tracking:breaks + + :param id: The break policy ID. (required) + :type id: str + :param offset: The offset of items to retrieve + :type offset: int + :param limit: The maximum items to retrieve + :type limit: int + :param filter: OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`. + :type filter: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_break_policy_breaks_serialize( + id=id, + offset=offset, + limit=limit, + filter=filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreaksResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_break_policy_breaks_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + offset: Annotated[StrictInt | None, Field(description="The offset of items to retrieve")] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True)] | None, Field(description="The maximum items to retrieve") + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Breaks for Break Policy + + Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering. OAuth Scopes: time_tracking:breaks + + :param id: The break policy ID. (required) + :type id: str + :param offset: The offset of items to retrieve + :type offset: int + :param limit: The maximum items to retrieve + :type limit: int + :param filter: OData filter expression applied to breaks within the policy. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `paid`, `duration`, `availabilityType`, `availabilityMinHoursWorked`, `availabilityMaxHoursWorked`, `availabilityStartTime`, `availabilityEndTime`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Lunch'`, `paid eq true`, `paid eq false and name ne 'Quick Break'`. + :type filter: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_break_policy_breaks_serialize( + id=id, + offset=offset, + limit=limit, + filter=filter, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreaksResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_break_policy_breaks_serialize( + self, + id, + offset, + limit, + filter, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + if offset is not None: + _query_params.append(("offset", offset)) + + if limit is not None: + _query_params.append(("limit", limit)) + + if filter is not None: + _query_params.append(("filter", filter)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/break-policies/{id}/breaks", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_break_policy_employees( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + offset: Annotated[StrictInt | None, Field(description="The offset of items to retrieve")] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True)] | None, Field(description="The maximum items to retrieve") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingPaginatedBreakPolicyEmployeesResponseV1: + """List Break Policy Employees + + Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array. OAuth Scopes: time_tracking:breaks + + :param id: The break policy ID. (required) + :type id: str + :param offset: The offset of items to retrieve + :type offset: int + :param limit: The maximum items to retrieve + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_break_policy_employees_serialize( + id=id, + offset=offset, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreakPolicyEmployeesResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_break_policy_employees_with_http_info( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + offset: Annotated[StrictInt | None, Field(description="The offset of items to retrieve")] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True)] | None, Field(description="The maximum items to retrieve") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingPaginatedBreakPolicyEmployeesResponseV1]: + """List Break Policy Employees + + Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array. OAuth Scopes: time_tracking:breaks + + :param id: The break policy ID. (required) + :type id: str + :param offset: The offset of items to retrieve + :type offset: int + :param limit: The maximum items to retrieve + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_break_policy_employees_serialize( + id=id, + offset=offset, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreakPolicyEmployeesResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_break_policy_employees_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + offset: Annotated[StrictInt | None, Field(description="The offset of items to retrieve")] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True)] | None, Field(description="The maximum items to retrieve") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Break Policy Employees + + Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array. OAuth Scopes: time_tracking:breaks + + :param id: The break policy ID. (required) + :type id: str + :param offset: The offset of items to retrieve + :type offset: int + :param limit: The maximum items to retrieve + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_break_policy_employees_serialize( + id=id, + offset=offset, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreakPolicyEmployeesResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_break_policy_employees_serialize( + self, + id, + offset, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + if offset is not None: + _query_params.append(("offset", offset)) + + if limit is not None: + _query_params.append(("limit", limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/break-policies/{id}/employees", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_employee_break_availabilities( + self, + id: Annotated[StrictInt | None, Field(description="The internal employee ID.")], + effective: Annotated[ + Annotated[str, Field(strict=True)] | None, + Field( + description="The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> list[TimeTrackingTimeTrackingBreakAvailabilityV1]: + """List Employee Break Availabilities + + Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access. OAuth Scopes: time_tracking:breaks + + :param id: The internal employee ID. (required) + :type id: int + :param effective: The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). + :type effective: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_employee_break_availabilities_serialize( + id=id, + effective=effective, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[TimeTrackingTimeTrackingBreakAvailabilityV1]", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_employee_break_availabilities_with_http_info( + self, + id: Annotated[StrictInt | None, Field(description="The internal employee ID.")], + effective: Annotated[ + Annotated[str, Field(strict=True)] | None, + Field( + description="The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[list[TimeTrackingTimeTrackingBreakAvailabilityV1]]: + """List Employee Break Availabilities + + Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access. OAuth Scopes: time_tracking:breaks + + :param id: The internal employee ID. (required) + :type id: int + :param effective: The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). + :type effective: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_employee_break_availabilities_serialize( + id=id, + effective=effective, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[TimeTrackingTimeTrackingBreakAvailabilityV1]", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_employee_break_availabilities_without_preload_content( + self, + id: Annotated[StrictInt | None, Field(description="The internal employee ID.")], + effective: Annotated[ + Annotated[str, Field(strict=True)] | None, + Field( + description="The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Employee Break Availabilities + + Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access. OAuth Scopes: time_tracking:breaks + + :param id: The internal employee ID. (required) + :type id: int + :param effective: The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). + :type effective: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_employee_break_availabilities_serialize( + id=id, + effective=effective, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[TimeTrackingTimeTrackingBreakAvailabilityV1]", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_employee_break_availabilities_serialize( + self, + id, + effective, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + if effective is not None: + _query_params.append(("effective", effective)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/employees/{id}/break-availabilities", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_employee_break_policies( + self, + id: Annotated[StrictInt, Field(description="The internal employee ID.")], + offset: Annotated[ + Annotated[int, Field(strict=True, ge=0)] | None, + Field( + description="The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0." + ), + ] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True, ge=0)] | None, + Field(description="The maximum number of items to return. Must be between 0 and 500. Defaults to 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingPaginatedBreakPoliciesResponseV1: + """List Employee Break Policies + + Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. OAuth Scopes: time_tracking:breaks + + :param id: The internal employee ID. (required) + :type id: int + :param offset: The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. + :type offset: int + :param limit: The maximum number of items to return. Must be between 0 and 500. Defaults to 100. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_employee_break_policies_serialize( + id=id, + offset=offset, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreakPoliciesResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_employee_break_policies_with_http_info( + self, + id: Annotated[StrictInt, Field(description="The internal employee ID.")], + offset: Annotated[ + Annotated[int, Field(strict=True, ge=0)] | None, + Field( + description="The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0." + ), + ] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True, ge=0)] | None, + Field(description="The maximum number of items to return. Must be between 0 and 500. Defaults to 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingPaginatedBreakPoliciesResponseV1]: + """List Employee Break Policies + + Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. OAuth Scopes: time_tracking:breaks + + :param id: The internal employee ID. (required) + :type id: int + :param offset: The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. + :type offset: int + :param limit: The maximum number of items to return. Must be between 0 and 500. Defaults to 100. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_employee_break_policies_serialize( + id=id, + offset=offset, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreakPoliciesResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_employee_break_policies_without_preload_content( + self, + id: Annotated[StrictInt, Field(description="The internal employee ID.")], + offset: Annotated[ + Annotated[int, Field(strict=True, ge=0)] | None, + Field( + description="The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0." + ), + ] = None, + limit: Annotated[ + Annotated[int, Field(le=500, strict=True, ge=0)] | None, + Field(description="The maximum number of items to return. Must be between 0 and 500. Defaults to 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Employee Break Policies + + Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. OAuth Scopes: time_tracking:breaks + + :param id: The internal employee ID. (required) + :type id: int + :param offset: The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. + :type offset: int + :param limit: The maximum number of items to return. Must be between 0 and 500. Defaults to 100. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_employee_break_policies_serialize( + id=id, + offset=offset, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedBreakPoliciesResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_employee_break_policies_serialize( + self, + id, + offset, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + if offset is not None: + _query_params.append(("offset", offset)) + + if limit is not None: + _query_params.append(("limit", limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/employees/{id}/break-policies", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def replace_breaks_for_break_policy( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + time_tracking_create_or_update_time_tracking_break_without_policy_v1: list[ + TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1 + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> list[TimeTrackingTimeTrackingBreakV1]: + """Replace Breaks for Break Policy + + Replace all breaks for a break policy. Breaks with an ID will be updated, breaks without an ID will be created. Existing breaks not in the request will be soft-deleted. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param time_tracking_create_or_update_time_tracking_break_without_policy_v1: (required) + :type time_tracking_create_or_update_time_tracking_break_without_policy_v1: List[TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._replace_breaks_for_break_policy_serialize( + id=id, + time_tracking_create_or_update_time_tracking_break_without_policy_v1=time_tracking_create_or_update_time_tracking_break_without_policy_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[TimeTrackingTimeTrackingBreakV1]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def replace_breaks_for_break_policy_with_http_info( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + time_tracking_create_or_update_time_tracking_break_without_policy_v1: list[ + TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1 + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[list[TimeTrackingTimeTrackingBreakV1]]: + """Replace Breaks for Break Policy + + Replace all breaks for a break policy. Breaks with an ID will be updated, breaks without an ID will be created. Existing breaks not in the request will be soft-deleted. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param time_tracking_create_or_update_time_tracking_break_without_policy_v1: (required) + :type time_tracking_create_or_update_time_tracking_break_without_policy_v1: List[TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._replace_breaks_for_break_policy_serialize( + id=id, + time_tracking_create_or_update_time_tracking_break_without_policy_v1=time_tracking_create_or_update_time_tracking_break_without_policy_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[TimeTrackingTimeTrackingBreakV1]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def replace_breaks_for_break_policy_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + time_tracking_create_or_update_time_tracking_break_without_policy_v1: list[ + TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1 + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Replace Breaks for Break Policy + + Replace all breaks for a break policy. Breaks with an ID will be updated, breaks without an ID will be created. Existing breaks not in the request will be soft-deleted. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param time_tracking_create_or_update_time_tracking_break_without_policy_v1: (required) + :type time_tracking_create_or_update_time_tracking_break_without_policy_v1: List[TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._replace_breaks_for_break_policy_serialize( + id=id, + time_tracking_create_or_update_time_tracking_break_without_policy_v1=time_tracking_create_or_update_time_tracking_break_without_policy_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[TimeTrackingTimeTrackingBreakV1]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _replace_breaks_for_break_policy_serialize( + self, + id, + time_tracking_create_or_update_time_tracking_break_without_policy_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = { + "TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1": "", + } + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if time_tracking_create_or_update_time_tracking_break_without_policy_v1 is not None: + _body_params = time_tracking_create_or_update_time_tracking_break_without_policy_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/time-tracking/break-policies/{id}/breaks", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def set_break_policy_employees( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + set_break_policy_employees_request: SetBreakPolicyEmployeesRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Set Employees for Break Policy + + Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param set_break_policy_employees_request: (required) + :type set_break_policy_employees_request: SetBreakPolicyEmployeesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._set_break_policy_employees_serialize( + id=id, + set_break_policy_employees_request=set_break_policy_employees_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def set_break_policy_employees_with_http_info( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + set_break_policy_employees_request: SetBreakPolicyEmployeesRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Set Employees for Break Policy + + Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param set_break_policy_employees_request: (required) + :type set_break_policy_employees_request: SetBreakPolicyEmployeesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._set_break_policy_employees_serialize( + id=id, + set_break_policy_employees_request=set_break_policy_employees_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def set_break_policy_employees_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + set_break_policy_employees_request: SetBreakPolicyEmployeesRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set Employees for Break Policy + + Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param set_break_policy_employees_request: (required) + :type set_break_policy_employees_request: SetBreakPolicyEmployeesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._set_break_policy_employees_serialize( + id=id, + set_break_policy_employees_request=set_break_policy_employees_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _set_break_policy_employees_serialize( + self, + id, + set_break_policy_employees_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if set_break_policy_employees_request is not None: + _body_params = set_break_policy_employees_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/time-tracking/break-policies/{id}/assign", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def sync_break_policy( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + time_tracking_sync_time_tracking_break_policy_v1: TimeTrackingSyncTimeTrackingBreakPolicyV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingTimeTrackingBreakPolicyWithRelationsV1: + """Sync Break Policy + + Performs a full replacement of a break policy and its related data (breaks and employee assignments). Unlike the partial update endpoint, this replaces the entire policy state with the provided payload, removing any breaks or assignments not included in the request. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param time_tracking_sync_time_tracking_break_policy_v1: (required) + :type time_tracking_sync_time_tracking_break_policy_v1: TimeTrackingSyncTimeTrackingBreakPolicyV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._sync_break_policy_serialize( + id=id, + time_tracking_sync_time_tracking_break_policy_v1=time_tracking_sync_time_tracking_break_policy_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def sync_break_policy_with_http_info( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + time_tracking_sync_time_tracking_break_policy_v1: TimeTrackingSyncTimeTrackingBreakPolicyV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingTimeTrackingBreakPolicyWithRelationsV1]: + """Sync Break Policy + + Performs a full replacement of a break policy and its related data (breaks and employee assignments). Unlike the partial update endpoint, this replaces the entire policy state with the provided payload, removing any breaks or assignments not included in the request. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param time_tracking_sync_time_tracking_break_policy_v1: (required) + :type time_tracking_sync_time_tracking_break_policy_v1: TimeTrackingSyncTimeTrackingBreakPolicyV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._sync_break_policy_serialize( + id=id, + time_tracking_sync_time_tracking_break_policy_v1=time_tracking_sync_time_tracking_break_policy_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def sync_break_policy_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + time_tracking_sync_time_tracking_break_policy_v1: TimeTrackingSyncTimeTrackingBreakPolicyV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Sync Break Policy + + Performs a full replacement of a break policy and its related data (breaks and employee assignments). Unlike the partial update endpoint, this replaces the entire policy state with the provided payload, removing any breaks or assignments not included in the request. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param time_tracking_sync_time_tracking_break_policy_v1: (required) + :type time_tracking_sync_time_tracking_break_policy_v1: TimeTrackingSyncTimeTrackingBreakPolicyV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._sync_break_policy_serialize( + id=id, + time_tracking_sync_time_tracking_break_policy_v1=time_tracking_sync_time_tracking_break_policy_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _sync_break_policy_serialize( + self, + id, + time_tracking_sync_time_tracking_break_policy_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if time_tracking_sync_time_tracking_break_policy_v1 is not None: + _body_params = time_tracking_sync_time_tracking_break_policy_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/time-tracking/break-policies/{id}/sync", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def unassign_employees_from_break_policy( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + unassign_employees_from_break_policy_request: UnassignEmployeesFromBreakPolicyRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Unassign Employees from Break Policy + + Unassigns the specified employees from a break policy. Removes employee assignments from the policy without affecting the policy itself or other assigned employees. Employees can only be unassigned from policies that are not assigned to all employees. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param unassign_employees_from_break_policy_request: (required) + :type unassign_employees_from_break_policy_request: UnassignEmployeesFromBreakPolicyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._unassign_employees_from_break_policy_serialize( + id=id, + unassign_employees_from_break_policy_request=unassign_employees_from_break_policy_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def unassign_employees_from_break_policy_with_http_info( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + unassign_employees_from_break_policy_request: UnassignEmployeesFromBreakPolicyRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Unassign Employees from Break Policy + + Unassigns the specified employees from a break policy. Removes employee assignments from the policy without affecting the policy itself or other assigned employees. Employees can only be unassigned from policies that are not assigned to all employees. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param unassign_employees_from_break_policy_request: (required) + :type unassign_employees_from_break_policy_request: UnassignEmployeesFromBreakPolicyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._unassign_employees_from_break_policy_serialize( + id=id, + unassign_employees_from_break_policy_request=unassign_employees_from_break_policy_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def unassign_employees_from_break_policy_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + unassign_employees_from_break_policy_request: UnassignEmployeesFromBreakPolicyRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Unassign Employees from Break Policy + + Unassigns the specified employees from a break policy. Removes employee assignments from the policy without affecting the policy itself or other assigned employees. Employees can only be unassigned from policies that are not assigned to all employees. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param unassign_employees_from_break_policy_request: (required) + :type unassign_employees_from_break_policy_request: UnassignEmployeesFromBreakPolicyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._unassign_employees_from_break_policy_serialize( + id=id, + unassign_employees_from_break_policy_request=unassign_employees_from_break_policy_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _unassign_employees_from_break_policy_serialize( + self, + id, + unassign_employees_from_break_policy_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if unassign_employees_from_break_policy_request is not None: + _body_params = unassign_employees_from_break_policy_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/time-tracking/break-policies/{id}/unassign", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_break( + self, + id: Annotated[UUID, Field(description="The break ID.")], + time_tracking_update_time_tracking_break_v1: TimeTrackingUpdateTimeTrackingBreakV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingTimeTrackingBreakV1: + """Update Break + + Partially updates a time tracking break identified by its UUID. Only fields provided in the request body are updated. Returns the updated break on success. OAuth Scopes: time_tracking:breaks.write + + :param id: The break ID. (required) + :type id: str + :param time_tracking_update_time_tracking_break_v1: (required) + :type time_tracking_update_time_tracking_break_v1: TimeTrackingUpdateTimeTrackingBreakV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_break_serialize( + id=id, + time_tracking_update_time_tracking_break_v1=time_tracking_update_time_tracking_break_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_break_with_http_info( + self, + id: Annotated[UUID, Field(description="The break ID.")], + time_tracking_update_time_tracking_break_v1: TimeTrackingUpdateTimeTrackingBreakV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingTimeTrackingBreakV1]: + """Update Break + + Partially updates a time tracking break identified by its UUID. Only fields provided in the request body are updated. Returns the updated break on success. OAuth Scopes: time_tracking:breaks.write + + :param id: The break ID. (required) + :type id: str + :param time_tracking_update_time_tracking_break_v1: (required) + :type time_tracking_update_time_tracking_break_v1: TimeTrackingUpdateTimeTrackingBreakV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_break_serialize( + id=id, + time_tracking_update_time_tracking_break_v1=time_tracking_update_time_tracking_break_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_break_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break ID.")], + time_tracking_update_time_tracking_break_v1: TimeTrackingUpdateTimeTrackingBreakV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Break + + Partially updates a time tracking break identified by its UUID. Only fields provided in the request body are updated. Returns the updated break on success. OAuth Scopes: time_tracking:breaks.write + + :param id: The break ID. (required) + :type id: str + :param time_tracking_update_time_tracking_break_v1: (required) + :type time_tracking_update_time_tracking_break_v1: TimeTrackingUpdateTimeTrackingBreakV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_break_serialize( + id=id, + time_tracking_update_time_tracking_break_v1=time_tracking_update_time_tracking_break_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_break_serialize( + self, + id, + time_tracking_update_time_tracking_break_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if time_tracking_update_time_tracking_break_v1 is not None: + _body_params = time_tracking_update_time_tracking_break_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="PATCH", + resource_path="/api/v1/time-tracking/breaks/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_break_policy( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + time_tracking_update_time_tracking_break_policy_v1: TimeTrackingUpdateTimeTrackingBreakPolicyV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingTimeTrackingBreakPolicyV1: + """Update Break Policy + + Partially updates a break policy identified by its UUID. Only fields provided in the request body are updated. Returns the updated break policy on success. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param time_tracking_update_time_tracking_break_policy_v1: (required) + :type time_tracking_update_time_tracking_break_policy_v1: TimeTrackingUpdateTimeTrackingBreakPolicyV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_break_policy_serialize( + id=id, + time_tracking_update_time_tracking_break_policy_v1=time_tracking_update_time_tracking_break_policy_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakPolicyV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_break_policy_with_http_info( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + time_tracking_update_time_tracking_break_policy_v1: TimeTrackingUpdateTimeTrackingBreakPolicyV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingTimeTrackingBreakPolicyV1]: + """Update Break Policy + + Partially updates a break policy identified by its UUID. Only fields provided in the request body are updated. Returns the updated break policy on success. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param time_tracking_update_time_tracking_break_policy_v1: (required) + :type time_tracking_update_time_tracking_break_policy_v1: TimeTrackingUpdateTimeTrackingBreakPolicyV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_break_policy_serialize( + id=id, + time_tracking_update_time_tracking_break_policy_v1=time_tracking_update_time_tracking_break_policy_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakPolicyV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_break_policy_without_preload_content( + self, + id: Annotated[UUID, Field(description="The break policy ID.")], + time_tracking_update_time_tracking_break_policy_v1: TimeTrackingUpdateTimeTrackingBreakPolicyV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Break Policy + + Partially updates a break policy identified by its UUID. Only fields provided in the request body are updated. Returns the updated break policy on success. OAuth Scopes: time_tracking:breaks.write + + :param id: The break policy ID. (required) + :type id: str + :param time_tracking_update_time_tracking_break_policy_v1: (required) + :type time_tracking_update_time_tracking_break_policy_v1: TimeTrackingUpdateTimeTrackingBreakPolicyV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_break_policy_serialize( + id=id, + time_tracking_update_time_tracking_break_policy_v1=time_tracking_update_time_tracking_break_policy_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingBreakPolicyV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_break_policy_serialize( + self, + id, + time_tracking_update_time_tracking_break_policy_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if time_tracking_update_time_tracking_break_policy_v1 is not None: + _body_params = time_tracking_update_time_tracking_break_policy_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="PATCH", + resource_path="/api/v1/time-tracking/break-policies/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/onboarding_api.py b/bamboohr_sdk/api/onboarding_api.py new file mode 100644 index 0000000..ce3fff7 --- /dev/null +++ b/bamboohr_sdk/api/onboarding_api.py @@ -0,0 +1,2842 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.ec1ba8e76f33960b018d0d7518fe97b5_request import Ec1ba8e76f33960b018d0d7518fe97b5Request +from bamboohr_sdk.models.model288aa996aba16d7a495c62321ea999a9_request import ( + Model288aa996aba16d7a495c62321ea999a9Request, +) +from bamboohr_sdk.models.new_hire_packet_gtky_answer_visibility_request import NewHirePacketGtkyAnswerVisibilityRequest +from bamboohr_sdk.models.new_hire_packet_gtky_answer_visibility_response import ( + NewHirePacketGtkyAnswerVisibilityResponse, +) +from bamboohr_sdk.models.new_hire_packet_public_api import NewHirePacketPublicApi +from bamboohr_sdk.models.new_hire_packet_public_api_writable_body import NewHirePacketPublicApiWritableBody +from bamboohr_sdk.models.new_hire_packets_list_response import NewHirePacketsListResponse +from bamboohr_sdk.models.new_hire_widget_response import NewHireWidgetResponse +from bamboohr_sdk.models.onboarding_experience_public_api import OnboardingExperiencePublicApi +from bamboohr_sdk.models.onboarding_experiences_list_response import OnboardingExperiencesListResponse +from bamboohr_sdk.rest import RESTResponseType + + +class OnboardingApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def caa7fc488bcfaef14125398f2ebb987d( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete new hire packet + + Deletes a new hire packet instance by primary key. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._caa7fc488bcfaef14125398f2ebb987d_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def caa7fc488bcfaef14125398f2ebb987d_with_http_info( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete new hire packet + + Deletes a new hire packet instance by primary key. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._caa7fc488bcfaef14125398f2ebb987d_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def caa7fc488bcfaef14125398f2ebb987d_without_preload_content( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete new hire packet + + Deletes a new hire packet instance by primary key. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._caa7fc488bcfaef14125398f2ebb987d_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _caa7fc488bcfaef14125398f2ebb987d_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/new-hire-packets/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_0158de7cde2a4c4cf577f0b25070d809( + self, + employee_id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OnboardingExperiencesListResponse: + """List employee onboarding experiences + + Returns onboarding experiences for the employee when the onboarding experience phase-1 and workflow framework company toggles are enabled, and at least one OnboardingExperienceWorkflow execution is running for them. Each item is projected from the employee’s new hire packet instance row for the same public id contract (no embedded NHP payload). OAuth Scopes: onboarding + + :param employee_id: (required) + :type employee_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_0158de7cde2a4c4cf577f0b25070d809_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "OnboardingExperiencesListResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_0158de7cde2a4c4cf577f0b25070d809_with_http_info( + self, + employee_id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OnboardingExperiencesListResponse]: + """List employee onboarding experiences + + Returns onboarding experiences for the employee when the onboarding experience phase-1 and workflow framework company toggles are enabled, and at least one OnboardingExperienceWorkflow execution is running for them. Each item is projected from the employee’s new hire packet instance row for the same public id contract (no embedded NHP payload). OAuth Scopes: onboarding + + :param employee_id: (required) + :type employee_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_0158de7cde2a4c4cf577f0b25070d809_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "OnboardingExperiencesListResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_0158de7cde2a4c4cf577f0b25070d809_without_preload_content( + self, + employee_id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List employee onboarding experiences + + Returns onboarding experiences for the employee when the onboarding experience phase-1 and workflow framework company toggles are enabled, and at least one OnboardingExperienceWorkflow execution is running for them. Each item is projected from the employee’s new hire packet instance row for the same public id contract (no embedded NHP payload). OAuth Scopes: onboarding + + :param employee_id: (required) + :type employee_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_0158de7cde2a4c4cf577f0b25070d809_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "OnboardingExperiencesListResponse", + "403": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_0158de7cde2a4c4cf577f0b25070d809_serialize( + self, + employee_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if employee_id is not None: + _path_params["employeeId"] = employee_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/employees/{employeeId}/onboarding-experiences", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_044949386f2d655c6a627ef53f9434b7( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NewHireWidgetResponse: + """Get welcome new hires widget + + Returns the upcoming-new-hires data that powers the BambooHR home \"Welcome New Hires\" widget. Items are ordered by most recent hire date first. The list reflects the authenticated user's new-hire-packet and company-directory access — when either is missing the response is an empty list (not 403). Sensitive contact fields (work email, home email) are never returned. OAuth Scopes: onboarding + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_044949386f2d655c6a627ef53f9434b7_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHireWidgetResponse", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_044949386f2d655c6a627ef53f9434b7_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NewHireWidgetResponse]: + """Get welcome new hires widget + + Returns the upcoming-new-hires data that powers the BambooHR home \"Welcome New Hires\" widget. Items are ordered by most recent hire date first. The list reflects the authenticated user's new-hire-packet and company-directory access — when either is missing the response is an empty list (not 403). Sensitive contact fields (work email, home email) are never returned. OAuth Scopes: onboarding + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_044949386f2d655c6a627ef53f9434b7_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHireWidgetResponse", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_044949386f2d655c6a627ef53f9434b7_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get welcome new hires widget + + Returns the upcoming-new-hires data that powers the BambooHR home \"Welcome New Hires\" widget. Items are ordered by most recent hire date first. The list reflects the authenticated user's new-hire-packet and company-directory access — when either is missing the response is an empty list (not 403). Sensitive contact fields (work email, home email) are never returned. OAuth Scopes: onboarding + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_044949386f2d655c6a627ef53f9434b7_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHireWidgetResponse", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_044949386f2d655c6a627ef53f9434b7_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/onboarding/new-hire-widget", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_19c7e26a1347ae7eb22919e9b0595c19( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NewHirePacketPublicApi: + """Cancel new hire packet + + Cancels the new hire packet. Completed packets cannot be cancelled. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_19c7e26a1347ae7eb22919e9b0595c19_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketPublicApi", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_19c7e26a1347ae7eb22919e9b0595c19_with_http_info( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NewHirePacketPublicApi]: + """Cancel new hire packet + + Cancels the new hire packet. Completed packets cannot be cancelled. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_19c7e26a1347ae7eb22919e9b0595c19_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketPublicApi", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_19c7e26a1347ae7eb22919e9b0595c19_without_preload_content( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Cancel new hire packet + + Cancels the new hire packet. Completed packets cannot be cancelled. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_19c7e26a1347ae7eb22919e9b0595c19_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketPublicApi", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_19c7e26a1347ae7eb22919e9b0595c19_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/new-hire-packets/{id}/cancel", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_1ab0279d46023eb951a434f24df885f1( + self, + id: StrictInt, + new_hire_packet_public_api_writable_body: NewHirePacketPublicApiWritableBody, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NewHirePacketPublicApi: + """Update new hire packet + + Updates an existing new hire packet instance. Sent, viewed, and completed timestamps are not changed through this endpoint. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param new_hire_packet_public_api_writable_body: (required) + :type new_hire_packet_public_api_writable_body: NewHirePacketPublicApiWritableBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_1ab0279d46023eb951a434f24df885f1_serialize( + id=id, + new_hire_packet_public_api_writable_body=new_hire_packet_public_api_writable_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketPublicApi", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_1ab0279d46023eb951a434f24df885f1_with_http_info( + self, + id: StrictInt, + new_hire_packet_public_api_writable_body: NewHirePacketPublicApiWritableBody, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NewHirePacketPublicApi]: + """Update new hire packet + + Updates an existing new hire packet instance. Sent, viewed, and completed timestamps are not changed through this endpoint. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param new_hire_packet_public_api_writable_body: (required) + :type new_hire_packet_public_api_writable_body: NewHirePacketPublicApiWritableBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_1ab0279d46023eb951a434f24df885f1_serialize( + id=id, + new_hire_packet_public_api_writable_body=new_hire_packet_public_api_writable_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketPublicApi", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_1ab0279d46023eb951a434f24df885f1_without_preload_content( + self, + id: StrictInt, + new_hire_packet_public_api_writable_body: NewHirePacketPublicApiWritableBody, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update new hire packet + + Updates an existing new hire packet instance. Sent, viewed, and completed timestamps are not changed through this endpoint. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param new_hire_packet_public_api_writable_body: (required) + :type new_hire_packet_public_api_writable_body: NewHirePacketPublicApiWritableBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_1ab0279d46023eb951a434f24df885f1_serialize( + id=id, + new_hire_packet_public_api_writable_body=new_hire_packet_public_api_writable_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketPublicApi", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_1ab0279d46023eb951a434f24df885f1_serialize( + self, + id, + new_hire_packet_public_api_writable_body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if new_hire_packet_public_api_writable_body is not None: + _body_params = new_hire_packet_public_api_writable_body + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/new-hire-packets/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_288aa996aba16d7a495c62321ea999a9( + self, + employee_id: StrictInt, + model288aa996aba16d7a495c62321ea999a9_request: Model288aa996aba16d7a495c62321ea999a9Request | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OnboardingExperiencePublicApi: + """Create employee onboarding experience + + Creates (starts) an onboarding experience workflow for the employee’s existing new hire packet instance. Requires the onboarding experience phase-1 and workflow framework company toggles. Optional sentDateTime may be supplied for workflow idempotency (ISO 8601 or legacy datetime string accepted when non-empty). OAuth Scopes: onboarding.write + + :param employee_id: (required) + :type employee_id: int + :param model288aa996aba16d7a495c62321ea999a9_request: + :type model288aa996aba16d7a495c62321ea999a9_request: Model288aa996aba16d7a495c62321ea999a9Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_288aa996aba16d7a495c62321ea999a9_serialize( + employee_id=employee_id, + model288aa996aba16d7a495c62321ea999a9_request=model288aa996aba16d7a495c62321ea999a9_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "OnboardingExperiencePublicApi", + "400": "ErrorResponse", + "403": "ErrorResponse", + "409": "ErrorResponse", + "422": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_288aa996aba16d7a495c62321ea999a9_with_http_info( + self, + employee_id: StrictInt, + model288aa996aba16d7a495c62321ea999a9_request: Model288aa996aba16d7a495c62321ea999a9Request | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OnboardingExperiencePublicApi]: + """Create employee onboarding experience + + Creates (starts) an onboarding experience workflow for the employee’s existing new hire packet instance. Requires the onboarding experience phase-1 and workflow framework company toggles. Optional sentDateTime may be supplied for workflow idempotency (ISO 8601 or legacy datetime string accepted when non-empty). OAuth Scopes: onboarding.write + + :param employee_id: (required) + :type employee_id: int + :param model288aa996aba16d7a495c62321ea999a9_request: + :type model288aa996aba16d7a495c62321ea999a9_request: Model288aa996aba16d7a495c62321ea999a9Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_288aa996aba16d7a495c62321ea999a9_serialize( + employee_id=employee_id, + model288aa996aba16d7a495c62321ea999a9_request=model288aa996aba16d7a495c62321ea999a9_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "OnboardingExperiencePublicApi", + "400": "ErrorResponse", + "403": "ErrorResponse", + "409": "ErrorResponse", + "422": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_288aa996aba16d7a495c62321ea999a9_without_preload_content( + self, + employee_id: StrictInt, + model288aa996aba16d7a495c62321ea999a9_request: Model288aa996aba16d7a495c62321ea999a9Request | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create employee onboarding experience + + Creates (starts) an onboarding experience workflow for the employee’s existing new hire packet instance. Requires the onboarding experience phase-1 and workflow framework company toggles. Optional sentDateTime may be supplied for workflow idempotency (ISO 8601 or legacy datetime string accepted when non-empty). OAuth Scopes: onboarding.write + + :param employee_id: (required) + :type employee_id: int + :param model288aa996aba16d7a495c62321ea999a9_request: + :type model288aa996aba16d7a495c62321ea999a9_request: Model288aa996aba16d7a495c62321ea999a9Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_288aa996aba16d7a495c62321ea999a9_serialize( + employee_id=employee_id, + model288aa996aba16d7a495c62321ea999a9_request=model288aa996aba16d7a495c62321ea999a9_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "OnboardingExperiencePublicApi", + "400": "ErrorResponse", + "403": "ErrorResponse", + "409": "ErrorResponse", + "422": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_288aa996aba16d7a495c62321ea999a9_serialize( + self, + employee_id, + model288aa996aba16d7a495c62321ea999a9_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if employee_id is not None: + _path_params["employeeId"] = employee_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if model288aa996aba16d7a495c62321ea999a9_request is not None: + _body_params = model288aa996aba16d7a495c62321ea999a9_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/employees/{employeeId}/onboarding-experiences", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_696f0a229cdde60b733568e3c4d043d9( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NewHirePacketPublicApi: + """Get new hire packet by id + + Returns a single new hire packet instance with a derived status. Sub-resources (sections, tasks, questions, GTKY) are not included. OAuth Scopes: onboarding + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_696f0a229cdde60b733568e3c4d043d9_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketPublicApi", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_696f0a229cdde60b733568e3c4d043d9_with_http_info( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NewHirePacketPublicApi]: + """Get new hire packet by id + + Returns a single new hire packet instance with a derived status. Sub-resources (sections, tasks, questions, GTKY) are not included. OAuth Scopes: onboarding + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_696f0a229cdde60b733568e3c4d043d9_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketPublicApi", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_696f0a229cdde60b733568e3c4d043d9_without_preload_content( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get new hire packet by id + + Returns a single new hire packet instance with a derived status. Sub-resources (sections, tasks, questions, GTKY) are not included. OAuth Scopes: onboarding + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_696f0a229cdde60b733568e3c4d043d9_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketPublicApi", + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_696f0a229cdde60b733568e3c4d043d9_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/new-hire-packets/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def call_847dd061d1d1859e7ce8cb3adfc9faf2( + self, + employee_id: StrictInt, + onboarding_experience_id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OnboardingExperiencePublicApi: + """Get employee onboarding experience by id + + Returns a single onboarding experience when the onboarding experience phase-1 and workflow framework company toggles are enabled, the employee has at least one running OnboardingExperienceWorkflow (execution status RUNNING), the path id matches their current new hire packet instance id, and the row belongs to the employee. NHP fields are referenced by id only. OAuth Scopes: onboarding + + :param employee_id: (required) + :type employee_id: int + :param onboarding_experience_id: (required) + :type onboarding_experience_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_847dd061d1d1859e7ce8cb3adfc9faf2_serialize( + employee_id=employee_id, + onboarding_experience_id=onboarding_experience_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "OnboardingExperiencePublicApi", + "403": "ErrorResponse", + "404": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def call_847dd061d1d1859e7ce8cb3adfc9faf2_with_http_info( + self, + employee_id: StrictInt, + onboarding_experience_id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OnboardingExperiencePublicApi]: + """Get employee onboarding experience by id + + Returns a single onboarding experience when the onboarding experience phase-1 and workflow framework company toggles are enabled, the employee has at least one running OnboardingExperienceWorkflow (execution status RUNNING), the path id matches their current new hire packet instance id, and the row belongs to the employee. NHP fields are referenced by id only. OAuth Scopes: onboarding + + :param employee_id: (required) + :type employee_id: int + :param onboarding_experience_id: (required) + :type onboarding_experience_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_847dd061d1d1859e7ce8cb3adfc9faf2_serialize( + employee_id=employee_id, + onboarding_experience_id=onboarding_experience_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "OnboardingExperiencePublicApi", + "403": "ErrorResponse", + "404": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def call_847dd061d1d1859e7ce8cb3adfc9faf2_without_preload_content( + self, + employee_id: StrictInt, + onboarding_experience_id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get employee onboarding experience by id + + Returns a single onboarding experience when the onboarding experience phase-1 and workflow framework company toggles are enabled, the employee has at least one running OnboardingExperienceWorkflow (execution status RUNNING), the path id matches their current new hire packet instance id, and the row belongs to the employee. NHP fields are referenced by id only. OAuth Scopes: onboarding + + :param employee_id: (required) + :type employee_id: int + :param onboarding_experience_id: (required) + :type onboarding_experience_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._call_847dd061d1d1859e7ce8cb3adfc9faf2_serialize( + employee_id=employee_id, + onboarding_experience_id=onboarding_experience_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "OnboardingExperiencePublicApi", + "403": "ErrorResponse", + "404": "ErrorResponse", + "500": "ErrorResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_847dd061d1d1859e7ce8cb3adfc9faf2_serialize( + self, + employee_id, + onboarding_experience_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if employee_id is not None: + _path_params["employeeId"] = employee_id + if onboarding_experience_id is not None: + _path_params["onboardingExperienceId"] = onboarding_experience_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/employees/{employeeId}/onboarding-experiences/{onboardingExperienceId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def ec1ba8e76f33960b018d0d7518fe97b5( + self, + ec1ba8e76f33960b018d0d7518fe97b5_request: Ec1ba8e76f33960b018d0d7518fe97b5Request, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NewHirePacketPublicApi: + """Create new hire packet + + Creates a new hire packet instance (draft) for an employee. Company configuration is applied for default inclusion flags. OAuth Scopes: onboarding.write + + :param ec1ba8e76f33960b018d0d7518fe97b5_request: (required) + :type ec1ba8e76f33960b018d0d7518fe97b5_request: Ec1ba8e76f33960b018d0d7518fe97b5Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._ec1ba8e76f33960b018d0d7518fe97b5_serialize( + ec1ba8e76f33960b018d0d7518fe97b5_request=ec1ba8e76f33960b018d0d7518fe97b5_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "NewHirePacketPublicApi", + "400": None, + "403": None, + "409": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def ec1ba8e76f33960b018d0d7518fe97b5_with_http_info( + self, + ec1ba8e76f33960b018d0d7518fe97b5_request: Ec1ba8e76f33960b018d0d7518fe97b5Request, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NewHirePacketPublicApi]: + """Create new hire packet + + Creates a new hire packet instance (draft) for an employee. Company configuration is applied for default inclusion flags. OAuth Scopes: onboarding.write + + :param ec1ba8e76f33960b018d0d7518fe97b5_request: (required) + :type ec1ba8e76f33960b018d0d7518fe97b5_request: Ec1ba8e76f33960b018d0d7518fe97b5Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._ec1ba8e76f33960b018d0d7518fe97b5_serialize( + ec1ba8e76f33960b018d0d7518fe97b5_request=ec1ba8e76f33960b018d0d7518fe97b5_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "NewHirePacketPublicApi", + "400": None, + "403": None, + "409": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def ec1ba8e76f33960b018d0d7518fe97b5_without_preload_content( + self, + ec1ba8e76f33960b018d0d7518fe97b5_request: Ec1ba8e76f33960b018d0d7518fe97b5Request, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create new hire packet + + Creates a new hire packet instance (draft) for an employee. Company configuration is applied for default inclusion flags. OAuth Scopes: onboarding.write + + :param ec1ba8e76f33960b018d0d7518fe97b5_request: (required) + :type ec1ba8e76f33960b018d0d7518fe97b5_request: Ec1ba8e76f33960b018d0d7518fe97b5Request + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._ec1ba8e76f33960b018d0d7518fe97b5_serialize( + ec1ba8e76f33960b018d0d7518fe97b5_request=ec1ba8e76f33960b018d0d7518fe97b5_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "NewHirePacketPublicApi", + "400": None, + "403": None, + "409": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _ec1ba8e76f33960b018d0d7518fe97b5_serialize( + self, + ec1ba8e76f33960b018d0d7518fe97b5_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if ec1ba8e76f33960b018d0d7518fe97b5_request is not None: + _body_params = ec1ba8e76f33960b018d0d7518fe97b5_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/new-hire-packets", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def f44b802c30cdea2b9076b3f82f99c74d( + self, + page: Annotated[int, Field(strict=True, ge=1)] | None = None, + page_size: Annotated[int, Field(le=100, strict=True, ge=1)] | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NewHirePacketsListResponse: + """List new hire packets + + Returns a paginated list of new hire packet instances for the company. Each item is a flat summary (no sections, tasks, questions, or GTKY recipients). OAuth Scopes: onboarding + + :param page: + :type page: int + :param page_size: + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._f44b802c30cdea2b9076b3f82f99c74d_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketsListResponse", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def f44b802c30cdea2b9076b3f82f99c74d_with_http_info( + self, + page: Annotated[int, Field(strict=True, ge=1)] | None = None, + page_size: Annotated[int, Field(le=100, strict=True, ge=1)] | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NewHirePacketsListResponse]: + """List new hire packets + + Returns a paginated list of new hire packet instances for the company. Each item is a flat summary (no sections, tasks, questions, or GTKY recipients). OAuth Scopes: onboarding + + :param page: + :type page: int + :param page_size: + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._f44b802c30cdea2b9076b3f82f99c74d_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketsListResponse", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def f44b802c30cdea2b9076b3f82f99c74d_without_preload_content( + self, + page: Annotated[int, Field(strict=True, ge=1)] | None = None, + page_size: Annotated[int, Field(le=100, strict=True, ge=1)] | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List new hire packets + + Returns a paginated list of new hire packet instances for the company. Each item is a flat summary (no sections, tasks, questions, or GTKY recipients). OAuth Scopes: onboarding + + :param page: + :type page: int + :param page_size: + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._f44b802c30cdea2b9076b3f82f99c74d_serialize( + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketsListResponse", + "400": None, + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _f44b802c30cdea2b9076b3f82f99c74d_serialize( + self, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/new-hire-packets", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def f49b0f1f2fb1ef2c408ba12916ee9baa( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NewHirePacketPublicApi: + """Send new hire packet + + Sends the new hire packet for that packet's employee (email or onboarding experience workflow, depending on company configuration). The packet must be in draft state. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._f49b0f1f2fb1ef2c408ba12916ee9baa_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketPublicApi", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def f49b0f1f2fb1ef2c408ba12916ee9baa_with_http_info( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NewHirePacketPublicApi]: + """Send new hire packet + + Sends the new hire packet for that packet's employee (email or onboarding experience workflow, depending on company configuration). The packet must be in draft state. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._f49b0f1f2fb1ef2c408ba12916ee9baa_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketPublicApi", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def f49b0f1f2fb1ef2c408ba12916ee9baa_without_preload_content( + self, + id: StrictInt, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Send new hire packet + + Sends the new hire packet for that packet's employee (email or onboarding experience workflow, depending on company configuration). The packet must be in draft state. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._f49b0f1f2fb1ef2c408ba12916ee9baa_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketPublicApi", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _f49b0f1f2fb1ef2c408ba12916ee9baa_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/new-hire-packets/{id}/send", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_new_hire_packet_gtky_answer_visibility( + self, + id: StrictInt, + new_hire_packet_gtky_answer_visibility_request: NewHirePacketGtkyAnswerVisibilityRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NewHirePacketGtkyAnswerVisibilityResponse: + """Update GTKY answer visibility for a new hire packet + + Shows or hides get-to-know-you (GTKY) question answers for the packet. Omit questionIds to toggle all answers (same as the legacy BFF POST /onboarding/questions/visibility/{newHirePacketId} with a visible query flag). Send questionIds to toggle only specific personal questions linked to this new hire packet. Requires the same edit access as other NHP writes. When the employee has a hire date set, updates are rejected once the company-local calendar date is on or after that date (same rule as GET /onboarding/questions/{newHirePacketId}, which redirects to expired in that case). Draft employees without a hire date are not blocked. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param new_hire_packet_gtky_answer_visibility_request: (required) + :type new_hire_packet_gtky_answer_visibility_request: NewHirePacketGtkyAnswerVisibilityRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_new_hire_packet_gtky_answer_visibility_serialize( + id=id, + new_hire_packet_gtky_answer_visibility_request=new_hire_packet_gtky_answer_visibility_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketGtkyAnswerVisibilityResponse", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_new_hire_packet_gtky_answer_visibility_with_http_info( + self, + id: StrictInt, + new_hire_packet_gtky_answer_visibility_request: NewHirePacketGtkyAnswerVisibilityRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NewHirePacketGtkyAnswerVisibilityResponse]: + """Update GTKY answer visibility for a new hire packet + + Shows or hides get-to-know-you (GTKY) question answers for the packet. Omit questionIds to toggle all answers (same as the legacy BFF POST /onboarding/questions/visibility/{newHirePacketId} with a visible query flag). Send questionIds to toggle only specific personal questions linked to this new hire packet. Requires the same edit access as other NHP writes. When the employee has a hire date set, updates are rejected once the company-local calendar date is on or after that date (same rule as GET /onboarding/questions/{newHirePacketId}, which redirects to expired in that case). Draft employees without a hire date are not blocked. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param new_hire_packet_gtky_answer_visibility_request: (required) + :type new_hire_packet_gtky_answer_visibility_request: NewHirePacketGtkyAnswerVisibilityRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_new_hire_packet_gtky_answer_visibility_serialize( + id=id, + new_hire_packet_gtky_answer_visibility_request=new_hire_packet_gtky_answer_visibility_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketGtkyAnswerVisibilityResponse", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_new_hire_packet_gtky_answer_visibility_without_preload_content( + self, + id: StrictInt, + new_hire_packet_gtky_answer_visibility_request: NewHirePacketGtkyAnswerVisibilityRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update GTKY answer visibility for a new hire packet + + Shows or hides get-to-know-you (GTKY) question answers for the packet. Omit questionIds to toggle all answers (same as the legacy BFF POST /onboarding/questions/visibility/{newHirePacketId} with a visible query flag). Send questionIds to toggle only specific personal questions linked to this new hire packet. Requires the same edit access as other NHP writes. When the employee has a hire date set, updates are rejected once the company-local calendar date is on or after that date (same rule as GET /onboarding/questions/{newHirePacketId}, which redirects to expired in that case). Draft employees without a hire date are not blocked. OAuth Scopes: onboarding.write + + :param id: (required) + :type id: int + :param new_hire_packet_gtky_answer_visibility_request: (required) + :type new_hire_packet_gtky_answer_visibility_request: NewHirePacketGtkyAnswerVisibilityRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_new_hire_packet_gtky_answer_visibility_serialize( + id=id, + new_hire_packet_gtky_answer_visibility_request=new_hire_packet_gtky_answer_visibility_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "NewHirePacketGtkyAnswerVisibilityResponse", + "400": None, + "403": None, + "404": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_new_hire_packet_gtky_answer_visibility_serialize( + self, + id, + new_hire_packet_gtky_answer_visibility_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if new_hire_packet_gtky_answer_visibility_request is not None: + _body_params = new_hire_packet_gtky_answer_visibility_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/new-hire-packets/{id}/question-visibility", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/pay_grades_bands_api.py b/bamboohr_sdk/api/pay_grades_bands_api.py new file mode 100644 index 0000000..2026718 --- /dev/null +++ b/bamboohr_sdk/api/pay_grades_bands_api.py @@ -0,0 +1,3075 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any + +from pydantic import Field, StrictBytes, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.levels_and_bands_group_status_counts import LevelsAndBandsGroupStatusCounts +from bamboohr_sdk.models.levels_and_bands_job_title_assignments_request import LevelsAndBandsJobTitleAssignmentsRequest +from bamboohr_sdk.models.levels_and_bands_upload_response import LevelsAndBandsUploadResponse +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status import PayGradesAndBandsConfigurationStatus +from bamboohr_sdk.models.pay_grades_and_bands_delete_response import PayGradesAndBandsDeleteResponse +from bamboohr_sdk.models.pay_grades_and_bands_job_title_assignments_response import ( + PayGradesAndBandsJobTitleAssignmentsResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_job_title_with_employees import PayGradesAndBandsJobTitleWithEmployees +from bamboohr_sdk.models.pay_grades_and_bands_levels_response import PayGradesAndBandsLevelsResponse +from bamboohr_sdk.models.pay_grades_and_bands_pay_bands_response import PayGradesAndBandsPayBandsResponse +from bamboohr_sdk.models.pay_grades_and_bands_publish_response import PayGradesAndBandsPublishResponse +from bamboohr_sdk.models.pay_grades_and_bands_published_response import PayGradesAndBandsPublishedResponse +from bamboohr_sdk.models.pay_grades_and_bands_review_response import PayGradesAndBandsReviewResponse +from bamboohr_sdk.models.pay_grades_and_bands_save_levels_response import PayGradesAndBandsSaveLevelsResponse +from bamboohr_sdk.models.pay_grades_and_bands_update_job_titles_response import PayGradesAndBandsUpdateJobTitlesResponse +from bamboohr_sdk.models.pay_grades_and_bands_update_levels_request import PayGradesAndBandsUpdateLevelsRequest +from bamboohr_sdk.models.pay_grades_and_bands_update_pay_bands_response import PayGradesAndBandsUpdatePayBandsResponse +from bamboohr_sdk.models.update_pay_bands_request import UpdatePayBandsRequest +from bamboohr_sdk.rest import RESTResponseType + + +class PayGradesBandsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def delete_compensation_level_groups_or_level( + self, + segment: Annotated[ + StrictStr, + Field( + description="Selects what to delete. A group status (`draft`, `published`, or `historic`) deletes all compensation level groups in that status; a numeric compensation level ID deletes that single level. Any other value returns 400." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayGradesAndBandsDeleteResponse: + """Delete Compensation Level Groups or Level + + Deletes compensation level configuration, with the behavior chosen by the `{segment}` path value. When `{segment}` is a group status (`draft`, `published`, or `historic`), every compensation level group in that status is deleted and the response is the object `{\"status\":\"success\"}`; deleting `draft` discards all in-progress edits and is the way to reset the working draft. When `{segment}` is a numeric compensation level ID, only that single level is deleted and the response is the updated groups-and-levels hierarchy, the same object shape returned by List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`). Deleting a numeric level ID that does not exist is a no-op that returns 200 with the unchanged hierarchy. The accepted `{segment}` values are the group lifecycle statuses `draft`, `published`, and `historic`, or a numeric level ID. Discover level IDs with List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`). Edit level and group structure with Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`), and promote draft changes to published with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). This operation mutates the stored configuration directly and cannot be undone. OAuth Scopes: pay_grades_and_bands.write + + :param segment: Selects what to delete. A group status (`draft`, `published`, or `historic`) deletes all compensation level groups in that status; a numeric compensation level ID deletes that single level. Any other value returns 400. (required) + :type segment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_compensation_level_groups_or_level_serialize( + segment=segment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsDeleteResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_compensation_level_groups_or_level_with_http_info( + self, + segment: Annotated[ + StrictStr, + Field( + description="Selects what to delete. A group status (`draft`, `published`, or `historic`) deletes all compensation level groups in that status; a numeric compensation level ID deletes that single level. Any other value returns 400." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayGradesAndBandsDeleteResponse]: + """Delete Compensation Level Groups or Level + + Deletes compensation level configuration, with the behavior chosen by the `{segment}` path value. When `{segment}` is a group status (`draft`, `published`, or `historic`), every compensation level group in that status is deleted and the response is the object `{\"status\":\"success\"}`; deleting `draft` discards all in-progress edits and is the way to reset the working draft. When `{segment}` is a numeric compensation level ID, only that single level is deleted and the response is the updated groups-and-levels hierarchy, the same object shape returned by List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`). Deleting a numeric level ID that does not exist is a no-op that returns 200 with the unchanged hierarchy. The accepted `{segment}` values are the group lifecycle statuses `draft`, `published`, and `historic`, or a numeric level ID. Discover level IDs with List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`). Edit level and group structure with Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`), and promote draft changes to published with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). This operation mutates the stored configuration directly and cannot be undone. OAuth Scopes: pay_grades_and_bands.write + + :param segment: Selects what to delete. A group status (`draft`, `published`, or `historic`) deletes all compensation level groups in that status; a numeric compensation level ID deletes that single level. Any other value returns 400. (required) + :type segment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_compensation_level_groups_or_level_serialize( + segment=segment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsDeleteResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_compensation_level_groups_or_level_without_preload_content( + self, + segment: Annotated[ + StrictStr, + Field( + description="Selects what to delete. A group status (`draft`, `published`, or `historic`) deletes all compensation level groups in that status; a numeric compensation level ID deletes that single level. Any other value returns 400." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Compensation Level Groups or Level + + Deletes compensation level configuration, with the behavior chosen by the `{segment}` path value. When `{segment}` is a group status (`draft`, `published`, or `historic`), every compensation level group in that status is deleted and the response is the object `{\"status\":\"success\"}`; deleting `draft` discards all in-progress edits and is the way to reset the working draft. When `{segment}` is a numeric compensation level ID, only that single level is deleted and the response is the updated groups-and-levels hierarchy, the same object shape returned by List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`). Deleting a numeric level ID that does not exist is a no-op that returns 200 with the unchanged hierarchy. The accepted `{segment}` values are the group lifecycle statuses `draft`, `published`, and `historic`, or a numeric level ID. Discover level IDs with List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`). Edit level and group structure with Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`), and promote draft changes to published with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). This operation mutates the stored configuration directly and cannot be undone. OAuth Scopes: pay_grades_and_bands.write + + :param segment: Selects what to delete. A group status (`draft`, `published`, or `historic`) deletes all compensation level groups in that status; a numeric compensation level ID deletes that single level. Any other value returns 400. (required) + :type segment: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_compensation_level_groups_or_level_serialize( + segment=segment, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsDeleteResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_compensation_level_groups_or_level_serialize( + self, + segment, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if segment is not None: + _path_params["segment"] = segment + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/pay-grades-and-bands/levels/{segment}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_compensation_level_group_status_counts( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LevelsAndBandsGroupStatusCounts: + """Get Compensation Level Group Status Counts + + Returns the number of compensation level groups in each lifecycle status. The response is a JSON object of integer counts keyed by status: `draft`, `historic`, and `published`. When a published baseline exists, the `draft` count includes only draft groups that have at least one visited setup step (groups the user has actually started editing), not every draft group; when no published groups exist, it counts all draft groups. Use this for a tally of how many groups sit in each status; for the overall setup configuration status (whether each setup step is complete, with its blocking errors and warnings), use Get Levels and Bands Status (`get-levels-and-bands-status`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_compensation_level_group_status_counts_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "LevelsAndBandsGroupStatusCounts", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_compensation_level_group_status_counts_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LevelsAndBandsGroupStatusCounts]: + """Get Compensation Level Group Status Counts + + Returns the number of compensation level groups in each lifecycle status. The response is a JSON object of integer counts keyed by status: `draft`, `historic`, and `published`. When a published baseline exists, the `draft` count includes only draft groups that have at least one visited setup step (groups the user has actually started editing), not every draft group; when no published groups exist, it counts all draft groups. Use this for a tally of how many groups sit in each status; for the overall setup configuration status (whether each setup step is complete, with its blocking errors and warnings), use Get Levels and Bands Status (`get-levels-and-bands-status`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_compensation_level_group_status_counts_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "LevelsAndBandsGroupStatusCounts", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_compensation_level_group_status_counts_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Compensation Level Group Status Counts + + Returns the number of compensation level groups in each lifecycle status. The response is a JSON object of integer counts keyed by status: `draft`, `historic`, and `published`. When a published baseline exists, the `draft` count includes only draft groups that have at least one visited setup step (groups the user has actually started editing), not every draft group; when no published groups exist, it counts all draft groups. Use this for a tally of how many groups sit in each status; for the overall setup configuration status (whether each setup step is complete, with its blocking errors and warnings), use Get Levels and Bands Status (`get-levels-and-bands-status`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_compensation_level_group_status_counts_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "LevelsAndBandsGroupStatusCounts", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_compensation_level_group_status_counts_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/pay-grades-and-bands/status-counts", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_job_title_level_assignments( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayGradesAndBandsJobTitleAssignmentsResponse: + """Get Job Titles and Level Assignments + + Returns the working draft configuration showing which job titles are assigned to each compensation level, as used by the pay grades and bands setup wizard. When no draft configuration exists, the endpoint returns the currently published configuration instead. The response is a JSON object with a `groups` array; each group carries its `levels`, and each level lists the `jobTitles` assigned to it alongside its pay band flattened into `min`, `mid`, `max`, and `percentageRange` value objects (each wrapping a numeric `value` plus its own `errors` and `warnings`), `currencyCode`, and `compensationType`. The per-group and per-level `errors` and `warnings` arrays are always empty on this view; job-title assignment issues are reported by Get Levels and Bands Status (`get-levels-and-bands-status`) instead. Each job title carries a job title identifier and its name; no employee data is included. To see which employees currently hold each job title, use List Job Titles with Employees (`list-job-titles-with-employees`) instead. This is a read-only view. For the same group/level tree focused on level configuration use List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`), for pay band values use Get Pay Bands (`get-pay-bands`), and for the published configuration without validation state use Get Published Levels and Bands (`get-published-levels-and-bands`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_job_title_level_assignments_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsJobTitleAssignmentsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_job_title_level_assignments_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayGradesAndBandsJobTitleAssignmentsResponse]: + """Get Job Titles and Level Assignments + + Returns the working draft configuration showing which job titles are assigned to each compensation level, as used by the pay grades and bands setup wizard. When no draft configuration exists, the endpoint returns the currently published configuration instead. The response is a JSON object with a `groups` array; each group carries its `levels`, and each level lists the `jobTitles` assigned to it alongside its pay band flattened into `min`, `mid`, `max`, and `percentageRange` value objects (each wrapping a numeric `value` plus its own `errors` and `warnings`), `currencyCode`, and `compensationType`. The per-group and per-level `errors` and `warnings` arrays are always empty on this view; job-title assignment issues are reported by Get Levels and Bands Status (`get-levels-and-bands-status`) instead. Each job title carries a job title identifier and its name; no employee data is included. To see which employees currently hold each job title, use List Job Titles with Employees (`list-job-titles-with-employees`) instead. This is a read-only view. For the same group/level tree focused on level configuration use List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`), for pay band values use Get Pay Bands (`get-pay-bands`), and for the published configuration without validation state use Get Published Levels and Bands (`get-published-levels-and-bands`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_job_title_level_assignments_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsJobTitleAssignmentsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_job_title_level_assignments_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Job Titles and Level Assignments + + Returns the working draft configuration showing which job titles are assigned to each compensation level, as used by the pay grades and bands setup wizard. When no draft configuration exists, the endpoint returns the currently published configuration instead. The response is a JSON object with a `groups` array; each group carries its `levels`, and each level lists the `jobTitles` assigned to it alongside its pay band flattened into `min`, `mid`, `max`, and `percentageRange` value objects (each wrapping a numeric `value` plus its own `errors` and `warnings`), `currencyCode`, and `compensationType`. The per-group and per-level `errors` and `warnings` arrays are always empty on this view; job-title assignment issues are reported by Get Levels and Bands Status (`get-levels-and-bands-status`) instead. Each job title carries a job title identifier and its name; no employee data is included. To see which employees currently hold each job title, use List Job Titles with Employees (`list-job-titles-with-employees`) instead. This is a read-only view. For the same group/level tree focused on level configuration use List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`), for pay band values use Get Pay Bands (`get-pay-bands`), and for the published configuration without validation state use Get Published Levels and Bands (`get-published-levels-and-bands`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_job_title_level_assignments_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsJobTitleAssignmentsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_job_title_level_assignments_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/pay-grades-and-bands/job-titles", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_levels_and_bands_review( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayGradesAndBandsReviewResponse: + """Get Levels and Bands Review + + Returns the pre-publish review of compensation level groups and levels with validation `errors` and `warnings` consolidated across every setup-wizard step: level naming, group-level checks, and pay band values. This reflects the working draft configuration; when no draft exists it falls back to the currently published configuration. Requesting this review marks all setup steps as visited for the draft, which changes subsequent Get Levels and Bands Status (`get-levels-and-bands-status`) results. The response is a JSON object with a `groups` array; each group carries its `levels` plus its own `errors` and `warnings`, and each level flattens its pay band into `min`, `mid`, `max`, and `percentageRange` value objects (each wrapping a numeric `value` with its own `errors` and `warnings`), along with `currencyCode`, `compensationType`, and the `jobTitles` assigned to that level. Use this for the complete validation picture that determines whether the configuration can be published. For the editable draft view that validates level and group issues but not pay band values, use List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`) instead. For the currently published pay grades and bands without any validation state, use Get Published Levels and Bands (`get-published-levels-and-bands`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_levels_and_bands_review_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsReviewResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_levels_and_bands_review_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayGradesAndBandsReviewResponse]: + """Get Levels and Bands Review + + Returns the pre-publish review of compensation level groups and levels with validation `errors` and `warnings` consolidated across every setup-wizard step: level naming, group-level checks, and pay band values. This reflects the working draft configuration; when no draft exists it falls back to the currently published configuration. Requesting this review marks all setup steps as visited for the draft, which changes subsequent Get Levels and Bands Status (`get-levels-and-bands-status`) results. The response is a JSON object with a `groups` array; each group carries its `levels` plus its own `errors` and `warnings`, and each level flattens its pay band into `min`, `mid`, `max`, and `percentageRange` value objects (each wrapping a numeric `value` with its own `errors` and `warnings`), along with `currencyCode`, `compensationType`, and the `jobTitles` assigned to that level. Use this for the complete validation picture that determines whether the configuration can be published. For the editable draft view that validates level and group issues but not pay band values, use List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`) instead. For the currently published pay grades and bands without any validation state, use Get Published Levels and Bands (`get-published-levels-and-bands`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_levels_and_bands_review_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsReviewResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_levels_and_bands_review_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Levels and Bands Review + + Returns the pre-publish review of compensation level groups and levels with validation `errors` and `warnings` consolidated across every setup-wizard step: level naming, group-level checks, and pay band values. This reflects the working draft configuration; when no draft exists it falls back to the currently published configuration. Requesting this review marks all setup steps as visited for the draft, which changes subsequent Get Levels and Bands Status (`get-levels-and-bands-status`) results. The response is a JSON object with a `groups` array; each group carries its `levels` plus its own `errors` and `warnings`, and each level flattens its pay band into `min`, `mid`, `max`, and `percentageRange` value objects (each wrapping a numeric `value` with its own `errors` and `warnings`), along with `currencyCode`, `compensationType`, and the `jobTitles` assigned to that level. Use this for the complete validation picture that determines whether the configuration can be published. For the editable draft view that validates level and group issues but not pay band values, use List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`) instead. For the currently published pay grades and bands without any validation state, use Get Published Levels and Bands (`get-published-levels-and-bands`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_levels_and_bands_review_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsReviewResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_levels_and_bands_review_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/pay-grades-and-bands/review", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_levels_and_bands_status( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayGradesAndBandsConfigurationStatus: + """Get Levels and Bands Status + + Returns the configuration status of the Pay Grades & Bands (levels and bands) setup, broken down by setup step. The response is an object with four step keys, `levels`, `payBands`, `jobTitles`, and `review`, each reporting an `isComplete` flag plus `errors` (blocking issues) and `warnings` (non-blocking issues) arrays; the arrays are empty when a step has no outstanding issues. A setup step that has not yet been visited reports `isComplete: false` with empty `errors` and `warnings`, so empty arrays do not necessarily mean the step has no outstanding issues; the step simply has not been evaluated yet. For the `levels`, `payBands`, and `review` steps, each error or warning identifies the offending compensation level group and level; a `levelId` of `0` is a sentinel meaning the issue applies to the group as a whole rather than to a specific level. For `jobTitles`, each warning is a job title that is not yet assigned to a level. Use this to check whether the setup is complete before publishing. For the number of compensation level groups in each status (draft, published, historic), use Get Compensation Level Group Status Counts (`get-compensation-level-group-status-counts`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_levels_and_bands_status_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsConfigurationStatus", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_levels_and_bands_status_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayGradesAndBandsConfigurationStatus]: + """Get Levels and Bands Status + + Returns the configuration status of the Pay Grades & Bands (levels and bands) setup, broken down by setup step. The response is an object with four step keys, `levels`, `payBands`, `jobTitles`, and `review`, each reporting an `isComplete` flag plus `errors` (blocking issues) and `warnings` (non-blocking issues) arrays; the arrays are empty when a step has no outstanding issues. A setup step that has not yet been visited reports `isComplete: false` with empty `errors` and `warnings`, so empty arrays do not necessarily mean the step has no outstanding issues; the step simply has not been evaluated yet. For the `levels`, `payBands`, and `review` steps, each error or warning identifies the offending compensation level group and level; a `levelId` of `0` is a sentinel meaning the issue applies to the group as a whole rather than to a specific level. For `jobTitles`, each warning is a job title that is not yet assigned to a level. Use this to check whether the setup is complete before publishing. For the number of compensation level groups in each status (draft, published, historic), use Get Compensation Level Group Status Counts (`get-compensation-level-group-status-counts`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_levels_and_bands_status_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsConfigurationStatus", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_levels_and_bands_status_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Levels and Bands Status + + Returns the configuration status of the Pay Grades & Bands (levels and bands) setup, broken down by setup step. The response is an object with four step keys, `levels`, `payBands`, `jobTitles`, and `review`, each reporting an `isComplete` flag plus `errors` (blocking issues) and `warnings` (non-blocking issues) arrays; the arrays are empty when a step has no outstanding issues. A setup step that has not yet been visited reports `isComplete: false` with empty `errors` and `warnings`, so empty arrays do not necessarily mean the step has no outstanding issues; the step simply has not been evaluated yet. For the `levels`, `payBands`, and `review` steps, each error or warning identifies the offending compensation level group and level; a `levelId` of `0` is a sentinel meaning the issue applies to the group as a whole rather than to a specific level. For `jobTitles`, each warning is a job title that is not yet assigned to a level. Use this to check whether the setup is complete before publishing. For the number of compensation level groups in each status (draft, published, historic), use Get Compensation Level Group Status Counts (`get-compensation-level-group-status-counts`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_levels_and_bands_status_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsConfigurationStatus", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_levels_and_bands_status_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/pay-grades-and-bands/status", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_pay_bands( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayGradesAndBandsPayBandsResponse: + """Get Pay Bands + + Returns the working draft pay band configuration for every compensation level, including the pay-band-step validation `errors` and `warnings` used by the setup wizard. When no draft configuration exists, the endpoint returns the currently published configuration instead. The response is a JSON object with a `groups` array; each group carries its `levels`, and each level flattens its pay band into `min`, `mid`, `max`, and `percentageRange` value objects (each wrapping a numeric `value` plus its own `errors` and `warnings`), along with `currencyCode`, `compensationType`, and the `jobTitles` assigned to that level. A level is a percentage-based band when `percentageRange.value` is set, and a min-mid-max band when `percentageRange.value` is null. This view surfaces validation for the pay-band setup step; for the same structure with levels-step validation use List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`), and for the published configuration without validation state use Get Published Levels and Bands (`get-published-levels-and-bands`). OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_pay_bands_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsPayBandsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_pay_bands_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayGradesAndBandsPayBandsResponse]: + """Get Pay Bands + + Returns the working draft pay band configuration for every compensation level, including the pay-band-step validation `errors` and `warnings` used by the setup wizard. When no draft configuration exists, the endpoint returns the currently published configuration instead. The response is a JSON object with a `groups` array; each group carries its `levels`, and each level flattens its pay band into `min`, `mid`, `max`, and `percentageRange` value objects (each wrapping a numeric `value` plus its own `errors` and `warnings`), along with `currencyCode`, `compensationType`, and the `jobTitles` assigned to that level. A level is a percentage-based band when `percentageRange.value` is set, and a min-mid-max band when `percentageRange.value` is null. This view surfaces validation for the pay-band setup step; for the same structure with levels-step validation use List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`), and for the published configuration without validation state use Get Published Levels and Bands (`get-published-levels-and-bands`). OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_pay_bands_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsPayBandsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_pay_bands_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Pay Bands + + Returns the working draft pay band configuration for every compensation level, including the pay-band-step validation `errors` and `warnings` used by the setup wizard. When no draft configuration exists, the endpoint returns the currently published configuration instead. The response is a JSON object with a `groups` array; each group carries its `levels`, and each level flattens its pay band into `min`, `mid`, `max`, and `percentageRange` value objects (each wrapping a numeric `value` plus its own `errors` and `warnings`), along with `currencyCode`, `compensationType`, and the `jobTitles` assigned to that level. A level is a percentage-based band when `percentageRange.value` is set, and a min-mid-max band when `percentageRange.value` is null. This view surfaces validation for the pay-band setup step; for the same structure with levels-step validation use List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`), and for the published configuration without validation state use Get Published Levels and Bands (`get-published-levels-and-bands`). OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_pay_bands_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsPayBandsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_pay_bands_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/pay-grades-and-bands/pay-bands", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_published_levels_and_bands( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayGradesAndBandsPublishedResponse: + """Get Published Levels and Bands + + Returns the currently published pay grades and bands as a JSON object with a `groups` array. Each group carries its published compensation levels, and each level flattens its pay band into `min`, `mid`, `max`, `currencyCode`, `percentageRange`, and `compensationType`, plus the job titles assigned to that level. Note the asymmetry: `min`, `mid`, and `max` are plain numbers, while `percentageRange` is an object (`LevelsAndBands-PayBandValue`) carrying its own validation state whose `value` is null for min-mid-max bands. Only published groups are returned; the `groups` array is empty when nothing has been published (this is a status filter, not a permission filter). Unlike the configuration-wizard endpoints, this published view omits the per-group and per-level validation `errors` and `warnings`. For the editable draft configuration with validation state, use List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_published_levels_and_bands_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsPublishedResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_published_levels_and_bands_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayGradesAndBandsPublishedResponse]: + """Get Published Levels and Bands + + Returns the currently published pay grades and bands as a JSON object with a `groups` array. Each group carries its published compensation levels, and each level flattens its pay band into `min`, `mid`, `max`, `currencyCode`, `percentageRange`, and `compensationType`, plus the job titles assigned to that level. Note the asymmetry: `min`, `mid`, and `max` are plain numbers, while `percentageRange` is an object (`LevelsAndBands-PayBandValue`) carrying its own validation state whose `value` is null for min-mid-max bands. Only published groups are returned; the `groups` array is empty when nothing has been published (this is a status filter, not a permission filter). Unlike the configuration-wizard endpoints, this published view omits the per-group and per-level validation `errors` and `warnings`. For the editable draft configuration with validation state, use List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_published_levels_and_bands_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsPublishedResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_published_levels_and_bands_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Published Levels and Bands + + Returns the currently published pay grades and bands as a JSON object with a `groups` array. Each group carries its published compensation levels, and each level flattens its pay band into `min`, `mid`, `max`, `currencyCode`, `percentageRange`, and `compensationType`, plus the job titles assigned to that level. Note the asymmetry: `min`, `mid`, and `max` are plain numbers, while `percentageRange` is an object (`LevelsAndBands-PayBandValue`) carrying its own validation state whose `value` is null for min-mid-max bands. Only published groups are returned; the `groups` array is empty when nothing has been published (this is a status filter, not a permission filter). Unlike the configuration-wizard endpoints, this published view omits the per-group and per-level validation `errors` and `warnings`. For the editable draft configuration with validation state, use List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_published_levels_and_bands_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsPublishedResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_published_levels_and_bands_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/pay-grades-and-bands", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_compensation_level_groups_and_levels( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayGradesAndBandsLevelsResponse: + """List Compensation Level Groups and Levels + + Returns the working draft configuration of compensation level groups and levels, including the per-group and per-level validation `errors` and `warnings` used by the setup wizard. When no draft configuration exists, the endpoint returns the currently published configuration instead. The response is a JSON object with a `groups` array; each group carries its `levels`, and each level flattens its pay band into `min`, `mid`, `max`, and `percentageRange` value objects (each wrapping a numeric `value` plus its own `errors` and `warnings`), along with `currencyCode`, `compensationType`, and the `jobTitles` assigned to that level. The pay band value objects are returned on this view, but their `errors` and `warnings` are not populated here; pay band values are validated only at review/publish. This is the editable draft/editor view: it reflects in-progress edits and surfaces levels-step validation state. For the same draft structure with pay-band-value validation populated use Get Pay Bands (`get-pay-bands`), and for the consolidated pre-publish validation across every step use Get Levels and Bands Review (`get-levels-and-bands-review`). For the currently published pay grades and bands without validation state, use Get Published Levels and Bands (`get-published-levels-and-bands`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_compensation_level_groups_and_levels_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsLevelsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_compensation_level_groups_and_levels_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayGradesAndBandsLevelsResponse]: + """List Compensation Level Groups and Levels + + Returns the working draft configuration of compensation level groups and levels, including the per-group and per-level validation `errors` and `warnings` used by the setup wizard. When no draft configuration exists, the endpoint returns the currently published configuration instead. The response is a JSON object with a `groups` array; each group carries its `levels`, and each level flattens its pay band into `min`, `mid`, `max`, and `percentageRange` value objects (each wrapping a numeric `value` plus its own `errors` and `warnings`), along with `currencyCode`, `compensationType`, and the `jobTitles` assigned to that level. The pay band value objects are returned on this view, but their `errors` and `warnings` are not populated here; pay band values are validated only at review/publish. This is the editable draft/editor view: it reflects in-progress edits and surfaces levels-step validation state. For the same draft structure with pay-band-value validation populated use Get Pay Bands (`get-pay-bands`), and for the consolidated pre-publish validation across every step use Get Levels and Bands Review (`get-levels-and-bands-review`). For the currently published pay grades and bands without validation state, use Get Published Levels and Bands (`get-published-levels-and-bands`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_compensation_level_groups_and_levels_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsLevelsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_compensation_level_groups_and_levels_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Compensation Level Groups and Levels + + Returns the working draft configuration of compensation level groups and levels, including the per-group and per-level validation `errors` and `warnings` used by the setup wizard. When no draft configuration exists, the endpoint returns the currently published configuration instead. The response is a JSON object with a `groups` array; each group carries its `levels`, and each level flattens its pay band into `min`, `mid`, `max`, and `percentageRange` value objects (each wrapping a numeric `value` plus its own `errors` and `warnings`), along with `currencyCode`, `compensationType`, and the `jobTitles` assigned to that level. The pay band value objects are returned on this view, but their `errors` and `warnings` are not populated here; pay band values are validated only at review/publish. This is the editable draft/editor view: it reflects in-progress edits and surfaces levels-step validation state. For the same draft structure with pay-band-value validation populated use Get Pay Bands (`get-pay-bands`), and for the consolidated pre-publish validation across every step use Get Levels and Bands Review (`get-levels-and-bands-review`). For the currently published pay grades and bands without validation state, use Get Published Levels and Bands (`get-published-levels-and-bands`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_compensation_level_groups_and_levels_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsLevelsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_compensation_level_groups_and_levels_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/pay-grades-and-bands/levels", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_job_titles_with_employees( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> list[PayGradesAndBandsJobTitleWithEmployees]: + """List Job Titles with Employees + + Returns every active, non-archived company job title (not only titles used in the pay grades and bands configuration) together with the employees who currently hold each title. The response is a JSON array of job title objects; each carries the job title `id`, its `title` name, and an `employees` array. Each employee entry exposes the internal employee ID (`id` here; the same identifier is `employeeId` on List Employees and `eeid` on the employee dataset) alongside the employee display `name`. This internal employee ID is not the editable Employee # (`employeeNumber`); using `employeeNumber` in its place may resolve to a different employee. An employee is omitted from a title's `employees` array when the authenticated caller lacks permission to view a required employee field (name, job title, or id), so an empty `employees` array does not necessarily mean no one holds that title; it can also mean the caller cannot see the employees who do. The array is empty when no job titles exist. This is a read-only view. Use this to see which employees occupy each job title; for the draft assignment of job titles to compensation levels (which returns no employee data), use Get Job Titles and Level Assignments (`get-job-title-level-assignments`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_job_titles_with_employees_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[PayGradesAndBandsJobTitleWithEmployees]", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_job_titles_with_employees_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[list[PayGradesAndBandsJobTitleWithEmployees]]: + """List Job Titles with Employees + + Returns every active, non-archived company job title (not only titles used in the pay grades and bands configuration) together with the employees who currently hold each title. The response is a JSON array of job title objects; each carries the job title `id`, its `title` name, and an `employees` array. Each employee entry exposes the internal employee ID (`id` here; the same identifier is `employeeId` on List Employees and `eeid` on the employee dataset) alongside the employee display `name`. This internal employee ID is not the editable Employee # (`employeeNumber`); using `employeeNumber` in its place may resolve to a different employee. An employee is omitted from a title's `employees` array when the authenticated caller lacks permission to view a required employee field (name, job title, or id), so an empty `employees` array does not necessarily mean no one holds that title; it can also mean the caller cannot see the employees who do. The array is empty when no job titles exist. This is a read-only view. Use this to see which employees occupy each job title; for the draft assignment of job titles to compensation levels (which returns no employee data), use Get Job Titles and Level Assignments (`get-job-title-level-assignments`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_job_titles_with_employees_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[PayGradesAndBandsJobTitleWithEmployees]", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_job_titles_with_employees_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Job Titles with Employees + + Returns every active, non-archived company job title (not only titles used in the pay grades and bands configuration) together with the employees who currently hold each title. The response is a JSON array of job title objects; each carries the job title `id`, its `title` name, and an `employees` array. Each employee entry exposes the internal employee ID (`id` here; the same identifier is `employeeId` on List Employees and `eeid` on the employee dataset) alongside the employee display `name`. This internal employee ID is not the editable Employee # (`employeeNumber`); using `employeeNumber` in its place may resolve to a different employee. An employee is omitted from a title's `employees` array when the authenticated caller lacks permission to view a required employee field (name, job title, or id), so an empty `employees` array does not necessarily mean no one holds that title; it can also mean the caller cannot see the employees who do. The array is empty when no job titles exist. This is a read-only view. Use this to see which employees occupy each job title; for the draft assignment of job titles to compensation levels (which returns no employee data), use Get Job Titles and Level Assignments (`get-job-title-level-assignments`) instead. OAuth Scopes: pay_grades_and_bands + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_job_titles_with_employees_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[PayGradesAndBandsJobTitleWithEmployees]", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_job_titles_with_employees_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/pay-grades-and-bands/job-titles-with-employees", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def publish_draft_compensation_level_groups( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayGradesAndBandsPublishResponse: + """Publish Draft Compensation Level Groups + + Publishes the company draft compensation configuration, promoting every draft compensation level group, along with its levels, pay bands, and job-title assignments, to the live published set. Any previously published groups are marked historic in the same operation. This is a bodyless POST that takes no request body and always publishes the entire current draft. Build the draft first with Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`), Update Pay Bands (`update-pay-bands`), and Replace Job Title Level Assignments (`replace-job-title-level-assignments`), then publish. Publishing is rejected with a 400 when the draft has unresolved validation errors or warnings. When no draft exists the call is a no-op and still returns success. On success the response is the JSON object `{\"status\":\"success\"}`. Read the published result back with Get Published Levels and Bands (`get-published-levels-and-bands`). OAuth Scopes: pay_grades_and_bands.write + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._publish_draft_compensation_level_groups_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsPublishResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def publish_draft_compensation_level_groups_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayGradesAndBandsPublishResponse]: + """Publish Draft Compensation Level Groups + + Publishes the company draft compensation configuration, promoting every draft compensation level group, along with its levels, pay bands, and job-title assignments, to the live published set. Any previously published groups are marked historic in the same operation. This is a bodyless POST that takes no request body and always publishes the entire current draft. Build the draft first with Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`), Update Pay Bands (`update-pay-bands`), and Replace Job Title Level Assignments (`replace-job-title-level-assignments`), then publish. Publishing is rejected with a 400 when the draft has unresolved validation errors or warnings. When no draft exists the call is a no-op and still returns success. On success the response is the JSON object `{\"status\":\"success\"}`. Read the published result back with Get Published Levels and Bands (`get-published-levels-and-bands`). OAuth Scopes: pay_grades_and_bands.write + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._publish_draft_compensation_level_groups_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsPublishResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def publish_draft_compensation_level_groups_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Publish Draft Compensation Level Groups + + Publishes the company draft compensation configuration, promoting every draft compensation level group, along with its levels, pay bands, and job-title assignments, to the live published set. Any previously published groups are marked historic in the same operation. This is a bodyless POST that takes no request body and always publishes the entire current draft. Build the draft first with Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`), Update Pay Bands (`update-pay-bands`), and Replace Job Title Level Assignments (`replace-job-title-level-assignments`), then publish. Publishing is rejected with a 400 when the draft has unresolved validation errors or warnings. When no draft exists the call is a no-op and still returns success. On success the response is the JSON object `{\"status\":\"success\"}`. Read the published result back with Get Published Levels and Bands (`get-published-levels-and-bands`). OAuth Scopes: pay_grades_and_bands.write + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._publish_draft_compensation_level_groups_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsPublishResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _publish_draft_compensation_level_groups_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/pay-grades-and-bands/publish", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def replace_job_title_level_assignments( + self, + levels_and_bands_job_title_assignments_request: LevelsAndBandsJobTitleAssignmentsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayGradesAndBandsUpdateJobTitlesResponse: + """Replace Job Title Level Assignments + + Replaces the complete set of draft job title-to-compensation-level assignments with the associations in the request. This is a full replacement: all existing draft job title assignments are deleted and replaced with those supplied, so any assignment omitted from the request is removed from the draft. Each entry pairs a job title with the compensation level it should map to. This endpoint writes only job-title assignments; define group and level structure with Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`) and set pay band values with Update Pay Bands (`update-pay-bands`). If no draft exists yet, one is created from the published structure and the supplied published level IDs are remapped onto the newly created draft levels, so later reads return draft-specific level IDs. Every target level must belong to a draft group, otherwise the request fails with 400. Discover job title and level IDs with Get Job Titles and Level Assignments (`get-job-title-level-assignments`). Assignments are written to the draft only; publish them with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). Returns an object with a single `status` field set to `success`. OAuth Scopes: pay_grades_and_bands.write + + :param levels_and_bands_job_title_assignments_request: (required) + :type levels_and_bands_job_title_assignments_request: LevelsAndBandsJobTitleAssignmentsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._replace_job_title_level_assignments_serialize( + levels_and_bands_job_title_assignments_request=levels_and_bands_job_title_assignments_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsUpdateJobTitlesResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def replace_job_title_level_assignments_with_http_info( + self, + levels_and_bands_job_title_assignments_request: LevelsAndBandsJobTitleAssignmentsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayGradesAndBandsUpdateJobTitlesResponse]: + """Replace Job Title Level Assignments + + Replaces the complete set of draft job title-to-compensation-level assignments with the associations in the request. This is a full replacement: all existing draft job title assignments are deleted and replaced with those supplied, so any assignment omitted from the request is removed from the draft. Each entry pairs a job title with the compensation level it should map to. This endpoint writes only job-title assignments; define group and level structure with Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`) and set pay band values with Update Pay Bands (`update-pay-bands`). If no draft exists yet, one is created from the published structure and the supplied published level IDs are remapped onto the newly created draft levels, so later reads return draft-specific level IDs. Every target level must belong to a draft group, otherwise the request fails with 400. Discover job title and level IDs with Get Job Titles and Level Assignments (`get-job-title-level-assignments`). Assignments are written to the draft only; publish them with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). Returns an object with a single `status` field set to `success`. OAuth Scopes: pay_grades_and_bands.write + + :param levels_and_bands_job_title_assignments_request: (required) + :type levels_and_bands_job_title_assignments_request: LevelsAndBandsJobTitleAssignmentsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._replace_job_title_level_assignments_serialize( + levels_and_bands_job_title_assignments_request=levels_and_bands_job_title_assignments_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsUpdateJobTitlesResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def replace_job_title_level_assignments_without_preload_content( + self, + levels_and_bands_job_title_assignments_request: LevelsAndBandsJobTitleAssignmentsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Replace Job Title Level Assignments + + Replaces the complete set of draft job title-to-compensation-level assignments with the associations in the request. This is a full replacement: all existing draft job title assignments are deleted and replaced with those supplied, so any assignment omitted from the request is removed from the draft. Each entry pairs a job title with the compensation level it should map to. This endpoint writes only job-title assignments; define group and level structure with Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`) and set pay band values with Update Pay Bands (`update-pay-bands`). If no draft exists yet, one is created from the published structure and the supplied published level IDs are remapped onto the newly created draft levels, so later reads return draft-specific level IDs. Every target level must belong to a draft group, otherwise the request fails with 400. Discover job title and level IDs with Get Job Titles and Level Assignments (`get-job-title-level-assignments`). Assignments are written to the draft only; publish them with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). Returns an object with a single `status` field set to `success`. OAuth Scopes: pay_grades_and_bands.write + + :param levels_and_bands_job_title_assignments_request: (required) + :type levels_and_bands_job_title_assignments_request: LevelsAndBandsJobTitleAssignmentsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._replace_job_title_level_assignments_serialize( + levels_and_bands_job_title_assignments_request=levels_and_bands_job_title_assignments_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsUpdateJobTitlesResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _replace_job_title_level_assignments_serialize( + self, + levels_and_bands_job_title_assignments_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if levels_and_bands_job_title_assignments_request is not None: + _body_params = levels_and_bands_job_title_assignments_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/pay-grades-and-bands/job-titles", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_compensation_level_groups_and_levels( + self, + pay_grades_and_bands_update_levels_request: PayGradesAndBandsUpdateLevelsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayGradesAndBandsSaveLevelsResponse: + """Update Compensation Level Groups and Levels + + Creates or updates compensation level groups and their levels in the company draft configuration. If no draft exists yet, one is created from the currently published configuration before changes are applied, and published group and level identifiers are mapped to their new draft counterparts. This is a partial upsert. Groups and levels omitted from the request are left unchanged, so it does not overwrite the full set. A group is deleted when its `groupName` is blank or null and it has no levels. A level is deleted when its `levelName` is blank or null and a `levelId` is supplied. Only group and level names and structure are persisted here. The per-level `compensationType` in the request is not applied by this endpoint; a newly created level derives its compensation type from the group's existing compensation type (or `Salary` when the group has none), and existing levels keep their compensation type unchanged. Pay band values (`min`, `mid`, `max`, `percentageRange`, `currencyCode`) and job-title assignments may be present in the payload but are not saved by this endpoint; set pay band values with Update Pay Bands (`update-pay-bands`) and set job-title assignments with Replace Job Title Level Assignments (`replace-job-title-level-assignments`). Changes stay in draft until promoted. Publish them with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). Read the current draft back with List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`). On success the response is a JSON object `{\"status\":\"success\"}`. OAuth Scopes: pay_grades_and_bands.write + + :param pay_grades_and_bands_update_levels_request: (required) + :type pay_grades_and_bands_update_levels_request: PayGradesAndBandsUpdateLevelsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_compensation_level_groups_and_levels_serialize( + pay_grades_and_bands_update_levels_request=pay_grades_and_bands_update_levels_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsSaveLevelsResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_compensation_level_groups_and_levels_with_http_info( + self, + pay_grades_and_bands_update_levels_request: PayGradesAndBandsUpdateLevelsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayGradesAndBandsSaveLevelsResponse]: + """Update Compensation Level Groups and Levels + + Creates or updates compensation level groups and their levels in the company draft configuration. If no draft exists yet, one is created from the currently published configuration before changes are applied, and published group and level identifiers are mapped to their new draft counterparts. This is a partial upsert. Groups and levels omitted from the request are left unchanged, so it does not overwrite the full set. A group is deleted when its `groupName` is blank or null and it has no levels. A level is deleted when its `levelName` is blank or null and a `levelId` is supplied. Only group and level names and structure are persisted here. The per-level `compensationType` in the request is not applied by this endpoint; a newly created level derives its compensation type from the group's existing compensation type (or `Salary` when the group has none), and existing levels keep their compensation type unchanged. Pay band values (`min`, `mid`, `max`, `percentageRange`, `currencyCode`) and job-title assignments may be present in the payload but are not saved by this endpoint; set pay band values with Update Pay Bands (`update-pay-bands`) and set job-title assignments with Replace Job Title Level Assignments (`replace-job-title-level-assignments`). Changes stay in draft until promoted. Publish them with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). Read the current draft back with List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`). On success the response is a JSON object `{\"status\":\"success\"}`. OAuth Scopes: pay_grades_and_bands.write + + :param pay_grades_and_bands_update_levels_request: (required) + :type pay_grades_and_bands_update_levels_request: PayGradesAndBandsUpdateLevelsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_compensation_level_groups_and_levels_serialize( + pay_grades_and_bands_update_levels_request=pay_grades_and_bands_update_levels_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsSaveLevelsResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_compensation_level_groups_and_levels_without_preload_content( + self, + pay_grades_and_bands_update_levels_request: PayGradesAndBandsUpdateLevelsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Compensation Level Groups and Levels + + Creates or updates compensation level groups and their levels in the company draft configuration. If no draft exists yet, one is created from the currently published configuration before changes are applied, and published group and level identifiers are mapped to their new draft counterparts. This is a partial upsert. Groups and levels omitted from the request are left unchanged, so it does not overwrite the full set. A group is deleted when its `groupName` is blank or null and it has no levels. A level is deleted when its `levelName` is blank or null and a `levelId` is supplied. Only group and level names and structure are persisted here. The per-level `compensationType` in the request is not applied by this endpoint; a newly created level derives its compensation type from the group's existing compensation type (or `Salary` when the group has none), and existing levels keep their compensation type unchanged. Pay band values (`min`, `mid`, `max`, `percentageRange`, `currencyCode`) and job-title assignments may be present in the payload but are not saved by this endpoint; set pay band values with Update Pay Bands (`update-pay-bands`) and set job-title assignments with Replace Job Title Level Assignments (`replace-job-title-level-assignments`). Changes stay in draft until promoted. Publish them with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). Read the current draft back with List Compensation Level Groups and Levels (`list-compensation-level-groups-and-levels`). On success the response is a JSON object `{\"status\":\"success\"}`. OAuth Scopes: pay_grades_and_bands.write + + :param pay_grades_and_bands_update_levels_request: (required) + :type pay_grades_and_bands_update_levels_request: PayGradesAndBandsUpdateLevelsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_compensation_level_groups_and_levels_serialize( + pay_grades_and_bands_update_levels_request=pay_grades_and_bands_update_levels_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsSaveLevelsResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_compensation_level_groups_and_levels_serialize( + self, + pay_grades_and_bands_update_levels_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if pay_grades_and_bands_update_levels_request is not None: + _body_params = pay_grades_and_bands_update_levels_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/pay-grades-and-bands/levels", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def update_pay_bands( + self, + update_pay_bands_request: UpdatePayBandsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayGradesAndBandsUpdatePayBandsResponse: + """Update Pay Bands + + Updates the pay band values (`min`, `mid`, `max`, `percentageRange`) for compensation levels in the company's draft pay grades and bands. This is the only endpoint that persists pay band values; Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`) defines the group and level structure but does not save band values. Job-title assignments are set separately with Replace Job Title Level Assignments (`replace-job-title-level-assignments`). Supply the level IDs returned by Get Pay Bands (`get-pay-bands`). If no draft exists yet, one is created from the published structure and the supplied published level IDs are remapped onto the newly created draft levels, so later reads return draft-specific level IDs. When `payBandType` is `percentRange`, `min` and `max` are derived from `mid` and `percentageRange` and any supplied `min`/`max` are ignored; when `minMidMax`, the supplied `min`/`mid`/`max` are stored and `percentageRange` is cleared. Every target level must belong to a draft group, otherwise the request fails with 400. Values are written to the draft only; publish them with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). Returns an object with a single `status` field set to `success`. OAuth Scopes: pay_grades_and_bands.write + + :param update_pay_bands_request: (required) + :type update_pay_bands_request: UpdatePayBandsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_pay_bands_serialize( + update_pay_bands_request=update_pay_bands_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsUpdatePayBandsResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_pay_bands_with_http_info( + self, + update_pay_bands_request: UpdatePayBandsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayGradesAndBandsUpdatePayBandsResponse]: + """Update Pay Bands + + Updates the pay band values (`min`, `mid`, `max`, `percentageRange`) for compensation levels in the company's draft pay grades and bands. This is the only endpoint that persists pay band values; Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`) defines the group and level structure but does not save band values. Job-title assignments are set separately with Replace Job Title Level Assignments (`replace-job-title-level-assignments`). Supply the level IDs returned by Get Pay Bands (`get-pay-bands`). If no draft exists yet, one is created from the published structure and the supplied published level IDs are remapped onto the newly created draft levels, so later reads return draft-specific level IDs. When `payBandType` is `percentRange`, `min` and `max` are derived from `mid` and `percentageRange` and any supplied `min`/`max` are ignored; when `minMidMax`, the supplied `min`/`mid`/`max` are stored and `percentageRange` is cleared. Every target level must belong to a draft group, otherwise the request fails with 400. Values are written to the draft only; publish them with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). Returns an object with a single `status` field set to `success`. OAuth Scopes: pay_grades_and_bands.write + + :param update_pay_bands_request: (required) + :type update_pay_bands_request: UpdatePayBandsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_pay_bands_serialize( + update_pay_bands_request=update_pay_bands_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsUpdatePayBandsResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_pay_bands_without_preload_content( + self, + update_pay_bands_request: UpdatePayBandsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Pay Bands + + Updates the pay band values (`min`, `mid`, `max`, `percentageRange`) for compensation levels in the company's draft pay grades and bands. This is the only endpoint that persists pay band values; Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`) defines the group and level structure but does not save band values. Job-title assignments are set separately with Replace Job Title Level Assignments (`replace-job-title-level-assignments`). Supply the level IDs returned by Get Pay Bands (`get-pay-bands`). If no draft exists yet, one is created from the published structure and the supplied published level IDs are remapped onto the newly created draft levels, so later reads return draft-specific level IDs. When `payBandType` is `percentRange`, `min` and `max` are derived from `mid` and `percentageRange` and any supplied `min`/`max` are ignored; when `minMidMax`, the supplied `min`/`mid`/`max` are stored and `percentageRange` is cleared. Every target level must belong to a draft group, otherwise the request fails with 400. Values are written to the draft only; publish them with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). Returns an object with a single `status` field set to `success`. OAuth Scopes: pay_grades_and_bands.write + + :param update_pay_bands_request: (required) + :type update_pay_bands_request: UpdatePayBandsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._update_pay_bands_serialize( + update_pay_bands_request=update_pay_bands_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "PayGradesAndBandsUpdatePayBandsResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_pay_bands_serialize( + self, + update_pay_bands_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_pay_bands_request is not None: + _body_params = update_pay_bands_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/pay-grades-and-bands/pay-bands", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def upload_levels_and_bands_csv( + self, + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], + Field(description="Levels and bands CSV file to parse and preview."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> LevelsAndBandsUploadResponse: + """Upload Levels and Bands CSV + + Parses an uploaded levels and bands CSV and returns a preview of the parsed rows along with a suggested column mapping. This validates and previews only; it does not persist anything or create a draft. The response is a JSON object with `uploadData`, an array of row arrays holding the raw cell strings for each data row, and `columnMap`, which pairs each CSV column header with the field it maps to (`expectedColumnKey`), or null when the header is not recognized. Recognized field keys are `groupName`, `levelName`, `min`, `mid`, `max`, `compensationType`, `currency`, and `jobTitles`. Use this to confirm a spreadsheet before writing; to persist the data, build the draft with Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`), Update Pay Bands (`update-pay-bands`), and Replace Job Title Level Assignments (`replace-job-title-level-assignments`), then publish it with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). OAuth Scopes: pay_grades_and_bands.write + + :param file: Levels and bands CSV file to parse and preview. (required) + :type file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._upload_levels_and_bands_csv_serialize( + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "LevelsAndBandsUploadResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def upload_levels_and_bands_csv_with_http_info( + self, + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], + Field(description="Levels and bands CSV file to parse and preview."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[LevelsAndBandsUploadResponse]: + """Upload Levels and Bands CSV + + Parses an uploaded levels and bands CSV and returns a preview of the parsed rows along with a suggested column mapping. This validates and previews only; it does not persist anything or create a draft. The response is a JSON object with `uploadData`, an array of row arrays holding the raw cell strings for each data row, and `columnMap`, which pairs each CSV column header with the field it maps to (`expectedColumnKey`), or null when the header is not recognized. Recognized field keys are `groupName`, `levelName`, `min`, `mid`, `max`, `compensationType`, `currency`, and `jobTitles`. Use this to confirm a spreadsheet before writing; to persist the data, build the draft with Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`), Update Pay Bands (`update-pay-bands`), and Replace Job Title Level Assignments (`replace-job-title-level-assignments`), then publish it with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). OAuth Scopes: pay_grades_and_bands.write + + :param file: Levels and bands CSV file to parse and preview. (required) + :type file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._upload_levels_and_bands_csv_serialize( + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "LevelsAndBandsUploadResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def upload_levels_and_bands_csv_without_preload_content( + self, + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], + Field(description="Levels and bands CSV file to parse and preview."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Upload Levels and Bands CSV + + Parses an uploaded levels and bands CSV and returns a preview of the parsed rows along with a suggested column mapping. This validates and previews only; it does not persist anything or create a draft. The response is a JSON object with `uploadData`, an array of row arrays holding the raw cell strings for each data row, and `columnMap`, which pairs each CSV column header with the field it maps to (`expectedColumnKey`), or null when the header is not recognized. Recognized field keys are `groupName`, `levelName`, `min`, `mid`, `max`, `compensationType`, `currency`, and `jobTitles`. Use this to confirm a spreadsheet before writing; to persist the data, build the draft with Update Compensation Level Groups and Levels (`update-compensation-level-groups-and-levels`), Update Pay Bands (`update-pay-bands`), and Replace Job Title Level Assignments (`replace-job-title-level-assignments`), then publish it with Publish Draft Compensation Level Groups (`publish-draft-compensation-level-groups`). OAuth Scopes: pay_grades_and_bands.write + + :param file: Levels and bands CSV file to parse and preview. (required) + :type file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._upload_levels_and_bands_csv_serialize( + file=file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "LevelsAndBandsUploadResponse", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _upload_levels_and_bands_csv_serialize( + self, + file, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if file is not None: + _files["file"] = file + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["multipart/form-data"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/pay-grades-and-bands/import", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/photos_api.py b/bamboohr_sdk/api/photos_api.py index 1f545ae..8687515 100644 --- a/bamboohr_sdk/api/photos_api.py +++ b/bamboohr_sdk/api/photos_api.py @@ -1,24 +1,17 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any -from pydantic import Field, StrictBytes, StrictInt, StrictStr, field_validator -from typing import Optional, Tuple, Union -from typing_extensions import Annotated +from pydantic import Field, StrictBytes, StrictFloat, StrictInt, StrictStr, validate_call from bamboohr_sdk.api_client import ApiClient, RequestSerialized from bamboohr_sdk.api_response import ApiResponse @@ -37,30 +30,37 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def get_employee_photo( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee whose photo to retrieve.")], - size: Annotated[StrictStr, Field(description="The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`.")], - width: Annotated[Optional[StrictInt], Field(description="Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes.")] = None, - height: Annotated[Optional[StrictInt], Field(description="Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[StrictInt | None, Field(description="The ID of the employee whose photo to retrieve.")], + size: Annotated[ + StrictStr, + Field(description="The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`."), + ], + width: Annotated[ + StrictInt | None, + Field( + description="Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes." + ), + ] = None, + height: Annotated[ + StrictInt | None, + Field( + description="Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Get Employee Photo - Returns an employee photo at the requested size. Available sizes are: `original` (full resolution), `large` (340×340), `medium` (170×170), `small` (150×150), `xs` (50×50), and `tiny` (20×20). The server always sets `Content-Type: image/jpeg`, but the underlying byte payload may reflect the original upload format. + Returns an employee photo at the requested size. Available sizes are: `original` (full resolution), `large` (340×340), `medium` (170×170), `small` (150×150), `xs` (50×50), and `tiny` (20×20). The response shape is selected via standard HTTP content negotiation. By default the body is the stored image bytes and the `Content-Type` response header matches the body (`image/jpeg`, `image/png`, `image/bmp`, `image/gif`, or `image/tiff`). When the caller sends `Accept: application/json`, the body is a JSON object `{ mimeType, fileBase64 }` with the same image bytes base64-encoded. The JSON variant is not recommended for AI connector use, since the base64 payload is too large for an AI model to consume reliably as text input. For AI connectors that need to display or reference a photo, use the `photoUrl` field returned by `list-employees` instead. It is a time-limited signed URL that avoids transferring image bytes through the AI model's context. A 404 response covers three distinct cases: (1) the employee exists but has no photo on file (a normal, non-error state), (2) the employee ID does not exist, or (3) the size value is not one of the recognized options. The `x-bamboohr-error-message` response header distinguishes them: `Employee photo not found`, `Employee not found`, or `Size: \"\" is not a valid size option. Valid sizes are: xs, small, tiny, original, medium and large.`. Treat \"Employee photo not found\" as a normal \"no photo on file\" result rather than as a bad employee ID, permission failure, or other error to debug. OAuth Scopes: employee:photo :param employee_id: The ID of the employee whose photo to retrieve. (required) :type employee_id: int @@ -90,7 +90,7 @@ def get_employee_photo( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_photo_serialize( employee_id=employee_id, @@ -100,18 +100,15 @@ def get_employee_photo( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -119,30 +116,37 @@ def get_employee_photo( response_types_map=_response_types_map, ) - @validate_call def get_employee_photo_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee whose photo to retrieve.")], - size: Annotated[StrictStr, Field(description="The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`.")], - width: Annotated[Optional[StrictInt], Field(description="Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes.")] = None, - height: Annotated[Optional[StrictInt], Field(description="Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[StrictInt | None, Field(description="The ID of the employee whose photo to retrieve.")], + size: Annotated[ + StrictStr, + Field(description="The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`."), + ], + width: Annotated[ + StrictInt | None, + Field( + description="Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes." + ), + ] = None, + height: Annotated[ + StrictInt | None, + Field( + description="Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Get Employee Photo - Returns an employee photo at the requested size. Available sizes are: `original` (full resolution), `large` (340×340), `medium` (170×170), `small` (150×150), `xs` (50×50), and `tiny` (20×20). The server always sets `Content-Type: image/jpeg`, but the underlying byte payload may reflect the original upload format. + Returns an employee photo at the requested size. Available sizes are: `original` (full resolution), `large` (340×340), `medium` (170×170), `small` (150×150), `xs` (50×50), and `tiny` (20×20). The response shape is selected via standard HTTP content negotiation. By default the body is the stored image bytes and the `Content-Type` response header matches the body (`image/jpeg`, `image/png`, `image/bmp`, `image/gif`, or `image/tiff`). When the caller sends `Accept: application/json`, the body is a JSON object `{ mimeType, fileBase64 }` with the same image bytes base64-encoded. The JSON variant is not recommended for AI connector use, since the base64 payload is too large for an AI model to consume reliably as text input. For AI connectors that need to display or reference a photo, use the `photoUrl` field returned by `list-employees` instead. It is a time-limited signed URL that avoids transferring image bytes through the AI model's context. A 404 response covers three distinct cases: (1) the employee exists but has no photo on file (a normal, non-error state), (2) the employee ID does not exist, or (3) the size value is not one of the recognized options. The `x-bamboohr-error-message` response header distinguishes them: `Employee photo not found`, `Employee not found`, or `Size: \"\" is not a valid size option. Valid sizes are: xs, small, tiny, original, medium and large.`. Treat \"Employee photo not found\" as a normal \"no photo on file\" result rather than as a bad employee ID, permission failure, or other error to debug. OAuth Scopes: employee:photo :param employee_id: The ID of the employee whose photo to retrieve. (required) :type employee_id: int @@ -172,7 +176,7 @@ def get_employee_photo_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_photo_serialize( employee_id=employee_id, @@ -182,48 +186,52 @@ def get_employee_photo_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_employee_photo_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee whose photo to retrieve.")], - size: Annotated[StrictStr, Field(description="The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`.")], - width: Annotated[Optional[StrictInt], Field(description="Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes.")] = None, - height: Annotated[Optional[StrictInt], Field(description="Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[StrictInt | None, Field(description="The ID of the employee whose photo to retrieve.")], + size: Annotated[ + StrictStr, + Field(description="The desired photo size. One of: `original`, `large`, `medium`, `small`, `xs`, `tiny`."), + ], + width: Annotated[ + StrictInt | None, + Field( + description="Optional. Scales the returned image to the specified pixel width, capped at the natural width of the requested size. Only applies to `small` and `tiny` sizes." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + height: Annotated[ + StrictInt | None, + Field( + description="Optional. Scales the returned image to the specified pixel height, capped at the natural height of the requested size. Only applies to `small` and `tiny` sizes." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Employee Photo - Returns an employee photo at the requested size. Available sizes are: `original` (full resolution), `large` (340×340), `medium` (170×170), `small` (150×150), `xs` (50×50), and `tiny` (20×20). The server always sets `Content-Type: image/jpeg`, but the underlying byte payload may reflect the original upload format. + Returns an employee photo at the requested size. Available sizes are: `original` (full resolution), `large` (340×340), `medium` (170×170), `small` (150×150), `xs` (50×50), and `tiny` (20×20). The response shape is selected via standard HTTP content negotiation. By default the body is the stored image bytes and the `Content-Type` response header matches the body (`image/jpeg`, `image/png`, `image/bmp`, `image/gif`, or `image/tiff`). When the caller sends `Accept: application/json`, the body is a JSON object `{ mimeType, fileBase64 }` with the same image bytes base64-encoded. The JSON variant is not recommended for AI connector use, since the base64 payload is too large for an AI model to consume reliably as text input. For AI connectors that need to display or reference a photo, use the `photoUrl` field returned by `list-employees` instead. It is a time-limited signed URL that avoids transferring image bytes through the AI model's context. A 404 response covers three distinct cases: (1) the employee exists but has no photo on file (a normal, non-error state), (2) the employee ID does not exist, or (3) the size value is not one of the recognized options. The `x-bamboohr-error-message` response header distinguishes them: `Employee photo not found`, `Employee not found`, or `Size: \"\" is not a valid size option. Valid sizes are: xs, small, tiny, original, medium and large.`. Treat \"Employee photo not found\" as a normal \"no photo on file\" result rather than as a bad employee ID, permission failure, or other error to debug. OAuth Scopes: employee:photo :param employee_id: The ID of the employee whose photo to retrieve. (required) :type employee_id: int @@ -253,7 +261,7 @@ def get_employee_photo_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_employee_photo_serialize( employee_id=employee_id, @@ -263,21 +271,17 @@ def get_employee_photo_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_employee_photo_serialize( self, employee_id, @@ -292,55 +296,41 @@ def _get_employee_photo_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id if size is not None: - _path_params['size'] = size + _path_params["size"] = size # process the query parameters if width is not None: - - _query_params.append(('width', width)) - + _query_params.append(("width", width)) + if height is not None: - - _query_params.append(('height', height)) - + _query_params.append(("height", height)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'image/jpeg' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["image/*", "application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employees/{employeeId}/photo/{size}', + method="GET", + resource_path="/api/v1/employees/{employeeId}/photo/{size}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -350,37 +340,37 @@ def _get_employee_photo_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def upload_employee_photo( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee whose photo is being uploaded.")], - file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The image file to upload as the employee's photo.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee whose photo is being uploaded."), + ], + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], + Field( + description="The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. This endpoint does not perform cropping; non-square sources must be cropped client-side before upload." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Upload Employee Photo - Uploads a new photo for an employee. The request must be a `multipart/form-data` POST with a `file` field. Confirmed supported formats: JPEG, PNG, BMP. Other formats (e.g. HEIC, SVG, AVIF, TIFF) are not reliably supported and may return 415, 500, or 502. The image must be square (width and height must match within one pixel) and at least 150×150 pixels. Maximum file size is 20MB. The photo replaces the employee's current photo for all size variants. Employees may upload their own photo if the company has self-photo uploads enabled. + Uploads a new photo for an employee. Accepts a `multipart/form-data` POST with a `file` field carrying raw binary image bytes (typical browser and SDK usage). An `application/json` POST with a `fileBase64` property is also accepted, but it is not recommended for AI connector use. The base64 payload is too large for an AI model to produce reliably in a single tool call. Supported formats: JPEG, PNG, BMP, GIF. Other formats (HEIC, SVG, AVIF, WebP) are rejected with 415. TIFF is accepted by the format gate but some variants may fail downstream. The image must be square within 1 pixel and at least 150×150 pixels. This endpoint does not perform cropping, so if your source image is not square, you must crop it before uploading. Photo upload through this endpoint is not a viable AI connector workflow. For interactive cropping or any AI-initiated photo change, redirect the user to the BambooHR web UI. Maximum file size is 20MB (applies to the decoded bytes for the JSON variant). The photo replaces the employee's current photo for all size variants. Employees may upload their own photo if the company has self-photo uploads enabled. OAuth Scopes: employee:photo.write - :param employee_id: The ID of the employee whose photo is being uploaded. (required) + :param employee_id: The internal employee ID of the employee whose photo is being uploaded. (required) :type employee_id: int - :param file: The image file to upload as the employee's photo. (required) + :param file: The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. This endpoint does not perform cropping; non-square sources must be cropped client-side before upload. (required) :type file: bytearray :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -402,7 +392,7 @@ def upload_employee_photo( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._upload_employee_photo_serialize( employee_id=employee_id, @@ -410,21 +400,19 @@ def upload_employee_photo( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '403': None, - '404': None, - '413': None, - '415': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "402": None, + "403": None, + "404": None, + "413": None, + "415": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -432,32 +420,34 @@ def upload_employee_photo( response_types_map=_response_types_map, ) - @validate_call def upload_employee_photo_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee whose photo is being uploaded.")], - file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The image file to upload as the employee's photo.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee whose photo is being uploaded."), + ], + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], + Field( + description="The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. This endpoint does not perform cropping; non-square sources must be cropped client-side before upload." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Upload Employee Photo - Uploads a new photo for an employee. The request must be a `multipart/form-data` POST with a `file` field. Confirmed supported formats: JPEG, PNG, BMP. Other formats (e.g. HEIC, SVG, AVIF, TIFF) are not reliably supported and may return 415, 500, or 502. The image must be square (width and height must match within one pixel) and at least 150×150 pixels. Maximum file size is 20MB. The photo replaces the employee's current photo for all size variants. Employees may upload their own photo if the company has self-photo uploads enabled. + Uploads a new photo for an employee. Accepts a `multipart/form-data` POST with a `file` field carrying raw binary image bytes (typical browser and SDK usage). An `application/json` POST with a `fileBase64` property is also accepted, but it is not recommended for AI connector use. The base64 payload is too large for an AI model to produce reliably in a single tool call. Supported formats: JPEG, PNG, BMP, GIF. Other formats (HEIC, SVG, AVIF, WebP) are rejected with 415. TIFF is accepted by the format gate but some variants may fail downstream. The image must be square within 1 pixel and at least 150×150 pixels. This endpoint does not perform cropping, so if your source image is not square, you must crop it before uploading. Photo upload through this endpoint is not a viable AI connector workflow. For interactive cropping or any AI-initiated photo change, redirect the user to the BambooHR web UI. Maximum file size is 20MB (applies to the decoded bytes for the JSON variant). The photo replaces the employee's current photo for all size variants. Employees may upload their own photo if the company has self-photo uploads enabled. OAuth Scopes: employee:photo.write - :param employee_id: The ID of the employee whose photo is being uploaded. (required) + :param employee_id: The internal employee ID of the employee whose photo is being uploaded. (required) :type employee_id: int - :param file: The image file to upload as the employee's photo. (required) + :param file: The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. This endpoint does not perform cropping; non-square sources must be cropped client-side before upload. (required) :type file: bytearray :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -479,7 +469,7 @@ def upload_employee_photo_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._upload_employee_photo_serialize( employee_id=employee_id, @@ -487,53 +477,53 @@ def upload_employee_photo_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '403': None, - '404': None, - '413': None, - '415': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "402": None, + "403": None, + "404": None, + "413": None, + "415": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def upload_employee_photo_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee whose photo is being uploaded.")], - file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The image file to upload as the employee's photo.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee whose photo is being uploaded."), + ], + file: Annotated[ + StrictBytes | StrictStr | tuple[StrictStr, StrictBytes], + Field( + description="The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. This endpoint does not perform cropping; non-square sources must be cropped client-side before upload." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Upload Employee Photo - Uploads a new photo for an employee. The request must be a `multipart/form-data` POST with a `file` field. Confirmed supported formats: JPEG, PNG, BMP. Other formats (e.g. HEIC, SVG, AVIF, TIFF) are not reliably supported and may return 415, 500, or 502. The image must be square (width and height must match within one pixel) and at least 150×150 pixels. Maximum file size is 20MB. The photo replaces the employee's current photo for all size variants. Employees may upload their own photo if the company has self-photo uploads enabled. + Uploads a new photo for an employee. Accepts a `multipart/form-data` POST with a `file` field carrying raw binary image bytes (typical browser and SDK usage). An `application/json` POST with a `fileBase64` property is also accepted, but it is not recommended for AI connector use. The base64 payload is too large for an AI model to produce reliably in a single tool call. Supported formats: JPEG, PNG, BMP, GIF. Other formats (HEIC, SVG, AVIF, WebP) are rejected with 415. TIFF is accepted by the format gate but some variants may fail downstream. The image must be square within 1 pixel and at least 150×150 pixels. This endpoint does not perform cropping, so if your source image is not square, you must crop it before uploading. Photo upload through this endpoint is not a viable AI connector workflow. For interactive cropping or any AI-initiated photo change, redirect the user to the BambooHR web UI. Maximum file size is 20MB (applies to the decoded bytes for the JSON variant). The photo replaces the employee's current photo for all size variants. Employees may upload their own photo if the company has self-photo uploads enabled. OAuth Scopes: employee:photo.write - :param employee_id: The ID of the employee whose photo is being uploaded. (required) + :param employee_id: The internal employee ID of the employee whose photo is being uploaded. (required) :type employee_id: int - :param file: The image file to upload as the employee's photo. (required) + :param file: The image file to upload as the employee's photo. Supported formats: JPEG, PNG, BMP, GIF (HEIC, SVG, AVIF, and WebP are rejected with 415; TIFF is accepted by the format gate but some variants may fail downstream). Must be square (width and height within 1 pixel), at least 150×150 pixels, and no larger than 20MB. This endpoint does not perform cropping; non-square sources must be cropped client-side before upload. (required) :type file: bytearray :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -555,7 +545,7 @@ def upload_employee_photo_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._upload_employee_photo_serialize( employee_id=employee_id, @@ -563,24 +553,21 @@ def upload_employee_photo_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '403': None, - '404': None, - '413': None, - '415': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "402": None, + "403": None, + "404": None, + "413": None, + "415": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _upload_employee_photo_serialize( self, employee_id, @@ -593,53 +580,41 @@ def _upload_employee_photo_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters if file is not None: - _files['file'] = file + _files["file"] = file # process the body parameter - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["multipart/form-data", "application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/employees/{employeeId}/photo', + method="POST", + resource_path="/api/v1/employees/{employeeId}/photo", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -649,7 +624,5 @@ def _upload_employee_photo_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/reports_api.py b/bamboohr_sdk/api/reports_api.py index 88d374b..4d1e49d 100644 --- a/bamboohr_sdk/api/reports_api.py +++ b/bamboohr_sdk/api/reports_api.py @@ -1,30 +1,24 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any -from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Optional -from typing_extensions import Annotated -from bamboohr_sdk.models.get_company_report_response import GetCompanyReportResponse -from bamboohr_sdk.models.request_custom_report import RequestCustomReport -from bamboohr_sdk.models.request_custom_report_response import RequestCustomReportResponse +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call from bamboohr_sdk.api_client import ApiClient, RequestSerialized from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.get_company_report_response import GetCompanyReportResponse +from bamboohr_sdk.models.request_custom_report import RequestCustomReport +from bamboohr_sdk.models.request_custom_report_response import RequestCustomReportResponse from bamboohr_sdk.rest import RESTResponseType @@ -40,41 +34,60 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def get_company_report( self, - id: Annotated[StrictInt, Field(description="The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - format: Annotated[Optional[StrictStr], Field(description="The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404.")] = None, - fd: Annotated[Optional[StrictStr], Field(description="Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats).")] = None, - only_current: Annotated[Optional[StrictBool], Field(description="Whether to restrict results to current (non-future-dated) field values. Set to false to include future-dated history field values. Defaults to true.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[ + StrictInt | None, + Field( + description="The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL." + ), + ], + accept: Annotated[ + StrictStr | None, + Field( + description="The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404." + ), + ] = None, + format: Annotated[ + StrictStr | None, + Field( + description="The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + fd: Annotated[ + StrictStr | None, + Field( + description="Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats)." + ), + ] = None, + only_current: Annotated[ + StrictBool | None, + Field( + description="Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GetCompanyReportResponse: - """Get Company Report + """(Deprecated) Get Company Report - **Warning: This endpoint will soon be deprecated and replaced with Custom Reports - Get Report by ID.** Returns the data from an existing saved custom report. Non-admins can find these reports in My Reports. Admins can find them in Custom Reports under the My Reports and Company Reports tabs. The report ID can be found by hovering over the report name in BambooHR and noting the ID in the URL. Standard Reports are not available via this endpoint, and report IDs are company-specific. The caller must have permission to view or access the report. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) returns 404. + **Deprecated. Use Custom Reports > Get Report by ID instead.** Returns the data from an existing saved custom report. Non-admins can find these reports in My Reports. Admins can find them in Custom Reports under the My Reports and Company Reports tabs. The report ID can be found by hovering over the report name in BambooHR and noting the ID in the URL. Standard Reports are not available via this endpoint, and report IDs are company-specific. The caller must have permission to view or access the report. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) returns 404. OAuth Scopes: report :param id: The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL. (required) :type id: int - :param accept_header_parameter: This endpoint can produce either JSON or XML. - :type accept_header_parameter: str + :param accept: The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. + :type accept: str :param format: The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. :type format: str :param fd: Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats). :type fd: str - :param only_current: Whether to restrict results to current (non-future-dated) field values. Set to false to include future-dated history field values. Defaults to true. + :param only_current: Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. :type only_current: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -96,70 +109,87 @@ def get_company_report( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("GET /api/v1/reports/{id} is deprecated.", DeprecationWarning) _param = self._get_company_report_serialize( id=id, - accept_header_parameter=accept_header_parameter, + accept=accept, format=format, fd=fd, only_current=only_current, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetCompanyReportResponse", - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GetCompanyReportResponse", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_company_report_with_http_info( self, - id: Annotated[StrictInt, Field(description="The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - format: Annotated[Optional[StrictStr], Field(description="The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404.")] = None, - fd: Annotated[Optional[StrictStr], Field(description="Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats).")] = None, - only_current: Annotated[Optional[StrictBool], Field(description="Whether to restrict results to current (non-future-dated) field values. Set to false to include future-dated history field values. Defaults to true.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[ + StrictInt | None, + Field( + description="The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL." + ), + ], + accept: Annotated[ + StrictStr | None, + Field( + description="The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404." + ), + ] = None, + format: Annotated[ + StrictStr | None, + Field( + description="The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404." + ), + ] = None, + fd: Annotated[ + StrictStr | None, + Field( + description="Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats)." + ), + ] = None, + only_current: Annotated[ + StrictBool | None, + Field( + description="Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GetCompanyReportResponse]: - """Get Company Report + """(Deprecated) Get Company Report - **Warning: This endpoint will soon be deprecated and replaced with Custom Reports - Get Report by ID.** Returns the data from an existing saved custom report. Non-admins can find these reports in My Reports. Admins can find them in Custom Reports under the My Reports and Company Reports tabs. The report ID can be found by hovering over the report name in BambooHR and noting the ID in the URL. Standard Reports are not available via this endpoint, and report IDs are company-specific. The caller must have permission to view or access the report. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) returns 404. + **Deprecated. Use Custom Reports > Get Report by ID instead.** Returns the data from an existing saved custom report. Non-admins can find these reports in My Reports. Admins can find them in Custom Reports under the My Reports and Company Reports tabs. The report ID can be found by hovering over the report name in BambooHR and noting the ID in the URL. Standard Reports are not available via this endpoint, and report IDs are company-specific. The caller must have permission to view or access the report. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) returns 404. OAuth Scopes: report :param id: The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL. (required) :type id: int - :param accept_header_parameter: This endpoint can produce either JSON or XML. - :type accept_header_parameter: str + :param accept: The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. + :type accept: str :param format: The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. :type format: str :param fd: Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats). :type fd: str - :param only_current: Whether to restrict results to current (non-future-dated) field values. Set to false to include future-dated history field values. Defaults to true. + :param only_current: Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. :type only_current: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -181,70 +211,87 @@ def get_company_report_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("GET /api/v1/reports/{id} is deprecated.", DeprecationWarning) _param = self._get_company_report_serialize( id=id, - accept_header_parameter=accept_header_parameter, + accept=accept, format=format, fd=fd, only_current=only_current, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetCompanyReportResponse", - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GetCompanyReportResponse", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_company_report_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - format: Annotated[Optional[StrictStr], Field(description="The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404.")] = None, - fd: Annotated[Optional[StrictStr], Field(description="Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats).")] = None, - only_current: Annotated[Optional[StrictBool], Field(description="Whether to restrict results to current (non-future-dated) field values. Set to false to include future-dated history field values. Defaults to true.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + id: Annotated[ + StrictInt | None, + Field( + description="The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL." + ), + ], + accept: Annotated[ + StrictStr | None, + Field( + description="The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404." + ), + ] = None, + format: Annotated[ + StrictStr | None, + Field( + description="The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + fd: Annotated[ + StrictStr | None, + Field( + description="Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats)." + ), + ] = None, + only_current: Annotated[ + StrictBool | None, + Field( + description="Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Company Report + """(Deprecated) Get Company Report - **Warning: This endpoint will soon be deprecated and replaced with Custom Reports - Get Report by ID.** Returns the data from an existing saved custom report. Non-admins can find these reports in My Reports. Admins can find them in Custom Reports under the My Reports and Company Reports tabs. The report ID can be found by hovering over the report name in BambooHR and noting the ID in the URL. Standard Reports are not available via this endpoint, and report IDs are company-specific. The caller must have permission to view or access the report. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) returns 404. + **Deprecated. Use Custom Reports > Get Report by ID instead.** Returns the data from an existing saved custom report. Non-admins can find these reports in My Reports. Admins can find them in Custom Reports under the My Reports and Company Reports tabs. The report ID can be found by hovering over the report name in BambooHR and noting the ID in the URL. Standard Reports are not available via this endpoint, and report IDs are company-specific. The caller must have permission to view or access the report. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) returns 404. OAuth Scopes: report :param id: The integer ID of the saved custom report to run. Find this ID by hovering over the report name in the BambooHR Reports tab and noting the ID in the URL. (required) :type id: int - :param accept_header_parameter: This endpoint can produce either JSON or XML. - :type accept_header_parameter: str + :param accept: The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. + :type accept: str :param format: The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. :type format: str :param fd: Controls duplicate row filtering. `yes` applies standard deduplication (default for JSON and XML formats). `no` returns raw results without filtering (default for CSV and XLS formats). :type fd: str - :param only_current: Whether to restrict results to current (non-future-dated) field values. Set to false to include future-dated history field values. Defaults to true. + :param only_current: Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. :type only_current: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -266,36 +313,33 @@ def get_company_report_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("GET /api/v1/reports/{id} is deprecated.", DeprecationWarning) _param = self._get_company_report_serialize( id=id, - accept_header_parameter=accept_header_parameter, + accept=accept, format=format, fd=fd, only_current=only_current, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetCompanyReportResponse", - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "GetCompanyReportResponse", + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_company_report_serialize( self, id, - accept_header_parameter, + accept, format, fd, only_current, @@ -307,63 +351,46 @@ def _get_company_report_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters if format is not None: - - _query_params.append(('format', format)) - + _query_params.append(("format", format)) + if fd is not None: - - _query_params.append(('fd', fd)) - + _query_params.append(("fd", fd)) + if only_current is not None: - - _query_params.append(('onlyCurrent', only_current)) - + _query_params.append(("onlyCurrent", only_current)) + # process the header parameters - if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + if accept is not None: + _header_params["Accept"] = accept # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/xml', - 'text/csv', - 'application/pdf', - 'application/vnd.ms-excel' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "text/xml", "text/csv", "application/pdf", "application/vnd.ms-excel"] ) - # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/reports/{id}', + method="GET", + resource_path="/api/v1/reports/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -373,40 +400,50 @@ def _get_company_report_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def request_custom_report( self, request_custom_report: RequestCustomReport, - format: Annotated[Optional[StrictStr], Field(description="The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404.")] = None, - only_current: Annotated[Optional[StrictBool], Field(description="Limits the report to only current employees. Set to false to include future-dated employees. Defaults to true.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept: Annotated[ + StrictStr | None, + Field( + description="The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + format: Annotated[ + StrictStr | None, + Field( + description="The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404." + ), + ] = None, + only_current: Annotated[ + StrictBool | None, + Field( + description="Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RequestCustomReportResponse: - """Request Custom Report + """(Deprecated) Request Custom Report - **Warning: This endpoint will soon be deprecated and replaced with Datasets - Get Data from Dataset.** Generates an ad-hoc employee report based on a caller-specified list of fields and optional filters. Returns report data in the requested format (JSON, XML, CSV, XLS, or PDF). The report includes all employees regardless of status (both Active and Inactive), unlike the BambooHR UI which filters to Active employees by default. The request body may be submitted as JSON or XML. To submit JSON, set `Content-Type: application/json` exactly — any variation such as `application/json; charset=UTF-8` is not recognised as JSON and the body will be parsed as XML instead, which typically results in `400 Malformed XML`. To submit XML, set `Content-Type` to any other value; the body must be a `` document as described in the XML request body schema. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) will return 404. Field IDs in the request that are unknown or that the caller does not have permission to view are silently omitted from the report — the endpoint still returns 200. The `filters` object supports `lastChanged` (ISO 8601 date-time to filter by last-modified date) and `employeeIds` (restrict results to specific employee IDs). The maximum number of fields per request is 400. + **Deprecated. Use Datasets > Get Data from Dataset instead.** Generates an ad-hoc employee report based on a caller-specified list of fields and optional filters. Returns report data in the requested format (JSON, XML, CSV, XLS, or PDF). The report includes all employees regardless of status (both Active and Inactive), unlike the BambooHR UI which filters to Active employees by default. The request body may be submitted as JSON or XML. To submit JSON, set `Content-Type: application/json` exactly — any variation such as `application/json; charset=UTF-8` is not recognised as JSON and the body will be parsed as XML instead, which typically results in `400 Malformed XML`. To submit XML, set `Content-Type` to any other value; the body must be a `` document as described in the XML request body schema. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) will return 404. Field IDs in the request that are unknown or that the caller does not have permission to view are silently omitted from the report — the endpoint still returns 200. The `filters` object supports `lastChanged` (ISO 8601 date-time to filter employees by last-modified date, with optional `includeNull` control) and `employeeIds` (restrict results to specific internal employee IDs). The maximum number of fields per request is 400. OAuth Scopes: report :param request_custom_report: (required) :type request_custom_report: RequestCustomReport + :param accept: The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. + :type accept: str :param format: The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. :type format: str - :param only_current: Limits the report to only current employees. Set to false to include future-dated employees. Defaults to true. + :param only_current: Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. :type only_current: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -428,62 +465,73 @@ def request_custom_report( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/reports/custom is deprecated.", DeprecationWarning) _param = self._request_custom_report_serialize( request_custom_report=request_custom_report, + accept=accept, format=format, only_current=only_current, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "RequestCustomReportResponse", - '400': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "RequestCustomReportResponse", + "400": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def request_custom_report_with_http_info( self, request_custom_report: RequestCustomReport, - format: Annotated[Optional[StrictStr], Field(description="The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404.")] = None, - only_current: Annotated[Optional[StrictBool], Field(description="Limits the report to only current employees. Set to false to include future-dated employees. Defaults to true.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept: Annotated[ + StrictStr | None, + Field( + description="The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + format: Annotated[ + StrictStr | None, + Field( + description="The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404." + ), + ] = None, + only_current: Annotated[ + StrictBool | None, + Field( + description="Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[RequestCustomReportResponse]: - """Request Custom Report + """(Deprecated) Request Custom Report - **Warning: This endpoint will soon be deprecated and replaced with Datasets - Get Data from Dataset.** Generates an ad-hoc employee report based on a caller-specified list of fields and optional filters. Returns report data in the requested format (JSON, XML, CSV, XLS, or PDF). The report includes all employees regardless of status (both Active and Inactive), unlike the BambooHR UI which filters to Active employees by default. The request body may be submitted as JSON or XML. To submit JSON, set `Content-Type: application/json` exactly — any variation such as `application/json; charset=UTF-8` is not recognised as JSON and the body will be parsed as XML instead, which typically results in `400 Malformed XML`. To submit XML, set `Content-Type` to any other value; the body must be a `` document as described in the XML request body schema. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) will return 404. Field IDs in the request that are unknown or that the caller does not have permission to view are silently omitted from the report — the endpoint still returns 200. The `filters` object supports `lastChanged` (ISO 8601 date-time to filter by last-modified date) and `employeeIds` (restrict results to specific employee IDs). The maximum number of fields per request is 400. + **Deprecated. Use Datasets > Get Data from Dataset instead.** Generates an ad-hoc employee report based on a caller-specified list of fields and optional filters. Returns report data in the requested format (JSON, XML, CSV, XLS, or PDF). The report includes all employees regardless of status (both Active and Inactive), unlike the BambooHR UI which filters to Active employees by default. The request body may be submitted as JSON or XML. To submit JSON, set `Content-Type: application/json` exactly — any variation such as `application/json; charset=UTF-8` is not recognised as JSON and the body will be parsed as XML instead, which typically results in `400 Malformed XML`. To submit XML, set `Content-Type` to any other value; the body must be a `` document as described in the XML request body schema. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) will return 404. Field IDs in the request that are unknown or that the caller does not have permission to view are silently omitted from the report — the endpoint still returns 200. The `filters` object supports `lastChanged` (ISO 8601 date-time to filter employees by last-modified date, with optional `includeNull` control) and `employeeIds` (restrict results to specific internal employee IDs). The maximum number of fields per request is 400. OAuth Scopes: report :param request_custom_report: (required) :type request_custom_report: RequestCustomReport + :param accept: The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. + :type accept: str :param format: The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. :type format: str - :param only_current: Limits the report to only current employees. Set to false to include future-dated employees. Defaults to true. + :param only_current: Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. :type only_current: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -505,62 +553,73 @@ def request_custom_report_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/reports/custom is deprecated.", DeprecationWarning) _param = self._request_custom_report_serialize( request_custom_report=request_custom_report, + accept=accept, format=format, only_current=only_current, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "RequestCustomReportResponse", - '400': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "RequestCustomReportResponse", + "400": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def request_custom_report_without_preload_content( self, request_custom_report: RequestCustomReport, - format: Annotated[Optional[StrictStr], Field(description="The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404.")] = None, - only_current: Annotated[Optional[StrictBool], Field(description="Limits the report to only current employees. Set to false to include future-dated employees. Defaults to true.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept: Annotated[ + StrictStr | None, + Field( + description="The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404." + ), + ] = None, + format: Annotated[ + StrictStr | None, + Field( + description="The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + only_current: Annotated[ + StrictBool | None, + Field( + description="Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Request Custom Report + """(Deprecated) Request Custom Report - **Warning: This endpoint will soon be deprecated and replaced with Datasets - Get Data from Dataset.** Generates an ad-hoc employee report based on a caller-specified list of fields and optional filters. Returns report data in the requested format (JSON, XML, CSV, XLS, or PDF). The report includes all employees regardless of status (both Active and Inactive), unlike the BambooHR UI which filters to Active employees by default. The request body may be submitted as JSON or XML. To submit JSON, set `Content-Type: application/json` exactly — any variation such as `application/json; charset=UTF-8` is not recognised as JSON and the body will be parsed as XML instead, which typically results in `400 Malformed XML`. To submit XML, set `Content-Type` to any other value; the body must be a `` document as described in the XML request body schema. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) will return 404. Field IDs in the request that are unknown or that the caller does not have permission to view are silently omitted from the report — the endpoint still returns 200. The `filters` object supports `lastChanged` (ISO 8601 date-time to filter by last-modified date) and `employeeIds` (restrict results to specific employee IDs). The maximum number of fields per request is 400. + **Deprecated. Use Datasets > Get Data from Dataset instead.** Generates an ad-hoc employee report based on a caller-specified list of fields and optional filters. Returns report data in the requested format (JSON, XML, CSV, XLS, or PDF). The report includes all employees regardless of status (both Active and Inactive), unlike the BambooHR UI which filters to Active employees by default. The request body may be submitted as JSON or XML. To submit JSON, set `Content-Type: application/json` exactly — any variation such as `application/json; charset=UTF-8` is not recognised as JSON and the body will be parsed as XML instead, which typically results in `400 Malformed XML`. To submit XML, set `Content-Type` to any other value; the body must be a `` document as described in the XML request body schema. The `format` query parameter is case-insensitive (`json`, `JSON`, `Json` are all accepted). If `format` is omitted, the output format is inferred from the `Accept` header, but only these exact values are supported: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other `Accept` value (including `application/xml` and `*/*`) will return 404. Field IDs in the request that are unknown or that the caller does not have permission to view are silently omitted from the report — the endpoint still returns 200. The `filters` object supports `lastChanged` (ISO 8601 date-time to filter employees by last-modified date, with optional `includeNull` control) and `employeeIds` (restrict results to specific internal employee IDs). The maximum number of fields per request is 400. OAuth Scopes: report :param request_custom_report: (required) :type request_custom_report: RequestCustomReport + :param accept: The desired response content type when `format` is omitted. Accepted values: `application/json`, `text/xml`, `text/csv`, `application/pdf`, `application/vnd.ms-excel`. Any other value returns 404. + :type accept: str :param format: The output format for the report. Case-insensitive. If omitted, format is inferred from the `Accept` header — only `application/json`, `text/xml`, `text/csv`, `application/pdf`, and `application/vnd.ms-excel` are accepted; any other value returns 404. :type format: str - :param only_current: Limits the report to only current employees. Set to false to include future-dated employees. Defaults to true. + :param only_current: Whether to restrict historical fields to current values only. Set to false to include future-dated history values in the report output. Defaults to true. :type only_current: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -582,33 +641,32 @@ def request_custom_report_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/reports/custom is deprecated.", DeprecationWarning) _param = self._request_custom_report_serialize( request_custom_report=request_custom_report, + accept=accept, format=format, only_current=only_current, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "RequestCustomReportResponse", - '400': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "RequestCustomReportResponse", + "400": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _request_custom_report_serialize( self, request_custom_report, + accept, format, only_current, _request_auth, @@ -619,71 +677,51 @@ def _request_custom_report_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters if format is not None: - - _query_params.append(('format', format)) - + _query_params.append(("format", format)) + if only_current is not None: - - _query_params.append(('onlyCurrent', only_current)) - + _query_params.append(("onlyCurrent", only_current)) + # process the header parameters + if accept is not None: + _header_params["Accept"] = accept # process the form parameters # process the body parameter if request_custom_report is not None: _body_params = request_custom_report - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/xml', - 'text/csv', - 'application/pdf', - 'application/vnd.ms-excel' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "text/xml", "text/csv", "application/pdf", "application/vnd.ms-excel"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json", "application/xml"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/reports/custom', + method="POST", + resource_path="/api/v1/reports/custom", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -693,7 +731,5 @@ def _request_custom_report_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/scheduling_api.py b/bamboohr_sdk/api/scheduling_api.py new file mode 100644 index 0000000..2e74af6 --- /dev/null +++ b/bamboohr_sdk/api/scheduling_api.py @@ -0,0 +1,3931 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from datetime import date, datetime +from typing import Annotated, Any +from uuid import UUID + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.scheduling_create_schedule_request_v1 import SchedulingCreateScheduleRequestV1 +from bamboohr_sdk.models.scheduling_create_scheduling_shift_request_v1 import SchedulingCreateSchedulingShiftRequestV1 +from bamboohr_sdk.models.scheduling_publish_shifts_request import SchedulingPublishShiftsRequest +from bamboohr_sdk.models.scheduling_publish_shifts_result_v1 import SchedulingPublishShiftsResultV1 +from bamboohr_sdk.models.scheduling_schedule_list_response_v1 import SchedulingScheduleListResponseV1 +from bamboohr_sdk.models.scheduling_schedule_v1 import SchedulingScheduleV1 +from bamboohr_sdk.models.scheduling_scheduling_shift_v1 import SchedulingSchedulingShiftV1 +from bamboohr_sdk.models.scheduling_shift_assessment_list_response_v1 import SchedulingShiftAssessmentListResponseV1 +from bamboohr_sdk.models.scheduling_shift_list_response_v1 import SchedulingShiftListResponseV1 +from bamboohr_sdk.models.scheduling_timezone_list_response_v1 import SchedulingTimezoneListResponseV1 +from bamboohr_sdk.models.scheduling_update_schedule_request_v1 import SchedulingUpdateScheduleRequestV1 +from bamboohr_sdk.models.scheduling_update_scheduling_shift_request_v1 import SchedulingUpdateSchedulingShiftRequestV1 +from bamboohr_sdk.rest import RESTResponseType + + +class SchedulingApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def scheduling_create_schedule( + self, + scheduling_create_schedule_request_v1: SchedulingCreateScheduleRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SchedulingScheduleV1: + """Create Schedule + + Creates a new schedule for the company. Rejects duplicate schedule data for the same location and configuration. OAuth Scopes: scheduling:schedules.write, time_tracking.write + + :param scheduling_create_schedule_request_v1: (required) + :type scheduling_create_schedule_request_v1: SchedulingCreateScheduleRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_create_schedule_serialize( + scheduling_create_schedule_request_v1=scheduling_create_schedule_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "SchedulingScheduleV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def scheduling_create_schedule_with_http_info( + self, + scheduling_create_schedule_request_v1: SchedulingCreateScheduleRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SchedulingScheduleV1]: + """Create Schedule + + Creates a new schedule for the company. Rejects duplicate schedule data for the same location and configuration. OAuth Scopes: scheduling:schedules.write, time_tracking.write + + :param scheduling_create_schedule_request_v1: (required) + :type scheduling_create_schedule_request_v1: SchedulingCreateScheduleRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_create_schedule_serialize( + scheduling_create_schedule_request_v1=scheduling_create_schedule_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "SchedulingScheduleV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_create_schedule_without_preload_content( + self, + scheduling_create_schedule_request_v1: SchedulingCreateScheduleRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Schedule + + Creates a new schedule for the company. Rejects duplicate schedule data for the same location and configuration. OAuth Scopes: scheduling:schedules.write, time_tracking.write + + :param scheduling_create_schedule_request_v1: (required) + :type scheduling_create_schedule_request_v1: SchedulingCreateScheduleRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_create_schedule_serialize( + scheduling_create_schedule_request_v1=scheduling_create_schedule_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "SchedulingScheduleV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_create_schedule_serialize( + self, + scheduling_create_schedule_request_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if scheduling_create_schedule_request_v1 is not None: + _body_params = scheduling_create_schedule_request_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/scheduling/schedules", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_create_shift( + self, + scheduling_create_scheduling_shift_request_v1: SchedulingCreateSchedulingShiftRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SchedulingSchedulingShiftV1: + """Create Shift + + Creates a new shift in the specified schedule. OAuth Scopes: scheduling:shifts.write, time_tracking.write + + :param scheduling_create_scheduling_shift_request_v1: (required) + :type scheduling_create_scheduling_shift_request_v1: SchedulingCreateSchedulingShiftRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_create_shift_serialize( + scheduling_create_scheduling_shift_request_v1=scheduling_create_scheduling_shift_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "SchedulingSchedulingShiftV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def scheduling_create_shift_with_http_info( + self, + scheduling_create_scheduling_shift_request_v1: SchedulingCreateSchedulingShiftRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SchedulingSchedulingShiftV1]: + """Create Shift + + Creates a new shift in the specified schedule. OAuth Scopes: scheduling:shifts.write, time_tracking.write + + :param scheduling_create_scheduling_shift_request_v1: (required) + :type scheduling_create_scheduling_shift_request_v1: SchedulingCreateSchedulingShiftRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_create_shift_serialize( + scheduling_create_scheduling_shift_request_v1=scheduling_create_scheduling_shift_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "SchedulingSchedulingShiftV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_create_shift_without_preload_content( + self, + scheduling_create_scheduling_shift_request_v1: SchedulingCreateSchedulingShiftRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Shift + + Creates a new shift in the specified schedule. OAuth Scopes: scheduling:shifts.write, time_tracking.write + + :param scheduling_create_scheduling_shift_request_v1: (required) + :type scheduling_create_scheduling_shift_request_v1: SchedulingCreateSchedulingShiftRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_create_shift_serialize( + scheduling_create_scheduling_shift_request_v1=scheduling_create_scheduling_shift_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "SchedulingSchedulingShiftV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_create_shift_serialize( + self, + scheduling_create_scheduling_shift_request_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if scheduling_create_scheduling_shift_request_v1 is not None: + _body_params = scheduling_create_scheduling_shift_request_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/scheduling/shifts", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_delete_schedule( + self, + id: Annotated[UUID, Field(description="The schedule UUID")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Schedule + + Deletes a schedule by its UUID. Unworked shifts will be deleted as a result. OAuth Scopes: scheduling:schedules.write, time_tracking.write + + :param id: The schedule UUID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_delete_schedule_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_delete_schedule_with_http_info( + self, + id: Annotated[UUID, Field(description="The schedule UUID")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Schedule + + Deletes a schedule by its UUID. Unworked shifts will be deleted as a result. OAuth Scopes: scheduling:schedules.write, time_tracking.write + + :param id: The schedule UUID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_delete_schedule_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_delete_schedule_without_preload_content( + self, + id: Annotated[UUID, Field(description="The schedule UUID")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Schedule + + Deletes a schedule by its UUID. Unworked shifts will be deleted as a result. OAuth Scopes: scheduling:schedules.write, time_tracking.write + + :param id: The schedule UUID (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_delete_schedule_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_delete_schedule_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/scheduling/schedules/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_delete_shift( + self, + id: Annotated[UUID, Field(description="The shift UUID, or the projected shift composite ID.")], + recurrence_edit_option: Annotated[ + StrictStr | None, + Field( + description="How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Shift + + Deletes a shift by its UUID or composite recurrence ID. Use `recurrenceEditOption` to control the scope to delete one or many consecutive recurring shifts OAuth Scopes: scheduling:shifts.write, time_tracking.write + + :param id: The shift UUID, or the projected shift composite ID. (required) + :type id: str + :param recurrence_edit_option: How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift. + :type recurrence_edit_option: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_delete_shift_serialize( + id=id, + recurrence_edit_option=recurrence_edit_option, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_delete_shift_with_http_info( + self, + id: Annotated[UUID, Field(description="The shift UUID, or the projected shift composite ID.")], + recurrence_edit_option: Annotated[ + StrictStr | None, + Field( + description="How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Shift + + Deletes a shift by its UUID or composite recurrence ID. Use `recurrenceEditOption` to control the scope to delete one or many consecutive recurring shifts OAuth Scopes: scheduling:shifts.write, time_tracking.write + + :param id: The shift UUID, or the projected shift composite ID. (required) + :type id: str + :param recurrence_edit_option: How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift. + :type recurrence_edit_option: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_delete_shift_serialize( + id=id, + recurrence_edit_option=recurrence_edit_option, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_delete_shift_without_preload_content( + self, + id: Annotated[UUID, Field(description="The shift UUID, or the projected shift composite ID.")], + recurrence_edit_option: Annotated[ + StrictStr | None, + Field( + description="How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Shift + + Deletes a shift by its UUID or composite recurrence ID. Use `recurrenceEditOption` to control the scope to delete one or many consecutive recurring shifts OAuth Scopes: scheduling:shifts.write, time_tracking.write + + :param id: The shift UUID, or the projected shift composite ID. (required) + :type id: str + :param recurrence_edit_option: How should the shift be deleted? Choose 'instance' for deleting a single target shift, 'future' for deleting the target shift and all following shifts that are in the same recurrence, 'all' for deleting all shifts starting from now that are in the same recurrence as the target shift. + :type recurrence_edit_option: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_delete_shift_serialize( + id=id, + recurrence_edit_option=recurrence_edit_option, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_delete_shift_serialize( + self, + id, + recurrence_edit_option, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + if recurrence_edit_option is not None: + _query_params.append(("recurrenceEditOption", recurrence_edit_option)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/scheduling/shifts/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_get_schedule( + self, + id: Annotated[UUID, Field(description="The ID of the schedule")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SchedulingScheduleV1: + """Get Schedule + + Retrieves a specific schedule by its UUID. Schedules organize shifts for employees. OAuth Scopes: scheduling:schedules, time_tracking + + :param id: The ID of the schedule (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_get_schedule_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingScheduleV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def scheduling_get_schedule_with_http_info( + self, + id: Annotated[UUID, Field(description="The ID of the schedule")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SchedulingScheduleV1]: + """Get Schedule + + Retrieves a specific schedule by its UUID. Schedules organize shifts for employees. OAuth Scopes: scheduling:schedules, time_tracking + + :param id: The ID of the schedule (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_get_schedule_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingScheduleV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_get_schedule_without_preload_content( + self, + id: Annotated[UUID, Field(description="The ID of the schedule")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Schedule + + Retrieves a specific schedule by its UUID. Schedules organize shifts for employees. OAuth Scopes: scheduling:schedules, time_tracking + + :param id: The ID of the schedule (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_get_schedule_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingScheduleV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_get_schedule_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/scheduling/schedules/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_get_schedule_pdf( + self, + id: Annotated[StrictStr | None, Field(description="The schedule ID")], + start_ymd: Annotated[date | None, Field(description="Start date in YYYY-MM-DD format")], + end_ymd: Annotated[date | None, Field(description="End date in YYYY-MM-DD format")], + group_by: Annotated[StrictStr | None, Field(description="Group employees by this field")] = None, + employee_ids: Annotated[ + list[StrictStr] | None, + Field(description='Filter by employee IDs. Pass the string "null" as an element to include open shifts.'), + ] = None, + include_employees_without_shifts: Annotated[ + StrictBool | None, Field(description="Whether to include employees who have no shifts in the date range") + ] = None, + include_holidays: Annotated[ + StrictBool | None, Field(description="Whether to include holidays in the PDF") + ] = None, + include_time_off: Annotated[ + StrictBool | None, Field(description="Whether to include time-off entries in the PDF") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Get Schedule PDF + + Generates and streams a PDF of the schedule view for the given schedule and date range. OAuth Scopes: scheduling:schedules + + :param id: The schedule ID (required) + :type id: str + :param start_ymd: Start date in YYYY-MM-DD format (required) + :type start_ymd: date + :param end_ymd: End date in YYYY-MM-DD format (required) + :type end_ymd: date + :param group_by: Group employees by this field + :type group_by: str + :param employee_ids: Filter by employee IDs. Pass the string \"null\" as an element to include open shifts. + :type employee_ids: List[str] + :param include_employees_without_shifts: Whether to include employees who have no shifts in the date range + :type include_employees_without_shifts: bool + :param include_holidays: Whether to include holidays in the PDF + :type include_holidays: bool + :param include_time_off: Whether to include time-off entries in the PDF + :type include_time_off: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_get_schedule_pdf_serialize( + id=id, + start_ymd=start_ymd, + end_ymd=end_ymd, + group_by=group_by, + employee_ids=employee_ids, + include_employees_without_shifts=include_employees_without_shifts, + include_holidays=include_holidays, + include_time_off=include_time_off, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, + "422": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_get_schedule_pdf_with_http_info( + self, + id: Annotated[StrictStr | None, Field(description="The schedule ID")], + start_ymd: Annotated[date | None, Field(description="Start date in YYYY-MM-DD format")], + end_ymd: Annotated[date | None, Field(description="End date in YYYY-MM-DD format")], + group_by: Annotated[StrictStr | None, Field(description="Group employees by this field")] = None, + employee_ids: Annotated[ + list[StrictStr] | None, + Field(description='Filter by employee IDs. Pass the string "null" as an element to include open shifts.'), + ] = None, + include_employees_without_shifts: Annotated[ + StrictBool | None, Field(description="Whether to include employees who have no shifts in the date range") + ] = None, + include_holidays: Annotated[ + StrictBool | None, Field(description="Whether to include holidays in the PDF") + ] = None, + include_time_off: Annotated[ + StrictBool | None, Field(description="Whether to include time-off entries in the PDF") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Get Schedule PDF + + Generates and streams a PDF of the schedule view for the given schedule and date range. OAuth Scopes: scheduling:schedules + + :param id: The schedule ID (required) + :type id: str + :param start_ymd: Start date in YYYY-MM-DD format (required) + :type start_ymd: date + :param end_ymd: End date in YYYY-MM-DD format (required) + :type end_ymd: date + :param group_by: Group employees by this field + :type group_by: str + :param employee_ids: Filter by employee IDs. Pass the string \"null\" as an element to include open shifts. + :type employee_ids: List[str] + :param include_employees_without_shifts: Whether to include employees who have no shifts in the date range + :type include_employees_without_shifts: bool + :param include_holidays: Whether to include holidays in the PDF + :type include_holidays: bool + :param include_time_off: Whether to include time-off entries in the PDF + :type include_time_off: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_get_schedule_pdf_serialize( + id=id, + start_ymd=start_ymd, + end_ymd=end_ymd, + group_by=group_by, + employee_ids=employee_ids, + include_employees_without_shifts=include_employees_without_shifts, + include_holidays=include_holidays, + include_time_off=include_time_off, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, + "422": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_get_schedule_pdf_without_preload_content( + self, + id: Annotated[StrictStr | None, Field(description="The schedule ID")], + start_ymd: Annotated[date | None, Field(description="Start date in YYYY-MM-DD format")], + end_ymd: Annotated[date | None, Field(description="End date in YYYY-MM-DD format")], + group_by: Annotated[StrictStr | None, Field(description="Group employees by this field")] = None, + employee_ids: Annotated[ + list[StrictStr] | None, + Field(description='Filter by employee IDs. Pass the string "null" as an element to include open shifts.'), + ] = None, + include_employees_without_shifts: Annotated[ + StrictBool | None, Field(description="Whether to include employees who have no shifts in the date range") + ] = None, + include_holidays: Annotated[ + StrictBool | None, Field(description="Whether to include holidays in the PDF") + ] = None, + include_time_off: Annotated[ + StrictBool | None, Field(description="Whether to include time-off entries in the PDF") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Schedule PDF + + Generates and streams a PDF of the schedule view for the given schedule and date range. OAuth Scopes: scheduling:schedules + + :param id: The schedule ID (required) + :type id: str + :param start_ymd: Start date in YYYY-MM-DD format (required) + :type start_ymd: date + :param end_ymd: End date in YYYY-MM-DD format (required) + :type end_ymd: date + :param group_by: Group employees by this field + :type group_by: str + :param employee_ids: Filter by employee IDs. Pass the string \"null\" as an element to include open shifts. + :type employee_ids: List[str] + :param include_employees_without_shifts: Whether to include employees who have no shifts in the date range + :type include_employees_without_shifts: bool + :param include_holidays: Whether to include holidays in the PDF + :type include_holidays: bool + :param include_time_off: Whether to include time-off entries in the PDF + :type include_time_off: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_get_schedule_pdf_serialize( + id=id, + start_ymd=start_ymd, + end_ymd=end_ymd, + group_by=group_by, + employee_ids=employee_ids, + include_employees_without_shifts=include_employees_without_shifts, + include_holidays=include_holidays, + include_time_off=include_time_off, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "403": None, + "404": None, + "422": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_get_schedule_pdf_serialize( + self, + id, + start_ymd, + end_ymd, + group_by, + employee_ids, + include_employees_without_shifts, + include_holidays, + include_time_off, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = { + "employeeIds[]": "multi", + } + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + if start_ymd is not None: + if isinstance(start_ymd, date): + _query_params.append(("startYmd", start_ymd.strftime(self.api_client.configuration.date_format))) + else: + _query_params.append(("startYmd", start_ymd)) + + if end_ymd is not None: + if isinstance(end_ymd, date): + _query_params.append(("endYmd", end_ymd.strftime(self.api_client.configuration.date_format))) + else: + _query_params.append(("endYmd", end_ymd)) + + if group_by is not None: + _query_params.append(("groupBy", group_by)) + + if employee_ids is not None: + _query_params.append(("employeeIds[]", employee_ids)) + + if include_employees_without_shifts is not None: + _query_params.append(("includeEmployeesWithoutShifts", include_employees_without_shifts)) + + if include_holidays is not None: + _query_params.append(("includeHolidays", include_holidays)) + + if include_time_off is not None: + _query_params.append(("includeTimeOff", include_time_off)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/pdf"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/scheduling/schedules/{id}/pdf", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_get_shift( + self, + id: Annotated[UUID, Field(description="The shift uuid")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SchedulingSchedulingShiftV1: + """Get Shift + + Retrieves a single shift by its UUID. Returns the full shift object including recurrence settings, assigned employee IDs, and status. Returns 404 if the shift does not exist or has been deleted. OAuth Scopes: scheduling:shifts, time_tracking + + :param id: The shift uuid (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_get_shift_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingSchedulingShiftV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def scheduling_get_shift_with_http_info( + self, + id: Annotated[UUID, Field(description="The shift uuid")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SchedulingSchedulingShiftV1]: + """Get Shift + + Retrieves a single shift by its UUID. Returns the full shift object including recurrence settings, assigned employee IDs, and status. Returns 404 if the shift does not exist or has been deleted. OAuth Scopes: scheduling:shifts, time_tracking + + :param id: The shift uuid (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_get_shift_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingSchedulingShiftV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_get_shift_without_preload_content( + self, + id: Annotated[UUID, Field(description="The shift uuid")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Shift + + Retrieves a single shift by its UUID. Returns the full shift object including recurrence settings, assigned employee IDs, and status. Returns 404 if the shift does not exist or has been deleted. OAuth Scopes: scheduling:shifts, time_tracking + + :param id: The shift uuid (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_get_shift_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingSchedulingShiftV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_get_shift_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/scheduling/shifts/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_list_schedules( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `lateClockInThreshold`, `earlyClockOutThreshold`, `lateClockOutThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, lateClockInThreshold, earlyClockOutThreshold, lateClockOutThreshold, createdAt, updatedAt, deletedAt" + ), + ] = None, + page: Annotated[StrictInt | None, Field(description="The starting page for pagination")] = None, + page_size: Annotated[StrictInt | None, Field(description="The number of items to be returned")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SchedulingScheduleListResponseV1: + """List Schedules + + Retrieves a paginated list of all schedules for the company. Supports optional OData-style filtering and sorting. OAuth Scopes: scheduling:schedules, time_tracking + + :param filter: OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `lateClockInThreshold`, `earlyClockOutThreshold`, `lateClockOutThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`. + :type filter: str + :param sort: Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, lateClockInThreshold, earlyClockOutThreshold, lateClockOutThreshold, createdAt, updatedAt, deletedAt + :type sort: str + :param page: The starting page for pagination + :type page: int + :param page_size: The number of items to be returned + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_list_schedules_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingScheduleListResponseV1", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def scheduling_list_schedules_with_http_info( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `lateClockInThreshold`, `earlyClockOutThreshold`, `lateClockOutThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, lateClockInThreshold, earlyClockOutThreshold, lateClockOutThreshold, createdAt, updatedAt, deletedAt" + ), + ] = None, + page: Annotated[StrictInt | None, Field(description="The starting page for pagination")] = None, + page_size: Annotated[StrictInt | None, Field(description="The number of items to be returned")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SchedulingScheduleListResponseV1]: + """List Schedules + + Retrieves a paginated list of all schedules for the company. Supports optional OData-style filtering and sorting. OAuth Scopes: scheduling:schedules, time_tracking + + :param filter: OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `lateClockInThreshold`, `earlyClockOutThreshold`, `lateClockOutThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`. + :type filter: str + :param sort: Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, lateClockInThreshold, earlyClockOutThreshold, lateClockOutThreshold, createdAt, updatedAt, deletedAt + :type sort: str + :param page: The starting page for pagination + :type page: int + :param page_size: The number of items to be returned + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_list_schedules_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingScheduleListResponseV1", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_list_schedules_without_preload_content( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `lateClockInThreshold`, `earlyClockOutThreshold`, `lateClockOutThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, lateClockInThreshold, earlyClockOutThreshold, lateClockOutThreshold, createdAt, updatedAt, deletedAt" + ), + ] = None, + page: Annotated[StrictInt | None, Field(description="The starting page for pagination")] = None, + page_size: Annotated[StrictInt | None, Field(description="The number of items to be returned")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Schedules + + Retrieves a paginated list of all schedules for the company. Supports optional OData-style filtering and sorting. OAuth Scopes: scheduling:schedules, time_tracking + + :param filter: OData filter expression applied to schedules. Supported operators: `eq` (equals, use `eq null` to match NULL), `ne` (not equals, use `ne null` to match NOT NULL), `lt` (less than), `le` (less than or equal), `gt` (greater than), `ge` (greater than or equal), `in` (value in list), `and` (combine clauses). Not supported: `or`, `not`, parenthesized grouping. Filterable fields: `id`, `name`, `locationId`, `timezone`, `startOfWeek`, `earlyClockInThreshold`, `lateClockInThreshold`, `earlyClockOutThreshold`, `lateClockOutThreshold`, `createdAt`, `updatedAt`, `deletedAt`. Examples: `name eq 'Default Schedule'`, `deletedAt eq null`, `name eq 'Default Schedule' and locationId in (1, 2)`. + :type filter: str + :param sort: Sorting options. Supported sorts are: name, locationId, timezone, startOfWeek, earlyClockInThreshold, lateClockInThreshold, earlyClockOutThreshold, lateClockOutThreshold, createdAt, updatedAt, deletedAt + :type sort: str + :param page: The starting page for pagination + :type page: int + :param page_size: The number of items to be returned + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_list_schedules_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingScheduleListResponseV1", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_list_schedules_serialize( + self, + filter, + sort, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if filter is not None: + _query_params.append(("filter", filter)) + + if sort is not None: + _query_params.append(("sort", sort)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/scheduling/schedules", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_list_shift_assessments( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Must include at least one of: employeeId eq {int}, shiftId eq {uuid}, or a date filter (eq/ge/gt/le/lt on date). Allowed fields: employeeId, shiftId, date." + ), + ] = None, + sort: Annotated[StrictStr | None, Field(description="Sort expression (e.g. date desc).")] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The starting page for pagination.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of items to be returned. Maximum 1000."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SchedulingShiftAssessmentListResponseV1: + """List Shift Assessments + + Lists shift assessments matching the given filters. A filter is required and must include at least one of: employeeId, shiftId, or a date filter (eq/gt/ge/lt/le on date). Results are scoped to the assessments the authenticated user may view. OAuth Scopes: scheduling:shifts + + :param filter: OData v4 filter expression. Must include at least one of: employeeId eq {int}, shiftId eq {uuid}, or a date filter (eq/ge/gt/le/lt on date). Allowed fields: employeeId, shiftId, date. + :type filter: str + :param sort: Sort expression (e.g. date desc). + :type sort: str + :param page: The starting page for pagination. + :type page: int + :param page_size: The number of items to be returned. Maximum 1000. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_list_shift_assessments_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingShiftAssessmentListResponseV1", + "400": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def scheduling_list_shift_assessments_with_http_info( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Must include at least one of: employeeId eq {int}, shiftId eq {uuid}, or a date filter (eq/ge/gt/le/lt on date). Allowed fields: employeeId, shiftId, date." + ), + ] = None, + sort: Annotated[StrictStr | None, Field(description="Sort expression (e.g. date desc).")] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The starting page for pagination.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of items to be returned. Maximum 1000."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SchedulingShiftAssessmentListResponseV1]: + """List Shift Assessments + + Lists shift assessments matching the given filters. A filter is required and must include at least one of: employeeId, shiftId, or a date filter (eq/gt/ge/lt/le on date). Results are scoped to the assessments the authenticated user may view. OAuth Scopes: scheduling:shifts + + :param filter: OData v4 filter expression. Must include at least one of: employeeId eq {int}, shiftId eq {uuid}, or a date filter (eq/ge/gt/le/lt on date). Allowed fields: employeeId, shiftId, date. + :type filter: str + :param sort: Sort expression (e.g. date desc). + :type sort: str + :param page: The starting page for pagination. + :type page: int + :param page_size: The number of items to be returned. Maximum 1000. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_list_shift_assessments_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingShiftAssessmentListResponseV1", + "400": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_list_shift_assessments_without_preload_content( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Must include at least one of: employeeId eq {int}, shiftId eq {uuid}, or a date filter (eq/ge/gt/le/lt on date). Allowed fields: employeeId, shiftId, date." + ), + ] = None, + sort: Annotated[StrictStr | None, Field(description="Sort expression (e.g. date desc).")] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The starting page for pagination.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of items to be returned. Maximum 1000."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Shift Assessments + + Lists shift assessments matching the given filters. A filter is required and must include at least one of: employeeId, shiftId, or a date filter (eq/gt/ge/lt/le on date). Results are scoped to the assessments the authenticated user may view. OAuth Scopes: scheduling:shifts + + :param filter: OData v4 filter expression. Must include at least one of: employeeId eq {int}, shiftId eq {uuid}, or a date filter (eq/ge/gt/le/lt on date). Allowed fields: employeeId, shiftId, date. + :type filter: str + :param sort: Sort expression (e.g. date desc). + :type sort: str + :param page: The starting page for pagination. + :type page: int + :param page_size: The number of items to be returned. Maximum 1000. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_list_shift_assessments_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingShiftAssessmentListResponseV1", + "400": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_list_shift_assessments_serialize( + self, + filter, + sort, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if filter is not None: + _query_params.append(("filter", filter)) + + if sort is not None: + _query_params.append(("sort", sort)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/scheduling/shift-assessments", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_list_shifts( + self, + ids: Annotated[ + list[UUID] | None, + Field( + description="Filter by shift IDs, as either a comma-separated string (e.g. id1,id2) or an array. If provided, other filters are ignored." + ), + ] = None, + start: Annotated[ + datetime | None, + Field( + description="Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided." + ), + ] = None, + end: Annotated[ + datetime | None, + Field( + description="End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided." + ), + ] = None, + employee_ids: Annotated[ + list[StrictStr] | None, + Field( + description='Filter by employee IDs, as either a comma-separated string (e.g. 10,20) or an array. Use the string "null" as a value to include unassigned shifts (e.g. employeeIds=10,null).' + ), + ] = None, + schedule_ids: Annotated[ + list[UUID] | None, + Field(description="Filter by schedule IDs, as either a comma-separated string (e.g. id1,id2) or an array."), + ] = None, + statuses: Annotated[ + list[StrictStr] | None, + Field( + description="Filter by shift statuses, as either a comma-separated string (e.g. planned,published) or an array." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The starting page for pagination.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of items to be returned."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SchedulingShiftListResponseV1: + """List Shifts + + Lists shifts matching the given filters. Either provide `ids` (ignores all other filters) or provide `start`, `end`, and at least one of `employeeIds` or `scheduleIds`. The time window must be no longer than 1 month. Defaults to returning planned and published shifts. OAuth Scopes: scheduling:shifts, time_tracking + + :param ids: Filter by shift IDs, as either a comma-separated string (e.g. id1,id2) or an array. If provided, other filters are ignored. + :type ids: List[str] + :param start: Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. + :type start: datetime + :param end: End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. + :type end: datetime + :param employee_ids: Filter by employee IDs, as either a comma-separated string (e.g. 10,20) or an array. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds=10,null). + :type employee_ids: List[str] + :param schedule_ids: Filter by schedule IDs, as either a comma-separated string (e.g. id1,id2) or an array. + :type schedule_ids: List[str] + :param statuses: Filter by shift statuses, as either a comma-separated string (e.g. planned,published) or an array. + :type statuses: List[str] + :param page: The starting page for pagination. + :type page: int + :param page_size: The number of items to be returned. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_list_shifts_serialize( + ids=ids, + start=start, + end=end, + employee_ids=employee_ids, + schedule_ids=schedule_ids, + statuses=statuses, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingShiftListResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def scheduling_list_shifts_with_http_info( + self, + ids: Annotated[ + list[UUID] | None, + Field( + description="Filter by shift IDs, as either a comma-separated string (e.g. id1,id2) or an array. If provided, other filters are ignored." + ), + ] = None, + start: Annotated[ + datetime | None, + Field( + description="Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided." + ), + ] = None, + end: Annotated[ + datetime | None, + Field( + description="End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided." + ), + ] = None, + employee_ids: Annotated[ + list[StrictStr] | None, + Field( + description='Filter by employee IDs, as either a comma-separated string (e.g. 10,20) or an array. Use the string "null" as a value to include unassigned shifts (e.g. employeeIds=10,null).' + ), + ] = None, + schedule_ids: Annotated[ + list[UUID] | None, + Field(description="Filter by schedule IDs, as either a comma-separated string (e.g. id1,id2) or an array."), + ] = None, + statuses: Annotated[ + list[StrictStr] | None, + Field( + description="Filter by shift statuses, as either a comma-separated string (e.g. planned,published) or an array." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The starting page for pagination.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of items to be returned."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SchedulingShiftListResponseV1]: + """List Shifts + + Lists shifts matching the given filters. Either provide `ids` (ignores all other filters) or provide `start`, `end`, and at least one of `employeeIds` or `scheduleIds`. The time window must be no longer than 1 month. Defaults to returning planned and published shifts. OAuth Scopes: scheduling:shifts, time_tracking + + :param ids: Filter by shift IDs, as either a comma-separated string (e.g. id1,id2) or an array. If provided, other filters are ignored. + :type ids: List[str] + :param start: Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. + :type start: datetime + :param end: End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. + :type end: datetime + :param employee_ids: Filter by employee IDs, as either a comma-separated string (e.g. 10,20) or an array. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds=10,null). + :type employee_ids: List[str] + :param schedule_ids: Filter by schedule IDs, as either a comma-separated string (e.g. id1,id2) or an array. + :type schedule_ids: List[str] + :param statuses: Filter by shift statuses, as either a comma-separated string (e.g. planned,published) or an array. + :type statuses: List[str] + :param page: The starting page for pagination. + :type page: int + :param page_size: The number of items to be returned. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_list_shifts_serialize( + ids=ids, + start=start, + end=end, + employee_ids=employee_ids, + schedule_ids=schedule_ids, + statuses=statuses, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingShiftListResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_list_shifts_without_preload_content( + self, + ids: Annotated[ + list[UUID] | None, + Field( + description="Filter by shift IDs, as either a comma-separated string (e.g. id1,id2) or an array. If provided, other filters are ignored." + ), + ] = None, + start: Annotated[ + datetime | None, + Field( + description="Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided." + ), + ] = None, + end: Annotated[ + datetime | None, + Field( + description="End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided." + ), + ] = None, + employee_ids: Annotated[ + list[StrictStr] | None, + Field( + description='Filter by employee IDs, as either a comma-separated string (e.g. 10,20) or an array. Use the string "null" as a value to include unassigned shifts (e.g. employeeIds=10,null).' + ), + ] = None, + schedule_ids: Annotated[ + list[UUID] | None, + Field(description="Filter by schedule IDs, as either a comma-separated string (e.g. id1,id2) or an array."), + ] = None, + statuses: Annotated[ + list[StrictStr] | None, + Field( + description="Filter by shift statuses, as either a comma-separated string (e.g. planned,published) or an array." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The starting page for pagination.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=1000, strict=True, ge=1)] | None, + Field(description="The number of items to be returned."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Shifts + + Lists shifts matching the given filters. Either provide `ids` (ignores all other filters) or provide `start`, `end`, and at least one of `employeeIds` or `scheduleIds`. The time window must be no longer than 1 month. Defaults to returning planned and published shifts. OAuth Scopes: scheduling:shifts, time_tracking + + :param ids: Filter by shift IDs, as either a comma-separated string (e.g. id1,id2) or an array. If provided, other filters are ignored. + :type ids: List[str] + :param start: Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. + :type start: datetime + :param end: End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided. + :type end: datetime + :param employee_ids: Filter by employee IDs, as either a comma-separated string (e.g. 10,20) or an array. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds=10,null). + :type employee_ids: List[str] + :param schedule_ids: Filter by schedule IDs, as either a comma-separated string (e.g. id1,id2) or an array. + :type schedule_ids: List[str] + :param statuses: Filter by shift statuses, as either a comma-separated string (e.g. planned,published) or an array. + :type statuses: List[str] + :param page: The starting page for pagination. + :type page: int + :param page_size: The number of items to be returned. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_list_shifts_serialize( + ids=ids, + start=start, + end=end, + employee_ids=employee_ids, + schedule_ids=schedule_ids, + statuses=statuses, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingShiftListResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_list_shifts_serialize( + self, + ids, + start, + end, + employee_ids, + schedule_ids, + statuses, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = { + "ids": "csv", + "employeeIds": "csv", + "scheduleIds": "csv", + "statuses": "csv", + } + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if ids is not None: + _query_params.append(("ids", ids)) + + if start is not None: + if isinstance(start, datetime): + _query_params.append(("start", start.strftime(self.api_client.configuration.datetime_format))) + else: + _query_params.append(("start", start)) + + if end is not None: + if isinstance(end, datetime): + _query_params.append(("end", end.strftime(self.api_client.configuration.datetime_format))) + else: + _query_params.append(("end", end)) + + if employee_ids is not None: + _query_params.append(("employeeIds", employee_ids)) + + if schedule_ids is not None: + _query_params.append(("scheduleIds", schedule_ids)) + + if statuses is not None: + _query_params.append(("statuses", statuses)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/scheduling/shifts", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_list_timezones( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc`" + ), + ] = None, + page: Annotated[StrictInt | None, Field(description="The starting page for pagination. Defaults to 1.")] = None, + page_size: Annotated[ + StrictInt | None, Field(description="The number of items to be returned. Defaults to 100.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SchedulingTimezoneListResponseV1: + """List Timezones + + Returns a paginated list of timezones available for use when creating or editing schedules. Supports OData-style filtering on the `name` field. OAuth Scopes: scheduling:schedules, time_tracking + + :param filter: OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`. + :type filter: str + :param sort: Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc` + :type sort: str + :param page: The starting page for pagination. Defaults to 1. + :type page: int + :param page_size: The number of items to be returned. Defaults to 100. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_list_timezones_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingTimezoneListResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def scheduling_list_timezones_with_http_info( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc`" + ), + ] = None, + page: Annotated[StrictInt | None, Field(description="The starting page for pagination. Defaults to 1.")] = None, + page_size: Annotated[ + StrictInt | None, Field(description="The number of items to be returned. Defaults to 100.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SchedulingTimezoneListResponseV1]: + """List Timezones + + Returns a paginated list of timezones available for use when creating or editing schedules. Supports OData-style filtering on the `name` field. OAuth Scopes: scheduling:schedules, time_tracking + + :param filter: OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`. + :type filter: str + :param sort: Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc` + :type sort: str + :param page: The starting page for pagination. Defaults to 1. + :type page: int + :param page_size: The number of items to be returned. Defaults to 100. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_list_timezones_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingTimezoneListResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_list_timezones_without_preload_content( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc`" + ), + ] = None, + page: Annotated[StrictInt | None, Field(description="The starting page for pagination. Defaults to 1.")] = None, + page_size: Annotated[ + StrictInt | None, Field(description="The number of items to be returned. Defaults to 100.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Timezones + + Returns a paginated list of timezones available for use when creating or editing schedules. Supports OData-style filtering on the `name` field. OAuth Scopes: scheduling:schedules, time_tracking + + :param filter: OData filter expression applied to the `name` field. Supported operators: `eq` (exact match), `ne` (exclude), `and` (combine clauses). Supported string functions: `contains`, `startswith`, `endswith` (all case-insensitive). Not supported: `or`, `not`, parenthesized grouping. Examples: `name eq 'America/Denver'`, `name ne 'UTC'`, `contains(name, 'America')`, `startswith(name, 'US/')`, `endswith(name, 'York')`. + :type filter: str + :param sort: Sorting options. Supported sort fields: `name` (alphabetical), `offset` (numeric UTC offset). Example: `name asc` or `offset desc` + :type sort: str + :param page: The starting page for pagination. Defaults to 1. + :type page: int + :param page_size: The number of items to be returned. Defaults to 100. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_list_timezones_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingTimezoneListResponseV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_list_timezones_serialize( + self, + filter, + sort, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if filter is not None: + _query_params.append(("filter", filter)) + + if sort is not None: + _query_params.append(("sort", sort)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/scheduling/timezones", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_publish_shifts( + self, + scheduling_publish_shifts_request: SchedulingPublishShiftsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SchedulingPublishShiftsResultV1: + """Publish Shifts + + Publishes one or more planned shifts, making them visible to employees. Shifts with scheduling conflicts are skipped and reported as failures. Returns 200 if all shifts succeed, 207 if some shifts failed due to conflicts, or 409 if all shifts failed due to conflicts. OAuth Scopes: scheduling:shifts.write, time_tracking.write + + :param scheduling_publish_shifts_request: (required) + :type scheduling_publish_shifts_request: SchedulingPublishShiftsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_publish_shifts_serialize( + scheduling_publish_shifts_request=scheduling_publish_shifts_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingPublishShiftsResultV1", + "207": "SchedulingPublishShiftsResultV1", + "409": "SchedulingPublishShiftsResultV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def scheduling_publish_shifts_with_http_info( + self, + scheduling_publish_shifts_request: SchedulingPublishShiftsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SchedulingPublishShiftsResultV1]: + """Publish Shifts + + Publishes one or more planned shifts, making them visible to employees. Shifts with scheduling conflicts are skipped and reported as failures. Returns 200 if all shifts succeed, 207 if some shifts failed due to conflicts, or 409 if all shifts failed due to conflicts. OAuth Scopes: scheduling:shifts.write, time_tracking.write + + :param scheduling_publish_shifts_request: (required) + :type scheduling_publish_shifts_request: SchedulingPublishShiftsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_publish_shifts_serialize( + scheduling_publish_shifts_request=scheduling_publish_shifts_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingPublishShiftsResultV1", + "207": "SchedulingPublishShiftsResultV1", + "409": "SchedulingPublishShiftsResultV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_publish_shifts_without_preload_content( + self, + scheduling_publish_shifts_request: SchedulingPublishShiftsRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Publish Shifts + + Publishes one or more planned shifts, making them visible to employees. Shifts with scheduling conflicts are skipped and reported as failures. Returns 200 if all shifts succeed, 207 if some shifts failed due to conflicts, or 409 if all shifts failed due to conflicts. OAuth Scopes: scheduling:shifts.write, time_tracking.write + + :param scheduling_publish_shifts_request: (required) + :type scheduling_publish_shifts_request: SchedulingPublishShiftsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_publish_shifts_serialize( + scheduling_publish_shifts_request=scheduling_publish_shifts_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingPublishShiftsResultV1", + "207": "SchedulingPublishShiftsResultV1", + "409": "SchedulingPublishShiftsResultV1", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_publish_shifts_serialize( + self, + scheduling_publish_shifts_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if scheduling_publish_shifts_request is not None: + _body_params = scheduling_publish_shifts_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/scheduling/shifts/publish", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_update_schedule( + self, + id: Annotated[UUID, Field(description="The schedule UUID")], + scheduling_update_schedule_request_v1: SchedulingUpdateScheduleRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SchedulingScheduleV1: + """Update Schedule + + Partially updates an existing schedule by its UUID. Fields not provided retain their existing values. OAuth Scopes: scheduling:schedules.write, time_tracking.write + + :param id: The schedule UUID (required) + :type id: str + :param scheduling_update_schedule_request_v1: (required) + :type scheduling_update_schedule_request_v1: SchedulingUpdateScheduleRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_update_schedule_serialize( + id=id, + scheduling_update_schedule_request_v1=scheduling_update_schedule_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingScheduleV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def scheduling_update_schedule_with_http_info( + self, + id: Annotated[UUID, Field(description="The schedule UUID")], + scheduling_update_schedule_request_v1: SchedulingUpdateScheduleRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SchedulingScheduleV1]: + """Update Schedule + + Partially updates an existing schedule by its UUID. Fields not provided retain their existing values. OAuth Scopes: scheduling:schedules.write, time_tracking.write + + :param id: The schedule UUID (required) + :type id: str + :param scheduling_update_schedule_request_v1: (required) + :type scheduling_update_schedule_request_v1: SchedulingUpdateScheduleRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_update_schedule_serialize( + id=id, + scheduling_update_schedule_request_v1=scheduling_update_schedule_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingScheduleV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_update_schedule_without_preload_content( + self, + id: Annotated[UUID, Field(description="The schedule UUID")], + scheduling_update_schedule_request_v1: SchedulingUpdateScheduleRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Schedule + + Partially updates an existing schedule by its UUID. Fields not provided retain their existing values. OAuth Scopes: scheduling:schedules.write, time_tracking.write + + :param id: The schedule UUID (required) + :type id: str + :param scheduling_update_schedule_request_v1: (required) + :type scheduling_update_schedule_request_v1: SchedulingUpdateScheduleRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_update_schedule_serialize( + id=id, + scheduling_update_schedule_request_v1=scheduling_update_schedule_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingScheduleV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_update_schedule_serialize( + self, + id, + scheduling_update_schedule_request_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if scheduling_update_schedule_request_v1 is not None: + _body_params = scheduling_update_schedule_request_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="PATCH", + resource_path="/api/v1/scheduling/schedules/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def scheduling_update_shift( + self, + id: Annotated[UUID, Field(description="The shift uuid")], + scheduling_update_scheduling_shift_request_v1: SchedulingUpdateSchedulingShiftRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SchedulingSchedulingShiftV1: + """Update Shift + + Updates a shift by its UUID. Fields not provided will retain their existing values. For published shifts, changes are not applied directly — they are stored as pending (`unpublishedChanges`) and take effect when the shift is published. `recurrenceEditOption` is required when the shift already has recurrence settings; ALL and FUTURE edits propagate to published sibling occurrences the same way, staging changes rather than applying them immediately. Sibling shifts may be permanently removed if they no longer conform to changed recurrence fields. OAuth Scopes: scheduling:shifts.write, time_tracking.write + + :param id: The shift uuid (required) + :type id: str + :param scheduling_update_scheduling_shift_request_v1: (required) + :type scheduling_update_scheduling_shift_request_v1: SchedulingUpdateSchedulingShiftRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_update_shift_serialize( + id=id, + scheduling_update_scheduling_shift_request_v1=scheduling_update_scheduling_shift_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingSchedulingShiftV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def scheduling_update_shift_with_http_info( + self, + id: Annotated[UUID, Field(description="The shift uuid")], + scheduling_update_scheduling_shift_request_v1: SchedulingUpdateSchedulingShiftRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SchedulingSchedulingShiftV1]: + """Update Shift + + Updates a shift by its UUID. Fields not provided will retain their existing values. For published shifts, changes are not applied directly — they are stored as pending (`unpublishedChanges`) and take effect when the shift is published. `recurrenceEditOption` is required when the shift already has recurrence settings; ALL and FUTURE edits propagate to published sibling occurrences the same way, staging changes rather than applying them immediately. Sibling shifts may be permanently removed if they no longer conform to changed recurrence fields. OAuth Scopes: scheduling:shifts.write, time_tracking.write + + :param id: The shift uuid (required) + :type id: str + :param scheduling_update_scheduling_shift_request_v1: (required) + :type scheduling_update_scheduling_shift_request_v1: SchedulingUpdateSchedulingShiftRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_update_shift_serialize( + id=id, + scheduling_update_scheduling_shift_request_v1=scheduling_update_scheduling_shift_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingSchedulingShiftV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def scheduling_update_shift_without_preload_content( + self, + id: Annotated[UUID, Field(description="The shift uuid")], + scheduling_update_scheduling_shift_request_v1: SchedulingUpdateSchedulingShiftRequestV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Shift + + Updates a shift by its UUID. Fields not provided will retain their existing values. For published shifts, changes are not applied directly — they are stored as pending (`unpublishedChanges`) and take effect when the shift is published. `recurrenceEditOption` is required when the shift already has recurrence settings; ALL and FUTURE edits propagate to published sibling occurrences the same way, staging changes rather than applying them immediately. Sibling shifts may be permanently removed if they no longer conform to changed recurrence fields. OAuth Scopes: scheduling:shifts.write, time_tracking.write + + :param id: The shift uuid (required) + :type id: str + :param scheduling_update_scheduling_shift_request_v1: (required) + :type scheduling_update_scheduling_shift_request_v1: SchedulingUpdateSchedulingShiftRequestV1 + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._scheduling_update_shift_serialize( + id=id, + scheduling_update_scheduling_shift_request_v1=scheduling_update_scheduling_shift_request_v1, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "SchedulingSchedulingShiftV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _scheduling_update_shift_serialize( + self, + id, + scheduling_update_scheduling_shift_request_v1, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if scheduling_update_scheduling_shift_request_v1 is not None: + _body_params = scheduling_update_scheduling_shift_request_v1 + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="PATCH", + resource_path="/api/v1/scheduling/shifts/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/time_off_api.py b/bamboohr_sdk/api/time_off_api.py index 3f13e1a..32f0639 100644 --- a/bamboohr_sdk/api/time_off_api.py +++ b/bamboohr_sdk/api/time_off_api.py @@ -1,29 +1,27 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - from datetime import date -from pydantic import Field, StrictInt, StrictStr, field_validator -from typing import List, Optional -from typing_extensions import Annotated +from typing import Annotated, Any + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.models.adjust_time_off_balance import AdjustTimeOffBalance -from bamboohr_sdk.models.assign_time_off_policies_request_inner import AssignTimeOffPoliciesRequestInner +from bamboohr_sdk.models.assign_time_off_policies_v1_request_inner import AssignTimeOffPoliciesV1RequestInner from bamboohr_sdk.models.assigned_time_off_policy import AssignedTimeOffPolicy from bamboohr_sdk.models.assigned_time_off_policy_v11 import AssignedTimeOffPolicyV11 +from bamboohr_sdk.models.created_time_off_request import CreatedTimeOffRequest from bamboohr_sdk.models.employee_time_off_policy_assignment import EmployeeTimeOffPolicyAssignment from bamboohr_sdk.models.employee_time_off_policy_assignment_v11 import EmployeeTimeOffPolicyAssignmentV11 from bamboohr_sdk.models.request import Request @@ -34,9 +32,7 @@ from bamboohr_sdk.models.time_off_request1 import TimeOffRequest1 from bamboohr_sdk.models.time_off_types_and_default_hours import TimeOffTypesAndDefaultHours from bamboohr_sdk.models.whos_out_entry import WhosOutEntry - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.whos_out_list_response_v1 import WhosOutListResponseV1 from bamboohr_sdk.rest import RESTResponseType @@ -52,30 +48,24 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def adjust_time_off_balance( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee.")], + employee_id: Annotated[StrictInt, Field(description="The internal employee ID.")], adjust_time_off_balance: AdjustTimeOffBalance, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Adjust Time Off Balance - Creates a balance adjustment for an employee's time off type. The adjustment is recorded as an override history item. Cannot adjust balances for discretionary (unlimited) time off types. + Creates a balance adjustment for an employee's time off type. The adjustment is recorded as an override history item. Cannot adjust balances for discretionary (unlimited) time off types. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee. (required) + :param employee_id: The internal employee ID. (required) :type employee_id: int :param adjust_time_off_balance: (required) :type adjust_time_off_balance: AdjustTimeOffBalance @@ -99,7 +89,7 @@ def adjust_time_off_balance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._adjust_time_off_balance_serialize( employee_id=employee_id, @@ -107,21 +97,18 @@ def adjust_time_off_balance( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '403': None, - '404': None, - '503': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "401": None, + "403": None, + "404": None, + "503": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -129,30 +116,24 @@ def adjust_time_off_balance( response_types_map=_response_types_map, ) - @validate_call def adjust_time_off_balance_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee.")], + employee_id: Annotated[StrictInt, Field(description="The internal employee ID.")], adjust_time_off_balance: AdjustTimeOffBalance, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Adjust Time Off Balance - Creates a balance adjustment for an employee's time off type. The adjustment is recorded as an override history item. Cannot adjust balances for discretionary (unlimited) time off types. + Creates a balance adjustment for an employee's time off type. The adjustment is recorded as an override history item. Cannot adjust balances for discretionary (unlimited) time off types. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee. (required) + :param employee_id: The internal employee ID. (required) :type employee_id: int :param adjust_time_off_balance: (required) :type adjust_time_off_balance: AdjustTimeOffBalance @@ -176,7 +157,7 @@ def adjust_time_off_balance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._adjust_time_off_balance_serialize( employee_id=employee_id, @@ -184,51 +165,42 @@ def adjust_time_off_balance_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '403': None, - '404': None, - '503': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "401": None, + "403": None, + "404": None, + "503": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def adjust_time_off_balance_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee.")], + employee_id: Annotated[StrictInt, Field(description="The internal employee ID.")], adjust_time_off_balance: AdjustTimeOffBalance, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Adjust Time Off Balance - Creates a balance adjustment for an employee's time off type. The adjustment is recorded as an override history item. Cannot adjust balances for discretionary (unlimited) time off types. + Creates a balance adjustment for an employee's time off type. The adjustment is recorded as an override history item. Cannot adjust balances for discretionary (unlimited) time off types. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee. (required) + :param employee_id: The internal employee ID. (required) :type employee_id: int :param adjust_time_off_balance: (required) :type adjust_time_off_balance: AdjustTimeOffBalance @@ -252,7 +224,7 @@ def adjust_time_off_balance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._adjust_time_off_balance_serialize( employee_id=employee_id, @@ -260,24 +232,20 @@ def adjust_time_off_balance_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '403': None, - '404': None, - '503': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "401": None, + "403": None, + "404": None, + "503": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _adjust_time_off_balance_serialize( self, employee_id, @@ -290,21 +258,18 @@ def _adjust_time_off_balance_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters @@ -312,39 +277,24 @@ def _adjust_time_off_balance_serialize( if adjust_time_off_balance is not None: _body_params = adjust_time_off_balance - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json", "application/xml"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/employees/{employeeId}/time_off/balance_adjustment', + method="PUT", + resource_path="/api/v1/employees/{employeeId}/time_off/balance_adjustment", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -354,38 +304,33 @@ def _adjust_time_off_balance_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def assign_time_off_policies( + def assign_time_off_policies_v1( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to assign policies to.")], - assign_time_off_policies_request_inner: List[AssignTimeOffPoliciesRequestInner], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee whose time off policies are being assigned."), + ], + assign_time_off_policies_v1_request_inner: list[AssignTimeOffPoliciesV1RequestInner], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[AssignedTimeOffPolicy]: - """Assign Time Off Policies + ) -> list[AssignedTimeOffPolicy]: + """(Deprecated) Assign Time Off Policies (v1) - Assigns time off policies to an employee with accruals starting on the specified date. A null start date removes the existing assignment. On success, returns the current list of assigned policies. + Deprecated. Use **Assign Time Off Policies (v1.1)** instead (`assign-time-off-policies-v1_1`). Assigns time off policies to an employee with accruals starting on the specified date. A null start date removes the existing assignment. On success, returns the current list of assigned policies. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee to assign policies to. (required) + :param employee_id: The internal employee ID of the employee whose time off policies are being assigned. (required) :type employee_id: int - :param assign_time_off_policies_request_inner: (required) - :type assign_time_off_policies_request_inner: List[AssignTimeOffPoliciesRequestInner] + :param assign_time_off_policies_v1_request_inner: (required) + :type assign_time_off_policies_v1_request_inner: List[AssignTimeOffPoliciesV1RequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -406,61 +351,56 @@ def assign_time_off_policies( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("PUT /api/v1/employees/{employeeId}/time_off/policies is deprecated.", DeprecationWarning) - _param = self._assign_time_off_policies_serialize( + _param = self._assign_time_off_policies_v1_serialize( employee_id=employee_id, - assign_time_off_policies_request_inner=assign_time_off_policies_request_inner, + assign_time_off_policies_v1_request_inner=assign_time_off_policies_v1_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignedTimeOffPolicy]", - '400': None, - '401': None, - '403': None, - '422': None, + _response_types_map: dict[str, str | None] = { + "200": "List[AssignedTimeOffPolicy]", + "400": None, + "401": None, + "403": None, + "422": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def assign_time_off_policies_with_http_info( + def assign_time_off_policies_v1_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to assign policies to.")], - assign_time_off_policies_request_inner: List[AssignTimeOffPoliciesRequestInner], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee whose time off policies are being assigned."), + ], + assign_time_off_policies_v1_request_inner: list[AssignTimeOffPoliciesV1RequestInner], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[AssignedTimeOffPolicy]]: - """Assign Time Off Policies + ) -> ApiResponse[list[AssignedTimeOffPolicy]]: + """(Deprecated) Assign Time Off Policies (v1) - Assigns time off policies to an employee with accruals starting on the specified date. A null start date removes the existing assignment. On success, returns the current list of assigned policies. + Deprecated. Use **Assign Time Off Policies (v1.1)** instead (`assign-time-off-policies-v1_1`). Assigns time off policies to an employee with accruals starting on the specified date. A null start date removes the existing assignment. On success, returns the current list of assigned policies. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee to assign policies to. (required) + :param employee_id: The internal employee ID of the employee whose time off policies are being assigned. (required) :type employee_id: int - :param assign_time_off_policies_request_inner: (required) - :type assign_time_off_policies_request_inner: List[AssignTimeOffPoliciesRequestInner] + :param assign_time_off_policies_v1_request_inner: (required) + :type assign_time_off_policies_v1_request_inner: List[AssignTimeOffPoliciesV1RequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -481,61 +421,56 @@ def assign_time_off_policies_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("PUT /api/v1/employees/{employeeId}/time_off/policies is deprecated.", DeprecationWarning) - _param = self._assign_time_off_policies_serialize( + _param = self._assign_time_off_policies_v1_serialize( employee_id=employee_id, - assign_time_off_policies_request_inner=assign_time_off_policies_request_inner, + assign_time_off_policies_v1_request_inner=assign_time_off_policies_v1_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignedTimeOffPolicy]", - '400': None, - '401': None, - '403': None, - '422': None, + _response_types_map: dict[str, str | None] = { + "200": "List[AssignedTimeOffPolicy]", + "400": None, + "401": None, + "403": None, + "422": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def assign_time_off_policies_without_preload_content( + def assign_time_off_policies_v1_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to assign policies to.")], - assign_time_off_policies_request_inner: List[AssignTimeOffPoliciesRequestInner], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee whose time off policies are being assigned."), + ], + assign_time_off_policies_v1_request_inner: list[AssignTimeOffPoliciesV1RequestInner], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Assign Time Off Policies + """(Deprecated) Assign Time Off Policies (v1) - Assigns time off policies to an employee with accruals starting on the specified date. A null start date removes the existing assignment. On success, returns the current list of assigned policies. + Deprecated. Use **Assign Time Off Policies (v1.1)** instead (`assign-time-off-policies-v1_1`). Assigns time off policies to an employee with accruals starting on the specified date. A null start date removes the existing assignment. On success, returns the current list of assigned policies. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee to assign policies to. (required) + :param employee_id: The internal employee ID of the employee whose time off policies are being assigned. (required) :type employee_id: int - :param assign_time_off_policies_request_inner: (required) - :type assign_time_off_policies_request_inner: List[AssignTimeOffPoliciesRequestInner] + :param assign_time_off_policies_v1_request_inner: (required) + :type assign_time_off_policies_v1_request_inner: List[AssignTimeOffPoliciesV1RequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -556,35 +491,32 @@ def assign_time_off_policies_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("PUT /api/v1/employees/{employeeId}/time_off/policies is deprecated.", DeprecationWarning) - _param = self._assign_time_off_policies_serialize( + _param = self._assign_time_off_policies_v1_serialize( employee_id=employee_id, - assign_time_off_policies_request_inner=assign_time_off_policies_request_inner, + assign_time_off_policies_v1_request_inner=assign_time_off_policies_v1_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignedTimeOffPolicy]", - '400': None, - '401': None, - '403': None, - '422': None, + _response_types_map: dict[str, str | None] = { + "200": "List[AssignedTimeOffPolicy]", + "400": None, + "401": None, + "403": None, + "422": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _assign_time_off_policies_serialize( + def _assign_time_off_policies_v1_serialize( self, employee_id, - assign_time_off_policies_request_inner, + assign_time_off_policies_v1_request_inner, _request_auth, _content_type, _headers, @@ -593,61 +525,45 @@ def _assign_time_off_policies_serialize( _host = None - _collection_formats: Dict[str, str] = { - 'AssignTimeOffPoliciesRequestInner': '', + _collection_formats: dict[str, str] = { + "AssignTimeOffPoliciesV1RequestInner": "", } - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if assign_time_off_policies_request_inner is not None: - _body_params = assign_time_off_policies_request_inner - + if assign_time_off_policies_v1_request_inner is not None: + _body_params = assign_time_off_policies_v1_request_inner # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/employees/{employeeId}/time_off/policies', + method="PUT", + resource_path="/api/v1/employees/{employeeId}/time_off/policies", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -657,38 +573,33 @@ def _assign_time_off_policies_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def assign_time_off_policies_v1_1( + def assign_time_off_policies_v11( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to assign policies to.")], - assign_time_off_policies_request_inner: List[AssignTimeOffPoliciesRequestInner], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt, + Field(description="The internal employee ID of the employee whose time off policies are being assigned."), + ], + assign_time_off_policies_v1_request_inner: list[AssignTimeOffPoliciesV1RequestInner], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[AssignedTimeOffPolicyV11]: - """Assign Time Off Policies v1.1 + ) -> list[AssignedTimeOffPolicyV11]: + """Assign Time Off Policies (v1.1) - Assigns time off policies to an employee with accruals starting on the specified date. On success, returns the current list of assigned policies including manual and unlimited policy types. + Assigns time off policies to an employee with accruals starting on the specified date. On success, returns the current list of assigned policies including manual and unlimited policy types. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee to assign policies to. (required) + :param employee_id: The internal employee ID of the employee whose time off policies are being assigned. (required) :type employee_id: int - :param assign_time_off_policies_request_inner: (required) - :type assign_time_off_policies_request_inner: List[AssignTimeOffPoliciesRequestInner] + :param assign_time_off_policies_v1_request_inner: (required) + :type assign_time_off_policies_v1_request_inner: List[AssignTimeOffPoliciesV1RequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -709,62 +620,56 @@ def assign_time_off_policies_v1_1( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._assign_time_off_policies_v1_1_serialize( + _param = self._assign_time_off_policies_v11_serialize( employee_id=employee_id, - assign_time_off_policies_request_inner=assign_time_off_policies_request_inner, + assign_time_off_policies_v1_request_inner=assign_time_off_policies_v1_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignedTimeOffPolicyV11]", - '400': None, - '401': None, - '403': None, - '422': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "List[AssignedTimeOffPolicyV11]", + "400": None, + "401": None, + "403": None, + "422": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def assign_time_off_policies_v1_1_with_http_info( + def assign_time_off_policies_v11_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to assign policies to.")], - assign_time_off_policies_request_inner: List[AssignTimeOffPoliciesRequestInner], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt, + Field(description="The internal employee ID of the employee whose time off policies are being assigned."), + ], + assign_time_off_policies_v1_request_inner: list[AssignTimeOffPoliciesV1RequestInner], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[AssignedTimeOffPolicyV11]]: - """Assign Time Off Policies v1.1 + ) -> ApiResponse[list[AssignedTimeOffPolicyV11]]: + """Assign Time Off Policies (v1.1) - Assigns time off policies to an employee with accruals starting on the specified date. On success, returns the current list of assigned policies including manual and unlimited policy types. + Assigns time off policies to an employee with accruals starting on the specified date. On success, returns the current list of assigned policies including manual and unlimited policy types. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee to assign policies to. (required) + :param employee_id: The internal employee ID of the employee whose time off policies are being assigned. (required) :type employee_id: int - :param assign_time_off_policies_request_inner: (required) - :type assign_time_off_policies_request_inner: List[AssignTimeOffPoliciesRequestInner] + :param assign_time_off_policies_v1_request_inner: (required) + :type assign_time_off_policies_v1_request_inner: List[AssignTimeOffPoliciesV1RequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -785,62 +690,56 @@ def assign_time_off_policies_v1_1_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._assign_time_off_policies_v1_1_serialize( + _param = self._assign_time_off_policies_v11_serialize( employee_id=employee_id, - assign_time_off_policies_request_inner=assign_time_off_policies_request_inner, + assign_time_off_policies_v1_request_inner=assign_time_off_policies_v1_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignedTimeOffPolicyV11]", - '400': None, - '401': None, - '403': None, - '422': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "List[AssignedTimeOffPolicyV11]", + "400": None, + "401": None, + "403": None, + "422": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def assign_time_off_policies_v1_1_without_preload_content( + def assign_time_off_policies_v11_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to assign policies to.")], - assign_time_off_policies_request_inner: List[AssignTimeOffPoliciesRequestInner], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt, + Field(description="The internal employee ID of the employee whose time off policies are being assigned."), + ], + assign_time_off_policies_v1_request_inner: list[AssignTimeOffPoliciesV1RequestInner], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Assign Time Off Policies v1.1 + """Assign Time Off Policies (v1.1) - Assigns time off policies to an employee with accruals starting on the specified date. On success, returns the current list of assigned policies including manual and unlimited policy types. + Assigns time off policies to an employee with accruals starting on the specified date. On success, returns the current list of assigned policies including manual and unlimited policy types. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee to assign policies to. (required) + :param employee_id: The internal employee ID of the employee whose time off policies are being assigned. (required) :type employee_id: int - :param assign_time_off_policies_request_inner: (required) - :type assign_time_off_policies_request_inner: List[AssignTimeOffPoliciesRequestInner] + :param assign_time_off_policies_v1_request_inner: (required) + :type assign_time_off_policies_v1_request_inner: List[AssignTimeOffPoliciesV1RequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -861,36 +760,32 @@ def assign_time_off_policies_v1_1_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._assign_time_off_policies_v1_1_serialize( + _param = self._assign_time_off_policies_v11_serialize( employee_id=employee_id, - assign_time_off_policies_request_inner=assign_time_off_policies_request_inner, + assign_time_off_policies_v1_request_inner=assign_time_off_policies_v1_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[AssignedTimeOffPolicyV11]", - '400': None, - '401': None, - '403': None, - '422': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "List[AssignedTimeOffPolicyV11]", + "400": None, + "401": None, + "403": None, + "422": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _assign_time_off_policies_v1_1_serialize( + def _assign_time_off_policies_v11_serialize( self, employee_id, - assign_time_off_policies_request_inner, + assign_time_off_policies_v1_request_inner, _request_auth, _content_type, _headers, @@ -899,61 +794,45 @@ def _assign_time_off_policies_v1_1_serialize( _host = None - _collection_formats: Dict[str, str] = { - 'AssignTimeOffPoliciesRequestInner': '', + _collection_formats: dict[str, str] = { + "AssignTimeOffPoliciesV1RequestInner": "", } - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if assign_time_off_policies_request_inner is not None: - _body_params = assign_time_off_policies_request_inner - + if assign_time_off_policies_v1_request_inner is not None: + _body_params = assign_time_off_policies_v1_request_inner # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1_1/employees/{employeeId}/time_off/policies', + method="PUT", + resource_path="/api/v1_1/employees/{employeeId}/time_off/policies", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -963,35 +842,27 @@ def _assign_time_off_policies_v1_1_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def create_time_off_history( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee.")], + employee_id: Annotated[StrictInt | None, Field(description="The internal employee ID.")], time_off_history: TimeOffHistory, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Create Time Off History Item - Creates a time off history item for an employee. For `used` type entries, a `timeOffRequestId` referencing an approved request is required. For `override` (balance adjustment) entries via the /history path, provide the `amount` and `timeOffTypeId` directly. The `eventType` defaults based on the URI path when omitted. + Creates a time off history item for an employee. For `used` type entries, a `timeOffRequestId` referencing an approved request is required. For `override` (balance adjustment) entries via the /history path, provide the `amount` and `timeOffTypeId` directly. The `eventType` defaults based on the URI path when omitted. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee. (required) + :param employee_id: The internal employee ID. (required) :type employee_id: int :param time_off_history: (required) :type time_off_history: TimeOffHistory @@ -1015,7 +886,7 @@ def create_time_off_history( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_time_off_history_serialize( employee_id=employee_id, @@ -1023,22 +894,19 @@ def create_time_off_history( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '403': None, - '404': None, - '409': None, - '503': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "401": None, + "403": None, + "404": None, + "409": None, + "503": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -1046,30 +914,24 @@ def create_time_off_history( response_types_map=_response_types_map, ) - @validate_call def create_time_off_history_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee.")], + employee_id: Annotated[StrictInt | None, Field(description="The internal employee ID.")], time_off_history: TimeOffHistory, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Create Time Off History Item - Creates a time off history item for an employee. For `used` type entries, a `timeOffRequestId` referencing an approved request is required. For `override` (balance adjustment) entries via the /history path, provide the `amount` and `timeOffTypeId` directly. The `eventType` defaults based on the URI path when omitted. + Creates a time off history item for an employee. For `used` type entries, a `timeOffRequestId` referencing an approved request is required. For `override` (balance adjustment) entries via the /history path, provide the `amount` and `timeOffTypeId` directly. The `eventType` defaults based on the URI path when omitted. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee. (required) + :param employee_id: The internal employee ID. (required) :type employee_id: int :param time_off_history: (required) :type time_off_history: TimeOffHistory @@ -1093,7 +955,7 @@ def create_time_off_history_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_time_off_history_serialize( employee_id=employee_id, @@ -1101,52 +963,43 @@ def create_time_off_history_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '403': None, - '404': None, - '409': None, - '503': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "401": None, + "403": None, + "404": None, + "409": None, + "503": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_time_off_history_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee.")], + employee_id: Annotated[StrictInt | None, Field(description="The internal employee ID.")], time_off_history: TimeOffHistory, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Time Off History Item - Creates a time off history item for an employee. For `used` type entries, a `timeOffRequestId` referencing an approved request is required. For `override` (balance adjustment) entries via the /history path, provide the `amount` and `timeOffTypeId` directly. The `eventType` defaults based on the URI path when omitted. + Creates a time off history item for an employee. For `used` type entries, a `timeOffRequestId` referencing an approved request is required. For `override` (balance adjustment) entries via the /history path, provide the `amount` and `timeOffTypeId` directly. The `eventType` defaults based on the URI path when omitted. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee. (required) + :param employee_id: The internal employee ID. (required) :type employee_id: int :param time_off_history: (required) :type time_off_history: TimeOffHistory @@ -1170,7 +1023,7 @@ def create_time_off_history_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_time_off_history_serialize( employee_id=employee_id, @@ -1178,25 +1031,21 @@ def create_time_off_history_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '403': None, - '404': None, - '409': None, - '503': None, + _response_types_map: dict[str, str | None] = { + "201": None, + "400": None, + "401": None, + "403": None, + "404": None, + "409": None, + "503": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_time_off_history_serialize( self, employee_id, @@ -1209,21 +1058,18 @@ def _create_time_off_history_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters @@ -1231,39 +1077,24 @@ def _create_time_off_history_serialize( if time_off_history is not None: _body_params = time_off_history - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json", "application/xml"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/employees/{employeeId}/time_off/history', + method="PUT", + resource_path="/api/v1/employees/{employeeId}/time_off/history", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1273,36 +1104,34 @@ def _create_time_off_history_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def create_time_off_request( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to create the time off request for.")], + employee_id: Annotated[ + str, + Field( + strict=True, + description="The internal employee ID of the employee for whom to create the time off request.", + ), + ], time_off_request: TimeOffRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> CreatedTimeOffRequest: """Create Time Off Request - Creates a time off request for an employee. The request can be submitted with a status of `approved`, `denied`, or `requested`. Approved and denied requests are recorded directly without triggering approval notifications. A `previousRequest` ID supersedes an existing request, cancelling the original. Accepts both JSON and XML request bodies. + Creates a time off request for an employee. The request can be submitted with a status of `approved`, `denied`, or `requested`. Submitting `approved` or `denied` is only honored when the caller is an owner/admin or has view/edit access to the time off type field for the target employee; other callers receive 403. When honored, these statuses record the request directly and suppress approval notifications. Supplying a `previousRequest` ID performs a destructive supersede: the prior request's status is set to `superceded`, all approvals on its workflow are removed and the workflow is marked deleted, and any home-page notifications tied to that workflow are deleted. Accepts both JSON and XML request bodies. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee to create the time off request for. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee for whom to create the time off request. (required) + :type employee_id: str :param time_off_request: (required) :type time_off_request: TimeOffRequest :param _request_timeout: timeout setting for this request. If one @@ -1325,7 +1154,7 @@ def create_time_off_request( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_time_off_request_serialize( employee_id=employee_id, @@ -1333,53 +1162,49 @@ def create_time_off_request( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '403': None, - '404': None, - '422': None, + _response_types_map: dict[str, str | None] = { + "201": "CreatedTimeOffRequest", + "400": None, + "401": None, + "403": None, + "404": None, + "422": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call def create_time_off_request_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to create the time off request for.")], + employee_id: Annotated[ + str, + Field( + strict=True, + description="The internal employee ID of the employee for whom to create the time off request.", + ), + ], time_off_request: TimeOffRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[CreatedTimeOffRequest]: """Create Time Off Request - Creates a time off request for an employee. The request can be submitted with a status of `approved`, `denied`, or `requested`. Approved and denied requests are recorded directly without triggering approval notifications. A `previousRequest` ID supersedes an existing request, cancelling the original. Accepts both JSON and XML request bodies. + Creates a time off request for an employee. The request can be submitted with a status of `approved`, `denied`, or `requested`. Submitting `approved` or `denied` is only honored when the caller is an owner/admin or has view/edit access to the time off type field for the target employee; other callers receive 403. When honored, these statuses record the request directly and suppress approval notifications. Supplying a `previousRequest` ID performs a destructive supersede: the prior request's status is set to `superceded`, all approvals on its workflow are removed and the workflow is marked deleted, and any home-page notifications tied to that workflow are deleted. Accepts both JSON and XML request bodies. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee to create the time off request for. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee for whom to create the time off request. (required) + :type employee_id: str :param time_off_request: (required) :type time_off_request: TimeOffRequest :param _request_timeout: timeout setting for this request. If one @@ -1402,7 +1227,7 @@ def create_time_off_request_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_time_off_request_serialize( employee_id=employee_id, @@ -1410,52 +1235,49 @@ def create_time_off_request_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '403': None, - '404': None, - '422': None, + _response_types_map: dict[str, str | None] = { + "201": "CreatedTimeOffRequest", + "400": None, + "401": None, + "403": None, + "404": None, + "422": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_time_off_request_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to create the time off request for.")], + employee_id: Annotated[ + str, + Field( + strict=True, + description="The internal employee ID of the employee for whom to create the time off request.", + ), + ], time_off_request: TimeOffRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Time Off Request - Creates a time off request for an employee. The request can be submitted with a status of `approved`, `denied`, or `requested`. Approved and denied requests are recorded directly without triggering approval notifications. A `previousRequest` ID supersedes an existing request, cancelling the original. Accepts both JSON and XML request bodies. + Creates a time off request for an employee. The request can be submitted with a status of `approved`, `denied`, or `requested`. Submitting `approved` or `denied` is only honored when the caller is an owner/admin or has view/edit access to the time off type field for the target employee; other callers receive 403. When honored, these statuses record the request directly and suppress approval notifications. Supplying a `previousRequest` ID performs a destructive supersede: the prior request's status is set to `superceded`, all approvals on its workflow are removed and the workflow is marked deleted, and any home-page notifications tied to that workflow are deleted. Accepts both JSON and XML request bodies. OAuth Scopes: time_off.write - :param employee_id: The ID of the employee to create the time off request for. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee for whom to create the time off request. (required) + :type employee_id: str :param time_off_request: (required) :type time_off_request: TimeOffRequest :param _request_timeout: timeout setting for this request. If one @@ -1478,7 +1300,7 @@ def create_time_off_request_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_time_off_request_serialize( employee_id=employee_id, @@ -1486,24 +1308,20 @@ def create_time_off_request_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '403': None, - '404': None, - '422': None, + _response_types_map: dict[str, str | None] = { + "201": "CreatedTimeOffRequest", + "400": None, + "401": None, + "403": None, + "404": None, + "422": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_time_off_request_serialize( self, employee_id, @@ -1516,21 +1334,18 @@ def _create_time_off_request_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters @@ -1538,39 +1353,24 @@ def _create_time_off_request_serialize( if time_off_request is not None: _body_params = time_off_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json", "application/xml"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/employees/{employeeId}/time_off/request', + method="PUT", + resource_path="/api/v1/employees/{employeeId}/time_off/request", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1580,38 +1380,48 @@ def _create_time_off_request_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def get_time_off_balance( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to get time off balances for.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - end: Annotated[Optional[date], Field(description="The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance.")] = None, - precision: Annotated[Optional[Annotated[int, Field(le=4, strict=True, ge=0)]], Field(description="Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + str, + Field( + strict=True, + description="The internal employee ID of the employee whose time off balances are returned.", + ), + ], + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + end: Annotated[ + date | None, + Field( + description="The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance." + ), + ] = None, + precision: Annotated[ + Annotated[int, Field(le=4, strict=True, ge=0)] | None, + Field( + description="Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[TimeOffBalanceEntry]: + ) -> list[TimeOffBalanceEntry]: """Get Time Off Balance - Returns time off balances for an employee across all assigned categories as of a given date. Each category's balance is calculated by summing all historical balance events (accruals, manual adjustments, used time off, and carry-over events) plus any future accruals and adjustments up to the specified date. To get current balances, pass today's date; to project future balances, pass a future date. Response defaults to XML unless Accept: application/json is provided. + Returns time off balances for an employee across all assigned categories as of a given date. Each category's balance is calculated by summing all historical balance events (accruals, manual adjustments, used time off, and carry-over events) plus any future accruals and adjustments up to the specified date. To get current balances, pass today's date; to project future balances, pass a future date. Response defaults to XML unless Accept: application/json is provided. **This endpoint does not accept the `0` self sentinel.** Unlike Get Employee (`get-employee`), passing `0` as `employeeId` returns `404` with an empty body and the header `x-bamboohr-error-message: Employee not found`. To read the authenticated caller's own balances, first resolve their internal employee ID with `get-employee` using the id `0`, then call this endpoint with that ID. **Permissions.** Access is gated on the same Time Off tab view permission the web application uses. That permission is configured per access level and is **not** implied by the reporting structure: being an employee's manager does not by itself grant it, and a manager may receive `403` for their own direct reports. A caller without permission for the target employee receives an explicit `403` rather than an empty success, so the two cases are distinguishable: a `403` means access was denied, while an empty array with `200` means the employee has no assigned policies among the time off types this caller can view. Do not read a `403` as the employee having no time off, and do not read an empty array as a permission problem. Because the categories returned are limited to the time off types the caller can view for that employee, two callers can legitimately receive different subsets for the same person. Treat the returned set as what this caller may see, not as the employee's complete policy list. `list-employee-time-off-policies-v1_1` is the companion endpoint for the underlying assignments and is gated on the same permission. A category returning `0.00` is not an error and does not necessarily mean the time cannot be requested. Discretionary policies (for example Bereavement or FMLA) are granted as needed rather than accrued, so they normally report a zero balance while still being available to request. Use `policyType` to distinguish `accruing` from `discretionary` before characterizing a zero. OAuth Scopes: time_off - :param employee_id: The ID of the employee to get time off balances for. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee whose time off balances are returned. (required) + :type employee_id: str :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str :param end: The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance. @@ -1638,7 +1448,7 @@ def get_time_off_balance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_time_off_balance_serialize( employee_id=employee_id, @@ -1648,51 +1458,61 @@ def get_time_off_balance( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeOffBalanceEntry]", - '401': None, - '404': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "List[TimeOffBalanceEntry]", + "401": None, + "403": None, + "404": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def get_time_off_balance_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to get time off balances for.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - end: Annotated[Optional[date], Field(description="The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance.")] = None, - precision: Annotated[Optional[Annotated[int, Field(le=4, strict=True, ge=0)]], Field(description="Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + str, + Field( + strict=True, + description="The internal employee ID of the employee whose time off balances are returned.", + ), + ], + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + end: Annotated[ + date | None, + Field( + description="The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance." + ), + ] = None, + precision: Annotated[ + Annotated[int, Field(le=4, strict=True, ge=0)] | None, + Field( + description="Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[TimeOffBalanceEntry]]: + ) -> ApiResponse[list[TimeOffBalanceEntry]]: """Get Time Off Balance - Returns time off balances for an employee across all assigned categories as of a given date. Each category's balance is calculated by summing all historical balance events (accruals, manual adjustments, used time off, and carry-over events) plus any future accruals and adjustments up to the specified date. To get current balances, pass today's date; to project future balances, pass a future date. Response defaults to XML unless Accept: application/json is provided. + Returns time off balances for an employee across all assigned categories as of a given date. Each category's balance is calculated by summing all historical balance events (accruals, manual adjustments, used time off, and carry-over events) plus any future accruals and adjustments up to the specified date. To get current balances, pass today's date; to project future balances, pass a future date. Response defaults to XML unless Accept: application/json is provided. **This endpoint does not accept the `0` self sentinel.** Unlike Get Employee (`get-employee`), passing `0` as `employeeId` returns `404` with an empty body and the header `x-bamboohr-error-message: Employee not found`. To read the authenticated caller's own balances, first resolve their internal employee ID with `get-employee` using the id `0`, then call this endpoint with that ID. **Permissions.** Access is gated on the same Time Off tab view permission the web application uses. That permission is configured per access level and is **not** implied by the reporting structure: being an employee's manager does not by itself grant it, and a manager may receive `403` for their own direct reports. A caller without permission for the target employee receives an explicit `403` rather than an empty success, so the two cases are distinguishable: a `403` means access was denied, while an empty array with `200` means the employee has no assigned policies among the time off types this caller can view. Do not read a `403` as the employee having no time off, and do not read an empty array as a permission problem. Because the categories returned are limited to the time off types the caller can view for that employee, two callers can legitimately receive different subsets for the same person. Treat the returned set as what this caller may see, not as the employee's complete policy list. `list-employee-time-off-policies-v1_1` is the companion endpoint for the underlying assignments and is gated on the same permission. A category returning `0.00` is not an error and does not necessarily mean the time cannot be requested. Discretionary policies (for example Bereavement or FMLA) are granted as needed rather than accrued, so they normally report a zero balance while still being available to request. Use `policyType` to distinguish `accruing` from `discretionary` before characterizing a zero. OAuth Scopes: time_off - :param employee_id: The ID of the employee to get time off balances for. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee whose time off balances are returned. (required) + :type employee_id: str :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str :param end: The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance. @@ -1719,7 +1539,7 @@ def get_time_off_balance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_time_off_balance_serialize( employee_id=employee_id, @@ -1729,51 +1549,61 @@ def get_time_off_balance_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeOffBalanceEntry]", - '401': None, - '404': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "List[TimeOffBalanceEntry]", + "401": None, + "403": None, + "404": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def get_time_off_balance_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to get time off balances for.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - end: Annotated[Optional[date], Field(description="The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance.")] = None, - precision: Annotated[Optional[Annotated[int, Field(le=4, strict=True, ge=0)]], Field(description="Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + str, + Field( + strict=True, + description="The internal employee ID of the employee whose time off balances are returned.", + ), + ], + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + end: Annotated[ + date | None, + Field( + description="The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + precision: Annotated[ + Annotated[int, Field(le=4, strict=True, ge=0)] | None, + Field( + description="Number of decimal places for balance and usedYearToDate values. Minimum 0, maximum 4. Defaults to 2." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Get Time Off Balance - Returns time off balances for an employee across all assigned categories as of a given date. Each category's balance is calculated by summing all historical balance events (accruals, manual adjustments, used time off, and carry-over events) plus any future accruals and adjustments up to the specified date. To get current balances, pass today's date; to project future balances, pass a future date. Response defaults to XML unless Accept: application/json is provided. + Returns time off balances for an employee across all assigned categories as of a given date. Each category's balance is calculated by summing all historical balance events (accruals, manual adjustments, used time off, and carry-over events) plus any future accruals and adjustments up to the specified date. To get current balances, pass today's date; to project future balances, pass a future date. Response defaults to XML unless Accept: application/json is provided. **This endpoint does not accept the `0` self sentinel.** Unlike Get Employee (`get-employee`), passing `0` as `employeeId` returns `404` with an empty body and the header `x-bamboohr-error-message: Employee not found`. To read the authenticated caller's own balances, first resolve their internal employee ID with `get-employee` using the id `0`, then call this endpoint with that ID. **Permissions.** Access is gated on the same Time Off tab view permission the web application uses. That permission is configured per access level and is **not** implied by the reporting structure: being an employee's manager does not by itself grant it, and a manager may receive `403` for their own direct reports. A caller without permission for the target employee receives an explicit `403` rather than an empty success, so the two cases are distinguishable: a `403` means access was denied, while an empty array with `200` means the employee has no assigned policies among the time off types this caller can view. Do not read a `403` as the employee having no time off, and do not read an empty array as a permission problem. Because the categories returned are limited to the time off types the caller can view for that employee, two callers can legitimately receive different subsets for the same person. Treat the returned set as what this caller may see, not as the employee's complete policy list. `list-employee-time-off-policies-v1_1` is the companion endpoint for the underlying assignments and is gated on the same permission. A category returning `0.00` is not an error and does not necessarily mean the time cannot be requested. Discretionary policies (for example Bereavement or FMLA) are granted as needed rather than accrued, so they normally report a zero balance while still being available to request. Use `policyType` to distinguish `accruing` from `discretionary` before characterizing a zero. OAuth Scopes: time_off - :param employee_id: The ID of the employee to get time off balances for. (required) - :type employee_id: int + :param employee_id: The internal employee ID of the employee whose time off balances are returned. (required) + :type employee_id: str :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str :param end: The date to calculate the time off balance as of, in YYYY-MM-DD format. Defaults to company today if not provided. Example: use a future date to project balance. @@ -1800,7 +1630,7 @@ def get_time_off_balance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._get_time_off_balance_serialize( employee_id=employee_id, @@ -1810,21 +1640,18 @@ def get_time_off_balance_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeOffBalanceEntry]", - '401': None, - '404': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "List[TimeOffBalanceEntry]", + "401": None, + "403": None, + "404": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_time_off_balance_serialize( self, employee_id, @@ -1839,65 +1666,44 @@ def _get_time_off_balance_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters if end is not None: if isinstance(end, date): - _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.date_format - ) - ) - ) + _query_params.append(("end", end.strftime(self.api_client.configuration.date_format))) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + if precision is not None: - - _query_params.append(('precision', precision)) - + _query_params.append(("precision", precision)) + # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employees/{employeeId}/time_off/calculator', + method="GET", + resource_path="/api/v1/employees/{employeeId}/time_off/calculator", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1907,35 +1713,27 @@ def _get_time_off_balance_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_employee_time_off_policies( + def list_employee_time_off_policies_v1( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[str, Field(strict=True, description="The internal employee ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[EmployeeTimeOffPolicyAssignment]: - """List Employee Time Off Policies + ) -> list[EmployeeTimeOffPolicyAssignment]: + """(Deprecated) List Employee Time Off Policies (v1) - Returns the time off policies currently assigned to the specified employee, including policy ID, time off type, and accrual start date. + Deprecated. Use **List Employee Time Off Policies (v1.1)** instead (`list-employee-time-off-policies-v1_1`). Returns the time off policies currently assigned to the specified employee, including policy ID, time off type, and accrual start date. OAuth Scopes: time_off - :param employee_id: The ID of the employee. (required) - :type employee_id: int + :param employee_id: The internal employee ID. (required) + :type employee_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1956,55 +1754,47 @@ def list_employee_time_off_policies( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("GET /api/v1/employees/{employeeId}/time_off/policies is deprecated.", DeprecationWarning) - _param = self._list_employee_time_off_policies_serialize( + _param = self._list_employee_time_off_policies_v1_serialize( employee_id=employee_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EmployeeTimeOffPolicyAssignment]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[EmployeeTimeOffPolicyAssignment]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_employee_time_off_policies_with_http_info( + def list_employee_time_off_policies_v1_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[str, Field(strict=True, description="The internal employee ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[EmployeeTimeOffPolicyAssignment]]: - """List Employee Time Off Policies + ) -> ApiResponse[list[EmployeeTimeOffPolicyAssignment]]: + """(Deprecated) List Employee Time Off Policies (v1) - Returns the time off policies currently assigned to the specified employee, including policy ID, time off type, and accrual start date. + Deprecated. Use **List Employee Time Off Policies (v1.1)** instead (`list-employee-time-off-policies-v1_1`). Returns the time off policies currently assigned to the specified employee, including policy ID, time off type, and accrual start date. OAuth Scopes: time_off - :param employee_id: The ID of the employee. (required) - :type employee_id: int + :param employee_id: The internal employee ID. (required) + :type employee_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2025,55 +1815,47 @@ def list_employee_time_off_policies_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("GET /api/v1/employees/{employeeId}/time_off/policies is deprecated.", DeprecationWarning) - _param = self._list_employee_time_off_policies_serialize( + _param = self._list_employee_time_off_policies_v1_serialize( employee_id=employee_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EmployeeTimeOffPolicyAssignment]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[EmployeeTimeOffPolicyAssignment]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_employee_time_off_policies_without_preload_content( + def list_employee_time_off_policies_v1_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[str, Field(strict=True, description="The internal employee ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Employee Time Off Policies + """(Deprecated) List Employee Time Off Policies (v1) - Returns the time off policies currently assigned to the specified employee, including policy ID, time off type, and accrual start date. + Deprecated. Use **List Employee Time Off Policies (v1.1)** instead (`list-employee-time-off-policies-v1_1`). Returns the time off policies currently assigned to the specified employee, including policy ID, time off type, and accrual start date. OAuth Scopes: time_off - :param employee_id: The ID of the employee. (required) - :type employee_id: int + :param employee_id: The internal employee ID. (required) + :type employee_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2094,29 +1876,26 @@ def list_employee_time_off_policies_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("GET /api/v1/employees/{employeeId}/time_off/policies is deprecated.", DeprecationWarning) - _param = self._list_employee_time_off_policies_serialize( + _param = self._list_employee_time_off_policies_v1_serialize( employee_id=employee_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EmployeeTimeOffPolicyAssignment]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[EmployeeTimeOffPolicyAssignment]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_employee_time_off_policies_serialize( + def _list_employee_time_off_policies_v1_serialize( self, employee_id, _request_auth, @@ -2127,45 +1906,33 @@ def _list_employee_time_off_policies_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/employees/{employeeId}/time_off/policies', + method="GET", + resource_path="/api/v1/employees/{employeeId}/time_off/policies", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2175,35 +1942,27 @@ def _list_employee_time_off_policies_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_employee_time_off_policies_v1_1( + def list_employee_time_off_policies_v11( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[str, Field(strict=True, description="The internal employee ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[EmployeeTimeOffPolicyAssignmentV11]: - """List Employee Time Off Policies v1.1 + ) -> list[EmployeeTimeOffPolicyAssignmentV11]: + """List Employee Time Off Policies (v1.1) - Returns the time off policies currently assigned to the specified employee, including manual and unlimited policy types that v1 excludes. + Returns the time off policies currently assigned to a specific employee, as a list of `{timeOffPolicyId, timeOffTypeId, accrualStartDate}` records. Use this to find which policy governs each time off type for this employee and when their accruals began. This is the per-employee assignment view; use `list-time-off-policies` for the company-wide policy catalog. Includes all policy types (accruing, manual, and unlimited); the v1 form of this endpoint excluded manual and unlimited types — v1.1 includes them. OAuth Scopes: time_off - :param employee_id: The ID of the employee. (required) - :type employee_id: int + :param employee_id: The internal employee ID. (required) + :type employee_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2224,55 +1983,46 @@ def list_employee_time_off_policies_v1_1( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_time_off_policies_v1_1_serialize( + _param = self._list_employee_time_off_policies_v11_serialize( employee_id=employee_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EmployeeTimeOffPolicyAssignmentV11]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[EmployeeTimeOffPolicyAssignmentV11]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_employee_time_off_policies_v1_1_with_http_info( + def list_employee_time_off_policies_v11_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[str, Field(strict=True, description="The internal employee ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[EmployeeTimeOffPolicyAssignmentV11]]: - """List Employee Time Off Policies v1.1 + ) -> ApiResponse[list[EmployeeTimeOffPolicyAssignmentV11]]: + """List Employee Time Off Policies (v1.1) - Returns the time off policies currently assigned to the specified employee, including manual and unlimited policy types that v1 excludes. + Returns the time off policies currently assigned to a specific employee, as a list of `{timeOffPolicyId, timeOffTypeId, accrualStartDate}` records. Use this to find which policy governs each time off type for this employee and when their accruals began. This is the per-employee assignment view; use `list-time-off-policies` for the company-wide policy catalog. Includes all policy types (accruing, manual, and unlimited); the v1 form of this endpoint excluded manual and unlimited types — v1.1 includes them. OAuth Scopes: time_off - :param employee_id: The ID of the employee. (required) - :type employee_id: int + :param employee_id: The internal employee ID. (required) + :type employee_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2293,55 +2043,46 @@ def list_employee_time_off_policies_v1_1_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_time_off_policies_v1_1_serialize( + _param = self._list_employee_time_off_policies_v11_serialize( employee_id=employee_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EmployeeTimeOffPolicyAssignmentV11]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[EmployeeTimeOffPolicyAssignmentV11]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_employee_time_off_policies_v1_1_without_preload_content( + def list_employee_time_off_policies_v11_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[str, Field(strict=True, description="The internal employee ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Employee Time Off Policies v1.1 + """List Employee Time Off Policies (v1.1) - Returns the time off policies currently assigned to the specified employee, including manual and unlimited policy types that v1 excludes. + Returns the time off policies currently assigned to a specific employee, as a list of `{timeOffPolicyId, timeOffTypeId, accrualStartDate}` records. Use this to find which policy governs each time off type for this employee and when their accruals began. This is the per-employee assignment view; use `list-time-off-policies` for the company-wide policy catalog. Includes all policy types (accruing, manual, and unlimited); the v1 form of this endpoint excluded manual and unlimited types — v1.1 includes them. OAuth Scopes: time_off - :param employee_id: The ID of the employee. (required) - :type employee_id: int + :param employee_id: The internal employee ID. (required) + :type employee_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2362,29 +2103,25 @@ def list_employee_time_off_policies_v1_1_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_time_off_policies_v1_1_serialize( + _param = self._list_employee_time_off_policies_v11_serialize( employee_id=employee_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EmployeeTimeOffPolicyAssignmentV11]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[EmployeeTimeOffPolicyAssignmentV11]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_employee_time_off_policies_v1_1_serialize( + def _list_employee_time_off_policies_v11_serialize( self, employee_id, _request_auth, @@ -2395,45 +2132,33 @@ def _list_employee_time_off_policies_v1_1_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1_1/employees/{employeeId}/time_off/policies', + method="GET", + resource_path="/api/v1_1/employees/{employeeId}/time_off/policies", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2443,32 +2168,26 @@ def _list_employee_time_off_policies_v1_1_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_time_off_policies( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[TimeOffPolicy]: + ) -> list[TimeOffPolicy]: """List Time Off Policies - Returns all non-deleted time off policies for the company, sorted alphabetically by name. Only includes policies whose time off type has not been deleted. + Returns all non-deleted time off policies for the company, sorted alphabetically by name. Only includes policies whose time off type has not been deleted. OAuth Scopes: time_off :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -2492,52 +2211,45 @@ def list_time_off_policies( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_time_off_policies_serialize( accept_header_parameter=accept_header_parameter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeOffPolicy]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[TimeOffPolicy]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_time_off_policies_with_http_info( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[TimeOffPolicy]]: + ) -> ApiResponse[list[TimeOffPolicy]]: """List Time Off Policies - Returns all non-deleted time off policies for the company, sorted alphabetically by name. Only includes policies whose time off type has not been deleted. + Returns all non-deleted time off policies for the company, sorted alphabetically by name. Only includes policies whose time off type has not been deleted. OAuth Scopes: time_off :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -2561,52 +2273,45 @@ def list_time_off_policies_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_time_off_policies_serialize( accept_header_parameter=accept_header_parameter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeOffPolicy]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[TimeOffPolicy]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_time_off_policies_without_preload_content( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Time Off Policies - Returns all non-deleted time off policies for the company, sorted alphabetically by name. Only includes policies whose time off type has not been deleted. + Returns all non-deleted time off policies for the company, sorted alphabetically by name. Only includes policies whose time off type has not been deleted. OAuth Scopes: time_off :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -2630,28 +2335,24 @@ def list_time_off_policies_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_time_off_policies_serialize( accept_header_parameter=accept_header_parameter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeOffPolicy]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[TimeOffPolicy]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_time_off_policies_serialize( self, accept_header_parameter, @@ -2663,45 +2364,33 @@ def _list_time_off_policies_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/meta/time_off/policies', + method="GET", + resource_path="/api/v1/meta/time_off/policies", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2711,53 +2400,79 @@ def _list_time_off_policies_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_time_off_requests( self, - start: Annotated[date, Field(description="Only include requests that end on or after this date. YYYY-MM-DD format.")], - end: Annotated[date, Field(description="Only include requests that start on or before this date. YYYY-MM-DD format.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - id: Annotated[Optional[StrictInt], Field(description="A particular request ID to limit the response to.")] = None, - action: Annotated[Optional[StrictStr], Field(description="Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`.")] = None, - employee_id: Annotated[Optional[StrictInt], Field(description="A particular employee ID to limit the response to.")] = None, - type: Annotated[Optional[StrictStr], Field(description="A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included.")] = None, - status: Annotated[Optional[StrictStr], Field(description="A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included.")] = None, - exclude_note: Annotated[Optional[StrictStr], Field(description="When set to any truthy value, omits the `notes` object from each request in the response.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + start: Annotated[ + date | None, + Field( + description="The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date." + ), + ], + end: Annotated[ + date | None, + Field( + description="The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date." + ), + ], + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + id: Annotated[StrictStr | None, Field(description="A particular request ID to limit the response to.")] = None, + action: Annotated[ + StrictStr | None, + Field( + description="Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`." + ), + ] = None, + employee_id: Annotated[ + StrictStr | None, Field(description="A particular internal employee ID to limit the response to.") + ] = None, + type: Annotated[ + StrictStr | None, + Field( + description="A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + status: Annotated[ + StrictStr | None, + Field( + description="A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included." + ), + ] = None, + exclude_note: Annotated[ + StrictStr | None, + Field( + description="When set to any truthy value, omits the `notes` object from each request in the response." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[TimeOffRequest1]: + ) -> list[TimeOffRequest1]: """List Time Off Requests - Returns time off requests within the specified date range. Both `start` and `end` query parameters are required (YYYY-MM-DD). The search is inclusive: requests whose date range overlaps the query window are returned. Results can be filtered by status, employee, time off type, or limited to requests the caller can approve. + Returns time off requests within the specified date range. Both `start` and `end` query parameters are required (YYYY-MM-DD). The search is inclusive: requests whose date range overlaps the query window are returned. Results can be filtered by status, employee, time off type, or limited to requests the caller can approve. **Do not pass `employeeId=0` expecting the caller's own requests.** Unlike Get Employee (`get-employee`), the `0` self sentinel is not supported here and returns an empty array with HTTP `200` rather than an error, which is easily misread as the caller having no requests. Use `action=myRequests` for the authenticated caller's own requests, or resolve their internal employee ID with `get-employee` using the id `0` and pass that value. **An empty result does not mean the employee has no requests.** A caller who lacks permission to view another employee's time off receives an empty array with HTTP `200`, indistinguishable from an employee with no requests in the window. Before concluding that someone has no time off requests, confirm that the window is wide enough and that the caller can actually view that employee. This endpoint and Get Time Off Balance (`get-time-off-balance`) are gated independently, so neither one's outcome predicts the other's. A caller can receive `403` from the balance endpoint for an employee while still receiving that same employee's requests here, which has been observed for a manager viewing a direct report. Do not infer access to one endpoint from access to the other, and do not treat a result from one as evidence about the other. OAuth Scopes: time_off - :param start: Only include requests that end on or after this date. YYYY-MM-DD format. (required) + :param start: The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date. (required) :type start: date - :param end: Only include requests that start on or before this date. YYYY-MM-DD format. (required) + :param end: The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date. (required) :type end: date :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str :param id: A particular request ID to limit the response to. - :type id: int + :type id: str :param action: Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`. :type action: str - :param employee_id: A particular employee ID to limit the response to. - :type employee_id: int + :param employee_id: A particular internal employee ID to limit the response to. + :type employee_id: str :param type: A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included. :type type: str :param status: A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included. @@ -2784,7 +2499,7 @@ def list_time_off_requests( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_time_off_requests_serialize( start=start, @@ -2799,66 +2514,91 @@ def list_time_off_requests( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeOffRequest1]", - '400': None, - '401': None, + _response_types_map: dict[str, str | None] = { + "200": "List[TimeOffRequest1]", + "400": None, + "401": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_time_off_requests_with_http_info( self, - start: Annotated[date, Field(description="Only include requests that end on or after this date. YYYY-MM-DD format.")], - end: Annotated[date, Field(description="Only include requests that start on or before this date. YYYY-MM-DD format.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - id: Annotated[Optional[StrictInt], Field(description="A particular request ID to limit the response to.")] = None, - action: Annotated[Optional[StrictStr], Field(description="Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`.")] = None, - employee_id: Annotated[Optional[StrictInt], Field(description="A particular employee ID to limit the response to.")] = None, - type: Annotated[Optional[StrictStr], Field(description="A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included.")] = None, - status: Annotated[Optional[StrictStr], Field(description="A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included.")] = None, - exclude_note: Annotated[Optional[StrictStr], Field(description="When set to any truthy value, omits the `notes` object from each request in the response.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + start: Annotated[ + date | None, + Field( + description="The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date." + ), + ], + end: Annotated[ + date | None, + Field( + description="The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date." + ), + ], + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + id: Annotated[StrictStr | None, Field(description="A particular request ID to limit the response to.")] = None, + action: Annotated[ + StrictStr | None, + Field( + description="Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`." + ), + ] = None, + employee_id: Annotated[ + StrictStr | None, Field(description="A particular internal employee ID to limit the response to.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + type: Annotated[ + StrictStr | None, + Field( + description="A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included." + ), + ] = None, + status: Annotated[ + StrictStr | None, + Field( + description="A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included." + ), + ] = None, + exclude_note: Annotated[ + StrictStr | None, + Field( + description="When set to any truthy value, omits the `notes` object from each request in the response." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[TimeOffRequest1]]: + ) -> ApiResponse[list[TimeOffRequest1]]: """List Time Off Requests - Returns time off requests within the specified date range. Both `start` and `end` query parameters are required (YYYY-MM-DD). The search is inclusive: requests whose date range overlaps the query window are returned. Results can be filtered by status, employee, time off type, or limited to requests the caller can approve. + Returns time off requests within the specified date range. Both `start` and `end` query parameters are required (YYYY-MM-DD). The search is inclusive: requests whose date range overlaps the query window are returned. Results can be filtered by status, employee, time off type, or limited to requests the caller can approve. **Do not pass `employeeId=0` expecting the caller's own requests.** Unlike Get Employee (`get-employee`), the `0` self sentinel is not supported here and returns an empty array with HTTP `200` rather than an error, which is easily misread as the caller having no requests. Use `action=myRequests` for the authenticated caller's own requests, or resolve their internal employee ID with `get-employee` using the id `0` and pass that value. **An empty result does not mean the employee has no requests.** A caller who lacks permission to view another employee's time off receives an empty array with HTTP `200`, indistinguishable from an employee with no requests in the window. Before concluding that someone has no time off requests, confirm that the window is wide enough and that the caller can actually view that employee. This endpoint and Get Time Off Balance (`get-time-off-balance`) are gated independently, so neither one's outcome predicts the other's. A caller can receive `403` from the balance endpoint for an employee while still receiving that same employee's requests here, which has been observed for a manager viewing a direct report. Do not infer access to one endpoint from access to the other, and do not treat a result from one as evidence about the other. OAuth Scopes: time_off - :param start: Only include requests that end on or after this date. YYYY-MM-DD format. (required) + :param start: The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date. (required) :type start: date - :param end: Only include requests that start on or before this date. YYYY-MM-DD format. (required) + :param end: The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date. (required) :type end: date :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str :param id: A particular request ID to limit the response to. - :type id: int + :type id: str :param action: Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`. :type action: str - :param employee_id: A particular employee ID to limit the response to. - :type employee_id: int + :param employee_id: A particular internal employee ID to limit the response to. + :type employee_id: str :param type: A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included. :type type: str :param status: A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included. @@ -2885,7 +2625,7 @@ def list_time_off_requests_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_time_off_requests_serialize( start=start, @@ -2900,66 +2640,91 @@ def list_time_off_requests_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeOffRequest1]", - '400': None, - '401': None, + _response_types_map: dict[str, str | None] = { + "200": "List[TimeOffRequest1]", + "400": None, + "401": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_time_off_requests_without_preload_content( self, - start: Annotated[date, Field(description="Only include requests that end on or after this date. YYYY-MM-DD format.")], - end: Annotated[date, Field(description="Only include requests that start on or before this date. YYYY-MM-DD format.")], - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - id: Annotated[Optional[StrictInt], Field(description="A particular request ID to limit the response to.")] = None, - action: Annotated[Optional[StrictStr], Field(description="Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`.")] = None, - employee_id: Annotated[Optional[StrictInt], Field(description="A particular employee ID to limit the response to.")] = None, - type: Annotated[Optional[StrictStr], Field(description="A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included.")] = None, - status: Annotated[Optional[StrictStr], Field(description="A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included.")] = None, - exclude_note: Annotated[Optional[StrictStr], Field(description="When set to any truthy value, omits the `notes` object from each request in the response.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + start: Annotated[ + date | None, + Field( + description="The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date." + ), + ], + end: Annotated[ + date | None, + Field( + description="The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date." + ), + ], + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + id: Annotated[StrictStr | None, Field(description="A particular request ID to limit the response to.")] = None, + action: Annotated[ + StrictStr | None, + Field( + description="Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictStr | None, Field(description="A particular internal employee ID to limit the response to.") + ] = None, + type: Annotated[ + StrictStr | None, + Field( + description="A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included." + ), + ] = None, + status: Annotated[ + StrictStr | None, + Field( + description="A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included." + ), + ] = None, + exclude_note: Annotated[ + StrictStr | None, + Field( + description="When set to any truthy value, omits the `notes` object from each request in the response." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Time Off Requests - Returns time off requests within the specified date range. Both `start` and `end` query parameters are required (YYYY-MM-DD). The search is inclusive: requests whose date range overlaps the query window are returned. Results can be filtered by status, employee, time off type, or limited to requests the caller can approve. + Returns time off requests within the specified date range. Both `start` and `end` query parameters are required (YYYY-MM-DD). The search is inclusive: requests whose date range overlaps the query window are returned. Results can be filtered by status, employee, time off type, or limited to requests the caller can approve. **Do not pass `employeeId=0` expecting the caller's own requests.** Unlike Get Employee (`get-employee`), the `0` self sentinel is not supported here and returns an empty array with HTTP `200` rather than an error, which is easily misread as the caller having no requests. Use `action=myRequests` for the authenticated caller's own requests, or resolve their internal employee ID with `get-employee` using the id `0` and pass that value. **An empty result does not mean the employee has no requests.** A caller who lacks permission to view another employee's time off receives an empty array with HTTP `200`, indistinguishable from an employee with no requests in the window. Before concluding that someone has no time off requests, confirm that the window is wide enough and that the caller can actually view that employee. This endpoint and Get Time Off Balance (`get-time-off-balance`) are gated independently, so neither one's outcome predicts the other's. A caller can receive `403` from the balance endpoint for an employee while still receiving that same employee's requests here, which has been observed for a manager viewing a direct report. Do not infer access to one endpoint from access to the other, and do not treat a result from one as evidence about the other. OAuth Scopes: time_off - :param start: Only include requests that end on or after this date. YYYY-MM-DD format. (required) + :param start: The left boundary of the search window, in YYYY-MM-DD format. Returns any request whose end date falls on or after this date — i.e., requests that are still active at the start of your window. To find all requests overlapping a date range, pass your range start here. Note: this parameter filters on each request's *end* date, not its start date. (required) :type start: date - :param end: Only include requests that start on or before this date. YYYY-MM-DD format. (required) + :param end: The right boundary of the search window, in YYYY-MM-DD format. Returns any request whose start date falls on or before this date — i.e., requests that have begun by the end of your window. To find all requests overlapping a date range, pass your range end here. Note: this parameter filters on each request's *start* date, not its end date. (required) :type end: date :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str :param id: A particular request ID to limit the response to. - :type id: int + :type id: str :param action: Limit to requests the caller can `view`, requests they can `approve`, or only their own requests via `myRequests`. Defaults to `view`. :type action: str - :param employee_id: A particular employee ID to limit the response to. - :type employee_id: int + :param employee_id: A particular internal employee ID to limit the response to. + :type employee_id: str :param type: A comma-separated list of time off type IDs to filter by. If omitted, requests of all types are included. :type type: str :param status: A comma-separated list of request status values to filter by. Accepted values are approved, denied, superceded, requested, and canceled. If omitted, requests of all statuses are included. @@ -2986,7 +2751,7 @@ def list_time_off_requests_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_time_off_requests_serialize( start=start, @@ -3001,21 +2766,17 @@ def list_time_off_requests_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeOffRequest1]", - '400': None, - '401': None, + _response_types_map: dict[str, str | None] = { + "200": "List[TimeOffRequest1]", + "400": None, + "401": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_time_off_requests_serialize( self, start, @@ -3035,96 +2796,63 @@ def _list_time_off_requests_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters if id is not None: - - _query_params.append(('id', id)) - + _query_params.append(("id", id)) + if action is not None: - - _query_params.append(('action', action)) - + _query_params.append(("action", action)) + if employee_id is not None: - - _query_params.append(('employeeId', employee_id)) - + _query_params.append(("employeeId", employee_id)) + if start is not None: if isinstance(start, date): - _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.date_format - ) - ) - ) + _query_params.append(("start", start.strftime(self.api_client.configuration.date_format))) else: - _query_params.append(('start', start)) - + _query_params.append(("start", start)) + if end is not None: if isinstance(end, date): - _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.date_format - ) - ) - ) + _query_params.append(("end", end.strftime(self.api_client.configuration.date_format))) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + if type is not None: - - _query_params.append(('type', type)) - + _query_params.append(("type", type)) + if status is not None: - - _query_params.append(('status', status)) - + _query_params.append(("status", status)) + if exclude_note is not None: - - _query_params.append(('excludeNote', exclude_note)) - + _query_params.append(("excludeNote", exclude_note)) + # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/time_off/requests', + method="GET", + resource_path="/api/v1/time_off/requests", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3134,33 +2862,32 @@ def _list_time_off_requests_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_time_off_types( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - mode: Annotated[Optional[StrictStr], Field(description="Set to `request` to limit the results to time off types the authenticated employee can request.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + mode: Annotated[ + StrictStr | None, + Field( + description="Set to `request` to limit the results to time off types the authenticated employee can request." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TimeOffTypesAndDefaultHours: """List Time Off Types - Returns active time off types for the company along with the company's default hours-per-day schedule. Pass `mode=request` to filter to only types the authenticated employee has permission to request. + Lists the company's active time off types — PTO options, vacation, sick leave, and other time off categories — along with the company's default hours-per-day schedule. Pass `mode=request` to filter to only types the authenticated employee has permission to request. Time off type names are company-configured labels; common terms like \"PTO\" may not appear verbatim and may be expressed as \"Vacation\" or another company-specific name. The returned list is also permission-filtered: an admin caller may see types (e.g., \"Sick\") that a non-admin caller does not, so the set available for a given user depends on the caller's role. If a user's term does not exactly match a returned type name, present the available types as options rather than choosing one heuristically. OAuth Scopes: time_off :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -3186,7 +2913,7 @@ def list_time_off_types( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_time_off_types_serialize( accept_header_parameter=accept_header_parameter, @@ -3194,45 +2921,43 @@ def list_time_off_types( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeOffTypesAndDefaultHours", - '401': None, + _response_types_map: dict[str, str | None] = { + "200": "TimeOffTypesAndDefaultHours", + "401": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_time_off_types_with_http_info( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - mode: Annotated[Optional[StrictStr], Field(description="Set to `request` to limit the results to time off types the authenticated employee can request.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + mode: Annotated[ + StrictStr | None, + Field( + description="Set to `request` to limit the results to time off types the authenticated employee can request." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TimeOffTypesAndDefaultHours]: """List Time Off Types - Returns active time off types for the company along with the company's default hours-per-day schedule. Pass `mode=request` to filter to only types the authenticated employee has permission to request. + Lists the company's active time off types — PTO options, vacation, sick leave, and other time off categories — along with the company's default hours-per-day schedule. Pass `mode=request` to filter to only types the authenticated employee has permission to request. Time off type names are company-configured labels; common terms like \"PTO\" may not appear verbatim and may be expressed as \"Vacation\" or another company-specific name. The returned list is also permission-filtered: an admin caller may see types (e.g., \"Sick\") that a non-admin caller does not, so the set available for a given user depends on the caller's role. If a user's term does not exactly match a returned type name, present the available types as options rather than choosing one heuristically. OAuth Scopes: time_off :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -3258,7 +2983,7 @@ def list_time_off_types_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_time_off_types_serialize( accept_header_parameter=accept_header_parameter, @@ -3266,45 +2991,43 @@ def list_time_off_types_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeOffTypesAndDefaultHours", - '401': None, + _response_types_map: dict[str, str | None] = { + "200": "TimeOffTypesAndDefaultHours", + "401": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_time_off_types_without_preload_content( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - mode: Annotated[Optional[StrictStr], Field(description="Set to `request` to limit the results to time off types the authenticated employee can request.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + mode: Annotated[ + StrictStr | None, + Field( + description="Set to `request` to limit the results to time off types the authenticated employee can request." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Time Off Types - Returns active time off types for the company along with the company's default hours-per-day schedule. Pass `mode=request` to filter to only types the authenticated employee has permission to request. + Lists the company's active time off types — PTO options, vacation, sick leave, and other time off categories — along with the company's default hours-per-day schedule. Pass `mode=request` to filter to only types the authenticated employee has permission to request. Time off type names are company-configured labels; common terms like \"PTO\" may not appear verbatim and may be expressed as \"Vacation\" or another company-specific name. The returned list is also permission-filtered: an admin caller may see types (e.g., \"Sick\") that a non-admin caller does not, so the set available for a given user depends on the caller's role. If a user's term does not exactly match a returned type name, present the available types as options rather than choosing one heuristically. OAuth Scopes: time_off :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -3330,7 +3053,7 @@ def list_time_off_types_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_time_off_types_serialize( accept_header_parameter=accept_header_parameter, @@ -3338,20 +3061,16 @@ def list_time_off_types_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeOffTypesAndDefaultHours", - '401': None, + _response_types_map: dict[str, str | None] = { + "200": "TimeOffTypesAndDefaultHours", + "401": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_time_off_types_serialize( self, accept_header_parameter, @@ -3364,49 +3083,36 @@ def _list_time_off_types_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters if mode is not None: - - _query_params.append(('mode', mode)) - + _query_params.append(("mode", mode)) + # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/meta/time_off/types', + method="GET", + resource_path="/api/v1/meta/time_off/types", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3416,35 +3122,37 @@ def _list_time_off_types_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_whos_out( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - start: Annotated[Optional[date], Field(description="Start date in YYYY-MM-DD format. Defaults to today.")] = None, - end: Annotated[Optional[date], Field(description="End date in YYYY-MM-DD format. Defaults to 14 days after the start date.")] = None, - filter: Annotated[Optional[StrictStr], Field(description="Set to `off` to disable the Who's Out visibility filter and return the unfiltered feed. Any other value leaves filtering enabled.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + start: Annotated[date | None, Field(description="Start date in YYYY-MM-DD format. Defaults to today.")] = None, + end: Annotated[ + date | None, + Field(description="End date in YYYY-MM-DD format. Defaults to 14 days after the start date."), + ] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[WhosOutEntry]: + ) -> list[WhosOutEntry]: """List Who’s Out - Returns a date-sorted list of employees who are out and company holidays for the specified period. Defaults to today through 14 days out when dates are omitted. Results include both time off entries and holidays, each identified by type. + Returns a date-sorted list of employees who are out and company holidays for the specified period. Defaults to today through 14 days out when dates are omitted. Results include both `timeOff` entries (employee requests) and `holiday` entries, each identified by `type`. An empty array may mean no one is out, or that no holidays have been configured in the BambooHR company calendar — holidays must be set up there before they appear here. The `filter: off` parameter applies only to employee time-off entries; holidays are independently filtered per-employee based on holiday visibility settings, and that filter is not disabled by `filter: off`. OAuth Scopes: time_off :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -3452,7 +3160,7 @@ def list_whos_out( :type start: date :param end: End date in YYYY-MM-DD format. Defaults to 14 days after the start date. :type end: date - :param filter: Set to `off` to disable the Who's Out visibility filter and return the unfiltered feed. Any other value leaves filtering enabled. + :param filter: Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`. :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3474,7 +3182,7 @@ def list_whos_out( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_whos_out_serialize( accept_header_parameter=accept_header_parameter, @@ -3484,48 +3192,49 @@ def list_whos_out( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[WhosOutEntry]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[WhosOutEntry]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_whos_out_with_http_info( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - start: Annotated[Optional[date], Field(description="Start date in YYYY-MM-DD format. Defaults to today.")] = None, - end: Annotated[Optional[date], Field(description="End date in YYYY-MM-DD format. Defaults to 14 days after the start date.")] = None, - filter: Annotated[Optional[StrictStr], Field(description="Set to `off` to disable the Who's Out visibility filter and return the unfiltered feed. Any other value leaves filtering enabled.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + start: Annotated[date | None, Field(description="Start date in YYYY-MM-DD format. Defaults to today.")] = None, + end: Annotated[ + date | None, + Field(description="End date in YYYY-MM-DD format. Defaults to 14 days after the start date."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[WhosOutEntry]]: + ) -> ApiResponse[list[WhosOutEntry]]: """List Who’s Out - Returns a date-sorted list of employees who are out and company holidays for the specified period. Defaults to today through 14 days out when dates are omitted. Results include both time off entries and holidays, each identified by type. + Returns a date-sorted list of employees who are out and company holidays for the specified period. Defaults to today through 14 days out when dates are omitted. Results include both `timeOff` entries (employee requests) and `holiday` entries, each identified by `type`. An empty array may mean no one is out, or that no holidays have been configured in the BambooHR company calendar — holidays must be set up there before they appear here. The `filter: off` parameter applies only to employee time-off entries; holidays are independently filtered per-employee based on holiday visibility settings, and that filter is not disabled by `filter: off`. OAuth Scopes: time_off :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -3533,7 +3242,7 @@ def list_whos_out_with_http_info( :type start: date :param end: End date in YYYY-MM-DD format. Defaults to 14 days after the start date. :type end: date - :param filter: Set to `off` to disable the Who's Out visibility filter and return the unfiltered feed. Any other value leaves filtering enabled. + :param filter: Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`. :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3555,7 +3264,7 @@ def list_whos_out_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_whos_out_serialize( accept_header_parameter=accept_header_parameter, @@ -3565,48 +3274,49 @@ def list_whos_out_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[WhosOutEntry]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[WhosOutEntry]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_whos_out_without_preload_content( self, - accept_header_parameter: Annotated[Optional[StrictStr], Field(description="This endpoint can produce either JSON or XML.")] = None, - start: Annotated[Optional[date], Field(description="Start date in YYYY-MM-DD format. Defaults to today.")] = None, - end: Annotated[Optional[date], Field(description="End date in YYYY-MM-DD format. Defaults to 14 days after the start date.")] = None, - filter: Annotated[Optional[StrictStr], Field(description="Set to `off` to disable the Who's Out visibility filter and return the unfiltered feed. Any other value leaves filtering enabled.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + accept_header_parameter: Annotated[ + StrictStr | None, Field(description="This endpoint can produce either JSON or XML.") + ] = None, + start: Annotated[date | None, Field(description="Start date in YYYY-MM-DD format. Defaults to today.")] = None, + end: Annotated[ + date | None, + Field(description="End date in YYYY-MM-DD format. Defaults to 14 days after the start date."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + filter: Annotated[ + StrictStr | None, + Field( + description="Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Who’s Out - Returns a date-sorted list of employees who are out and company holidays for the specified period. Defaults to today through 14 days out when dates are omitted. Results include both time off entries and holidays, each identified by type. + Returns a date-sorted list of employees who are out and company holidays for the specified period. Defaults to today through 14 days out when dates are omitted. Results include both `timeOff` entries (employee requests) and `holiday` entries, each identified by `type`. An empty array may mean no one is out, or that no holidays have been configured in the BambooHR company calendar — holidays must be set up there before they appear here. The `filter: off` parameter applies only to employee time-off entries; holidays are independently filtered per-employee based on holiday visibility settings, and that filter is not disabled by `filter: off`. OAuth Scopes: time_off :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -3614,7 +3324,7 @@ def list_whos_out_without_preload_content( :type start: date :param end: End date in YYYY-MM-DD format. Defaults to 14 days after the start date. :type end: date - :param filter: Set to `off` to disable the Who's Out visibility filter and return the unfiltered feed. Any other value leaves filtering enabled. + :param filter: Controls the Who's Out calendar filter. By default (parameter omitted), results are limited to the set of employees defined by the authenticated user's saved Who's Out calendar filter (the same filter applied to their in-app Who's Out view). A user with no filter configured sees all employees; a user with a saved filter (e.g. by department, location, division) sees only the configured subset. Set to `off` to ignore the saved filter and return employee time-off entries for everyone — useful for admins or integrations that need the complete company-wide view, or to diagnose whether incomplete results are caused by the saved filter. Note: this parameter applies to employee `timeOff` entries only. `holiday` entries are filtered separately on a per-employee basis (holidays can be configured as visible to specific employees) and that filter is not affected by `filter: off`. :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3636,7 +3346,7 @@ def list_whos_out_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_whos_out_serialize( accept_header_parameter=accept_header_parameter, @@ -3646,21 +3356,17 @@ def list_whos_out_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[WhosOutEntry]", - '401': None, - '403': None, + _response_types_map: dict[str, str | None] = { + "200": "List[WhosOutEntry]", + "401": None, + "403": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_whos_out_serialize( self, accept_header_parameter, @@ -3675,76 +3381,48 @@ def _list_whos_out_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters if start is not None: if isinstance(start, date): - _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.date_format - ) - ) - ) + _query_params.append(("start", start.strftime(self.api_client.configuration.date_format))) else: - _query_params.append(('start', start)) - + _query_params.append(("start", start)) + if end is not None: if isinstance(end, date): - _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.date_format - ) - ) - ) + _query_params.append(("end", end.strftime(self.api_client.configuration.date_format))) else: - _query_params.append(('end', end)) - + _query_params.append(("end", end)) + if filter is not None: - - _query_params.append(('filter', filter)) - + _query_params.append(("filter", filter)) + # process the header parameters if accept_header_parameter is not None: - _header_params['AcceptHeaderParameter'] = accept_header_parameter + _header_params["AcceptHeaderParameter"] = accept_header_parameter # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'application/xml' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "application/xml"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/time_off/whos_out', + method="GET", + resource_path="/api/v1/time_off/whos_out", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3754,36 +3432,435 @@ def _list_whos_out_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, + ) + + @validate_call + def list_whos_out_v1( + self, + start: Annotated[ + date, Field(description="Inclusive start date (YYYY-MM-DD). Interpreted in the company timezone.") + ], + end: Annotated[ + date | None, + Field( + description="Inclusive end date (YYYY-MM-DD). Must be on or after start; the range may not exceed 366 days." + ), + ], + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to who's out results. Supported operators: `eq` (equals), `in` (value in list), `and` (combine clauses). Filterable fields: `employeeId` (int), `department` (int), `division` (int), `location` (int). Examples: `employeeId eq 42`, `department in (10, 20) and location eq 5`." + ), + ] = None, + direct_reports_only: Annotated[ + StrictBool | None, + Field( + description="When true, restrict to time off for the caller's direct reports. Callers with no direct reports receive an empty result." + ), + ] = None, + include_persons: Annotated[ + StrictBool | None, + Field(description="When true, embed a persons map of employee display data alongside results."), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page number to retrieve.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of items to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WhosOutListResponseV1: + """List Who's Out + + Lists approved time off occurrences overlapping the requested date range, scoped to employees the caller can see. Results the caller lacks permission to view are silently excluded. Dates are interpreted in the company timezone. Results are sorted by start date ascending, then id ascending. OAuth Scopes: time_off + + :param start: Inclusive start date (YYYY-MM-DD). Interpreted in the company timezone. (required) + :type start: date + :param end: Inclusive end date (YYYY-MM-DD). Must be on or after start; the range may not exceed 366 days. (required) + :type end: date + :param filter: OData filter expression applied to who's out results. Supported operators: `eq` (equals), `in` (value in list), `and` (combine clauses). Filterable fields: `employeeId` (int), `department` (int), `division` (int), `location` (int). Examples: `employeeId eq 42`, `department in (10, 20) and location eq 5`. + :type filter: str + :param direct_reports_only: When true, restrict to time off for the caller's direct reports. Callers with no direct reports receive an empty result. + :type direct_reports_only: bool + :param include_persons: When true, embed a persons map of employee display data alongside results. + :type include_persons: bool + :param page: The page number to retrieve. + :type page: int + :param page_size: The number of items to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_whos_out_v1_serialize( + start=start, + end=end, + filter=filter, + direct_reports_only=direct_reports_only, + include_persons=include_persons, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, ) + _response_types_map: dict[str, str | None] = { + "200": "WhosOutListResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + @validate_call + def list_whos_out_v1_with_http_info( + self, + start: Annotated[ + date, Field(description="Inclusive start date (YYYY-MM-DD). Interpreted in the company timezone.") + ], + end: Annotated[ + date | None, + Field( + description="Inclusive end date (YYYY-MM-DD). Must be on or after start; the range may not exceed 366 days." + ), + ], + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to who's out results. Supported operators: `eq` (equals), `in` (value in list), `and` (combine clauses). Filterable fields: `employeeId` (int), `department` (int), `division` (int), `location` (int). Examples: `employeeId eq 42`, `department in (10, 20) and location eq 5`." + ), + ] = None, + direct_reports_only: Annotated[ + StrictBool | None, + Field( + description="When true, restrict to time off for the caller's direct reports. Callers with no direct reports receive an empty result." + ), + ] = None, + include_persons: Annotated[ + StrictBool | None, + Field(description="When true, embed a persons map of employee display data alongside results."), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page number to retrieve.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of items to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WhosOutListResponseV1]: + """List Who's Out + Lists approved time off occurrences overlapping the requested date range, scoped to employees the caller can see. Results the caller lacks permission to view are silently excluded. Dates are interpreted in the company timezone. Results are sorted by start date ascending, then id ascending. OAuth Scopes: time_off + + :param start: Inclusive start date (YYYY-MM-DD). Interpreted in the company timezone. (required) + :type start: date + :param end: Inclusive end date (YYYY-MM-DD). Must be on or after start; the range may not exceed 366 days. (required) + :type end: date + :param filter: OData filter expression applied to who's out results. Supported operators: `eq` (equals), `in` (value in list), `and` (combine clauses). Filterable fields: `employeeId` (int), `department` (int), `division` (int), `location` (int). Examples: `employeeId eq 42`, `department in (10, 20) and location eq 5`. + :type filter: str + :param direct_reports_only: When true, restrict to time off for the caller's direct reports. Callers with no direct reports receive an empty result. + :type direct_reports_only: bool + :param include_persons: When true, embed a persons map of employee display data alongside results. + :type include_persons: bool + :param page: The page number to retrieve. + :type page: int + :param page_size: The number of items to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_whos_out_v1_serialize( + start=start, + end=end, + filter=filter, + direct_reports_only=direct_reports_only, + include_persons=include_persons, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "WhosOutListResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_whos_out_v1_without_preload_content( + self, + start: Annotated[ + date, Field(description="Inclusive start date (YYYY-MM-DD). Interpreted in the company timezone.") + ], + end: Annotated[ + date | None, + Field( + description="Inclusive end date (YYYY-MM-DD). Must be on or after start; the range may not exceed 366 days." + ), + ], + filter: Annotated[ + StrictStr | None, + Field( + description="OData filter expression applied to who's out results. Supported operators: `eq` (equals), `in` (value in list), `and` (combine clauses). Filterable fields: `employeeId` (int), `department` (int), `division` (int), `location` (int). Examples: `employeeId eq 42`, `department in (10, 20) and location eq 5`." + ), + ] = None, + direct_reports_only: Annotated[ + StrictBool | None, + Field( + description="When true, restrict to time off for the caller's direct reports. Callers with no direct reports receive an empty result." + ), + ] = None, + include_persons: Annotated[ + StrictBool | None, + Field(description="When true, embed a persons map of employee display data alongside results."), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page number to retrieve.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of items to return per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Who's Out + + Lists approved time off occurrences overlapping the requested date range, scoped to employees the caller can see. Results the caller lacks permission to view are silently excluded. Dates are interpreted in the company timezone. Results are sorted by start date ascending, then id ascending. OAuth Scopes: time_off + + :param start: Inclusive start date (YYYY-MM-DD). Interpreted in the company timezone. (required) + :type start: date + :param end: Inclusive end date (YYYY-MM-DD). Must be on or after start; the range may not exceed 366 days. (required) + :type end: date + :param filter: OData filter expression applied to who's out results. Supported operators: `eq` (equals), `in` (value in list), `and` (combine clauses). Filterable fields: `employeeId` (int), `department` (int), `division` (int), `location` (int). Examples: `employeeId eq 42`, `department in (10, 20) and location eq 5`. + :type filter: str + :param direct_reports_only: When true, restrict to time off for the caller's direct reports. Callers with no direct reports receive an empty result. + :type direct_reports_only: bool + :param include_persons: When true, embed a persons map of employee display data alongside results. + :type include_persons: bool + :param page: The page number to retrieve. + :type page: int + :param page_size: The number of items to return per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_whos_out_v1_serialize( + start=start, + end=end, + filter=filter, + direct_reports_only=direct_reports_only, + include_persons=include_persons, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "WhosOutListResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_whos_out_v1_serialize( + self, + start, + end, + filter, + direct_reports_only, + include_persons, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if start is not None: + if isinstance(start, date): + _query_params.append(("start", start.strftime(self.api_client.configuration.date_format))) + else: + _query_params.append(("start", start)) + + if end is not None: + if isinstance(end, date): + _query_params.append(("end", end.strftime(self.api_client.configuration.date_format))) + else: + _query_params.append(("end", end)) + + if filter is not None: + _query_params.append(("filter", filter)) + + if direct_reports_only is not None: + _query_params.append(("directReportsOnly", direct_reports_only)) + + if include_persons is not None: + _query_params.append(("includePersons", include_persons)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/whos-out", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) @validate_call def update_time_off_request_status( self, - request_id: Annotated[StrictInt, Field(description="The ID of the time off request to update.")], + request_id: Annotated[StrictStr | None, Field(description="The ID of the time off request to update.")], request: Request, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Update Time Off Request Status + ) -> object: + """(Deprecated) Update Time Off Request Status - Updates the status of an existing time off request. Valid statuses are `approved`, `denied` (or `declined`), and `canceled`. Owner/admins can approve out of turn by completing all workflow steps at once; other approvers complete only their current step. + Updates the status of an existing time off request. Valid statuses are `approved`, `denied` (or `declined`), and `canceled`. Owner/admins can approve out of turn by completing all workflow steps at once; other approvers complete only their current step. Deprecated: use the approvals, denials, or cancellations process resources under /api/v1/time-off/requests/{id} instead. OAuth Scopes: time_off.write :param request_id: The ID of the time off request to update. (required) - :type request_id: int + :type request_id: str :param request: (required) :type request: Request :param _request_timeout: timeout setting for this request. If one @@ -3806,7 +3883,8 @@ def update_time_off_request_status( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("PUT /api/v1/time_off/requests/{requestId}/status is deprecated.", DeprecationWarning) _param = self._update_time_off_request_status_serialize( request_id=request_id, @@ -3814,52 +3892,42 @@ def update_time_off_request_status( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "object", + "400": None, + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call def update_time_off_request_status_with_http_info( self, - request_id: Annotated[StrictInt, Field(description="The ID of the time off request to update.")], + request_id: Annotated[StrictStr | None, Field(description="The ID of the time off request to update.")], request: Request, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Update Time Off Request Status + ) -> ApiResponse[object]: + """(Deprecated) Update Time Off Request Status - Updates the status of an existing time off request. Valid statuses are `approved`, `denied` (or `declined`), and `canceled`. Owner/admins can approve out of turn by completing all workflow steps at once; other approvers complete only their current step. + Updates the status of an existing time off request. Valid statuses are `approved`, `denied` (or `declined`), and `canceled`. Owner/admins can approve out of turn by completing all workflow steps at once; other approvers complete only their current step. Deprecated: use the approvals, denials, or cancellations process resources under /api/v1/time-off/requests/{id} instead. OAuth Scopes: time_off.write :param request_id: The ID of the time off request to update. (required) - :type request_id: int + :type request_id: str :param request: (required) :type request: Request :param _request_timeout: timeout setting for this request. If one @@ -3882,7 +3950,8 @@ def update_time_off_request_status_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("PUT /api/v1/time_off/requests/{requestId}/status is deprecated.", DeprecationWarning) _param = self._update_time_off_request_status_serialize( request_id=request_id, @@ -3890,51 +3959,42 @@ def update_time_off_request_status_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "object", + "400": None, + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_time_off_request_status_without_preload_content( self, - request_id: Annotated[StrictInt, Field(description="The ID of the time off request to update.")], + request_id: Annotated[StrictStr | None, Field(description="The ID of the time off request to update.")], request: Request, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Time Off Request Status + """(Deprecated) Update Time Off Request Status - Updates the status of an existing time off request. Valid statuses are `approved`, `denied` (or `declined`), and `canceled`. Owner/admins can approve out of turn by completing all workflow steps at once; other approvers complete only their current step. + Updates the status of an existing time off request. Valid statuses are `approved`, `denied` (or `declined`), and `canceled`. Owner/admins can approve out of turn by completing all workflow steps at once; other approvers complete only their current step. Deprecated: use the approvals, denials, or cancellations process resources under /api/v1/time-off/requests/{id} instead. OAuth Scopes: time_off.write :param request_id: The ID of the time off request to update. (required) - :type request_id: int + :type request_id: str :param request: (required) :type request: Request :param _request_timeout: timeout setting for this request. If one @@ -3957,7 +4017,8 @@ def update_time_off_request_status_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("PUT /api/v1/time_off/requests/{requestId}/status is deprecated.", DeprecationWarning) _param = self._update_time_off_request_status_serialize( request_id=request_id, @@ -3965,23 +4026,19 @@ def update_time_off_request_status_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '403': None, - '404': None, + _response_types_map: dict[str, str | None] = { + "200": "object", + "400": None, + "401": None, + "403": None, + "404": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_time_off_request_status_serialize( self, request_id, @@ -3994,21 +4051,18 @@ def _update_time_off_request_status_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if request_id is not None: - _path_params['requestId'] = request_id + _path_params["requestId"] = request_id # process the query parameters # process the header parameters # process the form parameters @@ -4016,39 +4070,24 @@ def _update_time_off_request_status_serialize( if request is not None: _body_params = request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'application/xml' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json", "application/xml"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/time_off/requests/{requestId}/status', + method="PUT", + resource_path="/api/v1/time_off/requests/{requestId}/status", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4058,7 +4097,5 @@ def _update_time_off_request_status_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/time_tracking_api.py b/bamboohr_sdk/api/time_tracking_api.py index fe90265..fc76f96 100644 --- a/bamboohr_sdk/api/time_tracking_api.py +++ b/bamboohr_sdk/api/time_tracking_api.py @@ -1,56 +1,110 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - from datetime import date -from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import List, Optional -from typing_extensions import Annotated +from typing import Annotated, Any from uuid import UUID -from bamboohr_sdk.models.assign_employees_to_break_policy_request import AssignEmployeesToBreakPolicyRequest + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.approve_timesheet_request import ApproveTimesheetRequest from bamboohr_sdk.models.clock_entries_schema import ClockEntriesSchema +from bamboohr_sdk.models.clock_entry_create_clock_entry_v1 import ClockEntryCreateClockEntryV1 from bamboohr_sdk.models.clock_entry_ids_schema import ClockEntryIdsSchema from bamboohr_sdk.models.clock_in_request_schema import ClockInRequestSchema from bamboohr_sdk.models.clock_out_request_schema import ClockOutRequestSchema from bamboohr_sdk.models.employee_timesheet_entry_transformer import EmployeeTimesheetEntryTransformer from bamboohr_sdk.models.hour_entries_request_schema import HourEntriesRequestSchema +from bamboohr_sdk.models.hour_entry_create_hour_entry_v1 import HourEntryCreateHourEntryV1 from bamboohr_sdk.models.hour_entry_ids_schema import HourEntryIdsSchema +from bamboohr_sdk.models.hour_entry_patch_hour_entry_v1 import HourEntryPatchHourEntryV1 from bamboohr_sdk.models.project_create_request_schema import ProjectCreateRequestSchema -from bamboohr_sdk.models.set_break_policy_employees_request import SetBreakPolicyEmployeesRequest -from bamboohr_sdk.models.time_tracking_create_or_update_time_tracking_break_without_policy_v1 import TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1 -from bamboohr_sdk.models.time_tracking_create_time_tracking_break_policy_v1 import TimeTrackingCreateTimeTrackingBreakPolicyV1 -from bamboohr_sdk.models.time_tracking_create_time_tracking_break_v1 import TimeTrackingCreateTimeTrackingBreakV1 -from bamboohr_sdk.models.time_tracking_paginated_break_assessments_response_v1 import TimeTrackingPaginatedBreakAssessmentsResponseV1 -from bamboohr_sdk.models.time_tracking_paginated_break_policies_response_v1 import TimeTrackingPaginatedBreakPoliciesResponseV1 -from bamboohr_sdk.models.time_tracking_paginated_break_policy_employees_response_v1 import TimeTrackingPaginatedBreakPolicyEmployeesResponseV1 -from bamboohr_sdk.models.time_tracking_paginated_breaks_response_v1 import TimeTrackingPaginatedBreaksResponseV1 -from bamboohr_sdk.models.time_tracking_project_with_tasks_and_employee_ids import TimeTrackingProjectWithTasksAndEmployeeIds -from bamboohr_sdk.models.time_tracking_sync_time_tracking_break_policy_v1 import TimeTrackingSyncTimeTrackingBreakPolicyV1 -from bamboohr_sdk.models.time_tracking_time_tracking_break_availability_v1 import TimeTrackingTimeTrackingBreakAvailabilityV1 -from bamboohr_sdk.models.time_tracking_time_tracking_break_policy_v1 import TimeTrackingTimeTrackingBreakPolicyV1 -from bamboohr_sdk.models.time_tracking_time_tracking_break_policy_with_relations_v1 import TimeTrackingTimeTrackingBreakPolicyWithRelationsV1 -from bamboohr_sdk.models.time_tracking_time_tracking_break_v1 import TimeTrackingTimeTrackingBreakV1 -from bamboohr_sdk.models.time_tracking_update_time_tracking_break_policy_v1 import TimeTrackingUpdateTimeTrackingBreakPolicyV1 -from bamboohr_sdk.models.time_tracking_update_time_tracking_break_v1 import TimeTrackingUpdateTimeTrackingBreakV1 +from bamboohr_sdk.models.project_create_time_tracking_project_task_v1 import ProjectCreateTimeTrackingProjectTaskV1 +from bamboohr_sdk.models.project_create_time_tracking_project_v1 import ProjectCreateTimeTrackingProjectV1 +from bamboohr_sdk.models.project_paginated_tasks_response_v1 import ProjectPaginatedTasksResponseV1 +from bamboohr_sdk.models.project_paginated_time_tracking_projects_response_v1 import ( + ProjectPaginatedTimeTrackingProjectsResponseV1, +) +from bamboohr_sdk.models.project_time_tracking_project_v1 import ProjectTimeTrackingProjectV1 +from bamboohr_sdk.models.project_time_tracking_task_v1 import ProjectTimeTrackingTaskV1 +from bamboohr_sdk.models.project_update_time_tracking_project_task_v1 import ProjectUpdateTimeTrackingProjectTaskV1 +from bamboohr_sdk.models.project_update_time_tracking_project_v1 import ProjectUpdateTimeTrackingProjectV1 +from bamboohr_sdk.models.shift_differential_create_time_tracking_shift_differential_v1 import ( + ShiftDifferentialCreateTimeTrackingShiftDifferentialV1, +) +from bamboohr_sdk.models.shift_differential_paginated_time_tracking_shift_differentials_response_v1 import ( + ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1, +) +from bamboohr_sdk.models.shift_differential_time_tracking_shift_differential_v1 import ( + ShiftDifferentialTimeTrackingShiftDifferentialV1, +) +from bamboohr_sdk.models.shift_differential_update_time_tracking_shift_differential_v1 import ( + ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1, +) +from bamboohr_sdk.models.time_tracking_bulk_upsert_employee_time_tracking_data_accepted_v1 import ( + TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1, +) +from bamboohr_sdk.models.time_tracking_bulk_upsert_employee_time_tracking_data_record_v1 import ( + TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1, +) +from bamboohr_sdk.models.time_tracking_clock_entry_v1 import TimeTrackingClockEntryV1 +from bamboohr_sdk.models.time_tracking_create_clock_in_v1 import TimeTrackingCreateClockInV1 +from bamboohr_sdk.models.time_tracking_create_clock_out_v1 import TimeTrackingCreateClockOutV1 +from bamboohr_sdk.models.time_tracking_create_time_tracking_configuration_v1 import ( + TimeTrackingCreateTimeTrackingConfigurationV1, +) +from bamboohr_sdk.models.time_tracking_employee_time_tracking_data_v1 import TimeTrackingEmployeeTimeTrackingDataV1 +from bamboohr_sdk.models.time_tracking_hour_entry_v1 import TimeTrackingHourEntryV1 +from bamboohr_sdk.models.time_tracking_paginated_clock_entries_response_v1 import ( + TimeTrackingPaginatedClockEntriesResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_employee_time_tracking_data_response_v1 import ( + TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_hour_entries_response_v1 import ( + TimeTrackingPaginatedHourEntriesResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_time_tracking_configurations_response_v1 import ( + TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_time_tracking_kiosks_response_v1 import ( + TimeTrackingPaginatedTimeTrackingKiosksResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_time_tracking_time_clocks_response_v1 import ( + TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_timesheets_response_v1 import TimeTrackingPaginatedTimesheetsResponseV1 +from bamboohr_sdk.models.time_tracking_project_with_tasks_and_employee_ids import ( + TimeTrackingProjectWithTasksAndEmployeeIds, +) +from bamboohr_sdk.models.time_tracking_time_tracking_configuration_v1 import TimeTrackingTimeTrackingConfigurationV1 +from bamboohr_sdk.models.time_tracking_time_tracking_kiosk_v1 import TimeTrackingTimeTrackingKioskV1 +from bamboohr_sdk.models.time_tracking_time_tracking_time_clock_v1 import TimeTrackingTimeTrackingTimeClockV1 +from bamboohr_sdk.models.time_tracking_timesheet_v1 import TimeTrackingTimesheetV1 +from bamboohr_sdk.models.time_tracking_update_clock_entry_v1 import TimeTrackingUpdateClockEntryV1 +from bamboohr_sdk.models.time_tracking_update_employee_time_tracking_data_v1 import ( + TimeTrackingUpdateEmployeeTimeTrackingDataV1, +) +from bamboohr_sdk.models.time_tracking_update_time_tracking_configuration_v1 import ( + TimeTrackingUpdateTimeTrackingConfigurationV1, +) +from bamboohr_sdk.models.time_tracking_update_time_tracking_kiosk_v1 import TimeTrackingUpdateTimeTrackingKioskV1 +from bamboohr_sdk.models.time_tracking_update_time_tracking_time_clock_v1 import ( + TimeTrackingUpdateTimeTrackingTimeClockV1, +) from bamboohr_sdk.models.timesheet_entry_info_api_transformer import TimesheetEntryInfoApiTransformer -from bamboohr_sdk.models.unassign_employees_from_break_policy_request import UnassignEmployeesFromBreakPolicyRequest - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.timesheet_timesheet_daily_summary_v1 import TimesheetTimesheetDailySummaryV1 from bamboohr_sdk.rest import RESTResponseType @@ -66,33 +120,24 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call - def assign_employees_to_break_policy( + def approve_timesheet( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - assign_employees_to_break_policy_request: AssignEmployeesToBreakPolicyRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + approve_timesheet_request: ApproveTimesheetRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Assign Employees to Break Policy + ) -> TimeTrackingTimesheetV1: + """Approve Timesheet - Assigns employees to a break policy. Adds the specified employees to the policy without removing existing assignments. + Approves a timesheet (process resource). Only a timesheet whose derived `status` is `PENDING_APPROVAL` can be approved; approving an already-approved or not-yet-open timesheet returns 409. Returns the updated timesheet with `status` `APPROVED`. OAuth Scopes: time_tracking:timesheets.write - :param id: The break policy ID. (required) - :type id: str - :param assign_employees_to_break_policy_request: (required) - :type assign_employees_to_break_policy_request: AssignEmployeesToBreakPolicyRequest + :param approve_timesheet_request: (required) + :type approve_timesheet_request: ApproveTimesheetRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -113,62 +158,50 @@ def assign_employees_to_break_policy( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._assign_employees_to_break_policy_serialize( - id=id, - assign_employees_to_break_policy_request=assign_employees_to_break_policy_request, + _param = self._approve_timesheet_serialize( + approve_timesheet_request=approve_timesheet_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimesheetV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call - def assign_employees_to_break_policy_with_http_info( + def approve_timesheet_with_http_info( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - assign_employees_to_break_policy_request: AssignEmployeesToBreakPolicyRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + approve_timesheet_request: ApproveTimesheetRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Assign Employees to Break Policy + ) -> ApiResponse[TimeTrackingTimesheetV1]: + """Approve Timesheet - Assigns employees to a break policy. Adds the specified employees to the policy without removing existing assignments. + Approves a timesheet (process resource). Only a timesheet whose derived `status` is `PENDING_APPROVAL` can be approved; approving an already-approved or not-yet-open timesheet returns 409. Returns the updated timesheet with `status` `APPROVED`. OAuth Scopes: time_tracking:timesheets.write - :param id: The break policy ID. (required) - :type id: str - :param assign_employees_to_break_policy_request: (required) - :type assign_employees_to_break_policy_request: AssignEmployeesToBreakPolicyRequest + :param approve_timesheet_request: (required) + :type approve_timesheet_request: ApproveTimesheetRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -189,61 +222,50 @@ def assign_employees_to_break_policy_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._assign_employees_to_break_policy_serialize( - id=id, - assign_employees_to_break_policy_request=assign_employees_to_break_policy_request, + _param = self._approve_timesheet_serialize( + approve_timesheet_request=approve_timesheet_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimesheetV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def assign_employees_to_break_policy_without_preload_content( + def approve_timesheet_without_preload_content( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - assign_employees_to_break_policy_request: AssignEmployeesToBreakPolicyRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + approve_timesheet_request: ApproveTimesheetRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Assign Employees to Break Policy + """Approve Timesheet - Assigns employees to a break policy. Adds the specified employees to the policy without removing existing assignments. + Approves a timesheet (process resource). Only a timesheet whose derived `status` is `PENDING_APPROVAL` can be approved; approving an already-approved or not-yet-open timesheet returns 409. Returns the updated timesheet with `status` `APPROVED`. OAuth Scopes: time_tracking:timesheets.write - :param id: The break policy ID. (required) - :type id: str - :param assign_employees_to_break_policy_request: (required) - :type assign_employees_to_break_policy_request: AssignEmployeesToBreakPolicyRequest + :param approve_timesheet_request: (required) + :type approve_timesheet_request: ApproveTimesheetRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -264,35 +286,31 @@ def assign_employees_to_break_policy_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._assign_employees_to_break_policy_serialize( - id=id, - assign_employees_to_break_policy_request=assign_employees_to_break_policy_request, + _param = self._approve_timesheet_serialize( + approve_timesheet_request=approve_timesheet_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimesheetV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _assign_employees_to_break_policy_serialize( + def _approve_timesheet_serialize( self, - id, - assign_employees_to_break_policy_request, + approve_timesheet_request, _request_auth, _content_type, _headers, @@ -301,60 +319,41 @@ def _assign_employees_to_break_policy_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if assign_employees_to_break_policy_request is not None: - _body_params = assign_employees_to_break_policy_request - + if approve_timesheet_request is not None: + _body_params = approve_timesheet_request # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/time-tracking/break-policies/{id}/assign', + method="POST", + resource_path="/api/v1/time-tracking/timesheet-approvals", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -364,38 +363,45 @@ def _assign_employees_to_break_policy_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def create_break( + def bulk_upsert_time_tracking_employee_enrollments( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - time_tracking_create_time_tracking_break_v1: TimeTrackingCreateTimeTrackingBreakV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + time_tracking_bulk_upsert_employee_time_tracking_data_record_v1: Annotated[ + list[TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1], Field(min_length=1, max_length=1000) + ], + idempotency_key: Annotated[ + StrictStr | None, + Field( + description="Optional client-supplied key for safe retries. Replaying the same key with the same body and the same `atomic` mode returns the original response; reusing it with either changed is a conflict." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + atomic: Annotated[ + StrictBool | None, + Field( + description="When true, the whole batch is committed as a single transaction and any per-record failure returns 422 with nothing applied. Defaults to false, which keeps the successful records and silently drops the failing ones." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingTimeTrackingBreakV1: - """Create Break + ) -> TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1: + """Bulk Upsert Employee Enrollments - Creates a new break and associates it with the specified break policy. + Bulk enables, disables, or reassigns employee enrollments. The body is a top-level JSON array of between 1 and 1000 upsert records; each record requires `employeeId` and applies the same merge-patch semantics as the single-employee PATCH. Request-level validation (payload shape, record cap, missing `employeeId`) runs synchronously; the records themselves are applied asynchronously, so the response is 202 with a `requestId` for log correlation rather than the resulting enrollments. Confirm the final state by reading the enrollments back through `GET /api/v1/time-tracking/employees`. Per-record processing errors, such as an unknown `employeeId` or `configurationId`, do not surface in the response. Send `atomic=true` to commit the whole batch as one unit instead, in which case any per-record failure aborts the batch and returns 422 with nothing applied. OAuth Scopes: time_tracking:employees.write - :param id: The break policy ID. (required) - :type id: str - :param time_tracking_create_time_tracking_break_v1: (required) - :type time_tracking_create_time_tracking_break_v1: TimeTrackingCreateTimeTrackingBreakV1 + :param time_tracking_bulk_upsert_employee_time_tracking_data_record_v1: (required) + :type time_tracking_bulk_upsert_employee_time_tracking_data_record_v1: List[TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1] + :param idempotency_key: Optional client-supplied key for safe retries. Replaying the same key with the same body and the same `atomic` mode returns the original response; reusing it with either changed is a conflict. + :type idempotency_key: str + :param atomic: When true, the whole batch is committed as a single transaction and any per-record failure returns 422 with nothing applied. Defaults to false, which keeps the successful records and silently drops the failing ones. + :type atomic: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -416,59 +422,69 @@ def create_break( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_break_serialize( - id=id, - time_tracking_create_time_tracking_break_v1=time_tracking_create_time_tracking_break_v1, + _param = self._bulk_upsert_time_tracking_employee_enrollments_serialize( + time_tracking_bulk_upsert_employee_time_tracking_data_record_v1=time_tracking_bulk_upsert_employee_time_tracking_data_record_v1, + idempotency_key=idempotency_key, + atomic=atomic, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingTimeTrackingBreakV1", - '422': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "202": "TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def create_break_with_http_info( + def bulk_upsert_time_tracking_employee_enrollments_with_http_info( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - time_tracking_create_time_tracking_break_v1: TimeTrackingCreateTimeTrackingBreakV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + time_tracking_bulk_upsert_employee_time_tracking_data_record_v1: Annotated[ + list[TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1], Field(min_length=1, max_length=1000) + ], + idempotency_key: Annotated[ + StrictStr | None, + Field( + description="Optional client-supplied key for safe retries. Replaying the same key with the same body and the same `atomic` mode returns the original response; reusing it with either changed is a conflict." + ), + ] = None, + atomic: Annotated[ + StrictBool | None, + Field( + description="When true, the whole batch is committed as a single transaction and any per-record failure returns 422 with nothing applied. Defaults to false, which keeps the successful records and silently drops the failing ones." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingTimeTrackingBreakV1]: - """Create Break + ) -> ApiResponse[TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1]: + """Bulk Upsert Employee Enrollments - Creates a new break and associates it with the specified break policy. + Bulk enables, disables, or reassigns employee enrollments. The body is a top-level JSON array of between 1 and 1000 upsert records; each record requires `employeeId` and applies the same merge-patch semantics as the single-employee PATCH. Request-level validation (payload shape, record cap, missing `employeeId`) runs synchronously; the records themselves are applied asynchronously, so the response is 202 with a `requestId` for log correlation rather than the resulting enrollments. Confirm the final state by reading the enrollments back through `GET /api/v1/time-tracking/employees`. Per-record processing errors, such as an unknown `employeeId` or `configurationId`, do not surface in the response. Send `atomic=true` to commit the whole batch as one unit instead, in which case any per-record failure aborts the batch and returns 422 with nothing applied. OAuth Scopes: time_tracking:employees.write - :param id: The break policy ID. (required) - :type id: str - :param time_tracking_create_time_tracking_break_v1: (required) - :type time_tracking_create_time_tracking_break_v1: TimeTrackingCreateTimeTrackingBreakV1 + :param time_tracking_bulk_upsert_employee_time_tracking_data_record_v1: (required) + :type time_tracking_bulk_upsert_employee_time_tracking_data_record_v1: List[TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1] + :param idempotency_key: Optional client-supplied key for safe retries. Replaying the same key with the same body and the same `atomic` mode returns the original response; reusing it with either changed is a conflict. + :type idempotency_key: str + :param atomic: When true, the whole batch is committed as a single transaction and any per-record failure returns 422 with nothing applied. Defaults to false, which keeps the successful records and silently drops the failing ones. + :type atomic: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -489,59 +505,69 @@ def create_break_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_break_serialize( - id=id, - time_tracking_create_time_tracking_break_v1=time_tracking_create_time_tracking_break_v1, + _param = self._bulk_upsert_time_tracking_employee_enrollments_serialize( + time_tracking_bulk_upsert_employee_time_tracking_data_record_v1=time_tracking_bulk_upsert_employee_time_tracking_data_record_v1, + idempotency_key=idempotency_key, + atomic=atomic, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingTimeTrackingBreakV1", - '422': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "202": "TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def create_break_without_preload_content( + def bulk_upsert_time_tracking_employee_enrollments_without_preload_content( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - time_tracking_create_time_tracking_break_v1: TimeTrackingCreateTimeTrackingBreakV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + time_tracking_bulk_upsert_employee_time_tracking_data_record_v1: Annotated[ + list[TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1], Field(min_length=1, max_length=1000) + ], + idempotency_key: Annotated[ + StrictStr | None, + Field( + description="Optional client-supplied key for safe retries. Replaying the same key with the same body and the same `atomic` mode returns the original response; reusing it with either changed is a conflict." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + atomic: Annotated[ + StrictBool | None, + Field( + description="When true, the whole batch is committed as a single transaction and any per-record failure returns 422 with nothing applied. Defaults to false, which keeps the successful records and silently drops the failing ones." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Break + """Bulk Upsert Employee Enrollments - Creates a new break and associates it with the specified break policy. + Bulk enables, disables, or reassigns employee enrollments. The body is a top-level JSON array of between 1 and 1000 upsert records; each record requires `employeeId` and applies the same merge-patch semantics as the single-employee PATCH. Request-level validation (payload shape, record cap, missing `employeeId`) runs synchronously; the records themselves are applied asynchronously, so the response is 202 with a `requestId` for log correlation rather than the resulting enrollments. Confirm the final state by reading the enrollments back through `GET /api/v1/time-tracking/employees`. Per-record processing errors, such as an unknown `employeeId` or `configurationId`, do not surface in the response. Send `atomic=true` to commit the whole batch as one unit instead, in which case any per-record failure aborts the batch and returns 422 with nothing applied. OAuth Scopes: time_tracking:employees.write - :param id: The break policy ID. (required) - :type id: str - :param time_tracking_create_time_tracking_break_v1: (required) - :type time_tracking_create_time_tracking_break_v1: TimeTrackingCreateTimeTrackingBreakV1 + :param time_tracking_bulk_upsert_employee_time_tracking_data_record_v1: (required) + :type time_tracking_bulk_upsert_employee_time_tracking_data_record_v1: List[TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1] + :param idempotency_key: Optional client-supplied key for safe retries. Replaying the same key with the same body and the same `atomic` mode returns the original response; reusing it with either changed is a conflict. + :type idempotency_key: str + :param atomic: When true, the whole batch is committed as a single transaction and any per-record failure returns 422 with nothing applied. Defaults to false, which keeps the successful records and silently drops the failing ones. + :type atomic: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -562,33 +588,34 @@ def create_break_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_break_serialize( - id=id, - time_tracking_create_time_tracking_break_v1=time_tracking_create_time_tracking_break_v1, + _param = self._bulk_upsert_time_tracking_employee_enrollments_serialize( + time_tracking_bulk_upsert_employee_time_tracking_data_record_v1=time_tracking_bulk_upsert_employee_time_tracking_data_record_v1, + idempotency_key=idempotency_key, + atomic=atomic, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingTimeTrackingBreakV1", - '422': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "202": "TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _create_break_serialize( + def _bulk_upsert_time_tracking_employee_enrollments_serialize( self, - id, - time_tracking_create_time_tracking_break_v1, + time_tracking_bulk_upsert_employee_time_tracking_data_record_v1, + idempotency_key, + atomic, _request_auth, _content_type, _headers, @@ -597,60 +624,48 @@ def _create_break_serialize( _host = None - _collection_formats: Dict[str, str] = { + _collection_formats: dict[str, str] = { + "TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1": "", } - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters + if atomic is not None: + _query_params.append(("atomic", atomic)) + # process the header parameters + if idempotency_key is not None: + _header_params["Idempotency-Key"] = idempotency_key # process the form parameters # process the body parameter - if time_tracking_create_time_tracking_break_v1 is not None: - _body_params = time_tracking_create_time_tracking_break_v1 - + if time_tracking_bulk_upsert_employee_time_tracking_data_record_v1 is not None: + _body_params = time_tracking_bulk_upsert_employee_time_tracking_data_record_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/time-tracking/break-policies/{id}/breaks', + method="POST", + resource_path="/api/v1/time-tracking/employees/bulk-upsert", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -660,35 +675,27 @@ def _create_break_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def create_break_policy( + def clock_in( self, - time_tracking_create_time_tracking_break_policy_v1: TimeTrackingCreateTimeTrackingBreakPolicyV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + time_tracking_create_clock_in_v1: TimeTrackingCreateClockInV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingTimeTrackingBreakPolicyWithRelationsV1: - """Create Break Policy + ) -> TimeTrackingClockEntryV1: + """Clock In - Create a break policy. Breaks and assignments can be optionally included and created at the same time. + Clocks an employee in at the current server time, creating an open clock entry (`end: null`). Proxy clock-in for a different employee requires `time_tracking:timesheets.write` scope plus permission to manage the target employee's time. OAuth Scopes: time_tracking:timesheets.write - :param time_tracking_create_time_tracking_break_policy_v1: (required) - :type time_tracking_create_time_tracking_break_policy_v1: TimeTrackingCreateTimeTrackingBreakPolicyV1 + :param time_tracking_create_clock_in_v1: (required) + :type time_tracking_create_clock_in_v1: TimeTrackingCreateClockInV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -709,55 +716,50 @@ def create_break_policy( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_break_policy_serialize( - time_tracking_create_time_tracking_break_policy_v1=time_tracking_create_time_tracking_break_policy_v1, + _param = self._clock_in_serialize( + time_tracking_create_clock_in_v1=time_tracking_create_clock_in_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingClockEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def create_break_policy_with_http_info( + def clock_in_with_http_info( self, - time_tracking_create_time_tracking_break_policy_v1: TimeTrackingCreateTimeTrackingBreakPolicyV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + time_tracking_create_clock_in_v1: TimeTrackingCreateClockInV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingTimeTrackingBreakPolicyWithRelationsV1]: - """Create Break Policy + ) -> ApiResponse[TimeTrackingClockEntryV1]: + """Clock In - Create a break policy. Breaks and assignments can be optionally included and created at the same time. + Clocks an employee in at the current server time, creating an open clock entry (`end: null`). Proxy clock-in for a different employee requires `time_tracking:timesheets.write` scope plus permission to manage the target employee's time. OAuth Scopes: time_tracking:timesheets.write - :param time_tracking_create_time_tracking_break_policy_v1: (required) - :type time_tracking_create_time_tracking_break_policy_v1: TimeTrackingCreateTimeTrackingBreakPolicyV1 + :param time_tracking_create_clock_in_v1: (required) + :type time_tracking_create_clock_in_v1: TimeTrackingCreateClockInV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -778,55 +780,50 @@ def create_break_policy_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_break_policy_serialize( - time_tracking_create_time_tracking_break_policy_v1=time_tracking_create_time_tracking_break_policy_v1, + _param = self._clock_in_serialize( + time_tracking_create_clock_in_v1=time_tracking_create_clock_in_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingClockEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def create_break_policy_without_preload_content( + def clock_in_without_preload_content( self, - time_tracking_create_time_tracking_break_policy_v1: TimeTrackingCreateTimeTrackingBreakPolicyV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + time_tracking_create_clock_in_v1: TimeTrackingCreateClockInV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Break Policy + """Clock In - Create a break policy. Breaks and assignments can be optionally included and created at the same time. + Clocks an employee in at the current server time, creating an open clock entry (`end: null`). Proxy clock-in for a different employee requires `time_tracking:timesheets.write` scope plus permission to manage the target employee's time. OAuth Scopes: time_tracking:timesheets.write - :param time_tracking_create_time_tracking_break_policy_v1: (required) - :type time_tracking_create_time_tracking_break_policy_v1: TimeTrackingCreateTimeTrackingBreakPolicyV1 + :param time_tracking_create_clock_in_v1: (required) + :type time_tracking_create_clock_in_v1: TimeTrackingCreateClockInV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -847,31 +844,31 @@ def create_break_policy_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_break_policy_serialize( - time_tracking_create_time_tracking_break_policy_v1=time_tracking_create_time_tracking_break_policy_v1, + _param = self._clock_in_serialize( + time_tracking_create_clock_in_v1=time_tracking_create_clock_in_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingClockEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _create_break_policy_serialize( + def _clock_in_serialize( self, - time_tracking_create_time_tracking_break_policy_v1, + time_tracking_create_clock_in_v1, _request_auth, _content_type, _headers, @@ -880,58 +877,41 @@ def _create_break_policy_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if time_tracking_create_time_tracking_break_policy_v1 is not None: - _body_params = time_tracking_create_time_tracking_break_policy_v1 - + if time_tracking_create_clock_in_v1 is not None: + _body_params = time_tracking_create_clock_in_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/time-tracking/break-policies', + method="POST", + resource_path="/api/v1/time-tracking/clock-ins", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -941,35 +921,27 @@ def _create_break_policy_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def create_or_update_timesheet_clock_entries( + def clock_out( self, - clock_entries_schema: ClockEntriesSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[TimesheetEntryInfoApiTransformer]: - """Create or Update Timesheet Clock Entries + time_tracking_create_clock_out_v1: TimeTrackingCreateClockOutV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingClockEntryV1: + """Clock Out - Creates or updates timesheet clock entries in bulk. Entries with an existing ID are updated; entries without an ID are created. + Clocks an employee out at the current server time, closing the employee's open clock entry (`end` set, `endSource: USER`). Proxy clock-out for a different employee requires `time_tracking:timesheets.write` scope plus permission to manage the target employee's time. OAuth Scopes: time_tracking:timesheets.write - :param clock_entries_schema: (required) - :type clock_entries_schema: ClockEntriesSchema + :param time_tracking_create_clock_out_v1: (required) + :type time_tracking_create_clock_out_v1: TimeTrackingCreateClockOutV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -990,61 +962,51 @@ def create_or_update_timesheet_clock_entries( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_or_update_timesheet_clock_entries_serialize( - clock_entries_schema=clock_entries_schema, + _param = self._clock_out_serialize( + time_tracking_create_clock_out_v1=time_tracking_create_clock_out_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "List[TimesheetEntryInfoApiTransformer]", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingClockEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def create_or_update_timesheet_clock_entries_with_http_info( + def clock_out_with_http_info( self, - clock_entries_schema: ClockEntriesSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[TimesheetEntryInfoApiTransformer]]: - """Create or Update Timesheet Clock Entries + time_tracking_create_clock_out_v1: TimeTrackingCreateClockOutV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingClockEntryV1]: + """Clock Out - Creates or updates timesheet clock entries in bulk. Entries with an existing ID are updated; entries without an ID are created. + Clocks an employee out at the current server time, closing the employee's open clock entry (`end` set, `endSource: USER`). Proxy clock-out for a different employee requires `time_tracking:timesheets.write` scope plus permission to manage the target employee's time. OAuth Scopes: time_tracking:timesheets.write - :param clock_entries_schema: (required) - :type clock_entries_schema: ClockEntriesSchema + :param time_tracking_create_clock_out_v1: (required) + :type time_tracking_create_clock_out_v1: TimeTrackingCreateClockOutV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1065,61 +1027,51 @@ def create_or_update_timesheet_clock_entries_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_or_update_timesheet_clock_entries_serialize( - clock_entries_schema=clock_entries_schema, + _param = self._clock_out_serialize( + time_tracking_create_clock_out_v1=time_tracking_create_clock_out_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "List[TimesheetEntryInfoApiTransformer]", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingClockEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def create_or_update_timesheet_clock_entries_without_preload_content( + def clock_out_without_preload_content( self, - clock_entries_schema: ClockEntriesSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + time_tracking_create_clock_out_v1: TimeTrackingCreateClockOutV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create or Update Timesheet Clock Entries + """Clock Out - Creates or updates timesheet clock entries in bulk. Entries with an existing ID are updated; entries without an ID are created. + Clocks an employee out at the current server time, closing the employee's open clock entry (`end` set, `endSource: USER`). Proxy clock-out for a different employee requires `time_tracking:timesheets.write` scope plus permission to manage the target employee's time. OAuth Scopes: time_tracking:timesheets.write - :param clock_entries_schema: (required) - :type clock_entries_schema: ClockEntriesSchema + :param time_tracking_create_clock_out_v1: (required) + :type time_tracking_create_clock_out_v1: TimeTrackingCreateClockOutV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1140,37 +1092,32 @@ def create_or_update_timesheet_clock_entries_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_or_update_timesheet_clock_entries_serialize( - clock_entries_schema=clock_entries_schema, + _param = self._clock_out_serialize( + time_tracking_create_clock_out_v1=time_tracking_create_clock_out_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "List[TimesheetEntryInfoApiTransformer]", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingClockEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _create_or_update_timesheet_clock_entries_serialize( + def _clock_out_serialize( self, - clock_entries_schema, + time_tracking_create_clock_out_v1, _request_auth, _content_type, _headers, @@ -1179,58 +1126,41 @@ def _create_or_update_timesheet_clock_entries_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if clock_entries_schema is not None: - _body_params = clock_entries_schema - + if time_tracking_create_clock_out_v1 is not None: + _body_params = time_tracking_create_clock_out_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/time_tracking/clock_entries/store', + method="POST", + resource_path="/api/v1/time-tracking/clock-outs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1240,35 +1170,27 @@ def _create_or_update_timesheet_clock_entries_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def create_or_update_timesheet_hour_entries( + def create_clock_entry( self, - hour_entries_request_schema: HourEntriesRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[TimesheetEntryInfoApiTransformer]: - """Create or Update Timesheet Hour Entries + clock_entry_create_clock_entry_v1: ClockEntryCreateClockEntryV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingClockEntryV1: + """Create Clock Entry - Creates or updates timesheet hour entries in bulk. Entries with an existing ID are updated; entries without an ID are created. + Manually creates a time tracking clock entry (corrections, retroactive entry). Distinct from the real-time clock-in process resource. The parent daily entry and timesheet are resolved (and created if needed) from `start` + `timezone`; the entry is rejected with 409 when the resolved timesheet's type does not accept clock entries. Geolocation is persisted only when the employee's configuration has it enabled. OAuth Scopes: time_tracking:timesheets.write - :param hour_entries_request_schema: (required) - :type hour_entries_request_schema: HourEntriesRequestSchema + :param clock_entry_create_clock_entry_v1: (required) + :type clock_entry_create_clock_entry_v1: ClockEntryCreateClockEntryV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1289,61 +1211,50 @@ def create_or_update_timesheet_hour_entries( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_or_update_timesheet_hour_entries_serialize( - hour_entries_request_schema=hour_entries_request_schema, + _param = self._create_clock_entry_serialize( + clock_entry_create_clock_entry_v1=clock_entry_create_clock_entry_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "List[TimesheetEntryInfoApiTransformer]", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingClockEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def create_or_update_timesheet_hour_entries_with_http_info( + def create_clock_entry_with_http_info( self, - hour_entries_request_schema: HourEntriesRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[TimesheetEntryInfoApiTransformer]]: - """Create or Update Timesheet Hour Entries + clock_entry_create_clock_entry_v1: ClockEntryCreateClockEntryV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingClockEntryV1]: + """Create Clock Entry - Creates or updates timesheet hour entries in bulk. Entries with an existing ID are updated; entries without an ID are created. + Manually creates a time tracking clock entry (corrections, retroactive entry). Distinct from the real-time clock-in process resource. The parent daily entry and timesheet are resolved (and created if needed) from `start` + `timezone`; the entry is rejected with 409 when the resolved timesheet's type does not accept clock entries. Geolocation is persisted only when the employee's configuration has it enabled. OAuth Scopes: time_tracking:timesheets.write - :param hour_entries_request_schema: (required) - :type hour_entries_request_schema: HourEntriesRequestSchema + :param clock_entry_create_clock_entry_v1: (required) + :type clock_entry_create_clock_entry_v1: ClockEntryCreateClockEntryV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1364,61 +1275,50 @@ def create_or_update_timesheet_hour_entries_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_or_update_timesheet_hour_entries_serialize( - hour_entries_request_schema=hour_entries_request_schema, + _param = self._create_clock_entry_serialize( + clock_entry_create_clock_entry_v1=clock_entry_create_clock_entry_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "List[TimesheetEntryInfoApiTransformer]", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingClockEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def create_or_update_timesheet_hour_entries_without_preload_content( + def create_clock_entry_without_preload_content( self, - hour_entries_request_schema: HourEntriesRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + clock_entry_create_clock_entry_v1: ClockEntryCreateClockEntryV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create or Update Timesheet Hour Entries + """Create Clock Entry - Creates or updates timesheet hour entries in bulk. Entries with an existing ID are updated; entries without an ID are created. + Manually creates a time tracking clock entry (corrections, retroactive entry). Distinct from the real-time clock-in process resource. The parent daily entry and timesheet are resolved (and created if needed) from `start` + `timezone`; the entry is rejected with 409 when the resolved timesheet's type does not accept clock entries. Geolocation is persisted only when the employee's configuration has it enabled. OAuth Scopes: time_tracking:timesheets.write - :param hour_entries_request_schema: (required) - :type hour_entries_request_schema: HourEntriesRequestSchema + :param clock_entry_create_clock_entry_v1: (required) + :type clock_entry_create_clock_entry_v1: ClockEntryCreateClockEntryV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1439,37 +1339,31 @@ def create_or_update_timesheet_hour_entries_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_or_update_timesheet_hour_entries_serialize( - hour_entries_request_schema=hour_entries_request_schema, + _param = self._create_clock_entry_serialize( + clock_entry_create_clock_entry_v1=clock_entry_create_clock_entry_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "List[TimesheetEntryInfoApiTransformer]", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingClockEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _create_or_update_timesheet_hour_entries_serialize( + def _create_clock_entry_serialize( self, - hour_entries_request_schema, + clock_entry_create_clock_entry_v1, _request_auth, _content_type, _headers, @@ -1478,58 +1372,41 @@ def _create_or_update_timesheet_hour_entries_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if hour_entries_request_schema is not None: - _body_params = hour_entries_request_schema - + if clock_entry_create_clock_entry_v1 is not None: + _body_params = clock_entry_create_clock_entry_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/time_tracking/hour_entries/store', + method="POST", + resource_path="/api/v1/time-tracking/clock-entries", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1539,35 +1416,27 @@ def _create_or_update_timesheet_hour_entries_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def create_time_tracking_project( + def create_hour_entry( self, - project_create_request_schema: ProjectCreateRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + hour_entry_create_hour_entry_v1: HourEntryCreateHourEntryV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingProjectWithTasksAndEmployeeIds: - """Create Time Tracking Project + ) -> TimeTrackingHourEntryV1: + """Create Hour Entry - Creates a new time tracking project. Returns the created project with its ID and tasks. When `allowAllEmployees` is false, the response also includes the `employeeIds` array of employees who have access. By default, all employees can log time to the project (`allowAllEmployees` defaults to true) and the project is billable (`billable` defaults to true). Set `hasTasks` to true to enable task-level tracking and provide a `tasks` array — at least one task is required when `hasTasks` is true. Project and task names must be unique and may not exceed 50 characters. When `allowAllEmployees` is false, provide `employeeIds` to restrict access to specific employees. + Creates a new time tracking hour entry. OAuth Scopes: time_tracking:timesheets.write - :param project_create_request_schema: (required) - :type project_create_request_schema: ProjectCreateRequestSchema + :param hour_entry_create_hour_entry_v1: (required) + :type hour_entry_create_hour_entry_v1: HourEntryCreateHourEntryV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1588,59 +1457,50 @@ def create_time_tracking_project( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_time_tracking_project_serialize( - project_create_request_schema=project_create_request_schema, + _param = self._create_hour_entry_serialize( + hour_entry_create_hour_entry_v1=hour_entry_create_hour_entry_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingProjectWithTasksAndEmployeeIds", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingHourEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def create_time_tracking_project_with_http_info( + def create_hour_entry_with_http_info( self, - project_create_request_schema: ProjectCreateRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + hour_entry_create_hour_entry_v1: HourEntryCreateHourEntryV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingProjectWithTasksAndEmployeeIds]: - """Create Time Tracking Project + ) -> ApiResponse[TimeTrackingHourEntryV1]: + """Create Hour Entry - Creates a new time tracking project. Returns the created project with its ID and tasks. When `allowAllEmployees` is false, the response also includes the `employeeIds` array of employees who have access. By default, all employees can log time to the project (`allowAllEmployees` defaults to true) and the project is billable (`billable` defaults to true). Set `hasTasks` to true to enable task-level tracking and provide a `tasks` array — at least one task is required when `hasTasks` is true. Project and task names must be unique and may not exceed 50 characters. When `allowAllEmployees` is false, provide `employeeIds` to restrict access to specific employees. + Creates a new time tracking hour entry. OAuth Scopes: time_tracking:timesheets.write - :param project_create_request_schema: (required) - :type project_create_request_schema: ProjectCreateRequestSchema + :param hour_entry_create_hour_entry_v1: (required) + :type hour_entry_create_hour_entry_v1: HourEntryCreateHourEntryV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1661,59 +1521,50 @@ def create_time_tracking_project_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_time_tracking_project_serialize( - project_create_request_schema=project_create_request_schema, + _param = self._create_hour_entry_serialize( + hour_entry_create_hour_entry_v1=hour_entry_create_hour_entry_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingProjectWithTasksAndEmployeeIds", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingHourEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def create_time_tracking_project_without_preload_content( + def create_hour_entry_without_preload_content( self, - project_create_request_schema: ProjectCreateRequestSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + hour_entry_create_hour_entry_v1: HourEntryCreateHourEntryV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Time Tracking Project + """Create Hour Entry - Creates a new time tracking project. Returns the created project with its ID and tasks. When `allowAllEmployees` is false, the response also includes the `employeeIds` array of employees who have access. By default, all employees can log time to the project (`allowAllEmployees` defaults to true) and the project is billable (`billable` defaults to true). Set `hasTasks` to true to enable task-level tracking and provide a `tasks` array — at least one task is required when `hasTasks` is true. Project and task names must be unique and may not exceed 50 characters. When `allowAllEmployees` is false, provide `employeeIds` to restrict access to specific employees. + Creates a new time tracking hour entry. OAuth Scopes: time_tracking:timesheets.write - :param project_create_request_schema: (required) - :type project_create_request_schema: ProjectCreateRequestSchema + :param hour_entry_create_hour_entry_v1: (required) + :type hour_entry_create_hour_entry_v1: HourEntryCreateHourEntryV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1734,35 +1585,31 @@ def create_time_tracking_project_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_time_tracking_project_serialize( - project_create_request_schema=project_create_request_schema, + _param = self._create_hour_entry_serialize( + hour_entry_create_hour_entry_v1=hour_entry_create_hour_entry_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TimeTrackingProjectWithTasksAndEmployeeIds", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingHourEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _create_time_tracking_project_serialize( + def _create_hour_entry_serialize( self, - project_create_request_schema, + hour_entry_create_hour_entry_v1, _request_auth, _content_type, _headers, @@ -1771,58 +1618,41 @@ def _create_time_tracking_project_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if project_create_request_schema is not None: - _body_params = project_create_request_schema - + if hour_entry_create_hour_entry_v1 is not None: + _body_params = hour_entry_create_hour_entry_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/time_tracking/projects', + method="POST", + resource_path="/api/v1/time-tracking/hour-entries", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1832,38 +1662,27 @@ def _create_time_tracking_project_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def create_timesheet_clock_in_entry( + def create_or_update_timesheet_clock_entries( self, - employee_id: Annotated[StrictInt, Field(description="ID of the employee to clock in.")], - clock_in_request_schema: Optional[ClockInRequestSchema] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + clock_entries_schema: ClockEntriesSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimesheetEntryInfoApiTransformer: - """Create Timesheet Clock-In Entry + ) -> list[TimesheetEntryInfoApiTransformer]: + """Create or Update Timesheet Clock Entries - Clocks in an employee at the current server time. To record a historical clock-in, provide a `date`, `start` (HH:MM, 24-hour format), and `timezone`. You can optionally associate the entry with `projectId`, `taskId` (requires `projectId`), `breakId`, and a `note`. + Creates or updates timesheet clock entries in bulk. Entries with an existing ID are updated; entries without an ID are created. OAuth Scopes: time_tracking.write - :param employee_id: ID of the employee to clock in. (required) - :type employee_id: int - :param clock_in_request_schema: - :type clock_in_request_schema: ClockInRequestSchema + :param clock_entries_schema: (required) + :type clock_entries_schema: ClockEntriesSchema :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1884,65 +1703,52 @@ def create_timesheet_clock_in_entry( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_timesheet_clock_in_entry_serialize( - employee_id=employee_id, - clock_in_request_schema=clock_in_request_schema, + _param = self._create_or_update_timesheet_clock_entries_serialize( + clock_entries_schema=clock_entries_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimesheetEntryInfoApiTransformer", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "List[TimesheetEntryInfoApiTransformer]", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "406": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def create_timesheet_clock_in_entry_with_http_info( + def create_or_update_timesheet_clock_entries_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="ID of the employee to clock in.")], - clock_in_request_schema: Optional[ClockInRequestSchema] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + clock_entries_schema: ClockEntriesSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimesheetEntryInfoApiTransformer]: - """Create Timesheet Clock-In Entry + ) -> ApiResponse[list[TimesheetEntryInfoApiTransformer]]: + """Create or Update Timesheet Clock Entries - Clocks in an employee at the current server time. To record a historical clock-in, provide a `date`, `start` (HH:MM, 24-hour format), and `timezone`. You can optionally associate the entry with `projectId`, `taskId` (requires `projectId`), `breakId`, and a `note`. + Creates or updates timesheet clock entries in bulk. Entries with an existing ID are updated; entries without an ID are created. OAuth Scopes: time_tracking.write - :param employee_id: ID of the employee to clock in. (required) - :type employee_id: int - :param clock_in_request_schema: - :type clock_in_request_schema: ClockInRequestSchema + :param clock_entries_schema: (required) + :type clock_entries_schema: ClockEntriesSchema :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1963,65 +1769,52 @@ def create_timesheet_clock_in_entry_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_timesheet_clock_in_entry_serialize( - employee_id=employee_id, - clock_in_request_schema=clock_in_request_schema, + _param = self._create_or_update_timesheet_clock_entries_serialize( + clock_entries_schema=clock_entries_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimesheetEntryInfoApiTransformer", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "List[TimesheetEntryInfoApiTransformer]", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "406": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def create_timesheet_clock_in_entry_without_preload_content( + def create_or_update_timesheet_clock_entries_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="ID of the employee to clock in.")], - clock_in_request_schema: Optional[ClockInRequestSchema] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + clock_entries_schema: ClockEntriesSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Timesheet Clock-In Entry + """Create or Update Timesheet Clock Entries - Clocks in an employee at the current server time. To record a historical clock-in, provide a `date`, `start` (HH:MM, 24-hour format), and `timezone`. You can optionally associate the entry with `projectId`, `taskId` (requires `projectId`), `breakId`, and a `note`. + Creates or updates timesheet clock entries in bulk. Entries with an existing ID are updated; entries without an ID are created. OAuth Scopes: time_tracking.write - :param employee_id: ID of the employee to clock in. (required) - :type employee_id: int - :param clock_in_request_schema: - :type clock_in_request_schema: ClockInRequestSchema + :param clock_entries_schema: (required) + :type clock_entries_schema: ClockEntriesSchema :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2042,39 +1835,33 @@ def create_timesheet_clock_in_entry_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_timesheet_clock_in_entry_serialize( - employee_id=employee_id, - clock_in_request_schema=clock_in_request_schema, + _param = self._create_or_update_timesheet_clock_entries_serialize( + clock_entries_schema=clock_entries_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimesheetEntryInfoApiTransformer", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "List[TimesheetEntryInfoApiTransformer]", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "406": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _create_timesheet_clock_in_entry_serialize( + def _create_or_update_timesheet_clock_entries_serialize( self, - employee_id, - clock_in_request_schema, + clock_entries_schema, _request_auth, _content_type, _headers, @@ -2083,60 +1870,41 @@ def _create_timesheet_clock_in_entry_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if employee_id is not None: - _path_params['employeeId'] = employee_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if clock_in_request_schema is not None: - _body_params = clock_in_request_schema - + if clock_entries_schema is not None: + _body_params = clock_entries_schema # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/time_tracking/employees/{employeeId}/clock_in', + method="POST", + resource_path="/api/v1/time_tracking/clock_entries/store", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2146,38 +1914,27 @@ def _create_timesheet_clock_in_entry_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def create_timesheet_clock_out_entry( + def create_or_update_timesheet_hour_entries( self, - employee_id: Annotated[StrictInt, Field(description="ID of the employee to clock out.")], - clock_out_request_schema: Optional[ClockOutRequestSchema] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + hour_entries_request_schema: HourEntriesRequestSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimesheetEntryInfoApiTransformer: - """Create Timesheet Clock-Out Entry + ) -> list[TimesheetEntryInfoApiTransformer]: + """Create or Update Timesheet Hour Entries - Clocks out a currently clocked-in employee at the current server time. To record a historical clock-out, provide a `date`, `end` (HH:MM, 24-hour format), and `timezone`. + Creates or updates timesheet hour entries in bulk. Entries with an existing ID are updated; entries without an ID are created. OAuth Scopes: time_tracking.write - :param employee_id: ID of the employee to clock out. (required) - :type employee_id: int - :param clock_out_request_schema: - :type clock_out_request_schema: ClockOutRequestSchema + :param hour_entries_request_schema: (required) + :type hour_entries_request_schema: HourEntriesRequestSchema :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2198,64 +1955,52 @@ def create_timesheet_clock_out_entry( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_timesheet_clock_out_entry_serialize( - employee_id=employee_id, - clock_out_request_schema=clock_out_request_schema, + _param = self._create_or_update_timesheet_hour_entries_serialize( + hour_entries_request_schema=hour_entries_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimesheetEntryInfoApiTransformer", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "List[TimesheetEntryInfoApiTransformer]", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "406": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def create_timesheet_clock_out_entry_with_http_info( + def create_or_update_timesheet_hour_entries_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="ID of the employee to clock out.")], - clock_out_request_schema: Optional[ClockOutRequestSchema] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + hour_entries_request_schema: HourEntriesRequestSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimesheetEntryInfoApiTransformer]: - """Create Timesheet Clock-Out Entry + ) -> ApiResponse[list[TimesheetEntryInfoApiTransformer]]: + """Create or Update Timesheet Hour Entries - Clocks out a currently clocked-in employee at the current server time. To record a historical clock-out, provide a `date`, `end` (HH:MM, 24-hour format), and `timezone`. + Creates or updates timesheet hour entries in bulk. Entries with an existing ID are updated; entries without an ID are created. OAuth Scopes: time_tracking.write - :param employee_id: ID of the employee to clock out. (required) - :type employee_id: int - :param clock_out_request_schema: - :type clock_out_request_schema: ClockOutRequestSchema + :param hour_entries_request_schema: (required) + :type hour_entries_request_schema: HourEntriesRequestSchema :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2276,64 +2021,52 @@ def create_timesheet_clock_out_entry_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_timesheet_clock_out_entry_serialize( - employee_id=employee_id, - clock_out_request_schema=clock_out_request_schema, + _param = self._create_or_update_timesheet_hour_entries_serialize( + hour_entries_request_schema=hour_entries_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimesheetEntryInfoApiTransformer", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "List[TimesheetEntryInfoApiTransformer]", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "406": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def create_timesheet_clock_out_entry_without_preload_content( + def create_or_update_timesheet_hour_entries_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="ID of the employee to clock out.")], - clock_out_request_schema: Optional[ClockOutRequestSchema] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + hour_entries_request_schema: HourEntriesRequestSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Timesheet Clock-Out Entry + """Create or Update Timesheet Hour Entries - Clocks out a currently clocked-in employee at the current server time. To record a historical clock-out, provide a `date`, `end` (HH:MM, 24-hour format), and `timezone`. + Creates or updates timesheet hour entries in bulk. Entries with an existing ID are updated; entries without an ID are created. OAuth Scopes: time_tracking.write - :param employee_id: ID of the employee to clock out. (required) - :type employee_id: int - :param clock_out_request_schema: - :type clock_out_request_schema: ClockOutRequestSchema + :param hour_entries_request_schema: (required) + :type hour_entries_request_schema: HourEntriesRequestSchema :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2354,38 +2087,33 @@ def create_timesheet_clock_out_entry_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._create_timesheet_clock_out_entry_serialize( - employee_id=employee_id, - clock_out_request_schema=clock_out_request_schema, + _param = self._create_or_update_timesheet_hour_entries_serialize( + hour_entries_request_schema=hour_entries_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimesheetEntryInfoApiTransformer", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "List[TimesheetEntryInfoApiTransformer]", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "406": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _create_timesheet_clock_out_entry_serialize( + def _create_or_update_timesheet_hour_entries_serialize( self, - employee_id, - clock_out_request_schema, + hour_entries_request_schema, _request_auth, _content_type, _headers, @@ -2394,60 +2122,41 @@ def _create_timesheet_clock_out_entry_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if employee_id is not None: - _path_params['employeeId'] = employee_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if clock_out_request_schema is not None: - _body_params = clock_out_request_schema - + if hour_entries_request_schema is not None: + _body_params = hour_entries_request_schema # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/time_tracking/employees/{employeeId}/clock_out', + method="POST", + resource_path="/api/v1/time_tracking/hour_entries/store", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2457,35 +2166,30 @@ def _create_timesheet_clock_out_entry_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def delete_break( + def create_project_task( self, - id: Annotated[UUID, Field(description="The break ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + project_id: Annotated[StrictStr | None, Field(description="The project ID.")], + project_create_time_tracking_project_task_v1: ProjectCreateTimeTrackingProjectTaskV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Break + ) -> ProjectTimeTrackingTaskV1: + """Create Time Tracking Project Task - Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. + Creates a new task on the specified time tracking project. OAuth Scopes: time_tracking:project.write - :param id: The break ID. (required) - :type id: str + :param project_id: The project ID. (required) + :type project_id: str + :param project_create_time_tracking_project_task_v1: (required) + :type project_create_time_tracking_project_task_v1: ProjectCreateTimeTrackingProjectTaskV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2506,58 +2210,52 @@ def delete_break( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_break_serialize( - id=id, + _param = self._create_project_task_serialize( + project_id=project_id, + project_create_time_tracking_project_task_v1=project_create_time_tracking_project_task_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "ProjectTimeTrackingTaskV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call - def delete_break_with_http_info( + def create_project_task_with_http_info( self, - id: Annotated[UUID, Field(description="The break ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + project_id: Annotated[StrictStr | None, Field(description="The project ID.")], + project_create_time_tracking_project_task_v1: ProjectCreateTimeTrackingProjectTaskV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Break + ) -> ApiResponse[ProjectTimeTrackingTaskV1]: + """Create Time Tracking Project Task - Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. + Creates a new task on the specified time tracking project. OAuth Scopes: time_tracking:project.write - :param id: The break ID. (required) - :type id: str + :param project_id: The project ID. (required) + :type project_id: str + :param project_create_time_tracking_project_task_v1: (required) + :type project_create_time_tracking_project_task_v1: ProjectCreateTimeTrackingProjectTaskV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2578,57 +2276,52 @@ def delete_break_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_break_serialize( - id=id, + _param = self._create_project_task_serialize( + project_id=project_id, + project_create_time_tracking_project_task_v1=project_create_time_tracking_project_task_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "ProjectTimeTrackingTaskV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def delete_break_without_preload_content( + def create_project_task_without_preload_content( self, - id: Annotated[UUID, Field(description="The break ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + project_id: Annotated[StrictStr | None, Field(description="The project ID.")], + project_create_time_tracking_project_task_v1: ProjectCreateTimeTrackingProjectTaskV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Break + """Create Time Tracking Project Task - Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. + Creates a new task on the specified time tracking project. OAuth Scopes: time_tracking:project.write - :param id: The break ID. (required) - :type id: str + :param project_id: The project ID. (required) + :type project_id: str + :param project_create_time_tracking_project_task_v1: (required) + :type project_create_time_tracking_project_task_v1: ProjectCreateTimeTrackingProjectTaskV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2649,33 +2342,31 @@ def delete_break_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_break_serialize( - id=id, + _param = self._create_project_task_serialize( + project_id=project_id, + project_create_time_tracking_project_task_v1=project_create_time_tracking_project_task_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "ProjectTimeTrackingTaskV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _delete_break_serialize( + def _create_project_task_serialize( self, - id, + project_id, + project_create_time_tracking_project_task_v1, _request_auth, _content_type, _headers, @@ -2684,45 +2375,43 @@ def _delete_break_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if id is not None: - _path_params['id'] = id + if project_id is not None: + _path_params["projectId"] = project_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - + if project_create_time_tracking_project_task_v1 is not None: + _body_params = project_create_time_tracking_project_task_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/time-tracking/breaks/{id}', + method="POST", + resource_path="/api/v1/time-tracking/projects/{projectId}/tasks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2732,35 +2421,27 @@ def _delete_break_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def delete_break_policy( + def create_shift_differential( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + shift_differential_create_time_tracking_shift_differential_v1: ShiftDifferentialCreateTimeTrackingShiftDifferentialV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Break Policy + ) -> ShiftDifferentialTimeTrackingShiftDifferentialV1: + """Create Time Tracking Shift Differential - Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. + Creates a new time tracking shift differential. OAuth Scopes: time_tracking:shift_differentials.write - :param id: The break policy ID. (required) - :type id: str + :param shift_differential_create_time_tracking_shift_differential_v1: (required) + :type shift_differential_create_time_tracking_shift_differential_v1: ShiftDifferentialCreateTimeTrackingShiftDifferentialV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2781,58 +2462,49 @@ def delete_break_policy( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_break_policy_serialize( - id=id, + _param = self._create_shift_differential_serialize( + shift_differential_create_time_tracking_shift_differential_v1=shift_differential_create_time_tracking_shift_differential_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "ShiftDifferentialTimeTrackingShiftDifferentialV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call - def delete_break_policy_with_http_info( + def create_shift_differential_with_http_info( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + shift_differential_create_time_tracking_shift_differential_v1: ShiftDifferentialCreateTimeTrackingShiftDifferentialV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Break Policy + ) -> ApiResponse[ShiftDifferentialTimeTrackingShiftDifferentialV1]: + """Create Time Tracking Shift Differential - Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. + Creates a new time tracking shift differential. OAuth Scopes: time_tracking:shift_differentials.write - :param id: The break policy ID. (required) - :type id: str + :param shift_differential_create_time_tracking_shift_differential_v1: (required) + :type shift_differential_create_time_tracking_shift_differential_v1: ShiftDifferentialCreateTimeTrackingShiftDifferentialV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2853,57 +2525,49 @@ def delete_break_policy_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_break_policy_serialize( - id=id, + _param = self._create_shift_differential_serialize( + shift_differential_create_time_tracking_shift_differential_v1=shift_differential_create_time_tracking_shift_differential_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "ShiftDifferentialTimeTrackingShiftDifferentialV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def delete_break_policy_without_preload_content( + def create_shift_differential_without_preload_content( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + shift_differential_create_time_tracking_shift_differential_v1: ShiftDifferentialCreateTimeTrackingShiftDifferentialV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Break Policy + """Create Time Tracking Shift Differential - Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. + Creates a new time tracking shift differential. OAuth Scopes: time_tracking:shift_differentials.write - :param id: The break policy ID. (required) - :type id: str + :param shift_differential_create_time_tracking_shift_differential_v1: (required) + :type shift_differential_create_time_tracking_shift_differential_v1: ShiftDifferentialCreateTimeTrackingShiftDifferentialV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2924,33 +2588,30 @@ def delete_break_policy_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_break_policy_serialize( - id=id, + _param = self._create_shift_differential_serialize( + shift_differential_create_time_tracking_shift_differential_v1=shift_differential_create_time_tracking_shift_differential_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "ShiftDifferentialTimeTrackingShiftDifferentialV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _delete_break_policy_serialize( + def _create_shift_differential_serialize( self, - id, + shift_differential_create_time_tracking_shift_differential_v1, _request_auth, _content_type, _headers, @@ -2959,45 +2620,41 @@ def _delete_break_policy_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - + if shift_differential_create_time_tracking_shift_differential_v1 is not None: + _body_params = shift_differential_create_time_tracking_shift_differential_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/time-tracking/break-policies/{id}', + method="POST", + resource_path="/api/v1/time-tracking/shift-differentials", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3007,35 +2664,35 @@ def _delete_break_policy_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def delete_timesheet_clock_entries_via_post( + def create_time_tracking_configuration( self, - clock_entry_ids_schema: ClockEntryIdsSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + time_tracking_create_time_tracking_configuration_v1: TimeTrackingCreateTimeTrackingConfigurationV1, + idempotency_key: Annotated[ + StrictStr | None, + Field( + description="Optional client-supplied key for safe retries (UUID recommended). Replaying the same key returns the original response; reusing it with a different body returns 409." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Timesheet Clock Entries + ) -> TimeTrackingTimeTrackingConfigurationV1: + """Create Configuration - Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + Creates a new GROUP time tracking configuration together with its approval workflow. The type is forced to GROUP server-side; the GLOBAL configuration is auto-managed and cannot be created via this endpoint. Accepts an optional Idempotency-Key header for safe retries. OAuth Scopes: time_tracking:configurations.write - :param clock_entry_ids_schema: (required) - :type clock_entry_ids_schema: ClockEntryIdsSchema + :param time_tracking_create_time_tracking_configuration_v1: (required) + :type time_tracking_create_time_tracking_configuration_v1: TimeTrackingCreateTimeTrackingConfigurationV1 + :param idempotency_key: Optional client-supplied key for safe retries (UUID recommended). Replaying the same key returns the original response; reusing it with a different body returns 409. + :type idempotency_key: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3056,60 +2713,58 @@ def delete_timesheet_clock_entries_via_post( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_timesheet_clock_entries_via_post_serialize( - clock_entry_ids_schema=clock_entry_ids_schema, + _param = self._create_time_tracking_configuration_serialize( + time_tracking_create_time_tracking_configuration_v1=time_tracking_create_time_tracking_configuration_v1, + idempotency_key=idempotency_key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingTimeTrackingConfigurationV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call - def delete_timesheet_clock_entries_via_post_with_http_info( + def create_time_tracking_configuration_with_http_info( self, - clock_entry_ids_schema: ClockEntryIdsSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + time_tracking_create_time_tracking_configuration_v1: TimeTrackingCreateTimeTrackingConfigurationV1, + idempotency_key: Annotated[ + StrictStr | None, + Field( + description="Optional client-supplied key for safe retries (UUID recommended). Replaying the same key returns the original response; reusing it with a different body returns 409." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Timesheet Clock Entries + ) -> ApiResponse[TimeTrackingTimeTrackingConfigurationV1]: + """Create Configuration - Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + Creates a new GROUP time tracking configuration together with its approval workflow. The type is forced to GROUP server-side; the GLOBAL configuration is auto-managed and cannot be created via this endpoint. Accepts an optional Idempotency-Key header for safe retries. OAuth Scopes: time_tracking:configurations.write - :param clock_entry_ids_schema: (required) - :type clock_entry_ids_schema: ClockEntryIdsSchema + :param time_tracking_create_time_tracking_configuration_v1: (required) + :type time_tracking_create_time_tracking_configuration_v1: TimeTrackingCreateTimeTrackingConfigurationV1 + :param idempotency_key: Optional client-supplied key for safe retries (UUID recommended). Replaying the same key returns the original response; reusing it with a different body returns 409. + :type idempotency_key: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3130,59 +2785,58 @@ def delete_timesheet_clock_entries_via_post_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_timesheet_clock_entries_via_post_serialize( - clock_entry_ids_schema=clock_entry_ids_schema, + _param = self._create_time_tracking_configuration_serialize( + time_tracking_create_time_tracking_configuration_v1=time_tracking_create_time_tracking_configuration_v1, + idempotency_key=idempotency_key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingTimeTrackingConfigurationV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def delete_timesheet_clock_entries_via_post_without_preload_content( + def create_time_tracking_configuration_without_preload_content( self, - clock_entry_ids_schema: ClockEntryIdsSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + time_tracking_create_time_tracking_configuration_v1: TimeTrackingCreateTimeTrackingConfigurationV1, + idempotency_key: Annotated[ + StrictStr | None, + Field( + description="Optional client-supplied key for safe retries (UUID recommended). Replaying the same key returns the original response; reusing it with a different body returns 409." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Timesheet Clock Entries + """Create Configuration - Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + Creates a new GROUP time tracking configuration together with its approval workflow. The type is forced to GROUP server-side; the GLOBAL configuration is auto-managed and cannot be created via this endpoint. Accepts an optional Idempotency-Key header for safe retries. OAuth Scopes: time_tracking:configurations.write - :param clock_entry_ids_schema: (required) - :type clock_entry_ids_schema: ClockEntryIdsSchema + :param time_tracking_create_time_tracking_configuration_v1: (required) + :type time_tracking_create_time_tracking_configuration_v1: TimeTrackingCreateTimeTrackingConfigurationV1 + :param idempotency_key: Optional client-supplied key for safe retries (UUID recommended). Replaying the same key returns the original response; reusing it with a different body returns 409. + :type idempotency_key: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3203,35 +2857,32 @@ def delete_timesheet_clock_entries_via_post_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_timesheet_clock_entries_via_post_serialize( - clock_entry_ids_schema=clock_entry_ids_schema, + _param = self._create_time_tracking_configuration_serialize( + time_tracking_create_time_tracking_configuration_v1=time_tracking_create_time_tracking_configuration_v1, + idempotency_key=idempotency_key, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingTimeTrackingConfigurationV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _delete_timesheet_clock_entries_via_post_serialize( + def _create_time_tracking_configuration_serialize( self, - clock_entry_ids_schema, + time_tracking_create_time_tracking_configuration_v1, + idempotency_key, _request_auth, _content_type, _headers, @@ -3240,58 +2891,43 @@ def _delete_timesheet_clock_entries_via_post_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters + if idempotency_key is not None: + _header_params["Idempotency-Key"] = idempotency_key # process the form parameters # process the body parameter - if clock_entry_ids_schema is not None: - _body_params = clock_entry_ids_schema - + if time_tracking_create_time_tracking_configuration_v1 is not None: + _body_params = time_tracking_create_time_tracking_configuration_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/time_tracking/clock_entries/delete', + method="POST", + resource_path="/api/v1/time-tracking/configurations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3301,35 +2937,27 @@ def _delete_timesheet_clock_entries_via_post_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def delete_timesheet_hour_entries_via_post( + def create_time_tracking_project( self, - hour_entry_ids_schema: HourEntryIdsSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + project_create_time_tracking_project_v1: ProjectCreateTimeTrackingProjectV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Timesheet Hour Entries + ) -> ProjectTimeTrackingProjectV1: + """Create Time Tracking Project - Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + Creates a time tracking project. If a deleted project with the same name exists, that project is restored and updated with the supplied values instead of a new project being created; the response returns the restored project's existing ID. `hasTasks` in the response is set automatically based on whether `tasks` were supplied and cannot be set directly on create. Created tasks are not embedded; retrieve them with **List Time Tracking Project Tasks** (`list-project-tasks`). OAuth Scopes: time_tracking:project.write - :param hour_entry_ids_schema: (required) - :type hour_entry_ids_schema: HourEntryIdsSchema + :param project_create_time_tracking_project_v1: (required) + :type project_create_time_tracking_project_v1: ProjectCreateTimeTrackingProjectV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3350,61 +2978,49 @@ def delete_timesheet_hour_entries_via_post( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_timesheet_hour_entries_via_post_serialize( - hour_entry_ids_schema=hour_entry_ids_schema, + _param = self._create_time_tracking_project_serialize( + project_create_time_tracking_project_v1=project_create_time_tracking_project_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "ProjectTimeTrackingProjectV1", + "401": None, + "403": "ProjectStandardApiErrorResponseV1", + "409": "ProjectStandardApiErrorResponseV1", + "422": "ProjectStandardApiErrorResponseV1", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call - def delete_timesheet_hour_entries_via_post_with_http_info( + def create_time_tracking_project_with_http_info( self, - hour_entry_ids_schema: HourEntryIdsSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + project_create_time_tracking_project_v1: ProjectCreateTimeTrackingProjectV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete Timesheet Hour Entries + ) -> ApiResponse[ProjectTimeTrackingProjectV1]: + """Create Time Tracking Project - Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + Creates a time tracking project. If a deleted project with the same name exists, that project is restored and updated with the supplied values instead of a new project being created; the response returns the restored project's existing ID. `hasTasks` in the response is set automatically based on whether `tasks` were supplied and cannot be set directly on create. Created tasks are not embedded; retrieve them with **List Time Tracking Project Tasks** (`list-project-tasks`). OAuth Scopes: time_tracking:project.write - :param hour_entry_ids_schema: (required) - :type hour_entry_ids_schema: HourEntryIdsSchema + :param project_create_time_tracking_project_v1: (required) + :type project_create_time_tracking_project_v1: ProjectCreateTimeTrackingProjectV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3425,60 +3041,49 @@ def delete_timesheet_hour_entries_via_post_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_timesheet_hour_entries_via_post_serialize( - hour_entry_ids_schema=hour_entry_ids_schema, + _param = self._create_time_tracking_project_serialize( + project_create_time_tracking_project_v1=project_create_time_tracking_project_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "ProjectTimeTrackingProjectV1", + "401": None, + "403": "ProjectStandardApiErrorResponseV1", + "409": "ProjectStandardApiErrorResponseV1", + "422": "ProjectStandardApiErrorResponseV1", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def delete_timesheet_hour_entries_via_post_without_preload_content( + def create_time_tracking_project_without_preload_content( self, - hour_entry_ids_schema: HourEntryIdsSchema, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + project_create_time_tracking_project_v1: ProjectCreateTimeTrackingProjectV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Timesheet Hour Entries + """Create Time Tracking Project - Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + Creates a time tracking project. If a deleted project with the same name exists, that project is restored and updated with the supplied values instead of a new project being created; the response returns the restored project's existing ID. `hasTasks` in the response is set automatically based on whether `tasks` were supplied and cannot be set directly on create. Created tasks are not embedded; retrieve them with **List Time Tracking Project Tasks** (`list-project-tasks`). OAuth Scopes: time_tracking:project.write - :param hour_entry_ids_schema: (required) - :type hour_entry_ids_schema: HourEntryIdsSchema + :param project_create_time_tracking_project_v1: (required) + :type project_create_time_tracking_project_v1: ProjectCreateTimeTrackingProjectV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3499,36 +3104,30 @@ def delete_timesheet_hour_entries_via_post_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._delete_timesheet_hour_entries_via_post_serialize( - hour_entry_ids_schema=hour_entry_ids_schema, + _param = self._create_time_tracking_project_serialize( + project_create_time_tracking_project_v1=project_create_time_tracking_project_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "ProjectTimeTrackingProjectV1", + "401": None, + "403": "ProjectStandardApiErrorResponseV1", + "409": "ProjectStandardApiErrorResponseV1", + "422": "ProjectStandardApiErrorResponseV1", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _delete_timesheet_hour_entries_via_post_serialize( + def _create_time_tracking_project_serialize( self, - hour_entry_ids_schema, + project_create_time_tracking_project_v1, _request_auth, _content_type, _headers, @@ -3537,58 +3136,43 @@ def _delete_timesheet_hour_entries_via_post_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if hour_entry_ids_schema is not None: - _body_params = hour_entry_ids_schema - + if project_create_time_tracking_project_v1 is not None: + _body_params = project_create_time_tracking_project_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/time_tracking/hour_entries/delete', + method="POST", + resource_path="/api/v1/time-tracking/projects", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3598,35 +3182,155 @@ def _delete_timesheet_hour_entries_via_post_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, + ) + + @validate_call + def create_time_tracking_project_legacy( + self, + project_create_request_schema: ProjectCreateRequestSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingProjectWithTasksAndEmployeeIds: + """(Deprecated) Create Time Tracking Project (Legacy) + + Deprecated. Use **Create Time Tracking Project** instead (`create-time-tracking-project`). Creates a time tracking project using the legacy contract and returns the project with its tasks. If a deleted project with the same name exists, that project is restored and updated with the supplied values instead of a new project being created; the response returns the restored project's existing ID. OAuth Scopes: time_tracking.write + + :param project_create_request_schema: (required) + :type project_create_request_schema: ProjectCreateRequestSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + warnings.warn("POST /api/v1/time_tracking/projects is deprecated.", DeprecationWarning) + + _param = self._create_time_tracking_project_legacy_serialize( + project_create_request_schema=project_create_request_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, ) + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingProjectWithTasksAndEmployeeIds", + "400": "ProjectLegacyErrorResponseV1", + "401": None, + "403": "ProjectLegacyErrorResponseV1", + "404": "ProjectLegacyErrorResponseV1", + "500": "ProjectLegacyErrorResponseV1", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_time_tracking_project_legacy_with_http_info( + self, + project_create_request_schema: ProjectCreateRequestSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingProjectWithTasksAndEmployeeIds]: + """(Deprecated) Create Time Tracking Project (Legacy) + + Deprecated. Use **Create Time Tracking Project** instead (`create-time-tracking-project`). Creates a time tracking project using the legacy contract and returns the project with its tasks. If a deleted project with the same name exists, that project is restored and updated with the supplied values instead of a new project being created; the response returns the restored project's existing ID. OAuth Scopes: time_tracking.write + + :param project_create_request_schema: (required) + :type project_create_request_schema: ProjectCreateRequestSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + warnings.warn("POST /api/v1/time_tracking/projects is deprecated.", DeprecationWarning) + _param = self._create_time_tracking_project_legacy_serialize( + project_create_request_schema=project_create_request_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingProjectWithTasksAndEmployeeIds", + "400": "ProjectLegacyErrorResponseV1", + "401": None, + "403": "ProjectLegacyErrorResponseV1", + "404": "ProjectLegacyErrorResponseV1", + "500": "ProjectLegacyErrorResponseV1", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) @validate_call - def get_break( + def create_time_tracking_project_legacy_without_preload_content( self, - id: Annotated[UUID, Field(description="The break ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + project_create_request_schema: ProjectCreateRequestSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingTimeTrackingBreakV1: - """Get Break + ) -> RESTResponseType: + """(Deprecated) Create Time Tracking Project (Legacy) - Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration. + Deprecated. Use **Create Time Tracking Project** instead (`create-time-tracking-project`). Creates a time tracking project using the legacy contract and returns the project with its tasks. If a deleted project with the same name exists, that project is restored and updated with the supplied values instead of a new project being created; the response returns the restored project's existing ID. OAuth Scopes: time_tracking.write - :param id: The break ID. (required) - :type id: str + :param project_create_request_schema: (required) + :type project_create_request_schema: ProjectCreateRequestSchema :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3647,56 +3351,6852 @@ def get_break( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ + warnings.warn("POST /api/v1/time_tracking/projects is deprecated.", DeprecationWarning) - _param = self._get_break_serialize( - id=id, + _param = self._create_time_tracking_project_legacy_serialize( + project_create_request_schema=project_create_request_schema, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingProjectWithTasksAndEmployeeIds", + "400": "ProjectLegacyErrorResponseV1", + "401": None, + "403": "ProjectLegacyErrorResponseV1", + "404": "ProjectLegacyErrorResponseV1", + "500": "ProjectLegacyErrorResponseV1", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_time_tracking_project_legacy_serialize( + self, + project_create_request_schema, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if project_create_request_schema is not None: + _body_params = project_create_request_schema + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/time_tracking/projects", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, ) + + @validate_call + def create_timesheet_clock_in_entry( + self, + employee_id: Annotated[ + StrictInt | None, Field(description="The internal employee ID of the employee to clock in.") + ], + clock_in_request_schema: ClockInRequestSchema | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimesheetEntryInfoApiTransformer: + """Create Timesheet Clock-In Entry + + Clocks in an employee at the current server time. To record a historical clock-in, provide a `date`, `start` (HH:MM, 24-hour format), and `timezone`. You can optionally associate the entry with `projectId`, `taskId` (requires `projectId`), `breakId`, and a `note`. OAuth Scopes: time_tracking.write + + :param employee_id: The internal employee ID of the employee to clock in. (required) + :type employee_id: int + :param clock_in_request_schema: + :type clock_in_request_schema: ClockInRequestSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_timesheet_clock_in_entry_serialize( + employee_id=employee_id, + clock_in_request_schema=clock_in_request_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimesheetEntryInfoApiTransformer", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "406": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data + @validate_call + def create_timesheet_clock_in_entry_with_http_info( + self, + employee_id: Annotated[ + StrictInt | None, Field(description="The internal employee ID of the employee to clock in.") + ], + clock_in_request_schema: ClockInRequestSchema | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimesheetEntryInfoApiTransformer]: + """Create Timesheet Clock-In Entry + + Clocks in an employee at the current server time. To record a historical clock-in, provide a `date`, `start` (HH:MM, 24-hour format), and `timezone`. You can optionally associate the entry with `projectId`, `taskId` (requires `projectId`), `breakId`, and a `note`. OAuth Scopes: time_tracking.write + + :param employee_id: The internal employee ID of the employee to clock in. (required) + :type employee_id: int + :param clock_in_request_schema: + :type clock_in_request_schema: ClockInRequestSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_timesheet_clock_in_entry_serialize( + employee_id=employee_id, + clock_in_request_schema=clock_in_request_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimesheetEntryInfoApiTransformer", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "406": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) @validate_call - def get_break_with_http_info( + def create_timesheet_clock_in_entry_without_preload_content( self, - id: Annotated[UUID, Field(description="The break ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictInt | None, Field(description="The internal employee ID of the employee to clock in.") + ], + clock_in_request_schema: ClockInRequestSchema | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Timesheet Clock-In Entry + + Clocks in an employee at the current server time. To record a historical clock-in, provide a `date`, `start` (HH:MM, 24-hour format), and `timezone`. You can optionally associate the entry with `projectId`, `taskId` (requires `projectId`), `breakId`, and a `note`. OAuth Scopes: time_tracking.write + + :param employee_id: The internal employee ID of the employee to clock in. (required) + :type employee_id: int + :param clock_in_request_schema: + :type clock_in_request_schema: ClockInRequestSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_timesheet_clock_in_entry_serialize( + employee_id=employee_id, + clock_in_request_schema=clock_in_request_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimesheetEntryInfoApiTransformer", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "406": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_timesheet_clock_in_entry_serialize( + self, + employee_id, + clock_in_request_schema, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if employee_id is not None: + _path_params["employeeId"] = employee_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if clock_in_request_schema is not None: + _body_params = clock_in_request_schema + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/time_tracking/employees/{employeeId}/clock_in", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_timesheet_clock_out_entry( + self, + employee_id: Annotated[ + StrictInt | None, Field(description="The internal employee ID of the employee to clock out.") + ], + clock_out_request_schema: ClockOutRequestSchema | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimesheetEntryInfoApiTransformer: + """Create Timesheet Clock-Out Entry + + Clocks out a currently clocked-in employee at the current server time. To record a historical clock-out, provide a `date`, `end` (HH:MM, 24-hour format), and `timezone`. OAuth Scopes: time_tracking.write + + :param employee_id: The internal employee ID of the employee to clock out. (required) + :type employee_id: int + :param clock_out_request_schema: + :type clock_out_request_schema: ClockOutRequestSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_timesheet_clock_out_entry_serialize( + employee_id=employee_id, + clock_out_request_schema=clock_out_request_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimesheetEntryInfoApiTransformer", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_timesheet_clock_out_entry_with_http_info( + self, + employee_id: Annotated[ + StrictInt | None, Field(description="The internal employee ID of the employee to clock out.") + ], + clock_out_request_schema: ClockOutRequestSchema | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimesheetEntryInfoApiTransformer]: + """Create Timesheet Clock-Out Entry + + Clocks out a currently clocked-in employee at the current server time. To record a historical clock-out, provide a `date`, `end` (HH:MM, 24-hour format), and `timezone`. OAuth Scopes: time_tracking.write + + :param employee_id: The internal employee ID of the employee to clock out. (required) + :type employee_id: int + :param clock_out_request_schema: + :type clock_out_request_schema: ClockOutRequestSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_timesheet_clock_out_entry_serialize( + employee_id=employee_id, + clock_out_request_schema=clock_out_request_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimesheetEntryInfoApiTransformer", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_timesheet_clock_out_entry_without_preload_content( + self, + employee_id: Annotated[ + StrictInt | None, Field(description="The internal employee ID of the employee to clock out.") + ], + clock_out_request_schema: ClockOutRequestSchema | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Timesheet Clock-Out Entry + + Clocks out a currently clocked-in employee at the current server time. To record a historical clock-out, provide a `date`, `end` (HH:MM, 24-hour format), and `timezone`. OAuth Scopes: time_tracking.write + + :param employee_id: The internal employee ID of the employee to clock out. (required) + :type employee_id: int + :param clock_out_request_schema: + :type clock_out_request_schema: ClockOutRequestSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._create_timesheet_clock_out_entry_serialize( + employee_id=employee_id, + clock_out_request_schema=clock_out_request_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimesheetEntryInfoApiTransformer", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_timesheet_clock_out_entry_serialize( + self, + employee_id, + clock_out_request_schema, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if employee_id is not None: + _path_params["employeeId"] = employee_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if clock_out_request_schema is not None: + _body_params = clock_out_request_schema + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/time_tracking/employees/{employeeId}/clock_out", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_clock_entry( + self, + id: Annotated[StrictInt, Field(description="The clock entry ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Clock Entry + + Deletes a time tracking clock entry by its ID. OAuth Scopes: time_tracking:timesheets.write + + :param id: The clock entry ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_clock_entry_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_clock_entry_with_http_info( + self, + id: Annotated[StrictInt, Field(description="The clock entry ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Clock Entry + + Deletes a time tracking clock entry by its ID. OAuth Scopes: time_tracking:timesheets.write + + :param id: The clock entry ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_clock_entry_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_clock_entry_without_preload_content( + self, + id: Annotated[StrictInt, Field(description="The clock entry ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Clock Entry + + Deletes a time tracking clock entry by its ID. OAuth Scopes: time_tracking:timesheets.write + + :param id: The clock entry ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_clock_entry_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_clock_entry_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/time-tracking/clock-entries/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_hour_entry( + self, + id: Annotated[StrictInt, Field(description="The hour entry ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Hour Entry + + Deletes a time tracking hour entry by its ID. OAuth Scopes: time_tracking:timesheets.write + + :param id: The hour entry ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_hour_entry_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_hour_entry_with_http_info( + self, + id: Annotated[StrictInt, Field(description="The hour entry ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Hour Entry + + Deletes a time tracking hour entry by its ID. OAuth Scopes: time_tracking:timesheets.write + + :param id: The hour entry ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_hour_entry_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_hour_entry_without_preload_content( + self, + id: Annotated[StrictInt, Field(description="The hour entry ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Hour Entry + + Deletes a time tracking hour entry by its ID. OAuth Scopes: time_tracking:timesheets.write + + :param id: The hour entry ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_hour_entry_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_hour_entry_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/time-tracking/hour-entries/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_project( + self, + id: Annotated[StrictInt, Field(description="The project ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Time Tracking Project + + Deletes a time tracking project by its ID. OAuth Scopes: time_tracking:project.write + + :param id: The project ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_project_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_project_with_http_info( + self, + id: Annotated[StrictInt, Field(description="The project ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Time Tracking Project + + Deletes a time tracking project by its ID. OAuth Scopes: time_tracking:project.write + + :param id: The project ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_project_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_project_without_preload_content( + self, + id: Annotated[StrictInt, Field(description="The project ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Time Tracking Project + + Deletes a time tracking project by its ID. OAuth Scopes: time_tracking:project.write + + :param id: The project ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_project_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_project_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/time-tracking/projects/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_shift_differential( + self, + id: Annotated[StrictInt, Field(description="The shift differential ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Time Tracking Shift Differential + + Deletes a time tracking shift differential by its ID. OAuth Scopes: time_tracking:shift_differentials.write + + :param id: The shift differential ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_shift_differential_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_shift_differential_with_http_info( + self, + id: Annotated[StrictInt, Field(description="The shift differential ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Time Tracking Shift Differential + + Deletes a time tracking shift differential by its ID. OAuth Scopes: time_tracking:shift_differentials.write + + :param id: The shift differential ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_shift_differential_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_shift_differential_without_preload_content( + self, + id: Annotated[StrictInt, Field(description="The shift differential ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Time Tracking Shift Differential + + Deletes a time tracking shift differential by its ID. OAuth Scopes: time_tracking:shift_differentials.write + + :param id: The shift differential ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_shift_differential_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_shift_differential_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/time-tracking/shift-differentials/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_task( + self, + id: Annotated[StrictInt, Field(description="The task ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Time Tracking Task + + Deletes a time tracking task by its ID. OAuth Scopes: time_tracking:project.write + + :param id: The task ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_task_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_task_with_http_info( + self, + id: Annotated[StrictInt, Field(description="The task ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Time Tracking Task + + Deletes a time tracking task by its ID. OAuth Scopes: time_tracking:project.write + + :param id: The task ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_task_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_task_without_preload_content( + self, + id: Annotated[StrictInt, Field(description="The task ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Time Tracking Task + + Deletes a time tracking task by its ID. OAuth Scopes: time_tracking:project.write + + :param id: The task ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_task_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_task_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/time-tracking/tasks/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_time_tracking_configuration( + self, + id: Annotated[StrictInt | None, Field(description="The time tracking configuration ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Configuration + + Soft-deletes an empty GROUP time tracking configuration. A configuration that still has enrolled employees cannot be deleted, because un-enrolling employees is governed by the employee enrollment permissions rather than the configuration permissions; move or un-enroll its employees first. Open timesheets stay on the previously-applicable rules until the next pay period boundary. The GLOBAL configuration is auto-managed and cannot be deleted. Deletion is idempotent: an ID that does not exist, or a configuration that was already deleted, also returns 204. OAuth Scopes: time_tracking:configurations.write + + :param id: The time tracking configuration ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_time_tracking_configuration_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_time_tracking_configuration_with_http_info( + self, + id: Annotated[StrictInt | None, Field(description="The time tracking configuration ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Configuration + + Soft-deletes an empty GROUP time tracking configuration. A configuration that still has enrolled employees cannot be deleted, because un-enrolling employees is governed by the employee enrollment permissions rather than the configuration permissions; move or un-enroll its employees first. Open timesheets stay on the previously-applicable rules until the next pay period boundary. The GLOBAL configuration is auto-managed and cannot be deleted. Deletion is idempotent: an ID that does not exist, or a configuration that was already deleted, also returns 204. OAuth Scopes: time_tracking:configurations.write + + :param id: The time tracking configuration ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_time_tracking_configuration_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_time_tracking_configuration_without_preload_content( + self, + id: Annotated[StrictInt | None, Field(description="The time tracking configuration ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Configuration + + Soft-deletes an empty GROUP time tracking configuration. A configuration that still has enrolled employees cannot be deleted, because un-enrolling employees is governed by the employee enrollment permissions rather than the configuration permissions; move or un-enroll its employees first. Open timesheets stay on the previously-applicable rules until the next pay period boundary. The GLOBAL configuration is auto-managed and cannot be deleted. Deletion is idempotent: an ID that does not exist, or a configuration that was already deleted, also returns 204. OAuth Scopes: time_tracking:configurations.write + + :param id: The time tracking configuration ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_time_tracking_configuration_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_time_tracking_configuration_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/time-tracking/configurations/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_time_tracking_kiosk( + self, + id: Annotated[UUID, Field(description="The time tracking kiosk ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Time Tracking Kiosk + + Soft-deletes a time tracking kiosk. Deletion is idempotent (REST API Standard 3.3): a 204 is returned whether or not the kiosk currently exists, so deleting a missing or already-deleted kiosk also returns 204. Once deleted, a kiosk is absent from List Kiosks and returns 404 on Get Kiosk. OAuth Scopes: time_tracking:kiosks.write + + :param id: The time tracking kiosk ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_time_tracking_kiosk_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_time_tracking_kiosk_with_http_info( + self, + id: Annotated[UUID, Field(description="The time tracking kiosk ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Time Tracking Kiosk + + Soft-deletes a time tracking kiosk. Deletion is idempotent (REST API Standard 3.3): a 204 is returned whether or not the kiosk currently exists, so deleting a missing or already-deleted kiosk also returns 204. Once deleted, a kiosk is absent from List Kiosks and returns 404 on Get Kiosk. OAuth Scopes: time_tracking:kiosks.write + + :param id: The time tracking kiosk ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_time_tracking_kiosk_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_time_tracking_kiosk_without_preload_content( + self, + id: Annotated[UUID, Field(description="The time tracking kiosk ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Time Tracking Kiosk + + Soft-deletes a time tracking kiosk. Deletion is idempotent (REST API Standard 3.3): a 204 is returned whether or not the kiosk currently exists, so deleting a missing or already-deleted kiosk also returns 204. Once deleted, a kiosk is absent from List Kiosks and returns 404 on Get Kiosk. OAuth Scopes: time_tracking:kiosks.write + + :param id: The time tracking kiosk ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_time_tracking_kiosk_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_time_tracking_kiosk_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/time-tracking/kiosks/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_timesheet_clock_entries_via_post( + self, + clock_entry_ids_schema: ClockEntryIdsSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Timesheet Clock Entries + + Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. OAuth Scopes: time_tracking.write + + :param clock_entry_ids_schema: (required) + :type clock_entry_ids_schema: ClockEntryIdsSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_timesheet_clock_entries_via_post_serialize( + clock_entry_ids_schema=clock_entry_ids_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_timesheet_clock_entries_via_post_with_http_info( + self, + clock_entry_ids_schema: ClockEntryIdsSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Timesheet Clock Entries + + Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. OAuth Scopes: time_tracking.write + + :param clock_entry_ids_schema: (required) + :type clock_entry_ids_schema: ClockEntryIdsSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_timesheet_clock_entries_via_post_serialize( + clock_entry_ids_schema=clock_entry_ids_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_timesheet_clock_entries_via_post_without_preload_content( + self, + clock_entry_ids_schema: ClockEntryIdsSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Timesheet Clock Entries + + Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. OAuth Scopes: time_tracking.write + + :param clock_entry_ids_schema: (required) + :type clock_entry_ids_schema: ClockEntryIdsSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_timesheet_clock_entries_via_post_serialize( + clock_entry_ids_schema=clock_entry_ids_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_timesheet_clock_entries_via_post_serialize( + self, + clock_entry_ids_schema, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if clock_entry_ids_schema is not None: + _body_params = clock_entry_ids_schema + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/time_tracking/clock_entries/delete", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_timesheet_hour_entries_via_post( + self, + hour_entry_ids_schema: HourEntryIdsSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Timesheet Hour Entries + + Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. OAuth Scopes: time_tracking.write + + :param hour_entry_ids_schema: (required) + :type hour_entry_ids_schema: HourEntryIdsSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_timesheet_hour_entries_via_post_serialize( + hour_entry_ids_schema=hour_entry_ids_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_timesheet_hour_entries_via_post_with_http_info( + self, + hour_entry_ids_schema: HourEntryIdsSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Timesheet Hour Entries + + Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. OAuth Scopes: time_tracking.write + + :param hour_entry_ids_schema: (required) + :type hour_entry_ids_schema: HourEntryIdsSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_timesheet_hour_entries_via_post_serialize( + hour_entry_ids_schema=hour_entry_ids_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_timesheet_hour_entries_via_post_without_preload_content( + self, + hour_entry_ids_schema: HourEntryIdsSchema, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Timesheet Hour Entries + + Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. OAuth Scopes: time_tracking.write + + :param hour_entry_ids_schema: (required) + :type hour_entry_ids_schema: HourEntryIdsSchema + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._delete_timesheet_hour_entries_via_post_serialize( + hour_entry_ids_schema=hour_entry_ids_schema, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "412": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_timesheet_hour_entries_via_post_serialize( + self, + hour_entry_ids_schema, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if hour_entry_ids_schema is not None: + _body_params = hour_entry_ids_schema + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/time_tracking/hour_entries/delete", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_clock_entry( + self, + id: Annotated[StrictInt | None, Field(description="The clock entry ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingClockEntryV1: + """Get Clock Entry + + Retrieves a single clock entry by its ID. `start`/`end` are ISO 8601 with the offset of the entry's `timezone`; `end` and `clockOutLocation` are null while the entry is open. Geolocation is omitted (null) when the configuration has it disabled. OAuth Scopes: time_tracking:timesheets + + :param id: The clock entry ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_clock_entry_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingClockEntryV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_clock_entry_with_http_info( + self, + id: Annotated[StrictInt | None, Field(description="The clock entry ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingClockEntryV1]: + """Get Clock Entry + + Retrieves a single clock entry by its ID. `start`/`end` are ISO 8601 with the offset of the entry's `timezone`; `end` and `clockOutLocation` are null while the entry is open. Geolocation is omitted (null) when the configuration has it disabled. OAuth Scopes: time_tracking:timesheets + + :param id: The clock entry ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_clock_entry_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingClockEntryV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_clock_entry_without_preload_content( + self, + id: Annotated[StrictInt | None, Field(description="The clock entry ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Clock Entry + + Retrieves a single clock entry by its ID. `start`/`end` are ISO 8601 with the offset of the entry's `timezone`; `end` and `clockOutLocation` are null while the entry is open. Geolocation is omitted (null) when the configuration has it disabled. OAuth Scopes: time_tracking:timesheets + + :param id: The clock entry ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_clock_entry_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingClockEntryV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_clock_entry_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/clock-entries/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_hour_entry( + self, + id: Annotated[StrictInt | None, Field(description="The hour entry ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingHourEntryV1: + """Get Hour Entry + + Retrieves a single hour entry by its ID. OAuth Scopes: time_tracking:timesheets + + :param id: The hour entry ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_hour_entry_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingHourEntryV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_hour_entry_with_http_info( + self, + id: Annotated[StrictInt | None, Field(description="The hour entry ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingHourEntryV1]: + """Get Hour Entry + + Retrieves a single hour entry by its ID. OAuth Scopes: time_tracking:timesheets + + :param id: The hour entry ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_hour_entry_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingHourEntryV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_hour_entry_without_preload_content( + self, + id: Annotated[StrictInt | None, Field(description="The hour entry ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Hour Entry + + Retrieves a single hour entry by its ID. OAuth Scopes: time_tracking:timesheets + + :param id: The hour entry ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_hour_entry_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingHourEntryV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_hour_entry_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/hour-entries/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_project( + self, + id: Annotated[StrictInt | None, Field(description="The project ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectTimeTrackingProjectV1: + """Get Time Tracking Project + + Retrieves a single time tracking project by its ID, including the list of employees assigned to it. OAuth Scopes: time_tracking:project + + :param id: The project ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_project_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "ProjectTimeTrackingProjectV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_project_with_http_info( + self, + id: Annotated[StrictInt | None, Field(description="The project ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectTimeTrackingProjectV1]: + """Get Time Tracking Project + + Retrieves a single time tracking project by its ID, including the list of employees assigned to it. OAuth Scopes: time_tracking:project + + :param id: The project ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_project_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "ProjectTimeTrackingProjectV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_project_without_preload_content( + self, + id: Annotated[StrictInt | None, Field(description="The project ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Time Tracking Project + + Retrieves a single time tracking project by its ID, including the list of employees assigned to it. OAuth Scopes: time_tracking:project + + :param id: The project ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_project_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "ProjectTimeTrackingProjectV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_project_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/projects/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_shift_differential( + self, + id: Annotated[StrictInt | None, Field(description="The shift differential ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ShiftDifferentialTimeTrackingShiftDifferentialV1: + """Get Time Tracking Shift Differential + + Retrieves a single time tracking shift differential by its ID. Archived shift differentials are returned normally; soft-deleted shift differentials return 404. OAuth Scopes: time_tracking:shift_differentials + + :param id: The shift differential ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_shift_differential_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "ShiftDifferentialTimeTrackingShiftDifferentialV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_shift_differential_with_http_info( + self, + id: Annotated[StrictInt | None, Field(description="The shift differential ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ShiftDifferentialTimeTrackingShiftDifferentialV1]: + """Get Time Tracking Shift Differential + + Retrieves a single time tracking shift differential by its ID. Archived shift differentials are returned normally; soft-deleted shift differentials return 404. OAuth Scopes: time_tracking:shift_differentials + + :param id: The shift differential ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_shift_differential_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "ShiftDifferentialTimeTrackingShiftDifferentialV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_shift_differential_without_preload_content( + self, + id: Annotated[StrictInt | None, Field(description="The shift differential ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Time Tracking Shift Differential + + Retrieves a single time tracking shift differential by its ID. Archived shift differentials are returned normally; soft-deleted shift differentials return 404. OAuth Scopes: time_tracking:shift_differentials + + :param id: The shift differential ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_shift_differential_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "ShiftDifferentialTimeTrackingShiftDifferentialV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_shift_differential_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/shift-differentials/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_task( + self, + id: Annotated[StrictInt | None, Field(description="The task ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectTimeTrackingTaskV1: + """Get Time Tracking Task + + Retrieves a single time tracking task by its ID. OAuth Scopes: time_tracking:project + + :param id: The task ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_task_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "ProjectTimeTrackingTaskV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_task_with_http_info( + self, + id: Annotated[StrictInt | None, Field(description="The task ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectTimeTrackingTaskV1]: + """Get Time Tracking Task + + Retrieves a single time tracking task by its ID. OAuth Scopes: time_tracking:project + + :param id: The task ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_task_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "ProjectTimeTrackingTaskV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_task_without_preload_content( + self, + id: Annotated[StrictInt | None, Field(description="The task ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Time Tracking Task + + Retrieves a single time tracking task by its ID. OAuth Scopes: time_tracking:project + + :param id: The task ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_task_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "ProjectTimeTrackingTaskV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_task_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/tasks/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_time_tracking_configuration( + self, + id: Annotated[StrictInt | None, Field(description="The configuration ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingTimeTrackingConfigurationV1: + """Get Configuration + + Retrieves a single time tracking configuration by its ID. Soft-deleted configurations return 404. OAuth Scopes: time_tracking:configurations + + :param id: The configuration ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_time_tracking_configuration_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingConfigurationV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_time_tracking_configuration_with_http_info( + self, + id: Annotated[StrictInt | None, Field(description="The configuration ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingTimeTrackingConfigurationV1]: + """Get Configuration + + Retrieves a single time tracking configuration by its ID. Soft-deleted configurations return 404. OAuth Scopes: time_tracking:configurations + + :param id: The configuration ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_time_tracking_configuration_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingConfigurationV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_time_tracking_configuration_without_preload_content( + self, + id: Annotated[StrictInt | None, Field(description="The configuration ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Configuration + + Retrieves a single time tracking configuration by its ID. Soft-deleted configurations return 404. OAuth Scopes: time_tracking:configurations + + :param id: The configuration ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_time_tracking_configuration_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingConfigurationV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_time_tracking_configuration_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/configurations/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_time_tracking_employee_enrollment( + self, + employee_id: Annotated[StrictInt | None, Field(description="The employee ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingEmployeeTimeTrackingDataV1: + """Get Employee Enrollment + + Gets an employee's time tracking enrollment data. OAuth Scopes: time_tracking:employees + + :param employee_id: The employee ID. (required) + :type employee_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_time_tracking_employee_enrollment_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingEmployeeTimeTrackingDataV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_time_tracking_employee_enrollment_with_http_info( + self, + employee_id: Annotated[StrictInt | None, Field(description="The employee ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingEmployeeTimeTrackingDataV1]: + """Get Employee Enrollment + + Gets an employee's time tracking enrollment data. OAuth Scopes: time_tracking:employees + + :param employee_id: The employee ID. (required) + :type employee_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_time_tracking_employee_enrollment_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingEmployeeTimeTrackingDataV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_time_tracking_employee_enrollment_without_preload_content( + self, + employee_id: Annotated[StrictInt | None, Field(description="The employee ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Employee Enrollment + + Gets an employee's time tracking enrollment data. OAuth Scopes: time_tracking:employees + + :param employee_id: The employee ID. (required) + :type employee_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_time_tracking_employee_enrollment_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingEmployeeTimeTrackingDataV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_time_tracking_employee_enrollment_serialize( + self, + employee_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if employee_id is not None: + _path_params["employeeId"] = employee_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/employees/{employeeId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_time_tracking_kiosk( + self, + id: Annotated[UUID, Field(description="The time tracking kiosk ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingTimeTrackingKioskV1: + """Get Time Tracking Kiosk + + Retrieves a single time tracking kiosk by its ID. Deleted kiosks return 404. OAuth Scopes: time_tracking:kiosks + + :param id: The time tracking kiosk ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_time_tracking_kiosk_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingKioskV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_time_tracking_kiosk_with_http_info( + self, + id: Annotated[UUID, Field(description="The time tracking kiosk ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingTimeTrackingKioskV1]: + """Get Time Tracking Kiosk + + Retrieves a single time tracking kiosk by its ID. Deleted kiosks return 404. OAuth Scopes: time_tracking:kiosks + + :param id: The time tracking kiosk ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_time_tracking_kiosk_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingKioskV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_time_tracking_kiosk_without_preload_content( + self, + id: Annotated[UUID, Field(description="The time tracking kiosk ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Time Tracking Kiosk + + Retrieves a single time tracking kiosk by its ID. Deleted kiosks return 404. OAuth Scopes: time_tracking:kiosks + + :param id: The time tracking kiosk ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_time_tracking_kiosk_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingKioskV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_time_tracking_kiosk_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/kiosks/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_time_tracking_time_clock( + self, + id: Annotated[UUID, Field(description="The time tracking time clock ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingTimeTrackingTimeClockV1: + """Get Time Tracking Time Clock + + Retrieves a single time tracking time clock by its ID. Device health flags are reported as null while device status is temporarily unavailable. OAuth Scopes: time_tracking:time_clocks + + :param id: The time tracking time clock ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_time_tracking_time_clock_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingTimeClockV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "503": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_time_tracking_time_clock_with_http_info( + self, + id: Annotated[UUID, Field(description="The time tracking time clock ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingTimeTrackingTimeClockV1]: + """Get Time Tracking Time Clock + + Retrieves a single time tracking time clock by its ID. Device health flags are reported as null while device status is temporarily unavailable. OAuth Scopes: time_tracking:time_clocks + + :param id: The time tracking time clock ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_time_tracking_time_clock_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingTimeClockV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "503": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_time_tracking_time_clock_without_preload_content( + self, + id: Annotated[UUID, Field(description="The time tracking time clock ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Time Tracking Time Clock + + Retrieves a single time tracking time clock by its ID. Device health flags are reported as null while device status is temporarily unavailable. OAuth Scopes: time_tracking:time_clocks + + :param id: The time tracking time clock ID. (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_time_tracking_time_clock_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingTimeClockV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "503": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_time_tracking_time_clock_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/time-clocks/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_timesheet( + self, + id: Annotated[StrictInt | None, Field(description="The timesheet ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingTimesheetV1: + """Get Timesheet + + Retrieves a single timesheet by its ID. The `status` is derived at read time (`OPEN`, `PENDING_APPROVAL`, or `APPROVED`) and `type` is returned in `UPPER_SNAKE_CASE` (`SINGLE`, `CLOCK`, `MULTIPLE`, or `HOUR`). Timesheets for pay periods that have not started yet return 404. OAuth Scopes: time_tracking:timesheets + + :param id: The timesheet ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_timesheet_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimesheetV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_timesheet_with_http_info( + self, + id: Annotated[StrictInt | None, Field(description="The timesheet ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingTimesheetV1]: + """Get Timesheet + + Retrieves a single timesheet by its ID. The `status` is derived at read time (`OPEN`, `PENDING_APPROVAL`, or `APPROVED`) and `type` is returned in `UPPER_SNAKE_CASE` (`SINGLE`, `CLOCK`, `MULTIPLE`, or `HOUR`). Timesheets for pay periods that have not started yet return 404. OAuth Scopes: time_tracking:timesheets + + :param id: The timesheet ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_timesheet_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimesheetV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_timesheet_without_preload_content( + self, + id: Annotated[StrictInt | None, Field(description="The timesheet ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Timesheet + + Retrieves a single timesheet by its ID. The `status` is derived at read time (`OPEN`, `PENDING_APPROVAL`, or `APPROVED`) and `type` is returned in `UPPER_SNAKE_CASE` (`SINGLE`, `CLOCK`, `MULTIPLE`, or `HOUR`). Timesheets for pay periods that have not started yet return 404. OAuth Scopes: time_tracking:timesheets + + :param id: The timesheet ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_timesheet_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimesheetV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_timesheet_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/timesheets/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_timesheet_summary( + self, + id: Annotated[StrictInt, Field(description="The timesheet ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimesheetTimesheetDailySummaryV1: + """Get Timesheet Summary + + Returns the daily breakdown of hours for a timesheet, including regular, overtime, and double-time hours per day. Every date in the pay period is represented; days with no logged hours return 0.0 in each bucket. OAuth Scopes: time_tracking:timesheets + + :param id: The timesheet ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_timesheet_summary_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimesheetTimesheetDailySummaryV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_timesheet_summary_with_http_info( + self, + id: Annotated[StrictInt, Field(description="The timesheet ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimesheetTimesheetDailySummaryV1]: + """Get Timesheet Summary + + Returns the daily breakdown of hours for a timesheet, including regular, overtime, and double-time hours per day. Every date in the pay period is represented; days with no logged hours return 0.0 in each bucket. OAuth Scopes: time_tracking:timesheets + + :param id: The timesheet ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_timesheet_summary_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimesheetTimesheetDailySummaryV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_timesheet_summary_without_preload_content( + self, + id: Annotated[StrictInt, Field(description="The timesheet ID.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Timesheet Summary + + Returns the daily breakdown of hours for a timesheet, including regular, overtime, and double-time hours per day. Every date in the pay period is represented; days with no logged hours return 0.0 in each bucket. OAuth Scopes: time_tracking:timesheets + + :param id: The timesheet ID. (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_timesheet_summary_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimesheetTimesheetDailySummaryV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_timesheet_summary_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/timesheets/{id}/summary", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_clock_entries( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Supported operators: `eq`, `ge`, `le`, `and`. Filterable fields: `timesheetId`, `employeeId`, `start`, `end`. Examples: `employeeId eq 40342`, `start ge 2026-03-16T00:00:00Z and start le 2026-03-29T23:59:59Z`, `timesheetId eq 9001`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `start desc` or `updatedAt asc`. Allowed fields: `start`, `end`, `updatedAt`. Defaults to `start desc`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=200, strict=True, ge=10)] | None, + Field(description="The number of items per page. Defaults to 50, minimum 10, maximum 200."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingPaginatedClockEntriesResponseV1: + """List Clock Entries + + Returns a paginated list of time tracking clock entries. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 50, min 10, max 200). Filterable fields: `timesheetId`, `employeeId`, `start`, `end`. Sortable fields: `start`, `end`, `updatedAt`. Default sort is `start desc`. Geolocation is omitted (null) for entries whose configuration has it disabled. OAuth Scopes: time_tracking:timesheets + + :param filter: OData v4 filter expression. Supported operators: `eq`, `ge`, `le`, `and`. Filterable fields: `timesheetId`, `employeeId`, `start`, `end`. Examples: `employeeId eq 40342`, `start ge 2026-03-16T00:00:00Z and start le 2026-03-29T23:59:59Z`, `timesheetId eq 9001`. + :type filter: str + :param sort: Sort expression like `start desc` or `updatedAt asc`. Allowed fields: `start`, `end`, `updatedAt`. Defaults to `start desc`. + :type sort: str + :param page: The page number to retrieve. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 50, minimum 10, maximum 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_clock_entries_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedClockEntriesResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_clock_entries_with_http_info( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Supported operators: `eq`, `ge`, `le`, `and`. Filterable fields: `timesheetId`, `employeeId`, `start`, `end`. Examples: `employeeId eq 40342`, `start ge 2026-03-16T00:00:00Z and start le 2026-03-29T23:59:59Z`, `timesheetId eq 9001`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `start desc` or `updatedAt asc`. Allowed fields: `start`, `end`, `updatedAt`. Defaults to `start desc`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=200, strict=True, ge=10)] | None, + Field(description="The number of items per page. Defaults to 50, minimum 10, maximum 200."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingPaginatedClockEntriesResponseV1]: + """List Clock Entries + + Returns a paginated list of time tracking clock entries. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 50, min 10, max 200). Filterable fields: `timesheetId`, `employeeId`, `start`, `end`. Sortable fields: `start`, `end`, `updatedAt`. Default sort is `start desc`. Geolocation is omitted (null) for entries whose configuration has it disabled. OAuth Scopes: time_tracking:timesheets + + :param filter: OData v4 filter expression. Supported operators: `eq`, `ge`, `le`, `and`. Filterable fields: `timesheetId`, `employeeId`, `start`, `end`. Examples: `employeeId eq 40342`, `start ge 2026-03-16T00:00:00Z and start le 2026-03-29T23:59:59Z`, `timesheetId eq 9001`. + :type filter: str + :param sort: Sort expression like `start desc` or `updatedAt asc`. Allowed fields: `start`, `end`, `updatedAt`. Defaults to `start desc`. + :type sort: str + :param page: The page number to retrieve. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 50, minimum 10, maximum 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_clock_entries_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedClockEntriesResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_clock_entries_without_preload_content( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Supported operators: `eq`, `ge`, `le`, `and`. Filterable fields: `timesheetId`, `employeeId`, `start`, `end`. Examples: `employeeId eq 40342`, `start ge 2026-03-16T00:00:00Z and start le 2026-03-29T23:59:59Z`, `timesheetId eq 9001`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `start desc` or `updatedAt asc`. Allowed fields: `start`, `end`, `updatedAt`. Defaults to `start desc`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=200, strict=True, ge=10)] | None, + Field(description="The number of items per page. Defaults to 50, minimum 10, maximum 200."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Clock Entries + + Returns a paginated list of time tracking clock entries. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 50, min 10, max 200). Filterable fields: `timesheetId`, `employeeId`, `start`, `end`. Sortable fields: `start`, `end`, `updatedAt`. Default sort is `start desc`. Geolocation is omitted (null) for entries whose configuration has it disabled. OAuth Scopes: time_tracking:timesheets + + :param filter: OData v4 filter expression. Supported operators: `eq`, `ge`, `le`, `and`. Filterable fields: `timesheetId`, `employeeId`, `start`, `end`. Examples: `employeeId eq 40342`, `start ge 2026-03-16T00:00:00Z and start le 2026-03-29T23:59:59Z`, `timesheetId eq 9001`. + :type filter: str + :param sort: Sort expression like `start desc` or `updatedAt asc`. Allowed fields: `start`, `end`, `updatedAt`. Defaults to `start desc`. + :type sort: str + :param page: The page number to retrieve. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 50, minimum 10, maximum 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_clock_entries_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedClockEntriesResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_clock_entries_serialize( + self, + filter, + sort, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if filter is not None: + _query_params.append(("filter", filter)) + + if sort is not None: + _query_params.append(("sort", sort)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/clock-entries", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_hour_entries( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Supported operators: `eq`, `ge`, `le`, `and`. Filterable fields: `timesheetId`, `employeeId`, `date`. Examples: `employeeId eq 40342`, `date ge 2025-01-01 and date le 2025-01-31`, `timesheetId eq 9001`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `date desc` or `updatedAt asc`. Allowed fields: `date`, `updatedAt`. Defaults to `date desc`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=200, strict=True, ge=10)] | None, + Field(description="The number of items per page. Defaults to 50, minimum 10, maximum 200."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingPaginatedHourEntriesResponseV1: + """List Hour Entries + + Returns a paginated list of time tracking hour entries. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 50, min 10, max 200). Filterable fields: `timesheetId`, `employeeId`, `date`. Sortable fields: `date`, `updatedAt`. Default sort is `date desc`. OAuth Scopes: time_tracking:timesheets + + :param filter: OData v4 filter expression. Supported operators: `eq`, `ge`, `le`, `and`. Filterable fields: `timesheetId`, `employeeId`, `date`. Examples: `employeeId eq 40342`, `date ge 2025-01-01 and date le 2025-01-31`, `timesheetId eq 9001`. + :type filter: str + :param sort: Sort expression like `date desc` or `updatedAt asc`. Allowed fields: `date`, `updatedAt`. Defaults to `date desc`. + :type sort: str + :param page: The page number to retrieve. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 50, minimum 10, maximum 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_hour_entries_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedHourEntriesResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_hour_entries_with_http_info( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Supported operators: `eq`, `ge`, `le`, `and`. Filterable fields: `timesheetId`, `employeeId`, `date`. Examples: `employeeId eq 40342`, `date ge 2025-01-01 and date le 2025-01-31`, `timesheetId eq 9001`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `date desc` or `updatedAt asc`. Allowed fields: `date`, `updatedAt`. Defaults to `date desc`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=200, strict=True, ge=10)] | None, + Field(description="The number of items per page. Defaults to 50, minimum 10, maximum 200."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TimeTrackingPaginatedHourEntriesResponseV1]: + """List Hour Entries + + Returns a paginated list of time tracking hour entries. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 50, min 10, max 200). Filterable fields: `timesheetId`, `employeeId`, `date`. Sortable fields: `date`, `updatedAt`. Default sort is `date desc`. OAuth Scopes: time_tracking:timesheets + + :param filter: OData v4 filter expression. Supported operators: `eq`, `ge`, `le`, `and`. Filterable fields: `timesheetId`, `employeeId`, `date`. Examples: `employeeId eq 40342`, `date ge 2025-01-01 and date le 2025-01-31`, `timesheetId eq 9001`. + :type filter: str + :param sort: Sort expression like `date desc` or `updatedAt asc`. Allowed fields: `date`, `updatedAt`. Defaults to `date desc`. + :type sort: str + :param page: The page number to retrieve. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 50, minimum 10, maximum 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_hour_entries_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedHourEntriesResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_hour_entries_without_preload_content( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Supported operators: `eq`, `ge`, `le`, `and`. Filterable fields: `timesheetId`, `employeeId`, `date`. Examples: `employeeId eq 40342`, `date ge 2025-01-01 and date le 2025-01-31`, `timesheetId eq 9001`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `date desc` or `updatedAt asc`. Allowed fields: `date`, `updatedAt`. Defaults to `date desc`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=200, strict=True, ge=10)] | None, + Field(description="The number of items per page. Defaults to 50, minimum 10, maximum 200."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Hour Entries + + Returns a paginated list of time tracking hour entries. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 50, min 10, max 200). Filterable fields: `timesheetId`, `employeeId`, `date`. Sortable fields: `date`, `updatedAt`. Default sort is `date desc`. OAuth Scopes: time_tracking:timesheets + + :param filter: OData v4 filter expression. Supported operators: `eq`, `ge`, `le`, `and`. Filterable fields: `timesheetId`, `employeeId`, `date`. Examples: `employeeId eq 40342`, `date ge 2025-01-01 and date le 2025-01-31`, `timesheetId eq 9001`. + :type filter: str + :param sort: Sort expression like `date desc` or `updatedAt asc`. Allowed fields: `date`, `updatedAt`. Defaults to `date desc`. + :type sort: str + :param page: The page number to retrieve. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 50, minimum 10, maximum 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_hour_entries_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedHourEntriesResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_hour_entries_serialize( + self, + filter, + sort, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if filter is not None: + _query_params.append(("filter", filter)) + + if sort is not None: + _query_params.append(("sort", sort)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/hour-entries", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_project_tasks( + self, + project_id: Annotated[StrictInt | None, Field(description="The project ID.")], + statuses: Annotated[ + list[StrictStr] | None, + Field( + description="Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve (1-indexed)."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=500, strict=True, ge=1)] | None, + Field(description="The maximum number of items per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectPaginatedTasksResponseV1: + """List Time Tracking Project Tasks + + Returns a paginated list of tasks for the specified time tracking project. Tasks are filtered by `statuses[]`, which defaults to `active`. OAuth Scopes: time_tracking:project + + :param project_id: The project ID. (required) + :type project_id: int + :param statuses: Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks. + :type statuses: List[str] + :param page: The page number to retrieve (1-indexed). + :type page: int + :param page_size: The maximum number of items per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_project_tasks_serialize( + project_id=project_id, + statuses=statuses, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ProjectPaginatedTasksResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_project_tasks_with_http_info( + self, + project_id: Annotated[StrictInt | None, Field(description="The project ID.")], + statuses: Annotated[ + list[StrictStr] | None, + Field( + description="Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve (1-indexed)."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=500, strict=True, ge=1)] | None, + Field(description="The maximum number of items per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectPaginatedTasksResponseV1]: + """List Time Tracking Project Tasks + + Returns a paginated list of tasks for the specified time tracking project. Tasks are filtered by `statuses[]`, which defaults to `active`. OAuth Scopes: time_tracking:project + + :param project_id: The project ID. (required) + :type project_id: int + :param statuses: Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks. + :type statuses: List[str] + :param page: The page number to retrieve (1-indexed). + :type page: int + :param page_size: The maximum number of items per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_project_tasks_serialize( + project_id=project_id, + statuses=statuses, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ProjectPaginatedTasksResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_project_tasks_without_preload_content( + self, + project_id: Annotated[StrictInt | None, Field(description="The project ID.")], + statuses: Annotated[ + list[StrictStr] | None, + Field( + description="Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page number to retrieve (1-indexed)."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=500, strict=True, ge=1)] | None, + Field(description="The maximum number of items per page."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Time Tracking Project Tasks + + Returns a paginated list of tasks for the specified time tracking project. Tasks are filtered by `statuses[]`, which defaults to `active`. OAuth Scopes: time_tracking:project + + :param project_id: The project ID. (required) + :type project_id: int + :param statuses: Statuses to include. Defaults to `active` (excludes deleted tasks). Use both values to include active and deleted tasks. + :type statuses: List[str] + :param page: The page number to retrieve (1-indexed). + :type page: int + :param page_size: The maximum number of items per page. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_project_tasks_serialize( + project_id=project_id, + statuses=statuses, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ProjectPaginatedTasksResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_project_tasks_serialize( + self, + project_id, + statuses, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = { + "statuses[]": "multi", + } + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + # process the query parameters + if statuses is not None: + _query_params.append(("statuses[]", statuses)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/projects/{projectId}/tasks", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_projects( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The starting page for pagination. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=500, strict=True, ge=1)] | None, + Field(description="The number of items per page. Defaults to 100, maximum 500."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectPaginatedTimeTrackingProjectsResponseV1: + """List Time Tracking Projects + + Returns a paginated list of time tracking projects. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 100, max 500). OAuth Scopes: time_tracking:project + + :param filter: OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`. + :type filter: str + :param sort: Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. + :type sort: str + :param page: The starting page for pagination. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 100, maximum 500. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_projects_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ProjectPaginatedTimeTrackingProjectsResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_projects_with_http_info( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The starting page for pagination. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=500, strict=True, ge=1)] | None, + Field(description="The number of items per page. Defaults to 100, maximum 500."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectPaginatedTimeTrackingProjectsResponseV1]: + """List Time Tracking Projects + + Returns a paginated list of time tracking projects. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 100, max 500). OAuth Scopes: time_tracking:project + + :param filter: OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`. + :type filter: str + :param sort: Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. + :type sort: str + :param page: The starting page for pagination. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 100, maximum 500. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_projects_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ProjectPaginatedTimeTrackingProjectsResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_projects_without_preload_content( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`." + ), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The starting page for pagination. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=500, strict=True, ge=1)] | None, + Field(description="The number of items per page. Defaults to 100, maximum 500."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Time Tracking Projects + + Returns a paginated list of time tracking projects. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 100, max 500). OAuth Scopes: time_tracking:project + + :param filter: OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`. + :type filter: str + :param sort: Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. + :type sort: str + :param page: The starting page for pagination. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 100, maximum 500. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_projects_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ProjectPaginatedTimeTrackingProjectsResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_projects_serialize( + self, + filter, + sort, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if filter is not None: + _query_params.append(("filter", filter)) + + if sort is not None: + _query_params.append(("sort", sort)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/projects", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_shift_differentials( + self, + filter: Annotated[ + StrictStr | None, + Field(description="OData v4 filter expression. Filterable fields: `name`, `rate`, `rateType`, `archived`."), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The starting page for pagination. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of items per page. Defaults to 20, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1: + """List Time Tracking Shift Differentials + + Returns a paginated list of time tracking shift differentials. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, max 100). Archived rows are excluded by default; include them with `filter=archived eq true`. Soft-deleted rows are never returned. OAuth Scopes: time_tracking:shift_differentials + + :param filter: OData v4 filter expression. Filterable fields: `name`, `rate`, `rateType`, `archived`. + :type filter: str + :param sort: Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. + :type sort: str + :param page: The starting page for pagination. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 20, maximum 100. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_shift_differentials_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_shift_differentials_with_http_info( + self, + filter: Annotated[ + StrictStr | None, + Field(description="OData v4 filter expression. Filterable fields: `name`, `rate`, `rateType`, `archived`."), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The starting page for pagination. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of items per page. Defaults to 20, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1]: + """List Time Tracking Shift Differentials + + Returns a paginated list of time tracking shift differentials. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, max 100). Archived rows are excluded by default; include them with `filter=archived eq true`. Soft-deleted rows are never returned. OAuth Scopes: time_tracking:shift_differentials + + :param filter: OData v4 filter expression. Filterable fields: `name`, `rate`, `rateType`, `archived`. + :type filter: str + :param sort: Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. + :type sort: str + :param page: The starting page for pagination. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 20, maximum 100. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_shift_differentials_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_shift_differentials_without_preload_content( + self, + filter: Annotated[ + StrictStr | None, + Field(description="OData v4 filter expression. Filterable fields: `name`, `rate`, `rateType`, `archived`."), + ] = None, + sort: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`." + ), + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The starting page for pagination. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of items per page. Defaults to 20, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Time Tracking Shift Differentials + + Returns a paginated list of time tracking shift differentials. Supports OData-style `filter` and `sort` query parameters. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, max 100). Archived rows are excluded by default; include them with `filter=archived eq true`. Soft-deleted rows are never returned. OAuth Scopes: time_tracking:shift_differentials + + :param filter: OData v4 filter expression. Filterable fields: `name`, `rate`, `rateType`, `archived`. + :type filter: str + :param sort: Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. + :type sort: str + :param page: The starting page for pagination. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 20, maximum 100. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_shift_differentials_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_shift_differentials_serialize( + self, + filter, + sort, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + if filter is not None: + _query_params.append(("filter", filter)) + + if sort is not None: + _query_params.append(("sort", sort)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: list[str] = ["basic", "oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/time-tracking/shift-differentials", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def list_time_tracking_configurations( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `name`, `type`, `timesheetType`. Example: `type eq 'GROUP' and timesheetType eq 'CLOCK'`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`." + ), + ] = None, + select: Annotated[ + StrictStr | None, Field(description="Comma-separated list of properties to return (sparse fieldsets).") + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page to return. Defaults to 1.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=1)] | None, + Field(description="The number of items per page. Defaults to 20, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1: + """List Configurations + + Returns a paginated list of time tracking configurations. Both GLOBAL and GROUP configurations are returned; soft-deleted configurations are never returned. Supports an OData-style `filter`, an `orderBy` sort expression, and `select` sparse fieldsets. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, max 100). OAuth Scopes: time_tracking:configurations + + :param filter: OData v4 filter expression. Filterable fields: `name`, `type`, `timesheetType`. Example: `type eq 'GROUP' and timesheetType eq 'CLOCK'`. + :type filter: str + :param order_by: Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. + :type order_by: str + :param select: Comma-separated list of properties to return (sparse fieldsets). + :type select: str + :param page: The page to return. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 20, maximum 100. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._list_time_tracking_configurations_serialize( + filter=filter, + order_by=order_by, + select=select, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_time_tracking_configurations_with_http_info( + self, + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `name`, `type`, `timesheetType`. Example: `type eq 'GROUP' and timesheetType eq 'CLOCK'`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + select: Annotated[ + StrictStr | None, Field(description="Comma-separated list of properties to return (sparse fieldsets).") + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page to return. Defaults to 1.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=1)] | None, + Field(description="The number of items per page. Defaults to 20, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingTimeTrackingBreakV1]: - """Get Break + ) -> ApiResponse[TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1]: + """List Configurations - Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration. + Returns a paginated list of time tracking configurations. Both GLOBAL and GROUP configurations are returned; soft-deleted configurations are never returned. Supports an OData-style `filter`, an `orderBy` sort expression, and `select` sparse fieldsets. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, max 100). OAuth Scopes: time_tracking:configurations - :param id: The break ID. (required) - :type id: str + :param filter: OData v4 filter expression. Filterable fields: `name`, `type`, `timesheetType`. Example: `type eq 'GROUP' and timesheetType eq 'CLOCK'`. + :type filter: str + :param order_by: Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. + :type order_by: str + :param select: Comma-separated list of properties to return (sparse fieldsets). + :type select: str + :param page: The page to return. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 20, maximum 100. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3717,56 +10217,80 @@ def get_break_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_break_serialize( - id=id, + _param = self._list_time_tracking_configurations_serialize( + filter=filter, + order_by=order_by, + select=select, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_break_without_preload_content( + def list_time_tracking_configurations_without_preload_content( self, - id: Annotated[UUID, Field(description="The break ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `name`, `type`, `timesheetType`. Example: `type eq 'GROUP' and timesheetType eq 'CLOCK'`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`." + ), + ] = None, + select: Annotated[ + StrictStr | None, Field(description="Comma-separated list of properties to return (sparse fieldsets).") + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page to return. Defaults to 1.") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=1)] | None, + Field(description="The number of items per page. Defaults to 20, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Break + """List Configurations - Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration. + Returns a paginated list of time tracking configurations. Both GLOBAL and GROUP configurations are returned; soft-deleted configurations are never returned. Supports an OData-style `filter`, an `orderBy` sort expression, and `select` sparse fieldsets. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, max 100). OAuth Scopes: time_tracking:configurations - :param id: The break ID. (required) - :type id: str + :param filter: OData v4 filter expression. Filterable fields: `name`, `type`, `timesheetType`. Example: `type eq 'GROUP' and timesheetType eq 'CLOCK'`. + :type filter: str + :param order_by: Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `createdAt`, `updatedAt`. + :type order_by: str + :param select: Comma-separated list of properties to return (sparse fieldsets). + :type select: str + :param page: The page to return. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 20, maximum 100. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3787,32 +10311,36 @@ def get_break_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_break_serialize( - id=id, + _param = self._list_time_tracking_configurations_serialize( + filter=filter, + order_by=order_by, + select=select, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_break_serialize( + def _list_time_tracking_configurations_serialize( self, - id, + filter, + order_by, + select, + page, + page_size, _request_auth, _content_type, _headers, @@ -3821,45 +10349,46 @@ def _get_break_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters + if filter is not None: + _query_params.append(("filter", filter)) + + if order_by is not None: + _query_params.append(("orderBy", order_by)) + + if select is not None: + _query_params.append(("select", select)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/time-tracking/breaks/{id}', + method="GET", + resource_path="/api/v1/time-tracking/configurations", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3869,38 +10398,56 @@ def _get_break_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_break_policy( + def list_time_tracking_employees( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - include_counts: Annotated[Optional[StrictBool], Field(description="Include employee and break counts")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `enabled`, `configurationId`. Example: `enabled eq true and configurationId eq 3`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `employeeId asc, createdAt desc`. Allowed fields: `employeeId`, `enabledOn`, `createdAt`, `updatedAt`." + ), + ] = None, + select: Annotated[ + StrictStr | None, Field(description="Comma-separated list of properties to return (sparse fieldsets).") + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page to return. Defaults to 1.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of items per page. Defaults to 20, minimum 10, maximum 100."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingTimeTrackingBreakPolicyV1: - """Get Break Policy + ) -> TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1: + """List Enrolled Employees - Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks. + Returns a paginated list of employee time tracking enrollments. Both enabled and disabled enrollments are returned; narrow with the `enabled` filter. Supports an OData-style `filter`, an `orderBy` sort expression, and `select` sparse fieldsets. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, minimum 10, maximum 100). OAuth Scopes: time_tracking:employees - :param id: The break policy ID. (required) - :type id: str - :param include_counts: Include employee and break counts - :type include_counts: bool + :param filter: OData v4 filter expression. Filterable fields: `enabled`, `configurationId`. Example: `enabled eq true and configurationId eq 3`. + :type filter: str + :param order_by: Sort expression like `employeeId asc, createdAt desc`. Allowed fields: `employeeId`, `enabledOn`, `createdAt`, `updatedAt`. + :type order_by: str + :param select: Comma-separated list of properties to return (sparse fieldsets). + :type select: str + :param page: The page to return. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 20, minimum 10, maximum 100. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3921,61 +10468,80 @@ def get_break_policy( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_break_policy_serialize( - id=id, - include_counts=include_counts, + _param = self._list_time_tracking_employees_serialize( + filter=filter, + order_by=order_by, + select=select, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_break_policy_with_http_info( + def list_time_tracking_employees_with_http_info( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - include_counts: Annotated[Optional[StrictBool], Field(description="Include employee and break counts")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `enabled`, `configurationId`. Example: `enabled eq true and configurationId eq 3`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `employeeId asc, createdAt desc`. Allowed fields: `employeeId`, `enabledOn`, `createdAt`, `updatedAt`." + ), + ] = None, + select: Annotated[ + StrictStr | None, Field(description="Comma-separated list of properties to return (sparse fieldsets).") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page to return. Defaults to 1.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of items per page. Defaults to 20, minimum 10, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingTimeTrackingBreakPolicyV1]: - """Get Break Policy + ) -> ApiResponse[TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1]: + """List Enrolled Employees - Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks. + Returns a paginated list of employee time tracking enrollments. Both enabled and disabled enrollments are returned; narrow with the `enabled` filter. Supports an OData-style `filter`, an `orderBy` sort expression, and `select` sparse fieldsets. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, minimum 10, maximum 100). OAuth Scopes: time_tracking:employees - :param id: The break policy ID. (required) - :type id: str - :param include_counts: Include employee and break counts - :type include_counts: bool + :param filter: OData v4 filter expression. Filterable fields: `enabled`, `configurationId`. Example: `enabled eq true and configurationId eq 3`. + :type filter: str + :param order_by: Sort expression like `employeeId asc, createdAt desc`. Allowed fields: `employeeId`, `enabledOn`, `createdAt`, `updatedAt`. + :type order_by: str + :param select: Comma-separated list of properties to return (sparse fieldsets). + :type select: str + :param page: The page to return. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 20, minimum 10, maximum 100. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3996,61 +10562,80 @@ def get_break_policy_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_break_policy_serialize( - id=id, - include_counts=include_counts, + _param = self._list_time_tracking_employees_serialize( + filter=filter, + order_by=order_by, + select=select, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_break_policy_without_preload_content( + def list_time_tracking_employees_without_preload_content( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - include_counts: Annotated[Optional[StrictBool], Field(description="Include employee and break counts")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `enabled`, `configurationId`. Example: `enabled eq true and configurationId eq 3`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `employeeId asc, createdAt desc`. Allowed fields: `employeeId`, `enabledOn`, `createdAt`, `updatedAt`." + ), + ] = None, + select: Annotated[ + StrictStr | None, Field(description="Comma-separated list of properties to return (sparse fieldsets).") + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, Field(description="The page to return. Defaults to 1.") + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of items per page. Defaults to 20, minimum 10, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Break Policy + """List Enrolled Employees - Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks. + Returns a paginated list of employee time tracking enrollments. Both enabled and disabled enrollments are returned; narrow with the `enabled` filter. Supports an OData-style `filter`, an `orderBy` sort expression, and `select` sparse fieldsets. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, minimum 10, maximum 100). OAuth Scopes: time_tracking:employees - :param id: The break policy ID. (required) - :type id: str - :param include_counts: Include employee and break counts - :type include_counts: bool + :param filter: OData v4 filter expression. Filterable fields: `enabled`, `configurationId`. Example: `enabled eq true and configurationId eq 3`. + :type filter: str + :param order_by: Sort expression like `employeeId asc, createdAt desc`. Allowed fields: `employeeId`, `enabledOn`, `createdAt`, `updatedAt`. + :type order_by: str + :param select: Comma-separated list of properties to return (sparse fieldsets). + :type select: str + :param page: The page to return. Defaults to 1. + :type page: int + :param page_size: The number of items per page. Defaults to 20, minimum 10, maximum 100. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4071,35 +10656,36 @@ def get_break_policy_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_break_policy_serialize( - id=id, - include_counts=include_counts, + _param = self._list_time_tracking_employees_serialize( + filter=filter, + order_by=order_by, + select=select, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_break_policy_serialize( + def _list_time_tracking_employees_serialize( self, - id, - include_counts, + filter, + order_by, + select, + page, + page_size, _request_auth, _content_type, _headers, @@ -4108,49 +10694,46 @@ def _get_break_policy_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters - if include_counts is not None: - - _query_params.append(('includeCounts', include_counts)) - + if filter is not None: + _query_params.append(("filter", filter)) + + if order_by is not None: + _query_params.append(("orderBy", order_by)) + + if select is not None: + _query_params.append(("select", select)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/time-tracking/break-policies/{id}', + method="GET", + resource_path="/api/v1/time-tracking/employees", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4160,41 +10743,57 @@ def _get_break_policy_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_break_assessments( + def list_time_tracking_kiosks( self, - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of items to skip before returning results. Defaults to 0.")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=0)]], Field(description="Maximum number of items to return. Defaults to 100. Maximum is 500.")] = None, - filter: Annotated[Optional[StrictStr], Field(description="OData v4 filter expression. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `createdAt`, `updatedAt`, `expectedDuration`, `recordedDuration`, `durationDifference`.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `name`, `lastUsed`, `createdAt`, `updatedAt`. Example: `name eq 'Front Desk Kiosk'`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `lastUsed`, `createdAt`, `updatedAt`. Defaults to `name asc`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + select: Annotated[ + StrictStr | None, Field(description="Comma-separated list of properties to return (sparse fieldsets).") + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of kiosks per page. Defaults to 20, minimum 10, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingPaginatedBreakAssessmentsResponseV1: - """List Break Assessments + ) -> TimeTrackingPaginatedTimeTrackingKiosksResponseV1: + """List Time Tracking Kiosks - Returns a paginated list of break assessments. A break assessment records whether an employee complied with their assigned break policy for a given day, along with any violations. Use the `filter` parameter to scope results by employee, date, result, or other fields. Use `offset` and `limit` for pagination; `limit` defaults to 100 and may not exceed 500. + Returns a paginated list of time tracking kiosks. Deleted kiosks are never returned. Supports an OData-style `filter`, an `orderBy` sort expression, and `select` sparse fieldsets. Results are sorted by name ascending when `orderBy` is omitted; name ordering is case-insensitive. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, max 100). OAuth Scopes: time_tracking:kiosks - :param offset: Number of items to skip before returning results. Defaults to 0. - :type offset: int - :param limit: Maximum number of items to return. Defaults to 100. Maximum is 500. - :type limit: int - :param filter: OData v4 filter expression. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `createdAt`, `updatedAt`, `expectedDuration`, `recordedDuration`, `durationDifference`. + :param filter: OData v4 filter expression. Filterable fields: `name`, `lastUsed`, `createdAt`, `updatedAt`. Example: `name eq 'Front Desk Kiosk'`. :type filter: str + :param order_by: Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `lastUsed`, `createdAt`, `updatedAt`. Defaults to `name asc`. + :type order_by: str + :param select: Comma-separated list of properties to return (sparse fieldsets). + :type select: str + :param page: The page to retrieve. Defaults to 1. + :type page: int + :param page_size: The number of kiosks per page. Defaults to 20, minimum 10, maximum 100. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4215,63 +10814,81 @@ def list_break_assessments( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_break_assessments_serialize( - offset=offset, - limit=limit, + _param = self._list_time_tracking_kiosks_serialize( filter=filter, + order_by=order_by, + select=select, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakAssessmentsResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedTimeTrackingKiosksResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_break_assessments_with_http_info( + def list_time_tracking_kiosks_with_http_info( self, - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of items to skip before returning results. Defaults to 0.")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=0)]], Field(description="Maximum number of items to return. Defaults to 100. Maximum is 500.")] = None, - filter: Annotated[Optional[StrictStr], Field(description="OData v4 filter expression. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `createdAt`, `updatedAt`, `expectedDuration`, `recordedDuration`, `durationDifference`.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `name`, `lastUsed`, `createdAt`, `updatedAt`. Example: `name eq 'Front Desk Kiosk'`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `lastUsed`, `createdAt`, `updatedAt`. Defaults to `name asc`." + ), + ] = None, + select: Annotated[ + StrictStr | None, Field(description="Comma-separated list of properties to return (sparse fieldsets).") + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page to retrieve. Defaults to 1."), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of kiosks per page. Defaults to 20, minimum 10, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingPaginatedBreakAssessmentsResponseV1]: - """List Break Assessments + ) -> ApiResponse[TimeTrackingPaginatedTimeTrackingKiosksResponseV1]: + """List Time Tracking Kiosks - Returns a paginated list of break assessments. A break assessment records whether an employee complied with their assigned break policy for a given day, along with any violations. Use the `filter` parameter to scope results by employee, date, result, or other fields. Use `offset` and `limit` for pagination; `limit` defaults to 100 and may not exceed 500. + Returns a paginated list of time tracking kiosks. Deleted kiosks are never returned. Supports an OData-style `filter`, an `orderBy` sort expression, and `select` sparse fieldsets. Results are sorted by name ascending when `orderBy` is omitted; name ordering is case-insensitive. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, max 100). OAuth Scopes: time_tracking:kiosks - :param offset: Number of items to skip before returning results. Defaults to 0. - :type offset: int - :param limit: Maximum number of items to return. Defaults to 100. Maximum is 500. - :type limit: int - :param filter: OData v4 filter expression. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `createdAt`, `updatedAt`, `expectedDuration`, `recordedDuration`, `durationDifference`. + :param filter: OData v4 filter expression. Filterable fields: `name`, `lastUsed`, `createdAt`, `updatedAt`. Example: `name eq 'Front Desk Kiosk'`. :type filter: str + :param order_by: Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `lastUsed`, `createdAt`, `updatedAt`. Defaults to `name asc`. + :type order_by: str + :param select: Comma-separated list of properties to return (sparse fieldsets). + :type select: str + :param page: The page to retrieve. Defaults to 1. + :type page: int + :param page_size: The number of kiosks per page. Defaults to 20, minimum 10, maximum 100. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4292,63 +10909,81 @@ def list_break_assessments_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_break_assessments_serialize( - offset=offset, - limit=limit, + _param = self._list_time_tracking_kiosks_serialize( filter=filter, + order_by=order_by, + select=select, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakAssessmentsResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedTimeTrackingKiosksResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_break_assessments_without_preload_content( + def list_time_tracking_kiosks_without_preload_content( self, - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of items to skip before returning results. Defaults to 0.")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=0)]], Field(description="Maximum number of items to return. Defaults to 100. Maximum is 500.")] = None, - filter: Annotated[Optional[StrictStr], Field(description="OData v4 filter expression. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `createdAt`, `updatedAt`, `expectedDuration`, `recordedDuration`, `durationDifference`.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `name`, `lastUsed`, `createdAt`, `updatedAt`. Example: `name eq 'Front Desk Kiosk'`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `lastUsed`, `createdAt`, `updatedAt`. Defaults to `name asc`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + select: Annotated[ + StrictStr | None, Field(description="Comma-separated list of properties to return (sparse fieldsets).") + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of kiosks per page. Defaults to 20, minimum 10, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Break Assessments + """List Time Tracking Kiosks - Returns a paginated list of break assessments. A break assessment records whether an employee complied with their assigned break policy for a given day, along with any violations. Use the `filter` parameter to scope results by employee, date, result, or other fields. Use `offset` and `limit` for pagination; `limit` defaults to 100 and may not exceed 500. + Returns a paginated list of time tracking kiosks. Deleted kiosks are never returned. Supports an OData-style `filter`, an `orderBy` sort expression, and `select` sparse fieldsets. Results are sorted by name ascending when `orderBy` is omitted; name ordering is case-insensitive. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, max 100). OAuth Scopes: time_tracking:kiosks - :param offset: Number of items to skip before returning results. Defaults to 0. - :type offset: int - :param limit: Maximum number of items to return. Defaults to 100. Maximum is 500. - :type limit: int - :param filter: OData v4 filter expression. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `createdAt`, `updatedAt`, `expectedDuration`, `recordedDuration`, `durationDifference`. + :param filter: OData v4 filter expression. Filterable fields: `name`, `lastUsed`, `createdAt`, `updatedAt`. Example: `name eq 'Front Desk Kiosk'`. :type filter: str + :param order_by: Sort expression like `name asc, createdAt desc`. Allowed fields: `name`, `lastUsed`, `createdAt`, `updatedAt`. Defaults to `name asc`. + :type order_by: str + :param select: Comma-separated list of properties to return (sparse fieldsets). + :type select: str + :param page: The page to retrieve. Defaults to 1. + :type page: int + :param page_size: The number of kiosks per page. Defaults to 20, minimum 10, maximum 100. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4369,35 +11004,36 @@ def list_break_assessments_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_break_assessments_serialize( - offset=offset, - limit=limit, + _param = self._list_time_tracking_kiosks_serialize( filter=filter, + order_by=order_by, + select=select, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakAssessmentsResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedTimeTrackingKiosksResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_break_assessments_serialize( + def _list_time_tracking_kiosks_serialize( self, - offset, - limit, filter, + order_by, + select, + page, + page_size, _request_auth, _content_type, _headers, @@ -4406,55 +11042,46 @@ def _list_break_assessments_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters - if offset is not None: - - _query_params.append(('offset', offset)) - - if limit is not None: - - _query_params.append(('limit', limit)) - if filter is not None: - - _query_params.append(('filter', filter)) - + _query_params.append(("filter", filter)) + + if order_by is not None: + _query_params.append(("orderBy", order_by)) + + if select is not None: + _query_params.append(("select", select)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/time-tracking/break-assessments', + method="GET", + resource_path="/api/v1/time-tracking/kiosks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4464,44 +11091,57 @@ def _list_break_assessments_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_break_policies( + def list_time_tracking_time_clocks( self, - offset: Annotated[Optional[StrictInt], Field(description="The offset of items to retrieve")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="The maximum items to retrieve")] = None, - filter: Annotated[Optional[StrictStr], Field(description="Filter by an OData (Open Data Protocol) v4 specification")] = None, - include_counts: Annotated[Optional[StrictBool], Field(description="Include employee and break counts")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `name`, `serialNumber`, `type`, `timezone`. Example: `type eq 'TIME_CLOCK'`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, serialNumber desc`. Allowed fields: `name`, `serialNumber`, `type`, `timezone`. Defaults to `name asc`." + ), + ] = None, + select: Annotated[ + StrictStr | None, Field(description="Comma-separated list of properties to return (sparse fieldsets).") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of time clocks per page. Defaults to 20, minimum 10, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingPaginatedBreakPoliciesResponseV1: - """List Break Policies + ) -> TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1: + """List Time Tracking Time Clocks - Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy. + Returns a paginated list of the company's time tracking time clocks. Supports an OData-style `filter`, an `orderBy` sort expression, and `select` sparse fieldsets. Results are sorted by name ascending when `orderBy` is omitted; name ordering is case-insensitive. Filtering and sorting are applied in memory over the cached GT Connect list (partner ordering is not relied on). A company with no GT Clocks connected returns an empty list, not a 404. Device health flags are reported as null while device status is temporarily unavailable. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, minimum 10, maximum 100). OAuth Scopes: time_tracking:time_clocks - :param offset: The offset of items to retrieve - :type offset: int - :param limit: The maximum items to retrieve - :type limit: int - :param filter: Filter by an OData (Open Data Protocol) v4 specification + :param filter: OData v4 filter expression. Filterable fields: `name`, `serialNumber`, `type`, `timezone`. Example: `type eq 'TIME_CLOCK'`. :type filter: str - :param include_counts: Include employee and break counts - :type include_counts: bool + :param order_by: Sort expression like `name asc, serialNumber desc`. Allowed fields: `name`, `serialNumber`, `type`, `timezone`. Defaults to `name asc`. + :type order_by: str + :param select: Comma-separated list of properties to return (sparse fieldsets). + :type select: str + :param page: The page to retrieve. Defaults to 1. + :type page: int + :param page_size: The number of time clocks per page. Defaults to 20, minimum 10, maximum 100. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4522,67 +11162,82 @@ def list_break_policies( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_break_policies_serialize( - offset=offset, - limit=limit, + _param = self._list_time_tracking_time_clocks_serialize( filter=filter, - include_counts=include_counts, + order_by=order_by, + select=select, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakPoliciesResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "503": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_break_policies_with_http_info( + def list_time_tracking_time_clocks_with_http_info( self, - offset: Annotated[Optional[StrictInt], Field(description="The offset of items to retrieve")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="The maximum items to retrieve")] = None, - filter: Annotated[Optional[StrictStr], Field(description="Filter by an OData (Open Data Protocol) v4 specification")] = None, - include_counts: Annotated[Optional[StrictBool], Field(description="Include employee and break counts")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `name`, `serialNumber`, `type`, `timezone`. Example: `type eq 'TIME_CLOCK'`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, serialNumber desc`. Allowed fields: `name`, `serialNumber`, `type`, `timezone`. Defaults to `name asc`." + ), + ] = None, + select: Annotated[ + StrictStr | None, Field(description="Comma-separated list of properties to return (sparse fieldsets).") + ] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of time clocks per page. Defaults to 20, minimum 10, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingPaginatedBreakPoliciesResponseV1]: - """List Break Policies + ) -> ApiResponse[TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1]: + """List Time Tracking Time Clocks - Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy. + Returns a paginated list of the company's time tracking time clocks. Supports an OData-style `filter`, an `orderBy` sort expression, and `select` sparse fieldsets. Results are sorted by name ascending when `orderBy` is omitted; name ordering is case-insensitive. Filtering and sorting are applied in memory over the cached GT Connect list (partner ordering is not relied on). A company with no GT Clocks connected returns an empty list, not a 404. Device health flags are reported as null while device status is temporarily unavailable. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, minimum 10, maximum 100). OAuth Scopes: time_tracking:time_clocks - :param offset: The offset of items to retrieve - :type offset: int - :param limit: The maximum items to retrieve - :type limit: int - :param filter: Filter by an OData (Open Data Protocol) v4 specification + :param filter: OData v4 filter expression. Filterable fields: `name`, `serialNumber`, `type`, `timezone`. Example: `type eq 'TIME_CLOCK'`. :type filter: str - :param include_counts: Include employee and break counts - :type include_counts: bool + :param order_by: Sort expression like `name asc, serialNumber desc`. Allowed fields: `name`, `serialNumber`, `type`, `timezone`. Defaults to `name asc`. + :type order_by: str + :param select: Comma-separated list of properties to return (sparse fieldsets). + :type select: str + :param page: The page to retrieve. Defaults to 1. + :type page: int + :param page_size: The number of time clocks per page. Defaults to 20, minimum 10, maximum 100. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4603,67 +11258,82 @@ def list_break_policies_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_break_policies_serialize( - offset=offset, - limit=limit, + _param = self._list_time_tracking_time_clocks_serialize( filter=filter, - include_counts=include_counts, + order_by=order_by, + select=select, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakPoliciesResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "503": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_break_policies_without_preload_content( + def list_time_tracking_time_clocks_without_preload_content( self, - offset: Annotated[Optional[StrictInt], Field(description="The offset of items to retrieve")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="The maximum items to retrieve")] = None, - filter: Annotated[Optional[StrictStr], Field(description="Filter by an OData (Open Data Protocol) v4 specification")] = None, - include_counts: Annotated[Optional[StrictBool], Field(description="Include employee and break counts")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `name`, `serialNumber`, `type`, `timezone`. Example: `type eq 'TIME_CLOCK'`." + ), + ] = None, + order_by: Annotated[ + StrictStr | None, + Field( + description="Sort expression like `name asc, serialNumber desc`. Allowed fields: `name`, `serialNumber`, `type`, `timezone`. Defaults to `name asc`." + ), + ] = None, + select: Annotated[ + StrictStr | None, Field(description="Comma-separated list of properties to return (sparse fieldsets).") ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + page: Annotated[ + Annotated[int, Field(strict=True, ge=1)] | None, + Field(description="The page to retrieve. Defaults to 1."), + ] = None, + page_size: Annotated[ + Annotated[int, Field(le=100, strict=True, ge=10)] | None, + Field(description="The number of time clocks per page. Defaults to 20, minimum 10, maximum 100."), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Break Policies + """List Time Tracking Time Clocks - Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy. + Returns a paginated list of the company's time tracking time clocks. Supports an OData-style `filter`, an `orderBy` sort expression, and `select` sparse fieldsets. Results are sorted by name ascending when `orderBy` is omitted; name ordering is case-insensitive. Filtering and sorting are applied in memory over the cached GT Connect list (partner ordering is not relied on). A company with no GT Clocks connected returns an empty list, not a 404. Device health flags are reported as null while device status is temporarily unavailable. Pagination is page-based via `page` and `pageSize` (defaults: page 1, pageSize 20, minimum 10, maximum 100). OAuth Scopes: time_tracking:time_clocks - :param offset: The offset of items to retrieve - :type offset: int - :param limit: The maximum items to retrieve - :type limit: int - :param filter: Filter by an OData (Open Data Protocol) v4 specification + :param filter: OData v4 filter expression. Filterable fields: `name`, `serialNumber`, `type`, `timezone`. Example: `type eq 'TIME_CLOCK'`. :type filter: str - :param include_counts: Include employee and break counts - :type include_counts: bool + :param order_by: Sort expression like `name asc, serialNumber desc`. Allowed fields: `name`, `serialNumber`, `type`, `timezone`. Defaults to `name asc`. + :type order_by: str + :param select: Comma-separated list of properties to return (sparse fieldsets). + :type select: str + :param page: The page to retrieve. Defaults to 1. + :type page: int + :param page_size: The number of time clocks per page. Defaults to 20, minimum 10, maximum 100. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4684,37 +11354,37 @@ def list_break_policies_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_break_policies_serialize( - offset=offset, - limit=limit, + _param = self._list_time_tracking_time_clocks_serialize( filter=filter, - include_counts=include_counts, + order_by=order_by, + select=select, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakPoliciesResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "503": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_break_policies_serialize( + def _list_time_tracking_time_clocks_serialize( self, - offset, - limit, filter, - include_counts, + order_by, + select, + page, + page_size, _request_auth, _content_type, _headers, @@ -4723,59 +11393,46 @@ def _list_break_policies_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters - if offset is not None: - - _query_params.append(('offset', offset)) - - if limit is not None: - - _query_params.append(('limit', limit)) - if filter is not None: - - _query_params.append(('filter', filter)) - - if include_counts is not None: - - _query_params.append(('includeCounts', include_counts)) - + _query_params.append(("filter", filter)) + + if order_by is not None: + _query_params.append(("orderBy", order_by)) + + if select is not None: + _query_params.append(("select", select)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/time-tracking/break-policies', + method="GET", + resource_path="/api/v1/time-tracking/time-clocks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4785,44 +11442,48 @@ def _list_break_policies_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_break_policy_breaks( + def list_timesheet_entries( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - offset: Annotated[Optional[StrictInt], Field(description="The offset of items to retrieve")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="The maximum items to retrieve")] = None, - filter: Annotated[Optional[StrictStr], Field(description="Filter by an OData (Open Data Protocol) v4 specification")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + start: Annotated[ + date, + Field( + description="YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days." + ), + ], + end: Annotated[ + date, + Field( + description="YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days." + ), + ], + employee_ids: Annotated[ + Annotated[str, Field(strict=True)] | None, + Field( + description="A comma-separated list of internal employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingPaginatedBreaksResponseV1: - """List Breaks for Break Policy + ) -> list[EmployeeTimesheetEntryTransformer]: + """List Timesheet Entries - Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering. + Returns timesheet entries for all employees, or a filtered subset, within the specified date range. Results include both clock and hour entry types. Dates must fall within the last 365 days and are interpreted in the company timezone. OAuth Scopes: time_tracking - :param id: The break policy ID. (required) - :type id: str - :param offset: The offset of items to retrieve - :type offset: int - :param limit: The maximum items to retrieve - :type limit: int - :param filter: Filter by an OData (Open Data Protocol) v4 specification - :type filter: str + :param start: YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) + :type start: date + :param end: YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) + :type end: date + :param employee_ids: A comma-separated list of internal employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. + :type employee_ids: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4843,67 +11504,71 @@ def list_break_policy_breaks( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_break_policy_breaks_serialize( - id=id, - offset=offset, - limit=limit, - filter=filter, + _param = self._list_timesheet_entries_serialize( + start=start, + end=end, + employee_ids=employee_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreaksResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "List[EmployeeTimesheetEntryTransformer]", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_break_policy_breaks_with_http_info( + def list_timesheet_entries_with_http_info( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - offset: Annotated[Optional[StrictInt], Field(description="The offset of items to retrieve")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="The maximum items to retrieve")] = None, - filter: Annotated[Optional[StrictStr], Field(description="Filter by an OData (Open Data Protocol) v4 specification")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + start: Annotated[ + date, + Field( + description="YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days." + ), + ], + end: Annotated[ + date, + Field( + description="YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days." + ), + ], + employee_ids: Annotated[ + Annotated[str, Field(strict=True)] | None, + Field( + description="A comma-separated list of internal employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingPaginatedBreaksResponseV1]: - """List Breaks for Break Policy + ) -> ApiResponse[list[EmployeeTimesheetEntryTransformer]]: + """List Timesheet Entries - Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering. + Returns timesheet entries for all employees, or a filtered subset, within the specified date range. Results include both clock and hour entry types. Dates must fall within the last 365 days and are interpreted in the company timezone. OAuth Scopes: time_tracking - :param id: The break policy ID. (required) - :type id: str - :param offset: The offset of items to retrieve - :type offset: int - :param limit: The maximum items to retrieve - :type limit: int - :param filter: Filter by an OData (Open Data Protocol) v4 specification - :type filter: str + :param start: YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) + :type start: date + :param end: YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) + :type end: date + :param employee_ids: A comma-separated list of internal employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. + :type employee_ids: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4924,67 +11589,71 @@ def list_break_policy_breaks_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_break_policy_breaks_serialize( - id=id, - offset=offset, - limit=limit, - filter=filter, + _param = self._list_timesheet_entries_serialize( + start=start, + end=end, + employee_ids=employee_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreaksResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "List[EmployeeTimesheetEntryTransformer]", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_break_policy_breaks_without_preload_content( + def list_timesheet_entries_without_preload_content( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - offset: Annotated[Optional[StrictInt], Field(description="The offset of items to retrieve")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="The maximum items to retrieve")] = None, - filter: Annotated[Optional[StrictStr], Field(description="Filter by an OData (Open Data Protocol) v4 specification")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + start: Annotated[ + date, + Field( + description="YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days." + ), + ], + end: Annotated[ + date, + Field( + description="YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days." + ), + ], + employee_ids: Annotated[ + Annotated[str, Field(strict=True)] | None, + Field( + description="A comma-separated list of internal employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Breaks for Break Policy + """List Timesheet Entries - Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering. + Returns timesheet entries for all employees, or a filtered subset, within the specified date range. Results include both clock and hour entry types. Dates must fall within the last 365 days and are interpreted in the company timezone. OAuth Scopes: time_tracking - :param id: The break policy ID. (required) - :type id: str - :param offset: The offset of items to retrieve - :type offset: int - :param limit: The maximum items to retrieve - :type limit: int - :param filter: Filter by an OData (Open Data Protocol) v4 specification - :type filter: str + :param start: YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) + :type start: date + :param end: YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) + :type end: date + :param employee_ids: A comma-separated list of internal employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. + :type employee_ids: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5005,37 +11674,33 @@ def list_break_policy_breaks_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_break_policy_breaks_serialize( - id=id, - offset=offset, - limit=limit, - filter=filter, + _param = self._list_timesheet_entries_serialize( + start=start, + end=end, + employee_ids=employee_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreaksResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "List[EmployeeTimesheetEntryTransformer]", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_break_policy_breaks_serialize( + def _list_timesheet_entries_serialize( self, - id, - offset, - limit, - filter, + start, + end, + employee_ids, _request_auth, _content_type, _headers, @@ -5044,57 +11709,46 @@ def _list_break_policy_breaks_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters - if offset is not None: - - _query_params.append(('offset', offset)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - if filter is not None: - - _query_params.append(('filter', filter)) - + if start is not None: + if isinstance(start, date): + _query_params.append(("start", start.strftime(self.api_client.configuration.date_format))) + else: + _query_params.append(("start", start)) + + if end is not None: + if isinstance(end, date): + _query_params.append(("end", end.strftime(self.api_client.configuration.date_format))) + else: + _query_params.append(("end", end)) + + if employee_ids is not None: + _query_params.append(("employeeIds", employee_ids)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/time-tracking/break-policies/{id}/breaks', + method="GET", + resource_path="/api/v1/time_tracking/timesheet_entries", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5104,41 +11758,36 @@ def _list_break_policy_breaks_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_break_policy_employees( + def list_timesheets( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - offset: Annotated[Optional[StrictInt], Field(description="The offset of items to retrieve")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="The maximum items to retrieve")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + filter: Annotated[StrictStr | None, Field(description="OData-style filter expression.")] = None, + sort: Annotated[StrictStr | None, Field(description="Sort expression. Default: startDate desc.")] = None, + page: Annotated[StrictInt | None, Field(description="Page number (1-based).")] = None, + page_size: Annotated[StrictInt | None, Field(description="Records per page (max 200).")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingPaginatedBreakPolicyEmployeesResponseV1: - """List Break Policy Employees + ) -> TimeTrackingPaginatedTimesheetsResponseV1: + """List Timesheets - Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array. + Returns a paginated list of timesheets. Supports OData-style `filter` (fields: `employeeId`, `status`, `startDate`, `endDate`) and `sort` (fields: `startDate`, `endDate`, `approvedAt`, `updatedAt`; default `startDate desc`). Page-based pagination via `page` (default 1) and `pageSize` (default 50, max 200). Future-period timesheets are always excluded. OAuth Scopes: time_tracking:timesheets - :param id: The break policy ID. (required) - :type id: str - :param offset: The offset of items to retrieve - :type offset: int - :param limit: The maximum items to retrieve - :type limit: int + :param filter: OData-style filter expression. + :type filter: str + :param sort: Sort expression. Default: startDate desc. + :type sort: str + :param page: Page number (1-based). + :type page: int + :param page_size: Records per page (max 200). + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5159,63 +11808,59 @@ def list_break_policy_employees( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_break_policy_employees_serialize( - id=id, - offset=offset, - limit=limit, + _param = self._list_timesheets_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakPolicyEmployeesResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedTimesheetsResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_break_policy_employees_with_http_info( + def list_timesheets_with_http_info( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - offset: Annotated[Optional[StrictInt], Field(description="The offset of items to retrieve")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="The maximum items to retrieve")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + filter: Annotated[StrictStr | None, Field(description="OData-style filter expression.")] = None, + sort: Annotated[StrictStr | None, Field(description="Sort expression. Default: startDate desc.")] = None, + page: Annotated[StrictInt | None, Field(description="Page number (1-based).")] = None, + page_size: Annotated[StrictInt | None, Field(description="Records per page (max 200).")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingPaginatedBreakPolicyEmployeesResponseV1]: - """List Break Policy Employees + ) -> ApiResponse[TimeTrackingPaginatedTimesheetsResponseV1]: + """List Timesheets - Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array. + Returns a paginated list of timesheets. Supports OData-style `filter` (fields: `employeeId`, `status`, `startDate`, `endDate`) and `sort` (fields: `startDate`, `endDate`, `approvedAt`, `updatedAt`; default `startDate desc`). Page-based pagination via `page` (default 1) and `pageSize` (default 50, max 200). Future-period timesheets are always excluded. OAuth Scopes: time_tracking:timesheets - :param id: The break policy ID. (required) - :type id: str - :param offset: The offset of items to retrieve - :type offset: int - :param limit: The maximum items to retrieve - :type limit: int + :param filter: OData-style filter expression. + :type filter: str + :param sort: Sort expression. Default: startDate desc. + :type sort: str + :param page: Page number (1-based). + :type page: int + :param page_size: Records per page (max 200). + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5236,63 +11881,59 @@ def list_break_policy_employees_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_break_policy_employees_serialize( - id=id, - offset=offset, - limit=limit, + _param = self._list_timesheets_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakPolicyEmployeesResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedTimesheetsResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_break_policy_employees_without_preload_content( + def list_timesheets_without_preload_content( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - offset: Annotated[Optional[StrictInt], Field(description="The offset of items to retrieve")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True)]], Field(description="The maximum items to retrieve")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + filter: Annotated[StrictStr | None, Field(description="OData-style filter expression.")] = None, + sort: Annotated[StrictStr | None, Field(description="Sort expression. Default: startDate desc.")] = None, + page: Annotated[StrictInt | None, Field(description="Page number (1-based).")] = None, + page_size: Annotated[StrictInt | None, Field(description="Records per page (max 200).")] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Break Policy Employees + """List Timesheets - Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array. + Returns a paginated list of timesheets. Supports OData-style `filter` (fields: `employeeId`, `status`, `startDate`, `endDate`) and `sort` (fields: `startDate`, `endDate`, `approvedAt`, `updatedAt`; default `startDate desc`). Page-based pagination via `page` (default 1) and `pageSize` (default 50, max 200). Future-period timesheets are always excluded. OAuth Scopes: time_tracking:timesheets - :param id: The break policy ID. (required) - :type id: str - :param offset: The offset of items to retrieve - :type offset: int - :param limit: The maximum items to retrieve - :type limit: int + :param filter: OData-style filter expression. + :type filter: str + :param sort: Sort expression. Default: startDate desc. + :type sort: str + :param page: Page number (1-based). + :type page: int + :param page_size: Records per page (max 200). + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5313,35 +11954,34 @@ def list_break_policy_employees_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_break_policy_employees_serialize( - id=id, - offset=offset, - limit=limit, + _param = self._list_timesheets_serialize( + filter=filter, + sort=sort, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakPolicyEmployeesResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingPaginatedTimesheetsResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_break_policy_employees_serialize( + def _list_timesheets_serialize( self, - id, - offset, - limit, + filter, + sort, + page, + page_size, _request_auth, _content_type, _headers, @@ -5350,53 +11990,43 @@ def _list_break_policy_employees_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters - if offset is not None: - - _query_params.append(('offset', offset)) - - if limit is not None: - - _query_params.append(('limit', limit)) - + if filter is not None: + _query_params.append(("filter", filter)) + + if sort is not None: + _query_params.append(("sort", sort)) + + if page is not None: + _query_params.append(("page", page)) + + if page_size is not None: + _query_params.append(("pageSize", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/time-tracking/break-policies/{id}/employees', + method="GET", + resource_path="/api/v1/time-tracking/timesheets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5406,38 +12036,30 @@ def _list_break_policy_employees_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_employee_break_availabilities( + def update_clock_entry( self, - id: Annotated[StrictInt, Field(description="The employee ID.")], - effective: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The clock entry ID.")], + time_tracking_update_clock_entry_v1: TimeTrackingUpdateClockEntryV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[TimeTrackingTimeTrackingBreakAvailabilityV1]: - """List Employee Break Availabilities + ) -> TimeTrackingClockEntryV1: + """Update Clock Entry - Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access. + Partially updates a time tracking clock entry identified by its ID. Only the fields present in the body are changed. When `start` or `timezone` change, the entry's `date` and `timesheetId` are recomputed server-side and the entry is moved to the matching timesheet. Pass `null` for `clockInLocation` / `clockOutLocation` to clear the stored geolocation. OAuth Scopes: time_tracking:timesheets.write - :param id: The employee ID. (required) + :param id: The clock entry ID. (required) :type id: int - :param effective: The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). - :type effective: str + :param time_tracking_update_clock_entry_v1: (required) + :type time_tracking_update_clock_entry_v1: TimeTrackingUpdateClockEntryV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5458,59 +12080,54 @@ def list_employee_break_availabilities( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_break_availabilities_serialize( + _param = self._update_clock_entry_serialize( id=id, - effective=effective, + time_tracking_update_clock_entry_v1=time_tracking_update_clock_entry_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeTrackingTimeTrackingBreakAvailabilityV1]", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingClockEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_employee_break_availabilities_with_http_info( + def update_clock_entry_with_http_info( self, - id: Annotated[StrictInt, Field(description="The employee ID.")], - effective: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The clock entry ID.")], + time_tracking_update_clock_entry_v1: TimeTrackingUpdateClockEntryV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[TimeTrackingTimeTrackingBreakAvailabilityV1]]: - """List Employee Break Availabilities + ) -> ApiResponse[TimeTrackingClockEntryV1]: + """Update Clock Entry - Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access. + Partially updates a time tracking clock entry identified by its ID. Only the fields present in the body are changed. When `start` or `timezone` change, the entry's `date` and `timesheetId` are recomputed server-side and the entry is moved to the matching timesheet. Pass `null` for `clockInLocation` / `clockOutLocation` to clear the stored geolocation. OAuth Scopes: time_tracking:timesheets.write - :param id: The employee ID. (required) + :param id: The clock entry ID. (required) :type id: int - :param effective: The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). - :type effective: str + :param time_tracking_update_clock_entry_v1: (required) + :type time_tracking_update_clock_entry_v1: TimeTrackingUpdateClockEntryV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5531,59 +12148,54 @@ def list_employee_break_availabilities_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_break_availabilities_serialize( + _param = self._update_clock_entry_serialize( id=id, - effective=effective, + time_tracking_update_clock_entry_v1=time_tracking_update_clock_entry_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeTrackingTimeTrackingBreakAvailabilityV1]", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingClockEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_employee_break_availabilities_without_preload_content( + def update_clock_entry_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The employee ID.")], - effective: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The clock entry ID.")], + time_tracking_update_clock_entry_v1: TimeTrackingUpdateClockEntryV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Employee Break Availabilities + """Update Clock Entry - Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access. + Partially updates a time tracking clock entry identified by its ID. Only the fields present in the body are changed. When `start` or `timezone` change, the entry's `date` and `timesheetId` are recomputed server-side and the entry is moved to the matching timesheet. Pass `null` for `clockInLocation` / `clockOutLocation` to clear the stored geolocation. OAuth Scopes: time_tracking:timesheets.write - :param id: The employee ID. (required) + :param id: The clock entry ID. (required) :type id: int - :param effective: The employee's local time that should be used to calculate availability. Defaults to the current time. Must be in Y-m-d\\TH:i:s format (no timezone offset). - :type effective: str + :param time_tracking_update_clock_entry_v1: (required) + :type time_tracking_update_clock_entry_v1: TimeTrackingUpdateClockEntryV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5604,33 +12216,33 @@ def list_employee_break_availabilities_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_break_availabilities_serialize( + _param = self._update_clock_entry_serialize( id=id, - effective=effective, + time_tracking_update_clock_entry_v1=time_tracking_update_clock_entry_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeTrackingTimeTrackingBreakAvailabilityV1]", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingClockEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_employee_break_availabilities_serialize( + def _update_clock_entry_serialize( self, id, - effective, + time_tracking_update_clock_entry_v1, _request_auth, _content_type, _headers, @@ -5639,49 +12251,43 @@ def _list_employee_break_availabilities_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters - if effective is not None: - - _query_params.append(('effective', effective)) - # process the header parameters # process the form parameters # process the body parameter - + if time_tracking_update_clock_entry_v1 is not None: + _body_params = time_tracking_update_clock_entry_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/time-tracking/employees/{id}/break-availabilities', + method="PATCH", + resource_path="/api/v1/time-tracking/clock-entries/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5691,41 +12297,30 @@ def _list_employee_break_availabilities_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_employee_break_policies( + def update_hour_entry( self, - id: Annotated[StrictInt, Field(description="The employee ID.")], - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0.")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=0)]], Field(description="The maximum number of items to return. Must be between 0 and 500. Defaults to 100.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The hour entry ID.")], + hour_entry_patch_hour_entry_v1: HourEntryPatchHourEntryV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingPaginatedBreakPoliciesResponseV1: - """List Employee Break Policies + ) -> TimeTrackingHourEntryV1: + """Update Hour Entry - Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. + Partially updates a time tracking hour entry identified by its ID. Only the fields present in the body are changed; the rest retain their prior values. Moving the entry to a date in a different pay period updates the returned timesheetId. OAuth Scopes: time_tracking:timesheets.write - :param id: The employee ID. (required) + :param id: The hour entry ID. (required) :type id: int - :param offset: The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. - :type offset: int - :param limit: The maximum number of items to return. Must be between 0 and 500. Defaults to 100. - :type limit: int + :param hour_entry_patch_hour_entry_v1: (required) + :type hour_entry_patch_hour_entry_v1: HourEntryPatchHourEntryV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5746,63 +12341,54 @@ def list_employee_break_policies( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_break_policies_serialize( + _param = self._update_hour_entry_serialize( id=id, - offset=offset, - limit=limit, + hour_entry_patch_hour_entry_v1=hour_entry_patch_hour_entry_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakPoliciesResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingHourEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_employee_break_policies_with_http_info( + def update_hour_entry_with_http_info( self, - id: Annotated[StrictInt, Field(description="The employee ID.")], - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0.")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=0)]], Field(description="The maximum number of items to return. Must be between 0 and 500. Defaults to 100.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The hour entry ID.")], + hour_entry_patch_hour_entry_v1: HourEntryPatchHourEntryV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingPaginatedBreakPoliciesResponseV1]: - """List Employee Break Policies + ) -> ApiResponse[TimeTrackingHourEntryV1]: + """Update Hour Entry - Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. + Partially updates a time tracking hour entry identified by its ID. Only the fields present in the body are changed; the rest retain their prior values. Moving the entry to a date in a different pay period updates the returned timesheetId. OAuth Scopes: time_tracking:timesheets.write - :param id: The employee ID. (required) + :param id: The hour entry ID. (required) :type id: int - :param offset: The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. - :type offset: int - :param limit: The maximum number of items to return. Must be between 0 and 500. Defaults to 100. - :type limit: int + :param hour_entry_patch_hour_entry_v1: (required) + :type hour_entry_patch_hour_entry_v1: HourEntryPatchHourEntryV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5823,63 +12409,54 @@ def list_employee_break_policies_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_break_policies_serialize( + _param = self._update_hour_entry_serialize( id=id, - offset=offset, - limit=limit, + hour_entry_patch_hour_entry_v1=hour_entry_patch_hour_entry_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakPoliciesResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingHourEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_employee_break_policies_without_preload_content( + def update_hour_entry_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The employee ID.")], - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0.")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=0)]], Field(description="The maximum number of items to return. Must be between 0 and 500. Defaults to 100.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The hour entry ID.")], + hour_entry_patch_hour_entry_v1: HourEntryPatchHourEntryV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Employee Break Policies + """Update Hour Entry - Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. + Partially updates a time tracking hour entry identified by its ID. Only the fields present in the body are changed; the rest retain their prior values. Moving the entry to a date in a different pay period updates the returned timesheetId. OAuth Scopes: time_tracking:timesheets.write - :param id: The employee ID. (required) + :param id: The hour entry ID. (required) :type id: int - :param offset: The number of items to skip before starting to collect the result set. Minimum 0. Defaults to 0. - :type offset: int - :param limit: The maximum number of items to return. Must be between 0 and 500. Defaults to 100. - :type limit: int + :param hour_entry_patch_hour_entry_v1: (required) + :type hour_entry_patch_hour_entry_v1: HourEntryPatchHourEntryV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5900,35 +12477,33 @@ def list_employee_break_policies_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_employee_break_policies_serialize( + _param = self._update_hour_entry_serialize( id=id, - offset=offset, - limit=limit, + hour_entry_patch_hour_entry_v1=hour_entry_patch_hour_entry_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakPoliciesResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingHourEntryV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_employee_break_policies_serialize( + def _update_hour_entry_serialize( self, id, - offset, - limit, + hour_entry_patch_hour_entry_v1, _request_auth, _content_type, _headers, @@ -5937,53 +12512,43 @@ def _list_employee_break_policies_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters - if offset is not None: - - _query_params.append(('offset', offset)) - - if limit is not None: - - _query_params.append(('limit', limit)) - # process the header parameters # process the form parameters # process the body parameter - + if hour_entry_patch_hour_entry_v1 is not None: + _body_params = hour_entry_patch_hour_entry_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/time-tracking/employees/{id}/break-policies', + method="PATCH", + resource_path="/api/v1/time-tracking/hour-entries/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5993,41 +12558,30 @@ def _list_employee_break_policies_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def list_timesheet_entries( + def update_project( self, - start: Annotated[date, Field(description="YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days.")], - end: Annotated[date, Field(description="YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days.")], - employee_ids: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[EmployeeTimesheetEntryTransformer]: - """List Timesheet Entries + id: Annotated[StrictInt, Field(description="The project ID.")], + project_update_time_tracking_project_v1: ProjectUpdateTimeTrackingProjectV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectTimeTrackingProjectV1: + """Update Time Tracking Project - Returns timesheet entries for all employees, or a filtered subset, within the specified date range. Results include both clock and hour entry types. Dates must fall within the last 365 days and are interpreted in the company timezone. + Partially updates a time tracking project identified by its ID. Only fields provided in the request body are updated; omitted fields are left unchanged. OAuth Scopes: time_tracking:project.write - :param start: YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) - :type start: date - :param end: YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) - :type end: date - :param employee_ids: A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. - :type employee_ids: str + :param id: The project ID. (required) + :type id: int + :param project_update_time_tracking_project_v1: (required) + :type project_update_time_tracking_project_v1: ProjectUpdateTimeTrackingProjectV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6048,65 +12602,54 @@ def list_timesheet_entries( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_timesheet_entries_serialize( - start=start, - end=end, - employee_ids=employee_ids, + _param = self._update_project_serialize( + id=id, + project_update_time_tracking_project_v1=project_update_time_tracking_project_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EmployeeTimesheetEntryTransformer]", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "ProjectTimeTrackingProjectV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def list_timesheet_entries_with_http_info( + def update_project_with_http_info( self, - start: Annotated[date, Field(description="YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days.")], - end: Annotated[date, Field(description="YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days.")], - employee_ids: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[EmployeeTimesheetEntryTransformer]]: - """List Timesheet Entries + id: Annotated[StrictInt, Field(description="The project ID.")], + project_update_time_tracking_project_v1: ProjectUpdateTimeTrackingProjectV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectTimeTrackingProjectV1]: + """Update Time Tracking Project - Returns timesheet entries for all employees, or a filtered subset, within the specified date range. Results include both clock and hour entry types. Dates must fall within the last 365 days and are interpreted in the company timezone. + Partially updates a time tracking project identified by its ID. Only fields provided in the request body are updated; omitted fields are left unchanged. OAuth Scopes: time_tracking:project.write - :param start: YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) - :type start: date - :param end: YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) - :type end: date - :param employee_ids: A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. - :type employee_ids: str + :param id: The project ID. (required) + :type id: int + :param project_update_time_tracking_project_v1: (required) + :type project_update_time_tracking_project_v1: ProjectUpdateTimeTrackingProjectV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6127,65 +12670,54 @@ def list_timesheet_entries_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_timesheet_entries_serialize( - start=start, - end=end, - employee_ids=employee_ids, + _param = self._update_project_serialize( + id=id, + project_update_time_tracking_project_v1=project_update_time_tracking_project_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EmployeeTimesheetEntryTransformer]", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "ProjectTimeTrackingProjectV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def list_timesheet_entries_without_preload_content( + def update_project_without_preload_content( self, - start: Annotated[date, Field(description="YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days.")], - end: Annotated[date, Field(description="YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days.")], - employee_ids: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The project ID.")], + project_update_time_tracking_project_v1: ProjectUpdateTimeTrackingProjectV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Timesheet Entries + """Update Time Tracking Project - Returns timesheet entries for all employees, or a filtered subset, within the specified date range. Results include both clock and hour entry types. Dates must fall within the last 365 days and are interpreted in the company timezone. + Partially updates a time tracking project identified by its ID. Only fields provided in the request body are updated; omitted fields are left unchanged. OAuth Scopes: time_tracking:project.write - :param start: YYYY-MM-DD. Only show timesheet entries on/after the specified start date. Must be within the last 365 days. (required) - :type start: date - :param end: YYYY-MM-DD. Only show timesheet entries on/before the specified end date. Must be within the last 365 days. (required) - :type end: date - :param employee_ids: A comma separated list of employee IDs. When specified, only entries that match these employee IDs are returned. When omitted, entries for all accessible employees are returned. - :type employee_ids: str + :param id: The project ID. (required) + :type id: int + :param project_update_time_tracking_project_v1: (required) + :type project_update_time_tracking_project_v1: ProjectUpdateTimeTrackingProjectV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6206,37 +12738,33 @@ def list_timesheet_entries_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._list_timesheet_entries_serialize( - start=start, - end=end, - employee_ids=employee_ids, + _param = self._update_project_serialize( + id=id, + project_update_time_tracking_project_v1=project_update_time_tracking_project_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EmployeeTimesheetEntryTransformer]", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "ProjectTimeTrackingProjectV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_timesheet_entries_serialize( + def _update_project_serialize( self, - start, - end, - employee_ids, + id, + project_update_time_tracking_project_v1, _request_auth, _content_type, _headers, @@ -6245,73 +12773,43 @@ def _list_timesheet_entries_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters + if id is not None: + _path_params["id"] = id # process the query parameters - if start is not None: - if isinstance(start, date): - _query_params.append( - ( - 'start', - start.strftime( - self.api_client.configuration.date_format - ) - ) - ) - else: - _query_params.append(('start', start)) - - if end is not None: - if isinstance(end, date): - _query_params.append( - ( - 'end', - end.strftime( - self.api_client.configuration.date_format - ) - ) - ) - else: - _query_params.append(('end', end)) - - if employee_ids is not None: - - _query_params.append(('employeeIds', employee_ids)) - # process the header parameters # process the form parameters # process the body parameter - + if project_update_time_tracking_project_v1 is not None: + _body_params = project_update_time_tracking_project_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/time_tracking/timesheet_entries', + method="PATCH", + resource_path="/api/v1/time-tracking/projects/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6321,38 +12819,30 @@ def _list_timesheet_entries_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def replace_breaks_for_break_policy( + def update_shift_differential( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - time_tracking_create_or_update_time_tracking_break_without_policy_v1: List[TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The shift differential ID.")], + shift_differential_update_time_tracking_shift_differential_v1: ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[TimeTrackingTimeTrackingBreakV1]: - """Replace Breaks for Break Policy + ) -> ShiftDifferentialTimeTrackingShiftDifferentialV1: + """Update Time Tracking Shift Differential - Replace all breaks for a break policy. Breaks with an ID will be updated, breaks without an ID will be created. Existing breaks not in the request will be soft-deleted. + Partially updates a time tracking shift differential identified by its ID. OAuth Scopes: time_tracking:shift_differentials.write - :param id: The break policy ID. (required) - :type id: str - :param time_tracking_create_or_update_time_tracking_break_without_policy_v1: (required) - :type time_tracking_create_or_update_time_tracking_break_without_policy_v1: List[TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1] + :param id: The shift differential ID. (required) + :type id: int + :param shift_differential_update_time_tracking_shift_differential_v1: (required) + :type shift_differential_update_time_tracking_shift_differential_v1: ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6373,61 +12863,54 @@ def replace_breaks_for_break_policy( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._replace_breaks_for_break_policy_serialize( + _param = self._update_shift_differential_serialize( id=id, - time_tracking_create_or_update_time_tracking_break_without_policy_v1=time_tracking_create_or_update_time_tracking_break_without_policy_v1, + shift_differential_update_time_tracking_shift_differential_v1=shift_differential_update_time_tracking_shift_differential_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeTrackingTimeTrackingBreakV1]", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "ShiftDifferentialTimeTrackingShiftDifferentialV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def replace_breaks_for_break_policy_with_http_info( + def update_shift_differential_with_http_info( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - time_tracking_create_or_update_time_tracking_break_without_policy_v1: List[TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The shift differential ID.")], + shift_differential_update_time_tracking_shift_differential_v1: ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[TimeTrackingTimeTrackingBreakV1]]: - """Replace Breaks for Break Policy + ) -> ApiResponse[ShiftDifferentialTimeTrackingShiftDifferentialV1]: + """Update Time Tracking Shift Differential - Replace all breaks for a break policy. Breaks with an ID will be updated, breaks without an ID will be created. Existing breaks not in the request will be soft-deleted. + Partially updates a time tracking shift differential identified by its ID. OAuth Scopes: time_tracking:shift_differentials.write - :param id: The break policy ID. (required) - :type id: str - :param time_tracking_create_or_update_time_tracking_break_without_policy_v1: (required) - :type time_tracking_create_or_update_time_tracking_break_without_policy_v1: List[TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1] + :param id: The shift differential ID. (required) + :type id: int + :param shift_differential_update_time_tracking_shift_differential_v1: (required) + :type shift_differential_update_time_tracking_shift_differential_v1: ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6448,61 +12931,54 @@ def replace_breaks_for_break_policy_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._replace_breaks_for_break_policy_serialize( + _param = self._update_shift_differential_serialize( id=id, - time_tracking_create_or_update_time_tracking_break_without_policy_v1=time_tracking_create_or_update_time_tracking_break_without_policy_v1, + shift_differential_update_time_tracking_shift_differential_v1=shift_differential_update_time_tracking_shift_differential_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeTrackingTimeTrackingBreakV1]", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "ShiftDifferentialTimeTrackingShiftDifferentialV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def replace_breaks_for_break_policy_without_preload_content( + def update_shift_differential_without_preload_content( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - time_tracking_create_or_update_time_tracking_break_without_policy_v1: List[TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The shift differential ID.")], + shift_differential_update_time_tracking_shift_differential_v1: ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Replace Breaks for Break Policy + """Update Time Tracking Shift Differential - Replace all breaks for a break policy. Breaks with an ID will be updated, breaks without an ID will be created. Existing breaks not in the request will be soft-deleted. + Partially updates a time tracking shift differential identified by its ID. OAuth Scopes: time_tracking:shift_differentials.write - :param id: The break policy ID. (required) - :type id: str - :param time_tracking_create_or_update_time_tracking_break_without_policy_v1: (required) - :type time_tracking_create_or_update_time_tracking_break_without_policy_v1: List[TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1] + :param id: The shift differential ID. (required) + :type id: int + :param shift_differential_update_time_tracking_shift_differential_v1: (required) + :type shift_differential_update_time_tracking_shift_differential_v1: ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6523,35 +12999,33 @@ def replace_breaks_for_break_policy_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._replace_breaks_for_break_policy_serialize( + _param = self._update_shift_differential_serialize( id=id, - time_tracking_create_or_update_time_tracking_break_without_policy_v1=time_tracking_create_or_update_time_tracking_break_without_policy_v1, + shift_differential_update_time_tracking_shift_differential_v1=shift_differential_update_time_tracking_shift_differential_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[TimeTrackingTimeTrackingBreakV1]", - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "ShiftDifferentialTimeTrackingShiftDifferentialV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _replace_breaks_for_break_policy_serialize( + def _update_shift_differential_serialize( self, id, - time_tracking_create_or_update_time_tracking_break_without_policy_v1, + shift_differential_update_time_tracking_shift_differential_v1, _request_auth, _content_type, _headers, @@ -6560,61 +13034,43 @@ def _replace_breaks_for_break_policy_serialize( _host = None - _collection_formats: Dict[str, str] = { - 'TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1': '', - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if time_tracking_create_or_update_time_tracking_break_without_policy_v1 is not None: - _body_params = time_tracking_create_or_update_time_tracking_break_without_policy_v1 - + if shift_differential_update_time_tracking_shift_differential_v1 is not None: + _body_params = shift_differential_update_time_tracking_shift_differential_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/time-tracking/break-policies/{id}/breaks', + method="PATCH", + resource_path="/api/v1/time-tracking/shift-differentials/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6624,38 +13080,30 @@ def _replace_breaks_for_break_policy_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def set_break_policy_employees( + def update_task( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - set_break_policy_employees_request: SetBreakPolicyEmployeesRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The task ID.")], + project_update_time_tracking_project_task_v1: ProjectUpdateTimeTrackingProjectTaskV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Set Employees for Break Policy + ) -> ProjectTimeTrackingTaskV1: + """Update Time Tracking Task - Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. + Partially updates a time tracking task identified by its ID. Only fields provided in the request body are updated; at least one field must be provided. OAuth Scopes: time_tracking:project.write - :param id: The break policy ID. (required) - :type id: str - :param set_break_policy_employees_request: (required) - :type set_break_policy_employees_request: SetBreakPolicyEmployeesRequest + :param id: The task ID. (required) + :type id: int + :param project_update_time_tracking_project_task_v1: (required) + :type project_update_time_tracking_project_task_v1: ProjectUpdateTimeTrackingProjectTaskV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6676,62 +13124,52 @@ def set_break_policy_employees( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._set_break_policy_employees_serialize( + _param = self._update_task_serialize( id=id, - set_break_policy_employees_request=set_break_policy_employees_request, + project_update_time_tracking_project_task_v1=project_update_time_tracking_project_task_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "ProjectTimeTrackingTaskV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call - def set_break_policy_employees_with_http_info( + def update_task_with_http_info( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - set_break_policy_employees_request: SetBreakPolicyEmployeesRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The task ID.")], + project_update_time_tracking_project_task_v1: ProjectUpdateTimeTrackingProjectTaskV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Set Employees for Break Policy + ) -> ApiResponse[ProjectTimeTrackingTaskV1]: + """Update Time Tracking Task - Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. + Partially updates a time tracking task identified by its ID. Only fields provided in the request body are updated; at least one field must be provided. OAuth Scopes: time_tracking:project.write - :param id: The break policy ID. (required) - :type id: str - :param set_break_policy_employees_request: (required) - :type set_break_policy_employees_request: SetBreakPolicyEmployeesRequest + :param id: The task ID. (required) + :type id: int + :param project_update_time_tracking_project_task_v1: (required) + :type project_update_time_tracking_project_task_v1: ProjectUpdateTimeTrackingProjectTaskV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6752,61 +13190,52 @@ def set_break_policy_employees_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._set_break_policy_employees_serialize( + _param = self._update_task_serialize( id=id, - set_break_policy_employees_request=set_break_policy_employees_request, + project_update_time_tracking_project_task_v1=project_update_time_tracking_project_task_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "ProjectTimeTrackingTaskV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def set_break_policy_employees_without_preload_content( + def update_task_without_preload_content( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - set_break_policy_employees_request: SetBreakPolicyEmployeesRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The task ID.")], + project_update_time_tracking_project_task_v1: ProjectUpdateTimeTrackingProjectTaskV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Set Employees for Break Policy + """Update Time Tracking Task - Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. + Partially updates a time tracking task identified by its ID. Only fields provided in the request body are updated; at least one field must be provided. OAuth Scopes: time_tracking:project.write - :param id: The break policy ID. (required) - :type id: str - :param set_break_policy_employees_request: (required) - :type set_break_policy_employees_request: SetBreakPolicyEmployeesRequest + :param id: The task ID. (required) + :type id: int + :param project_update_time_tracking_project_task_v1: (required) + :type project_update_time_tracking_project_task_v1: ProjectUpdateTimeTrackingProjectTaskV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6827,35 +13256,31 @@ def set_break_policy_employees_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._set_break_policy_employees_serialize( + _param = self._update_task_serialize( id=id, - set_break_policy_employees_request=set_break_policy_employees_request, + project_update_time_tracking_project_task_v1=project_update_time_tracking_project_task_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "ProjectTimeTrackingTaskV1", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _set_break_policy_employees_serialize( + def _update_task_serialize( self, id, - set_break_policy_employees_request, + project_update_time_tracking_project_task_v1, _request_auth, _content_type, _headers, @@ -6864,60 +13289,43 @@ def _set_break_policy_employees_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if set_break_policy_employees_request is not None: - _body_params = set_break_policy_employees_request - + if project_update_time_tracking_project_task_v1 is not None: + _body_params = project_update_time_tracking_project_task_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/time-tracking/break-policies/{id}/assign', + method="PATCH", + resource_path="/api/v1/time-tracking/tasks/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6927,38 +13335,30 @@ def _set_break_policy_employees_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def sync_break_policy( + def update_time_tracking_configuration( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - time_tracking_sync_time_tracking_break_policy_v1: TimeTrackingSyncTimeTrackingBreakPolicyV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The time tracking configuration ID.")], + time_tracking_update_time_tracking_configuration_v1: TimeTrackingUpdateTimeTrackingConfigurationV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingTimeTrackingBreakPolicyWithRelationsV1: - """Sync Break Policy + ) -> TimeTrackingTimeTrackingConfigurationV1: + """Update Configuration - Performs a full replacement of a break policy and its related data (breaks and employee assignments). Unlike the partial update endpoint, this replaces the entire policy state with the provided payload, removing any breaks or assignments not included in the request. + Updates a time tracking configuration using JSON Merge Patch (RFC 7396) semantics: only the properties present in the body are applied, omitted properties are unchanged, and an explicit null clears a nullable property. Both GLOBAL and GROUP configurations can be updated. Content-Type: application/merge-patch+json is preferred because it names those semantics, but application/json is also accepted. OAuth Scopes: time_tracking:configurations.write - :param id: The break policy ID. (required) - :type id: str - :param time_tracking_sync_time_tracking_break_policy_v1: (required) - :type time_tracking_sync_time_tracking_break_policy_v1: TimeTrackingSyncTimeTrackingBreakPolicyV1 + :param id: The time tracking configuration ID. (required) + :type id: int + :param time_tracking_update_time_tracking_configuration_v1: (required) + :type time_tracking_update_time_tracking_configuration_v1: TimeTrackingUpdateTimeTrackingConfigurationV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6979,60 +13379,54 @@ def sync_break_policy( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._sync_break_policy_serialize( + _param = self._update_time_tracking_configuration_serialize( id=id, - time_tracking_sync_time_tracking_break_policy_v1=time_tracking_sync_time_tracking_break_policy_v1, + time_tracking_update_time_tracking_configuration_v1=time_tracking_update_time_tracking_configuration_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingConfigurationV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def sync_break_policy_with_http_info( + def update_time_tracking_configuration_with_http_info( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - time_tracking_sync_time_tracking_break_policy_v1: TimeTrackingSyncTimeTrackingBreakPolicyV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The time tracking configuration ID.")], + time_tracking_update_time_tracking_configuration_v1: TimeTrackingUpdateTimeTrackingConfigurationV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingTimeTrackingBreakPolicyWithRelationsV1]: - """Sync Break Policy + ) -> ApiResponse[TimeTrackingTimeTrackingConfigurationV1]: + """Update Configuration - Performs a full replacement of a break policy and its related data (breaks and employee assignments). Unlike the partial update endpoint, this replaces the entire policy state with the provided payload, removing any breaks or assignments not included in the request. + Updates a time tracking configuration using JSON Merge Patch (RFC 7396) semantics: only the properties present in the body are applied, omitted properties are unchanged, and an explicit null clears a nullable property. Both GLOBAL and GROUP configurations can be updated. Content-Type: application/merge-patch+json is preferred because it names those semantics, but application/json is also accepted. OAuth Scopes: time_tracking:configurations.write - :param id: The break policy ID. (required) - :type id: str - :param time_tracking_sync_time_tracking_break_policy_v1: (required) - :type time_tracking_sync_time_tracking_break_policy_v1: TimeTrackingSyncTimeTrackingBreakPolicyV1 + :param id: The time tracking configuration ID. (required) + :type id: int + :param time_tracking_update_time_tracking_configuration_v1: (required) + :type time_tracking_update_time_tracking_configuration_v1: TimeTrackingUpdateTimeTrackingConfigurationV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7053,60 +13447,54 @@ def sync_break_policy_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._sync_break_policy_serialize( + _param = self._update_time_tracking_configuration_serialize( id=id, - time_tracking_sync_time_tracking_break_policy_v1=time_tracking_sync_time_tracking_break_policy_v1, + time_tracking_update_time_tracking_configuration_v1=time_tracking_update_time_tracking_configuration_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingConfigurationV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def sync_break_policy_without_preload_content( + def update_time_tracking_configuration_without_preload_content( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - time_tracking_sync_time_tracking_break_policy_v1: TimeTrackingSyncTimeTrackingBreakPolicyV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt, Field(description="The time tracking configuration ID.")], + time_tracking_update_time_tracking_configuration_v1: TimeTrackingUpdateTimeTrackingConfigurationV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Sync Break Policy + """Update Configuration - Performs a full replacement of a break policy and its related data (breaks and employee assignments). Unlike the partial update endpoint, this replaces the entire policy state with the provided payload, removing any breaks or assignments not included in the request. + Updates a time tracking configuration using JSON Merge Patch (RFC 7396) semantics: only the properties present in the body are applied, omitted properties are unchanged, and an explicit null clears a nullable property. Both GLOBAL and GROUP configurations can be updated. Content-Type: application/merge-patch+json is preferred because it names those semantics, but application/json is also accepted. OAuth Scopes: time_tracking:configurations.write - :param id: The break policy ID. (required) - :type id: str - :param time_tracking_sync_time_tracking_break_policy_v1: (required) - :type time_tracking_sync_time_tracking_break_policy_v1: TimeTrackingSyncTimeTrackingBreakPolicyV1 + :param id: The time tracking configuration ID. (required) + :type id: int + :param time_tracking_update_time_tracking_configuration_v1: (required) + :type time_tracking_update_time_tracking_configuration_v1: TimeTrackingUpdateTimeTrackingConfigurationV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7127,34 +13515,33 @@ def sync_break_policy_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._sync_break_policy_serialize( + _param = self._update_time_tracking_configuration_serialize( id=id, - time_tracking_sync_time_tracking_break_policy_v1=time_tracking_sync_time_tracking_break_policy_v1, + time_tracking_update_time_tracking_configuration_v1=time_tracking_update_time_tracking_configuration_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingConfigurationV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _sync_break_policy_serialize( + def _update_time_tracking_configuration_serialize( self, id, - time_tracking_sync_time_tracking_break_policy_v1, + time_tracking_update_time_tracking_configuration_v1, _request_auth, _content_type, _headers, @@ -7163,60 +13550,45 @@ def _sync_break_policy_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if time_tracking_sync_time_tracking_break_policy_v1 is not None: - _body_params = time_tracking_sync_time_tracking_break_policy_v1 - + if time_tracking_update_time_tracking_configuration_v1 is not None: + _body_params = time_tracking_update_time_tracking_configuration_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/merge-patch+json", "application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/time-tracking/break-policies/{id}/sync', + method="PATCH", + resource_path="/api/v1/time-tracking/configurations/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7226,38 +13598,30 @@ def _sync_break_policy_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def unassign_employees_from_break_policy( + def update_time_tracking_employee_enrollment( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - unassign_employees_from_break_policy_request: UnassignEmployeesFromBreakPolicyRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[StrictInt, Field(description="The employee ID.")], + time_tracking_update_employee_time_tracking_data_v1: TimeTrackingUpdateEmployeeTimeTrackingDataV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Unassign Employees from Break Policy + ) -> TimeTrackingEmployeeTimeTrackingDataV1: + """Update Employee Enrollment - Unassigns the specified employees from a break policy. Removes employee assignments from the policy without affecting the policy itself or other assigned employees. Employees can only be unassigned from policies that are not assigned to all employees. + Enables, disables, or reassigns a single employee's enrollment using JSON Merge Patch (RFC 7396) semantics: only the properties present in the body are applied and omitted properties are unchanged. Content-Type must be `application/merge-patch+json`. When the employee has no enrollment record yet and `enabled` is set to true, one is created. `timezone` and `clockInId` are read-only on this API. Reassigning an employee whose time tracking is currently off requires setting `enabled` to true in the same body, and `configurationId` and `enabledOn` cannot be combined with `enabled: false`. OAuth Scopes: time_tracking:employees.write - :param id: The break policy ID. (required) - :type id: str - :param unassign_employees_from_break_policy_request: (required) - :type unassign_employees_from_break_policy_request: UnassignEmployeesFromBreakPolicyRequest + :param employee_id: The employee ID. (required) + :type employee_id: int + :param time_tracking_update_employee_time_tracking_data_v1: (required) + :type time_tracking_update_employee_time_tracking_data_v1: TimeTrackingUpdateEmployeeTimeTrackingDataV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7278,63 +13642,54 @@ def unassign_employees_from_break_policy( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._unassign_employees_from_break_policy_serialize( - id=id, - unassign_employees_from_break_policy_request=unassign_employees_from_break_policy_request, + _param = self._update_time_tracking_employee_enrollment_serialize( + employee_id=employee_id, + time_tracking_update_employee_time_tracking_data_v1=time_tracking_update_employee_time_tracking_data_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingEmployeeTimeTrackingDataV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "415": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() - # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data @validate_call - def unassign_employees_from_break_policy_with_http_info( + def update_time_tracking_employee_enrollment_with_http_info( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - unassign_employees_from_break_policy_request: UnassignEmployeesFromBreakPolicyRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[StrictInt, Field(description="The employee ID.")], + time_tracking_update_employee_time_tracking_data_v1: TimeTrackingUpdateEmployeeTimeTrackingDataV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Unassign Employees from Break Policy + ) -> ApiResponse[TimeTrackingEmployeeTimeTrackingDataV1]: + """Update Employee Enrollment - Unassigns the specified employees from a break policy. Removes employee assignments from the policy without affecting the policy itself or other assigned employees. Employees can only be unassigned from policies that are not assigned to all employees. + Enables, disables, or reassigns a single employee's enrollment using JSON Merge Patch (RFC 7396) semantics: only the properties present in the body are applied and omitted properties are unchanged. Content-Type must be `application/merge-patch+json`. When the employee has no enrollment record yet and `enabled` is set to true, one is created. `timezone` and `clockInId` are read-only on this API. Reassigning an employee whose time tracking is currently off requires setting `enabled` to true in the same body, and `configurationId` and `enabledOn` cannot be combined with `enabled: false`. OAuth Scopes: time_tracking:employees.write - :param id: The break policy ID. (required) - :type id: str - :param unassign_employees_from_break_policy_request: (required) - :type unassign_employees_from_break_policy_request: UnassignEmployeesFromBreakPolicyRequest + :param employee_id: The employee ID. (required) + :type employee_id: int + :param time_tracking_update_employee_time_tracking_data_v1: (required) + :type time_tracking_update_employee_time_tracking_data_v1: TimeTrackingUpdateEmployeeTimeTrackingDataV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7355,62 +13710,54 @@ def unassign_employees_from_break_policy_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._unassign_employees_from_break_policy_serialize( - id=id, - unassign_employees_from_break_policy_request=unassign_employees_from_break_policy_request, + _param = self._update_time_tracking_employee_enrollment_serialize( + employee_id=employee_id, + time_tracking_update_employee_time_tracking_data_v1=time_tracking_update_employee_time_tracking_data_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingEmployeeTimeTrackingDataV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "415": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def unassign_employees_from_break_policy_without_preload_content( + def update_time_tracking_employee_enrollment_without_preload_content( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - unassign_employees_from_break_policy_request: UnassignEmployeesFromBreakPolicyRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[StrictInt, Field(description="The employee ID.")], + time_tracking_update_employee_time_tracking_data_v1: TimeTrackingUpdateEmployeeTimeTrackingDataV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Unassign Employees from Break Policy + """Update Employee Enrollment - Unassigns the specified employees from a break policy. Removes employee assignments from the policy without affecting the policy itself or other assigned employees. Employees can only be unassigned from policies that are not assigned to all employees. + Enables, disables, or reassigns a single employee's enrollment using JSON Merge Patch (RFC 7396) semantics: only the properties present in the body are applied and omitted properties are unchanged. Content-Type must be `application/merge-patch+json`. When the employee has no enrollment record yet and `enabled` is set to true, one is created. `timezone` and `clockInId` are read-only on this API. Reassigning an employee whose time tracking is currently off requires setting `enabled` to true in the same body, and `configurationId` and `enabledOn` cannot be combined with `enabled: false`. OAuth Scopes: time_tracking:employees.write - :param id: The break policy ID. (required) - :type id: str - :param unassign_employees_from_break_policy_request: (required) - :type unassign_employees_from_break_policy_request: UnassignEmployeesFromBreakPolicyRequest + :param employee_id: The employee ID. (required) + :type employee_id: int + :param time_tracking_update_employee_time_tracking_data_v1: (required) + :type time_tracking_update_employee_time_tracking_data_v1: TimeTrackingUpdateEmployeeTimeTrackingDataV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7431,36 +13778,33 @@ def unassign_employees_from_break_policy_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._unassign_employees_from_break_policy_serialize( - id=id, - unassign_employees_from_break_policy_request=unassign_employees_from_break_policy_request, + _param = self._update_time_tracking_employee_enrollment_serialize( + employee_id=employee_id, + time_tracking_update_employee_time_tracking_data_v1=time_tracking_update_employee_time_tracking_data_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingEmployeeTimeTrackingDataV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "415": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _unassign_employees_from_break_policy_serialize( + def _update_time_tracking_employee_enrollment_serialize( self, - id, - unassign_employees_from_break_policy_request, + employee_id, + time_tracking_update_employee_time_tracking_data_v1, _request_auth, _content_type, _headers, @@ -7469,60 +13813,43 @@ def _unassign_employees_from_break_policy_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if id is not None: - _path_params['id'] = id + if employee_id is not None: + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if unassign_employees_from_break_policy_request is not None: - _body_params = unassign_employees_from_break_policy_request - + if time_tracking_update_employee_time_tracking_data_v1 is not None: + _body_params = time_tracking_update_employee_time_tracking_data_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/merge-patch+json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/time-tracking/break-policies/{id}/unassign', + method="PATCH", + resource_path="/api/v1/time-tracking/employees/{employeeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7532,38 +13859,30 @@ def _unassign_employees_from_break_policy_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def update_break( + def update_time_tracking_kiosk( self, - id: Annotated[UUID, Field(description="The break ID.")], - time_tracking_update_time_tracking_break_v1: TimeTrackingUpdateTimeTrackingBreakV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[UUID, Field(description="The time tracking kiosk ID.")], + time_tracking_update_time_tracking_kiosk_v1: TimeTrackingUpdateTimeTrackingKioskV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingTimeTrackingBreakV1: - """Update Break + ) -> TimeTrackingTimeTrackingKioskV1: + """Update Time Tracking Kiosk - Partially updates a time tracking break identified by its UUID. Only fields provided in the request body are updated. Returns the updated break on success. + Updates a time tracking kiosk using JSON Merge Patch (RFC 7396) semantics. Only the kiosk `name` is mutable. Content-Type: application/merge-patch+json is preferred because it names those semantics, but application/json is also accepted. OAuth Scopes: time_tracking:kiosks.write - :param id: The break ID. (required) + :param id: The time tracking kiosk ID. (required) :type id: str - :param time_tracking_update_time_tracking_break_v1: (required) - :type time_tracking_update_time_tracking_break_v1: TimeTrackingUpdateTimeTrackingBreakV1 + :param time_tracking_update_time_tracking_kiosk_v1: (required) + :type time_tracking_update_time_tracking_kiosk_v1: TimeTrackingUpdateTimeTrackingKioskV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7584,59 +13903,54 @@ def update_break( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._update_break_serialize( + _param = self._update_time_tracking_kiosk_serialize( id=id, - time_tracking_update_time_tracking_break_v1=time_tracking_update_time_tracking_break_v1, + time_tracking_update_time_tracking_kiosk_v1=time_tracking_update_time_tracking_kiosk_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingKioskV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def update_break_with_http_info( + def update_time_tracking_kiosk_with_http_info( self, - id: Annotated[UUID, Field(description="The break ID.")], - time_tracking_update_time_tracking_break_v1: TimeTrackingUpdateTimeTrackingBreakV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[UUID, Field(description="The time tracking kiosk ID.")], + time_tracking_update_time_tracking_kiosk_v1: TimeTrackingUpdateTimeTrackingKioskV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingTimeTrackingBreakV1]: - """Update Break + ) -> ApiResponse[TimeTrackingTimeTrackingKioskV1]: + """Update Time Tracking Kiosk - Partially updates a time tracking break identified by its UUID. Only fields provided in the request body are updated. Returns the updated break on success. + Updates a time tracking kiosk using JSON Merge Patch (RFC 7396) semantics. Only the kiosk `name` is mutable. Content-Type: application/merge-patch+json is preferred because it names those semantics, but application/json is also accepted. OAuth Scopes: time_tracking:kiosks.write - :param id: The break ID. (required) + :param id: The time tracking kiosk ID. (required) :type id: str - :param time_tracking_update_time_tracking_break_v1: (required) - :type time_tracking_update_time_tracking_break_v1: TimeTrackingUpdateTimeTrackingBreakV1 + :param time_tracking_update_time_tracking_kiosk_v1: (required) + :type time_tracking_update_time_tracking_kiosk_v1: TimeTrackingUpdateTimeTrackingKioskV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7657,59 +13971,54 @@ def update_break_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._update_break_serialize( + _param = self._update_time_tracking_kiosk_serialize( id=id, - time_tracking_update_time_tracking_break_v1=time_tracking_update_time_tracking_break_v1, + time_tracking_update_time_tracking_kiosk_v1=time_tracking_update_time_tracking_kiosk_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingKioskV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def update_break_without_preload_content( + def update_time_tracking_kiosk_without_preload_content( self, - id: Annotated[UUID, Field(description="The break ID.")], - time_tracking_update_time_tracking_break_v1: TimeTrackingUpdateTimeTrackingBreakV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[UUID, Field(description="The time tracking kiosk ID.")], + time_tracking_update_time_tracking_kiosk_v1: TimeTrackingUpdateTimeTrackingKioskV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Break + """Update Time Tracking Kiosk - Partially updates a time tracking break identified by its UUID. Only fields provided in the request body are updated. Returns the updated break on success. + Updates a time tracking kiosk using JSON Merge Patch (RFC 7396) semantics. Only the kiosk `name` is mutable. Content-Type: application/merge-patch+json is preferred because it names those semantics, but application/json is also accepted. OAuth Scopes: time_tracking:kiosks.write - :param id: The break ID. (required) + :param id: The time tracking kiosk ID. (required) :type id: str - :param time_tracking_update_time_tracking_break_v1: (required) - :type time_tracking_update_time_tracking_break_v1: TimeTrackingUpdateTimeTrackingBreakV1 + :param time_tracking_update_time_tracking_kiosk_v1: (required) + :type time_tracking_update_time_tracking_kiosk_v1: TimeTrackingUpdateTimeTrackingKioskV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7730,33 +14039,33 @@ def update_break_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._update_break_serialize( + _param = self._update_time_tracking_kiosk_serialize( id=id, - time_tracking_update_time_tracking_break_v1=time_tracking_update_time_tracking_break_v1, + time_tracking_update_time_tracking_kiosk_v1=time_tracking_update_time_tracking_kiosk_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingKioskV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "409": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _update_break_serialize( + def _update_time_tracking_kiosk_serialize( self, id, - time_tracking_update_time_tracking_break_v1, + time_tracking_update_time_tracking_kiosk_v1, _request_auth, _content_type, _headers, @@ -7765,60 +14074,45 @@ def _update_break_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if time_tracking_update_time_tracking_break_v1 is not None: - _body_params = time_tracking_update_time_tracking_break_v1 - + if time_tracking_update_time_tracking_kiosk_v1 is not None: + _body_params = time_tracking_update_time_tracking_kiosk_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/merge-patch+json", "application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/v1/time-tracking/breaks/{id}', + method="PATCH", + resource_path="/api/v1/time-tracking/kiosks/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7828,38 +14122,30 @@ def _update_break_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def update_break_policy( + def update_time_tracking_time_clock( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - time_tracking_update_time_tracking_break_policy_v1: TimeTrackingUpdateTimeTrackingBreakPolicyV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[UUID, Field(description="The time tracking time clock ID.")], + time_tracking_update_time_tracking_time_clock_v1: TimeTrackingUpdateTimeTrackingTimeClockV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TimeTrackingTimeTrackingBreakPolicyV1: - """Update Break Policy + ) -> TimeTrackingTimeTrackingTimeClockV1: + """Update Time Tracking Time Clock - Partially updates a break policy identified by its UUID. Only fields provided in the request body are updated. Returns the updated break policy on success. + Updates a time tracking time clock using JSON Merge Patch (RFC 7396) semantics: only the properties present in the body are applied. Only `name` and `timezone` are mutable, and at least one of them must be provided. Both changes are written through to the GT Clocks partner; writes are never served from cache, so a write returns 503 with a Retry-After header when the partner is unreachable. A successful write invalidates the cached device list so the next read reflects the change. Content-Type: application/merge-patch+json is preferred because it names those semantics, but application/json is also accepted. OAuth Scopes: time_tracking:time_clocks.write - :param id: The break policy ID. (required) + :param id: The time tracking time clock ID. (required) :type id: str - :param time_tracking_update_time_tracking_break_policy_v1: (required) - :type time_tracking_update_time_tracking_break_policy_v1: TimeTrackingUpdateTimeTrackingBreakPolicyV1 + :param time_tracking_update_time_tracking_time_clock_v1: (required) + :type time_tracking_update_time_tracking_time_clock_v1: TimeTrackingUpdateTimeTrackingTimeClockV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7880,61 +14166,54 @@ def update_break_policy( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._update_break_policy_serialize( + _param = self._update_time_tracking_time_clock_serialize( id=id, - time_tracking_update_time_tracking_break_policy_v1=time_tracking_update_time_tracking_break_policy_v1, + time_tracking_update_time_tracking_time_clock_v1=time_tracking_update_time_tracking_time_clock_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingTimeClockV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "503": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def update_break_policy_with_http_info( + def update_time_tracking_time_clock_with_http_info( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - time_tracking_update_time_tracking_break_policy_v1: TimeTrackingUpdateTimeTrackingBreakPolicyV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[UUID, Field(description="The time tracking time clock ID.")], + time_tracking_update_time_tracking_time_clock_v1: TimeTrackingUpdateTimeTrackingTimeClockV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TimeTrackingTimeTrackingBreakPolicyV1]: - """Update Break Policy + ) -> ApiResponse[TimeTrackingTimeTrackingTimeClockV1]: + """Update Time Tracking Time Clock - Partially updates a break policy identified by its UUID. Only fields provided in the request body are updated. Returns the updated break policy on success. + Updates a time tracking time clock using JSON Merge Patch (RFC 7396) semantics: only the properties present in the body are applied. Only `name` and `timezone` are mutable, and at least one of them must be provided. Both changes are written through to the GT Clocks partner; writes are never served from cache, so a write returns 503 with a Retry-After header when the partner is unreachable. A successful write invalidates the cached device list so the next read reflects the change. Content-Type: application/merge-patch+json is preferred because it names those semantics, but application/json is also accepted. OAuth Scopes: time_tracking:time_clocks.write - :param id: The break policy ID. (required) + :param id: The time tracking time clock ID. (required) :type id: str - :param time_tracking_update_time_tracking_break_policy_v1: (required) - :type time_tracking_update_time_tracking_break_policy_v1: TimeTrackingUpdateTimeTrackingBreakPolicyV1 + :param time_tracking_update_time_tracking_time_clock_v1: (required) + :type time_tracking_update_time_tracking_time_clock_v1: TimeTrackingUpdateTimeTrackingTimeClockV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7955,61 +14234,54 @@ def update_break_policy_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._update_break_policy_serialize( + _param = self._update_time_tracking_time_clock_serialize( id=id, - time_tracking_update_time_tracking_break_policy_v1=time_tracking_update_time_tracking_break_policy_v1, + time_tracking_update_time_tracking_time_clock_v1=time_tracking_update_time_tracking_time_clock_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingTimeClockV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "503": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def update_break_policy_without_preload_content( + def update_time_tracking_time_clock_without_preload_content( self, - id: Annotated[UUID, Field(description="The break policy ID.")], - time_tracking_update_time_tracking_break_policy_v1: TimeTrackingUpdateTimeTrackingBreakPolicyV1, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[UUID, Field(description="The time tracking time clock ID.")], + time_tracking_update_time_tracking_time_clock_v1: TimeTrackingUpdateTimeTrackingTimeClockV1, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Break Policy + """Update Time Tracking Time Clock - Partially updates a break policy identified by its UUID. Only fields provided in the request body are updated. Returns the updated break policy on success. + Updates a time tracking time clock using JSON Merge Patch (RFC 7396) semantics: only the properties present in the body are applied. Only `name` and `timezone` are mutable, and at least one of them must be provided. Both changes are written through to the GT Clocks partner; writes are never served from cache, so a write returns 503 with a Retry-After header when the partner is unreachable. A successful write invalidates the cached device list so the next read reflects the change. Content-Type: application/merge-patch+json is preferred because it names those semantics, but application/json is also accepted. OAuth Scopes: time_tracking:time_clocks.write - :param id: The break policy ID. (required) + :param id: The time tracking time clock ID. (required) :type id: str - :param time_tracking_update_time_tracking_break_policy_v1: (required) - :type time_tracking_update_time_tracking_break_policy_v1: TimeTrackingUpdateTimeTrackingBreakPolicyV1 + :param time_tracking_update_time_tracking_time_clock_v1: (required) + :type time_tracking_update_time_tracking_time_clock_v1: TimeTrackingUpdateTimeTrackingTimeClockV1 :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8030,35 +14302,33 @@ def update_break_policy_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._update_break_policy_serialize( + _param = self._update_time_tracking_time_clock_serialize( id=id, - time_tracking_update_time_tracking_break_policy_v1=time_tracking_update_time_tracking_break_policy_v1, + time_tracking_update_time_tracking_time_clock_v1=time_tracking_update_time_tracking_time_clock_v1, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "200": "TimeTrackingTimeTrackingTimeClockV1", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "422": "ProblemDetailsResponse", + "503": "ProblemDetailsResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _update_break_policy_serialize( + def _update_time_tracking_time_clock_serialize( self, id, - time_tracking_update_time_tracking_break_policy_v1, + time_tracking_update_time_tracking_time_clock_v1, _request_auth, _content_type, _headers, @@ -8067,60 +14337,45 @@ def _update_break_policy_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if time_tracking_update_time_tracking_break_policy_v1 is not None: - _body_params = time_tracking_update_time_tracking_break_policy_v1 - + if time_tracking_update_time_tracking_time_clock_v1 is not None: + _body_params = time_tracking_update_time_tracking_time_clock_v1 # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/merge-patch+json", "application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/v1/time-tracking/break-policies/{id}', + method="PATCH", + resource_path="/api/v1/time-tracking/time-clocks/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8130,7 +14385,5 @@ def _update_break_policy_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/total_rewards_api.py b/bamboohr_sdk/api/total_rewards_api.py new file mode 100644 index 0000000..fba41b7 --- /dev/null +++ b/bamboohr_sdk/api/total_rewards_api.py @@ -0,0 +1,1972 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from typing import Annotated, Any + +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.add_total_rewards_employees_request import AddTotalRewardsEmployeesRequest +from bamboohr_sdk.models.remove_total_rewards_employees_request import RemoveTotalRewardsEmployeesRequest +from bamboohr_sdk.models.set_total_rewards_custom_disclaimer_request import SetTotalRewardsCustomDisclaimerRequest +from bamboohr_sdk.models.set_total_rewards_onboarding_step_request import SetTotalRewardsOnboardingStepRequest +from bamboohr_sdk.models.total_rewards_employee_statement import TotalRewardsEmployeeStatement +from bamboohr_sdk.models.total_rewards_onboarding_step import TotalRewardsOnboardingStep +from bamboohr_sdk.rest import RESTResponseType + + +class TotalRewardsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + @validate_call + def add_total_rewards_employees( + self, + add_total_rewards_employees_request: AddTotalRewardsEmployeesRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Add Employees to Total Rewards + + Add employees to Total Rewards. Each employee will have a Total Rewards profile created and will be notified if they are active users. OAuth Scopes: total_rewards.write + + :param add_total_rewards_employees_request: (required) + :type add_total_rewards_employees_request: AddTotalRewardsEmployeesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._add_total_rewards_employees_serialize( + add_total_rewards_employees_request=add_total_rewards_employees_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def add_total_rewards_employees_with_http_info( + self, + add_total_rewards_employees_request: AddTotalRewardsEmployeesRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Add Employees to Total Rewards + + Add employees to Total Rewards. Each employee will have a Total Rewards profile created and will be notified if they are active users. OAuth Scopes: total_rewards.write + + :param add_total_rewards_employees_request: (required) + :type add_total_rewards_employees_request: AddTotalRewardsEmployeesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._add_total_rewards_employees_serialize( + add_total_rewards_employees_request=add_total_rewards_employees_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def add_total_rewards_employees_without_preload_content( + self, + add_total_rewards_employees_request: AddTotalRewardsEmployeesRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add Employees to Total Rewards + + Add employees to Total Rewards. Each employee will have a Total Rewards profile created and will be notified if they are active users. OAuth Scopes: total_rewards.write + + :param add_total_rewards_employees_request: (required) + :type add_total_rewards_employees_request: AddTotalRewardsEmployeesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._add_total_rewards_employees_serialize( + add_total_rewards_employees_request=add_total_rewards_employees_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _add_total_rewards_employees_serialize( + self, + add_total_rewards_employees_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if add_total_rewards_employees_request is not None: + _body_params = add_total_rewards_employees_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/problem+json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/api/v1/compensation/total_rewards/employees", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def check_total_rewards_profile( + self, + employee_id: Annotated[ + StrictStr | None, Field(description="The internal employee ID of the employee to check.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Check Total Rewards Profile Availability + + Check if the given employee has an active Total Rewards profile and the current user has permission to view it. Returns 204 when the employee has a profile and the user is authorized; 404 if the profile does not exist or the user lacks access. OAuth Scopes: total_rewards + + :param employee_id: The internal employee ID of the employee to check. (required) + :type employee_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._check_total_rewards_profile_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "404": None, + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def check_total_rewards_profile_with_http_info( + self, + employee_id: Annotated[ + StrictStr | None, Field(description="The internal employee ID of the employee to check.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Check Total Rewards Profile Availability + + Check if the given employee has an active Total Rewards profile and the current user has permission to view it. Returns 204 when the employee has a profile and the user is authorized; 404 if the profile does not exist or the user lacks access. OAuth Scopes: total_rewards + + :param employee_id: The internal employee ID of the employee to check. (required) + :type employee_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._check_total_rewards_profile_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "404": None, + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def check_total_rewards_profile_without_preload_content( + self, + employee_id: Annotated[ + StrictStr | None, Field(description="The internal employee ID of the employee to check.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Check Total Rewards Profile Availability + + Check if the given employee has an active Total Rewards profile and the current user has permission to view it. Returns 204 when the employee has a profile and the user is authorized; 404 if the profile does not exist or the user lacks access. OAuth Scopes: total_rewards + + :param employee_id: The internal employee ID of the employee to check. (required) + :type employee_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._check_total_rewards_profile_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "204": None, + "404": None, + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _check_total_rewards_profile_serialize( + self, + employee_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if employee_id is not None: + _path_params["employeeId"] = employee_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/problem+json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/total_rewards/{employeeId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_total_rewards_printable_statement( + self, + employee_id: Annotated[ + StrictStr | None, + Field( + description="The internal employee ID of the employee whose printable Total Rewards statement is returned." + ), + ], + multiplier: Annotated[ + StrictFloat | StrictInt | None, + Field(description="Hours-per-week multiplier for annualizing hourly pay."), + ] = None, + year: Annotated[ + StrictInt | None, Field(description="Statement year. Defaults to the current year when omitted.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Get Printable Total Rewards Statement + + Generate and return a PDF printable version of the employee's Total Rewards statement. OAuth Scopes: total_rewards + + :param employee_id: The internal employee ID of the employee whose printable Total Rewards statement is returned. (required) + :type employee_id: str + :param multiplier: Hours-per-week multiplier for annualizing hourly pay. + :type multiplier: float + :param year: Statement year. Defaults to the current year when omitted. + :type year: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_total_rewards_printable_statement_serialize( + employee_id=employee_id, + multiplier=multiplier, + year=year, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_total_rewards_printable_statement_with_http_info( + self, + employee_id: Annotated[ + StrictStr | None, + Field( + description="The internal employee ID of the employee whose printable Total Rewards statement is returned." + ), + ], + multiplier: Annotated[ + StrictFloat | StrictInt | None, + Field(description="Hours-per-week multiplier for annualizing hourly pay."), + ] = None, + year: Annotated[ + StrictInt | None, Field(description="Statement year. Defaults to the current year when omitted.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Get Printable Total Rewards Statement + + Generate and return a PDF printable version of the employee's Total Rewards statement. OAuth Scopes: total_rewards + + :param employee_id: The internal employee ID of the employee whose printable Total Rewards statement is returned. (required) + :type employee_id: str + :param multiplier: Hours-per-week multiplier for annualizing hourly pay. + :type multiplier: float + :param year: Statement year. Defaults to the current year when omitted. + :type year: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_total_rewards_printable_statement_serialize( + employee_id=employee_id, + multiplier=multiplier, + year=year, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_total_rewards_printable_statement_without_preload_content( + self, + employee_id: Annotated[ + StrictStr | None, + Field( + description="The internal employee ID of the employee whose printable Total Rewards statement is returned." + ), + ], + multiplier: Annotated[ + StrictFloat | StrictInt | None, + Field(description="Hours-per-week multiplier for annualizing hourly pay."), + ] = None, + year: Annotated[ + StrictInt | None, Field(description="Statement year. Defaults to the current year when omitted.") + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Printable Total Rewards Statement + + Generate and return a PDF printable version of the employee's Total Rewards statement. OAuth Scopes: total_rewards + + :param employee_id: The internal employee ID of the employee whose printable Total Rewards statement is returned. (required) + :type employee_id: str + :param multiplier: Hours-per-week multiplier for annualizing hourly pay. + :type multiplier: float + :param year: Statement year. Defaults to the current year when omitted. + :type year: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_total_rewards_printable_statement_serialize( + employee_id=employee_id, + multiplier=multiplier, + year=year, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_total_rewards_printable_statement_serialize( + self, + employee_id, + multiplier, + year, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if employee_id is not None: + _path_params["employeeId"] = employee_id + # process the query parameters + if multiplier is not None: + _query_params.append(("multiplier", multiplier)) + + if year is not None: + _query_params.append(("year", year)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/pdf", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/total_rewards/{employeeId}/printable", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_total_rewards_statement( + self, + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose total rewards statement is returned."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TotalRewardsEmployeeStatement: + """Get Total Rewards Statement + + Returns the full Total Rewards statement for the given employee, including compensation, benefits, bonuses, equity, reimbursements, and time-off data. OAuth Scopes: total_rewards + + :param employee_id: The internal employee ID of the employee whose total rewards statement is returned. (required) + :type employee_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_total_rewards_statement_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TotalRewardsEmployeeStatement", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_total_rewards_statement_with_http_info( + self, + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose total rewards statement is returned."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TotalRewardsEmployeeStatement]: + """Get Total Rewards Statement + + Returns the full Total Rewards statement for the given employee, including compensation, benefits, bonuses, equity, reimbursements, and time-off data. OAuth Scopes: total_rewards + + :param employee_id: The internal employee ID of the employee whose total rewards statement is returned. (required) + :type employee_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_total_rewards_statement_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TotalRewardsEmployeeStatement", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_total_rewards_statement_without_preload_content( + self, + employee_id: Annotated[ + StrictStr | None, + Field(description="The internal employee ID of the employee whose total rewards statement is returned."), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Total Rewards Statement + + Returns the full Total Rewards statement for the given employee, including compensation, benefits, bonuses, equity, reimbursements, and time-off data. OAuth Scopes: total_rewards + + :param employee_id: The internal employee ID of the employee whose total rewards statement is returned. (required) + :type employee_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._get_total_rewards_statement_serialize( + employee_id=employee_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TotalRewardsEmployeeStatement", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_total_rewards_statement_serialize( + self, + employee_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if employee_id is not None: + _path_params["employeeId"] = employee_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/api/v1/compensation/total_rewards/{employeeId}/statement", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def remove_total_rewards_custom_disclaimer( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove Total Rewards Custom Disclaimer + + Remove the company-wide Total Rewards custom disclaimer. After removal, the default disclaimer will be shown on employee statements. OAuth Scopes: total_rewards.write + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._remove_total_rewards_custom_disclaimer_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def remove_total_rewards_custom_disclaimer_with_http_info( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove Total Rewards Custom Disclaimer + + Remove the company-wide Total Rewards custom disclaimer. After removal, the default disclaimer will be shown on employee statements. OAuth Scopes: total_rewards.write + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._remove_total_rewards_custom_disclaimer_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def remove_total_rewards_custom_disclaimer_without_preload_content( + self, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove Total Rewards Custom Disclaimer + + Remove the company-wide Total Rewards custom disclaimer. After removal, the default disclaimer will be shown on employee statements. OAuth Scopes: total_rewards.write + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._remove_total_rewards_custom_disclaimer_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _remove_total_rewards_custom_disclaimer_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/problem+json"]) + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/compensation/total_rewards/custom_disclaimer", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def remove_total_rewards_employees( + self, + remove_total_rewards_employees_request: RemoveTotalRewardsEmployeesRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove Employees from Total Rewards + + Remove employees from Total Rewards. Their Total Rewards profiles will be deleted. OAuth Scopes: total_rewards.write + + :param remove_total_rewards_employees_request: (required) + :type remove_total_rewards_employees_request: RemoveTotalRewardsEmployeesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._remove_total_rewards_employees_serialize( + remove_total_rewards_employees_request=remove_total_rewards_employees_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def remove_total_rewards_employees_with_http_info( + self, + remove_total_rewards_employees_request: RemoveTotalRewardsEmployeesRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove Employees from Total Rewards + + Remove employees from Total Rewards. Their Total Rewards profiles will be deleted. OAuth Scopes: total_rewards.write + + :param remove_total_rewards_employees_request: (required) + :type remove_total_rewards_employees_request: RemoveTotalRewardsEmployeesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._remove_total_rewards_employees_serialize( + remove_total_rewards_employees_request=remove_total_rewards_employees_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def remove_total_rewards_employees_without_preload_content( + self, + remove_total_rewards_employees_request: RemoveTotalRewardsEmployeesRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove Employees from Total Rewards + + Remove employees from Total Rewards. Their Total Rewards profiles will be deleted. OAuth Scopes: total_rewards.write + + :param remove_total_rewards_employees_request: (required) + :type remove_total_rewards_employees_request: RemoveTotalRewardsEmployeesRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._remove_total_rewards_employees_serialize( + remove_total_rewards_employees_request=remove_total_rewards_employees_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _remove_total_rewards_employees_serialize( + self, + remove_total_rewards_employees_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if remove_total_rewards_employees_request is not None: + _body_params = remove_total_rewards_employees_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/problem+json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/api/v1/compensation/total_rewards/employees", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def set_total_rewards_custom_disclaimer( + self, + set_total_rewards_custom_disclaimer_request: SetTotalRewardsCustomDisclaimerRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Set Total Rewards Custom Disclaimer + + Set the company-wide Total Rewards custom disclaimer text shown on employee statements. OAuth Scopes: total_rewards.write + + :param set_total_rewards_custom_disclaimer_request: (required) + :type set_total_rewards_custom_disclaimer_request: SetTotalRewardsCustomDisclaimerRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._set_total_rewards_custom_disclaimer_serialize( + set_total_rewards_custom_disclaimer_request=set_total_rewards_custom_disclaimer_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + # BambooHR SDK: return full ApiResponse for endpoints without a defined return type + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def set_total_rewards_custom_disclaimer_with_http_info( + self, + set_total_rewards_custom_disclaimer_request: SetTotalRewardsCustomDisclaimerRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Set Total Rewards Custom Disclaimer + + Set the company-wide Total Rewards custom disclaimer text shown on employee statements. OAuth Scopes: total_rewards.write + + :param set_total_rewards_custom_disclaimer_request: (required) + :type set_total_rewards_custom_disclaimer_request: SetTotalRewardsCustomDisclaimerRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._set_total_rewards_custom_disclaimer_serialize( + set_total_rewards_custom_disclaimer_request=set_total_rewards_custom_disclaimer_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def set_total_rewards_custom_disclaimer_without_preload_content( + self, + set_total_rewards_custom_disclaimer_request: SetTotalRewardsCustomDisclaimerRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set Total Rewards Custom Disclaimer + + Set the company-wide Total Rewards custom disclaimer text shown on employee statements. OAuth Scopes: total_rewards.write + + :param set_total_rewards_custom_disclaimer_request: (required) + :type set_total_rewards_custom_disclaimer_request: SetTotalRewardsCustomDisclaimerRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._set_total_rewards_custom_disclaimer_serialize( + set_total_rewards_custom_disclaimer_request=set_total_rewards_custom_disclaimer_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": None, + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _set_total_rewards_custom_disclaimer_serialize( + self, + set_total_rewards_custom_disclaimer_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if set_total_rewards_custom_disclaimer_request is not None: + _body_params = set_total_rewards_custom_disclaimer_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/problem+json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/compensation/total_rewards/custom_disclaimer", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def set_total_rewards_onboarding_step( + self, + step_name: Annotated[StrictStr | None, Field(description="Name of the onboarding step.")], + set_total_rewards_onboarding_step_request: SetTotalRewardsOnboardingStepRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TotalRewardsOnboardingStep: + """Set Total Rewards Onboarding Step Status + + Set a Total Rewards onboarding step to completed or incomplete. Valid step names are defined by the Total Rewards onboarding configuration. OAuth Scopes: total_rewards.write + + :param step_name: Name of the onboarding step. (required) + :type step_name: str + :param set_total_rewards_onboarding_step_request: (required) + :type set_total_rewards_onboarding_step_request: SetTotalRewardsOnboardingStepRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._set_total_rewards_onboarding_step_serialize( + step_name=step_name, + set_total_rewards_onboarding_step_request=set_total_rewards_onboarding_step_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TotalRewardsOnboardingStep", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def set_total_rewards_onboarding_step_with_http_info( + self, + step_name: Annotated[StrictStr | None, Field(description="Name of the onboarding step.")], + set_total_rewards_onboarding_step_request: SetTotalRewardsOnboardingStepRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TotalRewardsOnboardingStep]: + """Set Total Rewards Onboarding Step Status + + Set a Total Rewards onboarding step to completed or incomplete. Valid step names are defined by the Total Rewards onboarding configuration. OAuth Scopes: total_rewards.write + + :param step_name: Name of the onboarding step. (required) + :type step_name: str + :param set_total_rewards_onboarding_step_request: (required) + :type set_total_rewards_onboarding_step_request: SetTotalRewardsOnboardingStepRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._set_total_rewards_onboarding_step_serialize( + step_name=step_name, + set_total_rewards_onboarding_step_request=set_total_rewards_onboarding_step_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TotalRewardsOnboardingStep", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def set_total_rewards_onboarding_step_without_preload_content( + self, + step_name: Annotated[StrictStr | None, Field(description="Name of the onboarding step.")], + set_total_rewards_onboarding_step_request: SetTotalRewardsOnboardingStepRequest, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set Total Rewards Onboarding Step Status + + Set a Total Rewards onboarding step to completed or incomplete. Valid step names are defined by the Total Rewards onboarding configuration. OAuth Scopes: total_rewards.write + + :param step_name: Name of the onboarding step. (required) + :type step_name: str + :param set_total_rewards_onboarding_step_request: (required) + :type set_total_rewards_onboarding_step_request: SetTotalRewardsOnboardingStepRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._set_total_rewards_onboarding_step_serialize( + step_name=step_name, + set_total_rewards_onboarding_step_request=set_total_rewards_onboarding_step_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "TotalRewardsOnboardingStep", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _set_total_rewards_onboarding_step_serialize( + self, + step_name, + set_total_rewards_onboarding_step_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: dict[str, str] = {} + + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None + + # process the path parameters + if step_name is not None: + _path_params["stepName"] = step_name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if set_total_rewards_onboarding_step_request is not None: + _body_params = set_total_rewards_onboarding_step_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json", "application/problem+json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: list[str] = ["oauth"] + + return self.api_client.param_serialize( + method="PUT", + resource_path="/api/v1/compensation/total_rewards/onboarding/{stepName}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) diff --git a/bamboohr_sdk/api/training_api.py b/bamboohr_sdk/api/training_api.py index db535ae..7e1232d 100644 --- a/bamboohr_sdk/api/training_api.py +++ b/bamboohr_sdk/api/training_api.py @@ -1,24 +1,20 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" + +from typing import Annotated, Any -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call -from pydantic import Field, StrictInt -from typing import Dict, Optional -from typing_extensions import Annotated +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.models.create_employee_training_record_request import CreateEmployeeTrainingRecordRequest from bamboohr_sdk.models.create_training_category_request import CreateTrainingCategoryRequest from bamboohr_sdk.models.create_training_type_request import CreateTrainingTypeRequest @@ -29,9 +25,6 @@ from bamboohr_sdk.models.update_employee_training_record_request import UpdateEmployeeTrainingRecordRequest from bamboohr_sdk.models.update_training_category_request import UpdateTrainingCategoryRequest from bamboohr_sdk.models.update_training_type_request import UpdateTrainingTypeRequest - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.rest import RESTResponseType @@ -47,30 +40,29 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def create_employee_training_record( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to add a training record to.")], - create_employee_training_record_request: Annotated[CreateEmployeeTrainingRecordRequest, Field(description="Training object to post")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee to add a training record to."), + ], + create_employee_training_record_request: Annotated[ + CreateEmployeeTrainingRecordRequest, Field(description="Training object to post") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TrainingRecord: """Create Employee Training Record - Creates a new training record for the specified employee. The 'completed' date (yyyy-mm-dd) and 'type' (training type ID) are required. Optional fields include instructor, hours, credits, notes, and cost. The owner of the API key must have permission to add trainings for the employee. + Creates a new training record for the specified employee. The 'completed' date (yyyy-mm-dd) and 'type' (training type ID) are required. Optional fields include instructor, hours, credits, notes, and cost. The authenticated caller must have permission to add trainings for the employee. OAuth Scopes: training.write - :param employee_id: The ID of the employee to add a training record to. (required) + :param employee_id: The internal employee ID of the employee to add a training record to. (required) :type employee_id: int :param create_employee_training_record_request: Training object to post (required) :type create_employee_training_record_request: CreateEmployeeTrainingRecordRequest @@ -94,7 +86,7 @@ def create_employee_training_record( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_employee_training_record_serialize( employee_id=employee_id, @@ -102,51 +94,47 @@ def create_employee_training_record( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TrainingRecord", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "201": "TrainingRecord", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def create_employee_training_record_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to add a training record to.")], - create_employee_training_record_request: Annotated[CreateEmployeeTrainingRecordRequest, Field(description="Training object to post")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee to add a training record to."), + ], + create_employee_training_record_request: Annotated[ + CreateEmployeeTrainingRecordRequest, Field(description="Training object to post") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TrainingRecord]: """Create Employee Training Record - Creates a new training record for the specified employee. The 'completed' date (yyyy-mm-dd) and 'type' (training type ID) are required. Optional fields include instructor, hours, credits, notes, and cost. The owner of the API key must have permission to add trainings for the employee. + Creates a new training record for the specified employee. The 'completed' date (yyyy-mm-dd) and 'type' (training type ID) are required. Optional fields include instructor, hours, credits, notes, and cost. The authenticated caller must have permission to add trainings for the employee. OAuth Scopes: training.write - :param employee_id: The ID of the employee to add a training record to. (required) + :param employee_id: The internal employee ID of the employee to add a training record to. (required) :type employee_id: int :param create_employee_training_record_request: Training object to post (required) :type create_employee_training_record_request: CreateEmployeeTrainingRecordRequest @@ -170,7 +158,7 @@ def create_employee_training_record_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_employee_training_record_serialize( employee_id=employee_id, @@ -178,51 +166,47 @@ def create_employee_training_record_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TrainingRecord", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "201": "TrainingRecord", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_employee_training_record_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to add a training record to.")], - create_employee_training_record_request: Annotated[CreateEmployeeTrainingRecordRequest, Field(description="Training object to post")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee to add a training record to."), + ], + create_employee_training_record_request: Annotated[ + CreateEmployeeTrainingRecordRequest, Field(description="Training object to post") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Employee Training Record - Creates a new training record for the specified employee. The 'completed' date (yyyy-mm-dd) and 'type' (training type ID) are required. Optional fields include instructor, hours, credits, notes, and cost. The owner of the API key must have permission to add trainings for the employee. + Creates a new training record for the specified employee. The 'completed' date (yyyy-mm-dd) and 'type' (training type ID) are required. Optional fields include instructor, hours, credits, notes, and cost. The authenticated caller must have permission to add trainings for the employee. OAuth Scopes: training.write - :param employee_id: The ID of the employee to add a training record to. (required) + :param employee_id: The internal employee ID of the employee to add a training record to. (required) :type employee_id: int :param create_employee_training_record_request: Training object to post (required) :type create_employee_training_record_request: CreateEmployeeTrainingRecordRequest @@ -246,7 +230,7 @@ def create_employee_training_record_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_employee_training_record_serialize( employee_id=employee_id, @@ -254,24 +238,20 @@ def create_employee_training_record_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TrainingRecord", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "201": "TrainingRecord", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_employee_training_record_serialize( self, employee_id, @@ -284,21 +264,18 @@ def _create_employee_training_record_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters # process the header parameters # process the form parameters @@ -306,38 +283,24 @@ def _create_employee_training_record_serialize( if create_employee_training_record_request is not None: _body_params = create_employee_training_record_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/training/record/employee/{employeeId}', + method="POST", + resource_path="/api/v1/training/record/employee/{employeeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -347,32 +310,26 @@ def _create_employee_training_record_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def create_training_category( self, - create_training_category_request: Annotated[CreateTrainingCategoryRequest, Field(description="Training category to post")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + create_training_category_request: Annotated[ + CreateTrainingCategoryRequest, Field(description="Training category to post") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TrainingCategory: """Create Training Category - Creates a new training category. The 'name' field is required. Returns the created TrainingCategory on success. The owner of the API key must have access to training settings. + Creates a new training category. The 'name' field is required. Returns the created TrainingCategory on success. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param create_training_category_request: Training category to post (required) :type create_training_category_request: CreateTrainingCategoryRequest @@ -396,55 +353,48 @@ def create_training_category( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_training_category_serialize( create_training_category_request=create_training_category_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TrainingCategory", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "201": "TrainingCategory", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def create_training_category_with_http_info( self, - create_training_category_request: Annotated[CreateTrainingCategoryRequest, Field(description="Training category to post")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + create_training_category_request: Annotated[ + CreateTrainingCategoryRequest, Field(description="Training category to post") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TrainingCategory]: """Create Training Category - Creates a new training category. The 'name' field is required. Returns the created TrainingCategory on success. The owner of the API key must have access to training settings. + Creates a new training category. The 'name' field is required. Returns the created TrainingCategory on success. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param create_training_category_request: Training category to post (required) :type create_training_category_request: CreateTrainingCategoryRequest @@ -468,55 +418,48 @@ def create_training_category_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_training_category_serialize( create_training_category_request=create_training_category_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TrainingCategory", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "201": "TrainingCategory", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_training_category_without_preload_content( self, - create_training_category_request: Annotated[CreateTrainingCategoryRequest, Field(description="Training category to post")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + create_training_category_request: Annotated[ + CreateTrainingCategoryRequest, Field(description="Training category to post") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Training Category - Creates a new training category. The 'name' field is required. Returns the created TrainingCategory on success. The owner of the API key must have access to training settings. + Creates a new training category. The 'name' field is required. Returns the created TrainingCategory on success. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param create_training_category_request: Training category to post (required) :type create_training_category_request: CreateTrainingCategoryRequest @@ -540,31 +483,27 @@ def create_training_category_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_training_category_serialize( create_training_category_request=create_training_category_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TrainingCategory", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "201": "TrainingCategory", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_training_category_serialize( self, create_training_category_request, @@ -576,17 +515,14 @@ def _create_training_category_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -596,38 +532,24 @@ def _create_training_category_serialize( if create_training_category_request is not None: _body_params = create_training_category_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/training/category', + method="POST", + resource_path="/api/v1/training/category", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -637,32 +559,26 @@ def _create_training_category_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def create_training_type( self, - create_training_type_request: Annotated[CreateTrainingTypeRequest, Field(description="Training object to post")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + create_training_type_request: Annotated[ + CreateTrainingTypeRequest, Field(description="Training object to post") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TrainingType: """Create Training Type - Creates a new training type. Only 'name' is required; all other fields are optional. When 'renewable' is true, 'frequency' (months between renewals) must also be provided. The 'dueFromHireDate' field is only valid when 'required' is true. The owner of the API key must have access to training settings. + Creates a new training type. Only 'name' is required; all other fields are optional. When 'renewable' is true, 'frequency' (months between renewals) must also be provided. The 'dueFromHireDate' field is only valid when 'required' is true. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param create_training_type_request: Training object to post (required) :type create_training_type_request: CreateTrainingTypeRequest @@ -686,55 +602,48 @@ def create_training_type( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_training_type_serialize( create_training_type_request=create_training_type_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TrainingType", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "201": "TrainingType", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def create_training_type_with_http_info( self, - create_training_type_request: Annotated[CreateTrainingTypeRequest, Field(description="Training object to post")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + create_training_type_request: Annotated[ + CreateTrainingTypeRequest, Field(description="Training object to post") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TrainingType]: """Create Training Type - Creates a new training type. Only 'name' is required; all other fields are optional. When 'renewable' is true, 'frequency' (months between renewals) must also be provided. The 'dueFromHireDate' field is only valid when 'required' is true. The owner of the API key must have access to training settings. + Creates a new training type. Only 'name' is required; all other fields are optional. When 'renewable' is true, 'frequency' (months between renewals) must also be provided. The 'dueFromHireDate' field is only valid when 'required' is true. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param create_training_type_request: Training object to post (required) :type create_training_type_request: CreateTrainingTypeRequest @@ -758,55 +667,48 @@ def create_training_type_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_training_type_serialize( create_training_type_request=create_training_type_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TrainingType", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "201": "TrainingType", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_training_type_without_preload_content( self, - create_training_type_request: Annotated[CreateTrainingTypeRequest, Field(description="Training object to post")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + create_training_type_request: Annotated[ + CreateTrainingTypeRequest, Field(description="Training object to post") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Training Type - Creates a new training type. Only 'name' is required; all other fields are optional. When 'renewable' is true, 'frequency' (months between renewals) must also be provided. The 'dueFromHireDate' field is only valid when 'required' is true. The owner of the API key must have access to training settings. + Creates a new training type. Only 'name' is required; all other fields are optional. When 'renewable' is true, 'frequency' (months between renewals) must also be provided. The 'dueFromHireDate' field is only valid when 'required' is true. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param create_training_type_request: Training object to post (required) :type create_training_type_request: CreateTrainingTypeRequest @@ -830,31 +732,27 @@ def create_training_type_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_training_type_serialize( create_training_type_request=create_training_type_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TrainingType", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "201": "TrainingType", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_training_type_serialize( self, create_training_type_request, @@ -866,17 +764,14 @@ def _create_training_type_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -886,38 +781,24 @@ def _create_training_type_serialize( if create_training_type_request is not None: _body_params = create_training_type_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/training/type', + method="POST", + resource_path="/api/v1/training/type", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -927,32 +808,26 @@ def _create_training_type_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def delete_employee_training_record( self, - employee_training_record_id: Annotated[StrictInt, Field(description="The ID of the training record to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_training_record_id: Annotated[ + StrictInt | None, Field(description="The ID of the training record to delete.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Delete Employee Training Record - Delete an existing employee training record. The owner of the API key used must have permission to view and edit the employee and training type. + Delete an existing employee training record. The authenticated caller must have permission to view and edit the employee and training type. OAuth Scopes: training.write :param employee_training_record_id: The ID of the training record to delete. (required) :type employee_training_record_id: int @@ -976,27 +851,24 @@ def delete_employee_training_record( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_employee_training_record_serialize( employee_training_record_id=employee_training_record_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '403': None, - '404': None, - '405': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "401": None, + "403": None, + "404": None, + "405": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -1004,27 +876,23 @@ def delete_employee_training_record( response_types_map=_response_types_map, ) - @validate_call def delete_employee_training_record_with_http_info( self, - employee_training_record_id: Annotated[StrictInt, Field(description="The ID of the training record to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_training_record_id: Annotated[ + StrictInt | None, Field(description="The ID of the training record to delete.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Delete Employee Training Record - Delete an existing employee training record. The owner of the API key used must have permission to view and edit the employee and training type. + Delete an existing employee training record. The authenticated caller must have permission to view and edit the employee and training type. OAuth Scopes: training.write :param employee_training_record_id: The ID of the training record to delete. (required) :type employee_training_record_id: int @@ -1048,54 +916,47 @@ def delete_employee_training_record_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_employee_training_record_serialize( employee_training_record_id=employee_training_record_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '403': None, - '404': None, - '405': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "401": None, + "403": None, + "404": None, + "405": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def delete_employee_training_record_without_preload_content( self, - employee_training_record_id: Annotated[StrictInt, Field(description="The ID of the training record to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_training_record_id: Annotated[ + StrictInt | None, Field(description="The ID of the training record to delete.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Delete Employee Training Record - Delete an existing employee training record. The owner of the API key used must have permission to view and edit the employee and training type. + Delete an existing employee training record. The authenticated caller must have permission to view and edit the employee and training type. OAuth Scopes: training.write :param employee_training_record_id: The ID of the training record to delete. (required) :type employee_training_record_id: int @@ -1119,30 +980,26 @@ def delete_employee_training_record_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_employee_training_record_serialize( employee_training_record_id=employee_training_record_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '403': None, - '404': None, - '405': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "401": None, + "403": None, + "404": None, + "405": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_employee_training_record_serialize( self, employee_training_record_id, @@ -1154,45 +1011,33 @@ def _delete_employee_training_record_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_training_record_id is not None: - _path_params['employeeTrainingRecordId'] = employee_training_record_id + _path_params["employeeTrainingRecordId"] = employee_training_record_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/training/record/{employeeTrainingRecordId}', + method="DELETE", + resource_path="/api/v1/training/record/{employeeTrainingRecordId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1202,32 +1047,26 @@ def _delete_employee_training_record_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def delete_training_category( self, - training_category_id: Annotated[StrictInt, Field(description="The ID of the training category to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + training_category_id: Annotated[ + StrictInt | None, Field(description="The ID of the training category to delete.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Delete Training Category - Delete an existing training category. The owner of the API key used must have access to training settings. + Delete an existing training category. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param training_category_id: The ID of the training category to delete. (required) :type training_category_id: int @@ -1251,27 +1090,24 @@ def delete_training_category( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_training_category_serialize( training_category_id=training_category_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -1279,27 +1115,23 @@ def delete_training_category( response_types_map=_response_types_map, ) - @validate_call def delete_training_category_with_http_info( self, - training_category_id: Annotated[StrictInt, Field(description="The ID of the training category to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + training_category_id: Annotated[ + StrictInt | None, Field(description="The ID of the training category to delete.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Delete Training Category - Delete an existing training category. The owner of the API key used must have access to training settings. + Delete an existing training category. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param training_category_id: The ID of the training category to delete. (required) :type training_category_id: int @@ -1323,54 +1155,47 @@ def delete_training_category_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_training_category_serialize( training_category_id=training_category_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def delete_training_category_without_preload_content( self, - training_category_id: Annotated[StrictInt, Field(description="The ID of the training category to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + training_category_id: Annotated[ + StrictInt | None, Field(description="The ID of the training category to delete.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Delete Training Category - Delete an existing training category. The owner of the API key used must have access to training settings. + Delete an existing training category. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param training_category_id: The ID of the training category to delete. (required) :type training_category_id: int @@ -1394,30 +1219,26 @@ def delete_training_category_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_training_category_serialize( training_category_id=training_category_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_training_category_serialize( self, training_category_id, @@ -1429,45 +1250,33 @@ def _delete_training_category_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if training_category_id is not None: - _path_params['trainingCategoryId'] = training_category_id + _path_params["trainingCategoryId"] = training_category_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/training/category/{trainingCategoryId}', + method="DELETE", + resource_path="/api/v1/training/category/{trainingCategoryId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1477,32 +1286,24 @@ def _delete_training_category_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def delete_training_type( self, - training_type_id: Annotated[StrictInt, Field(description="The ID of the training type to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + training_type_id: Annotated[StrictInt | None, Field(description="The ID of the training type to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Delete Training Type - Delete an existing training type. The owner of the API key must have access to training settings. Deleting a training type will only be successful if all employee trainings for this type have been removed prior to this request. + Delete an existing training type. The authenticated caller must have access to training settings. Deleting a training type will only be successful if all employee trainings for this type have been removed prior to this request. OAuth Scopes: training.write :param training_type_id: The ID of the training type to delete. (required) :type training_type_id: int @@ -1526,28 +1327,25 @@ def delete_training_type( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_training_type_serialize( training_type_id=training_type_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '403': None, - '404': None, - '405': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "401": None, + "403": None, + "404": None, + "405": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -1555,27 +1353,21 @@ def delete_training_type( response_types_map=_response_types_map, ) - @validate_call def delete_training_type_with_http_info( self, - training_type_id: Annotated[StrictInt, Field(description="The ID of the training type to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + training_type_id: Annotated[StrictInt | None, Field(description="The ID of the training type to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Delete Training Type - Delete an existing training type. The owner of the API key must have access to training settings. Deleting a training type will only be successful if all employee trainings for this type have been removed prior to this request. + Delete an existing training type. The authenticated caller must have access to training settings. Deleting a training type will only be successful if all employee trainings for this type have been removed prior to this request. OAuth Scopes: training.write :param training_type_id: The ID of the training type to delete. (required) :type training_type_id: int @@ -1599,55 +1391,46 @@ def delete_training_type_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_training_type_serialize( training_type_id=training_type_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '403': None, - '404': None, - '405': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "401": None, + "403": None, + "404": None, + "405": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def delete_training_type_without_preload_content( self, - training_type_id: Annotated[StrictInt, Field(description="The ID of the training type to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + training_type_id: Annotated[StrictInt | None, Field(description="The ID of the training type to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Delete Training Type - Delete an existing training type. The owner of the API key must have access to training settings. Deleting a training type will only be successful if all employee trainings for this type have been removed prior to this request. + Delete an existing training type. The authenticated caller must have access to training settings. Deleting a training type will only be successful if all employee trainings for this type have been removed prior to this request. OAuth Scopes: training.write :param training_type_id: The ID of the training type to delete. (required) :type training_type_id: int @@ -1671,31 +1454,27 @@ def delete_training_type_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_training_type_serialize( training_type_id=training_type_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '403': None, - '404': None, - '405': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "401": None, + "403": None, + "404": None, + "405": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_training_type_serialize( self, training_type_id, @@ -1707,45 +1486,33 @@ def _delete_training_type_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if training_type_id is not None: - _path_params['trainingTypeId'] = training_type_id + _path_params["trainingTypeId"] = training_type_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/training/type/{trainingTypeId}', + method="DELETE", + resource_path="/api/v1/training/type/{trainingTypeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1755,35 +1522,35 @@ def _delete_training_type_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_employee_trainings( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to get a list of trainings for.")], - type: Annotated[Optional[StrictInt], Field(description="Optional training type ID to filter records. Omitting this parameter returns all training records for the employee.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee to get a list of trainings for."), + ], + type: Annotated[ + StrictInt | None, + Field( + description="Optional training type ID to filter records. Omitting this parameter returns all training records for the employee." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TrainingRecordMap: """List Employee Training Records - Returns all training records for the specified employee as an object keyed by training record ID. Use the optional 'type' query parameter to filter by training type ID. Fields such as instructor, credits, hours, and cost are only included when enabled in the company's training settings. The owner of the API key must have permission to view the employee. + Returns all training records for the specified employee as an object keyed by training record ID. Use the optional 'type' query parameter to filter by training type ID. Fields such as instructor, credits, hours, and cost are only included when enabled in the company's training settings. The authenticated caller must have permission to view the employee. OAuth Scopes: training - :param employee_id: The ID of the employee to get a list of trainings for. (required) + :param employee_id: The internal employee ID of the employee to get a list of trainings for. (required) :type employee_id: int :param type: Optional training type ID to filter records. Omitting this parameter returns all training records for the employee. :type type: int @@ -1807,7 +1574,7 @@ def list_employee_trainings( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_employee_trainings_serialize( employee_id=employee_id, @@ -1815,51 +1582,50 @@ def list_employee_trainings( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TrainingRecordMap", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TrainingRecordMap", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_employee_trainings_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to get a list of trainings for.")], - type: Annotated[Optional[StrictInt], Field(description="Optional training type ID to filter records. Omitting this parameter returns all training records for the employee.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee to get a list of trainings for."), + ], + type: Annotated[ + StrictInt | None, + Field( + description="Optional training type ID to filter records. Omitting this parameter returns all training records for the employee." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TrainingRecordMap]: """List Employee Training Records - Returns all training records for the specified employee as an object keyed by training record ID. Use the optional 'type' query parameter to filter by training type ID. Fields such as instructor, credits, hours, and cost are only included when enabled in the company's training settings. The owner of the API key must have permission to view the employee. + Returns all training records for the specified employee as an object keyed by training record ID. Use the optional 'type' query parameter to filter by training type ID. Fields such as instructor, credits, hours, and cost are only included when enabled in the company's training settings. The authenticated caller must have permission to view the employee. OAuth Scopes: training - :param employee_id: The ID of the employee to get a list of trainings for. (required) + :param employee_id: The internal employee ID of the employee to get a list of trainings for. (required) :type employee_id: int :param type: Optional training type ID to filter records. Omitting this parameter returns all training records for the employee. :type type: int @@ -1883,7 +1649,7 @@ def list_employee_trainings_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_employee_trainings_serialize( employee_id=employee_id, @@ -1891,51 +1657,50 @@ def list_employee_trainings_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TrainingRecordMap", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TrainingRecordMap", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_employee_trainings_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="The ID of the employee to get a list of trainings for.")], - type: Annotated[Optional[StrictInt], Field(description="Optional training type ID to filter records. Omitting this parameter returns all training records for the employee.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + employee_id: Annotated[ + StrictInt | None, + Field(description="The internal employee ID of the employee to get a list of trainings for."), + ], + type: Annotated[ + StrictInt | None, + Field( + description="Optional training type ID to filter records. Omitting this parameter returns all training records for the employee." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Employee Training Records - Returns all training records for the specified employee as an object keyed by training record ID. Use the optional 'type' query parameter to filter by training type ID. Fields such as instructor, credits, hours, and cost are only included when enabled in the company's training settings. The owner of the API key must have permission to view the employee. + Returns all training records for the specified employee as an object keyed by training record ID. Use the optional 'type' query parameter to filter by training type ID. Fields such as instructor, credits, hours, and cost are only included when enabled in the company's training settings. The authenticated caller must have permission to view the employee. OAuth Scopes: training - :param employee_id: The ID of the employee to get a list of trainings for. (required) + :param employee_id: The internal employee ID of the employee to get a list of trainings for. (required) :type employee_id: int :param type: Optional training type ID to filter records. Omitting this parameter returns all training records for the employee. :type type: int @@ -1959,7 +1724,7 @@ def list_employee_trainings_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_employee_trainings_serialize( employee_id=employee_id, @@ -1967,24 +1732,20 @@ def list_employee_trainings_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TrainingRecordMap", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TrainingRecordMap", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_employee_trainings_serialize( self, employee_id, @@ -1997,49 +1758,36 @@ def _list_employee_trainings_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_id is not None: - _path_params['employeeId'] = employee_id + _path_params["employeeId"] = employee_id # process the query parameters if type is not None: - - _query_params.append(('type', type)) - + _query_params.append(("type", type)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/training/record/employee/{employeeId}', + method="GET", + resource_path="/api/v1/training/record/employee/{employeeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2049,31 +1797,23 @@ def _list_employee_trainings_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_training_categories( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, TrainingCategory]: + ) -> dict[str, TrainingCategory]: """List Training Categories - Returns all training categories for the company as an object keyed by category ID. Each entry contains the category ID and name. The owner of the API key must have access to training settings. + Returns all training categories for the company as an object keyed by category ID. Each entry contains the category ID and name. The authenticated caller must have access to training settings. OAuth Scopes: training :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2095,53 +1835,41 @@ def list_training_categories( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_training_categories_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, TrainingCategory]", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, TrainingCategory]", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_training_categories_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, TrainingCategory]]: + ) -> ApiResponse[dict[str, TrainingCategory]]: """List Training Categories - Returns all training categories for the company as an object keyed by category ID. Each entry contains the category ID and name. The owner of the API key must have access to training settings. + Returns all training categories for the company as an object keyed by category ID. Each entry contains the category ID and name. The authenticated caller must have access to training settings. OAuth Scopes: training :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2163,53 +1891,41 @@ def list_training_categories_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_training_categories_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, TrainingCategory]", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, TrainingCategory]", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_training_categories_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Training Categories - Returns all training categories for the company as an object keyed by category ID. Each entry contains the category ID and name. The owner of the API key must have access to training settings. + Returns all training categories for the company as an object keyed by category ID. Each entry contains the category ID and name. The authenticated caller must have access to training settings. OAuth Scopes: training :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2231,30 +1947,23 @@ def list_training_categories_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_training_categories_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, TrainingCategory]", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, TrainingCategory]", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_training_categories_serialize( self, _request_auth, @@ -2265,17 +1974,14 @@ def _list_training_categories_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -2283,25 +1989,16 @@ def _list_training_categories_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/training/category', + method="GET", + resource_path="/api/v1/training/category", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2311,31 +2008,23 @@ def _list_training_categories_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_training_types( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, TrainingType]: + ) -> dict[str, TrainingType]: """List Training Types - Returns all training types for the company as an object keyed by training type ID. Each entry includes the training name, renewable status, renewal frequency, required status, due-date window for new hires, category, link URL, description, and self-completion permission. The owner of the API key must have access to training settings. + Returns all training types for the company as an object keyed by training type ID. Each entry includes the training name, renewable status, renewal frequency, required status, due-date window for new hires, category, link URL, description, and self-completion permission. The authenticated caller must have access to training settings. OAuth Scopes: training :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2357,53 +2046,41 @@ def list_training_types( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_training_types_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, TrainingType]", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, TrainingType]", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_training_types_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, TrainingType]]: + ) -> ApiResponse[dict[str, TrainingType]]: """List Training Types - Returns all training types for the company as an object keyed by training type ID. Each entry includes the training name, renewable status, renewal frequency, required status, due-date window for new hires, category, link URL, description, and self-completion permission. The owner of the API key must have access to training settings. + Returns all training types for the company as an object keyed by training type ID. Each entry includes the training name, renewable status, renewal frequency, required status, due-date window for new hires, category, link URL, description, and self-completion permission. The authenticated caller must have access to training settings. OAuth Scopes: training :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2425,53 +2102,41 @@ def list_training_types_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_training_types_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, TrainingType]", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, TrainingType]", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_training_types_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Training Types - Returns all training types for the company as an object keyed by training type ID. Each entry includes the training name, renewable status, renewal frequency, required status, due-date window for new hires, category, link URL, description, and self-completion permission. The owner of the API key must have access to training settings. + Returns all training types for the company as an object keyed by training type ID. Each entry includes the training name, renewable status, renewal frequency, required status, due-date window for new hires, category, link URL, description, and self-completion permission. The authenticated caller must have access to training settings. OAuth Scopes: training :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2493,30 +2158,23 @@ def list_training_types_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_training_types_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, TrainingType]", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "Dict[str, TrainingType]", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_training_types_serialize( self, _request_auth, @@ -2527,17 +2185,14 @@ def _list_training_types_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -2545,25 +2200,16 @@ def _list_training_types_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/training/type', + method="GET", + resource_path="/api/v1/training/type", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2573,33 +2219,29 @@ def _list_training_types_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_employee_training_record( self, - employee_training_record_id: Annotated[StrictInt, Field(description="The ID of the training record to update.")], - update_employee_training_record_request: Annotated[UpdateEmployeeTrainingRecordRequest, Field(description="Training object to update")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_training_record_id: Annotated[ + StrictInt | None, Field(description="The ID of the training record to update.") + ], + update_employee_training_record_request: Annotated[ + UpdateEmployeeTrainingRecordRequest, Field(description="Training object to update") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TrainingRecord: """Update Employee Training Record - Updates an existing employee training record. The 'completed' date (yyyy-mm-dd) is required; all other fields are optional. Returns the updated TrainingRecord with HTTP 201. Returns 405 when the record cannot be updated. The owner of the API key must have permission to edit trainings for the employee. + Updates an existing employee training record. The 'completed' date (yyyy-mm-dd) is required; all other fields are optional. Returns the updated TrainingRecord with HTTP 201. Returns 405 when the record cannot be updated. The authenticated caller must have permission to edit trainings for the employee. OAuth Scopes: training.write :param employee_training_record_id: The ID of the training record to update. (required) :type employee_training_record_id: int @@ -2625,7 +2267,7 @@ def update_employee_training_record( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_employee_training_record_serialize( employee_training_record_id=employee_training_record_id, @@ -2633,50 +2275,45 @@ def update_employee_training_record( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TrainingRecord", - '400': None, - '401': None, - '403': None, - '404': None, - '405': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "201": "TrainingRecord", + "400": None, + "401": None, + "403": None, + "404": None, + "405": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def update_employee_training_record_with_http_info( self, - employee_training_record_id: Annotated[StrictInt, Field(description="The ID of the training record to update.")], - update_employee_training_record_request: Annotated[UpdateEmployeeTrainingRecordRequest, Field(description="Training object to update")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_training_record_id: Annotated[ + StrictInt | None, Field(description="The ID of the training record to update.") + ], + update_employee_training_record_request: Annotated[ + UpdateEmployeeTrainingRecordRequest, Field(description="Training object to update") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TrainingRecord]: """Update Employee Training Record - Updates an existing employee training record. The 'completed' date (yyyy-mm-dd) is required; all other fields are optional. Returns the updated TrainingRecord with HTTP 201. Returns 405 when the record cannot be updated. The owner of the API key must have permission to edit trainings for the employee. + Updates an existing employee training record. The 'completed' date (yyyy-mm-dd) is required; all other fields are optional. Returns the updated TrainingRecord with HTTP 201. Returns 405 when the record cannot be updated. The authenticated caller must have permission to edit trainings for the employee. OAuth Scopes: training.write :param employee_training_record_id: The ID of the training record to update. (required) :type employee_training_record_id: int @@ -2702,7 +2339,7 @@ def update_employee_training_record_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_employee_training_record_serialize( employee_training_record_id=employee_training_record_id, @@ -2710,50 +2347,45 @@ def update_employee_training_record_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TrainingRecord", - '400': None, - '401': None, - '403': None, - '404': None, - '405': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "201": "TrainingRecord", + "400": None, + "401": None, + "403": None, + "404": None, + "405": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_employee_training_record_without_preload_content( self, - employee_training_record_id: Annotated[StrictInt, Field(description="The ID of the training record to update.")], - update_employee_training_record_request: Annotated[UpdateEmployeeTrainingRecordRequest, Field(description="Training object to update")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_training_record_id: Annotated[ + StrictInt | None, Field(description="The ID of the training record to update.") + ], + update_employee_training_record_request: Annotated[ + UpdateEmployeeTrainingRecordRequest, Field(description="Training object to update") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Employee Training Record - Updates an existing employee training record. The 'completed' date (yyyy-mm-dd) is required; all other fields are optional. Returns the updated TrainingRecord with HTTP 201. Returns 405 when the record cannot be updated. The owner of the API key must have permission to edit trainings for the employee. + Updates an existing employee training record. The 'completed' date (yyyy-mm-dd) is required; all other fields are optional. Returns the updated TrainingRecord with HTTP 201. Returns 405 when the record cannot be updated. The authenticated caller must have permission to edit trainings for the employee. OAuth Scopes: training.write :param employee_training_record_id: The ID of the training record to update. (required) :type employee_training_record_id: int @@ -2779,7 +2411,7 @@ def update_employee_training_record_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_employee_training_record_serialize( employee_training_record_id=employee_training_record_id, @@ -2787,25 +2419,21 @@ def update_employee_training_record_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "TrainingRecord", - '400': None, - '401': None, - '403': None, - '404': None, - '405': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "201": "TrainingRecord", + "400": None, + "401": None, + "403": None, + "404": None, + "405": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_employee_training_record_serialize( self, employee_training_record_id, @@ -2818,21 +2446,18 @@ def _update_employee_training_record_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if employee_training_record_id is not None: - _path_params['employeeTrainingRecordId'] = employee_training_record_id + _path_params["employeeTrainingRecordId"] = employee_training_record_id # process the query parameters # process the header parameters # process the form parameters @@ -2840,38 +2465,24 @@ def _update_employee_training_record_serialize( if update_employee_training_record_request is not None: _body_params = update_employee_training_record_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/training/record/{employeeTrainingRecordId}', + method="PUT", + resource_path="/api/v1/training/record/{employeeTrainingRecordId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2881,33 +2492,29 @@ def _update_employee_training_record_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_training_category( self, - training_category_id: Annotated[StrictInt, Field(description="The ID of the training category to update.")], - update_training_category_request: Annotated[UpdateTrainingCategoryRequest, Field(description="Training category to update")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + training_category_id: Annotated[ + StrictInt | None, Field(description="The ID of the training category to update.") + ], + update_training_category_request: Annotated[ + UpdateTrainingCategoryRequest, Field(description="Training category to update") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TrainingCategory: """Update Training Category - Updates the name of an existing training category. Returns 409 if a category with the same name already exists. The owner of the API key must have access to training settings. + Updates the name of an existing training category. Returns 409 if a category with the same name already exists. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param training_category_id: The ID of the training category to update. (required) :type training_category_id: int @@ -2933,7 +2540,7 @@ def update_training_category( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_training_category_serialize( training_category_id=training_category_id, @@ -2941,49 +2548,44 @@ def update_training_category( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TrainingCategory", - '400': None, - '401': None, - '403': None, - '404': None, - '409': None, + _response_types_map: dict[str, str | None] = { + "200": "TrainingCategory", + "400": None, + "401": None, + "403": None, + "404": None, + "409": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def update_training_category_with_http_info( self, - training_category_id: Annotated[StrictInt, Field(description="The ID of the training category to update.")], - update_training_category_request: Annotated[UpdateTrainingCategoryRequest, Field(description="Training category to update")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + training_category_id: Annotated[ + StrictInt | None, Field(description="The ID of the training category to update.") + ], + update_training_category_request: Annotated[ + UpdateTrainingCategoryRequest, Field(description="Training category to update") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TrainingCategory]: """Update Training Category - Updates the name of an existing training category. Returns 409 if a category with the same name already exists. The owner of the API key must have access to training settings. + Updates the name of an existing training category. Returns 409 if a category with the same name already exists. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param training_category_id: The ID of the training category to update. (required) :type training_category_id: int @@ -3009,7 +2611,7 @@ def update_training_category_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_training_category_serialize( training_category_id=training_category_id, @@ -3017,49 +2619,44 @@ def update_training_category_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TrainingCategory", - '400': None, - '401': None, - '403': None, - '404': None, - '409': None, + _response_types_map: dict[str, str | None] = { + "200": "TrainingCategory", + "400": None, + "401": None, + "403": None, + "404": None, + "409": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_training_category_without_preload_content( self, - training_category_id: Annotated[StrictInt, Field(description="The ID of the training category to update.")], - update_training_category_request: Annotated[UpdateTrainingCategoryRequest, Field(description="Training category to update")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + training_category_id: Annotated[ + StrictInt | None, Field(description="The ID of the training category to update.") + ], + update_training_category_request: Annotated[ + UpdateTrainingCategoryRequest, Field(description="Training category to update") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Training Category - Updates the name of an existing training category. Returns 409 if a category with the same name already exists. The owner of the API key must have access to training settings. + Updates the name of an existing training category. Returns 409 if a category with the same name already exists. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param training_category_id: The ID of the training category to update. (required) :type training_category_id: int @@ -3085,7 +2682,7 @@ def update_training_category_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_training_category_serialize( training_category_id=training_category_id, @@ -3093,24 +2690,20 @@ def update_training_category_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TrainingCategory", - '400': None, - '401': None, - '403': None, - '404': None, - '409': None, + _response_types_map: dict[str, str | None] = { + "200": "TrainingCategory", + "400": None, + "401": None, + "403": None, + "404": None, + "409": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_training_category_serialize( self, training_category_id, @@ -3123,21 +2716,18 @@ def _update_training_category_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if training_category_id is not None: - _path_params['trainingCategoryId'] = training_category_id + _path_params["trainingCategoryId"] = training_category_id # process the query parameters # process the header parameters # process the form parameters @@ -3145,38 +2735,24 @@ def _update_training_category_serialize( if update_training_category_request is not None: _body_params = update_training_category_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/training/category/{trainingCategoryId}', + method="PUT", + resource_path="/api/v1/training/category/{trainingCategoryId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3186,33 +2762,27 @@ def _update_training_category_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_training_type( self, - training_type_id: Annotated[StrictInt, Field(description="The ID of the training type to update.")], - update_training_type_request: Annotated[UpdateTrainingTypeRequest, Field(description="Training type object to update to")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + training_type_id: Annotated[StrictInt | None, Field(description="The ID of the training type to update.")], + update_training_type_request: Annotated[ + UpdateTrainingTypeRequest, Field(description="Training type object to update to") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TrainingType: """Update Training Type - Updates an existing training type. Only provided fields are updated. To remove a category, pass an empty string or null for the category field. Returns 405 when the training type cannot be modified. The owner of the API key must have access to training settings. + Updates an existing training type. Only provided fields are updated. To remove a category, pass an empty string or null for the category field. Returns 405 when the training type cannot be modified. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param training_type_id: The ID of the training type to update. (required) :type training_type_id: int @@ -3238,7 +2808,7 @@ def update_training_type( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_training_type_serialize( training_type_id=training_type_id, @@ -3246,49 +2816,42 @@ def update_training_type( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TrainingType", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TrainingType", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def update_training_type_with_http_info( self, - training_type_id: Annotated[StrictInt, Field(description="The ID of the training type to update.")], - update_training_type_request: Annotated[UpdateTrainingTypeRequest, Field(description="Training type object to update to")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + training_type_id: Annotated[StrictInt | None, Field(description="The ID of the training type to update.")], + update_training_type_request: Annotated[ + UpdateTrainingTypeRequest, Field(description="Training type object to update to") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TrainingType]: """Update Training Type - Updates an existing training type. Only provided fields are updated. To remove a category, pass an empty string or null for the category field. Returns 405 when the training type cannot be modified. The owner of the API key must have access to training settings. + Updates an existing training type. Only provided fields are updated. To remove a category, pass an empty string or null for the category field. Returns 405 when the training type cannot be modified. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param training_type_id: The ID of the training type to update. (required) :type training_type_id: int @@ -3314,7 +2877,7 @@ def update_training_type_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_training_type_serialize( training_type_id=training_type_id, @@ -3322,49 +2885,42 @@ def update_training_type_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TrainingType", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TrainingType", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_training_type_without_preload_content( self, - training_type_id: Annotated[StrictInt, Field(description="The ID of the training type to update.")], - update_training_type_request: Annotated[UpdateTrainingTypeRequest, Field(description="Training type object to update to")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + training_type_id: Annotated[StrictInt | None, Field(description="The ID of the training type to update.")], + update_training_type_request: Annotated[ + UpdateTrainingTypeRequest, Field(description="Training type object to update to") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Training Type - Updates an existing training type. Only provided fields are updated. To remove a category, pass an empty string or null for the category field. Returns 405 when the training type cannot be modified. The owner of the API key must have access to training settings. + Updates an existing training type. Only provided fields are updated. To remove a category, pass an empty string or null for the category field. Returns 405 when the training type cannot be modified. The authenticated caller must have access to training settings. OAuth Scopes: training.write :param training_type_id: The ID of the training type to update. (required) :type training_type_id: int @@ -3390,7 +2946,7 @@ def update_training_type_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_training_type_serialize( training_type_id=training_type_id, @@ -3398,24 +2954,20 @@ def update_training_type_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "TrainingType", - '400': None, - '401': None, - '403': None, - '404': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": "TrainingType", + "400": None, + "401": None, + "403": None, + "404": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_training_type_serialize( self, training_type_id, @@ -3428,21 +2980,18 @@ def _update_training_type_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if training_type_id is not None: - _path_params['trainingTypeId'] = training_type_id + _path_params["trainingTypeId"] = training_type_id # process the query parameters # process the header parameters # process the form parameters @@ -3450,38 +2999,24 @@ def _update_training_type_serialize( if update_training_type_request is not None: _body_params = update_training_type_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/training/type/{trainingTypeId}', + method="PUT", + resource_path="/api/v1/training/type/{trainingTypeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3491,7 +3026,5 @@ def _update_training_type_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/webhook_events_api.py b/bamboohr_sdk/api/webhook_events_api.py index e72f9fd..47bb3a9 100644 --- a/bamboohr_sdk/api/webhook_events_api.py +++ b/bamboohr_sdk/api/webhook_events_api.py @@ -1,30 +1,26 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from typing import Annotated, Any +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call + +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.models.company_deleted_webhook_payload import CompanyDeletedWebhookPayload from bamboohr_sdk.models.company_integrations_updated_webhook_payload import CompanyIntegrationsUpdatedWebhookPayload from bamboohr_sdk.models.company_updated_webhook_payload import CompanyUpdatedWebhookPayload from bamboohr_sdk.models.employee_created_webhook_payload import EmployeeCreatedWebhookPayload from bamboohr_sdk.models.employee_deleted_webhook_payload import EmployeeDeletedWebhookPayload from bamboohr_sdk.models.employee_updated_webhook_payload import EmployeeUpdatedWebhookPayload - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.rest import RESTResponseType @@ -40,27 +36,21 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def company_deleted_webhook( self, - company_deleted_webhook_payload: Optional[CompanyDeletedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + company_deleted_webhook_payload: CompanyDeletedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Company Deleted - Triggered when a company status change results in the company being considered deleted/closed. ### Behavior & Constraints - This event is emitted when the new company status is `DELETED` or `CANCELLED`. - For other company updates and status changes, the system emits `company.updated`. + Triggered when a company status change results in the company being considered deleted/closed. ### Behavior & Constraints - This event is emitted when the new company status is `DELETED` or `CANCELLED`. - For other company updates and status changes, the system emits `company.updated`. :param company_deleted_webhook_payload: Webhook payload containing information about the company deletion :type company_deleted_webhook_payload: CompanyDeletedWebhookPayload @@ -84,25 +74,22 @@ def company_deleted_webhook( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._company_deleted_webhook_serialize( company_deleted_webhook_payload=company_deleted_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -110,27 +97,21 @@ def company_deleted_webhook( response_types_map=_response_types_map, ) - @validate_call def company_deleted_webhook_with_http_info( self, - company_deleted_webhook_payload: Optional[CompanyDeletedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + company_deleted_webhook_payload: CompanyDeletedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Company Deleted - Triggered when a company status change results in the company being considered deleted/closed. ### Behavior & Constraints - This event is emitted when the new company status is `DELETED` or `CANCELLED`. - For other company updates and status changes, the system emits `company.updated`. + Triggered when a company status change results in the company being considered deleted/closed. ### Behavior & Constraints - This event is emitted when the new company status is `DELETED` or `CANCELLED`. - For other company updates and status changes, the system emits `company.updated`. :param company_deleted_webhook_payload: Webhook payload containing information about the company deletion :type company_deleted_webhook_payload: CompanyDeletedWebhookPayload @@ -154,52 +135,43 @@ def company_deleted_webhook_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._company_deleted_webhook_serialize( company_deleted_webhook_payload=company_deleted_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def company_deleted_webhook_without_preload_content( self, - company_deleted_webhook_payload: Optional[CompanyDeletedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + company_deleted_webhook_payload: CompanyDeletedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Company Deleted - Triggered when a company status change results in the company being considered deleted/closed. ### Behavior & Constraints - This event is emitted when the new company status is `DELETED` or `CANCELLED`. - For other company updates and status changes, the system emits `company.updated`. + Triggered when a company status change results in the company being considered deleted/closed. ### Behavior & Constraints - This event is emitted when the new company status is `DELETED` or `CANCELLED`. - For other company updates and status changes, the system emits `company.updated`. :param company_deleted_webhook_payload: Webhook payload containing information about the company deletion :type company_deleted_webhook_payload: CompanyDeletedWebhookPayload @@ -223,28 +195,24 @@ def company_deleted_webhook_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._company_deleted_webhook_serialize( company_deleted_webhook_payload=company_deleted_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _company_deleted_webhook_serialize( self, company_deleted_webhook_payload, @@ -256,17 +224,14 @@ def _company_deleted_webhook_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -276,29 +241,20 @@ def _company_deleted_webhook_serialize( if company_deleted_webhook_payload is not None: _body_params = company_deleted_webhook_payload - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - ] + _auth_settings: list[str] = [] return self.api_client.param_serialize( - method='POST', - resource_path='/company.deleted', + method="POST", + resource_path="/company.deleted", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -308,32 +264,24 @@ def _company_deleted_webhook_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def company_integrations_updated_webhook( self, - company_integrations_updated_webhook_payload: Optional[CompanyIntegrationsUpdatedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + company_integrations_updated_webhook_payload: CompanyIntegrationsUpdatedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Company Integrations Updated - Triggered when company integrations are updated. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's permissions. - **Event Scope**: This event fires when any integration settings are modified for the company, including enabling, disabling, or updating integration configurations. + Triggered when company integrations are updated. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's permissions. - **Event Scope**: This event fires when any integration settings are modified for the company, including enabling, disabling, or updating integration configurations. :param company_integrations_updated_webhook_payload: Webhook payload containing company integration update information :type company_integrations_updated_webhook_payload: CompanyIntegrationsUpdatedWebhookPayload @@ -357,25 +305,22 @@ def company_integrations_updated_webhook( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._company_integrations_updated_webhook_serialize( company_integrations_updated_webhook_payload=company_integrations_updated_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -383,27 +328,21 @@ def company_integrations_updated_webhook( response_types_map=_response_types_map, ) - @validate_call def company_integrations_updated_webhook_with_http_info( self, - company_integrations_updated_webhook_payload: Optional[CompanyIntegrationsUpdatedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + company_integrations_updated_webhook_payload: CompanyIntegrationsUpdatedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Company Integrations Updated - Triggered when company integrations are updated. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's permissions. - **Event Scope**: This event fires when any integration settings are modified for the company, including enabling, disabling, or updating integration configurations. + Triggered when company integrations are updated. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's permissions. - **Event Scope**: This event fires when any integration settings are modified for the company, including enabling, disabling, or updating integration configurations. :param company_integrations_updated_webhook_payload: Webhook payload containing company integration update information :type company_integrations_updated_webhook_payload: CompanyIntegrationsUpdatedWebhookPayload @@ -427,52 +366,43 @@ def company_integrations_updated_webhook_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._company_integrations_updated_webhook_serialize( company_integrations_updated_webhook_payload=company_integrations_updated_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def company_integrations_updated_webhook_without_preload_content( self, - company_integrations_updated_webhook_payload: Optional[CompanyIntegrationsUpdatedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + company_integrations_updated_webhook_payload: CompanyIntegrationsUpdatedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Company Integrations Updated - Triggered when company integrations are updated. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's permissions. - **Event Scope**: This event fires when any integration settings are modified for the company, including enabling, disabling, or updating integration configurations. + Triggered when company integrations are updated. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's permissions. - **Event Scope**: This event fires when any integration settings are modified for the company, including enabling, disabling, or updating integration configurations. :param company_integrations_updated_webhook_payload: Webhook payload containing company integration update information :type company_integrations_updated_webhook_payload: CompanyIntegrationsUpdatedWebhookPayload @@ -496,28 +426,24 @@ def company_integrations_updated_webhook_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._company_integrations_updated_webhook_serialize( company_integrations_updated_webhook_payload=company_integrations_updated_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _company_integrations_updated_webhook_serialize( self, company_integrations_updated_webhook_payload, @@ -529,17 +455,14 @@ def _company_integrations_updated_webhook_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -549,29 +472,20 @@ def _company_integrations_updated_webhook_serialize( if company_integrations_updated_webhook_payload is not None: _body_params = company_integrations_updated_webhook_payload - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - ] + _auth_settings: list[str] = [] return self.api_client.param_serialize( - method='POST', - resource_path='/company-integrations.updated', + method="POST", + resource_path="/company-integrations.updated", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -581,32 +495,24 @@ def _company_integrations_updated_webhook_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def company_updated_webhook( self, - company_updated_webhook_payload: Optional[CompanyUpdatedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + company_updated_webhook_payload: CompanyUpdatedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Company Updated - Triggered when company information or company status changes. ### Behavior & Constraints - This event is emitted for general company updates. - When the underlying change is a company status change, the emitted event depends on the new status: - If the new status is `DELETED` or `CANCELLED`, the system emits `company.deleted` instead. - Otherwise the system emits `company.updated`. + Triggered when company information or company status changes. ### Behavior & Constraints - This event is emitted for general company updates. - When the underlying change is a company status change, the emitted event depends on the new status: - If the new status is `DELETED` or `CANCELLED`, the system emits `company.deleted` instead. - Otherwise the system emits `company.updated`. :param company_updated_webhook_payload: Webhook payload containing information about the company update :type company_updated_webhook_payload: CompanyUpdatedWebhookPayload @@ -630,25 +536,22 @@ def company_updated_webhook( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._company_updated_webhook_serialize( company_updated_webhook_payload=company_updated_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -656,27 +559,21 @@ def company_updated_webhook( response_types_map=_response_types_map, ) - @validate_call def company_updated_webhook_with_http_info( self, - company_updated_webhook_payload: Optional[CompanyUpdatedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + company_updated_webhook_payload: CompanyUpdatedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Company Updated - Triggered when company information or company status changes. ### Behavior & Constraints - This event is emitted for general company updates. - When the underlying change is a company status change, the emitted event depends on the new status: - If the new status is `DELETED` or `CANCELLED`, the system emits `company.deleted` instead. - Otherwise the system emits `company.updated`. + Triggered when company information or company status changes. ### Behavior & Constraints - This event is emitted for general company updates. - When the underlying change is a company status change, the emitted event depends on the new status: - If the new status is `DELETED` or `CANCELLED`, the system emits `company.deleted` instead. - Otherwise the system emits `company.updated`. :param company_updated_webhook_payload: Webhook payload containing information about the company update :type company_updated_webhook_payload: CompanyUpdatedWebhookPayload @@ -700,52 +597,43 @@ def company_updated_webhook_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._company_updated_webhook_serialize( company_updated_webhook_payload=company_updated_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def company_updated_webhook_without_preload_content( self, - company_updated_webhook_payload: Optional[CompanyUpdatedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + company_updated_webhook_payload: CompanyUpdatedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Company Updated - Triggered when company information or company status changes. ### Behavior & Constraints - This event is emitted for general company updates. - When the underlying change is a company status change, the emitted event depends on the new status: - If the new status is `DELETED` or `CANCELLED`, the system emits `company.deleted` instead. - Otherwise the system emits `company.updated`. + Triggered when company information or company status changes. ### Behavior & Constraints - This event is emitted for general company updates. - When the underlying change is a company status change, the emitted event depends on the new status: - If the new status is `DELETED` or `CANCELLED`, the system emits `company.deleted` instead. - Otherwise the system emits `company.updated`. :param company_updated_webhook_payload: Webhook payload containing information about the company update :type company_updated_webhook_payload: CompanyUpdatedWebhookPayload @@ -769,28 +657,24 @@ def company_updated_webhook_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._company_updated_webhook_serialize( company_updated_webhook_payload=company_updated_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _company_updated_webhook_serialize( self, company_updated_webhook_payload, @@ -802,17 +686,14 @@ def _company_updated_webhook_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -822,29 +703,20 @@ def _company_updated_webhook_serialize( if company_updated_webhook_payload is not None: _body_params = company_updated_webhook_payload - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - ] + _auth_settings: list[str] = [] return self.api_client.param_serialize( - method='POST', - resource_path='/company.updated', + method="POST", + resource_path="/company.updated", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -854,32 +726,24 @@ def _company_updated_webhook_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def employee_created_webhook( self, - employee_created_webhook_payload: Optional[EmployeeCreatedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_created_webhook_payload: EmployeeCreatedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Employee Created - Triggered when a new employee is created. ### Behavior & Constraints - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Data Availability**: The `data` object contains the `companyId` and `employeeId` of the newly created employee. - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.created` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. + Triggered when a new employee is created. ### Behavior & Constraints - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Data Availability**: The `data` object contains the `companyId` and `employeeId` of the newly created employee. - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.created` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. :param employee_created_webhook_payload: Webhook payload containing information about the employee creation :type employee_created_webhook_payload: EmployeeCreatedWebhookPayload @@ -903,25 +767,22 @@ def employee_created_webhook( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._employee_created_webhook_serialize( employee_created_webhook_payload=employee_created_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -929,27 +790,21 @@ def employee_created_webhook( response_types_map=_response_types_map, ) - @validate_call def employee_created_webhook_with_http_info( self, - employee_created_webhook_payload: Optional[EmployeeCreatedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_created_webhook_payload: EmployeeCreatedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Employee Created - Triggered when a new employee is created. ### Behavior & Constraints - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Data Availability**: The `data` object contains the `companyId` and `employeeId` of the newly created employee. - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.created` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. + Triggered when a new employee is created. ### Behavior & Constraints - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Data Availability**: The `data` object contains the `companyId` and `employeeId` of the newly created employee. - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.created` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. :param employee_created_webhook_payload: Webhook payload containing information about the employee creation :type employee_created_webhook_payload: EmployeeCreatedWebhookPayload @@ -973,52 +828,43 @@ def employee_created_webhook_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._employee_created_webhook_serialize( employee_created_webhook_payload=employee_created_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def employee_created_webhook_without_preload_content( self, - employee_created_webhook_payload: Optional[EmployeeCreatedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_created_webhook_payload: EmployeeCreatedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Employee Created - Triggered when a new employee is created. ### Behavior & Constraints - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Data Availability**: The `data` object contains the `companyId` and `employeeId` of the newly created employee. - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.created` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. + Triggered when a new employee is created. ### Behavior & Constraints - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Data Availability**: The `data` object contains the `companyId` and `employeeId` of the newly created employee. - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.created` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. :param employee_created_webhook_payload: Webhook payload containing information about the employee creation :type employee_created_webhook_payload: EmployeeCreatedWebhookPayload @@ -1042,28 +888,24 @@ def employee_created_webhook_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._employee_created_webhook_serialize( employee_created_webhook_payload=employee_created_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _employee_created_webhook_serialize( self, employee_created_webhook_payload, @@ -1075,17 +917,14 @@ def _employee_created_webhook_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -1095,29 +934,20 @@ def _employee_created_webhook_serialize( if employee_created_webhook_payload is not None: _body_params = employee_created_webhook_payload - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - ] + _auth_settings: list[str] = [] return self.api_client.param_serialize( - method='POST', - resource_path='/employee.created', + method="POST", + resource_path="/employee.created", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1127,32 +957,24 @@ def _employee_created_webhook_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def employee_deleted_webhook( self, - employee_deleted_webhook_payload: Optional[EmployeeDeletedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_deleted_webhook_payload: EmployeeDeletedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Employee Deleted - Triggered when an employee is deleted. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.deleted` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. + Triggered when an employee is deleted. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.deleted` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. :param employee_deleted_webhook_payload: Webhook payload containing information about the employee deletion :type employee_deleted_webhook_payload: EmployeeDeletedWebhookPayload @@ -1176,25 +998,22 @@ def employee_deleted_webhook( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._employee_deleted_webhook_serialize( employee_deleted_webhook_payload=employee_deleted_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -1202,27 +1021,21 @@ def employee_deleted_webhook( response_types_map=_response_types_map, ) - @validate_call def employee_deleted_webhook_with_http_info( self, - employee_deleted_webhook_payload: Optional[EmployeeDeletedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_deleted_webhook_payload: EmployeeDeletedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Employee Deleted - Triggered when an employee is deleted. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.deleted` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. + Triggered when an employee is deleted. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.deleted` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. :param employee_deleted_webhook_payload: Webhook payload containing information about the employee deletion :type employee_deleted_webhook_payload: EmployeeDeletedWebhookPayload @@ -1246,52 +1059,43 @@ def employee_deleted_webhook_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._employee_deleted_webhook_serialize( employee_deleted_webhook_payload=employee_deleted_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def employee_deleted_webhook_without_preload_content( self, - employee_deleted_webhook_payload: Optional[EmployeeDeletedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_deleted_webhook_payload: EmployeeDeletedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Employee Deleted - Triggered when an employee is deleted. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.deleted` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. + Triggered when an employee is deleted. ### Behavior & Constraints - **Permission Checking**: This event does **not** enforce permission checking. The webhook will fire for all subscribers regardless of the API token's field-level permissions. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.deleted` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. :param employee_deleted_webhook_payload: Webhook payload containing information about the employee deletion :type employee_deleted_webhook_payload: EmployeeDeletedWebhookPayload @@ -1315,28 +1119,24 @@ def employee_deleted_webhook_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._employee_deleted_webhook_serialize( employee_deleted_webhook_payload=employee_deleted_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _employee_deleted_webhook_serialize( self, employee_deleted_webhook_payload, @@ -1348,17 +1148,14 @@ def _employee_deleted_webhook_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -1368,29 +1165,20 @@ def _employee_deleted_webhook_serialize( if employee_deleted_webhook_payload is not None: _body_params = employee_deleted_webhook_payload - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - ] + _auth_settings: list[str] = [] return self.api_client.param_serialize( - method='POST', - resource_path='/employee.deleted', + method="POST", + resource_path="/employee.deleted", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1400,32 +1188,24 @@ def _employee_deleted_webhook_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def employee_updated_webhook( self, - employee_updated_webhook_payload: Optional[EmployeeUpdatedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_updated_webhook_payload: EmployeeUpdatedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Employee Updated - Triggered when an employee record is updated and at least one of the monitored fields has changed. ### Behavior & Constraints - **Monitoring**: At least one `monitorField` is required when subscribing to this event via `POST /api/v1/webhooks`. - **Permissions**: For API-created webhooks, this event will not fire if the webhook creator lacks access to all monitored fields being changed. ### Detailed Description - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Field Consolidation**: When multiple fields change simultaneously, they may be consolidated into a single event. Currently, custom field updates and standard field updates are grouped separately and may fire as two events. - **Effective Dates**: For history-tracked fields (e.g., `jobTitle`, `payRate`), events fire only when changes take effect, not when future-dated changes are created. - **Changed Fields**: The `changedFields` array contains the API aliases for fields that changed and are monitored by this webhook. Aliases match those returned by `GET /api/v1/webhooks/monitor_fields`. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.updated` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. + Triggered when an employee record is updated and at least one of the monitored fields has changed. ### Behavior & Constraints - **Monitoring**: At least one `monitorField` is required when subscribing to this event via `POST /api/v1/webhooks`. - **Permissions**: For API-created webhooks, this event will not fire if the webhook creator lacks access to all monitored fields being changed. ### Detailed Description - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Field Consolidation**: When multiple fields change simultaneously, they may be consolidated into a single event. Currently, custom field updates and standard field updates are grouped separately and may fire as two events. - **Effective Dates**: For history-tracked fields (e.g., `jobTitle`, `payRate`), events fire only when changes take effect, not when future-dated changes are created. - **Changed Fields**: The `changedFields` array contains the API aliases for fields that changed and are monitored by this webhook. Aliases match those returned by `GET /api/v1/webhooks/monitor_fields`. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.updated` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. :param employee_updated_webhook_payload: Webhook payload containing information about the employee update :type employee_updated_webhook_payload: EmployeeUpdatedWebhookPayload @@ -1449,25 +1229,22 @@ def employee_updated_webhook( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._employee_updated_webhook_serialize( employee_updated_webhook_payload=employee_updated_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() # BambooHR SDK: return full ApiResponse for endpoints without a defined return type return self.api_client.response_deserialize( @@ -1475,27 +1252,21 @@ def employee_updated_webhook( response_types_map=_response_types_map, ) - @validate_call def employee_updated_webhook_with_http_info( self, - employee_updated_webhook_payload: Optional[EmployeeUpdatedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_updated_webhook_payload: EmployeeUpdatedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: """Employee Updated - Triggered when an employee record is updated and at least one of the monitored fields has changed. ### Behavior & Constraints - **Monitoring**: At least one `monitorField` is required when subscribing to this event via `POST /api/v1/webhooks`. - **Permissions**: For API-created webhooks, this event will not fire if the webhook creator lacks access to all monitored fields being changed. ### Detailed Description - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Field Consolidation**: When multiple fields change simultaneously, they may be consolidated into a single event. Currently, custom field updates and standard field updates are grouped separately and may fire as two events. - **Effective Dates**: For history-tracked fields (e.g., `jobTitle`, `payRate`), events fire only when changes take effect, not when future-dated changes are created. - **Changed Fields**: The `changedFields` array contains the API aliases for fields that changed and are monitored by this webhook. Aliases match those returned by `GET /api/v1/webhooks/monitor_fields`. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.updated` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. + Triggered when an employee record is updated and at least one of the monitored fields has changed. ### Behavior & Constraints - **Monitoring**: At least one `monitorField` is required when subscribing to this event via `POST /api/v1/webhooks`. - **Permissions**: For API-created webhooks, this event will not fire if the webhook creator lacks access to all monitored fields being changed. ### Detailed Description - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Field Consolidation**: When multiple fields change simultaneously, they may be consolidated into a single event. Currently, custom field updates and standard field updates are grouped separately and may fire as two events. - **Effective Dates**: For history-tracked fields (e.g., `jobTitle`, `payRate`), events fire only when changes take effect, not when future-dated changes are created. - **Changed Fields**: The `changedFields` array contains the API aliases for fields that changed and are monitored by this webhook. Aliases match those returned by `GET /api/v1/webhooks/monitor_fields`. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.updated` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. :param employee_updated_webhook_payload: Webhook payload containing information about the employee update :type employee_updated_webhook_payload: EmployeeUpdatedWebhookPayload @@ -1519,52 +1290,43 @@ def employee_updated_webhook_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._employee_updated_webhook_serialize( employee_updated_webhook_payload=employee_updated_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def employee_updated_webhook_without_preload_content( self, - employee_updated_webhook_payload: Optional[EmployeeUpdatedWebhookPayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + employee_updated_webhook_payload: EmployeeUpdatedWebhookPayload | None = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Employee Updated - Triggered when an employee record is updated and at least one of the monitored fields has changed. ### Behavior & Constraints - **Monitoring**: At least one `monitorField` is required when subscribing to this event via `POST /api/v1/webhooks`. - **Permissions**: For API-created webhooks, this event will not fire if the webhook creator lacks access to all monitored fields being changed. ### Detailed Description - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Field Consolidation**: When multiple fields change simultaneously, they may be consolidated into a single event. Currently, custom field updates and standard field updates are grouped separately and may fire as two events. - **Effective Dates**: For history-tracked fields (e.g., `jobTitle`, `payRate`), events fire only when changes take effect, not when future-dated changes are created. - **Changed Fields**: The `changedFields` array contains the API aliases for fields that changed and are monitored by this webhook. Aliases match those returned by `GET /api/v1/webhooks/monitor_fields`. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.updated` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. + Triggered when an employee record is updated and at least one of the monitored fields has changed. ### Behavior & Constraints - **Monitoring**: At least one `monitorField` is required when subscribing to this event via `POST /api/v1/webhooks`. - **Permissions**: For API-created webhooks, this event will not fire if the webhook creator lacks access to all monitored fields being changed. ### Detailed Description - **Creation Sequence**: When an employee is created, both `employee.created` and `employee.updated` events fire sequentially due to the create-then-initialize pattern. - **Field Consolidation**: When multiple fields change simultaneously, they may be consolidated into a single event. Currently, custom field updates and standard field updates are grouped separately and may fire as two events. - **Effective Dates**: For history-tracked fields (e.g., `jobTitle`, `payRate`), events fire only when changes take effect, not when future-dated changes are created. - **Changed Fields**: The `changedFields` array contains the API aliases for fields that changed and are monitored by this webhook. Aliases match those returned by `GET /api/v1/webhooks/monitor_fields`. ### Deprecation Notice **Note:** This event is the modern replacement for the legacy `employee_with_fields.updated` event. While the legacy event is deprecated, it will remain available for the foreseeable future to support existing integrations. We encourage using this new event for all new development. **Important:** You cannot subscribe to both this new event and the legacy `employee_with_fields` events on the same webhook. Webhooks created without specifying any events will default to the legacy behavior, effectively subscribing to the `employee_with_fields` events automatically. :param employee_updated_webhook_payload: Webhook payload containing information about the employee update :type employee_updated_webhook_payload: EmployeeUpdatedWebhookPayload @@ -1588,28 +1350,24 @@ def employee_updated_webhook_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._employee_updated_webhook_serialize( employee_updated_webhook_payload=employee_updated_webhook_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': None, + _response_types_map: dict[str, str | None] = { + "200": None, + "400": None, + "500": None, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _employee_updated_webhook_serialize( self, employee_updated_webhook_payload, @@ -1621,17 +1379,14 @@ def _employee_updated_webhook_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -1641,29 +1396,20 @@ def _employee_updated_webhook_serialize( if employee_updated_webhook_payload is not None: _body_params = employee_updated_webhook_payload - - # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - ] + _auth_settings: list[str] = [] return self.api_client.param_serialize( - method='POST', - resource_path='/employee.updated', + method="POST", + resource_path="/employee.updated", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1673,7 +1419,5 @@ def _employee_updated_webhook_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api/webhooks_api.py b/bamboohr_sdk/api/webhooks_api.py index d0736f7..bd75a64 100644 --- a/bamboohr_sdk/api/webhooks_api.py +++ b/bamboohr_sdk/api/webhooks_api.py @@ -1,33 +1,27 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" + +from typing import Annotated, Any -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated +from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call -from pydantic import Field, StrictInt, StrictStr -from typing_extensions import Annotated -from bamboohr_sdk.models.field_list import FieldList +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.monitor_field_list import MonitorFieldList from bamboohr_sdk.models.new_web_hook import NewWebHook from bamboohr_sdk.models.web_hook_post_field_response_object import WebHookPostFieldResponseObject from bamboohr_sdk.models.web_hook_response import WebHookResponse from bamboohr_sdk.models.webhook import Webhook from bamboohr_sdk.models.webhook_log_list_response import WebhookLogListResponse from bamboohr_sdk.models.webhooks_list import WebhooksList - -from bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.rest import RESTResponseType @@ -43,27 +37,21 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def create_webhook( self, new_web_hook: NewWebHook, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Webhook: """Create Webhook - Creates a new webhook for the authenticated user's API key. The webhook will fire when the specified events occur or when any of the monitored fields change. The `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. If `events` is omitted, it defaults to `['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created']`, which means `monitorFields` is required by default. The `format` field is required. The response includes a `privateKey` that can be used to verify the authenticity of incoming webhook payloads via HMAC-SHA256. This key is only returned at creation time and cannot be retrieved again. For more details refer to the [webhooks documentation](https://documentation.bamboohr.com/docs/webhooks), including guides for [event-based](https://documentation.bamboohr.com/docs/event-based-webhooks) and [field-based](https://documentation.bamboohr.com/docs/field-based-webhooks) webhooks. For details on the payloads sent by each event, see the event reference: - [employee.created](https://documentation.bamboohr.com/reference/employee-created-webhook) - [employee.updated](https://documentation.bamboohr.com/reference/employee-updated-webhook) - [employee.deleted](https://documentation.bamboohr.com/reference/employee-deleted-webhook) + Creates a new webhook for the authenticated user. The webhook will fire when the specified events occur or when any of the monitored fields change. The `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. If `events` is omitted, it defaults to `['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created']`, which means `monitorFields` is required by default. The `format` field is required. The response includes a `privateKey` that should be used to verify the authenticity of incoming webhook payloads via HMAC-SHA256. This key is only returned at creation time and cannot be retrieved again. For more details refer to the [webhooks documentation](https://documentation.bamboohr.com/docs/webhooks), including guides for [event-based](https://documentation.bamboohr.com/docs/event-based-webhooks) and [field-based](https://documentation.bamboohr.com/docs/field-based-webhooks) webhooks. For details on the payloads sent by each event, see the event reference: - [employee.created](https://documentation.bamboohr.com/reference/employee-created-webhook) - [employee.updated](https://documentation.bamboohr.com/reference/employee-updated-webhook) - [employee.deleted](https://documentation.bamboohr.com/reference/employee-deleted-webhook) OAuth Scopes: webhooks, webhooks.write :param new_web_hook: (required) :type new_web_hook: NewWebHook @@ -87,54 +75,45 @@ def create_webhook( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_webhook_serialize( new_web_hook=new_web_hook, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "Webhook", - '400': "CreateWebhookBadRequestResponse", - '401': None, - '403': "WebhookError", - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "201": "Webhook", + "400": "CreateWebhookBadRequestResponse", + "401": None, + "403": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def create_webhook_with_http_info( self, new_web_hook: NewWebHook, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Webhook]: """Create Webhook - Creates a new webhook for the authenticated user's API key. The webhook will fire when the specified events occur or when any of the monitored fields change. The `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. If `events` is omitted, it defaults to `['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created']`, which means `monitorFields` is required by default. The `format` field is required. The response includes a `privateKey` that can be used to verify the authenticity of incoming webhook payloads via HMAC-SHA256. This key is only returned at creation time and cannot be retrieved again. For more details refer to the [webhooks documentation](https://documentation.bamboohr.com/docs/webhooks), including guides for [event-based](https://documentation.bamboohr.com/docs/event-based-webhooks) and [field-based](https://documentation.bamboohr.com/docs/field-based-webhooks) webhooks. For details on the payloads sent by each event, see the event reference: - [employee.created](https://documentation.bamboohr.com/reference/employee-created-webhook) - [employee.updated](https://documentation.bamboohr.com/reference/employee-updated-webhook) - [employee.deleted](https://documentation.bamboohr.com/reference/employee-deleted-webhook) + Creates a new webhook for the authenticated user. The webhook will fire when the specified events occur or when any of the monitored fields change. The `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. If `events` is omitted, it defaults to `['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created']`, which means `monitorFields` is required by default. The `format` field is required. The response includes a `privateKey` that should be used to verify the authenticity of incoming webhook payloads via HMAC-SHA256. This key is only returned at creation time and cannot be retrieved again. For more details refer to the [webhooks documentation](https://documentation.bamboohr.com/docs/webhooks), including guides for [event-based](https://documentation.bamboohr.com/docs/event-based-webhooks) and [field-based](https://documentation.bamboohr.com/docs/field-based-webhooks) webhooks. For details on the payloads sent by each event, see the event reference: - [employee.created](https://documentation.bamboohr.com/reference/employee-created-webhook) - [employee.updated](https://documentation.bamboohr.com/reference/employee-updated-webhook) - [employee.deleted](https://documentation.bamboohr.com/reference/employee-deleted-webhook) OAuth Scopes: webhooks, webhooks.write :param new_web_hook: (required) :type new_web_hook: NewWebHook @@ -158,54 +137,45 @@ def create_webhook_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_webhook_serialize( new_web_hook=new_web_hook, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "Webhook", - '400': "CreateWebhookBadRequestResponse", - '401': None, - '403': "WebhookError", - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "201": "Webhook", + "400": "CreateWebhookBadRequestResponse", + "401": None, + "403": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def create_webhook_without_preload_content( self, new_web_hook: NewWebHook, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Create Webhook - Creates a new webhook for the authenticated user's API key. The webhook will fire when the specified events occur or when any of the monitored fields change. The `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. If `events` is omitted, it defaults to `['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created']`, which means `monitorFields` is required by default. The `format` field is required. The response includes a `privateKey` that can be used to verify the authenticity of incoming webhook payloads via HMAC-SHA256. This key is only returned at creation time and cannot be retrieved again. For more details refer to the [webhooks documentation](https://documentation.bamboohr.com/docs/webhooks), including guides for [event-based](https://documentation.bamboohr.com/docs/event-based-webhooks) and [field-based](https://documentation.bamboohr.com/docs/field-based-webhooks) webhooks. For details on the payloads sent by each event, see the event reference: - [employee.created](https://documentation.bamboohr.com/reference/employee-created-webhook) - [employee.updated](https://documentation.bamboohr.com/reference/employee-updated-webhook) - [employee.deleted](https://documentation.bamboohr.com/reference/employee-deleted-webhook) + Creates a new webhook for the authenticated user. The webhook will fire when the specified events occur or when any of the monitored fields change. The `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. If `events` is omitted, it defaults to `['employee_with_fields.updated', 'employee_with_fields.deleted', 'employee_with_fields.created']`, which means `monitorFields` is required by default. The `format` field is required. The response includes a `privateKey` that should be used to verify the authenticity of incoming webhook payloads via HMAC-SHA256. This key is only returned at creation time and cannot be retrieved again. For more details refer to the [webhooks documentation](https://documentation.bamboohr.com/docs/webhooks), including guides for [event-based](https://documentation.bamboohr.com/docs/event-based-webhooks) and [field-based](https://documentation.bamboohr.com/docs/field-based-webhooks) webhooks. For details on the payloads sent by each event, see the event reference: - [employee.created](https://documentation.bamboohr.com/reference/employee-created-webhook) - [employee.updated](https://documentation.bamboohr.com/reference/employee-updated-webhook) - [employee.deleted](https://documentation.bamboohr.com/reference/employee-deleted-webhook) OAuth Scopes: webhooks, webhooks.write :param new_web_hook: (required) :type new_web_hook: NewWebHook @@ -229,30 +199,26 @@ def create_webhook_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_webhook_serialize( new_web_hook=new_web_hook, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "Webhook", - '400': "CreateWebhookBadRequestResponse", - '401': None, - '403': "WebhookError", - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "201": "Webhook", + "400": "CreateWebhookBadRequestResponse", + "401": None, + "403": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_webhook_serialize( self, new_web_hook, @@ -264,17 +230,14 @@ def _create_webhook_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -284,38 +247,24 @@ def _create_webhook_serialize( if new_web_hook is not None: _body_params = new_web_hook - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='POST', - resource_path='/api/v1/webhooks', + method="POST", + resource_path="/api/v1/webhooks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -325,32 +274,24 @@ def _create_webhook_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def delete_webhook( self, - id: Annotated[StrictInt, Field(description="The webhook ID to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt | None, Field(description="The webhook ID to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> str: """Delete Webhook - Deletes a webhook tied to the authenticated user API key. Returns 403 if the webhook belongs to a different user API key, and 404 if the webhook does not exist. On success, returns a plain text confirmation message. + Permanently removes a webhook owned by the authenticated user. A webhook can only be deleted by the same credentials that created it; attempting to delete another user's webhook returns 403. Use List Webhooks to find webhook IDs. OAuth Scopes: webhooks, webhooks.write :param id: The webhook ID to delete. (required) :type id: int @@ -374,54 +315,41 @@ def delete_webhook( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_webhook_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': None, - '403': "WebhookError", - '404': "WebhookError", - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "str", + "401": None, + "403": "WebhookError", + "404": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def delete_webhook_with_http_info( self, - id: Annotated[StrictInt, Field(description="The webhook ID to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt | None, Field(description="The webhook ID to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[str]: """Delete Webhook - Deletes a webhook tied to the authenticated user API key. Returns 403 if the webhook belongs to a different user API key, and 404 if the webhook does not exist. On success, returns a plain text confirmation message. + Permanently removes a webhook owned by the authenticated user. A webhook can only be deleted by the same credentials that created it; attempting to delete another user's webhook returns 403. Use List Webhooks to find webhook IDs. OAuth Scopes: webhooks, webhooks.write :param id: The webhook ID to delete. (required) :type id: int @@ -445,54 +373,41 @@ def delete_webhook_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_webhook_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': None, - '403': "WebhookError", - '404': "WebhookError", - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "str", + "401": None, + "403": "WebhookError", + "404": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def delete_webhook_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The webhook ID to delete.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt | None, Field(description="The webhook ID to delete.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Delete Webhook - Deletes a webhook tied to the authenticated user API key. Returns 403 if the webhook belongs to a different user API key, and 404 if the webhook does not exist. On success, returns a plain text confirmation message. + Permanently removes a webhook owned by the authenticated user. A webhook can only be deleted by the same credentials that created it; attempting to delete another user's webhook returns 403. Use List Webhooks to find webhook IDs. OAuth Scopes: webhooks, webhooks.write :param id: The webhook ID to delete. (required) :type id: int @@ -516,30 +431,22 @@ def delete_webhook_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._delete_webhook_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': None, - '403': "WebhookError", - '404': "WebhookError", - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "str", + "401": None, + "403": "WebhookError", + "404": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_webhook_serialize( self, id, @@ -551,46 +458,33 @@ def _delete_webhook_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain', - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["text/plain", "application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/webhooks/{id}', + method="DELETE", + resource_path="/api/v1/webhooks/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -600,31 +494,23 @@ def _delete_webhook_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_monitor_fields( + def get_post_fields( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FieldList: - """Get Monitor Fields + ) -> WebHookPostFieldResponseObject: + """Get Webhook Post Fields - Returns the list of employee fields that can be monitored by a webhook. Use these field IDs or aliases in the `monitorFields` array when creating or updating a webhook. Each entry includes a numeric field ID (returned as a string), a human-readable name, and an alias (if one exists; otherwise null). + Returns an object containing the employee fields that can be included in the webhook post body for field-based webhooks. Also includes the related table and page records referenced by those fields. Use the field IDs or aliases from this response in the `postFields` map when creating or updating a field-based webhook. OAuth Scopes: webhooks :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -646,50 +532,37 @@ def get_monitor_fields( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_monitor_fields_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._get_post_fields_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "FieldList", - '401': None, - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "WebHookPostFieldResponseObject", + "403": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_monitor_fields_with_http_info( + def get_post_fields_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FieldList]: - """Get Monitor Fields + ) -> ApiResponse[WebHookPostFieldResponseObject]: + """Get Webhook Post Fields - Returns the list of employee fields that can be monitored by a webhook. Use these field IDs or aliases in the `monitorFields` array when creating or updating a webhook. Each entry includes a numeric field ID (returned as a string), a human-readable name, and an alias (if one exists; otherwise null). + Returns an object containing the employee fields that can be included in the webhook post body for field-based webhooks. Also includes the related table and page records referenced by those fields. Use the field IDs or aliases from this response in the `postFields` map when creating or updating a field-based webhook. OAuth Scopes: webhooks :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -711,50 +584,37 @@ def get_monitor_fields_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_monitor_fields_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._get_post_fields_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "FieldList", - '401': None, - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "WebHookPostFieldResponseObject", + "403": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_monitor_fields_without_preload_content( + def get_post_fields_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Monitor Fields + """Get Webhook Post Fields - Returns the list of employee fields that can be monitored by a webhook. Use these field IDs or aliases in the `monitorFields` array when creating or updating a webhook. Each entry includes a numeric field ID (returned as a string), a human-readable name, and an alias (if one exists; otherwise null). + Returns an object containing the employee fields that can be included in the webhook post body for field-based webhooks. Also includes the related table and page records referenced by those fields. Use the field IDs or aliases from this response in the `postFields` map when creating or updating a field-based webhook. OAuth Scopes: webhooks :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -776,28 +636,20 @@ def get_monitor_fields_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_monitor_fields_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._get_post_fields_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "FieldList", - '401': None, - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "WebHookPostFieldResponseObject", + "403": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_monitor_fields_serialize( + def _get_post_fields_serialize( self, _request_auth, _content_type, @@ -807,17 +659,14 @@ def _get_monitor_fields_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -825,25 +674,16 @@ def _get_monitor_fields_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/webhooks/monitor_fields', + method="GET", + resource_path="/api/v1/webhooks/post-fields", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -853,32 +693,27 @@ def _get_monitor_fields_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_post_fields( + def get_webhook( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt | None, Field(description="The webhook ID to retrieve.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WebHookPostFieldResponseObject: - """Get Post Fields + ) -> WebHookResponse: + """Get Webhook - Returns an object containing the employee fields that can be included in the webhook post body, along with the related table and page records referenced by those fields. Use the field IDs or aliases from this response in the `postFields` map when creating or updating a webhook. + Returns the full configuration of a single webhook owned by the authenticated user, including its name, URL, format, monitored fields and post fields when applicable, events, creation datetime, and last-sent datetime. Returns 403 if the webhook exists but belongs to a different user, and 404 if the webhook does not exist. OAuth Scopes: webhooks + :param id: The webhook ID to retrieve. (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -899,50 +734,44 @@ def get_post_fields( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_post_fields_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._get_webhook_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebHookPostFieldResponseObject", - '403': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "WebHookResponse", + "401": None, + "403": "WebhookError", + "404": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_post_fields_with_http_info( + def get_webhook_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt | None, Field(description="The webhook ID to retrieve.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WebHookPostFieldResponseObject]: - """Get Post Fields + ) -> ApiResponse[WebHookResponse]: + """Get Webhook - Returns an object containing the employee fields that can be included in the webhook post body, along with the related table and page records referenced by those fields. Use the field IDs or aliases from this response in the `postFields` map when creating or updating a webhook. + Returns the full configuration of a single webhook owned by the authenticated user, including its name, URL, format, monitored fields and post fields when applicable, events, creation datetime, and last-sent datetime. Returns 403 if the webhook exists but belongs to a different user, and 404 if the webhook does not exist. OAuth Scopes: webhooks + :param id: The webhook ID to retrieve. (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -963,50 +792,44 @@ def get_post_fields_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_post_fields_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._get_webhook_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebHookPostFieldResponseObject", - '403': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "WebHookResponse", + "401": None, + "403": "WebhookError", + "404": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_post_fields_without_preload_content( + def get_webhook_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt | None, Field(description="The webhook ID to retrieve.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Post Fields + """Get Webhook - Returns an object containing the employee fields that can be included in the webhook post body, along with the related table and page records referenced by those fields. Use the field IDs or aliases from this response in the `postFields` map when creating or updating a webhook. + Returns the full configuration of a single webhook owned by the authenticated user, including its name, URL, format, monitored fields and post fields when applicable, events, creation datetime, and last-sent datetime. Returns 403 if the webhook exists but belongs to a different user, and 404 if the webhook does not exist. OAuth Scopes: webhooks + :param id: The webhook ID to retrieve. (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1027,28 +850,25 @@ def get_post_fields_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_post_fields_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._get_webhook_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebHookPostFieldResponseObject", - '403': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "WebHookResponse", + "401": None, + "403": "WebhookError", + "404": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_post_fields_serialize( + def _get_webhook_serialize( self, + id, _request_auth, _content_type, _headers, @@ -1057,43 +877,33 @@ def _get_post_fields_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters + if id is not None: + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/webhooks/post-fields', + method="GET", + resource_path="/api/v1/webhooks/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1103,35 +913,24 @@ def _get_post_fields_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_webhook( + def list_monitor_fields( self, - id: Annotated[StrictInt, Field(description="The webhook ID to display details about.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WebHookResponse: - """Get Webhook + ) -> MonitorFieldList: + """List Monitor Fields - Returns the full configuration of a single webhook owned by the authenticated user API key, including its name, URL, format, monitored fields, post fields, events, creation datetime, and last-sent datetime. Returns 403 if the webhook exists but belongs to a different user API key, and 404 if the webhook does not exist. + Returns the list of employee fields that can be monitored by a webhook. Monitor fields are only applicable to webhooks that use update events (`employee.updated` or `employee_with_fields.updated`). Use the field IDs or aliases from this response in the `monitorFields` array when creating or updating a webhook via Create Webhook or Update Webhook. OAuth Scopes: webhooks - :param id: The webhook ID to display details about. (required) - :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1152,57 +951,40 @@ def get_webhook( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_webhook_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_monitor_fields_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebHookResponse", - '401': None, - '403': "WebhookError", - '404': "WebhookError", - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "MonitorFieldList", + "401": None, + "403": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_webhook_with_http_info( + def list_monitor_fields_with_http_info( self, - id: Annotated[StrictInt, Field(description="The webhook ID to display details about.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WebHookResponse]: - """Get Webhook + ) -> ApiResponse[MonitorFieldList]: + """List Monitor Fields - Returns the full configuration of a single webhook owned by the authenticated user API key, including its name, URL, format, monitored fields, post fields, events, creation datetime, and last-sent datetime. Returns 403 if the webhook exists but belongs to a different user API key, and 404 if the webhook does not exist. + Returns the list of employee fields that can be monitored by a webhook. Monitor fields are only applicable to webhooks that use update events (`employee.updated` or `employee_with_fields.updated`). Use the field IDs or aliases from this response in the `monitorFields` array when creating or updating a webhook via Create Webhook or Update Webhook. OAuth Scopes: webhooks - :param id: The webhook ID to display details about. (required) - :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1223,57 +1005,40 @@ def get_webhook_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_webhook_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_monitor_fields_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebHookResponse", - '401': None, - '403': "WebhookError", - '404': "WebhookError", - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "MonitorFieldList", + "401": None, + "403": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_webhook_without_preload_content( + def list_monitor_fields_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The webhook ID to display details about.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Webhook + """List Monitor Fields - Returns the full configuration of a single webhook owned by the authenticated user API key, including its name, URL, format, monitored fields, post fields, events, creation datetime, and last-sent datetime. Returns 403 if the webhook exists but belongs to a different user API key, and 404 if the webhook does not exist. + Returns the list of employee fields that can be monitored by a webhook. Monitor fields are only applicable to webhooks that use update events (`employee.updated` or `employee_with_fields.updated`). Use the field IDs or aliases from this response in the `monitorFields` array when creating or updating a webhook via Create Webhook or Update Webhook. OAuth Scopes: webhooks - :param id: The webhook ID to display details about. (required) - :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1294,33 +1059,23 @@ def get_webhook_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_webhook_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_monitor_fields_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebHookResponse", - '401': None, - '403': "WebhookError", - '404': "WebhookError", - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "MonitorFieldList", + "401": None, + "403": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_webhook_serialize( + def _list_monitor_fields_serialize( self, - id, _request_auth, _content_type, _headers, @@ -1329,45 +1084,31 @@ def _get_webhook_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/webhooks/{id}', + method="GET", + resource_path="/api/v1/webhooks/monitor_fields", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1377,32 +1118,24 @@ def _get_webhook_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call - def get_webhook_logs( + def list_webhook_logs( self, - id: Annotated[StrictInt, Field(description="The webhook ID to get logs about.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt | None, Field(description="The webhook ID to get logs about.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> WebhookLogListResponse: - """Get Webhook Logs + """List Webhook Logs - Returns an array of recent delivery log entries for a webhook. Logs cover the last 14 days and are limited to 200 entries. Each entry includes the webhook URL, the last attempt value, the last success value, the HTTP status code of the last response, the payload format, and the list of employee IDs included in the payload. The `lastAttempted` and `lastSuccess` fields are usually UTC datetimes in `YYYY-MM-DD HH:MM:SS` format, but may instead contain status strings such as `Webhook Not Found`. Returns an empty array if no deliveries have occurred in the lookback window. **Rate limiting:** This endpoint is rate-limited. When the rate limit is exceeded the server still returns HTTP 200, but the body is `{\"error\":{\"code\":429,\"message\":\"Over rate limit, please try again in 60 seconds\"}}` instead of the log array. Callers should check for this shape before processing the response as a log list. + Returns an array of recent delivery log entries for a webhook. Use List Webhooks to find webhook IDs. Logs cover the last 14 days and are limited to 200 entries. The `lastAttempted` and `lastSuccess` fields are usually UTC datetimes in `YYYY-MM-DD HH:MM:SS` format, but may instead contain status strings such as `Webhook Not Found`. Returns an empty array if no deliveries have occurred in the lookback window. **Rate limiting:** This endpoint is rate-limited. When the rate limit is exceeded the server still returns HTTP 200, but the body is `{\"error\":{\"code\":429,\"message\":\"Over rate limit, please try again in 60 seconds\"}}` instead of the log array. Callers should check for this shape before processing the response as a log list. OAuth Scopes: webhooks :param id: The webhook ID to get logs about. (required) :type id: int @@ -1426,54 +1159,41 @@ def get_webhook_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_webhook_logs_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_webhook_logs_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebhookLogListResponse", - '403': "WebhookError", - '404': "WebhookError", - '500': "WebhookError", - '503': "str", + _response_types_map: dict[str, str | None] = { + "200": "WebhookLogListResponse", + "403": "WebhookError", + "404": "WebhookError", + "500": "WebhookError", + "503": "str", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call - def get_webhook_logs_with_http_info( + def list_webhook_logs_with_http_info( self, - id: Annotated[StrictInt, Field(description="The webhook ID to get logs about.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt | None, Field(description="The webhook ID to get logs about.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[WebhookLogListResponse]: - """Get Webhook Logs + """List Webhook Logs - Returns an array of recent delivery log entries for a webhook. Logs cover the last 14 days and are limited to 200 entries. Each entry includes the webhook URL, the last attempt value, the last success value, the HTTP status code of the last response, the payload format, and the list of employee IDs included in the payload. The `lastAttempted` and `lastSuccess` fields are usually UTC datetimes in `YYYY-MM-DD HH:MM:SS` format, but may instead contain status strings such as `Webhook Not Found`. Returns an empty array if no deliveries have occurred in the lookback window. **Rate limiting:** This endpoint is rate-limited. When the rate limit is exceeded the server still returns HTTP 200, but the body is `{\"error\":{\"code\":429,\"message\":\"Over rate limit, please try again in 60 seconds\"}}` instead of the log array. Callers should check for this shape before processing the response as a log list. + Returns an array of recent delivery log entries for a webhook. Use List Webhooks to find webhook IDs. Logs cover the last 14 days and are limited to 200 entries. The `lastAttempted` and `lastSuccess` fields are usually UTC datetimes in `YYYY-MM-DD HH:MM:SS` format, but may instead contain status strings such as `Webhook Not Found`. Returns an empty array if no deliveries have occurred in the lookback window. **Rate limiting:** This endpoint is rate-limited. When the rate limit is exceeded the server still returns HTTP 200, but the body is `{\"error\":{\"code\":429,\"message\":\"Over rate limit, please try again in 60 seconds\"}}` instead of the log array. Callers should check for this shape before processing the response as a log list. OAuth Scopes: webhooks :param id: The webhook ID to get logs about. (required) :type id: int @@ -1497,54 +1217,41 @@ def get_webhook_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_webhook_logs_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_webhook_logs_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebhookLogListResponse", - '403': "WebhookError", - '404': "WebhookError", - '500': "WebhookError", - '503': "str", + _response_types_map: dict[str, str | None] = { + "200": "WebhookLogListResponse", + "403": "WebhookError", + "404": "WebhookError", + "500": "WebhookError", + "503": "str", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call - def get_webhook_logs_without_preload_content( + def list_webhook_logs_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The webhook ID to get logs about.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + id: Annotated[StrictInt | None, Field(description="The webhook ID to get logs about.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Webhook Logs + """List Webhook Logs - Returns an array of recent delivery log entries for a webhook. Logs cover the last 14 days and are limited to 200 entries. Each entry includes the webhook URL, the last attempt value, the last success value, the HTTP status code of the last response, the payload format, and the list of employee IDs included in the payload. The `lastAttempted` and `lastSuccess` fields are usually UTC datetimes in `YYYY-MM-DD HH:MM:SS` format, but may instead contain status strings such as `Webhook Not Found`. Returns an empty array if no deliveries have occurred in the lookback window. **Rate limiting:** This endpoint is rate-limited. When the rate limit is exceeded the server still returns HTTP 200, but the body is `{\"error\":{\"code\":429,\"message\":\"Over rate limit, please try again in 60 seconds\"}}` instead of the log array. Callers should check for this shape before processing the response as a log list. + Returns an array of recent delivery log entries for a webhook. Use List Webhooks to find webhook IDs. Logs cover the last 14 days and are limited to 200 entries. The `lastAttempted` and `lastSuccess` fields are usually UTC datetimes in `YYYY-MM-DD HH:MM:SS` format, but may instead contain status strings such as `Webhook Not Found`. Returns an empty array if no deliveries have occurred in the lookback window. **Rate limiting:** This endpoint is rate-limited. When the rate limit is exceeded the server still returns HTTP 200, but the body is `{\"error\":{\"code\":429,\"message\":\"Over rate limit, please try again in 60 seconds\"}}` instead of the log array. Callers should check for this shape before processing the response as a log list. OAuth Scopes: webhooks :param id: The webhook ID to get logs about. (required) :type id: int @@ -1568,31 +1275,23 @@ def get_webhook_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ - _param = self._get_webhook_logs_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _param = self._list_webhook_logs_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebhookLogListResponse", - '403': "WebhookError", - '404': "WebhookError", - '500': "WebhookError", - '503': "str", + _response_types_map: dict[str, str | None] = { + "200": "WebhookLogListResponse", + "403": "WebhookError", + "404": "WebhookError", + "500": "WebhookError", + "503": "str", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_webhook_logs_serialize( + def _list_webhook_logs_serialize( self, id, _request_auth, @@ -1603,46 +1302,33 @@ def _get_webhook_logs_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json", "text/plain"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/webhooks/{id}/log', + method="GET", + resource_path="/api/v1/webhooks/{id}/log", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1652,31 +1338,23 @@ def _get_webhook_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def list_webhooks( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> WebhooksList: """List Webhooks - Returns all webhooks owned by the authenticated user API key. Returns an empty array if no webhooks have been created for this key. Each entry includes the webhook ID, name, URL, creation datetime, and the datetime it was last fired. Use `GET /api/v1/webhooks/{id}` to retrieve the full configuration including monitored fields, post fields, and events for a specific webhook. + Returns all webhooks owned by the authenticated user. Each entry is a summary with the webhook's ID, name, URL, creation datetime, and last-fired datetime. Returns an empty array when no webhooks exist. Use \"Get Webhook\" to retrieve the full configuration of a specific webhook, including monitored fields and post fields when applicable, and events. OAuth Scopes: webhooks :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1698,50 +1376,39 @@ def list_webhooks( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_webhooks_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebhooksList", - '401': None, - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "WebhooksList", + "401": None, + "403": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def list_webhooks_with_http_info( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[WebhooksList]: """List Webhooks - Returns all webhooks owned by the authenticated user API key. Returns an empty array if no webhooks have been created for this key. Each entry includes the webhook ID, name, URL, creation datetime, and the datetime it was last fired. Use `GET /api/v1/webhooks/{id}` to retrieve the full configuration including monitored fields, post fields, and events for a specific webhook. + Returns all webhooks owned by the authenticated user. Each entry is a summary with the webhook's ID, name, URL, creation datetime, and last-fired datetime. Returns an empty array when no webhooks exist. Use \"Get Webhook\" to retrieve the full configuration of a specific webhook, including monitored fields and post fields when applicable, and events. OAuth Scopes: webhooks :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1763,50 +1430,39 @@ def list_webhooks_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_webhooks_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebhooksList", - '401': None, - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "WebhooksList", + "401": None, + "403": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def list_webhooks_without_preload_content( self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """List Webhooks - Returns all webhooks owned by the authenticated user API key. Returns an empty array if no webhooks have been created for this key. Each entry includes the webhook ID, name, URL, creation datetime, and the datetime it was last fired. Use `GET /api/v1/webhooks/{id}` to retrieve the full configuration including monitored fields, post fields, and events for a specific webhook. + Returns all webhooks owned by the authenticated user. Each entry is a summary with the webhook's ID, name, URL, creation datetime, and last-fired datetime. Returns an empty array when no webhooks exist. Use \"Get Webhook\" to retrieve the full configuration of a specific webhook, including monitored fields and post fields when applicable, and events. OAuth Scopes: webhooks :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1828,27 +1484,21 @@ def list_webhooks_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._list_webhooks_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebhooksList", - '401': None, - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "WebhooksList", + "401": None, + "403": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_webhooks_serialize( self, _request_auth, @@ -1859,17 +1509,14 @@ def _list_webhooks_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters # process the query parameters @@ -1877,25 +1524,16 @@ def _list_webhooks_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/webhooks', + method="GET", + resource_path="/api/v1/webhooks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1905,33 +1543,25 @@ def _list_webhooks_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def update_webhook( self, - id: Annotated[StrictInt, Field(description="The webhook ID to update.")], + id: Annotated[StrictInt | None, Field(description="The webhook ID to update.")], new_web_hook: NewWebHook, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> WebHookResponse: """Update Webhook - Performs a full replacement update of a webhook. All fields in the request body replace the existing values. The `format` field is required. The `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. Returns 403 if the webhook belongs to a different user or if field permission violations are present, and 404 if the webhook does not exist. + Performs a full replacement update of a webhook — all request body fields overwrite existing values, so omitted optional fields revert to defaults. The `monitorFields` array must be non-empty when the webhook's events include `employee.updated` or `employee_with_fields.updated` (the default event set includes `employee_with_fields.updated`). The private key is not regenerated on update. Use List Webhooks to discover webhook IDs. OAuth Scopes: webhooks, webhooks.write :param id: The webhook ID to update. (required) :type id: int @@ -1957,7 +1587,7 @@ def update_webhook( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_webhook_serialize( id=id, @@ -1965,49 +1595,40 @@ def update_webhook( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebHookResponse", - '400': "UpdateWebhookBadRequestResponse", - '401': None, - '403': "WebhookError", - '404': "WebhookError", - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "WebHookResponse", + "400": "UpdateWebhookBadRequestResponse", + "401": None, + "403": "WebhookError", + "404": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ).data - @validate_call def update_webhook_with_http_info( self, - id: Annotated[StrictInt, Field(description="The webhook ID to update.")], + id: Annotated[StrictInt | None, Field(description="The webhook ID to update.")], new_web_hook: NewWebHook, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[WebHookResponse]: """Update Webhook - Performs a full replacement update of a webhook. All fields in the request body replace the existing values. The `format` field is required. The `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. Returns 403 if the webhook belongs to a different user or if field permission violations are present, and 404 if the webhook does not exist. + Performs a full replacement update of a webhook — all request body fields overwrite existing values, so omitted optional fields revert to defaults. The `monitorFields` array must be non-empty when the webhook's events include `employee.updated` or `employee_with_fields.updated` (the default event set includes `employee_with_fields.updated`). The private key is not regenerated on update. Use List Webhooks to discover webhook IDs. OAuth Scopes: webhooks, webhooks.write :param id: The webhook ID to update. (required) :type id: int @@ -2033,7 +1654,7 @@ def update_webhook_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_webhook_serialize( id=id, @@ -2041,49 +1662,40 @@ def update_webhook_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebHookResponse", - '400': "UpdateWebhookBadRequestResponse", - '401': None, - '403': "WebhookError", - '404': "WebhookError", - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "WebHookResponse", + "400": "UpdateWebhookBadRequestResponse", + "401": None, + "403": "WebhookError", + "404": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, ) - @validate_call def update_webhook_without_preload_content( self, - id: Annotated[StrictInt, Field(description="The webhook ID to update.")], + id: Annotated[StrictInt | None, Field(description="The webhook ID to update.")], new_web_hook: NewWebHook, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: """Update Webhook - Performs a full replacement update of a webhook. All fields in the request body replace the existing values. The `format` field is required. The `monitorFields` array is required when `events` includes `employee.updated` or `employee_with_fields.updated`. Returns 403 if the webhook belongs to a different user or if field permission violations are present, and 404 if the webhook does not exist. + Performs a full replacement update of a webhook — all request body fields overwrite existing values, so omitted optional fields revert to defaults. The `monitorFields` array must be non-empty when the webhook's events include `employee.updated` or `employee_with_fields.updated` (the default event set includes `employee_with_fields.updated`). The private key is not regenerated on update. Use List Webhooks to discover webhook IDs. OAuth Scopes: webhooks, webhooks.write :param id: The webhook ID to update. (required) :type id: int @@ -2109,7 +1721,7 @@ def update_webhook_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_webhook_serialize( id=id, @@ -2117,24 +1729,20 @@ def update_webhook_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebHookResponse", - '400': "UpdateWebhookBadRequestResponse", - '401': None, - '403': "WebhookError", - '404': "WebhookError", - '500': "WebhookError", + _response_types_map: dict[str, str | None] = { + "200": "WebHookResponse", + "400": "UpdateWebhookBadRequestResponse", + "401": None, + "403": "WebhookError", + "404": "WebhookError", + "500": "WebhookError", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_webhook_serialize( self, id, @@ -2147,21 +1755,18 @@ def _update_webhook_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: dict[str, str] = {} - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None + _path_params: dict[str, str] = {} + _query_params: list[tuple[str, str]] = [] + _header_params: dict[str, str | None] = _headers or {} + _form_params: list[tuple[str, str]] = [] + _files: dict[str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]] = {} + _body_params: bytes | None = None # process the path parameters if id is not None: - _path_params['id'] = id + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters @@ -2169,38 +1774,24 @@ def _update_webhook_serialize( if new_web_hook is not None: _body_params = new_web_hook - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self.api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'basic', - 'oauth' - ] + _auth_settings: list[str] = ["basic", "oauth"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api/v1/webhooks/{id}', + method="PUT", + resource_path="/api/v1/webhooks/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2210,7 +1801,5 @@ def _update_webhook_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/bamboohr_sdk/api_client.py b/bamboohr_sdk/api_client.py index a00e61f..886a53a 100644 --- a/bamboohr_sdk/api_client.py +++ b/bamboohr_sdk/api_client.py @@ -1,20 +1,16 @@ -# coding: utf-8 """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" import datetime -from dateutil.parser import parse -from enum import Enum import decimal import json import logging @@ -23,30 +19,27 @@ import re import tempfile import uuid - +from enum import Enum from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union + +from dateutil.parser import parse from pydantic import SecretStr -from bamboohr_sdk.configuration import Configuration -from bamboohr_sdk.api_response import ApiResponse, T as ApiResponseT import bamboohr_sdk.models from bamboohr_sdk import rest -from bamboohr_sdk.api_helper import send_with_retries, redact_url, redact_headers +from bamboohr_sdk.api_helper import send_with_retries +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.api_response import T as ApiResponseT +from bamboohr_sdk.configuration import Configuration from bamboohr_sdk.exceptions import ( - ApiValueError, ApiException, - BadRequestException, - AuthenticationFailedException, - PermissionDeniedException, - ResourceNotFoundException, - InternalServerErrorException, - ServerException + ApiValueError, ) logger = logging.getLogger("bamboohr_sdk") -RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] +RequestSerialized = tuple[str, str, dict[str, str], str | None, list[str]] + class ApiClient: """Generic API client for OpenAPI client library builds. @@ -66,25 +59,19 @@ class ApiClient: PRIMITIVE_TYPES = (float, bool, bytes, str, int) NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'object': object, + "int": int, + "long": int, # TODO remove as only py3 is supported? + "float": float, + "str": str, + "bool": bool, + "date": datetime.date, + "datetime": datetime.datetime, + "decimal": decimal.Decimal, + "object": object, } _pool = None - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: + def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None) -> None: # use default configuration if none is provided if configuration is None: configuration = Configuration.get_default() @@ -101,6 +88,7 @@ def __init__( # BambooHR SDK: Request ID tracking middleware (lazy import to avoid circular dependency) from bamboohr_sdk.client.middleware.request_id_middleware import RequestIdMiddleware + self._request_id_middleware = RequestIdMiddleware() logger.debug( @@ -118,11 +106,11 @@ def __exit__(self, exc_type, exc_value, traceback): @property def user_agent(self): """User agent for this API client""" - return self.default_headers['User-Agent'] + return self.default_headers["User-Agent"] @user_agent.setter def user_agent(self, value): - self.default_headers['User-Agent'] = value + self.default_headers["User-Agent"] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value @@ -133,11 +121,10 @@ def request_id_middleware(self): return self._request_id_middleware @property - def last_request_id(self) -> Optional[str]: + def last_request_id(self) -> str | None: """Return the most recent ``x-request-id`` from an API response.""" return self._request_id_middleware.last_request_id - _default = None @classmethod @@ -173,12 +160,12 @@ def param_serialize( header_params=None, body=None, post_params=None, - files=None, auth_settings=None, + files=None, + auth_settings=None, collection_formats=None, _host=None, - _request_auth=None + _request_auth=None, ) -> RequestSerialized: - """Builds the HTTP request params needed by the request. :param method: Method to call. :param resource_path: Path to method endpoint. @@ -207,47 +194,30 @@ def param_serialize( header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: - header_params['Cookie'] = self.cookie + header_params["Cookie"] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) + header_params = dict(self.parameters_to_tuples(header_params, collection_formats)) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) + path_params = self.parameters_to_tuples(path_params, collection_formats) for k, v in path_params: # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) + resource_path = resource_path.replace("{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param)) # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) + post_params = self.parameters_to_tuples(post_params, collection_formats) if files: post_params.extend(self.files_parameters(files)) # auth setting self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth + header_params, query_params, auth_settings, resource_path, method, body, request_auth=_request_auth ) # body @@ -264,23 +234,13 @@ def param_serialize( # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) + url_query = self.parameters_to_url_query(query_params, collection_formats) url += "?" + url_query return method, url, header_params, body, post_params - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None + self, method, url, header_params=None, body=None, post_params=None, _request_timeout=None ) -> rest.RESTResponse: """Makes the HTTP request with retry support. @@ -303,10 +263,12 @@ def call_api( def _do_request(): return self.rest_client.request( - method, url, + method, + url, headers=header_params, - body=body, post_params=post_params, - _request_timeout=effective_timeout + body=body, + post_params=post_params, + _request_timeout=effective_timeout, ) response_data = send_with_retries( @@ -324,9 +286,7 @@ def _do_request(): return response_data def response_deserialize( - self, - response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None + self, response_data: rest.RESTResponse, response_types_map: dict[str, ApiResponseT] | None = None ) -> ApiResponse[ApiResponseT]: """Deserializes response into an object. :param response_data: RESTResponse object to be deserialized. @@ -352,7 +312,7 @@ def response_deserialize( return_data = self.__deserialize_file(response_data) elif response_type is not None: match = None - content_type = response_data.getheader('content-type') + content_type = response_data.getheader("content-type") if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" @@ -367,10 +327,10 @@ def response_deserialize( ) api_response = ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data + status_code=response_data.status, + data=return_data, + headers=response_data.getheaders(), + raw_data=response_data.data, ) logger.debug( @@ -408,13 +368,9 @@ def sanitize_for_serialization(self, obj): elif isinstance(obj, uuid.UUID): return str(obj) elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] + return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) + return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() elif isinstance(obj, decimal.Decimal): @@ -428,7 +384,7 @@ def sanitize_for_serialization(self, obj): # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + if hasattr(obj, "to_dict") and callable(obj.to_dict): obj_dict = obj.to_dict() else: obj_dict = obj.__dict__ @@ -437,12 +393,9 @@ def sanitize_for_serialization(self, obj): # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() return self.sanitize_for_serialization(obj_dict) - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } + return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()} - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text: str, response_type: str, content_type: str | None): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. @@ -459,18 +412,15 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti data = json.loads(response_text) except ValueError: data = response_text - elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + elif re.match(r"^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)", content_type, re.IGNORECASE): if response_text == "": data = "" else: data = json.loads(response_text) - elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE): data = response_text else: - raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) - ) + raise ApiException(status=0, reason=f"Unsupported content type: {content_type}") return self.__deserialize(data, response_type) @@ -486,19 +436,17 @@ def __deserialize(self, data, klass): return None if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) + if klass.startswith("List["): + m = re.match(r"List\[(.*)]", klass) assert m is not None, "Malformed List type definition" sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] + return [self.__deserialize(sub_data, sub_kls) for sub_data in data] - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) + if klass.startswith("Dict["): + m = re.match(r"Dict\[([^,]*), (.*)]", klass) assert m is not None, "Malformed Dict type definition" sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} + return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: @@ -528,25 +476,24 @@ def parameters_to_tuples(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params: List[Tuple[str, str]] = [] + new_params: list[tuple[str, str]] = [] if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, value) for value in v) else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) + delimiter = "," + new_params.append((k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params @@ -558,7 +505,7 @@ def parameters_to_url_query(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: URL query string (e.g. a=Hello%20World&b=123) """ - new_params: List[Tuple[str, str]] = [] + new_params: list[tuple[str, str]] = [] if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: @@ -571,20 +518,18 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, quote(str(value))) for value in v) else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) + delimiter = "," + new_params.append((k, delimiter.join(quote(str(value)) for value in v))) else: new_params.append((k, quote(str(v)))) @@ -592,7 +537,7 @@ def parameters_to_url_query(self, params, collection_formats): def files_parameters( self, - files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + files: dict[str, str | bytes | list[str] | list[bytes] | tuple[str, bytes]], ): """Builds form parameters. @@ -602,7 +547,7 @@ def files_parameters( params = [] for k, v in files.items(): if isinstance(v, str): - with open(v, 'rb') as f: + with open(v, "rb") as f: filename = os.path.basename(f.name) filedata = f.read() elif isinstance(v, bytes): @@ -616,16 +561,11 @@ def files_parameters( continue else: raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) + mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" + params.append(tuple([k, tuple([filename, filedata, mimetype])])) return params - def select_header_accept(self, accepts: List[str]) -> Optional[str]: + def select_header_accept(self, accepts: list[str]) -> str | None: """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. @@ -635,7 +575,7 @@ def select_header_accept(self, accepts: List[str]) -> Optional[str]: return None for accept in accepts: - if re.search('json', accept, re.IGNORECASE): + if re.search("json", accept, re.IGNORECASE): return accept return accepts[0] @@ -650,20 +590,13 @@ def select_header_content_type(self, content_types): return None for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): + if re.search("json", content_type, re.IGNORECASE): return content_type return content_types[0] def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None + self, headers, queries, auth_settings, resource_path, method, body, request_auth=None ) -> None: """Updates header and query params based on authentication setting. @@ -681,36 +614,14 @@ def update_params_for_auth( return if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) + self._apply_auth_params(headers, queries, resource_path, method, body, request_auth) else: for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: + self._apply_auth_params(headers, queries, resource_path, method, body, auth_setting) + + def _apply_auth_params(self, headers, queries, resource_path, method, body, auth_setting) -> None: """Updates the request parameters based on a single auth_setting :param headers: Header parameters dict to be updated. @@ -721,17 +632,15 @@ def _apply_auth_params( The object type is the return value of sanitize_for_serialization(). :param auth_setting: auth settings for the endpoint """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) + if auth_setting["in"] == "cookie": + headers["Cookie"] = auth_setting["value"] + elif auth_setting["in"] == "header": + if auth_setting["type"] != "http-signature": + headers[auth_setting["key"]] = auth_setting["value"] + elif auth_setting["in"] == "query": + queries.append((auth_setting["key"], auth_setting["value"])) else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + raise ApiValueError("Authentication token must be in `query` or `header`") def __deserialize_file(self, response): """Deserializes body to file @@ -751,10 +660,7 @@ def __deserialize_file(self, response): content_disposition = response.getheader("Content-Disposition") if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) + m = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition) assert m is not None, "Unexpected 'content-disposition' header value" filename = m.group(1) path = os.path.join(os.path.dirname(path), filename) @@ -797,10 +703,7 @@ def __deserialize_date(self, string): except ImportError: return string except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) + raise rest.ApiException(status=0, reason=f"Failed to parse `{string}` as date object") def __deserialize_datetime(self, string): """Deserializes string to datetime. @@ -815,13 +718,7 @@ def __deserialize_datetime(self, string): except ImportError: return string except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) + raise rest.ApiException(status=0, reason=(f"Failed to parse `{string}` as datetime object")) def __deserialize_enum(self, data, klass): """Deserializes primitive type to enum. @@ -833,13 +730,7 @@ def __deserialize_enum(self, data, klass): try: return klass(data) except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as `{1}`" - .format(data, klass) - ) - ) + raise rest.ApiException(status=0, reason=(f"Failed to parse `{data}` as `{klass}`")) def __deserialize_model(self, data, klass): """Deserializes list or dict to model. diff --git a/bamboohr_sdk/api_error_helper.py b/bamboohr_sdk/api_error_helper.py index 48765e4..4319d2c 100644 --- a/bamboohr_sdk/api_error_helper.py +++ b/bamboohr_sdk/api_error_helper.py @@ -7,34 +7,34 @@ from __future__ import annotations -from typing import Any, Dict, List, Optional +from typing import Any from bamboohr_sdk.exceptions import ( ApiException, - ClientException, - ServerException, - BadRequestException, AuthenticationFailedException, - PermissionDeniedException, - ResourceNotFoundException, - MethodNotAllowedException, - RequestTimeoutException, - ConflictException, - PayloadTooLargeException, - UnsupportedMediaTypeException, - UnprocessableEntityException, - RateLimitExceededException, - InternalServerErrorException, - NotImplementedException, BadGatewayException, - ServiceUnavailableException, + BadRequestException, + ClientException, + ConflictException, GatewayTimeoutException, InsufficientStorageException, + InternalServerErrorException, + MethodNotAllowedException, NetworkReadTimeoutException, + NotImplementedException, + PayloadTooLargeException, + PermissionDeniedException, + RateLimitExceededException, + RequestTimeoutException, + ResourceNotFoundException, + ServerException, + ServiceUnavailableException, + UnprocessableEntityException, + UnsupportedMediaTypeException, ) # Error messages and debugging tips by HTTP status code -ERROR_MESSAGES: Dict[int, Dict[str, Any]] = { +ERROR_MESSAGES: dict[int, dict[str, Any]] = { 400: { "type": "BadRequest", "title": "Bad request", @@ -303,7 +303,7 @@ } # Mapping from status code to exception class -_STATUS_TO_EXCEPTION: Dict[int, type] = { +_STATUS_TO_EXCEPTION: dict[int, type] = { 400: BadRequestException, 401: AuthenticationFailedException, 403: PermissionDeniedException, @@ -328,9 +328,9 @@ def create_exception( status_code: int, reason: str, - headers: Optional[Any] = None, - body: Optional[str] = None, - request_id: Optional[str] = None, + headers: Any | None = None, + body: str | None = None, + request_id: str | None = None, ) -> ApiException: """Create an appropriate exception based on the HTTP status code. @@ -367,9 +367,9 @@ def create_exception( def format_detailed_error_message( base_message: str, - causes: Optional[List[str]] = None, - tips: Optional[List[str]] = None, - request_id: Optional[str] = None, + causes: list[str] | None = None, + tips: list[str] | None = None, + request_id: str | None = None, ) -> str: """Format a detailed error message with causes, tips, and request ID. @@ -394,14 +394,12 @@ def format_detailed_error_message( for tip in tips: parts.append(f"- {tip}") if request_id: - parts.append( - f"- Include this Request ID ({request_id}) when contacting support" - ) + parts.append(f"- Include this Request ID ({request_id}) when contacting support") return "\n".join(parts) -def get_error_info(status_code: int) -> Optional[Dict[str, Any]]: +def get_error_info(status_code: int) -> dict[str, Any] | None: """Get error information for a given HTTP status code. :param status_code: The HTTP status code. diff --git a/bamboohr_sdk/api_helper.py b/bamboohr_sdk/api_helper.py index 249db3c..cebc397 100644 --- a/bamboohr_sdk/api_helper.py +++ b/bamboohr_sdk/api_helper.py @@ -10,16 +10,16 @@ import logging import re import time -from typing import Any, Callable, Dict, List, Optional, Set, Tuple +from collections.abc import Callable +from typing import Any from urllib.parse import urlparse, urlunparse -from bamboohr_sdk.api_error_helper import create_exception, get_error_info from bamboohr_sdk.exceptions import ApiException logger = logging.getLogger("bamboohr_sdk") # Headers whose values should be redacted in logs -SENSITIVE_HEADERS: Set[str] = { +SENSITIVE_HEADERS: set[str] = { "authorization", "cookie", "set-cookie", @@ -35,14 +35,14 @@ } # Path segments that contain potentially sensitive IDs -_SENSITIVE_PATH_PATTERNS: List[Tuple[str, str]] = [ +_SENSITIVE_PATH_PATTERNS: list[tuple[str, str]] = [ (r"(/users/)[^/]+(/|$)", r"\1[ID_REDACTED]\2"), (r"(/employees/)[^/]+(/|$)", r"\1[ID_REDACTED]\2"), (r"(/companies/)[^/]+(/|$)", r"\1[ID_REDACTED]\2"), ] -def redact_headers(headers: Optional[Dict[str, str]]) -> Dict[str, str]: +def redact_headers(headers: dict[str, str] | None) -> dict[str, str]: """Redact sensitive header values for safe logging. :param headers: Original request/response headers. @@ -51,7 +51,7 @@ def redact_headers(headers: Optional[Dict[str, str]]) -> Dict[str, str]: if not headers: return {} - redacted: Dict[str, str] = {} + redacted: dict[str, str] = {} for name, value in headers.items(): if name.lower() in SENSITIVE_HEADERS: redacted[name] = "[REDACTED]" @@ -76,14 +76,16 @@ def redact_url(url: str) -> str: query = "[QUERY_PARAMS_REDACTED]" if parsed.query else "" - return urlunparse(( - parsed.scheme, - parsed.netloc, - path, - "", # params - query.lstrip("?") if query else "", - "", # fragment - )) + return urlunparse( + ( + parsed.scheme, + parsed.netloc, + path, + "", # params + query.lstrip("?") if query else "", + "", # fragment + ) + ) def send_with_retries( @@ -91,9 +93,9 @@ def send_with_retries( *, method: str, url: str, - headers: Optional[Dict[str, str]] = None, + headers: dict[str, str] | None = None, max_retries: int = 1, - retryable_status_codes: Optional[List[int]] = None, + retryable_status_codes: list[int] | None = None, ) -> Any: """Execute an HTTP request with retry logic and exponential backoff. @@ -150,10 +152,7 @@ def send_with_retries( ) # Check if we got a retryable status code from a "successful" urllib3 response - if ( - response.status in retryable_status_codes - and attempt <= max_retries - ): + if response.status in retryable_status_codes and attempt <= max_retries: delay = 0.1 * (2 ** (attempt - 1)) # 100ms, 200ms, 400ms, ... logger.warning( "Retryable status %d, retrying in %.1fs (attempt %d/%d)", @@ -171,9 +170,7 @@ def send_with_retries( status_code = exc.status or 0 total_ms = (time.monotonic() - start_time) * 1000 attempt_ms = (time.monotonic() - attempt_start) * 1000 - will_retry = ( - status_code in retryable_status_codes and attempt <= max_retries - ) + will_retry = status_code in retryable_status_codes and attempt <= max_retries logger.error( "API Error Response", diff --git a/bamboohr_sdk/api_response.py b/bamboohr_sdk/api_response.py index 9bc7c11..7cec360 100644 --- a/bamboohr_sdk/api_response.py +++ b/bamboohr_sdk/api_response.py @@ -1,21 +1,23 @@ """API response object.""" from __future__ import annotations -from typing import Optional, Generic, Mapping, TypeVar -from pydantic import Field, StrictInt, StrictBytes, BaseModel + +from collections.abc import Mapping +from typing import Generic, TypeVar + +from pydantic import BaseModel, Field, StrictBytes, StrictInt T = TypeVar("T") + class ApiResponse(BaseModel, Generic[T]): """ API response object """ status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + headers: Mapping[str, str] | None = Field(None, description="HTTP headers") data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - model_config = { - "arbitrary_types_allowed": True - } + model_config = {"arbitrary_types_allowed": True} diff --git a/bamboohr_sdk/client/bamboohr_client.py b/bamboohr_sdk/client/bamboohr_client.py index 232f803..6da1999 100644 --- a/bamboohr_sdk/client/bamboohr_client.py +++ b/bamboohr_sdk/client/bamboohr_client.py @@ -34,23 +34,38 @@ # Generated by scripts/sync_accessors.py — do not edit by hand. if TYPE_CHECKING: from bamboohr_sdk.api.account_information_api import AccountInformationApi + from bamboohr_sdk.api.alerts_api import AlertsApi from bamboohr_sdk.api.applicant_tracking_api import ApplicantTrackingApi from bamboohr_sdk.api.benefits_api import BenefitsApi + from bamboohr_sdk.api.calendar_events_api import CalendarEventsApi + from bamboohr_sdk.api.change_tracking_api import ChangeTrackingApi + from bamboohr_sdk.api.company_api import CompanyApi from bamboohr_sdk.api.company_files_api import CompanyFilesApi from bamboohr_sdk.api.company_profile_api import CompanyProfileApi + from bamboohr_sdk.api.compensation_api import CompensationApi + from bamboohr_sdk.api.compensation_benchmarking_api import CompensationBenchmarkingApi + from bamboohr_sdk.api.compensation_planning_api import CompensationPlanningApi + from bamboohr_sdk.api.custom_fields_api import CustomFieldsApi from bamboohr_sdk.api.custom_reports_api import CustomReportsApi from bamboohr_sdk.api.datasets_api import DatasetsApi from bamboohr_sdk.api.employee_files_api import EmployeeFilesApi + from bamboohr_sdk.api.employee_tables_api import EmployeeTablesApi + from bamboohr_sdk.api.employee_verification_api import EmployeeVerificationApi from bamboohr_sdk.api.employees_api import EmployeesApi from bamboohr_sdk.api.goals_api import GoalsApi + from bamboohr_sdk.api.holidays_api import HolidaysApi from bamboohr_sdk.api.hours_api import HoursApi - from bamboohr_sdk.api.last_change_information_api import LastChangeInformationApi + from bamboohr_sdk.api.locations_api import LocationsApi from bamboohr_sdk.api.login_api import LoginApi + from bamboohr_sdk.api.meal_rest_breaks_api import MealRestBreaksApi + from bamboohr_sdk.api.onboarding_api import OnboardingApi + from bamboohr_sdk.api.pay_grades_bands_api import PayGradesBandsApi from bamboohr_sdk.api.photos_api import PhotosApi from bamboohr_sdk.api.reports_api import ReportsApi - from bamboohr_sdk.api.tabular_data_api import TabularDataApi + from bamboohr_sdk.api.scheduling_api import SchedulingApi from bamboohr_sdk.api.time_off_api import TimeOffApi from bamboohr_sdk.api.time_tracking_api import TimeTrackingApi + from bamboohr_sdk.api.total_rewards_api import TotalRewardsApi from bamboohr_sdk.api.training_api import TrainingApi from bamboohr_sdk.api.webhooks_api import WebhooksApi # --- END GENERATED ACCESSOR IMPORTS --- @@ -330,6 +345,12 @@ def account_information(self) -> AccountInformationApi: return self.get_api(AccountInformationApi) + def alerts(self) -> AlertsApi: + """Access the Alerts API.""" + from bamboohr_sdk.api.alerts_api import AlertsApi + + return self.get_api(AlertsApi) + def applicant_tracking(self) -> ApplicantTrackingApi: """Access the Applicant Tracking API.""" from bamboohr_sdk.api.applicant_tracking_api import ApplicantTrackingApi @@ -342,6 +363,24 @@ def benefits(self) -> BenefitsApi: return self.get_api(BenefitsApi) + def calendar_events(self) -> CalendarEventsApi: + """Access the Calendar Events API.""" + from bamboohr_sdk.api.calendar_events_api import CalendarEventsApi + + return self.get_api(CalendarEventsApi) + + def change_tracking(self) -> ChangeTrackingApi: + """Access the Change Tracking API.""" + from bamboohr_sdk.api.change_tracking_api import ChangeTrackingApi + + return self.get_api(ChangeTrackingApi) + + def company(self) -> CompanyApi: + """Access the Company API.""" + from bamboohr_sdk.api.company_api import CompanyApi + + return self.get_api(CompanyApi) + def company_files(self) -> CompanyFilesApi: """Access the Company Files API.""" from bamboohr_sdk.api.company_files_api import CompanyFilesApi @@ -354,6 +393,30 @@ def company_profile(self) -> CompanyProfileApi: return self.get_api(CompanyProfileApi) + def compensation(self) -> CompensationApi: + """Access the Compensation API.""" + from bamboohr_sdk.api.compensation_api import CompensationApi + + return self.get_api(CompensationApi) + + def compensation_benchmarking(self) -> CompensationBenchmarkingApi: + """Access the Compensation Benchmarking API.""" + from bamboohr_sdk.api.compensation_benchmarking_api import CompensationBenchmarkingApi + + return self.get_api(CompensationBenchmarkingApi) + + def compensation_planning(self) -> CompensationPlanningApi: + """Access the Compensation Planning API.""" + from bamboohr_sdk.api.compensation_planning_api import CompensationPlanningApi + + return self.get_api(CompensationPlanningApi) + + def custom_fields(self) -> CustomFieldsApi: + """Access the Custom Fields API.""" + from bamboohr_sdk.api.custom_fields_api import CustomFieldsApi + + return self.get_api(CustomFieldsApi) + def custom_reports(self) -> CustomReportsApi: """Access the Custom Reports API.""" from bamboohr_sdk.api.custom_reports_api import CustomReportsApi @@ -372,6 +435,18 @@ def employee_files(self) -> EmployeeFilesApi: return self.get_api(EmployeeFilesApi) + def employee_tables(self) -> EmployeeTablesApi: + """Access the Employee Tables API.""" + from bamboohr_sdk.api.employee_tables_api import EmployeeTablesApi + + return self.get_api(EmployeeTablesApi) + + def employee_verification(self) -> EmployeeVerificationApi: + """Access the Employee Verification API.""" + from bamboohr_sdk.api.employee_verification_api import EmployeeVerificationApi + + return self.get_api(EmployeeVerificationApi) + def employees(self) -> EmployeesApi: """Access the Employees API.""" from bamboohr_sdk.api.employees_api import EmployeesApi @@ -384,17 +459,23 @@ def goals(self) -> GoalsApi: return self.get_api(GoalsApi) + def holidays(self) -> HolidaysApi: + """Access the Holidays API.""" + from bamboohr_sdk.api.holidays_api import HolidaysApi + + return self.get_api(HolidaysApi) + def hours(self) -> HoursApi: """Access the Hours API.""" from bamboohr_sdk.api.hours_api import HoursApi return self.get_api(HoursApi) - def last_change_information(self) -> LastChangeInformationApi: - """Access the Last Change Information API.""" - from bamboohr_sdk.api.last_change_information_api import LastChangeInformationApi + def locations(self) -> LocationsApi: + """Access the Locations API.""" + from bamboohr_sdk.api.locations_api import LocationsApi - return self.get_api(LastChangeInformationApi) + return self.get_api(LocationsApi) def login(self) -> LoginApi: """Access the Login API.""" @@ -402,6 +483,24 @@ def login(self) -> LoginApi: return self.get_api(LoginApi) + def meal_rest_breaks(self) -> MealRestBreaksApi: + """Access the Meal Rest Breaks API.""" + from bamboohr_sdk.api.meal_rest_breaks_api import MealRestBreaksApi + + return self.get_api(MealRestBreaksApi) + + def onboarding(self) -> OnboardingApi: + """Access the Onboarding API.""" + from bamboohr_sdk.api.onboarding_api import OnboardingApi + + return self.get_api(OnboardingApi) + + def pay_grades_bands(self) -> PayGradesBandsApi: + """Access the Pay Grades Bands API.""" + from bamboohr_sdk.api.pay_grades_bands_api import PayGradesBandsApi + + return self.get_api(PayGradesBandsApi) + def photos(self) -> PhotosApi: """Access the Photos API.""" from bamboohr_sdk.api.photos_api import PhotosApi @@ -414,11 +513,11 @@ def reports(self) -> ReportsApi: return self.get_api(ReportsApi) - def tabular_data(self) -> TabularDataApi: - """Access the Tabular Data API.""" - from bamboohr_sdk.api.tabular_data_api import TabularDataApi + def scheduling(self) -> SchedulingApi: + """Access the Scheduling API.""" + from bamboohr_sdk.api.scheduling_api import SchedulingApi - return self.get_api(TabularDataApi) + return self.get_api(SchedulingApi) def time_off(self) -> TimeOffApi: """Access the Time Off API.""" @@ -432,6 +531,12 @@ def time_tracking(self) -> TimeTrackingApi: return self.get_api(TimeTrackingApi) + def total_rewards(self) -> TotalRewardsApi: + """Access the Total Rewards API.""" + from bamboohr_sdk.api.total_rewards_api import TotalRewardsApi + + return self.get_api(TotalRewardsApi) + def training(self) -> TrainingApi: """Access the Training API.""" from bamboohr_sdk.api.training_api import TrainingApi diff --git a/bamboohr_sdk/configuration.py b/bamboohr_sdk/configuration.py index eec3c91..34ea71c 100644 --- a/bamboohr_sdk/configuration.py +++ b/bamboohr_sdk/configuration.py @@ -1,36 +1,40 @@ -# coding: utf-8 """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" import copy import http.client as httplib import logging -from logging import FileHandler import multiprocessing import sys -from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union -from typing_extensions import NotRequired, Self +from logging import FileHandler +from typing import Any, ClassVar, Literal, TypedDict import urllib3 - +from typing_extensions import NotRequired, Self JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' + "multipleOf", + "maximum", + "exclusiveMaximum", + "minimum", + "exclusiveMinimum", + "maxLength", + "minLength", + "pattern", + "maxItems", + "minItems", } -ServerVariablesT = Dict[str, str] +ServerVariablesT = dict[str, str] GenericAuthSetting = TypedDict( "GenericAuthSetting", @@ -60,7 +64,7 @@ "type": Literal["api_key"], "in": str, "key": str, - "value": Optional[str], + "value": str | None, }, ) @@ -71,7 +75,7 @@ "type": Literal["basic"], "in": Literal["header"], "key": Literal["Authorization"], - "value": Optional[str], + "value": str | None, }, ) @@ -110,27 +114,24 @@ ) -AuthSettings = TypedDict( - "AuthSettings", - { - "oauth": OAuth2AuthSetting, - "basic": BasicAuthSetting, - "RegistrationAccessToken": BearerFormatAuthSetting, - }, - total=False, -) +class AuthSettings(TypedDict, total=False): + oauth: OAuth2AuthSetting + basic: BasicAuthSetting + session: APIKeyAuthSetting + RegistrationAccessToken: BearerFormatAuthSetting + Api7RegistrationKey: APIKeyAuthSetting class HostSettingVariable(TypedDict): description: str default_value: str - enum_values: List[str] + enum_values: list[str] class HostSetting(TypedDict): url: str description: str - variables: NotRequired[Dict[str, HostSettingVariable]] + variables: NotRequired[dict[str, HostSettingVariable]] # BambooHR SDK: minimum and maximum allowed application-level retries @@ -144,85 +145,103 @@ class HostSetting(TypedDict): class Configuration: """This class contains various settings of the API client. - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: Number of application-level retries for retryable HTTP errors - (0-5, default 1). This is separate from urllib3's transport-level retries. - :param retryable_status_codes: List of HTTP status codes that trigger a retry. - Default: [408, 429, 504, 598]. - :param timeout: Default request timeout in seconds. Can be a float for a single - total timeout, or a (connect, read) tuple. Per-request timeouts override this. - :param ca_cert_data: verify the peer using concatenated CA certificate data - in PEM (str) or DER (bytes) format. - - :Example: - - HTTP Basic Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - http_basic_auth: - type: http - scheme: basic - - Configure API client with HTTP basic authentication: - -conf = bamboohr_sdk.Configuration( - username='the-user', - password='the-password', -) + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of application-level retries for retryable HTTP errors + (0-5, default 1). This is separate from urllib3's transport-level retries. + :param retryable_status_codes: List of HTTP status codes that trigger a retry. + Default: [408, 429, 504, 598]. + :param timeout: Default request timeout in seconds. Can be a float for a single + total timeout, or a (connect, read) tuple. Per-request timeouts override this. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + + conf = bamboohr_sdk.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} + ) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 + + HTTP Basic Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + http_basic_auth: + type: http + scheme: basic + + Configure API client with HTTP basic authentication: + + conf = bamboohr_sdk.Configuration( + username='the-user', + password='the-password', + ) """ - _default: ClassVar[Optional[Self]] = None + _default: ClassVar[Self | None] = None def __init__( self, - host: Optional[str]=None, - api_key: Optional[Dict[str, str]]=None, - api_key_prefix: Optional[Dict[str, str]]=None, - username: Optional[str]=None, - password: Optional[str]=None, - access_token: Optional[str]=None, - server_index: Optional[int]=None, - server_variables: Optional[ServerVariablesT]=None, - server_operation_index: Optional[Dict[int, int]]=None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, - ignore_operation_servers: bool=False, - ssl_ca_cert: Optional[str]=None, - retries: Optional[int] = None, - retryable_status_codes: Optional[List[int]] = None, - timeout: Optional[Union[float, tuple]] = None, - ca_cert_data: Optional[Union[str, bytes]] = None, + host: str | None = None, + api_key: dict[str, str] | None = None, + api_key_prefix: dict[str, str] | None = None, + username: str | None = None, + password: str | None = None, + access_token: str | None = None, + server_index: int | None = None, + server_variables: ServerVariablesT | None = None, + server_operation_index: dict[int, int] | None = None, + server_operation_variables: dict[int, ServerVariablesT] | None = None, + ignore_operation_servers: bool = False, + ssl_ca_cert: str | None = None, + retries: int | None = None, + retryable_status_codes: list[int] | None = None, + timeout: float | tuple | None = None, + ca_cert_data: str | bytes | None = None, *, - debug: Optional[bool] = None, + debug: bool | None = None, ) -> None: - """Constructor - """ + """Constructor""" self._base_path = "https://companySubDomain.bamboohr.com" if host is None else host """Default Base url """ @@ -271,13 +290,13 @@ def __init__( """ self.logger["package_logger"] = logging.getLogger("bamboohr_sdk") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' + self.logger_format = "%(asctime)s %(levelname)s %(message)s" """Log format """ self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler: Optional[FileHandler] = None + self.logger_file_handler: FileHandler | None = None """Log file handler """ self.logger_file = None @@ -324,13 +343,13 @@ def __init__( cpu_count * 5 is used as default value to increase performance. """ - self.proxy: Optional[str] = None + self.proxy: str | None = None """Proxy URL """ self.proxy_headers = None """Proxy headers """ - self.safe_chars_for_path_param = '' + self.safe_chars_for_path_param = "" """Safe chars for path_param """ # BambooHR SDK: application-level retries (separate from urllib3 transport retries) @@ -338,12 +357,13 @@ def __init__( """Number of application-level retries for retryable HTTP status codes (0-5). """ self.retryable_status_codes = ( - list(retryable_status_codes) if retryable_status_codes is not None + list(retryable_status_codes) + if retryable_status_codes is not None else list(_DEFAULT_RETRYABLE_STATUS_CODES) ) """HTTP status codes that trigger an automatic retry. """ - self.timeout: Optional[Union[float, tuple]] = timeout + self.timeout: float | tuple | None = timeout """Default request timeout in seconds (float or (connect, read) tuple). Per-request _request_timeout overrides this value. """ @@ -362,12 +382,12 @@ def __init__( """date format """ - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + def __deepcopy__(self, memo: dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): + if k not in ("logger", "logger_file_handler"): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -380,7 +400,7 @@ def __setattr__(self, name: str, value: Any) -> None: object.__setattr__(self, name, value) @classmethod - def set_default(cls, default: Optional[Self]) -> None: + def set_default(cls, default: Self | None) -> None: """Set default instance of configuration. It stores default configuration, which can be @@ -415,7 +435,7 @@ def get_default(cls) -> Self: return cls._default @property - def logger_file(self) -> Optional[str]: + def logger_file(self) -> str | None: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -427,7 +447,7 @@ def logger_file(self) -> Optional[str]: return self.__logger_file @logger_file.setter - def logger_file(self, value: Optional[str]) -> None: + def logger_file(self, value: str | None) -> None: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -499,7 +519,7 @@ def logger_format(self, value: str) -> None: self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + def get_api_key_with_prefix(self, identifier: str, alias: str | None = None) -> str | None: """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -518,7 +538,7 @@ def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> return None - def get_basic_auth_token(self) -> Optional[str]: + def get_basic_auth_token(self) -> str | None: """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. @@ -529,37 +549,53 @@ def get_basic_auth_token(self) -> Optional[str]: password = "" if self.password is not None: password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') + return urllib3.util.make_headers(basic_auth=username + ":" + password).get("authorization") - def auth_settings(self)-> AuthSettings: + def auth_settings(self) -> AuthSettings: """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ auth: AuthSettings = {} if self.access_token is not None: - auth['oauth'] = { - 'type': 'oauth2', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token + auth["oauth"] = { + "type": "oauth2", + "in": "header", + "key": "Authorization", + "value": "Bearer " + self.access_token, } if self.username is not None and self.password is not None: - auth['basic'] = { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() + auth["basic"] = { + "type": "basic", + "in": "header", + "key": "Authorization", + "value": self.get_basic_auth_token(), + } + if "session" in self.api_key: + auth["session"] = { + "type": "api_key", + "in": "cookie", + "key": "PHPSESSID", + "value": self.get_api_key_with_prefix( + "session", + ), } if self.access_token is not None: - auth['RegistrationAccessToken'] = { - 'type': 'bearer', - 'in': 'header', - 'format': 'opaque-token', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token + auth["RegistrationAccessToken"] = { + "type": "bearer", + "in": "header", + "format": "opaque-token", + "key": "Authorization", + "value": "Bearer " + self.access_token, + } + if "Api7RegistrationKey" in self.api_key: + auth["Api7RegistrationKey"] = { + "type": "api_key", + "in": "header", + "key": "X-API7-REGISTRATION-KEY", + "value": self.get_api_key_with_prefix( + "Api7RegistrationKey", + ), } return auth @@ -568,36 +604,37 @@ def to_debug_report(self) -> str: :return: The report for debugging. """ - return "BambooHR Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) + return ( + "BambooHR Python SDK Debug Report:\n" + f"OS: {sys.platform}\n" + f"Python Version: {sys.version}\n" + "Version of the API: 1.0\n" + "SDK Package Version: 1.0.0" + ) - def get_host_settings(self) -> List[HostSetting]: + def get_host_settings(self) -> list[HostSetting]: """Gets an array of host settings :return: An array of host settings """ return [ { - 'url': "https://{companyDomain}.bamboohr.com", - 'description': "No description provided", - 'variables': { - 'companyDomain': { - 'description': "Company domain", - 'default_value': "companySubDomain", - } + "url": "https://{companyDomain}.bamboohr.com", + "description": "No description provided", + "variables": { + "companyDomain": { + "description": "Company domain", + "default_value": "companySubDomain", } + }, } ] def get_host_from_settings( self, - index: Optional[int], - variables: Optional[ServerVariablesT]=None, - servers: Optional[List[HostSetting]]=None, + index: int | None, + variables: ServerVariablesT | None = None, + servers: list[HostSetting] | None = None, ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings @@ -615,23 +652,21 @@ def get_host_from_settings( server = servers[index] except IndexError: raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) + f"Invalid index {index} when selecting the host settings. Must be less than {len(servers)}" + ) - url = server['url'] + url = server["url"] # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) + for variable_name, variable in server.get("variables", {}).items(): + used_value = variables.get(variable_name, variable["default_value"]) - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: + if "enum_values" in variable and used_value not in variable["enum_values"]: raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) + "The variable `{0}` in the host URL has invalid value {1}. Must be {2}.".format( + variable_name, variables[variable_name], variable["enum_values"] + ) + ) url = url.replace("{" + variable_name + "}", used_value) diff --git a/bamboohr_sdk/exceptions.py b/bamboohr_sdk/exceptions.py index 9cab37d..417e213 100644 --- a/bamboohr_sdk/exceptions.py +++ b/bamboohr_sdk/exceptions.py @@ -1,27 +1,27 @@ -# coding: utf-8 """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. -""" # noqa: E501 +Do not edit the class manually. +""" + +from typing import Any -from typing import Any, Optional from typing_extensions import Self + class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors + def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None) -> None: + """Raises an exception for TypeErrors Args: msg (str): the exception message @@ -43,8 +43,8 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, self.key_type = key_type full_msg = msg if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) + full_msg = f"{msg} at {render_path(path_to_item)}" + super().__init__(full_msg) class ApiValueError(OpenApiException, ValueError): @@ -61,8 +61,8 @@ def __init__(self, msg, path_to_item=None) -> None: self.path_to_item = path_to_item full_msg = msg if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) + full_msg = f"{msg} at {render_path(path_to_item)}" + super().__init__(full_msg) class ApiAttributeError(OpenApiException, AttributeError): @@ -80,8 +80,8 @@ def __init__(self, msg, path_to_item=None) -> None: self.path_to_item = path_to_item full_msg = msg if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) + full_msg = f"{msg} at {render_path(path_to_item)}" + super().__init__(full_msg) class ApiKeyError(OpenApiException, KeyError): @@ -97,21 +97,20 @@ def __init__(self, msg, path_to_item=None) -> None: self.path_to_item = path_to_item full_msg = msg if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) + full_msg = f"{msg} at {render_path(path_to_item)}" + super().__init__(full_msg) class ApiException(OpenApiException): - def __init__( - self, - status=None, - reason=None, + self, + status=None, + reason=None, http_resp=None, *, - body: Optional[str] = None, - data: Optional[Any] = None, - request_id: Optional[str] = None, + body: str | None = None, + data: Any | None = None, + request_id: str | None = None, ) -> None: self.status = status self.reason = reason @@ -127,7 +126,7 @@ def __init__( self.reason = http_resp.reason if self.body is None: try: - self.body = http_resp.data.decode('utf-8') + self.body = http_resp.data.decode("utf-8") except Exception: pass self.headers = http_resp.getheaders() @@ -137,11 +136,11 @@ def __init__( @classmethod def from_response( - cls, - *, - http_resp, - body: Optional[str], - data: Optional[Any], + cls, + *, + http_resp, + body: str | None, + data: Any | None, ) -> Self: # Mapping is populated after all exception classes are defined. # Use _STATUS_TO_EXCEPTION_CLASS for the lookup. @@ -159,17 +158,15 @@ def from_response( def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) + error_message = f"({self.status})\nReason: {self.reason}\n" if self.request_id: - error_message += "Request ID: {0}\n".format(self.request_id) + error_message += f"Request ID: {self.request_id}\n" if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) + error_message += f"HTTP response headers: {self.headers}\n" if self.data or self.body: - error_message += "HTTP response body: {0}\n".format(self.data or self.body) + error_message += f"HTTP response body: {self.data or self.body}\n" return error_message @@ -178,13 +175,16 @@ def __str__(self): # Base classes for client (4xx) and server (5xx) errors # --------------------------------------------------------------------------- + class ClientException(ApiException): """Base class for all client-side (4xx) exceptions.""" + pass class ServerException(ApiException): """Base class for all server-side (5xx) exceptions.""" + pass @@ -195,6 +195,7 @@ class ServerException(ApiException): # Do not edit manually — run the script to regenerate. # --------------------------------------------------------------------------- + class BadRequestException(ClientException): """Exception for HTTP 400 Bad Request.""" @@ -251,9 +252,10 @@ def potential_causes() -> list[str]: @staticmethod def debugging_tips() -> list[str]: return [ - "Verify your API key has the necessary permissions", - "Contact your BambooHR administrator to review API access permissions", - "Check if IP restrictions are in place for API access", + "Verify your account has access to the requested resource", + "Check if your API key has the necessary permissions enabled", + "Contact your BambooHR administrator to review access controls", + "Ensure you are not trying to access another company's data", ] @@ -263,18 +265,19 @@ class ResourceNotFoundException(ClientException): @staticmethod def potential_causes() -> list[str]: return [ - "The requested resource does not exist", - "Resource may have been deleted", - "Incorrect resource identifier or path", + "Requested resource does not exist", + "Incorrect ID or identifier used", + "Resource was deleted or never created", + "Incorrect company subdomain", ] @staticmethod def debugging_tips() -> list[str]: return [ - "Verify the resource ID or path is correct", - "Check if the resource exists before attempting to access it", - "Ensure you are using the correct API version", - "Confirm the resource has not been deleted or archived", + "Verify the resource ID is correct", + "Check that the resource exists before requesting it", + "Ensure your company subdomain is correct", + "Review API documentation for correct endpoint format", ] @@ -284,17 +287,15 @@ class MethodNotAllowedException(ClientException): @staticmethod def potential_causes() -> list[str]: return [ - "Using an incorrect HTTP method for this endpoint", - "The endpoint does not support the requested operation", - "API version mismatch", + "Using wrong HTTP method for this endpoint", + "Endpoint does not support the requested operation", ] @staticmethod def debugging_tips() -> list[str]: return [ - "Check API documentation for the correct HTTP method (GET, POST, PUT, DELETE)", - "Verify the endpoint supports the operation you are attempting", - "Ensure you are using the correct API version", + "Check API documentation for the correct HTTP method", + "Verify you are using the correct endpoint", ] @@ -304,18 +305,18 @@ class RequestTimeoutException(ClientException): @staticmethod def potential_causes() -> list[str]: return [ - "The server did not receive a complete request in time", - "Network connectivity issues", - "Server overload or high latency", + "Request took too long to complete", + "Network latency or connectivity issues", + "Large payload size causing slow processing", ] @staticmethod def debugging_tips() -> list[str]: return [ - "Check your network connection", - "Increase request timeout settings", - "Consider breaking large requests into smaller chunks", - "Increase the number of retries", + "Retry the request", + "Check network connectivity", + "Reduce payload size if possible", + "Consider increasing timeout settings", ] @@ -325,19 +326,17 @@ class ConflictException(ClientException): @staticmethod def potential_causes() -> list[str]: return [ - "Resource state conflict with the current request", - "Concurrent modification of the same resource", - "Attempting to create a resource that already exists", - "Violating unique constraints", + "Resource already exists", + "Conflicting state prevents the operation", + "Concurrent modification conflict", ] @staticmethod def debugging_tips() -> list[str]: return [ - "Fetch the latest state of the resource before attempting modifications", - "Implement optimistic concurrency control", - "Check for existing resources before creation attempts", - "Handle conflict resolution in your application logic", + "Check if the resource already exists before creating", + "Implement optimistic locking if handling concurrent updates", + "Retry after resolving the conflict", ] @@ -347,17 +346,15 @@ class PayloadTooLargeException(ClientException): @staticmethod def potential_causes() -> list[str]: return [ - "Request body exceeds the server's size limit", + "Request body exceeds server size limit", "File upload is too large", - "Batch operation contains too many items", ] @staticmethod def debugging_tips() -> list[str]: return [ - "Reduce the size of your request payload", - "Split large requests into smaller chunks", - "Compress data before sending if appropriate", + "Reduce the size of the request payload", + "Split large uploads into smaller chunks if supported", "Check API documentation for size limits", ] @@ -369,7 +366,6 @@ class UnsupportedMediaTypeException(ClientException): def potential_causes() -> list[str]: return [ "Content-Type header is missing or incorrect", - "Request body format is not supported by the API", "Using XML when only JSON is supported (or vice versa)", ] @@ -429,6 +425,7 @@ def debugging_tips() -> list[str]: # Specific server exceptions (5xx+) # --------------------------------------------------------------------------- + class InternalServerErrorException(ServerException): """Exception for HTTP 500 Internal Server Error.""" @@ -572,11 +569,6 @@ def debugging_tips() -> list[str]: ] -# --------------------------------------------------------------------------- -# Backward-compatible aliases -# --------------------------------------------------------------------------- - - # --------------------------------------------------------------------------- # Status code → exception class mapping (used by ApiException.from_response) # --------------------------------------------------------------------------- @@ -603,7 +595,6 @@ def debugging_tips() -> list[str]: } - # Common header names that may contain a request ID _REQUEST_ID_HEADERS = ( "x-request-id", @@ -612,7 +603,7 @@ def debugging_tips() -> list[str]: ) -def _extract_request_id(headers) -> Optional[str]: +def _extract_request_id(headers) -> str | None: """Extract request ID from response headers. Checks common request ID header names and returns the first match. @@ -634,7 +625,7 @@ def render_path(path_to_item): result = "" for pth in path_to_item: if isinstance(pth, int): - result += "[{0}]".format(pth) + result += f"[{pth}]" else: - result += "['{0}']".format(pth) + result += f"['{pth}']" return result diff --git a/bamboohr_sdk/models/__init__.py b/bamboohr_sdk/models/__init__.py index d904000..3e87392 100644 --- a/bamboohr_sdk/models/__init__.py +++ b/bamboohr_sdk/models/__init__.py @@ -2,151 +2,358 @@ # flake8: noqa """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API documentation. https://documentation.bamboohr.com/ - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 # import models into model package +from bamboohr_sdk.models.a05b6d5f564f805d688ff2c1e37c3990_request import A05b6d5f564f805d688ff2c1e37c3990Request +from bamboohr_sdk.models.add_custom_field_list_value_request import AddCustomFieldListValueRequest +from bamboohr_sdk.models.add_custom_field_list_value_response import AddCustomFieldListValueResponse +from bamboohr_sdk.models.add_custom_field_list_value_response_one_of_inner import ( + AddCustomFieldListValueResponseOneOfInner, +) +from bamboohr_sdk.models.add_cycle_admins_response import AddCycleAdminsResponse +from bamboohr_sdk.models.add_cycle_admins_response_added_inner import AddCycleAdminsResponseAddedInner +from bamboohr_sdk.models.add_cycle_admins_response_skipped_inner import AddCycleAdminsResponseSkippedInner +from bamboohr_sdk.models.add_total_rewards_employees_request import AddTotalRewardsEmployeesRequest from bamboohr_sdk.models.adjust_time_off_balance import AdjustTimeOffBalance from bamboohr_sdk.models.adjust_time_tracking_request_schema import AdjustTimeTrackingRequestSchema +from bamboohr_sdk.models.alert_configuration_v1 import AlertConfigurationV1 +from bamboohr_sdk.models.alert_configuration_write_v1 import AlertConfigurationWriteV1 +from bamboohr_sdk.models.alert_template_list_response_v1 import AlertTemplateListResponseV1 +from bamboohr_sdk.models.alert_template_list_response_v1_alerts_inner import AlertTemplateListResponseV1AlertsInner from bamboohr_sdk.models.alignment_options_response import AlignmentOptionsResponse -from bamboohr_sdk.models.alignment_options_response_aligns_with_options_inner import AlignmentOptionsResponseAlignsWithOptionsInner +from bamboohr_sdk.models.alignment_options_response_aligns_with_options_inner import ( + AlignmentOptionsResponseAlignsWithOptionsInner, +) from bamboohr_sdk.models.applicant_status import ApplicantStatus from bamboohr_sdk.models.application_details import ApplicationDetails from bamboohr_sdk.models.application_details_applicant import ApplicationDetailsApplicant -from bamboohr_sdk.models.application_details_applicant_address import ApplicationDetailsApplicantAddress -from bamboohr_sdk.models.application_details_applicant_education import ApplicationDetailsApplicantEducation -from bamboohr_sdk.models.application_details_applicant_education_level import ApplicationDetailsApplicantEducationLevel from bamboohr_sdk.models.application_details_attachments_inner import ApplicationDetailsAttachmentsInner from bamboohr_sdk.models.application_details_job import ApplicationDetailsJob -from bamboohr_sdk.models.application_details_job_hiring_lead import ApplicationDetailsJobHiringLead -from bamboohr_sdk.models.application_details_job_hiring_lead_job_title import ApplicationDetailsJobHiringLeadJobTitle from bamboohr_sdk.models.application_details_job_title import ApplicationDetailsJobTitle -from bamboohr_sdk.models.application_details_questions_and_answers_inner import ApplicationDetailsQuestionsAndAnswersInner -from bamboohr_sdk.models.application_details_questions_and_answers_inner_answer import ApplicationDetailsQuestionsAndAnswersInnerAnswer -from bamboohr_sdk.models.application_details_questions_and_answers_inner_question import ApplicationDetailsQuestionsAndAnswersInnerQuestion +from bamboohr_sdk.models.application_details_questions_and_answers_inner import ( + ApplicationDetailsQuestionsAndAnswersInner, +) +from bamboohr_sdk.models.application_details_questions_and_answers_inner_answer import ( + ApplicationDetailsQuestionsAndAnswersInnerAnswer, +) +from bamboohr_sdk.models.application_details_questions_and_answers_inner_question import ( + ApplicationDetailsQuestionsAndAnswersInnerQuestion, +) from bamboohr_sdk.models.application_details_status import ApplicationDetailsStatus -from bamboohr_sdk.models.application_details_status_changed_by_user import ApplicationDetailsStatusChangedByUser -from bamboohr_sdk.models.application_details_status_changed_by_user_job_title import ApplicationDetailsStatusChangedByUserJobTitle from bamboohr_sdk.models.applications_list import ApplicationsList from bamboohr_sdk.models.applications_list_applications_inner import ApplicationsListApplicationsInner -from bamboohr_sdk.models.applications_list_applications_inner_applicant import ApplicationsListApplicationsInnerApplicant +from bamboohr_sdk.models.applications_list_applications_inner_applicant import ( + ApplicationsListApplicationsInnerApplicant, +) from bamboohr_sdk.models.applications_list_applications_inner_job import ApplicationsListApplicationsInnerJob from bamboohr_sdk.models.applications_list_applications_inner_job_title import ApplicationsListApplicationsInnerJobTitle from bamboohr_sdk.models.applications_list_applications_inner_status import ApplicationsListApplicationsInnerStatus +from bamboohr_sdk.models.approve_timesheet_request import ApproveTimesheetRequest +from bamboohr_sdk.models.archive_custom_field_response import ArchiveCustomFieldResponse +from bamboohr_sdk.models.archived_custom_fields_list_response import ArchivedCustomFieldsListResponse from bamboohr_sdk.models.assign_employees_to_break_policy_request import AssignEmployeesToBreakPolicyRequest -from bamboohr_sdk.models.assign_time_off_policies_request_inner import AssignTimeOffPoliciesRequestInner +from bamboohr_sdk.models.assign_time_off_policies_v1_request_inner import AssignTimeOffPoliciesV1RequestInner from bamboohr_sdk.models.assigned_time_off_policy import AssignedTimeOffPolicy from bamboohr_sdk.models.assigned_time_off_policy_v11 import AssignedTimeOffPolicyV11 from bamboohr_sdk.models.available_action import AvailableAction -from bamboohr_sdk.models.bad_request import BadRequest -from bamboohr_sdk.models.bad_request_error import BadRequestError +from bamboohr_sdk.models.bad_request_v1 import BadRequestV1 +from bamboohr_sdk.models.bad_request_v1_error import BadRequestV1Error +from bamboohr_sdk.models.bank_holiday import BankHoliday from bamboohr_sdk.models.benefit_coverages_response import BenefitCoveragesResponse -from bamboohr_sdk.models.benefit_coverages_response_benefit_coverages_inner import BenefitCoveragesResponseBenefitCoveragesInner +from bamboohr_sdk.models.benefit_coverages_response_benefit_coverages_inner import ( + BenefitCoveragesResponseBenefitCoveragesInner, +) from bamboohr_sdk.models.benefit_deduction_sub_type import BenefitDeductionSubType from bamboohr_sdk.models.benefit_deduction_type import BenefitDeductionType from bamboohr_sdk.models.benefit_deduction_type_id import BenefitDeductionTypeId +from bamboohr_sdk.models.budget_breakdown_import_response import BudgetBreakdownImportResponse +from bamboohr_sdk.models.budget_guidelines_view import BudgetGuidelinesView +from bamboohr_sdk.models.budget_guidelines_warnings import BudgetGuidelinesWarnings +from bamboohr_sdk.models.c79f9c5950f983e59d2626faa30c00a1_request import C79f9c5950f983e59d2626faa30c00a1Request +from bamboohr_sdk.models.c7c32ed5278ac67e2e518bf7484a75dc_request import C7c32ed5278ac67e2e518bf7484a75dcRequest +from bamboohr_sdk.models.calendar_anniversary_calendar_event_v1 import CalendarAnniversaryCalendarEventV1 +from bamboohr_sdk.models.calendar_birthday_calendar_event_v1 import CalendarBirthdayCalendarEventV1 +from bamboohr_sdk.models.calendar_calendar_event_person_v1 import CalendarCalendarEventPersonV1 +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1 import CalendarCalendarEventsListResponseV1 +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_data_inner import ( + CalendarCalendarEventsListResponseV1DataInner, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_links import ( + CalendarCalendarEventsListResponseV1Links, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_links_next import ( + CalendarCalendarEventsListResponseV1LinksNext, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_links_prev import ( + CalendarCalendarEventsListResponseV1LinksPrev, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_meta import CalendarCalendarEventsListResponseV1Meta +from bamboohr_sdk.models.calendar_holiday_calendar_event_v1 import CalendarHolidayCalendarEventV1 +from bamboohr_sdk.models.calendar_time_off_calendar_event_v1 import CalendarTimeOffCalendarEventV1 from bamboohr_sdk.models.can_create_goals_response import CanCreateGoalsResponse +from bamboohr_sdk.models.cf87b8e09a001b6fb81dfce6c20ab9e3_request import Cf87b8e09a001b6fb81dfce6c20ab9e3Request +from bamboohr_sdk.models.change_custom_field_list_value_request import ChangeCustomFieldListValueRequest from bamboohr_sdk.models.changed_employee_ids_response import ChangedEmployeeIdsResponse from bamboohr_sdk.models.changed_employee_ids_response_employees_value import ChangedEmployeeIdsResponseEmployeesValue from bamboohr_sdk.models.changed_employee_table_data_response import ChangedEmployeeTableDataResponse -from bamboohr_sdk.models.changed_employee_table_data_response_employees_value import ChangedEmployeeTableDataResponseEmployeesValue -from bamboohr_sdk.models.changed_employee_table_data_response_employees_value_rows_inner_value import ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue -from bamboohr_sdk.models.changed_employee_table_data_response_employees_value_rows_inner_value_any_of_inner import ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner +from bamboohr_sdk.models.changed_employee_table_data_response_employees_value import ( + ChangedEmployeeTableDataResponseEmployeesValue, +) +from bamboohr_sdk.models.changed_employee_table_data_response_employees_value_rows_inner_value import ( + ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue, +) +from bamboohr_sdk.models.changed_employee_table_data_response_employees_value_rows_inner_value_any_of_inner import ( + ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner, +) from bamboohr_sdk.models.clock_entries_schema import ClockEntriesSchema +from bamboohr_sdk.models.clock_entry_clock_entry_location_input_v1 import ClockEntryClockEntryLocationInputV1 +from bamboohr_sdk.models.clock_entry_create_clock_entry_v1 import ClockEntryCreateClockEntryV1 from bamboohr_sdk.models.clock_entry_ids_schema import ClockEntryIdsSchema from bamboohr_sdk.models.clock_entry_schema import ClockEntrySchema from bamboohr_sdk.models.clock_in_request_schema import ClockInRequestSchema from bamboohr_sdk.models.clock_out_request_schema import ClockOutRequestSchema +from bamboohr_sdk.models.close_goal_request import CloseGoalRequest from bamboohr_sdk.models.company_benefit_summary import CompanyBenefitSummary from bamboohr_sdk.models.company_benefits_list_response import CompanyBenefitsListResponse from bamboohr_sdk.models.company_deleted_webhook_payload import CompanyDeletedWebhookPayload from bamboohr_sdk.models.company_file_update import CompanyFileUpdate from bamboohr_sdk.models.company_files_response import CompanyFilesResponse from bamboohr_sdk.models.company_files_response_categories_inner import CompanyFilesResponseCategoriesInner -from bamboohr_sdk.models.company_files_response_categories_inner_files_inner import CompanyFilesResponseCategoriesInnerFilesInner +from bamboohr_sdk.models.company_files_response_categories_inner_files_inner import ( + CompanyFilesResponseCategoriesInnerFilesInner, +) +from bamboohr_sdk.models.company_industry_data_object import CompanyIndustryDataObject from bamboohr_sdk.models.company_information import CompanyInformation from bamboohr_sdk.models.company_information_address import CompanyInformationAddress from bamboohr_sdk.models.company_integrations_updated_webhook_payload import CompanyIntegrationsUpdatedWebhookPayload -from bamboohr_sdk.models.company_integrations_updated_webhook_payload_data import CompanyIntegrationsUpdatedWebhookPayloadData +from bamboohr_sdk.models.company_integrations_updated_webhook_payload_data import ( + CompanyIntegrationsUpdatedWebhookPayloadData, +) +from bamboohr_sdk.models.company_profile_data import CompanyProfileData +from bamboohr_sdk.models.company_profile_data_address import CompanyProfileDataAddress from bamboohr_sdk.models.company_profile_integrations import CompanyProfileIntegrations from bamboohr_sdk.models.company_updated_webhook_payload import CompanyUpdatedWebhookPayload +from bamboohr_sdk.models.compensation_benchmark_detail_employee import CompensationBenchmarkDetailEmployee +from bamboohr_sdk.models.compensation_benchmark_detail_employee_job_title import ( + CompensationBenchmarkDetailEmployeeJobTitle, +) +from bamboohr_sdk.models.compensation_benchmark_detail_employee_salary import CompensationBenchmarkDetailEmployeeSalary +from bamboohr_sdk.models.compensation_benchmark_details import CompensationBenchmarkDetails +from bamboohr_sdk.models.compensation_benchmark_details_benchmark_values_inner import ( + CompensationBenchmarkDetailsBenchmarkValuesInner, +) +from bamboohr_sdk.models.compensation_benchmark_job_location_employee import CompensationBenchmarkJobLocationEmployee +from bamboohr_sdk.models.compensation_benchmark_job_location_employee_salary import ( + CompensationBenchmarkJobLocationEmployeeSalary, +) +from bamboohr_sdk.models.compensation_benchmark_job_location_pair import CompensationBenchmarkJobLocationPair +from bamboohr_sdk.models.compensation_benchmark_job_location_pair_job_details import ( + CompensationBenchmarkJobLocationPairJobDetails, +) +from bamboohr_sdk.models.compensation_benchmark_overview import CompensationBenchmarkOverview +from bamboohr_sdk.models.compensation_benchmark_overview_values import CompensationBenchmarkOverviewValues +from bamboohr_sdk.models.compensation_benchmark_source import CompensationBenchmarkSource +from bamboohr_sdk.models.compensation_benchmarking_column_map import CompensationBenchmarkingColumnMap +from bamboohr_sdk.models.compensation_benchmarks_list import CompensationBenchmarksList +from bamboohr_sdk.models.compensation_equity_settings_response import CompensationEquitySettingsResponse +from bamboohr_sdk.models.compensation_equity_settings_response_company_valuation import ( + CompensationEquitySettingsResponseCompanyValuation, +) +from bamboohr_sdk.models.compensation_equity_settings_response_disclaimers import ( + CompensationEquitySettingsResponseDisclaimers, +) +from bamboohr_sdk.models.compensation_equity_settings_response_outstanding_shares import ( + CompensationEquitySettingsResponseOutstandingShares, +) +from bamboohr_sdk.models.compensation_equity_settings_response_price_per_share import ( + CompensationEquitySettingsResponsePricePerShare, +) +from bamboohr_sdk.models.compensation_equity_settings_response_slider_min import ( + CompensationEquitySettingsResponseSliderMin, +) +from bamboohr_sdk.models.compensation_equity_settings_response_vesting_conditions import ( + CompensationEquitySettingsResponseVestingConditions, +) +from bamboohr_sdk.models.compensation_equity_settings_update_request import CompensationEquitySettingsUpdateRequest +from bamboohr_sdk.models.compensation_planning_cycle_admins_response import CompensationPlanningCycleAdminsResponse +from bamboohr_sdk.models.compensation_planning_cycle_admins_response_admins_inner import ( + CompensationPlanningCycleAdminsResponseAdminsInner, +) +from bamboohr_sdk.models.compensation_planning_cycle_complete_response import CompensationPlanningCycleCompleteResponse +from bamboohr_sdk.models.compensation_planning_cycle_complete_response_errors_inner import ( + CompensationPlanningCycleCompleteResponseErrorsInner, +) +from bamboohr_sdk.models.compensation_tools_data_object import CompensationToolsDataObject +from bamboohr_sdk.models.compensation_tools_response import CompensationToolsResponse +from bamboohr_sdk.models.compensation_upsell_data import CompensationUpsellData +from bamboohr_sdk.models.completed_questions_and_response_data_object import CompletedQuestionsAndResponseDataObject +from bamboohr_sdk.models.conversion_rate_data_object import ConversionRateDataObject +from bamboohr_sdk.models.countries_options_response import CountriesOptionsResponse from bamboohr_sdk.models.country import Country from bamboohr_sdk.models.country_schema import CountrySchema from bamboohr_sdk.models.create_application_comment_request import CreateApplicationCommentRequest from bamboohr_sdk.models.create_candidate_response import CreateCandidateResponse from bamboohr_sdk.models.create_comment_response import CreateCommentResponse +from bamboohr_sdk.models.create_compensation_benchmark_request import CreateCompensationBenchmarkRequest +from bamboohr_sdk.models.create_compensation_benchmark_source_request import CreateCompensationBenchmarkSourceRequest from bamboohr_sdk.models.create_employee_training_record_request import CreateEmployeeTrainingRecordRequest from bamboohr_sdk.models.create_employee_training_record_request_cost import CreateEmployeeTrainingRecordRequestCost +from bamboohr_sdk.models.create_goal_comment_request import CreateGoalCommentRequest +from bamboohr_sdk.models.create_goal_request import CreateGoalRequest +from bamboohr_sdk.models.create_goal_request_milestones_inner import CreateGoalRequestMilestonesInner from bamboohr_sdk.models.create_job_opening_response import CreateJobOpeningResponse +from bamboohr_sdk.models.create_location_request import CreateLocationRequest +from bamboohr_sdk.models.create_location_request_address import CreateLocationRequestAddress from bamboohr_sdk.models.create_training_category_request import CreateTrainingCategoryRequest from bamboohr_sdk.models.create_training_type_request import CreateTrainingTypeRequest from bamboohr_sdk.models.create_training_type_request_category import CreateTrainingTypeRequestCategory -from bamboohr_sdk.models.create_training_type_request_due_from_hire_date import CreateTrainingTypeRequestDueFromHireDate -from bamboohr_sdk.models.create_training_type_request_due_from_hire_date_one_of import CreateTrainingTypeRequestDueFromHireDateOneOf from bamboohr_sdk.models.create_webhook_bad_request_response import CreateWebhookBadRequestResponse +from bamboohr_sdk.models.created_compensation_benchmark import CreatedCompensationBenchmark +from bamboohr_sdk.models.created_compensation_benchmark_saved_benchmark import ( + CreatedCompensationBenchmarkSavedBenchmark, +) +from bamboohr_sdk.models.created_compensation_benchmark_source import CreatedCompensationBenchmarkSource +from bamboohr_sdk.models.created_time_off_request import CreatedTimeOffRequest +from bamboohr_sdk.models.created_time_off_request_amount import CreatedTimeOffRequestAmount +from bamboohr_sdk.models.created_time_off_request_notes import CreatedTimeOffRequestNotes +from bamboohr_sdk.models.created_time_off_request_status import CreatedTimeOffRequestStatus +from bamboohr_sdk.models.created_time_off_request_type import CreatedTimeOffRequestType +from bamboohr_sdk.models.currency_conversions_response import CurrencyConversionsResponse from bamboohr_sdk.models.cursor_paged_response_metadata import CursorPagedResponseMetadata from bamboohr_sdk.models.cursor_pages_response import CursorPagesResponse -from bamboohr_sdk.models.cursor_pagination_query_object import CursorPaginationQueryObject +from bamboohr_sdk.models.custom_field_definition_response_object import CustomFieldDefinitionResponseObject +from bamboohr_sdk.models.custom_field_definition_response_object_values_inner import ( + CustomFieldDefinitionResponseObjectValuesInner, +) +from bamboohr_sdk.models.custom_field_request import CustomFieldRequest +from bamboohr_sdk.models.custom_field_type_view_object import CustomFieldTypeViewObject +from bamboohr_sdk.models.custom_field_view_object import CustomFieldViewObject +from bamboohr_sdk.models.custom_fields_list_response import CustomFieldsListResponse +from bamboohr_sdk.models.custom_report_response import CustomReportResponse +from bamboohr_sdk.models.custom_report_response_fields_inner import CustomReportResponseFieldsInner +from bamboohr_sdk.models.dacd313af2106213fc4696175941ce65_request import Dacd313af2106213fc4696175941ce65Request from bamboohr_sdk.models.data_request import DataRequest -from bamboohr_sdk.models.data_request_aggregations_inner import DataRequestAggregationsInner +from bamboohr_sdk.models.data_request_aggregations import DataRequestAggregations from bamboohr_sdk.models.data_request_filters import DataRequestFilters from bamboohr_sdk.models.data_request_filters_filters_inner import DataRequestFiltersFiltersInner from bamboohr_sdk.models.data_request_sort_by_inner import DataRequestSortByInner -from bamboohr_sdk.models.dataset import Dataset +from bamboohr_sdk.models.dataset_data_response_v2 import DatasetDataResponseV2 +from bamboohr_sdk.models.dataset_data_response_v2_data_inner import DatasetDataResponseV2DataInner +from bamboohr_sdk.models.dataset_data_response_v2_data_inner_fields_value import ( + DatasetDataResponseV2DataInnerFieldsValue, +) +from bamboohr_sdk.models.dataset_data_response_v2_links import DatasetDataResponseV2Links +from bamboohr_sdk.models.dataset_data_response_v2_meta import DatasetDataResponseV2Meta from bamboohr_sdk.models.dataset_fields_response import DatasetFieldsResponse -from bamboohr_sdk.models.dataset_response import DatasetResponse -from bamboohr_sdk.models.datasets_response import DatasetsResponse -from bamboohr_sdk.models.datasets_response_datasets_inner import DatasetsResponseDatasetsInner +from bamboohr_sdk.models.dataset_response_v1 import DatasetResponseV1 +from bamboohr_sdk.models.dataset_v1 import DatasetV1 +from bamboohr_sdk.models.datasets_response_v12 import DatasetsResponseV12 +from bamboohr_sdk.models.datasets_response_v12_datasets_inner import DatasetsResponseV12DatasetsInner +from bamboohr_sdk.models.delete_compensation_benchmark_source_request import DeleteCompensationBenchmarkSourceRequest +from bamboohr_sdk.models.delete_compensation_benchmark_source_response import DeleteCompensationBenchmarkSourceResponse +from bamboohr_sdk.models.details_and_currency_request_data_object import DetailsAndCurrencyRequestDataObject +from bamboohr_sdk.models.ec1ba8e76f33960b018d0d7518fe97b5_request import Ec1ba8e76f33960b018d0d7518fe97b5Request from bamboohr_sdk.models.employee import Employee from bamboohr_sdk.models.employee_benefit_filters import EmployeeBenefitFilters from bamboohr_sdk.models.employee_benefit_filters_filters import EmployeeBenefitFiltersFilters from bamboohr_sdk.models.employee_benefits_list_response import EmployeeBenefitsListResponse -from bamboohr_sdk.models.employee_benefits_list_response_employee_benefits_inner import EmployeeBenefitsListResponseEmployeeBenefitsInner -from bamboohr_sdk.models.employee_benefits_list_response_employee_benefits_inner_employee_benefit_inner import EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner +from bamboohr_sdk.models.employee_benefits_list_response_employee_benefits_inner import ( + EmployeeBenefitsListResponseEmployeeBenefitsInner, +) +from bamboohr_sdk.models.employee_benefits_list_response_employee_benefits_inner_employee_benefit_inner import ( + EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner, +) from bamboohr_sdk.models.employee_created_webhook_payload import EmployeeCreatedWebhookPayload from bamboohr_sdk.models.employee_created_webhook_payload_data import EmployeeCreatedWebhookPayloadData +from bamboohr_sdk.models.employee_cursor_pagination_query_object import EmployeeCursorPaginationQueryObject from bamboohr_sdk.models.employee_deleted_webhook_payload import EmployeeDeletedWebhookPayload from bamboohr_sdk.models.employee_deleted_webhook_payload_data import EmployeeDeletedWebhookPayloadData from bamboohr_sdk.models.employee_dependent import EmployeeDependent from bamboohr_sdk.models.employee_dependents_response import EmployeeDependentsResponse -from bamboohr_sdk.models.employee_dependents_response_employee_dependents_inner import EmployeeDependentsResponseEmployeeDependentsInner +from bamboohr_sdk.models.employee_dependents_response_employee_dependents_inner import ( + EmployeeDependentsResponseEmployeeDependentsInner, +) from bamboohr_sdk.models.employee_file_update import EmployeeFileUpdate +from bamboohr_sdk.models.employee_optional_field import EmployeeOptionalField +from bamboohr_sdk.models.employee_photo_json_response import EmployeePhotoJsonResponse from bamboohr_sdk.models.employee_response import EmployeeResponse from bamboohr_sdk.models.employee_response_aggregations_inner import EmployeeResponseAggregationsInner +from bamboohr_sdk.models.employee_string_code_error_response_v1 import EmployeeStringCodeErrorResponseV1 +from bamboohr_sdk.models.employee_string_code_error_response_v1_error import EmployeeStringCodeErrorResponseV1Error from bamboohr_sdk.models.employee_table_row import EmployeeTableRow -from bamboohr_sdk.models.employee_table_row_value import EmployeeTableRowValue -from bamboohr_sdk.models.employee_table_row_value_any_of_inner import EmployeeTableRowValueAnyOfInner from bamboohr_sdk.models.employee_time_off_policy_assignment import EmployeeTimeOffPolicyAssignment from bamboohr_sdk.models.employee_time_off_policy_assignment_v11 import EmployeeTimeOffPolicyAssignmentV11 +from bamboohr_sdk.models.employee_time_off_request_approver_response_inner import ( + EmployeeTimeOffRequestApproverResponseInner, +) from bamboohr_sdk.models.employee_timesheet_entry_transformer import EmployeeTimesheetEntryTransformer from bamboohr_sdk.models.employee_updated_webhook_payload import EmployeeUpdatedWebhookPayload from bamboohr_sdk.models.employee_updated_webhook_payload_data import EmployeeUpdatedWebhookPayloadData from bamboohr_sdk.models.employee_value import EmployeeValue from bamboohr_sdk.models.employee_value_any_of_inner import EmployeeValueAnyOfInner +from bamboohr_sdk.models.employee_verification_integration import EmployeeVerificationIntegration +from bamboohr_sdk.models.employee_verification_integration_response import EmployeeVerificationIntegrationResponse +from bamboohr_sdk.models.employee_verification_lifecycle_email_accepted_response import ( + EmployeeVerificationLifecycleEmailAcceptedResponse, +) +from bamboohr_sdk.models.employee_verification_public_api_record import EmployeeVerificationPublicApiRecord +from bamboohr_sdk.models.employee_verification_update_response import EmployeeVerificationUpdateResponse +from bamboohr_sdk.models.employee_verifications_list_response import EmployeeVerificationsListResponse +from bamboohr_sdk.models.employees_directory_json_response import EmployeesDirectoryJsonResponse +from bamboohr_sdk.models.employees_directory_json_response_fields_inner import EmployeesDirectoryJsonResponseFieldsInner +from bamboohr_sdk.models.employees_directory_xml_response import EmployeesDirectoryXmlResponse +from bamboohr_sdk.models.employees_directory_xml_response_employees import EmployeesDirectoryXmlResponseEmployees +from bamboohr_sdk.models.employees_directory_xml_response_employees_employee_inner import ( + EmployeesDirectoryXmlResponseEmployeesEmployeeInner, +) +from bamboohr_sdk.models.employees_directory_xml_response_employees_employee_inner_field_inner import ( + EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner, +) +from bamboohr_sdk.models.employees_directory_xml_response_fieldset import EmployeesDirectoryXmlResponseFieldset +from bamboohr_sdk.models.employees_directory_xml_response_fieldset_field_inner import ( + EmployeesDirectoryXmlResponseFieldsetFieldInner, +) +from bamboohr_sdk.models.error_response import ErrorResponse +from bamboohr_sdk.models.error_response_error import ErrorResponseError +from bamboohr_sdk.models.f3883a522dadbe9e11b34f8b656e3adb_request import F3883a522dadbe9e11b34f8b656e3adbRequest from bamboohr_sdk.models.field1 import Field1 from bamboohr_sdk.models.field1_id import Field1Id -from bamboohr_sdk.models.field_list import FieldList -from bamboohr_sdk.models.field_list_fields_inner import FieldListFieldsInner from bamboohr_sdk.models.field_options_request_schema import FieldOptionsRequestSchema -from bamboohr_sdk.models.field_options_request_schema_dependent_fields_value_inner import FieldOptionsRequestSchemaDependentFieldsValueInner +from bamboohr_sdk.models.field_options_request_schema_dependent_fields_value_inner import ( + FieldOptionsRequestSchemaDependentFieldsValueInner, +) from bamboohr_sdk.models.field_options_transformer import FieldOptionsTransformer -from bamboohr_sdk.models.forbidden import Forbidden +from bamboohr_sdk.models.field_options_transformer_id import FieldOptionsTransformerId +from bamboohr_sdk.models.forbidden_v1 import ForbiddenV1 +from bamboohr_sdk.models.forbidden_v1_error import ForbiddenV1Error +from bamboohr_sdk.models.get_break_policy_suggestions_request import GetBreakPolicySuggestionsRequest from bamboohr_sdk.models.get_company_report_response import GetCompanyReportResponse +from bamboohr_sdk.models.get_company_report_response_employees_inner import GetCompanyReportResponseEmployeesInner +from bamboohr_sdk.models.get_data_from_dataset_v2_request import GetDataFromDatasetV2Request +from bamboohr_sdk.models.get_employee_response import GetEmployeeResponse +from bamboohr_sdk.models.get_employees_employee_base_response import GetEmployeesEmployeeBaseResponse from bamboohr_sdk.models.get_employees_employee_response import GetEmployeesEmployeeResponse +from bamboohr_sdk.models.get_employees_employee_response_all_of_overtime_rate import ( + GetEmployeesEmployeeResponseAllOfOvertimeRate, +) +from bamboohr_sdk.models.get_employees_employee_response_all_of_pay_rate import GetEmployeesEmployeeResponseAllOfPayRate +from bamboohr_sdk.models.get_employees_employee_response_all_of_teams import GetEmployeesEmployeeResponseAllOfTeams from bamboohr_sdk.models.get_employees_filter_request_object import GetEmployeesFilterRequestObject from bamboohr_sdk.models.get_employees_response_object import GetEmployeesResponseObject from bamboohr_sdk.models.get_employees_response_object_links import GetEmployeesResponseObjectLinks from bamboohr_sdk.models.get_employees_response_object_links_next import GetEmployeesResponseObjectLinksNext from bamboohr_sdk.models.get_employees_response_object_links_prev import GetEmployeesResponseObjectLinksPrev from bamboohr_sdk.models.get_employees_response_object_links_self import GetEmployeesResponseObjectLinksSelf -from bamboohr_sdk.models.goal import Goal +from bamboohr_sdk.models.global_holiday_global_holiday_v1 import GlobalHolidayGlobalHolidayV1 from bamboohr_sdk.models.goal_aggregate import GoalAggregate from bamboohr_sdk.models.goal_aggregate_aligns_with_options_inner import GoalAggregateAlignsWithOptionsInner from bamboohr_sdk.models.goal_aggregate_comments_inner import GoalAggregateCommentsInner @@ -159,6 +366,7 @@ from bamboohr_sdk.models.goal_filters_v11_filters_inner import GoalFiltersV11FiltersInner from bamboohr_sdk.models.goal_filters_v11_filters_inner_actions import GoalFiltersV11FiltersInnerActions from bamboohr_sdk.models.goal_filters_v1_filters_inner import GoalFiltersV1FiltersInner +from bamboohr_sdk.models.goal_response import GoalResponse from bamboohr_sdk.models.goals_aggregate_v1 import GoalsAggregateV1 from bamboohr_sdk.models.goals_aggregate_v11 import GoalsAggregateV11 from bamboohr_sdk.models.goals_aggregate_v11_comments_inner import GoalsAggregateV11CommentsInner @@ -168,69 +376,256 @@ from bamboohr_sdk.models.goals_aggregate_v1_persons_inner import GoalsAggregateV1PersonsInner from bamboohr_sdk.models.goals_list import GoalsList from bamboohr_sdk.models.hiring_lead import HiringLead +from bamboohr_sdk.models.holiday_bulk_insert_company_holiday_error_v1 import HolidayBulkInsertCompanyHolidayErrorV1 +from bamboohr_sdk.models.holiday_bulk_insert_company_holiday_record_v1 import HolidayBulkInsertCompanyHolidayRecordV1 +from bamboohr_sdk.models.holiday_bulk_insert_company_holidays_failure_response_v1 import ( + HolidayBulkInsertCompanyHolidaysFailureResponseV1, +) +from bamboohr_sdk.models.holiday_bulk_insert_company_holidays_response_v1 import ( + HolidayBulkInsertCompanyHolidaysResponseV1, +) +from bamboohr_sdk.models.holiday_catalog_holiday_list_response_v1 import HolidayCatalogHolidayListResponseV1 +from bamboohr_sdk.models.holiday_catalog_holiday_list_response_v1_links import HolidayCatalogHolidayListResponseV1Links +from bamboohr_sdk.models.holiday_company_holiday_audience_v1 import HolidayCompanyHolidayAudienceV1 +from bamboohr_sdk.models.holiday_company_holiday_list_response_v1 import HolidayCompanyHolidayListResponseV1 +from bamboohr_sdk.models.holiday_company_holiday_list_response_v1_links import HolidayCompanyHolidayListResponseV1Links +from bamboohr_sdk.models.holiday_company_holiday_list_response_v1_meta import HolidayCompanyHolidayListResponseV1Meta +from bamboohr_sdk.models.holiday_company_holiday_pay_status_hours_v1 import HolidayCompanyHolidayPayStatusHoursV1 +from bamboohr_sdk.models.holiday_company_holiday_v1 import HolidayCompanyHolidayV1 +from bamboohr_sdk.models.holiday_create_company_holiday_request_v1 import HolidayCreateCompanyHolidayRequestV1 +from bamboohr_sdk.models.holiday_update_company_holiday_request_v1 import HolidayUpdateCompanyHolidayRequestV1 from bamboohr_sdk.models.hour_entries_request_schema import HourEntriesRequestSchema +from bamboohr_sdk.models.hour_entry_create_hour_entry_v1 import HourEntryCreateHourEntryV1 from bamboohr_sdk.models.hour_entry_ids_schema import HourEntryIdsSchema +from bamboohr_sdk.models.hour_entry_patch_hour_entry_v1 import HourEntryPatchHourEntryV1 from bamboohr_sdk.models.hour_entry_schema import HourEntrySchema -from bamboohr_sdk.models.invalid_request import InvalidRequest -from bamboohr_sdk.models.invalid_request_error import InvalidRequestError +from bamboohr_sdk.models.import_compensation_benchmarks_response import ImportCompensationBenchmarksResponse +from bamboohr_sdk.models.industry import Industry +from bamboohr_sdk.models.inline_object import InlineObject +from bamboohr_sdk.models.inline_object1 import InlineObject1 +from bamboohr_sdk.models.inline_object1_employees_inner import InlineObject1EmployeesInner +from bamboohr_sdk.models.inline_object1_status import InlineObject1Status +from bamboohr_sdk.models.inline_object2 import InlineObject2 +from bamboohr_sdk.models.inline_object2_inner import InlineObject2Inner from bamboohr_sdk.models.job_summary import JobSummary -from bamboohr_sdk.models.job_summary_department import JobSummaryDepartment -from bamboohr_sdk.models.job_summary_hiring_lead import JobSummaryHiringLead -from bamboohr_sdk.models.job_summary_location import JobSummaryLocation from bamboohr_sdk.models.job_summary_status import JobSummaryStatus -from bamboohr_sdk.models.json_directory_employee import JsonDirectoryEmployee -from bamboohr_sdk.models.json_directory_employee_fields_inner import JsonDirectoryEmployeeFieldsInner from bamboohr_sdk.models.json_employee_files import JsonEmployeeFiles from bamboohr_sdk.models.json_employee_files_categories_inner import JsonEmployeeFilesCategoriesInner -from bamboohr_sdk.models.json_employee_files_categories_inner_files_inner import JsonEmployeeFilesCategoriesInnerFilesInner +from bamboohr_sdk.models.json_employee_files_categories_inner_files_inner import ( + JsonEmployeeFilesCategoriesInnerFilesInner, +) from bamboohr_sdk.models.json_employee_files_employee import JsonEmployeeFilesEmployee +from bamboohr_sdk.models.legacy_report_field_map_response import LegacyReportFieldMapResponse +from bamboohr_sdk.models.legacy_report_field_map_response_mappings_inner import ( + LegacyReportFieldMapResponseMappingsInner, +) +from bamboohr_sdk.models.legacy_report_id_map_response import LegacyReportIDMapResponse +from bamboohr_sdk.models.legacy_report_id_map_response_mappings_inner import LegacyReportIDMapResponseMappingsInner +from bamboohr_sdk.models.levels_and_bands_column_map import LevelsAndBandsColumnMap +from bamboohr_sdk.models.levels_and_bands_group_status_counts import LevelsAndBandsGroupStatusCounts +from bamboohr_sdk.models.levels_and_bands_job_title_assignment import LevelsAndBandsJobTitleAssignment +from bamboohr_sdk.models.levels_and_bands_job_title_assignments_request import LevelsAndBandsJobTitleAssignmentsRequest +from bamboohr_sdk.models.levels_and_bands_pay_band_value import LevelsAndBandsPayBandValue +from bamboohr_sdk.models.levels_and_bands_upload_response import LevelsAndBandsUploadResponse from bamboohr_sdk.models.list_field_detail import ListFieldDetail from bamboohr_sdk.models.list_field_option import ListFieldOption from bamboohr_sdk.models.list_field_values import ListFieldValues from bamboohr_sdk.models.list_field_values_options_inner import ListFieldValuesOptionsInner +from bamboohr_sdk.models.list_field_values_xml import ListFieldValuesXml +from bamboohr_sdk.models.list_field_values_xml_option_inner import ListFieldValuesXmlOptionInner from bamboohr_sdk.models.list_users_response_value import ListUsersResponseValue from bamboohr_sdk.models.list_users_xml_response import ListUsersXmlResponse from bamboohr_sdk.models.list_users_xml_response_user_inner import ListUsersXmlResponseUserInner +from bamboohr_sdk.models.list_value_view_object import ListValueViewObject from bamboohr_sdk.models.location import Location +from bamboohr_sdk.models.location_response_object import LocationResponseObject +from bamboohr_sdk.models.location_response_object_address import LocationResponseObjectAddress +from bamboohr_sdk.models.location_response_object_address_country import LocationResponseObjectAddressCountry +from bamboohr_sdk.models.location_response_object_address_state import LocationResponseObjectAddressState from bamboohr_sdk.models.login_failure_response import LoginFailureResponse from bamboohr_sdk.models.login_failure_xml_response import LoginFailureXmlResponse from bamboohr_sdk.models.login_response import LoginResponse from bamboohr_sdk.models.login_xml_response import LoginXmlResponse from bamboohr_sdk.models.member_benefit_event import MemberBenefitEvent from bamboohr_sdk.models.member_benefit_event_coverages_inner import MemberBenefitEventCoveragesInner -from bamboohr_sdk.models.member_benefit_event_coverages_inner_events_inner import MemberBenefitEventCoveragesInnerEventsInner +from bamboohr_sdk.models.member_benefit_event_coverages_inner_events_inner import ( + MemberBenefitEventCoveragesInnerEventsInner, +) from bamboohr_sdk.models.member_benefit_events_response import MemberBenefitEventsResponse from bamboohr_sdk.models.member_benefits_get_permission_denied_response import MemberBenefitsGetPermissionDeniedResponse from bamboohr_sdk.models.member_benefits_get_success_response import MemberBenefitsGetSuccessResponse -from bamboohr_sdk.models.member_benefits_get_success_response_data_inner import MemberBenefitsGetSuccessResponseDataInner -from bamboohr_sdk.models.member_benefits_get_success_response_data_inner_plans_inner import MemberBenefitsGetSuccessResponseDataInnerPlansInner -from bamboohr_sdk.models.member_benefits_get_success_response_data_inner_plans_inner_date_ranges_inner import MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner +from bamboohr_sdk.models.member_benefits_get_success_response_data_inner import ( + MemberBenefitsGetSuccessResponseDataInner, +) +from bamboohr_sdk.models.member_benefits_get_success_response_data_inner_plans_inner import ( + MemberBenefitsGetSuccessResponseDataInnerPlansInner, +) +from bamboohr_sdk.models.member_benefits_get_success_response_data_inner_plans_inner_date_ranges_inner import ( + MemberBenefitsGetSuccessResponseDataInnerPlansInnerDateRangesInner, +) from bamboohr_sdk.models.member_benefits_get_success_response_links import MemberBenefitsGetSuccessResponseLinks -from bamboohr_sdk.models.member_benefits_get_success_response_links_next import MemberBenefitsGetSuccessResponseLinksNext -from bamboohr_sdk.models.member_benefits_get_success_response_links_prev import MemberBenefitsGetSuccessResponseLinksPrev +from bamboohr_sdk.models.member_benefits_get_success_response_links_next import ( + MemberBenefitsGetSuccessResponseLinksNext, +) +from bamboohr_sdk.models.member_benefits_get_success_response_links_prev import ( + MemberBenefitsGetSuccessResponseLinksPrev, +) from bamboohr_sdk.models.member_benefits_get_success_response_meta import MemberBenefitsGetSuccessResponseMeta from bamboohr_sdk.models.member_benefits_get_validation_error_response import MemberBenefitsGetValidationErrorResponse +from bamboohr_sdk.models.meta_company_properties_response import MetaCompanyPropertiesResponse +from bamboohr_sdk.models.meta_currency_type_item import MetaCurrencyTypeItem +from bamboohr_sdk.models.model1d1fc0f164cb51973a0206b8e2fb2d2d_request import ( + Model1d1fc0f164cb51973a0206b8e2fb2d2dRequest, +) +from bamboohr_sdk.models.model1d1fc0f164cb51973a0206b8e2fb2d2d_request_budget_breakdown_inner import ( + Model1d1fc0f164cb51973a0206b8e2fb2d2dRequestBudgetBreakdownInner, +) +from bamboohr_sdk.models.model1d64402ee192568adbd5e3179a91e6e2_request_inner import ( + Model1d64402ee192568adbd5e3179a91e6e2RequestInner, +) +from bamboohr_sdk.models.model1d64402ee192568adbd5e3179a91e6e2_request_inner_budget_allocations import ( + Model1d64402ee192568adbd5e3179a91e6e2RequestInnerBudgetAllocations, +) +from bamboohr_sdk.models.model288aa996aba16d7a495c62321ea999a9_request import ( + Model288aa996aba16d7a495c62321ea999a9Request, +) +from bamboohr_sdk.models.model288aa996aba16d7a495c62321ea999a9_request_sent_date_time import ( + Model288aa996aba16d7a495c62321ea999a9RequestSentDateTime, +) +from bamboohr_sdk.models.model3958585c861325ea7a2cd30a8c74f042_request import ( + Model3958585c861325ea7a2cd30a8c74f042Request, +) +from bamboohr_sdk.models.model89a5068111ec499135c7d6e9a53d5a30_request import ( + Model89a5068111ec499135c7d6e9a53d5a30Request, +) from bamboohr_sdk.models.model_field import ModelField +from bamboohr_sdk.models.monitor_field_list import MonitorFieldList +from bamboohr_sdk.models.monitor_field_list_fields_inner import MonitorFieldListFieldsInner +from bamboohr_sdk.models.new_hire_packet_gtky_answer_visibility_item import NewHirePacketGtkyAnswerVisibilityItem +from bamboohr_sdk.models.new_hire_packet_gtky_answer_visibility_request import NewHirePacketGtkyAnswerVisibilityRequest +from bamboohr_sdk.models.new_hire_packet_gtky_answer_visibility_response import ( + NewHirePacketGtkyAnswerVisibilityResponse, +) +from bamboohr_sdk.models.new_hire_packet_public_api import NewHirePacketPublicApi +from bamboohr_sdk.models.new_hire_packet_public_api_writable_body import NewHirePacketPublicApiWritableBody +from bamboohr_sdk.models.new_hire_packets_list_response import NewHirePacketsListResponse +from bamboohr_sdk.models.new_hire_widget_item import NewHireWidgetItem +from bamboohr_sdk.models.new_hire_widget_response import NewHireWidgetResponse from bamboohr_sdk.models.new_web_hook import NewWebHook +from bamboohr_sdk.models.onboarding_experience_public_api import OnboardingExperiencePublicApi +from bamboohr_sdk.models.onboarding_experiences_list_response import OnboardingExperiencesListResponse +from bamboohr_sdk.models.paged_location_response import PagedLocationResponse from bamboohr_sdk.models.paged_response import PagedResponse from bamboohr_sdk.models.pagination import Pagination from bamboohr_sdk.models.pagination_meta_data import PaginationMetaData +from bamboohr_sdk.models.patch_company_profile_company_information_request import ( + PatchCompanyProfileCompanyInformationRequest, +) +from bamboohr_sdk.models.patch_company_profile_company_information_request_address import ( + PatchCompanyProfileCompanyInformationRequestAddress, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status import PayGradesAndBandsConfigurationStatus +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status_job_titles import ( + PayGradesAndBandsConfigurationStatusJobTitles, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status_job_titles_warnings_inner import ( + PayGradesAndBandsConfigurationStatusJobTitlesWarningsInner, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status_levels import ( + PayGradesAndBandsConfigurationStatusLevels, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status_levels_errors_inner import ( + PayGradesAndBandsConfigurationStatusLevelsErrorsInner, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status_pay_bands import ( + PayGradesAndBandsConfigurationStatusPayBands, +) +from bamboohr_sdk.models.pay_grades_and_bands_configuration_status_review import ( + PayGradesAndBandsConfigurationStatusReview, +) +from bamboohr_sdk.models.pay_grades_and_bands_delete_groups_response import PayGradesAndBandsDeleteGroupsResponse +from bamboohr_sdk.models.pay_grades_and_bands_delete_hierarchy_group import PayGradesAndBandsDeleteHierarchyGroup +from bamboohr_sdk.models.pay_grades_and_bands_delete_hierarchy_job_title import PayGradesAndBandsDeleteHierarchyJobTitle +from bamboohr_sdk.models.pay_grades_and_bands_delete_hierarchy_level import PayGradesAndBandsDeleteHierarchyLevel +from bamboohr_sdk.models.pay_grades_and_bands_delete_level_response import PayGradesAndBandsDeleteLevelResponse +from bamboohr_sdk.models.pay_grades_and_bands_delete_response import PayGradesAndBandsDeleteResponse +from bamboohr_sdk.models.pay_grades_and_bands_job_title_assignments_group import ( + PayGradesAndBandsJobTitleAssignmentsGroup, +) +from bamboohr_sdk.models.pay_grades_and_bands_job_title_assignments_job_title import ( + PayGradesAndBandsJobTitleAssignmentsJobTitle, +) +from bamboohr_sdk.models.pay_grades_and_bands_job_title_assignments_level import ( + PayGradesAndBandsJobTitleAssignmentsLevel, +) +from bamboohr_sdk.models.pay_grades_and_bands_job_title_assignments_response import ( + PayGradesAndBandsJobTitleAssignmentsResponse, +) +from bamboohr_sdk.models.pay_grades_and_bands_job_title_employee import PayGradesAndBandsJobTitleEmployee +from bamboohr_sdk.models.pay_grades_and_bands_job_title_with_employees import PayGradesAndBandsJobTitleWithEmployees +from bamboohr_sdk.models.pay_grades_and_bands_level import PayGradesAndBandsLevel +from bamboohr_sdk.models.pay_grades_and_bands_level_job_title import PayGradesAndBandsLevelJobTitle +from bamboohr_sdk.models.pay_grades_and_bands_levels_group import PayGradesAndBandsLevelsGroup +from bamboohr_sdk.models.pay_grades_and_bands_levels_response import PayGradesAndBandsLevelsResponse +from bamboohr_sdk.models.pay_grades_and_bands_pay_band_job_title import PayGradesAndBandsPayBandJobTitle +from bamboohr_sdk.models.pay_grades_and_bands_pay_band_level import PayGradesAndBandsPayBandLevel +from bamboohr_sdk.models.pay_grades_and_bands_pay_bands_group import PayGradesAndBandsPayBandsGroup +from bamboohr_sdk.models.pay_grades_and_bands_pay_bands_response import PayGradesAndBandsPayBandsResponse +from bamboohr_sdk.models.pay_grades_and_bands_publish_response import PayGradesAndBandsPublishResponse +from bamboohr_sdk.models.pay_grades_and_bands_published_group import PayGradesAndBandsPublishedGroup +from bamboohr_sdk.models.pay_grades_and_bands_published_job_title import PayGradesAndBandsPublishedJobTitle +from bamboohr_sdk.models.pay_grades_and_bands_published_level import PayGradesAndBandsPublishedLevel +from bamboohr_sdk.models.pay_grades_and_bands_published_response import PayGradesAndBandsPublishedResponse +from bamboohr_sdk.models.pay_grades_and_bands_review_group import PayGradesAndBandsReviewGroup +from bamboohr_sdk.models.pay_grades_and_bands_review_job_title import PayGradesAndBandsReviewJobTitle +from bamboohr_sdk.models.pay_grades_and_bands_review_level import PayGradesAndBandsReviewLevel +from bamboohr_sdk.models.pay_grades_and_bands_review_response import PayGradesAndBandsReviewResponse +from bamboohr_sdk.models.pay_grades_and_bands_save_levels_response import PayGradesAndBandsSaveLevelsResponse +from bamboohr_sdk.models.pay_grades_and_bands_update_job_titles_response import PayGradesAndBandsUpdateJobTitlesResponse +from bamboohr_sdk.models.pay_grades_and_bands_update_level import PayGradesAndBandsUpdateLevel +from bamboohr_sdk.models.pay_grades_and_bands_update_levels_group import PayGradesAndBandsUpdateLevelsGroup +from bamboohr_sdk.models.pay_grades_and_bands_update_levels_request import PayGradesAndBandsUpdateLevelsRequest +from bamboohr_sdk.models.pay_grades_and_bands_update_pay_band_item import PayGradesAndBandsUpdatePayBandItem +from bamboohr_sdk.models.pay_grades_and_bands_update_pay_bands_response import PayGradesAndBandsUpdatePayBandsResponse from bamboohr_sdk.models.person_info_api_transformer import PersonInfoApiTransformer -from bamboohr_sdk.models.post_goal_comment_request import PostGoalCommentRequest -from bamboohr_sdk.models.post_goal_request import PostGoalRequest -from bamboohr_sdk.models.post_goal_request_milestones_inner import PostGoalRequestMilestonesInner from bamboohr_sdk.models.post_new_employee import PostNewEmployee from bamboohr_sdk.models.problem_details_response import ProblemDetailsResponse +from bamboohr_sdk.models.problem_details_response_v2 import ProblemDetailsResponseV2 from bamboohr_sdk.models.project_create_request_schema import ProjectCreateRequestSchema +from bamboohr_sdk.models.project_create_time_tracking_project_task_v1 import ProjectCreateTimeTrackingProjectTaskV1 +from bamboohr_sdk.models.project_create_time_tracking_project_v1 import ProjectCreateTimeTrackingProjectV1 +from bamboohr_sdk.models.project_create_time_tracking_project_v1_tasks_inner import ( + ProjectCreateTimeTrackingProjectV1TasksInner, +) from bamboohr_sdk.models.project_info_api_transformer import ProjectInfoApiTransformer from bamboohr_sdk.models.project_info_api_transformer_project import ProjectInfoApiTransformerProject -from bamboohr_sdk.models.project_info_api_transformer_task import ProjectInfoApiTransformerTask -from bamboohr_sdk.models.put_goal_comment_request import PutGoalCommentRequest -from bamboohr_sdk.models.put_goal_milestone_progress_request import PutGoalMilestoneProgressRequest -from bamboohr_sdk.models.put_goal_progress_request import PutGoalProgressRequest -from bamboohr_sdk.models.put_goal_shared_with_request import PutGoalSharedWithRequest -from bamboohr_sdk.models.put_goal_v11_request import PutGoalV11Request -from bamboohr_sdk.models.put_goal_v11_request_milestones_inner import PutGoalV11RequestMilestonesInner +from bamboohr_sdk.models.project_legacy_error_response_v1 import ProjectLegacyErrorResponseV1 +from bamboohr_sdk.models.project_legacy_error_response_v1_error import ProjectLegacyErrorResponseV1Error +from bamboohr_sdk.models.project_paginated_response_data_v1 import ProjectPaginatedResponseDataV1 +from bamboohr_sdk.models.project_paginated_response_data_v1_meta import ProjectPaginatedResponseDataV1Meta +from bamboohr_sdk.models.project_paginated_tasks_response_v1 import ProjectPaginatedTasksResponseV1 +from bamboohr_sdk.models.project_paginated_tasks_response_v1_links import ProjectPaginatedTasksResponseV1Links +from bamboohr_sdk.models.project_paginated_tasks_response_v1_meta import ProjectPaginatedTasksResponseV1Meta +from bamboohr_sdk.models.project_paginated_time_tracking_projects_response_v1 import ( + ProjectPaginatedTimeTrackingProjectsResponseV1, +) +from bamboohr_sdk.models.project_standard_api_error_response_v1 import ProjectStandardApiErrorResponseV1 +from bamboohr_sdk.models.project_time_tracking_project_v1 import ProjectTimeTrackingProjectV1 +from bamboohr_sdk.models.project_time_tracking_task_v1 import ProjectTimeTrackingTaskV1 +from bamboohr_sdk.models.project_update_time_tracking_project_task_v1 import ProjectUpdateTimeTrackingProjectTaskV1 +from bamboohr_sdk.models.project_update_time_tracking_project_v1 import ProjectUpdateTimeTrackingProjectV1 +from bamboohr_sdk.models.province_item import ProvinceItem +from bamboohr_sdk.models.public_custom_field_types_response import PublicCustomFieldTypesResponse +from bamboohr_sdk.models.public_list_values_custom_field_settings_response import ( + PublicListValuesCustomFieldSettingsResponse, +) +from bamboohr_sdk.models.public_list_values_custom_field_settings_response_values_inner import ( + PublicListValuesCustomFieldSettingsResponseValuesInner, +) +from bamboohr_sdk.models.put_company_industry_codes_request import PutCompanyIndustryCodesRequest +from bamboohr_sdk.models.put_company_profile_display_name_request import PutCompanyProfileDisplayNameRequest +from bamboohr_sdk.models.remove_cycle_admin_self_response import RemoveCycleAdminSelfResponse +from bamboohr_sdk.models.remove_total_rewards_employees_request import RemoveTotalRewardsEmployeesRequest from bamboohr_sdk.models.report import Report from bamboohr_sdk.models.reports_response import ReportsResponse from bamboohr_sdk.models.request import Request @@ -240,8 +635,66 @@ from bamboohr_sdk.models.request_custom_report_response import RequestCustomReportResponse from bamboohr_sdk.models.request_custom_report_response_employees_inner import RequestCustomReportResponseEmployeesInner from bamboohr_sdk.models.request_custom_report_response_fields_inner import RequestCustomReportResponseFieldsInner +from bamboohr_sdk.models.save_change_comm_template_response import SaveChangeCommTemplateResponse +from bamboohr_sdk.models.scheduling_create_schedule_request_v1 import SchedulingCreateScheduleRequestV1 +from bamboohr_sdk.models.scheduling_create_scheduling_shift_request_v1 import SchedulingCreateSchedulingShiftRequestV1 +from bamboohr_sdk.models.scheduling_publish_shifts_failure_v1 import SchedulingPublishShiftsFailureV1 +from bamboohr_sdk.models.scheduling_publish_shifts_request import SchedulingPublishShiftsRequest +from bamboohr_sdk.models.scheduling_publish_shifts_result_v1 import SchedulingPublishShiftsResultV1 +from bamboohr_sdk.models.scheduling_schedule_list_response_v1 import SchedulingScheduleListResponseV1 +from bamboohr_sdk.models.scheduling_schedule_list_response_v1_links import SchedulingScheduleListResponseV1Links +from bamboohr_sdk.models.scheduling_schedule_list_response_v1_meta import SchedulingScheduleListResponseV1Meta +from bamboohr_sdk.models.scheduling_schedule_v1 import SchedulingScheduleV1 +from bamboohr_sdk.models.scheduling_scheduling_shift_assessment_v1 import SchedulingSchedulingShiftAssessmentV1 +from bamboohr_sdk.models.scheduling_scheduling_shift_assessment_violation_v1 import ( + SchedulingSchedulingShiftAssessmentViolationV1, +) +from bamboohr_sdk.models.scheduling_scheduling_shift_v1 import SchedulingSchedulingShiftV1 +from bamboohr_sdk.models.scheduling_shift_assessment_list_response_v1 import SchedulingShiftAssessmentListResponseV1 +from bamboohr_sdk.models.scheduling_shift_assessment_list_response_v1_meta import ( + SchedulingShiftAssessmentListResponseV1Meta, +) +from bamboohr_sdk.models.scheduling_shift_list_response_v1 import SchedulingShiftListResponseV1 +from bamboohr_sdk.models.scheduling_shift_list_response_v1_links import SchedulingShiftListResponseV1Links +from bamboohr_sdk.models.scheduling_shift_list_response_v1_links_next import SchedulingShiftListResponseV1LinksNext +from bamboohr_sdk.models.scheduling_shift_list_response_v1_links_prev import SchedulingShiftListResponseV1LinksPrev +from bamboohr_sdk.models.scheduling_shift_list_response_v1_meta import SchedulingShiftListResponseV1Meta +from bamboohr_sdk.models.scheduling_timezone_list_response_v1 import SchedulingTimezoneListResponseV1 +from bamboohr_sdk.models.scheduling_timezone_list_response_v1_meta import SchedulingTimezoneListResponseV1Meta +from bamboohr_sdk.models.scheduling_timezone_v1 import SchedulingTimezoneV1 +from bamboohr_sdk.models.scheduling_update_schedule_request_v1 import SchedulingUpdateScheduleRequestV1 +from bamboohr_sdk.models.scheduling_update_scheduling_shift_request_v1 import SchedulingUpdateSchedulingShiftRequestV1 +from bamboohr_sdk.models.send_employee_verification_lifecycle_email_by_user_request import ( + SendEmployeeVerificationLifecycleEmailByUserRequest, +) +from bamboohr_sdk.models.send_recommendations_response import SendRecommendationsResponse from bamboohr_sdk.models.set_break_policy_employees_request import SetBreakPolicyEmployeesRequest +from bamboohr_sdk.models.set_total_rewards_custom_disclaimer_request import SetTotalRewardsCustomDisclaimerRequest +from bamboohr_sdk.models.set_total_rewards_onboarding_step_request import SetTotalRewardsOnboardingStepRequest from bamboohr_sdk.models.share_options_response import ShareOptionsResponse +from bamboohr_sdk.models.shift_differential_create_time_tracking_shift_differential_v1 import ( + ShiftDifferentialCreateTimeTrackingShiftDifferentialV1, +) +from bamboohr_sdk.models.shift_differential_create_time_tracking_shift_differential_v1_times_inner import ( + ShiftDifferentialCreateTimeTrackingShiftDifferentialV1TimesInner, +) +from bamboohr_sdk.models.shift_differential_paginated_response_data_v1 import ShiftDifferentialPaginatedResponseDataV1 +from bamboohr_sdk.models.shift_differential_paginated_response_data_v1_meta import ( + ShiftDifferentialPaginatedResponseDataV1Meta, +) +from bamboohr_sdk.models.shift_differential_paginated_time_tracking_shift_differentials_response_v1 import ( + ShiftDifferentialPaginatedTimeTrackingShiftDifferentialsResponseV1, +) +from bamboohr_sdk.models.shift_differential_time_tracking_shift_differential_time_v1 import ( + ShiftDifferentialTimeTrackingShiftDifferentialTimeV1, +) +from bamboohr_sdk.models.shift_differential_time_tracking_shift_differential_v1 import ( + ShiftDifferentialTimeTrackingShiftDifferentialV1, +) +from bamboohr_sdk.models.shift_differential_update_time_tracking_shift_differential_v1 import ( + ShiftDifferentialUpdateTimeTrackingShiftDifferentialV1, +) +from bamboohr_sdk.models.standard_api_error_response import StandardApiErrorResponse from bamboohr_sdk.models.state import State from bamboohr_sdk.models.state_province_response_schema import StateProvinceResponseSchema from bamboohr_sdk.models.state_province_schema import StateProvinceSchema @@ -263,66 +716,246 @@ from bamboohr_sdk.models.time_off_request_dates_inner import TimeOffRequestDatesInner from bamboohr_sdk.models.time_off_request_notes_inner import TimeOffRequestNotesInner from bamboohr_sdk.models.time_off_types_and_default_hours import TimeOffTypesAndDefaultHours -from bamboohr_sdk.models.time_off_types_and_default_hours_default_hours_inner import TimeOffTypesAndDefaultHoursDefaultHoursInner -from bamboohr_sdk.models.time_off_types_and_default_hours_time_off_types_inner import TimeOffTypesAndDefaultHoursTimeOffTypesInner -from bamboohr_sdk.models.time_tracking_break_policy_employee_collection_v1_inner import TimeTrackingBreakPolicyEmployeeCollectionV1Inner +from bamboohr_sdk.models.time_off_types_and_default_hours_default_hours_inner import ( + TimeOffTypesAndDefaultHoursDefaultHoursInner, +) +from bamboohr_sdk.models.time_off_types_and_default_hours_time_off_types_inner import ( + TimeOffTypesAndDefaultHoursTimeOffTypesInner, +) +from bamboohr_sdk.models.time_tracking_break_policy_employee_collection_v1_inner import ( + TimeTrackingBreakPolicyEmployeeCollectionV1Inner, +) +from bamboohr_sdk.models.time_tracking_break_policy_suggestions_response_v1 import ( + TimeTrackingBreakPolicySuggestionsResponseV1, +) +from bamboohr_sdk.models.time_tracking_break_policy_suggestions_response_v1_suggested_policies_inner import ( + TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner, +) +from bamboohr_sdk.models.time_tracking_break_policy_suggestions_response_v1_suggested_policies_inner_breaks_inner import ( + TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner, +) from bamboohr_sdk.models.time_tracking_bulk_response_schema import TimeTrackingBulkResponseSchema from bamboohr_sdk.models.time_tracking_bulk_response_schema_response import TimeTrackingBulkResponseSchemaResponse -from bamboohr_sdk.models.time_tracking_create_or_update_time_tracking_break_without_policy_v1 import TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1 -from bamboohr_sdk.models.time_tracking_create_time_tracking_break_policy_v1 import TimeTrackingCreateTimeTrackingBreakPolicyV1 +from bamboohr_sdk.models.time_tracking_bulk_upsert_employee_time_tracking_data_accepted_v1 import ( + TimeTrackingBulkUpsertEmployeeTimeTrackingDataAcceptedV1, +) +from bamboohr_sdk.models.time_tracking_bulk_upsert_employee_time_tracking_data_record_v1 import ( + TimeTrackingBulkUpsertEmployeeTimeTrackingDataRecordV1, +) +from bamboohr_sdk.models.time_tracking_clock_entry_location_v1 import TimeTrackingClockEntryLocationV1 +from bamboohr_sdk.models.time_tracking_clock_entry_paginated_response_data_v1 import ( + TimeTrackingClockEntryPaginatedResponseDataV1, +) +from bamboohr_sdk.models.time_tracking_clock_entry_paginated_response_data_v1_meta import ( + TimeTrackingClockEntryPaginatedResponseDataV1Meta, +) +from bamboohr_sdk.models.time_tracking_clock_entry_v1 import TimeTrackingClockEntryV1 +from bamboohr_sdk.models.time_tracking_configuration_paginated_response_data_v1 import ( + TimeTrackingConfigurationPaginatedResponseDataV1, +) +from bamboohr_sdk.models.time_tracking_configuration_paginated_response_data_v1_links import ( + TimeTrackingConfigurationPaginatedResponseDataV1Links, +) +from bamboohr_sdk.models.time_tracking_configuration_paginated_response_data_v1_links_next import ( + TimeTrackingConfigurationPaginatedResponseDataV1LinksNext, +) +from bamboohr_sdk.models.time_tracking_configuration_paginated_response_data_v1_links_prev import ( + TimeTrackingConfigurationPaginatedResponseDataV1LinksPrev, +) +from bamboohr_sdk.models.time_tracking_configuration_paginated_response_data_v1_meta import ( + TimeTrackingConfigurationPaginatedResponseDataV1Meta, +) +from bamboohr_sdk.models.time_tracking_create_clock_in_v1 import TimeTrackingCreateClockInV1 +from bamboohr_sdk.models.time_tracking_create_clock_out_v1 import TimeTrackingCreateClockOutV1 +from bamboohr_sdk.models.time_tracking_create_or_update_time_tracking_break_without_policy_v1 import ( + TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1, +) +from bamboohr_sdk.models.time_tracking_create_time_tracking_break_policy_v1 import ( + TimeTrackingCreateTimeTrackingBreakPolicyV1, +) from bamboohr_sdk.models.time_tracking_create_time_tracking_break_v1 import TimeTrackingCreateTimeTrackingBreakV1 +from bamboohr_sdk.models.time_tracking_create_time_tracking_configuration_v1 import ( + TimeTrackingCreateTimeTrackingConfigurationV1, +) from bamboohr_sdk.models.time_tracking_delete_response_schema import TimeTrackingDeleteResponseSchema +from bamboohr_sdk.models.time_tracking_employee_enrollment_paginated_response_data_v1 import ( + TimeTrackingEmployeeEnrollmentPaginatedResponseDataV1, +) +from bamboohr_sdk.models.time_tracking_employee_time_tracking_data_v1 import TimeTrackingEmployeeTimeTrackingDataV1 +from bamboohr_sdk.models.time_tracking_hour_entry_paginated_response_data_v1 import ( + TimeTrackingHourEntryPaginatedResponseDataV1, +) +from bamboohr_sdk.models.time_tracking_hour_entry_v1 import TimeTrackingHourEntryV1 from bamboohr_sdk.models.time_tracking_id_response_schema import TimeTrackingIdResponseSchema -from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1 import TimeTrackingOffsetPaginatedResponseDataV1 -from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1_links import TimeTrackingOffsetPaginatedResponseDataV1Links -from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1_links_next import TimeTrackingOffsetPaginatedResponseDataV1LinksNext -from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1_links_prev import TimeTrackingOffsetPaginatedResponseDataV1LinksPrev -from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1_meta import TimeTrackingOffsetPaginatedResponseDataV1Meta -from bamboohr_sdk.models.time_tracking_paginated_break_assessments_response_v1 import TimeTrackingPaginatedBreakAssessmentsResponseV1 -from bamboohr_sdk.models.time_tracking_paginated_break_policies_response_v1 import TimeTrackingPaginatedBreakPoliciesResponseV1 -from bamboohr_sdk.models.time_tracking_paginated_break_policy_employees_response_v1 import TimeTrackingPaginatedBreakPolicyEmployeesResponseV1 +from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1 import ( + TimeTrackingOffsetPaginatedResponseDataV1, +) +from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1_links import ( + TimeTrackingOffsetPaginatedResponseDataV1Links, +) +from bamboohr_sdk.models.time_tracking_offset_paginated_response_data_v1_meta import ( + TimeTrackingOffsetPaginatedResponseDataV1Meta, +) +from bamboohr_sdk.models.time_tracking_page_paginated_response_data_v1 import TimeTrackingPagePaginatedResponseDataV1 +from bamboohr_sdk.models.time_tracking_paginated_break_assessments_response_v1 import ( + TimeTrackingPaginatedBreakAssessmentsResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_break_policies_response_v1 import ( + TimeTrackingPaginatedBreakPoliciesResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_break_policy_employees_response_v1 import ( + TimeTrackingPaginatedBreakPolicyEmployeesResponseV1, +) from bamboohr_sdk.models.time_tracking_paginated_breaks_response_v1 import TimeTrackingPaginatedBreaksResponseV1 -from bamboohr_sdk.models.time_tracking_project_with_tasks_and_employee_ids import TimeTrackingProjectWithTasksAndEmployeeIds +from bamboohr_sdk.models.time_tracking_paginated_clock_entries_response_v1 import ( + TimeTrackingPaginatedClockEntriesResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_employee_time_tracking_data_response_v1 import ( + TimeTrackingPaginatedEmployeeTimeTrackingDataResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_hour_entries_response_v1 import ( + TimeTrackingPaginatedHourEntriesResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_time_tracking_configurations_response_v1 import ( + TimeTrackingPaginatedTimeTrackingConfigurationsResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_time_tracking_kiosks_response_v1 import ( + TimeTrackingPaginatedTimeTrackingKiosksResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_time_tracking_time_clocks_response_v1 import ( + TimeTrackingPaginatedTimeTrackingTimeClocksResponseV1, +) +from bamboohr_sdk.models.time_tracking_paginated_timesheets_response_v1 import TimeTrackingPaginatedTimesheetsResponseV1 +from bamboohr_sdk.models.time_tracking_paginated_timesheets_response_v1_meta import ( + TimeTrackingPaginatedTimesheetsResponseV1Meta, +) +from bamboohr_sdk.models.time_tracking_project_with_tasks_and_employee_ids import ( + TimeTrackingProjectWithTasksAndEmployeeIds, +) from bamboohr_sdk.models.time_tracking_record import TimeTrackingRecord from bamboohr_sdk.models.time_tracking_record_schema import TimeTrackingRecordSchema -from bamboohr_sdk.models.time_tracking_record_schema_project import TimeTrackingRecordSchemaProject -from bamboohr_sdk.models.time_tracking_record_schema_project_task import TimeTrackingRecordSchemaProjectTask -from bamboohr_sdk.models.time_tracking_record_schema_shift_differential import TimeTrackingRecordSchemaShiftDifferential -from bamboohr_sdk.models.time_tracking_sync_time_tracking_break_policy_v1 import TimeTrackingSyncTimeTrackingBreakPolicyV1 +from bamboohr_sdk.models.time_tracking_sync_time_tracking_break_policy_v1 import ( + TimeTrackingSyncTimeTrackingBreakPolicyV1, +) from bamboohr_sdk.models.time_tracking_task import TimeTrackingTask -from bamboohr_sdk.models.time_tracking_time_tracking_break_assessment_v1 import TimeTrackingTimeTrackingBreakAssessmentV1 -from bamboohr_sdk.models.time_tracking_time_tracking_break_assessment_violation_v1 import TimeTrackingTimeTrackingBreakAssessmentViolationV1 -from bamboohr_sdk.models.time_tracking_time_tracking_break_availability_v1 import TimeTrackingTimeTrackingBreakAvailabilityV1 +from bamboohr_sdk.models.time_tracking_time_tracking_break_assessment_v1 import ( + TimeTrackingTimeTrackingBreakAssessmentV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_break_assessment_violation_v1 import ( + TimeTrackingTimeTrackingBreakAssessmentViolationV1, +) +from bamboohr_sdk.models.time_tracking_time_tracking_break_availability_v1 import ( + TimeTrackingTimeTrackingBreakAvailabilityV1, +) from bamboohr_sdk.models.time_tracking_time_tracking_break_policy_v1 import TimeTrackingTimeTrackingBreakPolicyV1 -from bamboohr_sdk.models.time_tracking_time_tracking_break_policy_with_relations_v1 import TimeTrackingTimeTrackingBreakPolicyWithRelationsV1 +from bamboohr_sdk.models.time_tracking_time_tracking_break_policy_with_relations_v1 import ( + TimeTrackingTimeTrackingBreakPolicyWithRelationsV1, +) from bamboohr_sdk.models.time_tracking_time_tracking_break_v1 import TimeTrackingTimeTrackingBreakV1 -from bamboohr_sdk.models.time_tracking_update_time_tracking_break_policy_v1 import TimeTrackingUpdateTimeTrackingBreakPolicyV1 +from bamboohr_sdk.models.time_tracking_time_tracking_configuration_v1 import TimeTrackingTimeTrackingConfigurationV1 +from bamboohr_sdk.models.time_tracking_time_tracking_hour_entry_v1 import TimeTrackingTimeTrackingHourEntryV1 +from bamboohr_sdk.models.time_tracking_time_tracking_kiosk_v1 import TimeTrackingTimeTrackingKioskV1 +from bamboohr_sdk.models.time_tracking_time_tracking_time_clock_v1 import TimeTrackingTimeTrackingTimeClockV1 +from bamboohr_sdk.models.time_tracking_timesheet_v1 import TimeTrackingTimesheetV1 +from bamboohr_sdk.models.time_tracking_update_clock_entry_v1 import TimeTrackingUpdateClockEntryV1 +from bamboohr_sdk.models.time_tracking_update_employee_time_tracking_data_v1 import ( + TimeTrackingUpdateEmployeeTimeTrackingDataV1, +) +from bamboohr_sdk.models.time_tracking_update_time_tracking_break_policy_v1 import ( + TimeTrackingUpdateTimeTrackingBreakPolicyV1, +) from bamboohr_sdk.models.time_tracking_update_time_tracking_break_v1 import TimeTrackingUpdateTimeTrackingBreakV1 +from bamboohr_sdk.models.time_tracking_update_time_tracking_configuration_v1 import ( + TimeTrackingUpdateTimeTrackingConfigurationV1, +) +from bamboohr_sdk.models.time_tracking_update_time_tracking_kiosk_v1 import TimeTrackingUpdateTimeTrackingKioskV1 +from bamboohr_sdk.models.time_tracking_update_time_tracking_time_clock_v1 import ( + TimeTrackingUpdateTimeTrackingTimeClockV1, +) from bamboohr_sdk.models.timesheet_entry_info_api_transformer import TimesheetEntryInfoApiTransformer -from bamboohr_sdk.models.timesheet_entry_info_api_transformer_break_info import TimesheetEntryInfoApiTransformerBreakInfo +from bamboohr_sdk.models.timesheet_timesheet_daily_entry_v1 import TimesheetTimesheetDailyEntryV1 +from bamboohr_sdk.models.timesheet_timesheet_daily_summary_v1 import TimesheetTimesheetDailySummaryV1 from bamboohr_sdk.models.timezone_list_response import TimezoneListResponse from bamboohr_sdk.models.timezone_resource import TimezoneResource +from bamboohr_sdk.models.total_rewards_benefit_details_values import TotalRewardsBenefitDetailsValues +from bamboohr_sdk.models.total_rewards_benefit_section_values import TotalRewardsBenefitSectionValues +from bamboohr_sdk.models.total_rewards_calendar_section_values import TotalRewardsCalendarSectionValues +from bamboohr_sdk.models.total_rewards_comp_summary_values import TotalRewardsCompSummaryValues +from bamboohr_sdk.models.total_rewards_custom_disclaimer_info import TotalRewardsCustomDisclaimerInfo +from bamboohr_sdk.models.total_rewards_employee_statement import TotalRewardsEmployeeStatement +from bamboohr_sdk.models.total_rewards_equity_details_values import TotalRewardsEquityDetailsValues +from bamboohr_sdk.models.total_rewards_equity_estimated_valuation_values import ( + TotalRewardsEquityEstimatedValuationValues, +) +from bamboohr_sdk.models.total_rewards_equity_growth_chart_item import TotalRewardsEquityGrowthChartItem +from bamboohr_sdk.models.total_rewards_equity_growth_estimation import TotalRewardsEquityGrowthEstimation +from bamboohr_sdk.models.total_rewards_equity_section_values import TotalRewardsEquitySectionValues +from bamboohr_sdk.models.total_rewards_extra_pay_details_values import TotalRewardsExtraPayDetailsValues +from bamboohr_sdk.models.total_rewards_extra_pay_section_values import TotalRewardsExtraPaySectionValues +from bamboohr_sdk.models.total_rewards_holiday_value import TotalRewardsHolidayValue +from bamboohr_sdk.models.total_rewards_onboarding_step import TotalRewardsOnboardingStep +from bamboohr_sdk.models.total_rewards_overview_section_values import TotalRewardsOverviewSectionValues +from bamboohr_sdk.models.total_rewards_time_off_policy_value import TotalRewardsTimeOffPolicyValue +from bamboohr_sdk.models.total_rewards_timeline_item import TotalRewardsTimelineItem +from bamboohr_sdk.models.total_rewards_timeline_item_label import TotalRewardsTimelineItemLabel +from bamboohr_sdk.models.total_rewards_timeline_section_values import TotalRewardsTimelineSectionValues from bamboohr_sdk.models.training_category import TrainingCategory from bamboohr_sdk.models.training_record import TrainingRecord from bamboohr_sdk.models.training_record_map import TrainingRecordMap from bamboohr_sdk.models.training_record_type import TrainingRecordType from bamboohr_sdk.models.training_type import TrainingType from bamboohr_sdk.models.training_type_category import TrainingTypeCategory -from bamboohr_sdk.models.training_type_due_from_hire_date import TrainingTypeDueFromHireDate -from bamboohr_sdk.models.training_type_due_from_hire_date_one_of import TrainingTypeDueFromHireDateOneOf from bamboohr_sdk.models.transformed_api_employee_goal_details import TransformedApiEmployeeGoalDetails from bamboohr_sdk.models.transformed_api_employee_goal_details_goal import TransformedApiEmployeeGoalDetailsGoal from bamboohr_sdk.models.transformed_api_goal import TransformedApiGoal -from bamboohr_sdk.models.transformed_api_goal_actions import TransformedApiGoalActions from bamboohr_sdk.models.transformed_api_goal_milestones_inner import TransformedApiGoalMilestonesInner +from bamboohr_sdk.models.unarchive_custom_fields_request import UnarchiveCustomFieldsRequest +from bamboohr_sdk.models.unarchive_custom_fields_response import UnarchiveCustomFieldsResponse from bamboohr_sdk.models.unassign_employees_from_break_policy_request import UnassignEmployeesFromBreakPolicyRequest from bamboohr_sdk.models.update_applicant_status_request import UpdateApplicantStatusRequest from bamboohr_sdk.models.update_applicant_status_response import UpdateApplicantStatusResponse +from bamboohr_sdk.models.update_company_industry_codes400_response import UpdateCompanyIndustryCodes400Response +from bamboohr_sdk.models.update_company_industry_codes403_response import UpdateCompanyIndustryCodes403Response +from bamboohr_sdk.models.update_company_industry_codes404_response import UpdateCompanyIndustryCodes404Response +from bamboohr_sdk.models.update_company_industry_codes500_response import UpdateCompanyIndustryCodes500Response +from bamboohr_sdk.models.update_company_industry_codes_response import UpdateCompanyIndustryCodesResponse +from bamboohr_sdk.models.update_company_name_bad_request_response import UpdateCompanyNameBadRequestResponse +from bamboohr_sdk.models.update_company_name_bad_request_response_error import UpdateCompanyNameBadRequestResponseError +from bamboohr_sdk.models.update_company_name_forbidden_response import UpdateCompanyNameForbiddenResponse +from bamboohr_sdk.models.update_company_name_forbidden_response_error import UpdateCompanyNameForbiddenResponseError +from bamboohr_sdk.models.update_company_name_internal_error_response import UpdateCompanyNameInternalErrorResponse +from bamboohr_sdk.models.update_company_name_success_response import UpdateCompanyNameSuccessResponse +from bamboohr_sdk.models.update_compensation_benchmark_request import UpdateCompensationBenchmarkRequest +from bamboohr_sdk.models.update_compensation_benchmark_source_item import UpdateCompensationBenchmarkSourceItem +from bamboohr_sdk.models.update_compensation_benchmark_sources_request import UpdateCompensationBenchmarkSourcesRequest +from bamboohr_sdk.models.update_compensation_benchmark_sources_response import ( + UpdateCompensationBenchmarkSourcesResponse, +) from bamboohr_sdk.models.update_employee_training_record_request import UpdateEmployeeTrainingRecordRequest +from bamboohr_sdk.models.update_employee_verification_integration_request import ( + UpdateEmployeeVerificationIntegrationRequest, +) +from bamboohr_sdk.models.update_employee_verification_request import UpdateEmployeeVerificationRequest +from bamboohr_sdk.models.update_goal_comment_request import UpdateGoalCommentRequest +from bamboohr_sdk.models.update_goal_milestone_progress_request import UpdateGoalMilestoneProgressRequest +from bamboohr_sdk.models.update_goal_progress_request import UpdateGoalProgressRequest +from bamboohr_sdk.models.update_goal_sharing_request import UpdateGoalSharingRequest +from bamboohr_sdk.models.update_goal_v1 import UpdateGoalV1 +from bamboohr_sdk.models.update_goal_v11_request import UpdateGoalV11Request +from bamboohr_sdk.models.update_goal_v11_request_milestones_inner import UpdateGoalV11RequestMilestonesInner +from bamboohr_sdk.models.update_location_request import UpdateLocationRequest +from bamboohr_sdk.models.update_location_request_address import UpdateLocationRequestAddress +from bamboohr_sdk.models.update_pay_bands_request import UpdatePayBandsRequest from bamboohr_sdk.models.update_training_category_request import UpdateTrainingCategoryRequest from bamboohr_sdk.models.update_training_type_request import UpdateTrainingTypeRequest from bamboohr_sdk.models.update_training_type_request_category import UpdateTrainingTypeRequestCategory from bamboohr_sdk.models.update_webhook_bad_request_response import UpdateWebhookBadRequestResponse +from bamboohr_sdk.models.updated_compensation_benchmark import UpdatedCompensationBenchmark +from bamboohr_sdk.models.updated_compensation_benchmark_saved_benchmark import ( + UpdatedCompensationBenchmarkSavedBenchmark, +) +from bamboohr_sdk.models.upload_employee_photo_request1 import UploadEmployeePhotoRequest1 +from bamboohr_sdk.models.user_permission_data import UserPermissionData from bamboohr_sdk.models.web_hook_post_field_data_object import WebHookPostFieldDataObject from bamboohr_sdk.models.web_hook_post_field_page_data_object import WebHookPostFieldPageDataObject from bamboohr_sdk.models.web_hook_post_field_response_object import WebHookPostFieldResponseObject @@ -339,20 +972,28 @@ from bamboohr_sdk.models.webhook_log_rate_limit_response import WebhookLogRateLimitResponse from bamboohr_sdk.models.webhook_log_rate_limit_response_error import WebhookLogRateLimitResponseError from bamboohr_sdk.models.webhook_sub_error_property import WebhookSubErrorProperty -from bamboohr_sdk.models.webhook_sub_error_property_monitor_fields_inner import WebhookSubErrorPropertyMonitorFieldsInner -from bamboohr_sdk.models.webhook_sub_error_property_monitor_fields_inner_id import WebhookSubErrorPropertyMonitorFieldsInnerId -from bamboohr_sdk.models.webhook_sub_error_property_unknown_fields_inner import WebhookSubErrorPropertyUnknownFieldsInner -from bamboohr_sdk.models.webhook_sub_error_property_unknown_fields_inner_id import WebhookSubErrorPropertyUnknownFieldsInnerId +from bamboohr_sdk.models.webhook_sub_error_property_monitor_fields_inner import ( + WebhookSubErrorPropertyMonitorFieldsInner, +) +from bamboohr_sdk.models.webhook_sub_error_property_monitor_fields_inner_id import ( + WebhookSubErrorPropertyMonitorFieldsInnerId, +) +from bamboohr_sdk.models.webhook_sub_error_property_unknown_fields_inner import ( + WebhookSubErrorPropertyUnknownFieldsInner, +) +from bamboohr_sdk.models.webhook_sub_error_property_unknown_fields_inner_id import ( + WebhookSubErrorPropertyUnknownFieldsInnerId, +) from bamboohr_sdk.models.webhooks_list import WebhooksList from bamboohr_sdk.models.webhooks_list_webhooks_inner import WebhooksListWebhooksInner from bamboohr_sdk.models.whos_out_entry import WhosOutEntry -from bamboohr_sdk.models.xml_directory_employee import XmlDirectoryEmployee -from bamboohr_sdk.models.xml_directory_employee_employees import XmlDirectoryEmployeeEmployees -from bamboohr_sdk.models.xml_directory_employee_employees_employee_inner import XmlDirectoryEmployeeEmployeesEmployeeInner -from bamboohr_sdk.models.xml_directory_employee_employees_employee_inner_field_inner import XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner -from bamboohr_sdk.models.xml_directory_employee_fieldset import XmlDirectoryEmployeeFieldset -from bamboohr_sdk.models.xml_directory_employee_fieldset_field_inner import XmlDirectoryEmployeeFieldsetFieldInner +from bamboohr_sdk.models.whos_out_list_response_v1 import WhosOutListResponseV1 +from bamboohr_sdk.models.whos_out_list_response_v1_links import WhosOutListResponseV1Links +from bamboohr_sdk.models.whos_out_list_response_v1_links_next import WhosOutListResponseV1LinksNext +from bamboohr_sdk.models.whos_out_list_response_v1_links_prev import WhosOutListResponseV1LinksPrev +from bamboohr_sdk.models.whos_out_list_response_v1_meta import WhosOutListResponseV1Meta +from bamboohr_sdk.models.whos_out_person_v1 import WhosOutPersonV1 +from bamboohr_sdk.models.whos_out_v1 import WhosOutV1 from bamboohr_sdk.models.xml_employee_files import XmlEmployeeFiles from bamboohr_sdk.models.xml_employee_files_category_inner import XmlEmployeeFilesCategoryInner from bamboohr_sdk.models.xml_employee_files_category_inner_file_inner import XmlEmployeeFilesCategoryInnerFileInner - diff --git a/bamboohr_sdk/models/job_summary_location.py b/bamboohr_sdk/models/a05b6d5f564f805d688ff2c1e37c3990_request.py similarity index 51% rename from bamboohr_sdk/models/job_summary_location.py rename to bamboohr_sdk/models/a05b6d5f564f805d688ff2c1e37c3990_request.py index e8a3f83..deb6c5e 100644 --- a/bamboohr_sdk/models/job_summary_location.py +++ b/bamboohr_sdk/models/a05b6d5f564f805d688ff2c1e37c3990_request.py @@ -1,35 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class JobSummaryLocation(BaseModel): + +class A05b6d5f564f805d688ff2c1e37c3990Request(BaseModel): """ - Location information - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Location ID") - label: Optional[StrictStr] = Field(default=None, description="Location display name") - address: Optional[Dict[str, Any]] = Field(default=None, description="Full address of the location") - __properties: ClassVar[List[str]] = ["id", "label", "address"] + A05b6d5f564f805d688ff2c1e37c3990Request + """ + + template_id: StrictStr = Field(description="The ID of the template", alias="templateId") + assignee_employee_id: StrictStr = Field(description="The ID of the assignee employee", alias="assigneeEmployeeId") + approval_stage: StrictInt = Field(description="The current approval stage", alias="approvalStage") + __properties: ClassVar[list[str]] = ["templateId", "assigneeEmployeeId", "approvalStage"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +36,6 @@ class JobSummaryLocation(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of JobSummaryLocation from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of A05b6d5f564f805d688ff2c1e37c3990Request from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,19 +70,19 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of JobSummaryLocation from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of A05b6d5f564f805d688ff2c1e37c3990Request from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "label": obj.get("label"), - "address": obj.get("address") - }) + _obj = cls.model_validate( + { + "templateId": obj.get("templateId"), + "assigneeEmployeeId": obj.get("assigneeEmployeeId"), + "approvalStage": obj.get("approvalStage"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/post_goal_request_milestones_inner.py b/bamboohr_sdk/models/add_custom_field_list_value_request.py similarity index 59% rename from bamboohr_sdk/models/post_goal_request_milestones_inner.py rename to bamboohr_sdk/models/add_custom_field_list_value_request.py index 594d724..5a1d067 100644 --- a/bamboohr_sdk/models/post_goal_request_milestones_inner.py +++ b/bamboohr_sdk/models/add_custom_field_list_value_request.py @@ -1,33 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class PostGoalRequestMilestonesInner(BaseModel): + +class AddCustomFieldListValueRequest(BaseModel): + """ + AddCustomFieldListValueRequest """ - PostGoalRequestMilestonesInner - """ # noqa: E501 - title: Optional[StrictStr] = Field(default=None, description="The title of the milestone") - __properties: ClassVar[List[str]] = ["title"] + + option: StrictStr | None = Field(default=None, description="A single new list value.") + values: list[StrictStr | None] | None = Field(default=None, description="Multiple new list values.") + __properties: ClassVar[list[str]] = ["option", "values"] model_config = ConfigDict( populate_by_name=True, @@ -35,7 +35,6 @@ class PostGoalRequestMilestonesInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -46,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PostGoalRequestMilestonesInner from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of AddCustomFieldListValueRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -60,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,17 +69,13 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PostGoalRequestMilestonesInner from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of AddCustomFieldListValueRequest from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "title": obj.get("title") - }) + _obj = cls.model_validate({"option": obj.get("option"), "values": obj.get("values")}) return _obj - - diff --git a/bamboohr_sdk/models/add_custom_field_list_value_response.py b/bamboohr_sdk/models/add_custom_field_list_value_response.py new file mode 100644 index 0000000..90e182a --- /dev/null +++ b/bamboohr_sdk/models/add_custom_field_list_value_response.py @@ -0,0 +1,157 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +from typing import Any + +from pydantic import BaseModel, ConfigDict, ValidationError, field_validator +from typing_extensions import Self + +from bamboohr_sdk.models.add_custom_field_list_value_response_one_of_inner import ( + AddCustomFieldListValueResponseOneOfInner, +) +from bamboohr_sdk.models.list_value_view_object import ListValueViewObject + +ADDCUSTOMFIELDLISTVALUERESPONSE_ONE_OF_SCHEMAS = [ + "ListValueViewObject", + "List[AddCustomFieldListValueResponseOneOfInner]", +] + + +class AddCustomFieldListValueResponse(BaseModel): + """ + AddCustomFieldListValueResponse + """ + + # data type: ListValueViewObject + oneof_schema_1_validator: ListValueViewObject | None = None + # data type: List[AddCustomFieldListValueResponseOneOfInner] + oneof_schema_2_validator: list[AddCustomFieldListValueResponseOneOfInner] | None = None + actual_instance: ListValueViewObject | list[AddCustomFieldListValueResponseOneOfInner] | None = None + one_of_schemas: set[str] = {"ListValueViewObject", "List[AddCustomFieldListValueResponseOneOfInner]"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = AddCustomFieldListValueResponse.model_construct() + error_messages = [] + match = 0 + # validate data type: ListValueViewObject + if not isinstance(v, ListValueViewObject): + error_messages.append(f"Error! Input type `{type(v)}` is not `ListValueViewObject`") + else: + match += 1 + # validate data type: List[AddCustomFieldListValueResponseOneOfInner] + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when setting `actual_instance` in AddCustomFieldListValueResponse with oneOf schemas: ListValueViewObject, List[AddCustomFieldListValueResponseOneOfInner]. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in AddCustomFieldListValueResponse with oneOf schemas: ListValueViewObject, List[AddCustomFieldListValueResponseOneOfInner]. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: str | dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ListValueViewObject + try: + instance.actual_instance = ListValueViewObject.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into List[AddCustomFieldListValueResponseOneOfInner] + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into AddCustomFieldListValueResponse with oneOf schemas: ListValueViewObject, List[AddCustomFieldListValueResponseOneOfInner]. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into AddCustomFieldListValueResponse with oneOf schemas: ListValueViewObject, List[AddCustomFieldListValueResponseOneOfInner]. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict( + self, + ) -> dict[str, Any] | ListValueViewObject | list[AddCustomFieldListValueResponseOneOfInner] | None: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/bamboohr_sdk/models/time_tracking_record_schema_shift_differential.py b/bamboohr_sdk/models/add_custom_field_list_value_response_one_of_inner.py similarity index 54% rename from bamboohr_sdk/models/time_tracking_record_schema_shift_differential.py rename to bamboohr_sdk/models/add_custom_field_list_value_response_one_of_inner.py index ff69943..d3d1187 100644 --- a/bamboohr_sdk/models/time_tracking_record_schema_shift_differential.py +++ b/bamboohr_sdk/models/add_custom_field_list_value_response_one_of_inner.py @@ -1,34 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class TimeTrackingRecordSchemaShiftDifferential(BaseModel): + +class AddCustomFieldListValueResponseOneOfInner(BaseModel): + """ + AddCustomFieldListValueResponseOneOfInner """ - Shift differential information associated with this time tracking record - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Shift Differential information") - name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "name"] + + id: StrictStr | None = Field(default=None, description="The string list value ID.") + legacy_id: StrictInt | None = Field(default=None, description="The legacy numeric list value ID.", alias="legacyId") + display: StrictStr | None = Field(default=None, description="List value display name.") + __properties: ClassVar[list[str]] = ["id", "legacyId", "display"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +36,6 @@ class TimeTrackingRecordSchemaShiftDifferential(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of TimeTrackingRecordSchemaShiftDifferential from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of AddCustomFieldListValueResponseOneOfInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,18 +70,13 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TimeTrackingRecordSchemaShiftDifferential from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of AddCustomFieldListValueResponseOneOfInner from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name") - }) + _obj = cls.model_validate({"id": obj.get("id"), "legacyId": obj.get("legacyId"), "display": obj.get("display")}) return _obj - - diff --git a/bamboohr_sdk/models/add_cycle_admins_response.py b/bamboohr_sdk/models/add_cycle_admins_response.py new file mode 100644 index 0000000..78d77b0 --- /dev/null +++ b/bamboohr_sdk/models/add_cycle_admins_response.py @@ -0,0 +1,107 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + +from bamboohr_sdk.models.add_cycle_admins_response_added_inner import AddCycleAdminsResponseAddedInner +from bamboohr_sdk.models.add_cycle_admins_response_skipped_inner import AddCycleAdminsResponseSkippedInner + + +class AddCycleAdminsResponse(BaseModel): + """ + AddCycleAdminsResponse + """ + + added: list[AddCycleAdminsResponseAddedInner] | None = None + skipped: list[AddCycleAdminsResponseSkippedInner] | None = None + __properties: ClassVar[list[str]] = ["added", "skipped"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of AddCycleAdminsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in added (list) + _items = [] + if self.added: + for _item_added in self.added: + if _item_added: + _items.append(_item_added.to_dict()) + _dict["added"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in skipped (list) + _items = [] + if self.skipped: + for _item_skipped in self.skipped: + if _item_skipped: + _items.append(_item_skipped.to_dict()) + _dict["skipped"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of AddCycleAdminsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "added": [AddCycleAdminsResponseAddedInner.from_dict(_item) for _item in obj["added"]] + if obj.get("added") is not None + else None, + "skipped": [AddCycleAdminsResponseSkippedInner.from_dict(_item) for _item in obj["skipped"]] + if obj.get("skipped") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/json_directory_employee_fields_inner.py b/bamboohr_sdk/models/add_cycle_admins_response_added_inner.py similarity index 53% rename from bamboohr_sdk/models/json_directory_employee_fields_inner.py rename to bamboohr_sdk/models/add_cycle_admins_response_added_inner.py index 1687f87..8df4a4e 100644 --- a/bamboohr_sdk/models/json_directory_employee_fields_inner.py +++ b/bamboohr_sdk/models/add_cycle_admins_response_added_inner.py @@ -1,35 +1,35 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class JsonDirectoryEmployeeFieldsInner(BaseModel): + +class AddCycleAdminsResponseAddedInner(BaseModel): """ - JsonDirectoryEmployeeFieldsInner - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Field identifier used as the key in employee records.") - type: Optional[StrictStr] = Field(default=None, description="Field data type.") - name: Optional[StrictStr] = Field(default=None, description="Field display name.") - __properties: ClassVar[List[str]] = ["id", "type", "name"] + AddCycleAdminsResponseAddedInner + """ + + employee_id: StrictStr | None = Field( + default=None, description="The internal employee ID of the added cycle admin.", alias="employeeId" + ) + display_name: StrictStr | None = Field(default=None, alias="displayName") + __properties: ClassVar[list[str]] = ["employeeId", "displayName"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +37,6 @@ class JsonDirectoryEmployeeFieldsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +47,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of JsonDirectoryEmployeeFieldsInner from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of AddCycleAdminsResponseAddedInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,30 +61,28 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, exclude=excluded_fields, exclude_none=True, ) + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict["displayName"] = None + return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of JsonDirectoryEmployeeFieldsInner from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of AddCycleAdminsResponseAddedInner from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "type": obj.get("type"), - "name": obj.get("name") - }) + _obj = cls.model_validate({"employeeId": obj.get("employeeId"), "displayName": obj.get("displayName")}) return _obj - - diff --git a/bamboohr_sdk/models/data_request_aggregations_inner.py b/bamboohr_sdk/models/add_cycle_admins_response_skipped_inner.py similarity index 53% rename from bamboohr_sdk/models/data_request_aggregations_inner.py rename to bamboohr_sdk/models/add_cycle_admins_response_skipped_inner.py index cc5d9a6..ab68bf0 100644 --- a/bamboohr_sdk/models/data_request_aggregations_inner.py +++ b/bamboohr_sdk/models/add_cycle_admins_response_skipped_inner.py @@ -1,43 +1,44 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class DataRequestAggregationsInner(BaseModel): + +class AddCycleAdminsResponseSkippedInner(BaseModel): """ - DataRequestAggregationsInner - """ # noqa: E501 - var_field: Optional[StrictStr] = Field(default=None, alias="field") - aggregation: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["field", "aggregation"] - - @field_validator('aggregation') - def aggregation_validate_enum(cls, value): + AddCycleAdminsResponseSkippedInner + """ + + employee_id: StrictStr | None = Field( + default=None, description="The internal employee ID of the skipped employee.", alias="employeeId" + ) + reason: StrictStr | None = None + __properties: ClassVar[list[str]] = ["employeeId", "reason"] + + @field_validator("reason") + def reason_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['count', 'sum', 'avg', 'min', 'max']): - raise ValueError("must be one of enum values ('count', 'sum', 'avg', 'min', 'max')") + if value not in set(["ALREADY_ADMIN", "EMPLOYEE_NOT_FOUND", "FULL_ACCOUNT_ADMIN"]): + raise ValueError("must be one of enum values ('ALREADY_ADMIN', 'EMPLOYEE_NOT_FOUND', 'FULL_ACCOUNT_ADMIN')") return value model_config = ConfigDict( @@ -46,7 +47,6 @@ def aggregation_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -57,11 +57,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DataRequestAggregationsInner from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of AddCycleAdminsResponseSkippedInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -71,8 +71,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -82,18 +81,13 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DataRequestAggregationsInner from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of AddCycleAdminsResponseSkippedInner from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "field": obj.get("field"), - "aggregation": obj.get("aggregation") - }) + _obj = cls.model_validate({"employeeId": obj.get("employeeId"), "reason": obj.get("reason")}) return _obj - - diff --git a/bamboohr_sdk/models/add_total_rewards_employees_request.py b/bamboohr_sdk/models/add_total_rewards_employees_request.py new file mode 100644 index 0000000..fbc11e2 --- /dev/null +++ b/bamboohr_sdk/models/add_total_rewards_employees_request.py @@ -0,0 +1,82 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing_extensions import Self + + +class AddTotalRewardsEmployeesRequest(BaseModel): + """ + AddTotalRewardsEmployeesRequest + """ + + employee_ids: list[StrictInt | None] = Field( + description="List of internal employee IDs to add to Total Rewards.", alias="employeeIds" + ) + __properties: ClassVar[list[str]] = ["employeeIds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of AddTotalRewardsEmployeesRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of AddTotalRewardsEmployeesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"employeeIds": obj.get("employeeIds")}) + return _obj diff --git a/bamboohr_sdk/models/adjust_time_off_balance.py b/bamboohr_sdk/models/adjust_time_off_balance.py index 365237d..535e91b 100644 --- a/bamboohr_sdk/models/adjust_time_off_balance.py +++ b/bamboohr_sdk/models/adjust_time_off_balance.py @@ -1,37 +1,41 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set from typing_extensions import Self + class AdjustTimeOffBalance(BaseModel): """ AdjustTimeOffBalance - """ # noqa: E501 - var_date: date = Field(description="The date the adjustment should be added in history. Should be in ISO8601 date format (YYYY-MM-DD).", alias="date") - time_off_type_id: StrictInt = Field(description="The ID of the time off type to add a balance adjustment for.", alias="timeOffTypeId") - amount: Union[StrictFloat, StrictInt] = Field(description="The number of hours/days to adjust the balance by.") - note: Optional[StrictStr] = Field(default=None, description="This is an optional note to show in history.") - __properties: ClassVar[List[str]] = ["date", "timeOffTypeId", "amount", "note"] + """ + + var_date: date = Field( + description="The date the adjustment should be added in history. Should be in ISO8601 date format (YYYY-MM-DD).", + alias="date", + ) + time_off_type_id: StrictInt = Field( + description="The ID of the time off type to add a balance adjustment for.", alias="timeOffTypeId" + ) + amount: StrictFloat | StrictInt = Field(description="The number of hours/days to adjust the balance by.") + note: StrictStr | None = Field(default=None, description="This is an optional note to show in history.") + __properties: ClassVar[list[str]] = ["date", "timeOffTypeId", "amount", "note"] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +43,6 @@ class AdjustTimeOffBalance(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,11 +53,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of AdjustTimeOffBalance from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -64,8 +67,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of AdjustTimeOffBalance from a dict""" if obj is None: return None @@ -83,12 +85,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "date": obj.get("date"), - "timeOffTypeId": obj.get("timeOffTypeId"), - "amount": obj.get("amount"), - "note": obj.get("note") - }) + _obj = cls.model_validate( + { + "date": obj.get("date"), + "timeOffTypeId": obj.get("timeOffTypeId"), + "amount": obj.get("amount"), + "note": obj.get("note"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/adjust_time_tracking_request_schema.py b/bamboohr_sdk/models/adjust_time_tracking_request_schema.py index 3522173..ea14529 100644 --- a/bamboohr_sdk/models/adjust_time_tracking_request_schema.py +++ b/bamboohr_sdk/models/adjust_time_tracking_request_schema.py @@ -1,38 +1,50 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set from typing_extensions import Self + class AdjustTimeTrackingRequestSchema(BaseModel): """ Schema for adjust time tracking request body - """ # noqa: E501 - time_tracking_id: StrictStr = Field(description="The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID).", alias="timeTrackingId") - hours_worked: Union[StrictFloat, StrictInt] = Field(description="The updated number of hours worked. e.g. if Employee A worked 8.0 hours originally and decided they only worked 6.0, please send 6.0 here not -2.0.", alias="hoursWorked") - project_id: Optional[StrictInt] = Field(default=None, description="ID of the project associated with this time tracking record", alias="projectId") - task_id: Optional[StrictInt] = Field(default=None, description="ID of the task associated with this time tracking record", alias="taskId") - shift_differential_id: Optional[StrictInt] = Field(default=None, description="ID of the shift differential associated with this time tracking record", alias="shiftDifferentialId") - holiday_id: Optional[StrictInt] = Field(default=None, description="ID of the holiday associated with this time tracking record", alias="holidayId") - __properties: ClassVar[List[str]] = ["timeTrackingId", "hoursWorked", "projectId", "taskId", "shiftDifferentialId", "holidayId"] + """ + + time_tracking_id: StrictStr = Field( + description="The time tracking id is the id that was used to track the record up to 36 characters in length. (i.e. UUID).", + alias="timeTrackingId", + ) + hours_worked: StrictFloat | StrictInt = Field( + description="The updated number of hours worked. e.g. if Employee A worked 8.0 hours originally and decided they only worked 6.0, please send 6.0 here not -2.0.", + alias="hoursWorked", + ) + project_id: StrictInt | None = Field(default=None, alias="projectId") + task_id: StrictInt | None = Field(default=None, alias="taskId") + shift_differential_id: StrictInt | None = Field(default=None, alias="shiftDifferentialId") + holiday_id: StrictInt | None = Field(default=None, alias="holidayId") + __properties: ClassVar[list[str]] = [ + "timeTrackingId", + "hoursWorked", + "projectId", + "taskId", + "shiftDifferentialId", + "holidayId", + ] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +52,6 @@ class AdjustTimeTrackingRequestSchema(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,11 +62,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of AdjustTimeTrackingRequestSchema from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -65,8 +76,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,27 +86,27 @@ def to_dict(self) -> Dict[str, Any]: # set to None if project_id (nullable) is None # and model_fields_set contains the field if self.project_id is None and "project_id" in self.model_fields_set: - _dict['projectId'] = None + _dict["projectId"] = None # set to None if task_id (nullable) is None # and model_fields_set contains the field if self.task_id is None and "task_id" in self.model_fields_set: - _dict['taskId'] = None + _dict["taskId"] = None # set to None if shift_differential_id (nullable) is None # and model_fields_set contains the field if self.shift_differential_id is None and "shift_differential_id" in self.model_fields_set: - _dict['shiftDifferentialId'] = None + _dict["shiftDifferentialId"] = None # set to None if holiday_id (nullable) is None # and model_fields_set contains the field if self.holiday_id is None and "holiday_id" in self.model_fields_set: - _dict['holidayId'] = None + _dict["holidayId"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of AdjustTimeTrackingRequestSchema from a dict""" if obj is None: return None @@ -104,14 +114,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "timeTrackingId": obj.get("timeTrackingId"), - "hoursWorked": obj.get("hoursWorked"), - "projectId": obj.get("projectId"), - "taskId": obj.get("taskId"), - "shiftDifferentialId": obj.get("shiftDifferentialId"), - "holidayId": obj.get("holidayId") - }) + _obj = cls.model_validate( + { + "timeTrackingId": obj.get("timeTrackingId"), + "hoursWorked": obj.get("hoursWorked"), + "projectId": obj.get("projectId"), + "taskId": obj.get("taskId"), + "shiftDifferentialId": obj.get("shiftDifferentialId"), + "holidayId": obj.get("holidayId"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/alert_configuration_v1.py b/bamboohr_sdk/models/alert_configuration_v1.py new file mode 100644 index 0000000..4bf5af3 --- /dev/null +++ b/bamboohr_sdk/models/alert_configuration_v1.py @@ -0,0 +1,266 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import datetime +from typing import Annotated, Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing_extensions import Self + + +class AlertConfigurationV1(BaseModel): + """ + A single alert the company has configured: the alert template it is based on, when it runs, who receives it, and any customizations. + """ + + id: StrictInt | None = Field(default=None, description="The unique identifier of this alert configuration.") + bamboo_alert_id: StrictInt | None = Field( + default=None, + description="The identifier of the alert template this configuration is based on. Resolve template identifiers to a name and group with **List Alert Templates** (`list-alert-templates`), which exposes the same identifier as `id`.", + alias="bambooAlertId", + ) + schedule: StrictStr | None = Field(default=None, description="The schedule for the company alert.") + due_within: Annotated[int, Field(le=32767, strict=True)] | None = Field(default=None, alias="dueWithin") + due_interval: StrictStr | None = Field(default=None, alias="dueInterval") + send_to_employee: StrictBool | None = Field( + default=None, description="Whether the alert should be sent to employees.", alias="sendToEmployee" + ) + send_to_manager: StrictBool | None = Field( + default=None, description="Whether the alert should be sent to managers.", alias="sendToManager" + ) + send_to_admin: StrictBool | None = Field( + default=None, description="Whether the alert should be sent to admins.", alias="sendToAdmin" + ) + editor_user_id: StrictInt | None = Field(default=None, alias="editorUserId") + last_edited: datetime | None = Field(default=None, alias="lastEdited") + custom_message: StrictStr | None = Field(default=None, alias="customMessage") + custom_subject: StrictStr | None = Field(default=None, alias="customSubject") + group_by: StrictStr | None = Field(default=None, alias="groupBy") + limit_training_to_required: StrictBool | None = Field( + default=None, + description="Whether the training should be limited to required training.", + alias="limitTrainingToRequired", + ) + run_at_time: StrictStr | None = Field(default=None, alias="runAtTime") + run_at_time_zone: StrictStr | None = Field(default=None, alias="runAtTimeZone") + include_position: StrictBool | None = Field( + default=None, description="Whether the alert should include position.", alias="includePosition" + ) + include_location: StrictBool | None = Field( + default=None, description="Whether the alert should include location.", alias="includeLocation" + ) + additional_recipient_emails: list[StrictStr] | None = Field( + default=None, + description="Never persisted by this API. A `GET`, both the list and the single-read, always returns an empty array, while a create or replace response echoes back whatever was submitted; that echo does not mean the value was stored.", + alias="additionalRecipientEmails", + ) + employee_ids: list[StrictStr] | None = Field( + default=None, + description="Internal employee IDs. Never persisted by this API: a read always returns an empty array, while a create or replace response echoes back whatever was submitted; that echo does not mean the value was stored.", + alias="employeeIds", + ) + list_value_ids: list[StrictInt] | None = Field( + default=None, + description="Never persisted by this API. A `GET`, both the list and the single-read, always returns an empty array, while a create or replace response echoes back whatever was submitted; that echo does not mean the value was stored. Use `filterListValueIds` to scope an alert by list value.", + alias="listValueIds", + ) + filter_list_value_ids: list[StrictInt] | None = Field( + default=None, + description="List value IDs the alert is scoped to, such as specific departments or locations. An empty array means the alert is not scoped by list value.", + alias="filterListValueIds", + ) + user_ids: list[StrictInt] | None = Field( + default=None, + description="Never persisted by this API. A `GET`, both the list and the single-read, always returns an empty array, while a create or replace response echoes back whatever was submitted; that echo does not mean the value was stored.", + alias="userIds", + ) + __properties: ClassVar[list[str]] = [ + "id", + "bambooAlertId", + "schedule", + "dueWithin", + "dueInterval", + "sendToEmployee", + "sendToManager", + "sendToAdmin", + "editorUserId", + "lastEdited", + "customMessage", + "customSubject", + "groupBy", + "limitTrainingToRequired", + "runAtTime", + "runAtTimeZone", + "includePosition", + "includeLocation", + "additionalRecipientEmails", + "employeeIds", + "listValueIds", + "filterListValueIds", + "userIds", + ] + + @field_validator("schedule") + def schedule_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["daily", "weekly", "monthly", "quarterly"]): + raise ValueError("must be one of enum values ('daily', 'weekly', 'monthly', 'quarterly')") + return value + + @field_validator("due_interval") + def due_interval_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["days", "weeks", "months"]): + raise ValueError("must be one of enum values ('days', 'weeks', 'months')") + return value + + @field_validator("group_by") + def group_by_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["department", "division", "location", "jobTitle"]): + raise ValueError("must be one of enum values ('department', 'division', 'location', 'jobTitle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of AlertConfigurationV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if due_within (nullable) is None + # and model_fields_set contains the field + if self.due_within is None and "due_within" in self.model_fields_set: + _dict["dueWithin"] = None + + # set to None if due_interval (nullable) is None + # and model_fields_set contains the field + if self.due_interval is None and "due_interval" in self.model_fields_set: + _dict["dueInterval"] = None + + # set to None if editor_user_id (nullable) is None + # and model_fields_set contains the field + if self.editor_user_id is None and "editor_user_id" in self.model_fields_set: + _dict["editorUserId"] = None + + # set to None if last_edited (nullable) is None + # and model_fields_set contains the field + if self.last_edited is None and "last_edited" in self.model_fields_set: + _dict["lastEdited"] = None + + # set to None if custom_message (nullable) is None + # and model_fields_set contains the field + if self.custom_message is None and "custom_message" in self.model_fields_set: + _dict["customMessage"] = None + + # set to None if custom_subject (nullable) is None + # and model_fields_set contains the field + if self.custom_subject is None and "custom_subject" in self.model_fields_set: + _dict["customSubject"] = None + + # set to None if group_by (nullable) is None + # and model_fields_set contains the field + if self.group_by is None and "group_by" in self.model_fields_set: + _dict["groupBy"] = None + + # set to None if run_at_time (nullable) is None + # and model_fields_set contains the field + if self.run_at_time is None and "run_at_time" in self.model_fields_set: + _dict["runAtTime"] = None + + # set to None if run_at_time_zone (nullable) is None + # and model_fields_set contains the field + if self.run_at_time_zone is None and "run_at_time_zone" in self.model_fields_set: + _dict["runAtTimeZone"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of AlertConfigurationV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "bambooAlertId": obj.get("bambooAlertId"), + "schedule": obj.get("schedule"), + "dueWithin": obj.get("dueWithin"), + "dueInterval": obj.get("dueInterval"), + "sendToEmployee": obj.get("sendToEmployee"), + "sendToManager": obj.get("sendToManager"), + "sendToAdmin": obj.get("sendToAdmin"), + "editorUserId": obj.get("editorUserId"), + "lastEdited": obj.get("lastEdited"), + "customMessage": obj.get("customMessage"), + "customSubject": obj.get("customSubject"), + "groupBy": obj.get("groupBy"), + "limitTrainingToRequired": obj.get("limitTrainingToRequired"), + "runAtTime": obj.get("runAtTime"), + "runAtTimeZone": obj.get("runAtTimeZone"), + "includePosition": obj.get("includePosition"), + "includeLocation": obj.get("includeLocation"), + "additionalRecipientEmails": obj.get("additionalRecipientEmails"), + "employeeIds": obj.get("employeeIds"), + "listValueIds": obj.get("listValueIds"), + "filterListValueIds": obj.get("filterListValueIds"), + "userIds": obj.get("userIds"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/alert_configuration_write_v1.py b/bamboohr_sdk/models/alert_configuration_write_v1.py new file mode 100644 index 0000000..64b81b2 --- /dev/null +++ b/bamboohr_sdk/models/alert_configuration_write_v1.py @@ -0,0 +1,219 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Annotated, Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing_extensions import Self + + +class AlertConfigurationWriteV1(BaseModel): + """ + Request body for creating or updating an alert configuration. Only `bambooAlertId` is required; every other property falls back to a server-side default when omitted. The configuration's own `id`, its `editorUserId`, and its `lastEdited` timestamp are assigned by the server and must not be sent. + """ + + bamboo_alert_id: StrictInt = Field( + description='Identifier of the alert template this configuration is based on, taken from the `id` field of **List Alert Templates** (`list-alert-templates`). The template catalog is global rather than per-company, and an identifier that is not in the catalog is rejected. `0` is rejected as a missing value; there is no sentinel for "any alert".', + alias="bambooAlertId", + ) + schedule: StrictStr | None = Field(default="daily", description="How often the alert runs.") + due_within: Annotated[int, Field(le=32767, strict=True)] | None = Field(default=None, alias="dueWithin") + due_interval: StrictStr | None = Field(default=None, alias="dueInterval") + send_to_employee: StrictBool | None = Field( + default=True, description="Whether the alert should be sent to employees.", alias="sendToEmployee" + ) + send_to_manager: StrictBool | None = Field( + default=False, description="Whether the alert should be sent to managers.", alias="sendToManager" + ) + send_to_admin: StrictBool | None = Field( + default=False, description="Whether the alert should be sent to admins.", alias="sendToAdmin" + ) + custom_message: StrictStr | None = Field(default=None, alias="customMessage") + custom_subject: StrictStr | None = Field(default=None, alias="customSubject") + group_by: StrictStr | None = Field(default=None, alias="groupBy") + limit_training_to_required: StrictBool | None = Field( + default=True, + description="Whether the training covered by a training alert should be limited to required training.", + alias="limitTrainingToRequired", + ) + run_at_time: StrictStr | None = Field(default=None, alias="runAtTime") + run_at_time_zone: StrictStr | None = Field(default=None, alias="runAtTimeZone") + include_position: StrictBool | None = Field( + default=False, description="Whether the alert should include position.", alias="includePosition" + ) + include_location: StrictBool | None = Field( + default=False, description="Whether the alert should include location.", alias="includeLocation" + ) + filter_list_value_ids: list[StrictInt] | None = Field( + default=None, + description="List value IDs the alert is scoped to. Accepted values are the `options[].id` values of the employee filter list fields: Department, Division, Location, Job Title, Employment Status, and Status, plus Employment Type and Team on accounts where those fields are enabled. Look the IDs up with **Account Information > List List Fields** (`list-list-fields`); an ID belonging to any other list field is rejected. An empty array leaves the alert unscoped, and omitting it on a replace clears all list-value scoping. This is the only recipient-scoping property the API stores.", + alias="filterListValueIds", + ) + __properties: ClassVar[list[str]] = [ + "bambooAlertId", + "schedule", + "dueWithin", + "dueInterval", + "sendToEmployee", + "sendToManager", + "sendToAdmin", + "customMessage", + "customSubject", + "groupBy", + "limitTrainingToRequired", + "runAtTime", + "runAtTimeZone", + "includePosition", + "includeLocation", + "filterListValueIds", + ] + + @field_validator("schedule") + def schedule_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["daily", "weekly", "monthly", "quarterly"]): + raise ValueError("must be one of enum values ('daily', 'weekly', 'monthly', 'quarterly')") + return value + + @field_validator("due_interval") + def due_interval_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["days", "weeks", "months"]): + raise ValueError("must be one of enum values ('days', 'weeks', 'months')") + return value + + @field_validator("group_by") + def group_by_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["department", "division", "location", "jobTitle"]): + raise ValueError("must be one of enum values ('department', 'division', 'location', 'jobTitle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of AlertConfigurationWriteV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if due_within (nullable) is None + # and model_fields_set contains the field + if self.due_within is None and "due_within" in self.model_fields_set: + _dict["dueWithin"] = None + + # set to None if due_interval (nullable) is None + # and model_fields_set contains the field + if self.due_interval is None and "due_interval" in self.model_fields_set: + _dict["dueInterval"] = None + + # set to None if custom_message (nullable) is None + # and model_fields_set contains the field + if self.custom_message is None and "custom_message" in self.model_fields_set: + _dict["customMessage"] = None + + # set to None if custom_subject (nullable) is None + # and model_fields_set contains the field + if self.custom_subject is None and "custom_subject" in self.model_fields_set: + _dict["customSubject"] = None + + # set to None if group_by (nullable) is None + # and model_fields_set contains the field + if self.group_by is None and "group_by" in self.model_fields_set: + _dict["groupBy"] = None + + # set to None if run_at_time (nullable) is None + # and model_fields_set contains the field + if self.run_at_time is None and "run_at_time" in self.model_fields_set: + _dict["runAtTime"] = None + + # set to None if run_at_time_zone (nullable) is None + # and model_fields_set contains the field + if self.run_at_time_zone is None and "run_at_time_zone" in self.model_fields_set: + _dict["runAtTimeZone"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of AlertConfigurationWriteV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "bambooAlertId": obj.get("bambooAlertId"), + "schedule": obj.get("schedule") if obj.get("schedule") is not None else "daily", + "dueWithin": obj.get("dueWithin"), + "dueInterval": obj.get("dueInterval"), + "sendToEmployee": obj.get("sendToEmployee") if obj.get("sendToEmployee") is not None else True, + "sendToManager": obj.get("sendToManager") if obj.get("sendToManager") is not None else False, + "sendToAdmin": obj.get("sendToAdmin") if obj.get("sendToAdmin") is not None else False, + "customMessage": obj.get("customMessage"), + "customSubject": obj.get("customSubject"), + "groupBy": obj.get("groupBy"), + "limitTrainingToRequired": obj.get("limitTrainingToRequired") + if obj.get("limitTrainingToRequired") is not None + else True, + "runAtTime": obj.get("runAtTime"), + "runAtTimeZone": obj.get("runAtTimeZone"), + "includePosition": obj.get("includePosition") if obj.get("includePosition") is not None else False, + "includeLocation": obj.get("includeLocation") if obj.get("includeLocation") is not None else False, + "filterListValueIds": obj.get("filterListValueIds"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/alert_template_list_response_v1.py b/bamboohr_sdk/models/alert_template_list_response_v1.py new file mode 100644 index 0000000..31fc617 --- /dev/null +++ b/bamboohr_sdk/models/alert_template_list_response_v1.py @@ -0,0 +1,98 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from bamboohr_sdk.models.alert_template_list_response_v1_alerts_inner import AlertTemplateListResponseV1AlertsInner + + +class AlertTemplateListResponseV1(BaseModel): + """ + AlertTemplateListResponseV1 + """ + + alerts: list[AlertTemplateListResponseV1AlertsInner] | None = Field( + default=None, + description="Alert templates, ordered by `groupName` and then `name`. Empty only if the catalog itself is empty.", + ) + __properties: ClassVar[list[str]] = ["alerts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of AlertTemplateListResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in alerts (list) + _items = [] + if self.alerts: + for _item_alerts in self.alerts: + if _item_alerts: + _items.append(_item_alerts.to_dict()) + _dict["alerts"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of AlertTemplateListResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "alerts": [AlertTemplateListResponseV1AlertsInner.from_dict(_item) for _item in obj["alerts"]] + if obj.get("alerts") is not None + else None + } + ) + return _obj diff --git a/bamboohr_sdk/models/alert_template_list_response_v1_alerts_inner.py b/bamboohr_sdk/models/alert_template_list_response_v1_alerts_inner.py new file mode 100644 index 0000000..ce827c5 --- /dev/null +++ b/bamboohr_sdk/models/alert_template_list_response_v1_alerts_inner.py @@ -0,0 +1,91 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + + +class AlertTemplateListResponseV1AlertsInner(BaseModel): + """ + AlertTemplateListResponseV1AlertsInner + """ + + id: StrictInt | None = Field( + default=None, + description="Alert template identifier. Supply this value as `bambooAlertId` when creating or replacing an alert configuration.", + ) + name: StrictStr | None = Field( + default=None, description="Display name of the alert template, as shown in the company's Email Alerts settings." + ) + group_name: StrictStr | None = Field( + default=None, + description="Settings group the alert template is filed under, for example `Celebrations`, `Time off`, or `Training`.", + alias="groupName", + ) + __properties: ClassVar[list[str]] = ["id", "name", "groupName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of AlertTemplateListResponseV1AlertsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of AlertTemplateListResponseV1AlertsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name"), "groupName": obj.get("groupName")}) + return _obj diff --git a/bamboohr_sdk/models/alignment_options_response.py b/bamboohr_sdk/models/alignment_options_response.py index b8e5060..288aa9f 100644 --- a/bamboohr_sdk/models/alignment_options_response.py +++ b/bamboohr_sdk/models/alignment_options_response.py @@ -1,34 +1,40 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.alignment_options_response_aligns_with_options_inner import AlignmentOptionsResponseAlignsWithOptionsInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.alignment_options_response_aligns_with_options_inner import ( + AlignmentOptionsResponseAlignsWithOptionsInner, +) + + class AlignmentOptionsResponse(BaseModel): """ AlignmentOptionsResponse - """ # noqa: E501 - aligns_with_options: Optional[List[AlignmentOptionsResponseAlignsWithOptionsInner]] = Field(default=None, description="Array of goals available as alignment targets for the employee.", alias="alignsWithOptions") - __properties: ClassVar[List[str]] = ["alignsWithOptions"] + """ + + aligns_with_options: list[AlignmentOptionsResponseAlignsWithOptionsInner] | None = Field( + default=None, + description="Array of goals available as alignment targets for the employee.", + alias="alignsWithOptions", + ) + __properties: ClassVar[list[str]] = ["alignsWithOptions"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +42,6 @@ class AlignmentOptionsResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +52,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of AlignmentOptionsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,11 +79,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_aligns_with_options in self.aligns_with_options: if _item_aligns_with_options: _items.append(_item_aligns_with_options.to_dict()) - _dict['alignsWithOptions'] = _items + _dict["alignsWithOptions"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of AlignmentOptionsResponse from a dict""" if obj is None: return None @@ -87,9 +91,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "alignsWithOptions": [AlignmentOptionsResponseAlignsWithOptionsInner.from_dict(_item) for _item in obj["alignsWithOptions"]] if obj.get("alignsWithOptions") is not None else None - }) + _obj = cls.model_validate( + { + "alignsWithOptions": [ + AlignmentOptionsResponseAlignsWithOptionsInner.from_dict(_item) + for _item in obj["alignsWithOptions"] + ] + if obj.get("alignsWithOptions") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/alignment_options_response_aligns_with_options_inner.py b/bamboohr_sdk/models/alignment_options_response_aligns_with_options_inner.py index d56e466..36a64fc 100644 --- a/bamboohr_sdk/models/alignment_options_response_aligns_with_options_inner.py +++ b/bamboohr_sdk/models/alignment_options_response_aligns_with_options_inner.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class AlignmentOptionsResponseAlignsWithOptionsInner(BaseModel): """ AlignmentOptionsResponseAlignsWithOptionsInner - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The goal ID.") - title: Optional[StrictStr] = Field(default=None, description="The display title of the goal.") - __properties: ClassVar[List[str]] = ["id", "title"] + """ + + id: StrictStr | None = Field(default=None, description="The goal ID.") + title: StrictStr | None = Field(default=None, description="The display title of the goal.") + __properties: ClassVar[list[str]] = ["id", "title"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class AlignmentOptionsResponseAlignsWithOptionsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of AlignmentOptionsResponseAlignsWithOptionsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of AlignmentOptionsResponseAlignsWithOptionsInner from a dict""" if obj is None: return None @@ -80,10 +77,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "title": obj.get("title") - }) + _obj = cls.model_validate({"id": obj.get("id"), "title": obj.get("title")}) return _obj - - diff --git a/bamboohr_sdk/models/applicant_status.py b/bamboohr_sdk/models/applicant_status.py index 3ad3c28..9451176 100644 --- a/bamboohr_sdk/models/applicant_status.py +++ b/bamboohr_sdk/models/applicant_status.py @@ -1,39 +1,44 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class ApplicantStatus(BaseModel): """ ApplicantStatus - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Status ID") - code: Optional[StrictStr] = Field(default=None, description="Internal status code, or null for custom statuses") - name: Optional[StrictStr] = Field(default=None, description="Status display name") - translated_name: Optional[StrictStr] = Field(default=None, description="Translated display name", alias="translatedName") - description: Optional[StrictStr] = Field(default=None, description="Optional description of the status") - enabled: Optional[StrictBool] = Field(default=None, description="Whether the status is currently active and selectable") - manageable: Optional[StrictBool] = Field(default=None, description="Whether the status can be managed (edited/deleted) by the company") - __properties: ClassVar[List[str]] = ["id", "code", "name", "translatedName", "description", "enabled", "manageable"] + """ + + id: StrictStr | None = Field(default=None, description="Status ID") + code: StrictStr | None = None + name: StrictStr | None = Field(default=None, description="Status display name") + translated_name: StrictStr | None = Field( + default=None, description="Translated display name", alias="translatedName" + ) + description: StrictStr | None = None + enabled: StrictBool | None = Field( + default=None, description="Whether the status is currently active and selectable" + ) + manageable: StrictBool | None = Field( + default=None, description="Whether the status can be managed (edited/deleted) by the company" + ) + __properties: ClassVar[list[str]] = ["id", "code", "name", "translatedName", "description", "enabled", "manageable"] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +46,6 @@ class ApplicantStatus(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,11 +56,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicantStatus from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -66,8 +70,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,17 +80,17 @@ def to_dict(self) -> Dict[str, Any]: # set to None if code (nullable) is None # and model_fields_set contains the field if self.code is None and "code" in self.model_fields_set: - _dict['code'] = None + _dict["code"] = None # set to None if description (nullable) is None # and model_fields_set contains the field if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None + _dict["description"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicantStatus from a dict""" if obj is None: return None @@ -95,15 +98,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "code": obj.get("code"), - "name": obj.get("name"), - "translatedName": obj.get("translatedName"), - "description": obj.get("description"), - "enabled": obj.get("enabled"), - "manageable": obj.get("manageable") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "code": obj.get("code"), + "name": obj.get("name"), + "translatedName": obj.get("translatedName"), + "description": obj.get("description"), + "enabled": obj.get("enabled"), + "manageable": obj.get("manageable"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/application_details.py b/bamboohr_sdk/models/application_details.py index ca5a9f4..ed0adfb 100644 --- a/bamboohr_sdk/models/application_details.py +++ b/bamboohr_sdk/models/application_details.py @@ -1,59 +1,103 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from bamboohr_sdk.models.application_details_applicant import ApplicationDetailsApplicant from bamboohr_sdk.models.application_details_attachments_inner import ApplicationDetailsAttachmentsInner from bamboohr_sdk.models.application_details_job import ApplicationDetailsJob -from bamboohr_sdk.models.application_details_questions_and_answers_inner import ApplicationDetailsQuestionsAndAnswersInner +from bamboohr_sdk.models.application_details_questions_and_answers_inner import ( + ApplicationDetailsQuestionsAndAnswersInner, +) from bamboohr_sdk.models.application_details_status import ApplicationDetailsStatus -from typing import Optional, Set -from typing_extensions import Self + class ApplicationDetails(BaseModel): """ ApplicationDetails - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Application ID") - applied_date: Optional[datetime] = Field(default=None, description="ISO 8601 datetime when the application was submitted", alias="appliedDate") - status: Optional[ApplicationDetailsStatus] = None - rating: Optional[StrictInt] = Field(default=None, description="Applicant rating (1-5), or null if not yet rated") - resume_file_id: Optional[StrictInt] = Field(default=None, description="ID of the attached resume file, or null if not provided", alias="resumeFileId") - cover_letter_file_id: Optional[StrictInt] = Field(default=None, description="ID of the attached cover letter file, or null if not provided", alias="coverLetterFileId") - attachment_count: Optional[StrictInt] = Field(default=None, description="Total number of attachments on this application, or null", alias="attachmentCount") - attachments: Optional[List[ApplicationDetailsAttachmentsInner]] = Field(default=None, description="List of attachments on this application, or null if none exist") - moved_to: Optional[List[Dict[str, Any]]] = Field(default=None, description="List of applications this applicant was moved to, or null if not moved", alias="movedTo") - moved_from: Optional[List[Dict[str, Any]]] = Field(default=None, description="List of applications this applicant was moved from, or null if not moved", alias="movedFrom") - also_considered_for_count: Optional[StrictInt] = Field(default=None, description="Count of other job openings this applicant is also being considered for", alias="alsoConsideredForCount") - duplicate_application_count: Optional[StrictInt] = Field(default=None, description="Count of duplicate applications from this applicant", alias="duplicateApplicationCount") - referred_by: Optional[StrictStr] = Field(default=None, description="Name of the person who referred this applicant, or null", alias="referredBy") - desired_salary: Optional[StrictStr] = Field(default=None, description="Applicant's desired salary, or null if not provided", alias="desiredSalary") - comment_count: Optional[StrictInt] = Field(default=None, description="Number of comments on this application", alias="commentCount") - email_count: Optional[StrictInt] = Field(default=None, description="Number of emails sent for this application", alias="emailCount") - event_count: Optional[StrictInt] = Field(default=None, description="Number of events associated with this application", alias="eventCount") - questions_and_answers: Optional[List[ApplicationDetailsQuestionsAndAnswersInner]] = Field(default=None, description="List of custom application questions and the applicant's answers", alias="questionsAndAnswers") - application_references: Optional[StrictStr] = Field(default=None, description="Free-text references provided by the applicant, or null", alias="applicationReferences") - applicant: Optional[ApplicationDetailsApplicant] = None - job: Optional[ApplicationDetailsJob] = None - __properties: ClassVar[List[str]] = ["id", "appliedDate", "status", "rating", "resumeFileId", "coverLetterFileId", "attachmentCount", "attachments", "movedTo", "movedFrom", "alsoConsideredForCount", "duplicateApplicationCount", "referredBy", "desiredSalary", "commentCount", "emailCount", "eventCount", "questionsAndAnswers", "applicationReferences", "applicant", "job"] + """ + + id: StrictInt | None = Field(default=None, description="Application ID") + applied_date: datetime | None = Field( + default=None, description="ISO 8601 datetime when the application was submitted", alias="appliedDate" + ) + status: ApplicationDetailsStatus | None = None + rating: StrictInt | None = None + resume_file_id: StrictInt | None = Field(default=None, alias="resumeFileId") + cover_letter_file_id: StrictInt | None = Field(default=None, alias="coverLetterFileId") + attachment_count: StrictInt | None = Field(default=None, alias="attachmentCount") + attachments: list[ApplicationDetailsAttachmentsInner] | None = None + moved_to: list[dict[str, Any]] | None = Field(default=None, alias="movedTo") + moved_from: list[dict[str, Any]] | None = Field(default=None, alias="movedFrom") + also_considered_for_count: StrictInt | None = Field( + default=None, + description="Count of other job openings this applicant is also being considered for", + alias="alsoConsideredForCount", + ) + duplicate_application_count: StrictInt | None = Field( + default=None, + description="Count of duplicate applications from this applicant", + alias="duplicateApplicationCount", + ) + referred_by: StrictStr | None = Field(default=None, alias="referredBy") + desired_salary: StrictStr | None = Field(default=None, alias="desiredSalary") + comment_count: StrictInt | None = Field( + default=None, description="Number of comments on this application", alias="commentCount" + ) + email_count: StrictInt | None = Field( + default=None, description="Number of emails sent for this application", alias="emailCount" + ) + event_count: StrictInt | None = Field( + default=None, description="Number of events associated with this application", alias="eventCount" + ) + questions_and_answers: list[ApplicationDetailsQuestionsAndAnswersInner] | None = Field( + default=None, + description="List of custom application questions and the applicant's answers", + alias="questionsAndAnswers", + ) + application_references: StrictStr | None = Field(default=None, alias="applicationReferences") + applicant: ApplicationDetailsApplicant | None = None + job: ApplicationDetailsJob | None = None + __properties: ClassVar[list[str]] = [ + "id", + "appliedDate", + "status", + "rating", + "resumeFileId", + "coverLetterFileId", + "attachmentCount", + "attachments", + "movedTo", + "movedFrom", + "alsoConsideredForCount", + "duplicateApplicationCount", + "referredBy", + "desiredSalary", + "commentCount", + "emailCount", + "eventCount", + "questionsAndAnswers", + "applicationReferences", + "applicant", + "job", + ] model_config = ConfigDict( populate_by_name=True, @@ -61,7 +105,6 @@ class ApplicationDetails(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,11 +115,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationDetails from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -86,8 +129,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -96,81 +138,81 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of status if self.status: - _dict['status'] = self.status.to_dict() + _dict["status"] = self.status.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: for _item_attachments in self.attachments: if _item_attachments: _items.append(_item_attachments.to_dict()) - _dict['attachments'] = _items + _dict["attachments"] = _items # override the default output from pydantic by calling `to_dict()` of each item in questions_and_answers (list) _items = [] if self.questions_and_answers: for _item_questions_and_answers in self.questions_and_answers: if _item_questions_and_answers: _items.append(_item_questions_and_answers.to_dict()) - _dict['questionsAndAnswers'] = _items + _dict["questionsAndAnswers"] = _items # override the default output from pydantic by calling `to_dict()` of applicant if self.applicant: - _dict['applicant'] = self.applicant.to_dict() + _dict["applicant"] = self.applicant.to_dict() # override the default output from pydantic by calling `to_dict()` of job if self.job: - _dict['job'] = self.job.to_dict() + _dict["job"] = self.job.to_dict() # set to None if rating (nullable) is None # and model_fields_set contains the field if self.rating is None and "rating" in self.model_fields_set: - _dict['rating'] = None + _dict["rating"] = None # set to None if resume_file_id (nullable) is None # and model_fields_set contains the field if self.resume_file_id is None and "resume_file_id" in self.model_fields_set: - _dict['resumeFileId'] = None + _dict["resumeFileId"] = None # set to None if cover_letter_file_id (nullable) is None # and model_fields_set contains the field if self.cover_letter_file_id is None and "cover_letter_file_id" in self.model_fields_set: - _dict['coverLetterFileId'] = None + _dict["coverLetterFileId"] = None # set to None if attachment_count (nullable) is None # and model_fields_set contains the field if self.attachment_count is None and "attachment_count" in self.model_fields_set: - _dict['attachmentCount'] = None + _dict["attachmentCount"] = None # set to None if attachments (nullable) is None # and model_fields_set contains the field if self.attachments is None and "attachments" in self.model_fields_set: - _dict['attachments'] = None + _dict["attachments"] = None # set to None if moved_to (nullable) is None # and model_fields_set contains the field if self.moved_to is None and "moved_to" in self.model_fields_set: - _dict['movedTo'] = None + _dict["movedTo"] = None # set to None if moved_from (nullable) is None # and model_fields_set contains the field if self.moved_from is None and "moved_from" in self.model_fields_set: - _dict['movedFrom'] = None + _dict["movedFrom"] = None # set to None if referred_by (nullable) is None # and model_fields_set contains the field if self.referred_by is None and "referred_by" in self.model_fields_set: - _dict['referredBy'] = None + _dict["referredBy"] = None # set to None if desired_salary (nullable) is None # and model_fields_set contains the field if self.desired_salary is None and "desired_salary" in self.model_fields_set: - _dict['desiredSalary'] = None + _dict["desiredSalary"] = None # set to None if application_references (nullable) is None # and model_fields_set contains the field if self.application_references is None and "application_references" in self.model_fields_set: - _dict['applicationReferences'] = None + _dict["applicationReferences"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationDetails from a dict""" if obj is None: return None @@ -178,29 +220,37 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "appliedDate": obj.get("appliedDate"), - "status": ApplicationDetailsStatus.from_dict(obj["status"]) if obj.get("status") is not None else None, - "rating": obj.get("rating"), - "resumeFileId": obj.get("resumeFileId"), - "coverLetterFileId": obj.get("coverLetterFileId"), - "attachmentCount": obj.get("attachmentCount"), - "attachments": [ApplicationDetailsAttachmentsInner.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, - "movedTo": obj.get("movedTo"), - "movedFrom": obj.get("movedFrom"), - "alsoConsideredForCount": obj.get("alsoConsideredForCount"), - "duplicateApplicationCount": obj.get("duplicateApplicationCount"), - "referredBy": obj.get("referredBy"), - "desiredSalary": obj.get("desiredSalary"), - "commentCount": obj.get("commentCount"), - "emailCount": obj.get("emailCount"), - "eventCount": obj.get("eventCount"), - "questionsAndAnswers": [ApplicationDetailsQuestionsAndAnswersInner.from_dict(_item) for _item in obj["questionsAndAnswers"]] if obj.get("questionsAndAnswers") is not None else None, - "applicationReferences": obj.get("applicationReferences"), - "applicant": ApplicationDetailsApplicant.from_dict(obj["applicant"]) if obj.get("applicant") is not None else None, - "job": ApplicationDetailsJob.from_dict(obj["job"]) if obj.get("job") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "appliedDate": obj.get("appliedDate"), + "status": ApplicationDetailsStatus.from_dict(obj["status"]) if obj.get("status") is not None else None, + "rating": obj.get("rating"), + "resumeFileId": obj.get("resumeFileId"), + "coverLetterFileId": obj.get("coverLetterFileId"), + "attachmentCount": obj.get("attachmentCount"), + "attachments": [ApplicationDetailsAttachmentsInner.from_dict(_item) for _item in obj["attachments"]] + if obj.get("attachments") is not None + else None, + "movedTo": obj.get("movedTo"), + "movedFrom": obj.get("movedFrom"), + "alsoConsideredForCount": obj.get("alsoConsideredForCount"), + "duplicateApplicationCount": obj.get("duplicateApplicationCount"), + "referredBy": obj.get("referredBy"), + "desiredSalary": obj.get("desiredSalary"), + "commentCount": obj.get("commentCount"), + "emailCount": obj.get("emailCount"), + "eventCount": obj.get("eventCount"), + "questionsAndAnswers": [ + ApplicationDetailsQuestionsAndAnswersInner.from_dict(_item) for _item in obj["questionsAndAnswers"] + ] + if obj.get("questionsAndAnswers") is not None + else None, + "applicationReferences": obj.get("applicationReferences"), + "applicant": ApplicationDetailsApplicant.from_dict(obj["applicant"]) + if obj.get("applicant") is not None + else None, + "job": ApplicationDetailsJob.from_dict(obj["job"]) if obj.get("job") is not None else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/application_details_applicant.py b/bamboohr_sdk/models/application_details_applicant.py index 9d0f0c6..fd9fd24 100644 --- a/bamboohr_sdk/models/application_details_applicant.py +++ b/bamboohr_sdk/models/application_details_applicant.py @@ -1,48 +1,59 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.application_details_applicant_address import ApplicationDetailsApplicantAddress -from bamboohr_sdk.models.application_details_applicant_education import ApplicationDetailsApplicantEducation -from typing import Optional, Set from typing_extensions import Self + class ApplicationDetailsApplicant(BaseModel): """ Information about the applicant - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Applicant ID") - first_name: Optional[StrictStr] = Field(default=None, description="First name", alias="firstName") - last_name: Optional[StrictStr] = Field(default=None, description="Last name", alias="lastName") - email: Optional[StrictStr] = Field(default=None, description="Email address") - phone_number: Optional[StrictStr] = Field(default=None, description="Phone number", alias="phoneNumber") - avatar: Optional[StrictStr] = Field(default=None, description="URL to the applicant's avatar image, or null") - source: Optional[StrictStr] = Field(default=None, description="Source of the application (e.g. 'LinkedIn', 'Referral'), or null") - twitter_username: Optional[StrictStr] = Field(default=None, description="Applicant's Twitter/X username, or null", alias="twitterUsername") - address: Optional[ApplicationDetailsApplicantAddress] = None - linkedin_url: Optional[StrictStr] = Field(default=None, description="LinkedIn profile URL", alias="linkedinUrl") - website_url: Optional[StrictStr] = Field(default=None, description="Personal website URL", alias="websiteUrl") - available_start_date: Optional[date] = Field(default=None, description="Candidate's available start date (yyyy-mm-dd)", alias="availableStartDate") - education: Optional[ApplicationDetailsApplicantEducation] = None - __properties: ClassVar[List[str]] = ["id", "firstName", "lastName", "email", "phoneNumber", "avatar", "source", "twitterUsername", "address", "linkedinUrl", "websiteUrl", "availableStartDate", "education"] + """ + + id: StrictInt | None = Field(default=None, description="Applicant ID") + first_name: StrictStr | None = Field(default=None, description="First name", alias="firstName") + last_name: StrictStr | None = Field(default=None, description="Last name", alias="lastName") + email: StrictStr | None = Field(default=None, description="Email address") + phone_number: StrictStr | None = Field(default=None, alias="phoneNumber") + avatar: StrictStr | None = None + source: StrictStr | None = None + twitter_username: StrictStr | None = Field(default=None, alias="twitterUsername") + address: dict[str, Any] | None = None + linkedin_url: StrictStr | None = Field(default=None, alias="linkedinUrl") + website_url: StrictStr | None = Field(default=None, alias="websiteUrl") + available_start_date: date | None = Field(default=None, alias="availableStartDate") + education: dict[str, Any] | None = None + __properties: ClassVar[list[str]] = [ + "id", + "firstName", + "lastName", + "email", + "phoneNumber", + "avatar", + "source", + "twitterUsername", + "address", + "linkedinUrl", + "websiteUrl", + "availableStartDate", + "education", + ] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +61,6 @@ class ApplicationDetailsApplicant(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,11 +71,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationDetailsApplicant from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -75,59 +85,62 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of address - if self.address: - _dict['address'] = self.address.to_dict() - # override the default output from pydantic by calling `to_dict()` of education - if self.education: - _dict['education'] = self.education.to_dict() # set to None if phone_number (nullable) is None # and model_fields_set contains the field if self.phone_number is None and "phone_number" in self.model_fields_set: - _dict['phoneNumber'] = None + _dict["phoneNumber"] = None # set to None if avatar (nullable) is None # and model_fields_set contains the field if self.avatar is None and "avatar" in self.model_fields_set: - _dict['avatar'] = None + _dict["avatar"] = None # set to None if source (nullable) is None # and model_fields_set contains the field if self.source is None and "source" in self.model_fields_set: - _dict['source'] = None + _dict["source"] = None # set to None if twitter_username (nullable) is None # and model_fields_set contains the field if self.twitter_username is None and "twitter_username" in self.model_fields_set: - _dict['twitterUsername'] = None + _dict["twitterUsername"] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict["address"] = None # set to None if linkedin_url (nullable) is None # and model_fields_set contains the field if self.linkedin_url is None and "linkedin_url" in self.model_fields_set: - _dict['linkedinUrl'] = None + _dict["linkedinUrl"] = None # set to None if website_url (nullable) is None # and model_fields_set contains the field if self.website_url is None and "website_url" in self.model_fields_set: - _dict['websiteUrl'] = None + _dict["websiteUrl"] = None # set to None if available_start_date (nullable) is None # and model_fields_set contains the field if self.available_start_date is None and "available_start_date" in self.model_fields_set: - _dict['availableStartDate'] = None + _dict["availableStartDate"] = None + + # set to None if education (nullable) is None + # and model_fields_set contains the field + if self.education is None and "education" in self.model_fields_set: + _dict["education"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationDetailsApplicant from a dict""" if obj is None: return None @@ -135,21 +148,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "firstName": obj.get("firstName"), - "lastName": obj.get("lastName"), - "email": obj.get("email"), - "phoneNumber": obj.get("phoneNumber"), - "avatar": obj.get("avatar"), - "source": obj.get("source"), - "twitterUsername": obj.get("twitterUsername"), - "address": ApplicationDetailsApplicantAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, - "linkedinUrl": obj.get("linkedinUrl"), - "websiteUrl": obj.get("websiteUrl"), - "availableStartDate": obj.get("availableStartDate"), - "education": ApplicationDetailsApplicantEducation.from_dict(obj["education"]) if obj.get("education") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "email": obj.get("email"), + "phoneNumber": obj.get("phoneNumber"), + "avatar": obj.get("avatar"), + "source": obj.get("source"), + "twitterUsername": obj.get("twitterUsername"), + "address": obj.get("address"), + "linkedinUrl": obj.get("linkedinUrl"), + "websiteUrl": obj.get("websiteUrl"), + "availableStartDate": obj.get("availableStartDate"), + "education": obj.get("education"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/application_details_applicant_address.py b/bamboohr_sdk/models/application_details_applicant_address.py deleted file mode 100644 index ac0006e..0000000 --- a/bamboohr_sdk/models/application_details_applicant_address.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ApplicationDetailsApplicantAddress(BaseModel): - """ - Applicant address - """ # noqa: E501 - address_line1: Optional[StrictStr] = Field(default=None, alias="addressLine1") - address_line2: Optional[StrictStr] = Field(default=None, alias="addressLine2") - city: Optional[StrictStr] = None - state: Optional[StrictStr] = None - zipcode: Optional[StrictStr] = None - country: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["addressLine1", "addressLine2", "city", "state", "zipcode", "country"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApplicationDetailsApplicantAddress from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if address_line1 (nullable) is None - # and model_fields_set contains the field - if self.address_line1 is None and "address_line1" in self.model_fields_set: - _dict['addressLine1'] = None - - # set to None if address_line2 (nullable) is None - # and model_fields_set contains the field - if self.address_line2 is None and "address_line2" in self.model_fields_set: - _dict['addressLine2'] = None - - # set to None if city (nullable) is None - # and model_fields_set contains the field - if self.city is None and "city" in self.model_fields_set: - _dict['city'] = None - - # set to None if state (nullable) is None - # and model_fields_set contains the field - if self.state is None and "state" in self.model_fields_set: - _dict['state'] = None - - # set to None if zipcode (nullable) is None - # and model_fields_set contains the field - if self.zipcode is None and "zipcode" in self.model_fields_set: - _dict['zipcode'] = None - - # set to None if country (nullable) is None - # and model_fields_set contains the field - if self.country is None and "country" in self.model_fields_set: - _dict['country'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApplicationDetailsApplicantAddress from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "addressLine1": obj.get("addressLine1"), - "addressLine2": obj.get("addressLine2"), - "city": obj.get("city"), - "state": obj.get("state"), - "zipcode": obj.get("zipcode"), - "country": obj.get("country") - }) - return _obj - - diff --git a/bamboohr_sdk/models/application_details_applicant_education.py b/bamboohr_sdk/models/application_details_applicant_education.py deleted file mode 100644 index 8a25a22..0000000 --- a/bamboohr_sdk/models/application_details_applicant_education.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.application_details_applicant_education_level import ApplicationDetailsApplicantEducationLevel -from typing import Optional, Set -from typing_extensions import Self - -class ApplicationDetailsApplicantEducation(BaseModel): - """ - Applicant's education information - """ # noqa: E501 - institution: Optional[StrictStr] = Field(default=None, description="Name of the educational institution") - level: Optional[ApplicationDetailsApplicantEducationLevel] = None - __properties: ClassVar[List[str]] = ["institution", "level"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApplicationDetailsApplicantEducation from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of level - if self.level: - _dict['level'] = self.level.to_dict() - # set to None if institution (nullable) is None - # and model_fields_set contains the field - if self.institution is None and "institution" in self.model_fields_set: - _dict['institution'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApplicationDetailsApplicantEducation from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "institution": obj.get("institution"), - "level": ApplicationDetailsApplicantEducationLevel.from_dict(obj["level"]) if obj.get("level") is not None else None - }) - return _obj - - diff --git a/bamboohr_sdk/models/application_details_attachments_inner.py b/bamboohr_sdk/models/application_details_attachments_inner.py index 2e60204..9d9b869 100644 --- a/bamboohr_sdk/models/application_details_attachments_inner.py +++ b/bamboohr_sdk/models/application_details_attachments_inner.py @@ -1,35 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class ApplicationDetailsAttachmentsInner(BaseModel): """ ApplicationDetailsAttachmentsInner - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Attachment ID") - name: Optional[StrictStr] = Field(default=None, description="Attachment file name") - file_url: Optional[StrictStr] = Field(default=None, description="URL to download the attachment", alias="fileUrl") - __properties: ClassVar[List[str]] = ["id", "name", "fileUrl"] + """ + + id: StrictInt | None = Field(default=None, description="Attachment ID") + name: StrictStr | None = Field(default=None, description="Attachment file name") + file_url: StrictStr | None = Field(default=None, description="URL to download the attachment", alias="fileUrl") + __properties: ClassVar[list[str]] = ["id", "name", "fileUrl"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +36,6 @@ class ApplicationDetailsAttachmentsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationDetailsAttachmentsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationDetailsAttachmentsInner from a dict""" if obj is None: return None @@ -81,11 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "fileUrl": obj.get("fileUrl") - }) + _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name"), "fileUrl": obj.get("fileUrl")}) return _obj - - diff --git a/bamboohr_sdk/models/application_details_job.py b/bamboohr_sdk/models/application_details_job.py index 6c7e80d..52cd205 100644 --- a/bamboohr_sdk/models/application_details_job.py +++ b/bamboohr_sdk/models/application_details_job.py @@ -1,37 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.application_details_job_hiring_lead import ApplicationDetailsJobHiringLead -from bamboohr_sdk.models.application_details_job_title import ApplicationDetailsJobTitle -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.application_details_job_title import ApplicationDetailsJobTitle + + class ApplicationDetailsJob(BaseModel): """ Information about the job position applied to - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Job opening ID") - title: Optional[ApplicationDetailsJobTitle] = None - hiring_lead: Optional[ApplicationDetailsJobHiringLead] = Field(default=None, alias="hiringLead") - __properties: ClassVar[List[str]] = ["id", "title", "hiringLead"] + """ + + id: StrictInt | None = Field(default=None, description="Job opening ID") + title: ApplicationDetailsJobTitle | None = None + hiring_lead: dict[str, Any] | None = Field(default=None, alias="hiringLead") + __properties: ClassVar[list[str]] = ["id", "title", "hiringLead"] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +38,6 @@ class ApplicationDetailsJob(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationDetailsJob from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -64,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,14 +71,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of title if self.title: - _dict['title'] = self.title.to_dict() - # override the default output from pydantic by calling `to_dict()` of hiring_lead - if self.hiring_lead: - _dict['hiringLead'] = self.hiring_lead.to_dict() + _dict["title"] = self.title.to_dict() + # set to None if hiring_lead (nullable) is None + # and model_fields_set contains the field + if self.hiring_lead is None and "hiring_lead" in self.model_fields_set: + _dict["hiringLead"] = None + return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationDetailsJob from a dict""" if obj is None: return None @@ -89,11 +88,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "title": ApplicationDetailsJobTitle.from_dict(obj["title"]) if obj.get("title") is not None else None, - "hiringLead": ApplicationDetailsJobHiringLead.from_dict(obj["hiringLead"]) if obj.get("hiringLead") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "title": ApplicationDetailsJobTitle.from_dict(obj["title"]) if obj.get("title") is not None else None, + "hiringLead": obj.get("hiringLead"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/application_details_job_hiring_lead.py b/bamboohr_sdk/models/application_details_job_hiring_lead.py deleted file mode 100644 index f47ff66..0000000 --- a/bamboohr_sdk/models/application_details_job_hiring_lead.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.application_details_job_hiring_lead_job_title import ApplicationDetailsJobHiringLeadJobTitle -from typing import Optional, Set -from typing_extensions import Self - -class ApplicationDetailsJobHiringLead(BaseModel): - """ - The hiring lead for this job opening - """ # noqa: E501 - employee_id: Optional[StrictInt] = Field(default=None, description="Employee ID of the hiring lead", alias="employeeId") - first_name: Optional[StrictStr] = Field(default=None, description="First name", alias="firstName") - last_name: Optional[StrictStr] = Field(default=None, description="Last name", alias="lastName") - avatar: Optional[StrictStr] = Field(default=None, description="URL to avatar image") - job_title: Optional[ApplicationDetailsJobHiringLeadJobTitle] = Field(default=None, alias="jobTitle") - __properties: ClassVar[List[str]] = ["employeeId", "firstName", "lastName", "avatar", "jobTitle"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApplicationDetailsJobHiringLead from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of job_title - if self.job_title: - _dict['jobTitle'] = self.job_title.to_dict() - # set to None if avatar (nullable) is None - # and model_fields_set contains the field - if self.avatar is None and "avatar" in self.model_fields_set: - _dict['avatar'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApplicationDetailsJobHiringLead from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "employeeId": obj.get("employeeId"), - "firstName": obj.get("firstName"), - "lastName": obj.get("lastName"), - "avatar": obj.get("avatar"), - "jobTitle": ApplicationDetailsJobHiringLeadJobTitle.from_dict(obj["jobTitle"]) if obj.get("jobTitle") is not None else None - }) - return _obj - - diff --git a/bamboohr_sdk/models/application_details_job_title.py b/bamboohr_sdk/models/application_details_job_title.py index 793f301..4f3e60e 100644 --- a/bamboohr_sdk/models/application_details_job_title.py +++ b/bamboohr_sdk/models/application_details_job_title.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class ApplicationDetailsJobTitle(BaseModel): """ Job title - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Title ID, or null if not set") - label: Optional[StrictStr] = Field(default=None, description="Title text") - __properties: ClassVar[List[str]] = ["id", "label"] + """ + + id: StrictInt | None = None + label: StrictStr | None = Field(default=None, description="Title text") + __properties: ClassVar[list[str]] = ["id", "label"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class ApplicationDetailsJobTitle(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationDetailsJobTitle from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,12 +69,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if id (nullable) is None # and model_fields_set contains the field if self.id is None and "id" in self.model_fields_set: - _dict['id'] = None + _dict["id"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationDetailsJobTitle from a dict""" if obj is None: return None @@ -85,10 +82,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "label": obj.get("label") - }) + _obj = cls.model_validate({"id": obj.get("id"), "label": obj.get("label")}) return _obj - - diff --git a/bamboohr_sdk/models/application_details_questions_and_answers_inner.py b/bamboohr_sdk/models/application_details_questions_and_answers_inner.py index b3ab3a5..3d3f4a4 100644 --- a/bamboohr_sdk/models/application_details_questions_and_answers_inner.py +++ b/bamboohr_sdk/models/application_details_questions_and_answers_inner.py @@ -1,42 +1,54 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.application_details_questions_and_answers_inner_answer import ApplicationDetailsQuestionsAndAnswersInnerAnswer -from bamboohr_sdk.models.application_details_questions_and_answers_inner_question import ApplicationDetailsQuestionsAndAnswersInnerQuestion -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.application_details_questions_and_answers_inner_answer import ( + ApplicationDetailsQuestionsAndAnswersInnerAnswer, +) +from bamboohr_sdk.models.application_details_questions_and_answers_inner_question import ( + ApplicationDetailsQuestionsAndAnswersInnerQuestion, +) + + class ApplicationDetailsQuestionsAndAnswersInner(BaseModel): """ ApplicationDetailsQuestionsAndAnswersInner - """ # noqa: E501 - question: Optional[ApplicationDetailsQuestionsAndAnswersInnerQuestion] = None - answer: Optional[ApplicationDetailsQuestionsAndAnswersInnerAnswer] = None - has_revisions: Optional[StrictBool] = Field(default=None, description="Whether this answer has revision history", alias="hasRevisions") - is_archived: Optional[StrictBool] = Field(default=None, description="Whether this answer is archived", alias="isArchived") - archived_date: Optional[datetime] = Field(default=None, description="ISO 8601 datetime when the answer was archived, or null", alias="archivedDate") - edited_date: Optional[datetime] = Field(default=None, description="ISO 8601 datetime when the answer was last edited, or null", alias="editedDate") - edited_end_date: Optional[datetime] = Field(default=None, description="ISO 8601 datetime for the end date of the edit window, or null", alias="editedEndDate") - __properties: ClassVar[List[str]] = ["question", "answer", "hasRevisions", "isArchived", "archivedDate", "editedDate", "editedEndDate"] + """ + + question: ApplicationDetailsQuestionsAndAnswersInnerQuestion | None = None + answer: ApplicationDetailsQuestionsAndAnswersInnerAnswer | None = None + has_revisions: StrictBool | None = Field(default=None, alias="hasRevisions") + is_archived: StrictBool | None = Field(default=None, alias="isArchived") + archived_date: datetime | None = Field(default=None, alias="archivedDate") + edited_date: datetime | None = Field(default=None, alias="editedDate") + edited_end_date: datetime | None = Field(default=None, alias="editedEndDate") + __properties: ClassVar[list[str]] = [ + "question", + "answer", + "hasRevisions", + "isArchived", + "archivedDate", + "editedDate", + "editedEndDate", + ] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +56,6 @@ class ApplicationDetailsQuestionsAndAnswersInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,11 +66,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationDetailsQuestionsAndAnswersInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -69,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,39 +89,39 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of question if self.question: - _dict['question'] = self.question.to_dict() + _dict["question"] = self.question.to_dict() # override the default output from pydantic by calling `to_dict()` of answer if self.answer: - _dict['answer'] = self.answer.to_dict() + _dict["answer"] = self.answer.to_dict() # set to None if has_revisions (nullable) is None # and model_fields_set contains the field if self.has_revisions is None and "has_revisions" in self.model_fields_set: - _dict['hasRevisions'] = None + _dict["hasRevisions"] = None # set to None if is_archived (nullable) is None # and model_fields_set contains the field if self.is_archived is None and "is_archived" in self.model_fields_set: - _dict['isArchived'] = None + _dict["isArchived"] = None # set to None if archived_date (nullable) is None # and model_fields_set contains the field if self.archived_date is None and "archived_date" in self.model_fields_set: - _dict['archivedDate'] = None + _dict["archivedDate"] = None # set to None if edited_date (nullable) is None # and model_fields_set contains the field if self.edited_date is None and "edited_date" in self.model_fields_set: - _dict['editedDate'] = None + _dict["editedDate"] = None # set to None if edited_end_date (nullable) is None # and model_fields_set contains the field if self.edited_end_date is None and "edited_end_date" in self.model_fields_set: - _dict['editedEndDate'] = None + _dict["editedEndDate"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationDetailsQuestionsAndAnswersInner from a dict""" if obj is None: return None @@ -119,15 +129,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "question": ApplicationDetailsQuestionsAndAnswersInnerQuestion.from_dict(obj["question"]) if obj.get("question") is not None else None, - "answer": ApplicationDetailsQuestionsAndAnswersInnerAnswer.from_dict(obj["answer"]) if obj.get("answer") is not None else None, - "hasRevisions": obj.get("hasRevisions"), - "isArchived": obj.get("isArchived"), - "archivedDate": obj.get("archivedDate"), - "editedDate": obj.get("editedDate"), - "editedEndDate": obj.get("editedEndDate") - }) + _obj = cls.model_validate( + { + "question": ApplicationDetailsQuestionsAndAnswersInnerQuestion.from_dict(obj["question"]) + if obj.get("question") is not None + else None, + "answer": ApplicationDetailsQuestionsAndAnswersInnerAnswer.from_dict(obj["answer"]) + if obj.get("answer") is not None + else None, + "hasRevisions": obj.get("hasRevisions"), + "isArchived": obj.get("isArchived"), + "archivedDate": obj.get("archivedDate"), + "editedDate": obj.get("editedDate"), + "editedEndDate": obj.get("editedEndDate"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/application_details_questions_and_answers_inner_answer.py b/bamboohr_sdk/models/application_details_questions_and_answers_inner_answer.py index 4b85827..ebf92c8 100644 --- a/bamboohr_sdk/models/application_details_questions_and_answers_inner_answer.py +++ b/bamboohr_sdk/models/application_details_questions_and_answers_inner_answer.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class ApplicationDetailsQuestionsAndAnswersInnerAnswer(BaseModel): """ ApplicationDetailsQuestionsAndAnswersInnerAnswer - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Answer ID") - label: Optional[StrictStr] = Field(default=None, description="Answer text") - __properties: ClassVar[List[str]] = ["id", "label"] + """ + + id: StrictInt | None = Field(default=None, description="Answer ID") + label: StrictStr | None = Field(default=None, description="Answer text") + __properties: ClassVar[list[str]] = ["id", "label"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class ApplicationDetailsQuestionsAndAnswersInnerAnswer(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationDetailsQuestionsAndAnswersInnerAnswer from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationDetailsQuestionsAndAnswersInnerAnswer from a dict""" if obj is None: return None @@ -80,10 +77,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "label": obj.get("label") - }) + _obj = cls.model_validate({"id": obj.get("id"), "label": obj.get("label")}) return _obj - - diff --git a/bamboohr_sdk/models/application_details_questions_and_answers_inner_question.py b/bamboohr_sdk/models/application_details_questions_and_answers_inner_question.py index 350303b..ca67c62 100644 --- a/bamboohr_sdk/models/application_details_questions_and_answers_inner_question.py +++ b/bamboohr_sdk/models/application_details_questions_and_answers_inner_question.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class ApplicationDetailsQuestionsAndAnswersInnerQuestion(BaseModel): """ ApplicationDetailsQuestionsAndAnswersInnerQuestion - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Question ID") - label: Optional[StrictStr] = Field(default=None, description="Question text") - __properties: ClassVar[List[str]] = ["id", "label"] + """ + + id: StrictInt | None = Field(default=None, description="Question ID") + label: StrictStr | None = Field(default=None, description="Question text") + __properties: ClassVar[list[str]] = ["id", "label"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class ApplicationDetailsQuestionsAndAnswersInnerQuestion(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationDetailsQuestionsAndAnswersInnerQuestion from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationDetailsQuestionsAndAnswersInnerQuestion from a dict""" if obj is None: return None @@ -80,10 +77,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "label": obj.get("label") - }) + _obj = cls.model_validate({"id": obj.get("id"), "label": obj.get("label")}) return _obj - - diff --git a/bamboohr_sdk/models/application_details_status.py b/bamboohr_sdk/models/application_details_status.py index 5fbeda3..6f316f7 100644 --- a/bamboohr_sdk/models/application_details_status.py +++ b/bamboohr_sdk/models/application_details_status.py @@ -1,38 +1,38 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.application_details_status_changed_by_user import ApplicationDetailsStatusChangedByUser -from typing import Optional, Set from typing_extensions import Self + class ApplicationDetailsStatus(BaseModel): """ ApplicationDetailsStatus - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Status ID") - label: Optional[StrictStr] = Field(default=None, description="Status name") - date_changed: Optional[datetime] = Field(default=None, description="ISO 8601 datetime when status was last changed", alias="dateChanged") - changed_by_user: Optional[ApplicationDetailsStatusChangedByUser] = Field(default=None, alias="changedByUser") - __properties: ClassVar[List[str]] = ["id", "label", "dateChanged", "changedByUser"] + """ + + id: StrictInt | None = Field(default=None, description="Status ID") + label: StrictStr | None = Field(default=None, description="Status name") + date_changed: datetime | None = Field( + default=None, description="ISO 8601 datetime when status was last changed", alias="dateChanged" + ) + changed_by_user: dict[str, Any] | None = Field(default=None, alias="changedByUser") + __properties: ClassVar[list[str]] = ["id", "label", "dateChanged", "changedByUser"] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +40,6 @@ class ApplicationDetailsStatus(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,11 +50,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationDetailsStatus from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -65,21 +64,22 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of changed_by_user - if self.changed_by_user: - _dict['changedByUser'] = self.changed_by_user.to_dict() + # set to None if changed_by_user (nullable) is None + # and model_fields_set contains the field + if self.changed_by_user is None and "changed_by_user" in self.model_fields_set: + _dict["changedByUser"] = None + return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationDetailsStatus from a dict""" if obj is None: return None @@ -87,12 +87,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "label": obj.get("label"), - "dateChanged": obj.get("dateChanged"), - "changedByUser": ApplicationDetailsStatusChangedByUser.from_dict(obj["changedByUser"]) if obj.get("changedByUser") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "label": obj.get("label"), + "dateChanged": obj.get("dateChanged"), + "changedByUser": obj.get("changedByUser"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/application_details_status_changed_by_user.py b/bamboohr_sdk/models/application_details_status_changed_by_user.py deleted file mode 100644 index c6d4208..0000000 --- a/bamboohr_sdk/models/application_details_status_changed_by_user.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.application_details_status_changed_by_user_job_title import ApplicationDetailsStatusChangedByUserJobTitle -from typing import Optional, Set -from typing_extensions import Self - -class ApplicationDetailsStatusChangedByUser(BaseModel): - """ - The user who last changed the status, or null if changed by the system - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="User ID") - first_name: Optional[StrictStr] = Field(default=None, description="First name", alias="firstName") - last_name: Optional[StrictStr] = Field(default=None, description="Last name", alias="lastName") - avatar: Optional[StrictStr] = Field(default=None, description="URL to avatar image") - job_title: Optional[ApplicationDetailsStatusChangedByUserJobTitle] = Field(default=None, alias="jobTitle") - __properties: ClassVar[List[str]] = ["id", "firstName", "lastName", "avatar", "jobTitle"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApplicationDetailsStatusChangedByUser from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of job_title - if self.job_title: - _dict['jobTitle'] = self.job_title.to_dict() - # set to None if avatar (nullable) is None - # and model_fields_set contains the field - if self.avatar is None and "avatar" in self.model_fields_set: - _dict['avatar'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApplicationDetailsStatusChangedByUser from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "firstName": obj.get("firstName"), - "lastName": obj.get("lastName"), - "avatar": obj.get("avatar"), - "jobTitle": ApplicationDetailsStatusChangedByUserJobTitle.from_dict(obj["jobTitle"]) if obj.get("jobTitle") is not None else None - }) - return _obj - - diff --git a/bamboohr_sdk/models/applications_list.py b/bamboohr_sdk/models/applications_list.py index 988134c..03cb047 100644 --- a/bamboohr_sdk/models/applications_list.py +++ b/bamboohr_sdk/models/applications_list.py @@ -1,36 +1,42 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.applications_list_applications_inner import ApplicationsListApplicationsInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.applications_list_applications_inner import ApplicationsListApplicationsInner + + class ApplicationsList(BaseModel): """ ApplicationsList - """ # noqa: E501 - pagination_complete: Optional[StrictBool] = Field(default=None, description="Indicates whether there are more pages of results available", alias="paginationComplete") - next_page_url: Optional[StrictStr] = Field(default=None, description="URL to fetch the next page of results, or null if there are no more results", alias="nextPageUrl") - applications: Optional[List[ApplicationsListApplicationsInner]] = Field(default=None, description="List of application objects") - __properties: ClassVar[List[str]] = ["paginationComplete", "nextPageUrl", "applications"] + """ + + pagination_complete: StrictBool | None = Field( + default=None, + description="Indicates whether there are more pages of results available", + alias="paginationComplete", + ) + next_page_url: StrictStr | None = Field(default=None, alias="nextPageUrl") + applications: list[ApplicationsListApplicationsInner] | None = Field( + default=None, description="List of application objects" + ) + __properties: ClassVar[list[str]] = ["paginationComplete", "nextPageUrl", "applications"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +44,6 @@ class ApplicationsList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +54,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationsList from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +68,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,16 +81,16 @@ def to_dict(self) -> Dict[str, Any]: for _item_applications in self.applications: if _item_applications: _items.append(_item_applications.to_dict()) - _dict['applications'] = _items + _dict["applications"] = _items # set to None if next_page_url (nullable) is None # and model_fields_set contains the field if self.next_page_url is None and "next_page_url" in self.model_fields_set: - _dict['nextPageUrl'] = None + _dict["nextPageUrl"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationsList from a dict""" if obj is None: return None @@ -94,11 +98,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "paginationComplete": obj.get("paginationComplete"), - "nextPageUrl": obj.get("nextPageUrl"), - "applications": [ApplicationsListApplicationsInner.from_dict(_item) for _item in obj["applications"]] if obj.get("applications") is not None else None - }) + _obj = cls.model_validate( + { + "paginationComplete": obj.get("paginationComplete"), + "nextPageUrl": obj.get("nextPageUrl"), + "applications": [ApplicationsListApplicationsInner.from_dict(_item) for _item in obj["applications"]] + if obj.get("applications") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/applications_list_applications_inner.py b/bamboohr_sdk/models/applications_list_applications_inner.py index fbd74bb..0bc20fa 100644 --- a/bamboohr_sdk/models/applications_list_applications_inner.py +++ b/bamboohr_sdk/models/applications_list_applications_inner.py @@ -1,42 +1,46 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.applications_list_applications_inner_applicant import ApplicationsListApplicationsInnerApplicant +from typing_extensions import Self + +from bamboohr_sdk.models.applications_list_applications_inner_applicant import ( + ApplicationsListApplicationsInnerApplicant, +) from bamboohr_sdk.models.applications_list_applications_inner_job import ApplicationsListApplicationsInnerJob from bamboohr_sdk.models.applications_list_applications_inner_status import ApplicationsListApplicationsInnerStatus -from typing import Optional, Set -from typing_extensions import Self + class ApplicationsListApplicationsInner(BaseModel): """ ApplicationsListApplicationsInner - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Application ID") - applied_date: Optional[datetime] = Field(default=None, description="ISO 8601 datetime when the application was submitted", alias="appliedDate") - status: Optional[ApplicationsListApplicationsInnerStatus] = None - rating: Optional[StrictInt] = Field(default=None, description="Candidate rating (1-5) or null if not rated") - applicant: Optional[ApplicationsListApplicationsInnerApplicant] = None - job: Optional[ApplicationsListApplicationsInnerJob] = None - __properties: ClassVar[List[str]] = ["id", "appliedDate", "status", "rating", "applicant", "job"] + """ + + id: StrictInt | None = Field(default=None, description="Application ID") + applied_date: datetime | None = Field( + default=None, description="ISO 8601 datetime when the application was submitted", alias="appliedDate" + ) + status: ApplicationsListApplicationsInnerStatus | None = None + rating: StrictInt | None = None + applicant: ApplicationsListApplicationsInnerApplicant | None = None + job: ApplicationsListApplicationsInnerJob | None = None + __properties: ClassVar[list[str]] = ["id", "appliedDate", "status", "rating", "applicant", "job"] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +48,6 @@ class ApplicationsListApplicationsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,11 +58,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationsListApplicationsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -69,8 +72,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,22 +81,22 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of status if self.status: - _dict['status'] = self.status.to_dict() + _dict["status"] = self.status.to_dict() # override the default output from pydantic by calling `to_dict()` of applicant if self.applicant: - _dict['applicant'] = self.applicant.to_dict() + _dict["applicant"] = self.applicant.to_dict() # override the default output from pydantic by calling `to_dict()` of job if self.job: - _dict['job'] = self.job.to_dict() + _dict["job"] = self.job.to_dict() # set to None if rating (nullable) is None # and model_fields_set contains the field if self.rating is None and "rating" in self.model_fields_set: - _dict['rating'] = None + _dict["rating"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationsListApplicationsInner from a dict""" if obj is None: return None @@ -102,14 +104,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "appliedDate": obj.get("appliedDate"), - "status": ApplicationsListApplicationsInnerStatus.from_dict(obj["status"]) if obj.get("status") is not None else None, - "rating": obj.get("rating"), - "applicant": ApplicationsListApplicationsInnerApplicant.from_dict(obj["applicant"]) if obj.get("applicant") is not None else None, - "job": ApplicationsListApplicationsInnerJob.from_dict(obj["job"]) if obj.get("job") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "appliedDate": obj.get("appliedDate"), + "status": ApplicationsListApplicationsInnerStatus.from_dict(obj["status"]) + if obj.get("status") is not None + else None, + "rating": obj.get("rating"), + "applicant": ApplicationsListApplicationsInnerApplicant.from_dict(obj["applicant"]) + if obj.get("applicant") is not None + else None, + "job": ApplicationsListApplicationsInnerJob.from_dict(obj["job"]) + if obj.get("job") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/applications_list_applications_inner_applicant.py b/bamboohr_sdk/models/applications_list_applications_inner_applicant.py index e33870f..031490f 100644 --- a/bamboohr_sdk/models/applications_list_applications_inner_applicant.py +++ b/bamboohr_sdk/models/applications_list_applications_inner_applicant.py @@ -1,38 +1,37 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class ApplicationsListApplicationsInnerApplicant(BaseModel): """ Information about the applicant - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Applicant ID") - first_name: Optional[StrictStr] = Field(default=None, description="Applicant's first name", alias="firstName") - last_name: Optional[StrictStr] = Field(default=None, description="Applicant's last name", alias="lastName") - avatar: Optional[StrictStr] = Field(default=None, description="URL to applicant's avatar image, or null") - email: Optional[StrictStr] = Field(default=None, description="Applicant's email address") - source: Optional[StrictStr] = Field(default=None, description="Source of the application") - __properties: ClassVar[List[str]] = ["id", "firstName", "lastName", "avatar", "email", "source"] + """ + + id: StrictInt | None = Field(default=None, description="Applicant ID") + first_name: StrictStr | None = Field(default=None, description="Applicant's first name", alias="firstName") + last_name: StrictStr | None = Field(default=None, description="Applicant's last name", alias="lastName") + avatar: StrictStr | None = None + email: StrictStr | None = Field(default=None, description="Applicant's email address") + source: StrictStr | None = Field(default=None, description="Source of the application") + __properties: ClassVar[list[str]] = ["id", "firstName", "lastName", "avatar", "email", "source"] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +39,6 @@ class ApplicationsListApplicationsInnerApplicant(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,11 +49,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationsListApplicationsInnerApplicant from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -65,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,12 +73,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if avatar (nullable) is None # and model_fields_set contains the field if self.avatar is None and "avatar" in self.model_fields_set: - _dict['avatar'] = None + _dict["avatar"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationsListApplicationsInnerApplicant from a dict""" if obj is None: return None @@ -89,14 +86,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "firstName": obj.get("firstName"), - "lastName": obj.get("lastName"), - "avatar": obj.get("avatar"), - "email": obj.get("email"), - "source": obj.get("source") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "avatar": obj.get("avatar"), + "email": obj.get("email"), + "source": obj.get("source"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/applications_list_applications_inner_job.py b/bamboohr_sdk/models/applications_list_applications_inner_job.py index 05d53a2..4f8fb2f 100644 --- a/bamboohr_sdk/models/applications_list_applications_inner_job.py +++ b/bamboohr_sdk/models/applications_list_applications_inner_job.py @@ -1,35 +1,35 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.applications_list_applications_inner_job_title import ApplicationsListApplicationsInnerJobTitle -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.applications_list_applications_inner_job_title import ApplicationsListApplicationsInnerJobTitle + + class ApplicationsListApplicationsInnerJob(BaseModel): """ Information about the job position - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Job position ID") - title: Optional[ApplicationsListApplicationsInnerJobTitle] = None - __properties: ClassVar[List[str]] = ["id", "title"] + """ + + id: StrictInt | None = Field(default=None, description="Job position ID") + title: ApplicationsListApplicationsInnerJobTitle | None = None + __properties: ClassVar[list[str]] = ["id", "title"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +37,6 @@ class ApplicationsListApplicationsInnerJob(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +47,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationsListApplicationsInnerJob from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,11 +70,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of title if self.title: - _dict['title'] = self.title.to_dict() + _dict["title"] = self.title.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationsListApplicationsInnerJob from a dict""" if obj is None: return None @@ -84,10 +82,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "title": ApplicationsListApplicationsInnerJobTitle.from_dict(obj["title"]) if obj.get("title") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "title": ApplicationsListApplicationsInnerJobTitle.from_dict(obj["title"]) + if obj.get("title") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/applications_list_applications_inner_job_title.py b/bamboohr_sdk/models/applications_list_applications_inner_job_title.py index b239efc..f84b9f9 100644 --- a/bamboohr_sdk/models/applications_list_applications_inner_job_title.py +++ b/bamboohr_sdk/models/applications_list_applications_inner_job_title.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class ApplicationsListApplicationsInnerJobTitle(BaseModel): """ Job position title - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Title ID, or null if not set") - label: Optional[StrictStr] = Field(default=None, description="Title text") - __properties: ClassVar[List[str]] = ["id", "label"] + """ + + id: StrictInt | None = None + label: StrictStr | None = Field(default=None, description="Title text") + __properties: ClassVar[list[str]] = ["id", "label"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class ApplicationsListApplicationsInnerJobTitle(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationsListApplicationsInnerJobTitle from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,12 +69,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if id (nullable) is None # and model_fields_set contains the field if self.id is None and "id" in self.model_fields_set: - _dict['id'] = None + _dict["id"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationsListApplicationsInnerJobTitle from a dict""" if obj is None: return None @@ -85,10 +82,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "label": obj.get("label") - }) + _obj = cls.model_validate({"id": obj.get("id"), "label": obj.get("label")}) return _obj - - diff --git a/bamboohr_sdk/models/applications_list_applications_inner_status.py b/bamboohr_sdk/models/applications_list_applications_inner_status.py index 9010ef9..53f86ab 100644 --- a/bamboohr_sdk/models/applications_list_applications_inner_status.py +++ b/bamboohr_sdk/models/applications_list_applications_inner_status.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class ApplicationsListApplicationsInnerStatus(BaseModel): """ Current status of the application - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Status ID") - label: Optional[StrictStr] = Field(default=None, description="Status name") - __properties: ClassVar[List[str]] = ["id", "label"] + """ + + id: StrictInt | None = Field(default=None, description="Status ID") + label: StrictStr | None = Field(default=None, description="Status name") + __properties: ClassVar[list[str]] = ["id", "label"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class ApplicationsListApplicationsInnerStatus(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ApplicationsListApplicationsInnerStatus from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ApplicationsListApplicationsInnerStatus from a dict""" if obj is None: return None @@ -80,10 +77,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "label": obj.get("label") - }) + _obj = cls.model_validate({"id": obj.get("id"), "label": obj.get("label")}) return _obj - - diff --git a/bamboohr_sdk/models/approve_timesheet_request.py b/bamboohr_sdk/models/approve_timesheet_request.py new file mode 100644 index 0000000..ab28161 --- /dev/null +++ b/bamboohr_sdk/models/approve_timesheet_request.py @@ -0,0 +1,85 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import datetime +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing_extensions import Self + + +class ApproveTimesheetRequest(BaseModel): + """ + ApproveTimesheetRequest + """ + + timesheet_id: StrictInt = Field(description="ID of the timesheet to approve.", alias="timesheetId") + last_changed_at: datetime = Field( + description="The timesheet's `hoursLastChangedAt` value as last fetched by the caller, in ISO 8601 UTC. This is specifically `hoursLastChangedAt`, not `updatedAt`: hours are stored separately, so the timesheet row's `updatedAt` may not move when hours change (and vice versa). The approval is rejected with 409 if the timesheet's hours changed after this instant, so callers never approve a version they have not seen.", + alias="lastChangedAt", + ) + __properties: ClassVar[list[str]] = ["timesheetId", "lastChangedAt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of ApproveTimesheetRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of ApproveTimesheetRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"timesheetId": obj.get("timesheetId"), "lastChangedAt": obj.get("lastChangedAt")}) + return _obj diff --git a/bamboohr_sdk/models/archive_custom_field_response.py b/bamboohr_sdk/models/archive_custom_field_response.py new file mode 100644 index 0000000..8d73a7c --- /dev/null +++ b/bamboohr_sdk/models/archive_custom_field_response.py @@ -0,0 +1,80 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing_extensions import Self + + +class ArchiveCustomFieldResponse(BaseModel): + """ + ArchiveCustomFieldResponse + """ + + success: StrictBool | None = None + __properties: ClassVar[list[str]] = ["success"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of ArchiveCustomFieldResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of ArchiveCustomFieldResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"success": obj.get("success")}) + return _obj diff --git a/bamboohr_sdk/models/archived_custom_fields_list_response.py b/bamboohr_sdk/models/archived_custom_fields_list_response.py new file mode 100644 index 0000000..28f477c --- /dev/null +++ b/bamboohr_sdk/models/archived_custom_fields_list_response.py @@ -0,0 +1,113 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from bamboohr_sdk.models.available_action import AvailableAction +from bamboohr_sdk.models.custom_field_definition_response_object import CustomFieldDefinitionResponseObject +from bamboohr_sdk.models.pagination_meta_data import PaginationMetaData + + +class ArchivedCustomFieldsListResponse(BaseModel): + """ + ArchivedCustomFieldsListResponse + """ + + data: list[CustomFieldDefinitionResponseObject] | None = None + meta: PaginationMetaData | None = Field(default=None, description="The pagination metadata for the response.") + links: dict[str, AvailableAction] | None = Field(default=None, alias="_links") + __properties: ClassVar[list[str]] = ["data", "meta", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of ArchivedCustomFieldsListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict["data"] = _items + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict["meta"] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in links (dict) + _field_dict = {} + if self.links: + for _key_links in self.links: + if self.links[_key_links]: + _field_dict[_key_links] = self.links[_key_links].to_dict() + _dict["_links"] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of ArchivedCustomFieldsListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "data": [CustomFieldDefinitionResponseObject.from_dict(_item) for _item in obj["data"]] + if obj.get("data") is not None + else None, + "meta": PaginationMetaData.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "_links": dict((_k, AvailableAction.from_dict(_v)) for _k, _v in obj["_links"].items()) + if obj.get("_links") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/assign_employees_to_break_policy_request.py b/bamboohr_sdk/models/assign_employees_to_break_policy_request.py index bc40c4d..6bb1ae4 100644 --- a/bamboohr_sdk/models/assign_employees_to_break_policy_request.py +++ b/bamboohr_sdk/models/assign_employees_to_break_policy_request.py @@ -1,34 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Annotated, Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set from typing_extensions import Self + class AssignEmployeesToBreakPolicyRequest(BaseModel): """ AssignEmployeesToBreakPolicyRequest - """ # noqa: E501 - employee_ids: Annotated[List[StrictInt], Field(min_length=1)] = Field(description="Array of employee IDs to assign to the break policy", alias="employeeIds") - __properties: ClassVar[List[str]] = ["employeeIds"] + """ + + employee_ids: Annotated[list[StrictInt | None], Field(min_length=1)] = Field( + description="Array of internal employee IDs to assign to the break policy", alias="employeeIds" + ) + __properties: ClassVar[list[str]] = ["employeeIds"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +36,6 @@ class AssignEmployeesToBreakPolicyRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of AssignEmployeesToBreakPolicyRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of AssignEmployeesToBreakPolicyRequest from a dict""" if obj is None: return None @@ -80,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "employeeIds": obj.get("employeeIds") - }) + _obj = cls.model_validate({"employeeIds": obj.get("employeeIds")}) return _obj - - diff --git a/bamboohr_sdk/models/assign_time_off_policies_request_inner.py b/bamboohr_sdk/models/assign_time_off_policies_v1_request_inner.py similarity index 54% rename from bamboohr_sdk/models/assign_time_off_policies_request_inner.py rename to bamboohr_sdk/models/assign_time_off_policies_v1_request_inner.py index 2eecf5a..1e17b01 100644 --- a/bamboohr_sdk/models/assign_time_off_policies_request_inner.py +++ b/bamboohr_sdk/models/assign_time_off_policies_v1_request_inner.py @@ -1,35 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class AssignTimeOffPoliciesRequestInner(BaseModel): + +class AssignTimeOffPoliciesV1RequestInner(BaseModel): + """ + AssignTimeOffPoliciesV1RequestInner """ - AssignTimeOffPoliciesRequestInner - """ # noqa: E501 - time_off_policy_id: StrictInt = Field(description="The ID of the time off policy to assign.", alias="timeOffPolicyId") - accrual_start_date: Optional[date] = Field(description="The date accruals should start in YYYY-MM-DD format. Set to null to remove an existing assignment.", alias="accrualStartDate") - __properties: ClassVar[List[str]] = ["timeOffPolicyId", "accrualStartDate"] + + time_off_policy_id: StrictInt = Field( + description="The ID of the time off policy to assign.", alias="timeOffPolicyId" + ) + accrual_start_date: date | None = Field(alias="accrualStartDate") + __properties: ClassVar[list[str]] = ["timeOffPolicyId", "accrualStartDate"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +38,6 @@ class AssignTimeOffPoliciesRequestInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AssignTimeOffPoliciesRequestInner from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of AssignTimeOffPoliciesV1RequestInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,23 +72,20 @@ def to_dict(self) -> Dict[str, Any]: # set to None if accrual_start_date (nullable) is None # and model_fields_set contains the field if self.accrual_start_date is None and "accrual_start_date" in self.model_fields_set: - _dict['accrualStartDate'] = None + _dict["accrualStartDate"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AssignTimeOffPoliciesRequestInner from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of AssignTimeOffPoliciesV1RequestInner from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "timeOffPolicyId": obj.get("timeOffPolicyId"), - "accrualStartDate": obj.get("accrualStartDate") - }) + _obj = cls.model_validate( + {"timeOffPolicyId": obj.get("timeOffPolicyId"), "accrualStartDate": obj.get("accrualStartDate")} + ) return _obj - - diff --git a/bamboohr_sdk/models/assigned_time_off_policy.py b/bamboohr_sdk/models/assigned_time_off_policy.py index b82683d..4f8e32e 100644 --- a/bamboohr_sdk/models/assigned_time_off_policy.py +++ b/bamboohr_sdk/models/assigned_time_off_policy.py @@ -1,36 +1,41 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class AssignedTimeOffPolicy(BaseModel): """ AssignedTimeOffPolicy - """ # noqa: E501 - time_off_policy_id: Optional[StrictInt] = Field(default=None, description="The ID of the assigned time off policy.", alias="timeOffPolicyId") - time_off_type_id: Optional[StrictInt] = Field(default=None, description="The ID of the time off type.", alias="timeOffTypeId") - accrual_start_date: Optional[date] = Field(default=None, description="The date accruals started in YYYY-MM-DD format.", alias="accrualStartDate") - __properties: ClassVar[List[str]] = ["timeOffPolicyId", "timeOffTypeId", "accrualStartDate"] + """ + + time_off_policy_id: StrictInt | None = Field( + default=None, description="The ID of the assigned time off policy.", alias="timeOffPolicyId" + ) + time_off_type_id: StrictInt | None = Field( + default=None, description="The ID of the time off type.", alias="timeOffTypeId" + ) + accrual_start_date: date | None = Field( + default=None, description="The date accruals started in YYYY-MM-DD format.", alias="accrualStartDate" + ) + __properties: ClassVar[list[str]] = ["timeOffPolicyId", "timeOffTypeId", "accrualStartDate"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +43,6 @@ class AssignedTimeOffPolicy(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +53,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of AssignedTimeOffPolicy from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +67,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of AssignedTimeOffPolicy from a dict""" if obj is None: return None @@ -82,11 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "timeOffPolicyId": obj.get("timeOffPolicyId"), - "timeOffTypeId": obj.get("timeOffTypeId"), - "accrualStartDate": obj.get("accrualStartDate") - }) + _obj = cls.model_validate( + { + "timeOffPolicyId": obj.get("timeOffPolicyId"), + "timeOffTypeId": obj.get("timeOffTypeId"), + "accrualStartDate": obj.get("accrualStartDate"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/assigned_time_off_policy_v11.py b/bamboohr_sdk/models/assigned_time_off_policy_v11.py index da56dff..caea430 100644 --- a/bamboohr_sdk/models/assigned_time_off_policy_v11.py +++ b/bamboohr_sdk/models/assigned_time_off_policy_v11.py @@ -1,36 +1,39 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class AssignedTimeOffPolicyV11(BaseModel): """ AssignedTimeOffPolicyV11 - """ # noqa: E501 - time_off_policy_id: Optional[StrictInt] = Field(default=None, description="The ID of the assigned time off policy.", alias="timeOffPolicyId") - time_off_type_id: Optional[StrictInt] = Field(default=None, description="The ID of the time off type.", alias="timeOffTypeId") - accrual_start_date: Optional[date] = Field(default=None, description="The date accruals started in YYYY-MM-DD format. Null for manual and unlimited policy types.", alias="accrualStartDate") - __properties: ClassVar[List[str]] = ["timeOffPolicyId", "timeOffTypeId", "accrualStartDate"] + """ + + time_off_policy_id: StrictInt | None = Field( + default=None, description="The ID of the assigned time off policy.", alias="timeOffPolicyId" + ) + time_off_type_id: StrictInt | None = Field( + default=None, description="The ID of the time off type.", alias="timeOffTypeId" + ) + accrual_start_date: date | None = Field(default=None, alias="accrualStartDate") + __properties: ClassVar[list[str]] = ["timeOffPolicyId", "timeOffTypeId", "accrualStartDate"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +41,6 @@ class AssignedTimeOffPolicyV11(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +51,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of AssignedTimeOffPolicyV11 from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,12 +75,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if accrual_start_date (nullable) is None # and model_fields_set contains the field if self.accrual_start_date is None and "accrual_start_date" in self.model_fields_set: - _dict['accrualStartDate'] = None + _dict["accrualStartDate"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of AssignedTimeOffPolicyV11 from a dict""" if obj is None: return None @@ -87,11 +88,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "timeOffPolicyId": obj.get("timeOffPolicyId"), - "timeOffTypeId": obj.get("timeOffTypeId"), - "accrualStartDate": obj.get("accrualStartDate") - }) + _obj = cls.model_validate( + { + "timeOffPolicyId": obj.get("timeOffPolicyId"), + "timeOffTypeId": obj.get("timeOffTypeId"), + "accrualStartDate": obj.get("accrualStartDate"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/available_action.py b/bamboohr_sdk/models/available_action.py index cb68c71..b495080 100644 --- a/bamboohr_sdk/models/available_action.py +++ b/bamboohr_sdk/models/available_action.py @@ -1,34 +1,44 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing_extensions import Self + class AvailableAction(BaseModel): """ Represents an action that can be performed on a resource based on permissions and resource state - """ # noqa: E501 - href: Optional[StrictStr] = Field(default=None, description="The URL for this action") - fields: Optional[List[Dict[str, Any]]] = Field(default=None, description="Fields that can be modified with this action") - __properties: ClassVar[List[str]] = ["href", "fields"] + """ + + href: StrictStr | None = Field(default=None, description="The URL for this action") + fields: list[dict[str, Any]] | None = None + method: StrictStr | None = None + __properties: ClassVar[list[str]] = ["href", "fields", "method"] + + @field_validator("method") + def method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["GET", "POST", "PUT", "PATCH", "DELETE"]): + raise ValueError("must be one of enum values ('GET', 'POST', 'PUT', 'PATCH', 'DELETE')") + return value model_config = ConfigDict( populate_by_name=True, @@ -36,7 +46,6 @@ class AvailableAction(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +56,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of AvailableAction from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +70,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,12 +80,17 @@ def to_dict(self) -> Dict[str, Any]: # set to None if fields (nullable) is None # and model_fields_set contains the field if self.fields is None and "fields" in self.model_fields_set: - _dict['fields'] = None + _dict["fields"] = None + + # set to None if method (nullable) is None + # and model_fields_set contains the field + if self.method is None and "method" in self.model_fields_set: + _dict["method"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of AvailableAction from a dict""" if obj is None: return None @@ -85,10 +98,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "href": obj.get("href"), - "fields": obj.get("fields") - }) + _obj = cls.model_validate({"href": obj.get("href"), "fields": obj.get("fields"), "method": obj.get("method")}) return _obj - - diff --git a/bamboohr_sdk/models/bad_request.py b/bamboohr_sdk/models/bad_request_v1.py similarity index 58% rename from bamboohr_sdk/models/bad_request.py rename to bamboohr_sdk/models/bad_request_v1.py index 3f081f3..8a33ce2 100644 --- a/bamboohr_sdk/models/bad_request.py +++ b/bamboohr_sdk/models/bad_request_v1.py @@ -1,34 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.bad_request_error import BadRequestError -from typing import Optional, Set from typing_extensions import Self -class BadRequest(BaseModel): +from bamboohr_sdk.models.bad_request_v1_error import BadRequestV1Error + + +class BadRequestV1(BaseModel): + """ + BadRequestV1 """ - BadRequest - """ # noqa: E501 - error: Optional[BadRequestError] = None - __properties: ClassVar[List[str]] = ["error"] + + error: BadRequestV1Error | None = None + __properties: ClassVar[list[str]] = ["error"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +36,6 @@ class BadRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of BadRequest from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of BadRequestV1 from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,21 +69,19 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of error if self.error: - _dict['error'] = self.error.to_dict() + _dict["error"] = self.error.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BadRequest from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of BadRequestV1 from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "error": BadRequestError.from_dict(obj["error"]) if obj.get("error") is not None else None - }) + _obj = cls.model_validate( + {"error": BadRequestV1Error.from_dict(obj["error"]) if obj.get("error") is not None else None} + ) return _obj - - diff --git a/bamboohr_sdk/models/time_tracking_record_schema_project_task.py b/bamboohr_sdk/models/bad_request_v1_error.py similarity index 57% rename from bamboohr_sdk/models/time_tracking_record_schema_project_task.py rename to bamboohr_sdk/models/bad_request_v1_error.py index 48349fe..1a6323c 100644 --- a/bamboohr_sdk/models/time_tracking_record_schema_project_task.py +++ b/bamboohr_sdk/models/bad_request_v1_error.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class TimeTrackingRecordSchemaProjectTask(BaseModel): + +class BadRequestV1Error(BaseModel): + """ + BadRequestV1Error """ - TimeTrackingRecordSchemaProjectTask - """ # noqa: E501 - id: Optional[StrictInt] = None - name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "name"] + + code: StrictInt | None = None + message: StrictStr | None = None + __properties: ClassVar[list[str]] = ["code", "message"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class TimeTrackingRecordSchemaProjectTask(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of TimeTrackingRecordSchemaProjectTask from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of BadRequestV1Error from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,18 +69,13 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TimeTrackingRecordSchemaProjectTask from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of BadRequestV1Error from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name") - }) + _obj = cls.model_validate({"code": obj.get("code"), "message": obj.get("message")}) return _obj - - diff --git a/bamboohr_sdk/models/job_summary_department.py b/bamboohr_sdk/models/bank_holiday.py similarity index 56% rename from bamboohr_sdk/models/job_summary_department.py rename to bamboohr_sdk/models/bank_holiday.py index bbe14c9..8434ce9 100644 --- a/bamboohr_sdk/models/job_summary_department.py +++ b/bamboohr_sdk/models/bank_holiday.py @@ -1,34 +1,35 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from datetime import date +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class JobSummaryDepartment(BaseModel): + +class BankHoliday(BaseModel): + """ + BankHoliday """ - Department information - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Department ID") - label: Optional[StrictStr] = Field(default=None, description="Department name") - __properties: ClassVar[List[str]] = ["id", "label"] + + id: StrictInt | None = Field(default=None, description="Stable bank holiday identifier") + name: StrictStr | None = Field(default=None, description="Holiday display name") + var_date: date | None = Field(default=None, description="Holiday date in YYYY-MM-DD form", alias="date") + __properties: ClassVar[list[str]] = ["id", "name", "date"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +37,6 @@ class JobSummaryDepartment(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +47,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of JobSummaryDepartment from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of BankHoliday from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,18 +71,13 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of JobSummaryDepartment from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of BankHoliday from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "label": obj.get("label") - }) + _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name"), "date": obj.get("date")}) return _obj - - diff --git a/bamboohr_sdk/models/benefit_coverages_response.py b/bamboohr_sdk/models/benefit_coverages_response.py index 981e2ea..27eb81f 100644 --- a/bamboohr_sdk/models/benefit_coverages_response.py +++ b/bamboohr_sdk/models/benefit_coverages_response.py @@ -1,34 +1,38 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.benefit_coverages_response_benefit_coverages_inner import BenefitCoveragesResponseBenefitCoveragesInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.benefit_coverages_response_benefit_coverages_inner import ( + BenefitCoveragesResponseBenefitCoveragesInner, +) + + class BenefitCoveragesResponse(BaseModel): """ BenefitCoveragesResponse - """ # noqa: E501 - benefit_coverages: Optional[List[BenefitCoveragesResponseBenefitCoveragesInner]] = Field(default=None, description="Array of benefit coverage level objects.", alias="Benefit Coverages") - __properties: ClassVar[List[str]] = ["Benefit Coverages"] + """ + + benefit_coverages: list[BenefitCoveragesResponseBenefitCoveragesInner] | None = Field( + default=None, description="Array of benefit coverage level objects.", alias="Benefit Coverages" + ) + __properties: ClassVar[list[str]] = ["Benefit Coverages"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +40,6 @@ class BenefitCoveragesResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +50,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of BenefitCoveragesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,11 +77,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_benefit_coverages in self.benefit_coverages: if _item_benefit_coverages: _items.append(_item_benefit_coverages.to_dict()) - _dict['Benefit Coverages'] = _items + _dict["Benefit Coverages"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of BenefitCoveragesResponse from a dict""" if obj is None: return None @@ -87,9 +89,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "Benefit Coverages": [BenefitCoveragesResponseBenefitCoveragesInner.from_dict(_item) for _item in obj["Benefit Coverages"]] if obj.get("Benefit Coverages") is not None else None - }) + _obj = cls.model_validate( + { + "Benefit Coverages": [ + BenefitCoveragesResponseBenefitCoveragesInner.from_dict(_item) for _item in obj["Benefit Coverages"] + ] + if obj.get("Benefit Coverages") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/benefit_coverages_response_benefit_coverages_inner.py b/bamboohr_sdk/models/benefit_coverages_response_benefit_coverages_inner.py index 5309c9d..5d327d7 100644 --- a/bamboohr_sdk/models/benefit_coverages_response_benefit_coverages_inner.py +++ b/bamboohr_sdk/models/benefit_coverages_response_benefit_coverages_inner.py @@ -1,37 +1,42 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class BenefitCoveragesResponseBenefitCoveragesInner(BaseModel): """ BenefitCoveragesResponseBenefitCoveragesInner - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The coverage level ID.") - short_name: Optional[StrictStr] = Field(default=None, description="The short display name for this coverage level (e.g. \"Employee + Spouse\").", alias="shortName") - description: Optional[StrictStr] = Field(default=None, description="An optional longer description of the coverage level. Null if not set.") - sort_order: Optional[StrictStr] = Field(default=None, description="The sort order used when displaying coverage levels.", alias="sortOrder") - benefit_plan_id: Optional[StrictStr] = Field(default=None, description="The benefit plan this coverage level belongs to, or null for company-wide coverage levels.", alias="benefitPlanId") - __properties: ClassVar[List[str]] = ["id", "shortName", "description", "sortOrder", "benefitPlanId"] + """ + + id: StrictStr | None = Field(default=None, description="The coverage level ID.") + short_name: StrictStr | None = Field( + default=None, + description='The short display name for this coverage level (e.g. "Employee + Spouse").', + alias="shortName", + ) + description: StrictStr | None = None + sort_order: StrictStr | None = Field( + default=None, description="The display sort order for this coverage level.", alias="sortOrder" + ) + benefit_plan_id: StrictStr | None = Field(default=None, alias="benefitPlanId") + __properties: ClassVar[list[str]] = ["id", "shortName", "description", "sortOrder", "benefitPlanId"] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +44,6 @@ class BenefitCoveragesResponseBenefitCoveragesInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,11 +54,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of BenefitCoveragesResponseBenefitCoveragesInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -64,8 +68,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,17 +78,17 @@ def to_dict(self) -> Dict[str, Any]: # set to None if description (nullable) is None # and model_fields_set contains the field if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None + _dict["description"] = None # set to None if benefit_plan_id (nullable) is None # and model_fields_set contains the field if self.benefit_plan_id is None and "benefit_plan_id" in self.model_fields_set: - _dict['benefitPlanId'] = None + _dict["benefitPlanId"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of BenefitCoveragesResponseBenefitCoveragesInner from a dict""" if obj is None: return None @@ -93,13 +96,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "shortName": obj.get("shortName"), - "description": obj.get("description"), - "sortOrder": obj.get("sortOrder"), - "benefitPlanId": obj.get("benefitPlanId") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "shortName": obj.get("shortName"), + "description": obj.get("description"), + "sortOrder": obj.get("sortOrder"), + "benefitPlanId": obj.get("benefitPlanId"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/benefit_deduction_sub_type.py b/bamboohr_sdk/models/benefit_deduction_sub_type.py index 38ebd3e..7542e01 100644 --- a/bamboohr_sdk/models/benefit_deduction_sub_type.py +++ b/bamboohr_sdk/models/benefit_deduction_sub_type.py @@ -1,46 +1,86 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class BenefitDeductionSubType(BaseModel): """ BenefitDeductionSubType - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="The sub-type deduction type ID (always an integer).") - deduction_type_name: Optional[StrictStr] = Field(default=None, description="The display name of the sub-type.", alias="deductionTypeName") - default_deduction_code: Optional[StrictStr] = Field(default=None, description="The default payroll deduction code for this sub-type.", alias="defaultDeductionCode") - allowable_benefit_types: Optional[List[StrictStr]] = Field(default=None, description="Benefit plan types this sub-type applies to.", alias="allowableBenefitTypes") - non_benefit_deduction_type: Optional[StrictBool] = Field(default=None, description="Whether this is a non-benefit deduction type.", alias="nonBenefitDeductionType") - can_be_collected_by_trax: Optional[StrictBool] = Field(default=None, description="Whether this sub-type can be collected via Trax Payroll.", alias="canBeCollectedByTrax") - additional_description: Optional[StrictStr] = Field(default=None, description="Additional description for display purposes.", alias="additionalDescription") - hide_annual_max: Optional[StrictBool] = Field(default=None, description="Whether the annual maximum field should be hidden.", alias="hideAnnualMax") - managed_deduction_type: Optional[StrictStr] = Field(default=None, description="The managed deduction type identifier, if applicable. Null if not managed.", alias="managedDeductionType") - sub_types: Optional[List[Dict[str, Any]]] = Field(default=None, description="Always an empty array for sub-types.", alias="subTypes") - sub_type_text: Optional[StrictStr] = Field(default=None, description="Sub-type selection label. Empty string for leaf types.", alias="subTypeText") - deduction_note: Optional[StrictStr] = Field(default=None, description="Informational note for this sub-type.", alias="deductionNote") - deduction_note_link: Optional[StrictStr] = Field(default=None, description="URL for the deduction note link.", alias="deductionNoteLink") - deduction_note_link_text: Optional[StrictStr] = Field(default=None, description="Display text for the deduction note link.", alias="deductionNoteLinkText") - __properties: ClassVar[List[str]] = ["id", "deductionTypeName", "defaultDeductionCode", "allowableBenefitTypes", "nonBenefitDeductionType", "canBeCollectedByTrax", "additionalDescription", "hideAnnualMax", "managedDeductionType", "subTypes", "subTypeText", "deductionNote", "deductionNoteLink", "deductionNoteLinkText"] + """ + + id: StrictInt | None = Field(default=None, description="The sub-type deduction type ID (always an integer).") + deduction_type_name: StrictStr | None = Field( + default=None, description="The display name of the sub-type.", alias="deductionTypeName" + ) + default_deduction_code: StrictStr | None = Field( + default=None, description="The default payroll deduction code for this sub-type.", alias="defaultDeductionCode" + ) + allowable_benefit_types: list[StrictStr | None] | None = Field( + default=None, description="Benefit plan types this sub-type applies to.", alias="allowableBenefitTypes" + ) + non_benefit_deduction_type: StrictBool | None = Field( + default=None, description="Whether this is a non-benefit deduction type.", alias="nonBenefitDeductionType" + ) + can_be_collected_by_trax: StrictBool | None = Field( + default=None, + description="Whether this sub-type can be collected via Trax Payroll.", + alias="canBeCollectedByTrax", + ) + additional_description: StrictStr | None = Field( + default=None, description="Additional description for display purposes.", alias="additionalDescription" + ) + hide_annual_max: StrictBool | None = Field( + default=None, description="Whether the annual maximum field should be hidden.", alias="hideAnnualMax" + ) + managed_deduction_type: StrictStr | None = Field(default=None, alias="managedDeductionType") + sub_types: list[dict[str, Any] | None] | None = Field( + default=None, description="Always an empty array for sub-types.", alias="subTypes" + ) + sub_type_text: StrictStr | None = Field( + default=None, description="Sub-type selection label. Empty string for leaf types.", alias="subTypeText" + ) + deduction_note: StrictStr | None = Field( + default=None, description="Informational note for this sub-type.", alias="deductionNote" + ) + deduction_note_link: StrictStr | None = Field( + default=None, description="URL for the deduction note link.", alias="deductionNoteLink" + ) + deduction_note_link_text: StrictStr | None = Field( + default=None, description="Display text for the deduction note link.", alias="deductionNoteLinkText" + ) + __properties: ClassVar[list[str]] = [ + "id", + "deductionTypeName", + "defaultDeductionCode", + "allowableBenefitTypes", + "nonBenefitDeductionType", + "canBeCollectedByTrax", + "additionalDescription", + "hideAnnualMax", + "managedDeductionType", + "subTypes", + "subTypeText", + "deductionNote", + "deductionNoteLink", + "deductionNoteLinkText", + ] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +88,6 @@ class BenefitDeductionSubType(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -59,11 +98,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of BenefitDeductionSubType from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -73,8 +112,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -84,12 +122,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if managed_deduction_type (nullable) is None # and model_fields_set contains the field if self.managed_deduction_type is None and "managed_deduction_type" in self.model_fields_set: - _dict['managedDeductionType'] = None + _dict["managedDeductionType"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of BenefitDeductionSubType from a dict""" if obj is None: return None @@ -97,22 +135,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "deductionTypeName": obj.get("deductionTypeName"), - "defaultDeductionCode": obj.get("defaultDeductionCode"), - "allowableBenefitTypes": obj.get("allowableBenefitTypes"), - "nonBenefitDeductionType": obj.get("nonBenefitDeductionType"), - "canBeCollectedByTrax": obj.get("canBeCollectedByTrax"), - "additionalDescription": obj.get("additionalDescription"), - "hideAnnualMax": obj.get("hideAnnualMax"), - "managedDeductionType": obj.get("managedDeductionType"), - "subTypes": obj.get("subTypes"), - "subTypeText": obj.get("subTypeText"), - "deductionNote": obj.get("deductionNote"), - "deductionNoteLink": obj.get("deductionNoteLink"), - "deductionNoteLinkText": obj.get("deductionNoteLinkText") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "deductionTypeName": obj.get("deductionTypeName"), + "defaultDeductionCode": obj.get("defaultDeductionCode"), + "allowableBenefitTypes": obj.get("allowableBenefitTypes"), + "nonBenefitDeductionType": obj.get("nonBenefitDeductionType"), + "canBeCollectedByTrax": obj.get("canBeCollectedByTrax"), + "additionalDescription": obj.get("additionalDescription"), + "hideAnnualMax": obj.get("hideAnnualMax"), + "managedDeductionType": obj.get("managedDeductionType"), + "subTypes": obj.get("subTypes"), + "subTypeText": obj.get("subTypeText"), + "deductionNote": obj.get("deductionNote"), + "deductionNoteLink": obj.get("deductionNoteLink"), + "deductionNoteLinkText": obj.get("deductionNoteLinkText"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/benefit_deduction_type.py b/bamboohr_sdk/models/benefit_deduction_type.py index cd725d1..0e62109 100644 --- a/bamboohr_sdk/models/benefit_deduction_type.py +++ b/bamboohr_sdk/models/benefit_deduction_type.py @@ -1,48 +1,105 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from bamboohr_sdk.models.benefit_deduction_sub_type import BenefitDeductionSubType from bamboohr_sdk.models.benefit_deduction_type_id import BenefitDeductionTypeId -from typing import Optional, Set -from typing_extensions import Self + class BenefitDeductionType(BaseModel): """ BenefitDeductionType - """ # noqa: E501 - id: Optional[BenefitDeductionTypeId] = None - deduction_type_name: Optional[StrictStr] = Field(default=None, description="The display name of the deduction type.", alias="deductionTypeName") - default_deduction_code: Optional[StrictStr] = Field(default=None, description="The default payroll deduction code for this type.", alias="defaultDeductionCode") - allowable_benefit_types: Optional[List[StrictStr]] = Field(default=None, description="The benefit plan types this deduction type can be applied to (e.g. \"health\", \"dental\", \"retirement\").", alias="allowableBenefitTypes") - non_benefit_deduction_type: Optional[StrictBool] = Field(default=None, description="Whether this is a non-benefit deduction type (e.g. garnishments).", alias="nonBenefitDeductionType") - can_be_collected_by_trax: Optional[StrictBool] = Field(default=None, description="Whether this deduction type can be collected via Trax Payroll.", alias="canBeCollectedByTrax") - additional_description: Optional[StrictStr] = Field(default=None, description="An optional additional description for display purposes.", alias="additionalDescription") - hide_annual_max: Optional[StrictBool] = Field(default=None, description="Whether the annual maximum field should be hidden for this deduction type.", alias="hideAnnualMax") - managed_deduction_type: Optional[StrictStr] = Field(default=None, description="The managed deduction type identifier, if applicable. Null if not managed.", alias="managedDeductionType") - sub_types: Optional[List[BenefitDeductionSubType]] = Field(default=None, description="Child deduction types grouped under this parent. Each entry has the same shape as a top-level deduction type. Empty array if this type has no sub-types.", alias="subTypes") - sub_type_text: Optional[StrictStr] = Field(default=None, description="A label or question displayed alongside sub-type selection (e.g. \"Reportable on the W-2?\"). Empty string for types without sub-types.", alias="subTypeText") - deduction_note: Optional[StrictStr] = Field(default=None, description="An informational note to display to the user when configuring this deduction type.", alias="deductionNote") - deduction_note_link: Optional[StrictStr] = Field(default=None, description="A URL for a \"learn more\" link associated with the deduction note.", alias="deductionNoteLink") - deduction_note_link_text: Optional[StrictStr] = Field(default=None, description="The display text for the deduction note link.", alias="deductionNoteLinkText") - __properties: ClassVar[List[str]] = ["id", "deductionTypeName", "defaultDeductionCode", "allowableBenefitTypes", "nonBenefitDeductionType", "canBeCollectedByTrax", "additionalDescription", "hideAnnualMax", "managedDeductionType", "subTypes", "subTypeText", "deductionNote", "deductionNoteLink", "deductionNoteLinkText"] + """ + + id: BenefitDeductionTypeId | None = None + deduction_type_name: StrictStr | None = Field( + default=None, description="The display name of the deduction type.", alias="deductionTypeName" + ) + default_deduction_code: StrictStr | None = Field( + default=None, description="The default payroll deduction code for this type.", alias="defaultDeductionCode" + ) + allowable_benefit_types: list[StrictStr | None] | None = Field( + default=None, + description='The benefit plan types this deduction type can be applied to (e.g. "health", "dental", "retirement").', + alias="allowableBenefitTypes", + ) + non_benefit_deduction_type: StrictBool | None = Field( + default=None, + description="Whether this is a non-benefit deduction type (e.g. garnishments).", + alias="nonBenefitDeductionType", + ) + can_be_collected_by_trax: StrictBool | None = Field( + default=None, + description="Whether this deduction type can be collected via Trax Payroll.", + alias="canBeCollectedByTrax", + ) + additional_description: StrictStr | None = Field( + default=None, + description="An optional additional description for display purposes.", + alias="additionalDescription", + ) + hide_annual_max: StrictBool | None = Field( + default=None, + description="Whether the annual maximum field should be hidden for this deduction type.", + alias="hideAnnualMax", + ) + managed_deduction_type: StrictStr | None = Field(default=None, alias="managedDeductionType") + sub_types: list[BenefitDeductionSubType] | None = Field( + default=None, + description="Child deduction types grouped under this parent. Each entry has the same shape as a top-level deduction type. Empty array if this type has no sub-types.", + alias="subTypes", + ) + sub_type_text: StrictStr | None = Field( + default=None, + description='A label or question displayed alongside sub-type selection (e.g. "Reportable on the W-2?"). Empty string for types without sub-types.', + alias="subTypeText", + ) + deduction_note: StrictStr | None = Field( + default=None, + description="An informational note to display to the user when configuring this deduction type.", + alias="deductionNote", + ) + deduction_note_link: StrictStr | None = Field( + default=None, + description='A URL for a "learn more" link associated with the deduction note.', + alias="deductionNoteLink", + ) + deduction_note_link_text: StrictStr | None = Field( + default=None, description="The display text for the deduction note link.", alias="deductionNoteLinkText" + ) + __properties: ClassVar[list[str]] = [ + "id", + "deductionTypeName", + "defaultDeductionCode", + "allowableBenefitTypes", + "nonBenefitDeductionType", + "canBeCollectedByTrax", + "additionalDescription", + "hideAnnualMax", + "managedDeductionType", + "subTypes", + "subTypeText", + "deductionNote", + "deductionNoteLink", + "deductionNoteLinkText", + ] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +107,6 @@ class BenefitDeductionType(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,11 +117,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of BenefitDeductionType from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -75,8 +131,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -85,23 +140,23 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of id if self.id: - _dict['id'] = self.id.to_dict() + _dict["id"] = self.id.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in sub_types (list) _items = [] if self.sub_types: for _item_sub_types in self.sub_types: if _item_sub_types: _items.append(_item_sub_types.to_dict()) - _dict['subTypes'] = _items + _dict["subTypes"] = _items # set to None if managed_deduction_type (nullable) is None # and model_fields_set contains the field if self.managed_deduction_type is None and "managed_deduction_type" in self.model_fields_set: - _dict['managedDeductionType'] = None + _dict["managedDeductionType"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of BenefitDeductionType from a dict""" if obj is None: return None @@ -109,22 +164,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": BenefitDeductionTypeId.from_dict(obj["id"]) if obj.get("id") is not None else None, - "deductionTypeName": obj.get("deductionTypeName"), - "defaultDeductionCode": obj.get("defaultDeductionCode"), - "allowableBenefitTypes": obj.get("allowableBenefitTypes"), - "nonBenefitDeductionType": obj.get("nonBenefitDeductionType"), - "canBeCollectedByTrax": obj.get("canBeCollectedByTrax"), - "additionalDescription": obj.get("additionalDescription"), - "hideAnnualMax": obj.get("hideAnnualMax"), - "managedDeductionType": obj.get("managedDeductionType"), - "subTypes": [BenefitDeductionSubType.from_dict(_item) for _item in obj["subTypes"]] if obj.get("subTypes") is not None else None, - "subTypeText": obj.get("subTypeText"), - "deductionNote": obj.get("deductionNote"), - "deductionNoteLink": obj.get("deductionNoteLink"), - "deductionNoteLinkText": obj.get("deductionNoteLinkText") - }) + _obj = cls.model_validate( + { + "id": BenefitDeductionTypeId.from_dict(obj["id"]) if obj.get("id") is not None else None, + "deductionTypeName": obj.get("deductionTypeName"), + "defaultDeductionCode": obj.get("defaultDeductionCode"), + "allowableBenefitTypes": obj.get("allowableBenefitTypes"), + "nonBenefitDeductionType": obj.get("nonBenefitDeductionType"), + "canBeCollectedByTrax": obj.get("canBeCollectedByTrax"), + "additionalDescription": obj.get("additionalDescription"), + "hideAnnualMax": obj.get("hideAnnualMax"), + "managedDeductionType": obj.get("managedDeductionType"), + "subTypes": [BenefitDeductionSubType.from_dict(_item) for _item in obj["subTypes"]] + if obj.get("subTypes") is not None + else None, + "subTypeText": obj.get("subTypeText"), + "deductionNote": obj.get("deductionNote"), + "deductionNoteLink": obj.get("deductionNoteLink"), + "deductionNoteLinkText": obj.get("deductionNoteLinkText"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/benefit_deduction_type_id.py b/bamboohr_sdk/models/benefit_deduction_type_id.py index a7c201a..b0cb748 100644 --- a/bamboohr_sdk/models/benefit_deduction_type_id.py +++ b/bamboohr_sdk/models/benefit_deduction_type_id.py @@ -1,45 +1,43 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self +from typing import Any + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, ValidationError, field_validator +from typing_extensions import Self BENEFITDEDUCTIONTYPEID_ONE_OF_SCHEMAS = ["int", "str"] + class BenefitDeductionTypeId(BaseModel): """ The deduction type ID. Integer for leaf types (e.g. 1 for 401(k)); string slug for grouped parent types (e.g. \"pretax_subtype\"). """ + # data type: int - oneof_schema_1_validator: Optional[StrictInt] = None + oneof_schema_1_validator: StrictInt | None = None # data type: str - oneof_schema_2_validator: Optional[StrictStr] = None - actual_instance: Optional[Union[int, str]] = None - one_of_schemas: Set[str] = { "int", "str" } + oneof_schema_2_validator: StrictStr | None = None + actual_instance: int | str | None = None + one_of_schemas: set[str] = {"int", "str"} model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), ) - def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -50,7 +48,7 @@ def __init__(self, *args, **kwargs) -> None: else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_oneof(cls, v): instance = BenefitDeductionTypeId.model_construct() error_messages = [] @@ -69,15 +67,21 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in BenefitDeductionTypeId with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "Multiple matches found when setting `actual_instance` in BenefitDeductionTypeId with oneOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in BenefitDeductionTypeId with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting `actual_instance` in BenefitDeductionTypeId with oneOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) else: return v @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + def from_dict(cls, obj: str | dict[str, Any]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -108,10 +112,16 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into BenefitDeductionTypeId with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "Multiple matches found when deserializing the JSON string into BenefitDeductionTypeId with oneOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into BenefitDeductionTypeId with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into BenefitDeductionTypeId with oneOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -125,7 +135,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: + def to_dict(self) -> dict[str, Any] | int | str | None: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None @@ -139,5 +149,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/bamboohr_sdk/models/budget_breakdown_import_response.py b/bamboohr_sdk/models/budget_breakdown_import_response.py new file mode 100644 index 0000000..4daf51f --- /dev/null +++ b/bamboohr_sdk/models/budget_breakdown_import_response.py @@ -0,0 +1,85 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing_extensions import Self + + +class BudgetBreakdownImportResponse(BaseModel): + """ + BudgetBreakdownImportResponse + """ + + message: StrictStr | None = None + __properties: ClassVar[list[str]] = ["message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of BudgetBreakdownImportResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict["message"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of BudgetBreakdownImportResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"message": obj.get("message")}) + return _obj diff --git a/bamboohr_sdk/models/budget_guidelines_view.py b/bamboohr_sdk/models/budget_guidelines_view.py new file mode 100644 index 0000000..db56168 --- /dev/null +++ b/bamboohr_sdk/models/budget_guidelines_view.py @@ -0,0 +1,128 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing_extensions import Self + +from bamboohr_sdk.models.budget_guidelines_warnings import BudgetGuidelinesWarnings + + +class BudgetGuidelinesView(BaseModel): + """ + Budget guidelines for compensation planning budgets + """ + + use_guidelines: StrictBool | None = Field( + default=None, description="Whether to use budget guidelines", alias="useGuidelines" + ) + soft_minimum: StrictFloat | StrictInt | None = Field(default=None, alias="softMinimum") + soft_maximum: StrictFloat | StrictInt | None = Field(default=None, alias="softMaximum") + guidelines_warning_errors: BudgetGuidelinesWarnings | None = Field( + default=None, description="Budget guidelines warning errors", alias="guidelinesWarningErrors" + ) + require_comments: StrictBool | None = Field( + default=None, + description="Whether a comment is required for recommendations outside of guidelines", + alias="requireComments", + ) + __properties: ClassVar[list[str]] = [ + "useGuidelines", + "softMinimum", + "softMaximum", + "guidelinesWarningErrors", + "requireComments", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of BudgetGuidelinesView from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of guidelines_warning_errors + if self.guidelines_warning_errors: + _dict["guidelinesWarningErrors"] = self.guidelines_warning_errors.to_dict() + # set to None if soft_minimum (nullable) is None + # and model_fields_set contains the field + if self.soft_minimum is None and "soft_minimum" in self.model_fields_set: + _dict["softMinimum"] = None + + # set to None if soft_maximum (nullable) is None + # and model_fields_set contains the field + if self.soft_maximum is None and "soft_maximum" in self.model_fields_set: + _dict["softMaximum"] = None + + # set to None if guidelines_warning_errors (nullable) is None + # and model_fields_set contains the field + if self.guidelines_warning_errors is None and "guidelines_warning_errors" in self.model_fields_set: + _dict["guidelinesWarningErrors"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of BudgetGuidelinesView from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "useGuidelines": obj.get("useGuidelines"), + "softMinimum": obj.get("softMinimum"), + "softMaximum": obj.get("softMaximum"), + "guidelinesWarningErrors": BudgetGuidelinesWarnings.from_dict(obj["guidelinesWarningErrors"]) + if obj.get("guidelinesWarningErrors") is not None + else None, + "requireComments": obj.get("requireComments"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/budget_guidelines_warnings.py b/bamboohr_sdk/models/budget_guidelines_warnings.py new file mode 100644 index 0000000..642317c --- /dev/null +++ b/bamboohr_sdk/models/budget_guidelines_warnings.py @@ -0,0 +1,96 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class BudgetGuidelinesWarnings(BaseModel): + """ + Warning messages for saved budget guidelines + """ + + soft_minimum_warning_message: StrictStr | None = Field(default=None, alias="softMinimumWarningMessage") + soft_maximum_warning_message: StrictStr | None = Field(default=None, alias="softMaximumWarningMessage") + __properties: ClassVar[list[str]] = ["softMinimumWarningMessage", "softMaximumWarningMessage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of BudgetGuidelinesWarnings from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if soft_minimum_warning_message (nullable) is None + # and model_fields_set contains the field + if self.soft_minimum_warning_message is None and "soft_minimum_warning_message" in self.model_fields_set: + _dict["softMinimumWarningMessage"] = None + + # set to None if soft_maximum_warning_message (nullable) is None + # and model_fields_set contains the field + if self.soft_maximum_warning_message is None and "soft_maximum_warning_message" in self.model_fields_set: + _dict["softMaximumWarningMessage"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of BudgetGuidelinesWarnings from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "softMinimumWarningMessage": obj.get("softMinimumWarningMessage"), + "softMaximumWarningMessage": obj.get("softMaximumWarningMessage"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/c79f9c5950f983e59d2626faa30c00a1_request.py b/bamboohr_sdk/models/c79f9c5950f983e59d2626faa30c00a1_request.py new file mode 100644 index 0000000..90e0dba --- /dev/null +++ b/bamboohr_sdk/models/c79f9c5950f983e59d2626faa30c00a1_request.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class C79f9c5950f983e59d2626faa30c00a1Request(BaseModel): + """ + C79f9c5950f983e59d2626faa30c00a1Request + """ + + message_text: StrictStr = Field(description="The email body template text", alias="messageText") + subject_text: StrictStr = Field(description="The email subject template text", alias="subjectText") + __properties: ClassVar[list[str]] = ["messageText", "subjectText"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of C79f9c5950f983e59d2626faa30c00a1Request from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of C79f9c5950f983e59d2626faa30c00a1Request from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"messageText": obj.get("messageText"), "subjectText": obj.get("subjectText")}) + return _obj diff --git a/bamboohr_sdk/models/c7c32ed5278ac67e2e518bf7484a75dc_request.py b/bamboohr_sdk/models/c7c32ed5278ac67e2e518bf7484a75dc_request.py new file mode 100644 index 0000000..6312936 --- /dev/null +++ b/bamboohr_sdk/models/c7c32ed5278ac67e2e518bf7484a75dc_request.py @@ -0,0 +1,85 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing_extensions import Self + + +class C7c32ed5278ac67e2e518bf7484a75dcRequest(BaseModel): + """ + C7c32ed5278ac67e2e518bf7484a75dcRequest + """ + + employee_ids: list[StrictStr | None] = Field( + description="Array of internal employee IDs to add as cycle admins", alias="employeeIds" + ) + notify_admins: StrictBool | None = Field( + default=None, description="Whether to send email notifications to new admins", alias="notifyAdmins" + ) + __properties: ClassVar[list[str]] = ["employeeIds", "notifyAdmins"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of C7c32ed5278ac67e2e518bf7484a75dcRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of C7c32ed5278ac67e2e518bf7484a75dcRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"employeeIds": obj.get("employeeIds"), "notifyAdmins": obj.get("notifyAdmins")}) + return _obj diff --git a/bamboohr_sdk/models/calendar_anniversary_calendar_event_v1.py b/bamboohr_sdk/models/calendar_anniversary_calendar_event_v1.py new file mode 100644 index 0000000..50177ae --- /dev/null +++ b/bamboohr_sdk/models/calendar_anniversary_calendar_event_v1.py @@ -0,0 +1,104 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing_extensions import Self + + +class CalendarAnniversaryCalendarEventV1(BaseModel): + """ + An employee work anniversary occurrence on the calendar. + """ + + id: StrictStr = Field( + description="Deterministic synthetic id in the form anniversary-{employeeId}-{year}, where year is the year of this occurrence." + ) + type: StrictStr = Field(description="Event type discriminator.") + start: date = Field(description="The day of the anniversary occurrence (YYYY-MM-DD).") + end: date = Field(description="Same as start; anniversary events are single-day.") + employee_id: StrictInt = Field(description="The employee whose anniversary it is.", alias="employeeId") + years: StrictInt = Field(description="The number of years being celebrated.") + __properties: ClassVar[list[str]] = ["id", "type", "start", "end", "employeeId", "years"] + + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["ANNIVERSARY"]): + raise ValueError("must be one of enum values ('ANNIVERSARY')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CalendarAnniversaryCalendarEventV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CalendarAnniversaryCalendarEventV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "type": obj.get("type"), + "start": obj.get("start"), + "end": obj.get("end"), + "employeeId": obj.get("employeeId"), + "years": obj.get("years"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/calendar_birthday_calendar_event_v1.py b/bamboohr_sdk/models/calendar_birthday_calendar_event_v1.py new file mode 100644 index 0000000..e830eaa --- /dev/null +++ b/bamboohr_sdk/models/calendar_birthday_calendar_event_v1.py @@ -0,0 +1,102 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing_extensions import Self + + +class CalendarBirthdayCalendarEventV1(BaseModel): + """ + An employee birthday occurrence on the calendar. + """ + + id: StrictStr = Field( + description="Deterministic synthetic id in the form birthday-{employeeId}-{year}, where year is the year of this occurrence." + ) + type: StrictStr = Field(description="Event type discriminator.") + start: date = Field(description="The day of the birthday occurrence (YYYY-MM-DD).") + end: date = Field(description="Same as start; birthday events are single-day.") + employee_id: StrictInt = Field(description="The employee whose birthday it is.", alias="employeeId") + __properties: ClassVar[list[str]] = ["id", "type", "start", "end", "employeeId"] + + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["BIRTHDAY"]): + raise ValueError("must be one of enum values ('BIRTHDAY')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CalendarBirthdayCalendarEventV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CalendarBirthdayCalendarEventV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "type": obj.get("type"), + "start": obj.get("start"), + "end": obj.get("end"), + "employeeId": obj.get("employeeId"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/calendar_calendar_event_person_v1.py b/bamboohr_sdk/models/calendar_calendar_event_person_v1.py new file mode 100644 index 0000000..a55882a --- /dev/null +++ b/bamboohr_sdk/models/calendar_calendar_event_person_v1.py @@ -0,0 +1,106 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + + +class CalendarCalendarEventPersonV1(BaseModel): + """ + Display subset of an employee, embedded under `persons` when includePersons=true. + """ + + id: StrictInt = Field(description="Employee id.") + first_name: StrictStr = Field(description="The employee's first name.", alias="firstName") + last_name: StrictStr = Field(description="The employee's last name.", alias="lastName") + display_name: StrictStr = Field( + description="Preferred display name (preferred name if set, else first and last name).", alias="displayName" + ) + job_title: StrictStr | None = Field(alias="jobTitle") + photo_url: StrictStr | None = Field(alias="photoUrl") + __properties: ClassVar[list[str]] = ["id", "firstName", "lastName", "displayName", "jobTitle", "photoUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CalendarCalendarEventPersonV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if job_title (nullable) is None + # and model_fields_set contains the field + if self.job_title is None and "job_title" in self.model_fields_set: + _dict["jobTitle"] = None + + # set to None if photo_url (nullable) is None + # and model_fields_set contains the field + if self.photo_url is None and "photo_url" in self.model_fields_set: + _dict["photoUrl"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CalendarCalendarEventPersonV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "displayName": obj.get("displayName"), + "jobTitle": obj.get("jobTitle"), + "photoUrl": obj.get("photoUrl"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/calendar_calendar_events_list_response_v1.py b/bamboohr_sdk/models/calendar_calendar_events_list_response_v1.py new file mode 100644 index 0000000..16580c8 --- /dev/null +++ b/bamboohr_sdk/models/calendar_calendar_events_list_response_v1.py @@ -0,0 +1,131 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from bamboohr_sdk.models.calendar_calendar_event_person_v1 import CalendarCalendarEventPersonV1 +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_data_inner import ( + CalendarCalendarEventsListResponseV1DataInner, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_links import ( + CalendarCalendarEventsListResponseV1Links, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_meta import CalendarCalendarEventsListResponseV1Meta + + +class CalendarCalendarEventsListResponseV1(BaseModel): + """ + CalendarCalendarEventsListResponseV1 + """ + + data: list[CalendarCalendarEventsListResponseV1DataInner] | None = Field( + default=None, description="Array of calendar event resource objects." + ) + persons: dict[str, CalendarCalendarEventPersonV1] | None = Field( + default=None, description="Present only when includePersons=true. Map keyed by employee id." + ) + links: CalendarCalendarEventsListResponseV1Links | None = Field(default=None, alias="_links") + meta: CalendarCalendarEventsListResponseV1Meta | None = None + __properties: ClassVar[list[str]] = ["data", "persons", "_links", "meta"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CalendarCalendarEventsListResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict["data"] = _items + # override the default output from pydantic by calling `to_dict()` of each value in persons (dict) + _field_dict = {} + if self.persons: + for _key_persons in self.persons: + if self.persons[_key_persons]: + _field_dict[_key_persons] = self.persons[_key_persons].to_dict() + _dict["persons"] = _field_dict + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict["_links"] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict["meta"] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CalendarCalendarEventsListResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "data": [CalendarCalendarEventsListResponseV1DataInner.from_dict(_item) for _item in obj["data"]] + if obj.get("data") is not None + else None, + "persons": dict((_k, CalendarCalendarEventPersonV1.from_dict(_v)) for _k, _v in obj["persons"].items()) + if obj.get("persons") is not None + else None, + "_links": CalendarCalendarEventsListResponseV1Links.from_dict(obj["_links"]) + if obj.get("_links") is not None + else None, + "meta": CalendarCalendarEventsListResponseV1Meta.from_dict(obj["meta"]) + if obj.get("meta") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_data_inner.py b/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_data_inner.py new file mode 100644 index 0000000..b91f1b5 --- /dev/null +++ b/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_data_inner.py @@ -0,0 +1,201 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +from typing import Any + +from pydantic import BaseModel, ConfigDict, ValidationError, field_validator +from typing_extensions import Self + +from bamboohr_sdk.models.calendar_anniversary_calendar_event_v1 import CalendarAnniversaryCalendarEventV1 +from bamboohr_sdk.models.calendar_birthday_calendar_event_v1 import CalendarBirthdayCalendarEventV1 +from bamboohr_sdk.models.calendar_holiday_calendar_event_v1 import CalendarHolidayCalendarEventV1 +from bamboohr_sdk.models.calendar_time_off_calendar_event_v1 import CalendarTimeOffCalendarEventV1 + +CALENDARCALENDAREVENTSLISTRESPONSEV1DATAINNER_ONE_OF_SCHEMAS = [ + "CalendarAnniversaryCalendarEventV1", + "CalendarBirthdayCalendarEventV1", + "CalendarHolidayCalendarEventV1", + "CalendarTimeOffCalendarEventV1", +] + + +class CalendarCalendarEventsListResponseV1DataInner(BaseModel): + """ + CalendarCalendarEventsListResponseV1DataInner + """ + + # data type: CalendarTimeOffCalendarEventV1 + oneof_schema_1_validator: CalendarTimeOffCalendarEventV1 | None = None + # data type: CalendarHolidayCalendarEventV1 + oneof_schema_2_validator: CalendarHolidayCalendarEventV1 | None = None + # data type: CalendarBirthdayCalendarEventV1 + oneof_schema_3_validator: CalendarBirthdayCalendarEventV1 | None = None + # data type: CalendarAnniversaryCalendarEventV1 + oneof_schema_4_validator: CalendarAnniversaryCalendarEventV1 | None = None + actual_instance: ( + CalendarAnniversaryCalendarEventV1 + | CalendarBirthdayCalendarEventV1 + | CalendarHolidayCalendarEventV1 + | CalendarTimeOffCalendarEventV1 + | None + ) = None + one_of_schemas: set[str] = { + "CalendarAnniversaryCalendarEventV1", + "CalendarBirthdayCalendarEventV1", + "CalendarHolidayCalendarEventV1", + "CalendarTimeOffCalendarEventV1", + } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + discriminator_value_class_map: dict[str, str] = {} + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = CalendarCalendarEventsListResponseV1DataInner.model_construct() + error_messages = [] + match = 0 + # validate data type: CalendarTimeOffCalendarEventV1 + if not isinstance(v, CalendarTimeOffCalendarEventV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `CalendarTimeOffCalendarEventV1`") + else: + match += 1 + # validate data type: CalendarHolidayCalendarEventV1 + if not isinstance(v, CalendarHolidayCalendarEventV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `CalendarHolidayCalendarEventV1`") + else: + match += 1 + # validate data type: CalendarBirthdayCalendarEventV1 + if not isinstance(v, CalendarBirthdayCalendarEventV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `CalendarBirthdayCalendarEventV1`") + else: + match += 1 + # validate data type: CalendarAnniversaryCalendarEventV1 + if not isinstance(v, CalendarAnniversaryCalendarEventV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `CalendarAnniversaryCalendarEventV1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when setting `actual_instance` in CalendarCalendarEventsListResponseV1DataInner with oneOf schemas: CalendarAnniversaryCalendarEventV1, CalendarBirthdayCalendarEventV1, CalendarHolidayCalendarEventV1, CalendarTimeOffCalendarEventV1. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in CalendarCalendarEventsListResponseV1DataInner with oneOf schemas: CalendarAnniversaryCalendarEventV1, CalendarBirthdayCalendarEventV1, CalendarHolidayCalendarEventV1, CalendarTimeOffCalendarEventV1. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: str | dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into CalendarTimeOffCalendarEventV1 + try: + instance.actual_instance = CalendarTimeOffCalendarEventV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CalendarHolidayCalendarEventV1 + try: + instance.actual_instance = CalendarHolidayCalendarEventV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CalendarBirthdayCalendarEventV1 + try: + instance.actual_instance = CalendarBirthdayCalendarEventV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CalendarAnniversaryCalendarEventV1 + try: + instance.actual_instance = CalendarAnniversaryCalendarEventV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into CalendarCalendarEventsListResponseV1DataInner with oneOf schemas: CalendarAnniversaryCalendarEventV1, CalendarBirthdayCalendarEventV1, CalendarHolidayCalendarEventV1, CalendarTimeOffCalendarEventV1. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into CalendarCalendarEventsListResponseV1DataInner with oneOf schemas: CalendarAnniversaryCalendarEventV1, CalendarBirthdayCalendarEventV1, CalendarHolidayCalendarEventV1, CalendarTimeOffCalendarEventV1. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict( + self, + ) -> ( + dict[str, Any] + | CalendarAnniversaryCalendarEventV1 + | CalendarBirthdayCalendarEventV1 + | CalendarHolidayCalendarEventV1 + | CalendarTimeOffCalendarEventV1 + | None + ): + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links.py b/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links.py new file mode 100644 index 0000000..d9b9ee5 --- /dev/null +++ b/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links.py @@ -0,0 +1,103 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_links_next import ( + CalendarCalendarEventsListResponseV1LinksNext, +) +from bamboohr_sdk.models.calendar_calendar_events_list_response_v1_links_prev import ( + CalendarCalendarEventsListResponseV1LinksPrev, +) + + +class CalendarCalendarEventsListResponseV1Links(BaseModel): + """ + Pagination links. prev is omitted on the first page; next is omitted on the last page. + """ + + prev: CalendarCalendarEventsListResponseV1LinksPrev | None = None + next: CalendarCalendarEventsListResponseV1LinksNext | None = None + __properties: ClassVar[list[str]] = ["prev", "next"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CalendarCalendarEventsListResponseV1Links from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of prev + if self.prev: + _dict["prev"] = self.prev.to_dict() + # override the default output from pydantic by calling `to_dict()` of next + if self.next: + _dict["next"] = self.next.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CalendarCalendarEventsListResponseV1Links from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "prev": CalendarCalendarEventsListResponseV1LinksPrev.from_dict(obj["prev"]) + if obj.get("prev") is not None + else None, + "next": CalendarCalendarEventsListResponseV1LinksNext.from_dict(obj["next"]) + if obj.get("next") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links_next.py b/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links_next.py new file mode 100644 index 0000000..8cbb457 --- /dev/null +++ b/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links_next.py @@ -0,0 +1,85 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing_extensions import Self + + +class CalendarCalendarEventsListResponseV1LinksNext(BaseModel): + """ + Link object for the next page. + """ + + href: StrictStr | None = None + __properties: ClassVar[list[str]] = ["href"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CalendarCalendarEventsListResponseV1LinksNext from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if href (nullable) is None + # and model_fields_set contains the field + if self.href is None and "href" in self.model_fields_set: + _dict["href"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CalendarCalendarEventsListResponseV1LinksNext from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"href": obj.get("href")}) + return _obj diff --git a/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links_prev.py b/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links_prev.py new file mode 100644 index 0000000..edf24a4 --- /dev/null +++ b/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_links_prev.py @@ -0,0 +1,85 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing_extensions import Self + + +class CalendarCalendarEventsListResponseV1LinksPrev(BaseModel): + """ + Link object for the previous page. + """ + + href: StrictStr | None = None + __properties: ClassVar[list[str]] = ["href"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CalendarCalendarEventsListResponseV1LinksPrev from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if href (nullable) is None + # and model_fields_set contains the field + if self.href is None and "href" in self.model_fields_set: + _dict["href"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CalendarCalendarEventsListResponseV1LinksPrev from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"href": obj.get("href")}) + return _obj diff --git a/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_meta.py b/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_meta.py new file mode 100644 index 0000000..a6d084b --- /dev/null +++ b/bamboohr_sdk/models/calendar_calendar_events_list_response_v1_meta.py @@ -0,0 +1,90 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing_extensions import Self + + +class CalendarCalendarEventsListResponseV1Meta(BaseModel): + """ + Pagination metadata. totalItems sums the four event sources within the requested range. + """ + + page: StrictInt + page_size: StrictInt = Field(alias="pageSize") + total_pages: StrictInt = Field(alias="totalPages") + total_items: StrictInt = Field(alias="totalItems") + __properties: ClassVar[list[str]] = ["page", "pageSize", "totalPages", "totalItems"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CalendarCalendarEventsListResponseV1Meta from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CalendarCalendarEventsListResponseV1Meta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "page": obj.get("page"), + "pageSize": obj.get("pageSize"), + "totalPages": obj.get("totalPages"), + "totalItems": obj.get("totalItems"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/calendar_holiday_calendar_event_v1.py b/bamboohr_sdk/models/calendar_holiday_calendar_event_v1.py new file mode 100644 index 0000000..9d6829c --- /dev/null +++ b/bamboohr_sdk/models/calendar_holiday_calendar_event_v1.py @@ -0,0 +1,102 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing_extensions import Self + + +class CalendarHolidayCalendarEventV1(BaseModel): + """ + A company holiday shown on the calendar. Holiday events are not affected by per-employee filters or directReportsOnly. + """ + + id: StrictStr = Field(description="The company holiday id.") + type: StrictStr = Field(description="Event type discriminator.") + start: date = Field(description="Inclusive first day of the holiday (YYYY-MM-DD).") + end: date = Field( + description="Inclusive last day of the holiday (YYYY-MM-DD). Same as start for single-day holidays." + ) + name: StrictStr = Field(description="The holiday name.") + __properties: ClassVar[list[str]] = ["id", "type", "start", "end", "name"] + + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["HOLIDAY"]): + raise ValueError("must be one of enum values ('HOLIDAY')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CalendarHolidayCalendarEventV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CalendarHolidayCalendarEventV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "type": obj.get("type"), + "start": obj.get("start"), + "end": obj.get("end"), + "name": obj.get("name"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/calendar_time_off_calendar_event_v1.py b/bamboohr_sdk/models/calendar_time_off_calendar_event_v1.py new file mode 100644 index 0000000..35335ce --- /dev/null +++ b/bamboohr_sdk/models/calendar_time_off_calendar_event_v1.py @@ -0,0 +1,109 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing_extensions import Self + + +class CalendarTimeOffCalendarEventV1(BaseModel): + """ + An approved time off request shown on the calendar. Pending, denied, and cancelled requests are never returned. + """ + + id: StrictStr = Field(description="The time off request id.") + type: StrictStr = Field(description="Event type discriminator.") + start: date = Field(description="Inclusive first day of the time off (YYYY-MM-DD).") + end: date = Field( + description="Inclusive last day of the time off (YYYY-MM-DD). Same as start for single-day requests." + ) + employee_id: StrictInt = Field(description="The employee taking time off.", alias="employeeId") + time_off_type_id: StrictInt | None = Field(alias="timeOffTypeId") + __properties: ClassVar[list[str]] = ["id", "type", "start", "end", "employeeId", "timeOffTypeId"] + + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["TIME_OFF"]): + raise ValueError("must be one of enum values ('TIME_OFF')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CalendarTimeOffCalendarEventV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if time_off_type_id (nullable) is None + # and model_fields_set contains the field + if self.time_off_type_id is None and "time_off_type_id" in self.model_fields_set: + _dict["timeOffTypeId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CalendarTimeOffCalendarEventV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "type": obj.get("type"), + "start": obj.get("start"), + "end": obj.get("end"), + "employeeId": obj.get("employeeId"), + "timeOffTypeId": obj.get("timeOffTypeId"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/can_create_goals_response.py b/bamboohr_sdk/models/can_create_goals_response.py index 8d35b67..37110da 100644 --- a/bamboohr_sdk/models/can_create_goals_response.py +++ b/bamboohr_sdk/models/can_create_goals_response.py @@ -1,33 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CanCreateGoalsResponse(BaseModel): """ CanCreateGoalsResponse - """ # noqa: E501 - can_create_goals: Optional[StrictBool] = Field(default=None, description="Whether the API user can create a goal for this employee.", alias="canCreateGoals") - __properties: ClassVar[List[str]] = ["canCreateGoals"] + """ + + can_create_goals: StrictBool | None = Field( + default=None, + description="Whether the authenticated caller can create a goal for this employee.", + alias="canCreateGoals", + ) + __properties: ClassVar[list[str]] = ["canCreateGoals"] model_config = ConfigDict( populate_by_name=True, @@ -35,7 +38,6 @@ class CanCreateGoalsResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -46,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CanCreateGoalsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -60,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CanCreateGoalsResponse from a dict""" if obj is None: return None @@ -79,9 +80,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "canCreateGoals": obj.get("canCreateGoals") - }) + _obj = cls.model_validate({"canCreateGoals": obj.get("canCreateGoals")}) return _obj - - diff --git a/bamboohr_sdk/models/cf87b8e09a001b6fb81dfce6c20ab9e3_request.py b/bamboohr_sdk/models/cf87b8e09a001b6fb81dfce6c20ab9e3_request.py new file mode 100644 index 0000000..20427c3 --- /dev/null +++ b/bamboohr_sdk/models/cf87b8e09a001b6fb81dfce6c20ab9e3_request.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class Cf87b8e09a001b6fb81dfce6c20ab9e3Request(BaseModel): + """ + Cf87b8e09a001b6fb81dfce6c20ab9e3Request + """ + + assignees: list[StrictStr | None] = Field(description="Array of internal employee IDs for assignees") + flow_data: dict[str, Any] = Field(description="Flow data for the approval", alias="flowData") + __properties: ClassVar[list[str]] = ["assignees", "flowData"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of Cf87b8e09a001b6fb81dfce6c20ab9e3Request from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of Cf87b8e09a001b6fb81dfce6c20ab9e3Request from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"assignees": obj.get("assignees"), "flowData": obj.get("flowData")}) + return _obj diff --git a/bamboohr_sdk/models/change_custom_field_list_value_request.py b/bamboohr_sdk/models/change_custom_field_list_value_request.py new file mode 100644 index 0000000..1192eec --- /dev/null +++ b/bamboohr_sdk/models/change_custom_field_list_value_request.py @@ -0,0 +1,85 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing_extensions import Self + + +class ChangeCustomFieldListValueRequest(BaseModel): + """ + ChangeCustomFieldListValueRequest + """ + + option: StrictStr | None = Field(default=None, description="The new list value") + preserve_existing_option: StrictBool | None = Field( + default=None, description="Whether to preserve the existing option or not", alias="preserveExistingOption" + ) + __properties: ClassVar[list[str]] = ["option", "preserveExistingOption"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of ChangeCustomFieldListValueRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of ChangeCustomFieldListValueRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"option": obj.get("option"), "preserveExistingOption": obj.get("preserveExistingOption")} + ) + return _obj diff --git a/bamboohr_sdk/models/changed_employee_ids_response.py b/bamboohr_sdk/models/changed_employee_ids_response.py index f1a3499..3add85d 100644 --- a/bamboohr_sdk/models/changed_employee_ids_response.py +++ b/bamboohr_sdk/models/changed_employee_ids_response.py @@ -1,36 +1,38 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from bamboohr_sdk.models.changed_employee_ids_response_employees_value import ChangedEmployeeIdsResponseEmployeesValue -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.changed_employee_ids_response_employees_value import ChangedEmployeeIdsResponseEmployeesValue + + class ChangedEmployeeIdsResponse(BaseModel): """ ChangedEmployeeIdsResponse - """ # noqa: E501 + """ + latest: datetime = Field(description="The latest last-changed timestamp among the returned employees.") - employees: Dict[str, ChangedEmployeeIdsResponseEmployeesValue] = Field(description="Map of employee IDs to change metadata for each changed employee.") - __properties: ClassVar[List[str]] = ["latest", "employees"] + employees: dict[str, ChangedEmployeeIdsResponseEmployeesValue] = Field( + description="Map of employee IDs to change metadata for each changed employee." + ) + __properties: ClassVar[list[str]] = ["latest", "employees"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +40,6 @@ class ChangedEmployeeIdsResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +50,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ChangedEmployeeIdsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,11 +77,11 @@ def to_dict(self) -> Dict[str, Any]: for _key_employees in self.employees: if self.employees[_key_employees]: _field_dict[_key_employees] = self.employees[_key_employees].to_dict() - _dict['employees'] = _field_dict + _dict["employees"] = _field_dict return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ChangedEmployeeIdsResponse from a dict""" if obj is None: return None @@ -89,15 +89,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "latest": obj.get("latest"), - "employees": dict( - (_k, ChangedEmployeeIdsResponseEmployeesValue.from_dict(_v)) - for _k, _v in obj["employees"].items() - ) - if obj.get("employees") is not None - else None - }) + _obj = cls.model_validate( + { + "latest": obj.get("latest"), + "employees": dict( + (_k, ChangedEmployeeIdsResponseEmployeesValue.from_dict(_v)) for _k, _v in obj["employees"].items() + ) + if obj.get("employees") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/changed_employee_ids_response_employees_value.py b/bamboohr_sdk/models/changed_employee_ids_response_employees_value.py index 13d2609..444d94b 100644 --- a/bamboohr_sdk/models/changed_employee_ids_response_employees_value.py +++ b/bamboohr_sdk/models/changed_employee_ids_response_employees_value.py @@ -1,44 +1,45 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class ChangedEmployeeIdsResponseEmployeesValue(BaseModel): """ ChangedEmployeeIdsResponseEmployeesValue - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The employee ID.") - action: Optional[StrictStr] = Field(default=None, description="The type of change: Inserted, Updated, or Deleted.") - last_changed: Optional[datetime] = Field(default=None, description="ISO 8601 timestamp of the last change.", alias="lastChanged") - __properties: ClassVar[List[str]] = ["id", "action", "lastChanged"] + """ + + id: StrictStr | None = Field(default=None, description="The employee ID.") + action: StrictStr | None = Field(default=None, description="The type of change: Inserted, Updated, or Deleted.") + last_changed: datetime | None = Field( + default=None, description="ISO 8601 timestamp of the last change.", alias="lastChanged" + ) + __properties: ClassVar[list[str]] = ["id", "action", "lastChanged"] - @field_validator('action') + @field_validator("action") def action_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['Inserted', 'Updated', 'Deleted']): + if value not in set(["Inserted", "Updated", "Deleted"]): raise ValueError("must be one of enum values ('Inserted', 'Updated', 'Deleted')") return value @@ -48,7 +49,6 @@ def action_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -59,11 +59,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ChangedEmployeeIdsResponseEmployeesValue from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -73,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -84,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ChangedEmployeeIdsResponseEmployeesValue from a dict""" if obj is None: return None @@ -92,11 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "action": obj.get("action"), - "lastChanged": obj.get("lastChanged") - }) + _obj = cls.model_validate( + {"id": obj.get("id"), "action": obj.get("action"), "lastChanged": obj.get("lastChanged")} + ) return _obj - - diff --git a/bamboohr_sdk/models/changed_employee_table_data_response.py b/bamboohr_sdk/models/changed_employee_table_data_response.py index f6ad46d..88786ae 100644 --- a/bamboohr_sdk/models/changed_employee_table_data_response.py +++ b/bamboohr_sdk/models/changed_employee_table_data_response.py @@ -1,35 +1,39 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from bamboohr_sdk.models.changed_employee_table_data_response_employees_value import ChangedEmployeeTableDataResponseEmployeesValue -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.changed_employee_table_data_response_employees_value import ( + ChangedEmployeeTableDataResponseEmployeesValue, +) + + class ChangedEmployeeTableDataResponse(BaseModel): """ ChangedEmployeeTableDataResponse - """ # noqa: E501 + """ + table: StrictStr = Field(description="The requested table name.") - employees: Dict[str, ChangedEmployeeTableDataResponseEmployeesValue] = Field(description="Map of employee IDs to changed table data for that employee.") - __properties: ClassVar[List[str]] = ["table", "employees"] + employees: dict[str, ChangedEmployeeTableDataResponseEmployeesValue] = Field( + description="Map of employee IDs to changed table data for that employee." + ) + __properties: ClassVar[list[str]] = ["table", "employees"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +41,6 @@ class ChangedEmployeeTableDataResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +51,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ChangedEmployeeTableDataResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,11 +78,11 @@ def to_dict(self) -> Dict[str, Any]: for _key_employees in self.employees: if self.employees[_key_employees]: _field_dict[_key_employees] = self.employees[_key_employees].to_dict() - _dict['employees'] = _field_dict + _dict["employees"] = _field_dict return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ChangedEmployeeTableDataResponse from a dict""" if obj is None: return None @@ -88,15 +90,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "table": obj.get("table"), - "employees": dict( - (_k, ChangedEmployeeTableDataResponseEmployeesValue.from_dict(_v)) - for _k, _v in obj["employees"].items() - ) - if obj.get("employees") is not None - else None - }) + _obj = cls.model_validate( + { + "table": obj.get("table"), + "employees": dict( + (_k, ChangedEmployeeTableDataResponseEmployeesValue.from_dict(_v)) + for _k, _v in obj["employees"].items() + ) + if obj.get("employees") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/changed_employee_table_data_response_employees_value.py b/bamboohr_sdk/models/changed_employee_table_data_response_employees_value.py index cfa6382..b08317b 100644 --- a/bamboohr_sdk/models/changed_employee_table_data_response_employees_value.py +++ b/bamboohr_sdk/models/changed_employee_table_data_response_employees_value.py @@ -1,36 +1,42 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.changed_employee_table_data_response_employees_value_rows_inner_value import ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.changed_employee_table_data_response_employees_value_rows_inner_value import ( + ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue, +) + + class ChangedEmployeeTableDataResponseEmployeesValue(BaseModel): """ ChangedEmployeeTableDataResponseEmployeesValue - """ # noqa: E501 - last_changed: Optional[datetime] = Field(default=None, description="ISO 8601 timestamp of the last change for this employee.", alias="lastChanged") - rows: Optional[List[Dict[str, Optional[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue]]]] = Field(default=None, description="The table rows for this employee.") - __properties: ClassVar[List[str]] = ["lastChanged", "rows"] + """ + + last_changed: datetime | None = Field( + default=None, description="ISO 8601 timestamp of the last change for this employee.", alias="lastChanged" + ) + rows: list[dict[str, ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue | None]] | None = Field( + default=None, description="The table rows for this employee." + ) + __properties: ClassVar[list[str]] = ["lastChanged", "rows"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +44,6 @@ class ChangedEmployeeTableDataResponseEmployeesValue(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +54,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ChangedEmployeeTableDataResponseEmployeesValue from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +68,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,11 +81,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_rows in self.rows: if _item_rows: _items.append(_item_rows.to_dict()) - _dict['rows'] = _items + _dict["rows"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ChangedEmployeeTableDataResponseEmployeesValue from a dict""" if obj is None: return None @@ -89,10 +93,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "lastChanged": obj.get("lastChanged"), - "rows": [Dict[str, ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue].from_dict(_item) for _item in obj["rows"]] if obj.get("rows") is not None else None - }) + _obj = cls.model_validate( + { + "lastChanged": obj.get("lastChanged"), + "rows": [ + dict[str, ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue].from_dict(_item) + for _item in obj["rows"] + ] + if obj.get("rows") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/changed_employee_table_data_response_employees_value_rows_inner_value.py b/bamboohr_sdk/models/changed_employee_table_data_response_employees_value_rows_inner_value.py index 30e92c8..4dbfefb 100644 --- a/bamboohr_sdk/models/changed_employee_table_data_response_employees_value_rows_inner_value.py +++ b/bamboohr_sdk/models/changed_employee_table_data_response_employees_value_rows_inner_value.py @@ -1,30 +1,45 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator -from typing import Any, Dict, List, Optional, Union -from bamboohr_sdk.models.changed_employee_table_data_response_employees_value_rows_inner_value_any_of_inner import ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field +from typing import TYPE_CHECKING, Any + +from pydantic import ( + BaseModel, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Self + +from bamboohr_sdk.models.changed_employee_table_data_response_employees_value_rows_inner_value_any_of_inner import ( + ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner, +) + +CHANGEDEMPLOYEETABLEDATARESPONSEEMPLOYEESVALUEROWSINNERVALUE_ANY_OF_SCHEMAS = [ + "Dict[str, object]", + "List[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner]", + "bool", + "float", + "int", + "str", +] -CHANGEDEMPLOYEETABLEDATARESPONSEEMPLOYEESVALUEROWSINNERVALUE_ANY_OF_SCHEMAS = ["Dict[str, object]", "List[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner]", "bool", "float", "int", "str"] class ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue(BaseModel): """ @@ -32,22 +47,39 @@ class ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue(BaseModel): """ # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None + anyof_schema_1_validator: StrictStr | None = None # data type: float - anyof_schema_2_validator: Optional[Union[StrictFloat, StrictInt]] = None + anyof_schema_2_validator: StrictFloat | StrictInt | None = None # data type: bool - anyof_schema_3_validator: Optional[StrictBool] = None + anyof_schema_3_validator: StrictBool | None = None # data type: int - anyof_schema_4_validator: Optional[StrictInt] = None + anyof_schema_4_validator: StrictInt | None = None # data type: List[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner] - anyof_schema_5_validator: Optional[List[Optional[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner]]] = None + anyof_schema_5_validator: ( + list[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner | None] | None + ) = None # data type: Dict[str, object] - anyof_schema_6_validator: Optional[Dict[str, Any]] = None + anyof_schema_6_validator: dict[str, Any] | None = None if TYPE_CHECKING: - actual_instance: Optional[Union[Dict[str, object], List[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner], bool, float, int, str]] = None + actual_instance: ( + dict[str, object] + | list[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner] + | bool + | float + | int + | str + | None + ) = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "Dict[str, object]", "List[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner]", "bool", "float", "int", "str" } + any_of_schemas: set[str] = { + "Dict[str, object]", + "List[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner]", + "bool", + "float", + "int", + "str", + } model_config = { "validate_assignment": True, @@ -64,7 +96,7 @@ def __init__(self, *args, **kwargs) -> None: else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): if v is None: return v @@ -109,12 +141,15 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue with anyOf schemas: Dict[str, object], List[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner], bool, float, int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue with anyOf schemas: Dict[str, object], List[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner], bool, float, int, str. Details: " + + ", ".join(error_messages) + ) else: return v @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: + def from_dict(cls, obj: dict[str, Any]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -182,7 +217,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue with anyOf schemas: Dict[str, object], List[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner], bool, float, int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValue with anyOf schemas: Dict[str, object], List[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner], bool, float, int, str. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -196,7 +234,18 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, object], List[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner], bool, float, int, str]]: + def to_dict( + self, + ) -> ( + dict[str, Any] + | dict[str, object] + | list[ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner] + | bool + | float + | int + | str + | None + ): """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None @@ -209,5 +258,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, object], List[Chan def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/bamboohr_sdk/models/changed_employee_table_data_response_employees_value_rows_inner_value_any_of_inner.py b/bamboohr_sdk/models/changed_employee_table_data_response_employees_value_rows_inner_value_any_of_inner.py index bb6e701..124aa89 100644 --- a/bamboohr_sdk/models/changed_employee_table_data_response_employees_value_rows_inner_value_any_of_inner.py +++ b/bamboohr_sdk/models/changed_employee_table_data_response_employees_value_rows_inner_value_any_of_inner.py @@ -1,29 +1,40 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator -from typing import Any, Dict, Optional, Union -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field +from typing import TYPE_CHECKING, Any + +from pydantic import ( + BaseModel, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Self + +CHANGEDEMPLOYEETABLEDATARESPONSEEMPLOYEESVALUEROWSINNERVALUEANYOFINNER_ANY_OF_SCHEMAS = [ + "Dict[str, object]", + "bool", + "float", + "int", + "str", +] -CHANGEDEMPLOYEETABLEDATARESPONSEEMPLOYEESVALUEROWSINNERVALUEANYOFINNER_ANY_OF_SCHEMAS = ["bool", "float", "int", "object", "str"] class ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner(BaseModel): """ @@ -31,20 +42,20 @@ class ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner(Bas """ # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None + anyof_schema_1_validator: StrictStr | None = None # data type: float - anyof_schema_2_validator: Optional[Union[StrictFloat, StrictInt]] = None + anyof_schema_2_validator: StrictFloat | StrictInt | None = None # data type: bool - anyof_schema_3_validator: Optional[StrictBool] = None + anyof_schema_3_validator: StrictBool | None = None # data type: int - anyof_schema_4_validator: Optional[StrictInt] = None - # data type: object - anyof_schema_5_validator: Optional[Dict[str, Any]] = None + anyof_schema_4_validator: StrictInt | None = None + # data type: Dict[str, object] + anyof_schema_5_validator: dict[str, Any] | None = None if TYPE_CHECKING: - actual_instance: Optional[Union[bool, float, int, object, str]] = None + actual_instance: dict[str, object] | bool | float | int | str | None = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "bool", "float", "int", "object", "str" } + any_of_schemas: set[str] = {"Dict[str, object]", "bool", "float", "int", "str"} model_config = { "validate_assignment": True, @@ -61,7 +72,7 @@ def __init__(self, *args, **kwargs) -> None: else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): if v is None: return v @@ -92,7 +103,7 @@ def actual_instance_must_validate_anyof(cls, v): return v except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # validate data type: object + # validate data type: Dict[str, object] try: instance.anyof_schema_5_validator = v return v @@ -100,12 +111,15 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner with anyOf schemas: bool, float, int, object, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner with anyOf schemas: Dict[str, object], bool, float, int, str. Details: " + + ", ".join(error_messages) + ) else: return v @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: + def from_dict(cls, obj: dict[str, Any]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -152,7 +166,7 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into object + # deserialize data into Dict[str, object] try: # validation instance.anyof_schema_5_validator = json.loads(json_str) @@ -164,7 +178,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner with anyOf schemas: bool, float, int, object, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into ChangedEmployeeTableDataResponseEmployeesValueRowsInnerValueAnyOfInner with anyOf schemas: Dict[str, object], bool, float, int, str. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -178,7 +195,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], bool, float, int, object, str]]: + def to_dict(self) -> dict[str, Any] | dict[str, object] | bool | float | int | str | None: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None @@ -191,5 +208,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], bool, float, int, object, st def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/bamboohr_sdk/models/clock_entries_schema.py b/bamboohr_sdk/models/clock_entries_schema.py index 0948834..746ddf0 100644 --- a/bamboohr_sdk/models/clock_entries_schema.py +++ b/bamboohr_sdk/models/clock_entries_schema.py @@ -1,35 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Annotated, Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from bamboohr_sdk.models.clock_entry_schema import ClockEntrySchema -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.clock_entry_schema import ClockEntrySchema + + class ClockEntriesSchema(BaseModel): """ Request body schema for operations involving multiple clock entries - """ # noqa: E501 - entries: Annotated[List[ClockEntrySchema], Field(min_length=1)] = Field(description="Array of clock entries") - __properties: ClassVar[List[str]] = ["entries"] + """ + + entries: Annotated[list[ClockEntrySchema], Field(min_length=1)] = Field(description="Array of clock entries") + __properties: ClassVar[list[str]] = ["entries"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +36,6 @@ class ClockEntriesSchema(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ClockEntriesSchema from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,11 +73,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_entries in self.entries: if _item_entries: _items.append(_item_entries.to_dict()) - _dict['entries'] = _items + _dict["entries"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ClockEntriesSchema from a dict""" if obj is None: return None @@ -88,9 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "entries": [ClockEntrySchema.from_dict(_item) for _item in obj["entries"]] if obj.get("entries") is not None else None - }) + _obj = cls.model_validate( + { + "entries": [ClockEntrySchema.from_dict(_item) for _item in obj["entries"]] + if obj.get("entries") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/clock_entry_clock_entry_location_input_v1.py b/bamboohr_sdk/models/clock_entry_clock_entry_location_input_v1.py new file mode 100644 index 0000000..db556f6 --- /dev/null +++ b/bamboohr_sdk/models/clock_entry_clock_entry_location_input_v1.py @@ -0,0 +1,102 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Annotated, Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + + +class ClockEntryClockEntryLocationInputV1(BaseModel): + """ + Geolocation captured for a clock action. Persisted only when the configuration has geolocation enabled. + """ + + latitude: StrictFloat | StrictInt = Field(description="Latitude in decimal degrees.") + longitude: StrictFloat | StrictInt = Field(description="Longitude in decimal degrees.") + accuracy: Annotated[float, Field(le=10000, strict=True)] | Annotated[int, Field(le=10000, strict=True)] | None = ( + None + ) + address: StrictStr | None = None + __properties: ClassVar[list[str]] = ["latitude", "longitude", "accuracy", "address"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of ClockEntryClockEntryLocationInputV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if accuracy (nullable) is None + # and model_fields_set contains the field + if self.accuracy is None and "accuracy" in self.model_fields_set: + _dict["accuracy"] = None + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict["address"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of ClockEntryClockEntryLocationInputV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "latitude": obj.get("latitude"), + "longitude": obj.get("longitude"), + "accuracy": obj.get("accuracy"), + "address": obj.get("address"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/clock_entry_create_clock_entry_v1.py b/bamboohr_sdk/models/clock_entry_create_clock_entry_v1.py new file mode 100644 index 0000000..34b899f --- /dev/null +++ b/bamboohr_sdk/models/clock_entry_create_clock_entry_v1.py @@ -0,0 +1,152 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import datetime +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.clock_entry_clock_entry_location_input_v1 import ClockEntryClockEntryLocationInputV1 + + +class ClockEntryCreateClockEntryV1(BaseModel): + """ + Request body for manually creating a time tracking clock entry (corrections, retroactive entry). `timesheetId` and `date` are derived server-side from `start` + `timezone`. + """ + + employee_id: StrictInt = Field(description="The employee the clock entry belongs to.", alias="employeeId") + start: datetime = Field(description="Clock-in timestamp (ISO 8601).") + end: datetime = Field(description="Clock-out timestamp (ISO 8601). Must be after start.") + timezone: StrictStr = Field(description="IANA timezone identifier the times are recorded under.") + note: StrictStr | None = None + project_id: StrictInt | None = Field(default=None, alias="projectId") + task_id: StrictInt | None = Field(default=None, alias="taskId") + clock_in_location: ClockEntryClockEntryLocationInputV1 | None = Field( + default=None, description="Geolocation captured at clock-in.", alias="clockInLocation" + ) + clock_out_location: ClockEntryClockEntryLocationInputV1 | None = Field( + default=None, description="Geolocation captured at clock-out.", alias="clockOutLocation" + ) + __properties: ClassVar[list[str]] = [ + "employeeId", + "start", + "end", + "timezone", + "note", + "projectId", + "taskId", + "clockInLocation", + "clockOutLocation", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of ClockEntryCreateClockEntryV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of clock_in_location + if self.clock_in_location: + _dict["clockInLocation"] = self.clock_in_location.to_dict() + # override the default output from pydantic by calling `to_dict()` of clock_out_location + if self.clock_out_location: + _dict["clockOutLocation"] = self.clock_out_location.to_dict() + # set to None if note (nullable) is None + # and model_fields_set contains the field + if self.note is None and "note" in self.model_fields_set: + _dict["note"] = None + + # set to None if project_id (nullable) is None + # and model_fields_set contains the field + if self.project_id is None and "project_id" in self.model_fields_set: + _dict["projectId"] = None + + # set to None if task_id (nullable) is None + # and model_fields_set contains the field + if self.task_id is None and "task_id" in self.model_fields_set: + _dict["taskId"] = None + + # set to None if clock_in_location (nullable) is None + # and model_fields_set contains the field + if self.clock_in_location is None and "clock_in_location" in self.model_fields_set: + _dict["clockInLocation"] = None + + # set to None if clock_out_location (nullable) is None + # and model_fields_set contains the field + if self.clock_out_location is None and "clock_out_location" in self.model_fields_set: + _dict["clockOutLocation"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of ClockEntryCreateClockEntryV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "start": obj.get("start"), + "end": obj.get("end"), + "timezone": obj.get("timezone"), + "note": obj.get("note"), + "projectId": obj.get("projectId"), + "taskId": obj.get("taskId"), + "clockInLocation": ClockEntryClockEntryLocationInputV1.from_dict(obj["clockInLocation"]) + if obj.get("clockInLocation") is not None + else None, + "clockOutLocation": ClockEntryClockEntryLocationInputV1.from_dict(obj["clockOutLocation"]) + if obj.get("clockOutLocation") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/clock_entry_ids_schema.py b/bamboohr_sdk/models/clock_entry_ids_schema.py index 586343a..bcdeb4a 100644 --- a/bamboohr_sdk/models/clock_entry_ids_schema.py +++ b/bamboohr_sdk/models/clock_entry_ids_schema.py @@ -1,34 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Annotated, Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set from typing_extensions import Self + class ClockEntryIdsSchema(BaseModel): """ Request body schema for operations involving multiple clock entry IDs - """ # noqa: E501 - clock_entry_ids: Annotated[List[StrictInt], Field(min_length=1)] = Field(description="Array of clock entry IDs to process", alias="clockEntryIds") - __properties: ClassVar[List[str]] = ["clockEntryIds"] + """ + + clock_entry_ids: Annotated[list[StrictInt], Field(min_length=1)] = Field( + description="Array of clock entry IDs to process", alias="clockEntryIds" + ) + __properties: ClassVar[list[str]] = ["clockEntryIds"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +36,6 @@ class ClockEntryIdsSchema(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ClockEntryIdsSchema from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ClockEntryIdsSchema from a dict""" if obj is None: return None @@ -80,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "clockEntryIds": obj.get("clockEntryIds") - }) + _obj = cls.model_validate({"clockEntryIds": obj.get("clockEntryIds")}) return _obj - - diff --git a/bamboohr_sdk/models/clock_entry_schema.py b/bamboohr_sdk/models/clock_entry_schema.py index 1b943db..4efc7f4 100644 --- a/bamboohr_sdk/models/clock_entry_schema.py +++ b/bamboohr_sdk/models/clock_entry_schema.py @@ -1,53 +1,72 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations -import pprint -import re # noqa: F401 -import json +import json +import pprint +import re from datetime import date -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing import Annotated, Any, ClassVar from uuid import UUID -from typing import Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing_extensions import Self + class ClockEntrySchema(BaseModel): """ Schema for a single clock entry - """ # noqa: E501 + """ + employee_id: StrictInt = Field(description="Unique identifier for the employee.", alias="employeeId") var_date: date = Field(description="Date for the timesheet entry. Must be in YYYY-MM-DD format.", alias="date") - start: Annotated[str, Field(strict=True)] = Field(description="Start time for the timesheet entry. Local time for the employee. Must be in hh:mm 24 hour format.") - end: Annotated[str, Field(strict=True)] = Field(description="End time for the timesheet entry. Local time for the employee. Must be in hh:mm 24 hour format.") - id: Optional[StrictInt] = Field(default=None, description="The ID of an existing timesheet entry. This can be specified to edit an existing entry.") - project_id: Optional[StrictInt] = Field(default=None, description="The ID of the project to associate with the timesheet entry.", alias="projectId") - task_id: Optional[StrictInt] = Field(default=None, description="The ID of the task to associate with the timesheet entry.", alias="taskId") - note: Optional[StrictStr] = Field(default=None, description="Optional note to associate with the timesheet entry.") - break_id: Optional[UUID] = Field(default=None, description="Optional break id to associate with the timesheet entry.", alias="breakId") - __properties: ClassVar[List[str]] = ["employeeId", "date", "start", "end", "id", "projectId", "taskId", "note", "breakId"] - - @field_validator('start') + start: Annotated[str, Field(strict=True)] = Field( + description="Start time for the timesheet entry. Local time for the employee. Must be in hh:mm 24 hour format." + ) + end: Annotated[str, Field(strict=True)] = Field( + description="End time for the timesheet entry. Local time for the employee. Must be in hh:mm 24 hour format." + ) + id: StrictInt | None = Field( + default=None, + description="The ID of an existing timesheet entry. This can be specified to edit an existing entry.", + ) + project_id: StrictInt | None = Field( + default=None, description="The ID of the project to associate with the timesheet entry.", alias="projectId" + ) + task_id: StrictInt | None = Field( + default=None, description="The ID of the task to associate with the timesheet entry.", alias="taskId" + ) + note: StrictStr | None = Field(default=None, description="Optional note to associate with the timesheet entry.") + break_id: UUID | None = Field(default=None, alias="breakId") + __properties: ClassVar[list[str]] = [ + "employeeId", + "date", + "start", + "end", + "id", + "projectId", + "taskId", + "note", + "breakId", + ] + + @field_validator("start") def start_validate_regular_expression(cls, value): """Validates the regular expression""" if not re.match(r"^([01]?[0-9]|2[0-3]):[0-5][0-9]$", value): raise ValueError(r"must validate the regular expression /^([01]?[0-9]|2[0-3]):[0-5][0-9]$/") return value - @field_validator('end') + @field_validator("end") def end_validate_regular_expression(cls, value): """Validates the regular expression""" if not re.match(r"^([01]?[0-9]|2[0-3]):[0-5][0-9]$", value): @@ -60,7 +79,6 @@ def end_validate_regular_expression(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -71,11 +89,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ClockEntrySchema from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -85,8 +103,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -96,12 +113,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if break_id (nullable) is None # and model_fields_set contains the field if self.break_id is None and "break_id" in self.model_fields_set: - _dict['breakId'] = None + _dict["breakId"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ClockEntrySchema from a dict""" if obj is None: return None @@ -109,17 +126,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "employeeId": obj.get("employeeId"), - "date": obj.get("date"), - "start": obj.get("start"), - "end": obj.get("end"), - "id": obj.get("id"), - "projectId": obj.get("projectId"), - "taskId": obj.get("taskId"), - "note": obj.get("note"), - "breakId": obj.get("breakId") - }) + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "date": obj.get("date"), + "start": obj.get("start"), + "end": obj.get("end"), + "id": obj.get("id"), + "projectId": obj.get("projectId"), + "taskId": obj.get("taskId"), + "note": obj.get("note"), + "breakId": obj.get("breakId"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/clock_in_request_schema.py b/bamboohr_sdk/models/clock_in_request_schema.py index 3de1e90..e75acc7 100644 --- a/bamboohr_sdk/models/clock_in_request_schema.py +++ b/bamboohr_sdk/models/clock_in_request_schema.py @@ -1,45 +1,55 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations -import pprint -import re # noqa: F401 -import json +import json +import pprint +import re from datetime import date -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated +from typing import Annotated, Any, ClassVar from uuid import UUID -from typing import Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing_extensions import Self + class ClockInRequestSchema(BaseModel): """ Schema for clock-in request body - """ # noqa: E501 - project_id: Optional[StrictInt] = Field(default=None, description="ID of the time tracking project that should be associated with the timesheet entry. Required if taskId is specified.", alias="projectId") - task_id: Optional[StrictInt] = Field(default=None, description="ID of the time tracking task that should be associated with the timesheet entry.", alias="taskId") - note: Optional[StrictStr] = Field(default=None, description="The note that should be associated with the timesheet entry") - var_date: Optional[date] = Field(default=None, description="Date for the timesheet entry. Must be in YYYY-MM-DD format.", alias="date") - start: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="The time for the clock in. In 24 hour format HH:MM") - timezone: Optional[StrictStr] = Field(default=None, description="The timezone associated with the clock in.") - break_id: Optional[UUID] = Field(default=None, description="ID of the break that should be associated with the timesheet entry.", alias="breakId") - offline: Optional[StrictBool] = Field(default=None, description="Whether this is an offline punch. When true, bypasses the shift schedule clock-in restriction. Intended for devices that store punches offline and sync later.") - __properties: ClassVar[List[str]] = ["projectId", "taskId", "note", "date", "start", "timezone", "breakId", "offline"] - - @field_validator('start') + """ + + project_id: StrictInt | None = Field(default=None, alias="projectId") + task_id: StrictInt | None = Field(default=None, alias="taskId") + note: StrictStr | None = None + var_date: date | None = Field(default=None, alias="date") + start: Annotated[str, Field(strict=True)] | None = None + timezone: StrictStr | None = None + break_id: UUID | None = Field(default=None, alias="breakId") + offline: StrictBool | None = Field( + default=None, + description="Whether this is an offline punch. When true, bypasses the shift schedule clock-in restriction. Intended for devices that store punches offline and sync later.", + ) + __properties: ClassVar[list[str]] = [ + "projectId", + "taskId", + "note", + "date", + "start", + "timezone", + "breakId", + "offline", + ] + + @field_validator("start") def start_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: @@ -55,7 +65,6 @@ def start_validate_regular_expression(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +75,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ClockInRequestSchema from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -80,8 +89,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -91,42 +99,42 @@ def to_dict(self) -> Dict[str, Any]: # set to None if project_id (nullable) is None # and model_fields_set contains the field if self.project_id is None and "project_id" in self.model_fields_set: - _dict['projectId'] = None + _dict["projectId"] = None # set to None if task_id (nullable) is None # and model_fields_set contains the field if self.task_id is None and "task_id" in self.model_fields_set: - _dict['taskId'] = None + _dict["taskId"] = None # set to None if note (nullable) is None # and model_fields_set contains the field if self.note is None and "note" in self.model_fields_set: - _dict['note'] = None + _dict["note"] = None # set to None if var_date (nullable) is None # and model_fields_set contains the field if self.var_date is None and "var_date" in self.model_fields_set: - _dict['date'] = None + _dict["date"] = None # set to None if start (nullable) is None # and model_fields_set contains the field if self.start is None and "start" in self.model_fields_set: - _dict['start'] = None + _dict["start"] = None # set to None if timezone (nullable) is None # and model_fields_set contains the field if self.timezone is None and "timezone" in self.model_fields_set: - _dict['timezone'] = None + _dict["timezone"] = None # set to None if break_id (nullable) is None # and model_fields_set contains the field if self.break_id is None and "break_id" in self.model_fields_set: - _dict['breakId'] = None + _dict["breakId"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ClockInRequestSchema from a dict""" if obj is None: return None @@ -134,16 +142,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "projectId": obj.get("projectId"), - "taskId": obj.get("taskId"), - "note": obj.get("note"), - "date": obj.get("date"), - "start": obj.get("start"), - "timezone": obj.get("timezone"), - "breakId": obj.get("breakId"), - "offline": obj.get("offline") - }) + _obj = cls.model_validate( + { + "projectId": obj.get("projectId"), + "taskId": obj.get("taskId"), + "note": obj.get("note"), + "date": obj.get("date"), + "start": obj.get("start"), + "timezone": obj.get("timezone"), + "breakId": obj.get("breakId"), + "offline": obj.get("offline"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/clock_out_request_schema.py b/bamboohr_sdk/models/clock_out_request_schema.py index aacbfee..5af941f 100644 --- a/bamboohr_sdk/models/clock_out_request_schema.py +++ b/bamboohr_sdk/models/clock_out_request_schema.py @@ -1,39 +1,41 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations -import pprint -import re # noqa: F401 -import json +import json +import pprint +import re from datetime import date +from typing import Annotated, Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set from typing_extensions import Self + class ClockOutRequestSchema(BaseModel): """ Schema for clock out request body - """ # noqa: E501 - var_date: Optional[date] = Field(default=None, description="Date for the timesheet entry. Must be in YYYY-MM-DD format.", alias="date") - end: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="The time for the clock out. In 24 hour format HH:MM") - timezone: Optional[StrictStr] = Field(default=None, description="The timezone associated with the clock out.") - __properties: ClassVar[List[str]] = ["date", "end", "timezone"] + """ + + var_date: date | None = Field( + default=None, description="Date for the timesheet entry. Must be in YYYY-MM-DD format.", alias="date" + ) + end: Annotated[str, Field(strict=True)] | None = Field( + default=None, description="The time for the clock out. In 24 hour format HH:MM" + ) + timezone: StrictStr | None = Field(default=None, description="The timezone associated with the clock out.") + __properties: ClassVar[list[str]] = ["date", "end", "timezone"] - @field_validator('end') + @field_validator("end") def end_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: @@ -49,7 +51,6 @@ def end_validate_regular_expression(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,11 +61,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ClockOutRequestSchema from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -74,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -85,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ClockOutRequestSchema from a dict""" if obj is None: return None @@ -93,11 +93,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "date": obj.get("date"), - "end": obj.get("end"), - "timezone": obj.get("timezone") - }) + _obj = cls.model_validate({"date": obj.get("date"), "end": obj.get("end"), "timezone": obj.get("timezone")}) return _obj - - diff --git a/bamboohr_sdk/models/close_goal_request.py b/bamboohr_sdk/models/close_goal_request.py new file mode 100644 index 0000000..fd801c2 --- /dev/null +++ b/bamboohr_sdk/models/close_goal_request.py @@ -0,0 +1,85 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing_extensions import Self + + +class CloseGoalRequest(BaseModel): + """ + CloseGoalRequest + """ + + comment: StrictStr | None = None + __properties: ClassVar[list[str]] = ["comment"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CloseGoalRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if comment (nullable) is None + # and model_fields_set contains the field + if self.comment is None and "comment" in self.model_fields_set: + _dict["comment"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CloseGoalRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"comment": obj.get("comment")}) + return _obj diff --git a/bamboohr_sdk/models/company_benefit_summary.py b/bamboohr_sdk/models/company_benefit_summary.py index 8276f12..0322465 100644 --- a/bamboohr_sdk/models/company_benefit_summary.py +++ b/bamboohr_sdk/models/company_benefit_summary.py @@ -1,52 +1,87 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CompanyBenefitSummary(BaseModel): """ A summary representation of a company benefit plan as returned by the list endpoint. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the company benefit plan.") - name: Optional[StrictStr] = Field(default=None, description="The name of the company benefit plan.") - type: Optional[StrictStr] = Field(default=None, description="The benefit category type.") - benefit_vendor_id: Optional[StrictStr] = Field(default=None, description="The ID of the benefit vendor associated with this plan, or null if none.", alias="benefitVendorId") - deduction_type_id: Optional[StrictStr] = Field(default=None, description="The deduction type ID for this plan, or null if not applicable.", alias="deductionTypeId") - company_deduction_id: Optional[StrictStr] = Field(default=None, description="The company-level deduction record ID linked to this plan, or null if not set.", alias="companyDeductionId") - start_date: Optional[date] = Field(default=None, description="The date the benefit plan becomes effective (YYYY-MM-DD), or null if not set.", alias="startDate") - end_date: Optional[date] = Field(default=None, description="The date the benefit plan ends (YYYY-MM-DD), or null if ongoing.", alias="endDate") - allows_catch_up: Optional[StrictBool] = Field(default=None, description="Whether the plan allows catch-up contributions (e.g., for HSA plans for employees 55+), or null if not applicable to this plan type.", alias="allowsCatchUp") - allows_super_catch_up: Optional[StrictBool] = Field(default=None, description="Whether the plan allows super catch-up contributions, or null if not applicable to this plan type.", alias="allowsSuperCatchUp") - __properties: ClassVar[List[str]] = ["id", "name", "type", "benefitVendorId", "deductionTypeId", "companyDeductionId", "startDate", "endDate", "allowsCatchUp", "allowsSuperCatchUp"] - - @field_validator('type') + """ + + id: StrictStr | None = Field(default=None, description="The unique identifier of the company benefit plan.") + name: StrictStr | None = Field(default=None, description="The name of the company benefit plan.") + type: StrictStr | None = Field(default=None, description="The benefit category type.") + benefit_vendor_id: StrictStr | None = Field(default=None, alias="benefitVendorId") + deduction_type_id: StrictStr | None = Field(default=None, alias="deductionTypeId") + company_deduction_id: StrictStr | None = Field(default=None, alias="companyDeductionId") + start_date: date | None = Field(default=None, alias="startDate") + end_date: date | None = Field(default=None, alias="endDate") + allows_catch_up: StrictBool | None = Field(default=None, alias="allowsCatchUp") + allows_super_catch_up: StrictBool | None = Field(default=None, alias="allowsSuperCatchUp") + is_draft: StrictBool | None = Field( + default=None, description="Whether the plan is still in a draft (not yet published) state.", alias="isDraft" + ) + editable: StrictBool | None = Field( + default=None, + description="Whether the plan can be edited. False when the plan has any active, archived, or future enrollments.", + ) + __properties: ClassVar[list[str]] = [ + "id", + "name", + "type", + "benefitVendorId", + "deductionTypeId", + "companyDeductionId", + "startDate", + "endDate", + "allowsCatchUp", + "allowsSuperCatchUp", + "isDraft", + "editable", + ] + + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['health', 'dental', 'vision', 'retirement', 'hsa', 'flex', 'life', 'disability', 'reimbursement', 'supplemental']): - raise ValueError("must be one of enum values ('health', 'dental', 'vision', 'retirement', 'hsa', 'flex', 'life', 'disability', 'reimbursement', 'supplemental')") + if value not in set( + [ + "health", + "dental", + "vision", + "retirement", + "hsa", + "flex", + "life", + "disability", + "reimbursement", + "supplemental", + "other", + ] + ): + raise ValueError( + "must be one of enum values ('health', 'dental', 'vision', 'retirement', 'hsa', 'flex', 'life', 'disability', 'reimbursement', 'supplemental', 'other')" + ) return value model_config = ConfigDict( @@ -55,7 +90,6 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,11 +100,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyBenefitSummary from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -80,8 +114,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -91,42 +124,42 @@ def to_dict(self) -> Dict[str, Any]: # set to None if benefit_vendor_id (nullable) is None # and model_fields_set contains the field if self.benefit_vendor_id is None and "benefit_vendor_id" in self.model_fields_set: - _dict['benefitVendorId'] = None + _dict["benefitVendorId"] = None # set to None if deduction_type_id (nullable) is None # and model_fields_set contains the field if self.deduction_type_id is None and "deduction_type_id" in self.model_fields_set: - _dict['deductionTypeId'] = None + _dict["deductionTypeId"] = None # set to None if company_deduction_id (nullable) is None # and model_fields_set contains the field if self.company_deduction_id is None and "company_deduction_id" in self.model_fields_set: - _dict['companyDeductionId'] = None + _dict["companyDeductionId"] = None # set to None if start_date (nullable) is None # and model_fields_set contains the field if self.start_date is None and "start_date" in self.model_fields_set: - _dict['startDate'] = None + _dict["startDate"] = None # set to None if end_date (nullable) is None # and model_fields_set contains the field if self.end_date is None and "end_date" in self.model_fields_set: - _dict['endDate'] = None + _dict["endDate"] = None # set to None if allows_catch_up (nullable) is None # and model_fields_set contains the field if self.allows_catch_up is None and "allows_catch_up" in self.model_fields_set: - _dict['allowsCatchUp'] = None + _dict["allowsCatchUp"] = None # set to None if allows_super_catch_up (nullable) is None # and model_fields_set contains the field if self.allows_super_catch_up is None and "allows_super_catch_up" in self.model_fields_set: - _dict['allowsSuperCatchUp'] = None + _dict["allowsSuperCatchUp"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyBenefitSummary from a dict""" if obj is None: return None @@ -134,18 +167,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "type": obj.get("type"), - "benefitVendorId": obj.get("benefitVendorId"), - "deductionTypeId": obj.get("deductionTypeId"), - "companyDeductionId": obj.get("companyDeductionId"), - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "allowsCatchUp": obj.get("allowsCatchUp"), - "allowsSuperCatchUp": obj.get("allowsSuperCatchUp") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "benefitVendorId": obj.get("benefitVendorId"), + "deductionTypeId": obj.get("deductionTypeId"), + "companyDeductionId": obj.get("companyDeductionId"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "allowsCatchUp": obj.get("allowsCatchUp"), + "allowsSuperCatchUp": obj.get("allowsSuperCatchUp"), + "isDraft": obj.get("isDraft"), + "editable": obj.get("editable"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/company_benefits_list_response.py b/bamboohr_sdk/models/company_benefits_list_response.py index 8d031d9..d17fb06 100644 --- a/bamboohr_sdk/models/company_benefits_list_response.py +++ b/bamboohr_sdk/models/company_benefits_list_response.py @@ -1,34 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.company_benefit_summary import CompanyBenefitSummary -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.company_benefit_summary import CompanyBenefitSummary + + class CompanyBenefitsListResponse(BaseModel): """ CompanyBenefitsListResponse - """ # noqa: E501 - company_benefits: Optional[List[CompanyBenefitSummary]] = Field(default=None, description="List of company benefit plan summaries.", alias="companyBenefits") - __properties: ClassVar[List[str]] = ["companyBenefits"] + """ + + company_benefits: list[CompanyBenefitSummary] | None = Field( + default=None, description="List of company benefit plan summaries.", alias="companyBenefits" + ) + __properties: ClassVar[list[str]] = ["companyBenefits"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +38,6 @@ class CompanyBenefitsListResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyBenefitsListResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,11 +75,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_company_benefits in self.company_benefits: if _item_company_benefits: _items.append(_item_company_benefits.to_dict()) - _dict['companyBenefits'] = _items + _dict["companyBenefits"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyBenefitsListResponse from a dict""" if obj is None: return None @@ -87,9 +87,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "companyBenefits": [CompanyBenefitSummary.from_dict(_item) for _item in obj["companyBenefits"]] if obj.get("companyBenefits") is not None else None - }) + _obj = cls.model_validate( + { + "companyBenefits": [CompanyBenefitSummary.from_dict(_item) for _item in obj["companyBenefits"]] + if obj.get("companyBenefits") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/company_deleted_webhook_payload.py b/bamboohr_sdk/models/company_deleted_webhook_payload.py index bd69fe4..2944db6 100644 --- a/bamboohr_sdk/models/company_deleted_webhook_payload.py +++ b/bamboohr_sdk/models/company_deleted_webhook_payload.py @@ -1,45 +1,47 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.company_integrations_updated_webhook_payload_data import CompanyIntegrationsUpdatedWebhookPayloadData -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.company_integrations_updated_webhook_payload_data import ( + CompanyIntegrationsUpdatedWebhookPayloadData, +) + + class CompanyDeletedWebhookPayload(BaseModel): """ Webhook payload sent when a company is deleted. - """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, description="The event type identifier") - timestamp: Optional[datetime] = Field(default=None, description="ISO 8601 timestamp (UTC) when the event was fired") - data: Optional[CompanyIntegrationsUpdatedWebhookPayloadData] = None - __properties: ClassVar[List[str]] = ["type", "timestamp", "data"] + """ + + type: StrictStr | None = Field(default=None, description="The event type identifier") + timestamp: datetime | None = Field(default=None, description="ISO 8601 timestamp (UTC) when the event was fired") + data: CompanyIntegrationsUpdatedWebhookPayloadData | None = None + __properties: ClassVar[list[str]] = ["type", "timestamp", "data"] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['company.deleted']): + if value not in set(["company.deleted"]): raise ValueError("must be one of enum values ('company.deleted')") return value @@ -49,7 +51,6 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,11 +61,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyDeletedWebhookPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -74,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -84,11 +84,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of data if self.data: - _dict['data'] = self.data.to_dict() + _dict["data"] = self.data.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyDeletedWebhookPayload from a dict""" if obj is None: return None @@ -96,11 +96,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type"), - "timestamp": obj.get("timestamp"), - "data": CompanyIntegrationsUpdatedWebhookPayloadData.from_dict(obj["data"]) if obj.get("data") is not None else None - }) + _obj = cls.model_validate( + { + "type": obj.get("type"), + "timestamp": obj.get("timestamp"), + "data": CompanyIntegrationsUpdatedWebhookPayloadData.from_dict(obj["data"]) + if obj.get("data") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/company_file_update.py b/bamboohr_sdk/models/company_file_update.py index ba7ca1e..e5ad75e 100644 --- a/bamboohr_sdk/models/company_file_update.py +++ b/bamboohr_sdk/models/company_file_update.py @@ -1,43 +1,46 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CompanyFileUpdate(BaseModel): """ CompanyFileUpdate - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="The new display name for the file.") - category_id: Optional[StrictStr] = Field(default=None, description="The ID of the category (file section) to move the file to.", alias="categoryId") - share_with_employee: Optional[StrictStr] = Field(default=None, description="Whether the file is shared with employees.", alias="shareWithEmployee") - __properties: ClassVar[List[str]] = ["name", "categoryId", "shareWithEmployee"] + """ - @field_validator('share_with_employee') + name: StrictStr | None = Field(default=None, description="The new display name for the file.") + category_id: StrictStr | None = Field( + default=None, description="The ID of the category (file section) to move the file to.", alias="categoryId" + ) + share_with_employee: StrictStr | None = Field( + default=None, description="Whether the file is shared with employees.", alias="shareWithEmployee" + ) + __properties: ClassVar[list[str]] = ["name", "categoryId", "shareWithEmployee"] + + @field_validator("share_with_employee") def share_with_employee_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value @@ -47,7 +50,6 @@ def share_with_employee_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -58,11 +60,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyFileUpdate from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -72,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -83,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyFileUpdate from a dict""" if obj is None: return None @@ -91,11 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "categoryId": obj.get("categoryId"), - "shareWithEmployee": obj.get("shareWithEmployee") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "categoryId": obj.get("categoryId"), + "shareWithEmployee": obj.get("shareWithEmployee"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/company_files_response.py b/bamboohr_sdk/models/company_files_response.py index 150faab..680b164 100644 --- a/bamboohr_sdk/models/company_files_response.py +++ b/bamboohr_sdk/models/company_files_response.py @@ -1,34 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.company_files_response_categories_inner import CompanyFilesResponseCategoriesInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.company_files_response_categories_inner import CompanyFilesResponseCategoriesInner + + class CompanyFilesResponse(BaseModel): """ CompanyFilesResponse - """ # noqa: E501 - categories: Optional[List[CompanyFilesResponseCategoriesInner]] = Field(default=None, description="List of company file categories.") - __properties: ClassVar[List[str]] = ["categories"] + """ + + categories: list[CompanyFilesResponseCategoriesInner] | None = Field( + default=None, description="List of company file categories." + ) + __properties: ClassVar[list[str]] = ["categories"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +38,6 @@ class CompanyFilesResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyFilesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,11 +75,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_categories in self.categories: if _item_categories: _items.append(_item_categories.to_dict()) - _dict['categories'] = _items + _dict["categories"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyFilesResponse from a dict""" if obj is None: return None @@ -87,9 +87,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "categories": [CompanyFilesResponseCategoriesInner.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None - }) + _obj = cls.model_validate( + { + "categories": [CompanyFilesResponseCategoriesInner.from_dict(_item) for _item in obj["categories"]] + if obj.get("categories") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/company_files_response_categories_inner.py b/bamboohr_sdk/models/company_files_response_categories_inner.py index 7e66cb6..872e145 100644 --- a/bamboohr_sdk/models/company_files_response_categories_inner.py +++ b/bamboohr_sdk/models/company_files_response_categories_inner.py @@ -1,45 +1,53 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.company_files_response_categories_inner_files_inner import CompanyFilesResponseCategoriesInnerFilesInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.company_files_response_categories_inner_files_inner import ( + CompanyFilesResponseCategoriesInnerFilesInner, +) + + class CompanyFilesResponseCategoriesInner(BaseModel): """ CompanyFilesResponseCategoriesInner - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Category ID.") - name: Optional[StrictStr] = Field(default=None, description="Category display name.") - can_upload_files: Optional[StrictStr] = Field(default=None, description="Whether the requesting user can upload files to this category.", alias="canUploadFiles") - files: Optional[List[CompanyFilesResponseCategoriesInnerFilesInner]] = Field(default=None, description="Files visible to the requesting user in this category.") - __properties: ClassVar[List[str]] = ["id", "name", "canUploadFiles", "files"] - - @field_validator('can_upload_files') + """ + + id: StrictInt | None = Field(default=None, description="Category ID.") + name: StrictStr | None = Field(default=None, description="Category display name.") + can_upload_files: StrictStr | None = Field( + default=None, + description="Whether the requesting user can upload files to this category.", + alias="canUploadFiles", + ) + files: list[CompanyFilesResponseCategoriesInnerFilesInner] | None = Field( + default=None, description="Files visible to the requesting user in this category." + ) + __properties: ClassVar[list[str]] = ["id", "name", "canUploadFiles", "files"] + + @field_validator("can_upload_files") def can_upload_files_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value @@ -49,7 +57,6 @@ def can_upload_files_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,11 +67,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyFilesResponseCategoriesInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -74,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -88,11 +94,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_files in self.files: if _item_files: _items.append(_item_files.to_dict()) - _dict['files'] = _items + _dict["files"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyFilesResponseCategoriesInner from a dict""" if obj is None: return None @@ -100,12 +106,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "canUploadFiles": obj.get("canUploadFiles"), - "files": [CompanyFilesResponseCategoriesInnerFilesInner.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "canUploadFiles": obj.get("canUploadFiles"), + "files": [CompanyFilesResponseCategoriesInnerFilesInner.from_dict(_item) for _item in obj["files"]] + if obj.get("files") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/company_files_response_categories_inner_files_inner.py b/bamboohr_sdk/models/company_files_response_categories_inner_files_inner.py index 2a226e3..129f76b 100644 --- a/bamboohr_sdk/models/company_files_response_categories_inner_files_inner.py +++ b/bamboohr_sdk/models/company_files_response_categories_inner_files_inner.py @@ -1,69 +1,92 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CompanyFilesResponseCategoriesInnerFilesInner(BaseModel): """ CompanyFilesResponseCategoriesInnerFilesInner - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="File ID.") - name: Optional[StrictStr] = Field(default=None, description="File display name.") - original_file_name: Optional[StrictStr] = Field(default=None, description="Original uploaded filename including extension.", alias="originalFileName") - size: Optional[StrictStr] = Field(default=None, description="File size in bytes.") - date_created: Optional[StrictStr] = Field(default=None, description="Timestamp of when the file was uploaded, in ISO 8601 format with UTC offset (e.g. `2025-02-11T22:30:07+0000`).", alias="dateCreated") - created_by: Optional[StrictStr] = Field(default=None, description="Full name of the user who uploaded the file.", alias="createdBy") - share_with_employees: Optional[StrictStr] = Field(default=None, description="Whether the file is shared with all employees.", alias="shareWithEmployees") - can_rename_file: Optional[StrictStr] = Field(default=None, description="Whether the requesting user can rename this file.", alias="canRenameFile") - can_delete_file: Optional[StrictStr] = Field(default=None, description="Whether the requesting user can delete this file.", alias="canDeleteFile") - __properties: ClassVar[List[str]] = ["id", "name", "originalFileName", "size", "dateCreated", "createdBy", "shareWithEmployees", "canRenameFile", "canDeleteFile"] - - @field_validator('share_with_employees') + """ + + id: StrictInt | None = Field(default=None, description="File ID.") + name: StrictStr | None = Field(default=None, description="File display name.") + original_file_name: StrictStr | None = Field( + default=None, description="Original uploaded filename including extension.", alias="originalFileName" + ) + size: StrictStr | None = Field(default=None, description="File size in bytes.") + date_created: StrictStr | None = Field( + default=None, + description="Timestamp of when the file was uploaded, in ISO 8601 format with UTC offset (e.g. `2025-02-11T22:30:07+0000`).", + alias="dateCreated", + ) + created_by: StrictStr | None = Field( + default=None, description="Full name of the user who uploaded the file.", alias="createdBy" + ) + share_with_employees: StrictStr | None = Field( + default=None, description="Whether the file is shared with all employees.", alias="shareWithEmployees" + ) + can_rename_file: StrictStr | None = Field( + default=None, description="Whether the requesting user can rename this file.", alias="canRenameFile" + ) + can_delete_file: StrictStr | None = Field( + default=None, description="Whether the requesting user can delete this file.", alias="canDeleteFile" + ) + __properties: ClassVar[list[str]] = [ + "id", + "name", + "originalFileName", + "size", + "dateCreated", + "createdBy", + "shareWithEmployees", + "canRenameFile", + "canDeleteFile", + ] + + @field_validator("share_with_employees") def share_with_employees_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value - @field_validator('can_rename_file') + @field_validator("can_rename_file") def can_rename_file_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value - @field_validator('can_delete_file') + @field_validator("can_delete_file") def can_delete_file_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value @@ -73,7 +96,6 @@ def can_delete_file_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -84,11 +106,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyFilesResponseCategoriesInnerFilesInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -98,8 +120,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -109,7 +130,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyFilesResponseCategoriesInnerFilesInner from a dict""" if obj is None: return None @@ -117,17 +138,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "originalFileName": obj.get("originalFileName"), - "size": obj.get("size"), - "dateCreated": obj.get("dateCreated"), - "createdBy": obj.get("createdBy"), - "shareWithEmployees": obj.get("shareWithEmployees"), - "canRenameFile": obj.get("canRenameFile"), - "canDeleteFile": obj.get("canDeleteFile") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "originalFileName": obj.get("originalFileName"), + "size": obj.get("size"), + "dateCreated": obj.get("dateCreated"), + "createdBy": obj.get("createdBy"), + "shareWithEmployees": obj.get("shareWithEmployees"), + "canRenameFile": obj.get("canRenameFile"), + "canDeleteFile": obj.get("canDeleteFile"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/company_industry_data_object.py b/bamboohr_sdk/models/company_industry_data_object.py new file mode 100644 index 0000000..17a0bb4 --- /dev/null +++ b/bamboohr_sdk/models/company_industry_data_object.py @@ -0,0 +1,102 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing_extensions import Self + + +class CompanyIndustryDataObject(BaseModel): + """ + Company's enabled industry. + """ + + industry_id: StrictInt = Field(description="The company's industry id.", alias="industryId") + added_by_customer: StrictBool = Field( + description="If the industry was added by the customer.", alias="addedByCustomer" + ) + added_by_user_id: StrictInt | None = Field(alias="addedByUserId") + added_ymdt: StrictStr | None = Field(alias="addedYmdt") + __properties: ClassVar[list[str]] = ["industryId", "addedByCustomer", "addedByUserId", "addedYmdt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompanyIndustryDataObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if added_by_user_id (nullable) is None + # and model_fields_set contains the field + if self.added_by_user_id is None and "added_by_user_id" in self.model_fields_set: + _dict["addedByUserId"] = None + + # set to None if added_ymdt (nullable) is None + # and model_fields_set contains the field + if self.added_ymdt is None and "added_ymdt" in self.model_fields_set: + _dict["addedYmdt"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompanyIndustryDataObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "industryId": obj.get("industryId"), + "addedByCustomer": obj.get("addedByCustomer"), + "addedByUserId": obj.get("addedByUserId"), + "addedYmdt": obj.get("addedYmdt"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/company_information.py b/bamboohr_sdk/models/company_information.py index c2ec77a..ffb847b 100644 --- a/bamboohr_sdk/models/company_information.py +++ b/bamboohr_sdk/models/company_information.py @@ -1,37 +1,39 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.company_information_address import CompanyInformationAddress -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.company_information_address import CompanyInformationAddress + + class CompanyInformation(BaseModel): """ CompanyInformation - """ # noqa: E501 - legal_name: Optional[StrictStr] = Field(default=None, description="The legal name of the company.", alias="legalName") - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the company.", alias="displayName") - address: Optional[CompanyInformationAddress] = None - phone: Optional[StrictStr] = Field(default=None, description="The primary contact phone number of the company.") - __properties: ClassVar[List[str]] = ["legalName", "displayName", "address", "phone"] + """ + + legal_name: StrictStr | None = Field(default=None, description="The legal name of the company.", alias="legalName") + display_name: StrictStr | None = Field( + default=None, description="The display name of the company.", alias="displayName" + ) + address: CompanyInformationAddress | None = None + phone: StrictStr | None = Field(default=None, description="The primary contact phone number of the company.") + __properties: ClassVar[list[str]] = ["legalName", "displayName", "address", "phone"] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +41,6 @@ class CompanyInformation(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,11 +51,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyInformation from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -64,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,11 +74,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of address if self.address: - _dict['address'] = self.address.to_dict() + _dict["address"] = self.address.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyInformation from a dict""" if obj is None: return None @@ -86,12 +86,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "legalName": obj.get("legalName"), - "displayName": obj.get("displayName"), - "address": CompanyInformationAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, - "phone": obj.get("phone") - }) + _obj = cls.model_validate( + { + "legalName": obj.get("legalName"), + "displayName": obj.get("displayName"), + "address": CompanyInformationAddress.from_dict(obj["address"]) + if obj.get("address") is not None + else None, + "phone": obj.get("phone"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/company_information_address.py b/bamboohr_sdk/models/company_information_address.py index d719e85..d1be91c 100644 --- a/bamboohr_sdk/models/company_information_address.py +++ b/bamboohr_sdk/models/company_information_address.py @@ -1,37 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CompanyInformationAddress(BaseModel): """ The primary address of the company. - """ # noqa: E501 - line1: Optional[StrictStr] = Field(default=None, description="The first line of the address.") - line2: Optional[StrictStr] = Field(default=None, description="The second line of the address. May be an empty string.") - city: Optional[StrictStr] = Field(default=None, description="The city.") - state: Optional[StrictStr] = Field(default=None, description="The state or province abbreviation.") - zip: Optional[StrictStr] = Field(default=None, description="The ZIP or postal code.") - __properties: ClassVar[List[str]] = ["line1", "line2", "city", "state", "zip"] + """ + + line1: StrictStr | None = Field(default=None, description="The first line of the address.") + line2: StrictStr | None = Field(default=None, description="The second line of the address. May be an empty string.") + city: StrictStr | None = Field(default=None, description="The city.") + state: StrictStr | None = Field(default=None, description="The state or province abbreviation.") + zip: StrictStr | None = Field(default=None, description="The ZIP or postal code.") + __properties: ClassVar[list[str]] = ["line1", "line2", "city", "state", "zip"] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +38,6 @@ class CompanyInformationAddress(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyInformationAddress from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -64,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyInformationAddress from a dict""" if obj is None: return None @@ -83,13 +80,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "line1": obj.get("line1"), - "line2": obj.get("line2"), - "city": obj.get("city"), - "state": obj.get("state"), - "zip": obj.get("zip") - }) + _obj = cls.model_validate( + { + "line1": obj.get("line1"), + "line2": obj.get("line2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/company_integrations_updated_webhook_payload.py b/bamboohr_sdk/models/company_integrations_updated_webhook_payload.py index 39523b6..a6d5b62 100644 --- a/bamboohr_sdk/models/company_integrations_updated_webhook_payload.py +++ b/bamboohr_sdk/models/company_integrations_updated_webhook_payload.py @@ -1,45 +1,47 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.company_integrations_updated_webhook_payload_data import CompanyIntegrationsUpdatedWebhookPayloadData -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.company_integrations_updated_webhook_payload_data import ( + CompanyIntegrationsUpdatedWebhookPayloadData, +) + + class CompanyIntegrationsUpdatedWebhookPayload(BaseModel): """ Webhook payload sent when company integrations are updated. - """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, description="The event type identifier") - timestamp: Optional[datetime] = Field(default=None, description="ISO 8601 timestamp (UTC) when the event was fired") - data: Optional[CompanyIntegrationsUpdatedWebhookPayloadData] = None - __properties: ClassVar[List[str]] = ["type", "timestamp", "data"] + """ + + type: StrictStr | None = Field(default=None, description="The event type identifier") + timestamp: datetime | None = Field(default=None, description="ISO 8601 timestamp (UTC) when the event was fired") + data: CompanyIntegrationsUpdatedWebhookPayloadData | None = None + __properties: ClassVar[list[str]] = ["type", "timestamp", "data"] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['company-integrations.updated']): + if value not in set(["company-integrations.updated"]): raise ValueError("must be one of enum values ('company-integrations.updated')") return value @@ -49,7 +51,6 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,11 +61,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyIntegrationsUpdatedWebhookPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -74,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -84,11 +84,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of data if self.data: - _dict['data'] = self.data.to_dict() + _dict["data"] = self.data.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyIntegrationsUpdatedWebhookPayload from a dict""" if obj is None: return None @@ -96,11 +96,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type"), - "timestamp": obj.get("timestamp"), - "data": CompanyIntegrationsUpdatedWebhookPayloadData.from_dict(obj["data"]) if obj.get("data") is not None else None - }) + _obj = cls.model_validate( + { + "type": obj.get("type"), + "timestamp": obj.get("timestamp"), + "data": CompanyIntegrationsUpdatedWebhookPayloadData.from_dict(obj["data"]) + if obj.get("data") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/company_integrations_updated_webhook_payload_data.py b/bamboohr_sdk/models/company_integrations_updated_webhook_payload_data.py index 9701dd1..3be3163 100644 --- a/bamboohr_sdk/models/company_integrations_updated_webhook_payload_data.py +++ b/bamboohr_sdk/models/company_integrations_updated_webhook_payload_data.py @@ -1,33 +1,32 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CompanyIntegrationsUpdatedWebhookPayloadData(BaseModel): """ Event data containing company information - """ # noqa: E501 - company_id: Optional[StrictStr] = Field(default=None, description="The company ID", alias="companyId") - __properties: ClassVar[List[str]] = ["companyId"] + """ + + company_id: StrictStr | None = Field(default=None, description="The company ID", alias="companyId") + __properties: ClassVar[list[str]] = ["companyId"] model_config = ConfigDict( populate_by_name=True, @@ -35,7 +34,6 @@ class CompanyIntegrationsUpdatedWebhookPayloadData(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -46,11 +44,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyIntegrationsUpdatedWebhookPayloadData from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -60,8 +58,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,7 +68,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyIntegrationsUpdatedWebhookPayloadData from a dict""" if obj is None: return None @@ -79,9 +76,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "companyId": obj.get("companyId") - }) + _obj = cls.model_validate({"companyId": obj.get("companyId")}) return _obj - - diff --git a/bamboohr_sdk/models/company_profile_data.py b/bamboohr_sdk/models/company_profile_data.py new file mode 100644 index 0000000..ba7debf --- /dev/null +++ b/bamboohr_sdk/models/company_profile_data.py @@ -0,0 +1,157 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.company_profile_data_address import CompanyProfileDataAddress + + +class CompanyProfileData(BaseModel): + """ + CompanyProfileData + """ + + id: StrictInt | None = None + subdomain: StrictStr | None = None + legal_name: StrictStr | None = Field(default=None, alias="legalName") + display_name: StrictStr | None = Field(default=None, alias="displayName") + address: CompanyProfileDataAddress | None = None + phone: StrictStr | None = None + status: StrictStr | None = None + termination_date: StrictStr | None = Field(default=None, alias="terminationDate") + industry_code: StrictStr | None = Field(default=None, alias="industryCode") + __properties: ClassVar[list[str]] = [ + "id", + "subdomain", + "legalName", + "displayName", + "address", + "phone", + "status", + "terminationDate", + "industryCode", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompanyProfileData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of address + if self.address: + _dict["address"] = self.address.to_dict() + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict["id"] = None + + # set to None if subdomain (nullable) is None + # and model_fields_set contains the field + if self.subdomain is None and "subdomain" in self.model_fields_set: + _dict["subdomain"] = None + + # set to None if legal_name (nullable) is None + # and model_fields_set contains the field + if self.legal_name is None and "legal_name" in self.model_fields_set: + _dict["legalName"] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict["displayName"] = None + + # set to None if phone (nullable) is None + # and model_fields_set contains the field + if self.phone is None and "phone" in self.model_fields_set: + _dict["phone"] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict["status"] = None + + # set to None if termination_date (nullable) is None + # and model_fields_set contains the field + if self.termination_date is None and "termination_date" in self.model_fields_set: + _dict["terminationDate"] = None + + # set to None if industry_code (nullable) is None + # and model_fields_set contains the field + if self.industry_code is None and "industry_code" in self.model_fields_set: + _dict["industryCode"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompanyProfileData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "subdomain": obj.get("subdomain"), + "legalName": obj.get("legalName"), + "displayName": obj.get("displayName"), + "address": CompanyProfileDataAddress.from_dict(obj["address"]) + if obj.get("address") is not None + else None, + "phone": obj.get("phone"), + "status": obj.get("status"), + "terminationDate": obj.get("terminationDate"), + "industryCode": obj.get("industryCode"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/company_profile_data_address.py b/bamboohr_sdk/models/company_profile_data_address.py new file mode 100644 index 0000000..594d951 --- /dev/null +++ b/bamboohr_sdk/models/company_profile_data_address.py @@ -0,0 +1,117 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing_extensions import Self + + +class CompanyProfileDataAddress(BaseModel): + """ + CompanyProfileDataAddress + """ + + line1: StrictStr | None = None + line2: StrictStr | None = None + city: StrictStr | None = None + state: StrictStr | None = None + zip: StrictStr | None = None + __properties: ClassVar[list[str]] = ["line1", "line2", "city", "state", "zip"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompanyProfileDataAddress from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if line1 (nullable) is None + # and model_fields_set contains the field + if self.line1 is None and "line1" in self.model_fields_set: + _dict["line1"] = None + + # set to None if line2 (nullable) is None + # and model_fields_set contains the field + if self.line2 is None and "line2" in self.model_fields_set: + _dict["line2"] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict["city"] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict["state"] = None + + # set to None if zip (nullable) is None + # and model_fields_set contains the field + if self.zip is None and "zip" in self.model_fields_set: + _dict["zip"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompanyProfileDataAddress from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "line1": obj.get("line1"), + "line2": obj.get("line2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zip": obj.get("zip"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/company_profile_integrations.py b/bamboohr_sdk/models/company_profile_integrations.py index 7e14fea..1599443 100644 --- a/bamboohr_sdk/models/company_profile_integrations.py +++ b/bamboohr_sdk/models/company_profile_integrations.py @@ -1,33 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CompanyProfileIntegrations(BaseModel): """ CompanyProfileIntegrations - """ # noqa: E501 - integrations: Optional[List[StrictStr]] = Field(default=None, description="List of installed integration identifiers.") - __properties: ClassVar[List[str]] = ["integrations"] + """ + + integrations: list[StrictStr | None] | None = Field( + default=None, description="List of installed integration identifiers." + ) + __properties: ClassVar[list[str]] = ["integrations"] model_config = ConfigDict( populate_by_name=True, @@ -35,7 +36,6 @@ class CompanyProfileIntegrations(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -46,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyProfileIntegrations from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -60,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyProfileIntegrations from a dict""" if obj is None: return None @@ -79,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "integrations": obj.get("integrations") - }) + _obj = cls.model_validate({"integrations": obj.get("integrations")}) return _obj - - diff --git a/bamboohr_sdk/models/company_updated_webhook_payload.py b/bamboohr_sdk/models/company_updated_webhook_payload.py index 1e8fa97..6faa5d8 100644 --- a/bamboohr_sdk/models/company_updated_webhook_payload.py +++ b/bamboohr_sdk/models/company_updated_webhook_payload.py @@ -1,45 +1,47 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.company_integrations_updated_webhook_payload_data import CompanyIntegrationsUpdatedWebhookPayloadData -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.company_integrations_updated_webhook_payload_data import ( + CompanyIntegrationsUpdatedWebhookPayloadData, +) + + class CompanyUpdatedWebhookPayload(BaseModel): """ Webhook payload sent when a company is updated. - """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, description="The event type identifier") - timestamp: Optional[datetime] = Field(default=None, description="ISO 8601 timestamp (UTC) when the event was fired") - data: Optional[CompanyIntegrationsUpdatedWebhookPayloadData] = None - __properties: ClassVar[List[str]] = ["type", "timestamp", "data"] + """ + + type: StrictStr | None = Field(default=None, description="The event type identifier") + timestamp: datetime | None = Field(default=None, description="ISO 8601 timestamp (UTC) when the event was fired") + data: CompanyIntegrationsUpdatedWebhookPayloadData | None = None + __properties: ClassVar[list[str]] = ["type", "timestamp", "data"] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['company.updated']): + if value not in set(["company.updated"]): raise ValueError("must be one of enum values ('company.updated')") return value @@ -49,7 +51,6 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,11 +61,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CompanyUpdatedWebhookPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -74,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -84,11 +84,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of data if self.data: - _dict['data'] = self.data.to_dict() + _dict["data"] = self.data.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CompanyUpdatedWebhookPayload from a dict""" if obj is None: return None @@ -96,11 +96,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type"), - "timestamp": obj.get("timestamp"), - "data": CompanyIntegrationsUpdatedWebhookPayloadData.from_dict(obj["data"]) if obj.get("data") is not None else None - }) + _obj = cls.model_validate( + { + "type": obj.get("type"), + "timestamp": obj.get("timestamp"), + "data": CompanyIntegrationsUpdatedWebhookPayloadData.from_dict(obj["data"]) + if obj.get("data") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/compensation_benchmark_detail_employee.py b/bamboohr_sdk/models/compensation_benchmark_detail_employee.py new file mode 100644 index 0000000..5f8d9be --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_detail_employee.py @@ -0,0 +1,212 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.compensation_benchmark_detail_employee_job_title import ( + CompensationBenchmarkDetailEmployeeJobTitle, +) +from bamboohr_sdk.models.compensation_benchmark_detail_employee_salary import CompensationBenchmarkDetailEmployeeSalary + + +class CompensationBenchmarkDetailEmployee(BaseModel): + """ + CompensationBenchmarkDetailEmployee + """ + + id: StrictInt | None = None + name: StrictStr | None = None + job_title: CompensationBenchmarkDetailEmployeeJobTitle | None = Field(default=None, alias="jobTitle") + location: dict[str, Any] | None = None + salary: CompensationBenchmarkDetailEmployeeSalary | None = None + variance_from_pay_band: dict[str, Any] | None = Field(default=None, alias="varianceFromPayBand") + years_at_company: StrictInt | None = Field(default=None, alias="yearsAtCompany") + range_penetration: StrictFloat | StrictInt | None = Field(default=None, alias="rangePenetration") + compa_ratio: StrictFloat | StrictInt | None = Field(default=None, alias="compaRatio") + compa_ratio_status: StrictStr | None = Field(default=None, alias="compaRatioStatus") + photo_url: StrictStr | None = Field(default=None, alias="photoUrl") + country: StrictStr | None = None + is_remote: StrictBool | None = Field(default=None, alias="isRemote") + paid_per: StrictStr | None = Field( + default=None, description="Pay period label for the employee salary amount (e.g. Year, Hour).", alias="paidPer" + ) + currency_conversion_failed: StrictBool | None = Field(default=None, alias="currencyConversionFailed") + annualization_failed: StrictBool | None = Field( + default=None, + description="True when pay could not be annualized (e.g. PayPeriod without a pay schedule); salary is the raw amount for paidPer.", + alias="annualizationFailed", + ) + __properties: ClassVar[list[str]] = [ + "id", + "name", + "jobTitle", + "location", + "salary", + "varianceFromPayBand", + "yearsAtCompany", + "rangePenetration", + "compaRatio", + "compaRatioStatus", + "photoUrl", + "country", + "isRemote", + "paidPer", + "currencyConversionFailed", + "annualizationFailed", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkDetailEmployee from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of job_title + if self.job_title: + _dict["jobTitle"] = self.job_title.to_dict() + # override the default output from pydantic by calling `to_dict()` of salary + if self.salary: + _dict["salary"] = self.salary.to_dict() + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict["id"] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict["name"] = None + + # set to None if location (nullable) is None + # and model_fields_set contains the field + if self.location is None and "location" in self.model_fields_set: + _dict["location"] = None + + # set to None if variance_from_pay_band (nullable) is None + # and model_fields_set contains the field + if self.variance_from_pay_band is None and "variance_from_pay_band" in self.model_fields_set: + _dict["varianceFromPayBand"] = None + + # set to None if years_at_company (nullable) is None + # and model_fields_set contains the field + if self.years_at_company is None and "years_at_company" in self.model_fields_set: + _dict["yearsAtCompany"] = None + + # set to None if range_penetration (nullable) is None + # and model_fields_set contains the field + if self.range_penetration is None and "range_penetration" in self.model_fields_set: + _dict["rangePenetration"] = None + + # set to None if compa_ratio (nullable) is None + # and model_fields_set contains the field + if self.compa_ratio is None and "compa_ratio" in self.model_fields_set: + _dict["compaRatio"] = None + + # set to None if compa_ratio_status (nullable) is None + # and model_fields_set contains the field + if self.compa_ratio_status is None and "compa_ratio_status" in self.model_fields_set: + _dict["compaRatioStatus"] = None + + # set to None if photo_url (nullable) is None + # and model_fields_set contains the field + if self.photo_url is None and "photo_url" in self.model_fields_set: + _dict["photoUrl"] = None + + # set to None if country (nullable) is None + # and model_fields_set contains the field + if self.country is None and "country" in self.model_fields_set: + _dict["country"] = None + + # set to None if is_remote (nullable) is None + # and model_fields_set contains the field + if self.is_remote is None and "is_remote" in self.model_fields_set: + _dict["isRemote"] = None + + # set to None if currency_conversion_failed (nullable) is None + # and model_fields_set contains the field + if self.currency_conversion_failed is None and "currency_conversion_failed" in self.model_fields_set: + _dict["currencyConversionFailed"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkDetailEmployee from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "jobTitle": CompensationBenchmarkDetailEmployeeJobTitle.from_dict(obj["jobTitle"]) + if obj.get("jobTitle") is not None + else None, + "location": obj.get("location"), + "salary": CompensationBenchmarkDetailEmployeeSalary.from_dict(obj["salary"]) + if obj.get("salary") is not None + else None, + "varianceFromPayBand": obj.get("varianceFromPayBand"), + "yearsAtCompany": obj.get("yearsAtCompany"), + "rangePenetration": obj.get("rangePenetration"), + "compaRatio": obj.get("compaRatio"), + "compaRatioStatus": obj.get("compaRatioStatus"), + "photoUrl": obj.get("photoUrl"), + "country": obj.get("country"), + "isRemote": obj.get("isRemote"), + "paidPer": obj.get("paidPer"), + "currencyConversionFailed": obj.get("currencyConversionFailed"), + "annualizationFailed": obj.get("annualizationFailed"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/application_details_status_changed_by_user_job_title.py b/bamboohr_sdk/models/compensation_benchmark_detail_employee_job_title.py similarity index 51% rename from bamboohr_sdk/models/application_details_status_changed_by_user_job_title.py rename to bamboohr_sdk/models/compensation_benchmark_detail_employee_job_title.py index 2c0dbb0..a2bb749 100644 --- a/bamboohr_sdk/models/application_details_status_changed_by_user_job_title.py +++ b/bamboohr_sdk/models/compensation_benchmark_detail_employee_job_title.py @@ -1,34 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing_extensions import Self -class ApplicationDetailsStatusChangedByUserJobTitle(BaseModel): + +class CompensationBenchmarkDetailEmployeeJobTitle(BaseModel): """ - User's job title - """ # noqa: E501 - id: Optional[StrictInt] = None - label: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "label"] + CompensationBenchmarkDetailEmployeeJobTitle + """ + + id: StrictStr | None = None + value: StrictStr | None = None + job_title: StrictStr | None = Field(default=None, alias="jobTitle") + __properties: ClassVar[list[str]] = ["id", "value", "jobTitle"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +36,6 @@ class ApplicationDetailsStatusChangedByUserJobTitle(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApplicationDetailsStatusChangedByUserJobTitle from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkDetailEmployeeJobTitle from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,28 +70,28 @@ def to_dict(self) -> Dict[str, Any]: # set to None if id (nullable) is None # and model_fields_set contains the field if self.id is None and "id" in self.model_fields_set: - _dict['id'] = None + _dict["id"] = None - # set to None if label (nullable) is None + # set to None if value (nullable) is None # and model_fields_set contains the field - if self.label is None and "label" in self.model_fields_set: - _dict['label'] = None + if self.value is None and "value" in self.model_fields_set: + _dict["value"] = None + + # set to None if job_title (nullable) is None + # and model_fields_set contains the field + if self.job_title is None and "job_title" in self.model_fields_set: + _dict["jobTitle"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApplicationDetailsStatusChangedByUserJobTitle from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkDetailEmployeeJobTitle from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "label": obj.get("label") - }) + _obj = cls.model_validate({"id": obj.get("id"), "value": obj.get("value"), "jobTitle": obj.get("jobTitle")}) return _obj - - diff --git a/bamboohr_sdk/models/compensation_benchmark_detail_employee_salary.py b/bamboohr_sdk/models/compensation_benchmark_detail_employee_salary.py new file mode 100644 index 0000000..2abc3dc --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_detail_employee_salary.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + + +class CompensationBenchmarkDetailEmployeeSalary(BaseModel): + """ + CompensationBenchmarkDetailEmployeeSalary + """ + + amount: StrictFloat | StrictInt | None = None + currency_code: StrictStr | None = Field(default=None, alias="currencyCode") + __properties: ClassVar[list[str]] = ["amount", "currencyCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkDetailEmployeeSalary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkDetailEmployeeSalary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"amount": obj.get("amount"), "currencyCode": obj.get("currencyCode")}) + return _obj diff --git a/bamboohr_sdk/models/compensation_benchmark_details.py b/bamboohr_sdk/models/compensation_benchmark_details.py new file mode 100644 index 0000000..5e3f321 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_details.py @@ -0,0 +1,175 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.compensation_benchmark_detail_employee import CompensationBenchmarkDetailEmployee +from bamboohr_sdk.models.compensation_benchmark_details_benchmark_values_inner import ( + CompensationBenchmarkDetailsBenchmarkValuesInner, +) + + +class CompensationBenchmarkDetails(BaseModel): + """ + CompensationBenchmarkDetails + """ + + job_id: StrictStr | None = Field(default=None, alias="jobId") + job_title: StrictStr | None = Field(default=None, alias="jobTitle") + location_id: StrictStr | None = Field(default=None, alias="locationId") + location: StrictStr | None = None + mercer_benchmark_details: dict[str, Any] | None = Field(default=None, alias="mercerBenchmarkDetails") + company_pay_range: dict[str, Any] | None = Field(default=None, alias="companyPayRange") + internal_job_pay_band: dict[str, Any] | None = Field(default=None, alias="internalJobPayBand") + benchmark_values: list[CompensationBenchmarkDetailsBenchmarkValuesInner] | None = Field( + default=None, + description="All saved benchmarks for this job/location. Empty when no benchmarks exist.", + alias="benchmarkValues", + ) + employees: list[CompensationBenchmarkDetailEmployee] | None = None + __properties: ClassVar[list[str]] = [ + "jobId", + "jobTitle", + "locationId", + "location", + "mercerBenchmarkDetails", + "companyPayRange", + "internalJobPayBand", + "benchmarkValues", + "employees", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in benchmark_values (list) + _items = [] + if self.benchmark_values: + for _item_benchmark_values in self.benchmark_values: + if _item_benchmark_values: + _items.append(_item_benchmark_values.to_dict()) + _dict["benchmarkValues"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in employees (list) + _items = [] + if self.employees: + for _item_employees in self.employees: + if _item_employees: + _items.append(_item_employees.to_dict()) + _dict["employees"] = _items + # set to None if job_id (nullable) is None + # and model_fields_set contains the field + if self.job_id is None and "job_id" in self.model_fields_set: + _dict["jobId"] = None + + # set to None if job_title (nullable) is None + # and model_fields_set contains the field + if self.job_title is None and "job_title" in self.model_fields_set: + _dict["jobTitle"] = None + + # set to None if location_id (nullable) is None + # and model_fields_set contains the field + if self.location_id is None and "location_id" in self.model_fields_set: + _dict["locationId"] = None + + # set to None if location (nullable) is None + # and model_fields_set contains the field + if self.location is None and "location" in self.model_fields_set: + _dict["location"] = None + + # set to None if mercer_benchmark_details (nullable) is None + # and model_fields_set contains the field + if self.mercer_benchmark_details is None and "mercer_benchmark_details" in self.model_fields_set: + _dict["mercerBenchmarkDetails"] = None + + # set to None if company_pay_range (nullable) is None + # and model_fields_set contains the field + if self.company_pay_range is None and "company_pay_range" in self.model_fields_set: + _dict["companyPayRange"] = None + + # set to None if internal_job_pay_band (nullable) is None + # and model_fields_set contains the field + if self.internal_job_pay_band is None and "internal_job_pay_band" in self.model_fields_set: + _dict["internalJobPayBand"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "jobId": obj.get("jobId"), + "jobTitle": obj.get("jobTitle"), + "locationId": obj.get("locationId"), + "location": obj.get("location"), + "mercerBenchmarkDetails": obj.get("mercerBenchmarkDetails"), + "companyPayRange": obj.get("companyPayRange"), + "internalJobPayBand": obj.get("internalJobPayBand"), + "benchmarkValues": [ + CompensationBenchmarkDetailsBenchmarkValuesInner.from_dict(_item) + for _item in obj["benchmarkValues"] + ] + if obj.get("benchmarkValues") is not None + else None, + "employees": [CompensationBenchmarkDetailEmployee.from_dict(_item) for _item in obj["employees"]] + if obj.get("employees") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/compensation_benchmark_details_benchmark_values_inner.py b/bamboohr_sdk/models/compensation_benchmark_details_benchmark_values_inner.py new file mode 100644 index 0000000..249cff2 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_details_benchmark_values_inner.py @@ -0,0 +1,179 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + + +class CompensationBenchmarkDetailsBenchmarkValuesInner(BaseModel): + """ + CompensationBenchmarkDetailsBenchmarkValuesInner + """ + + id: StrictInt | None = None + job_title: StrictStr | None = Field(default=None, alias="jobTitle") + last_edited: StrictStr | None = Field(default=None, alias="lastEdited") + source_color_code: StrictStr | None = Field(default=None, alias="sourceColorCode") + source_date: StrictStr | None = Field(default=None, alias="sourceDate") + created_ymdt: StrictStr | None = Field(default=None, alias="createdYmdt") + updated_ymdt: StrictStr | None = Field(default=None, alias="updatedYmdt") + data_year: StrictStr | None = Field(default=None, alias="dataYear") + median: StrictFloat | StrictInt | None = None + min: StrictFloat | StrictInt | None = None + max: StrictFloat | StrictInt | None = None + currency_code: StrictStr | None = Field(default=None, alias="currencyCode") + __properties: ClassVar[list[str]] = [ + "id", + "jobTitle", + "lastEdited", + "sourceColorCode", + "sourceDate", + "createdYmdt", + "updatedYmdt", + "dataYear", + "median", + "min", + "max", + "currencyCode", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkDetailsBenchmarkValuesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict["id"] = None + + # set to None if job_title (nullable) is None + # and model_fields_set contains the field + if self.job_title is None and "job_title" in self.model_fields_set: + _dict["jobTitle"] = None + + # set to None if last_edited (nullable) is None + # and model_fields_set contains the field + if self.last_edited is None and "last_edited" in self.model_fields_set: + _dict["lastEdited"] = None + + # set to None if source_color_code (nullable) is None + # and model_fields_set contains the field + if self.source_color_code is None and "source_color_code" in self.model_fields_set: + _dict["sourceColorCode"] = None + + # set to None if source_date (nullable) is None + # and model_fields_set contains the field + if self.source_date is None and "source_date" in self.model_fields_set: + _dict["sourceDate"] = None + + # set to None if created_ymdt (nullable) is None + # and model_fields_set contains the field + if self.created_ymdt is None and "created_ymdt" in self.model_fields_set: + _dict["createdYmdt"] = None + + # set to None if updated_ymdt (nullable) is None + # and model_fields_set contains the field + if self.updated_ymdt is None and "updated_ymdt" in self.model_fields_set: + _dict["updatedYmdt"] = None + + # set to None if data_year (nullable) is None + # and model_fields_set contains the field + if self.data_year is None and "data_year" in self.model_fields_set: + _dict["dataYear"] = None + + # set to None if median (nullable) is None + # and model_fields_set contains the field + if self.median is None and "median" in self.model_fields_set: + _dict["median"] = None + + # set to None if min (nullable) is None + # and model_fields_set contains the field + if self.min is None and "min" in self.model_fields_set: + _dict["min"] = None + + # set to None if max (nullable) is None + # and model_fields_set contains the field + if self.max is None and "max" in self.model_fields_set: + _dict["max"] = None + + # set to None if currency_code (nullable) is None + # and model_fields_set contains the field + if self.currency_code is None and "currency_code" in self.model_fields_set: + _dict["currencyCode"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkDetailsBenchmarkValuesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "jobTitle": obj.get("jobTitle"), + "lastEdited": obj.get("lastEdited"), + "sourceColorCode": obj.get("sourceColorCode"), + "sourceDate": obj.get("sourceDate"), + "createdYmdt": obj.get("createdYmdt"), + "updatedYmdt": obj.get("updatedYmdt"), + "dataYear": obj.get("dataYear"), + "median": obj.get("median"), + "min": obj.get("min"), + "max": obj.get("max"), + "currencyCode": obj.get("currencyCode"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/compensation_benchmark_job_location_employee.py b/bamboohr_sdk/models/compensation_benchmark_job_location_employee.py new file mode 100644 index 0000000..5b64975 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_job_location_employee.py @@ -0,0 +1,171 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.compensation_benchmark_job_location_employee_salary import ( + CompensationBenchmarkJobLocationEmployeeSalary, +) + + +class CompensationBenchmarkJobLocationEmployee(BaseModel): + """ + CompensationBenchmarkJobLocationEmployee + """ + + id: StrictStr | None = None + name: StrictStr | None = None + salary: CompensationBenchmarkJobLocationEmployeeSalary | None = None + photo_url: StrictStr | None = Field(default=None, alias="photoUrl") + manager_name: StrictStr | None = Field(default=None, alias="managerName") + manager_title: StrictStr | None = Field(default=None, alias="managerTitle") + division: dict[str, Any] | None = None + department: dict[str, Any] | None = None + paid_per: StrictStr | None = Field( + default=None, description="Pay period label for the employee salary amount (e.g. Year, Hour).", alias="paidPer" + ) + currency_conversion_failed: StrictBool | None = Field(default=None, alias="currencyConversionFailed") + annualization_failed: StrictBool | None = Field( + default=None, + description="True when pay could not be annualized (e.g. PayPeriod without a pay schedule); salary is the raw amount for paidPer.", + alias="annualizationFailed", + ) + __properties: ClassVar[list[str]] = [ + "id", + "name", + "salary", + "photoUrl", + "managerName", + "managerTitle", + "division", + "department", + "paidPer", + "currencyConversionFailed", + "annualizationFailed", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkJobLocationEmployee from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of salary + if self.salary: + _dict["salary"] = self.salary.to_dict() + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict["id"] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict["name"] = None + + # set to None if photo_url (nullable) is None + # and model_fields_set contains the field + if self.photo_url is None and "photo_url" in self.model_fields_set: + _dict["photoUrl"] = None + + # set to None if manager_name (nullable) is None + # and model_fields_set contains the field + if self.manager_name is None and "manager_name" in self.model_fields_set: + _dict["managerName"] = None + + # set to None if manager_title (nullable) is None + # and model_fields_set contains the field + if self.manager_title is None and "manager_title" in self.model_fields_set: + _dict["managerTitle"] = None + + # set to None if division (nullable) is None + # and model_fields_set contains the field + if self.division is None and "division" in self.model_fields_set: + _dict["division"] = None + + # set to None if department (nullable) is None + # and model_fields_set contains the field + if self.department is None and "department" in self.model_fields_set: + _dict["department"] = None + + # set to None if currency_conversion_failed (nullable) is None + # and model_fields_set contains the field + if self.currency_conversion_failed is None and "currency_conversion_failed" in self.model_fields_set: + _dict["currencyConversionFailed"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkJobLocationEmployee from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "salary": CompensationBenchmarkJobLocationEmployeeSalary.from_dict(obj["salary"]) + if obj.get("salary") is not None + else None, + "photoUrl": obj.get("photoUrl"), + "managerName": obj.get("managerName"), + "managerTitle": obj.get("managerTitle"), + "division": obj.get("division"), + "department": obj.get("department"), + "paidPer": obj.get("paidPer"), + "currencyConversionFailed": obj.get("currencyConversionFailed"), + "annualizationFailed": obj.get("annualizationFailed"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/compensation_benchmark_job_location_employee_salary.py b/bamboohr_sdk/models/compensation_benchmark_job_location_employee_salary.py new file mode 100644 index 0000000..9c87b61 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_job_location_employee_salary.py @@ -0,0 +1,91 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + + +class CompensationBenchmarkJobLocationEmployeeSalary(BaseModel): + """ + CompensationBenchmarkJobLocationEmployeeSalary + """ + + amount: StrictFloat | StrictInt | None = None + currency_code: StrictStr | None = Field(default=None, alias="currencyCode") + __properties: ClassVar[list[str]] = ["amount", "currencyCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkJobLocationEmployeeSalary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if amount (nullable) is None + # and model_fields_set contains the field + if self.amount is None and "amount" in self.model_fields_set: + _dict["amount"] = None + + # set to None if currency_code (nullable) is None + # and model_fields_set contains the field + if self.currency_code is None and "currency_code" in self.model_fields_set: + _dict["currencyCode"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkJobLocationEmployeeSalary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"amount": obj.get("amount"), "currencyCode": obj.get("currencyCode")}) + return _obj diff --git a/bamboohr_sdk/models/compensation_benchmark_job_location_pair.py b/bamboohr_sdk/models/compensation_benchmark_job_location_pair.py new file mode 100644 index 0000000..2c7235b --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_job_location_pair.py @@ -0,0 +1,147 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing_extensions import Self + +from bamboohr_sdk.models.compensation_benchmark_job_location_employee import CompensationBenchmarkJobLocationEmployee +from bamboohr_sdk.models.compensation_benchmark_job_location_pair_job_details import ( + CompensationBenchmarkJobLocationPairJobDetails, +) +from bamboohr_sdk.models.compensation_benchmark_overview import CompensationBenchmarkOverview + + +class CompensationBenchmarkJobLocationPair(BaseModel): + """ + CompensationBenchmarkJobLocationPair + """ + + job_details: CompensationBenchmarkJobLocationPairJobDetails | None = Field(default=None, alias="jobDetails") + location_details: dict[str, Any] | None = Field(default=None, alias="locationDetails") + is_remote: StrictBool | None = Field(default=None, alias="isRemote") + benchmarks: list[CompensationBenchmarkOverview] | None = Field( + default=None, description="Saved benchmarks attached to this job/location. Empty when none are configured." + ) + employees: list[CompensationBenchmarkJobLocationEmployee] | None = None + internal_job_pay_band: dict[str, Any] | None = Field(default=None, alias="internalJobPayBand") + __properties: ClassVar[list[str]] = [ + "jobDetails", + "locationDetails", + "isRemote", + "benchmarks", + "employees", + "internalJobPayBand", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkJobLocationPair from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of job_details + if self.job_details: + _dict["jobDetails"] = self.job_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in benchmarks (list) + _items = [] + if self.benchmarks: + for _item_benchmarks in self.benchmarks: + if _item_benchmarks: + _items.append(_item_benchmarks.to_dict()) + _dict["benchmarks"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in employees (list) + _items = [] + if self.employees: + for _item_employees in self.employees: + if _item_employees: + _items.append(_item_employees.to_dict()) + _dict["employees"] = _items + # set to None if location_details (nullable) is None + # and model_fields_set contains the field + if self.location_details is None and "location_details" in self.model_fields_set: + _dict["locationDetails"] = None + + # set to None if is_remote (nullable) is None + # and model_fields_set contains the field + if self.is_remote is None and "is_remote" in self.model_fields_set: + _dict["isRemote"] = None + + # set to None if internal_job_pay_band (nullable) is None + # and model_fields_set contains the field + if self.internal_job_pay_band is None and "internal_job_pay_band" in self.model_fields_set: + _dict["internalJobPayBand"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkJobLocationPair from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "jobDetails": CompensationBenchmarkJobLocationPairJobDetails.from_dict(obj["jobDetails"]) + if obj.get("jobDetails") is not None + else None, + "locationDetails": obj.get("locationDetails"), + "isRemote": obj.get("isRemote"), + "benchmarks": [CompensationBenchmarkOverview.from_dict(_item) for _item in obj["benchmarks"]] + if obj.get("benchmarks") is not None + else None, + "employees": [CompensationBenchmarkJobLocationEmployee.from_dict(_item) for _item in obj["employees"]] + if obj.get("employees") is not None + else None, + "internalJobPayBand": obj.get("internalJobPayBand"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/application_details_job_hiring_lead_job_title.py b/bamboohr_sdk/models/compensation_benchmark_job_location_pair_job_details.py similarity index 54% rename from bamboohr_sdk/models/application_details_job_hiring_lead_job_title.py rename to bamboohr_sdk/models/compensation_benchmark_job_location_pair_job_details.py index 9ac6e32..9cc0f28 100644 --- a/bamboohr_sdk/models/application_details_job_hiring_lead_job_title.py +++ b/bamboohr_sdk/models/compensation_benchmark_job_location_pair_job_details.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set +from pydantic import BaseModel, ConfigDict, StrictStr from typing_extensions import Self -class ApplicationDetailsJobHiringLeadJobTitle(BaseModel): + +class CompensationBenchmarkJobLocationPairJobDetails(BaseModel): + """ + CompensationBenchmarkJobLocationPairJobDetails """ - Hiring lead's job title - """ # noqa: E501 - id: Optional[StrictInt] = None - label: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "label"] + + id: StrictStr | None = None + title: StrictStr | None = None + __properties: ClassVar[list[str]] = ["id", "title"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class ApplicationDetailsJobHiringLeadJobTitle(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApplicationDetailsJobHiringLeadJobTitle from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkJobLocationPairJobDetails from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,28 +69,23 @@ def to_dict(self) -> Dict[str, Any]: # set to None if id (nullable) is None # and model_fields_set contains the field if self.id is None and "id" in self.model_fields_set: - _dict['id'] = None + _dict["id"] = None - # set to None if label (nullable) is None + # set to None if title (nullable) is None # and model_fields_set contains the field - if self.label is None and "label" in self.model_fields_set: - _dict['label'] = None + if self.title is None and "title" in self.model_fields_set: + _dict["title"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApplicationDetailsJobHiringLeadJobTitle from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkJobLocationPairJobDetails from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "label": obj.get("label") - }) + _obj = cls.model_validate({"id": obj.get("id"), "title": obj.get("title")}) return _obj - - diff --git a/bamboohr_sdk/models/compensation_benchmark_overview.py b/bamboohr_sdk/models/compensation_benchmark_overview.py new file mode 100644 index 0000000..af7e3a6 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_overview.py @@ -0,0 +1,126 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.compensation_benchmark_overview_values import CompensationBenchmarkOverviewValues + + +class CompensationBenchmarkOverview(BaseModel): + """ + CompensationBenchmarkOverview + """ + + id: StrictStr | None = None + values: CompensationBenchmarkOverviewValues | None = None + source_id: StrictStr | None = Field(default=None, alias="sourceId") + source_color: StrictStr | None = Field(default=None, alias="sourceColor") + is_mercer: StrictBool | None = Field(default=None, alias="isMercer") + data_year: StrictStr | None = Field(default=None, alias="dataYear") + __properties: ClassVar[list[str]] = ["id", "values", "sourceId", "sourceColor", "isMercer", "dataYear"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkOverview from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of values + if self.values: + _dict["values"] = self.values.to_dict() + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict["id"] = None + + # set to None if source_id (nullable) is None + # and model_fields_set contains the field + if self.source_id is None and "source_id" in self.model_fields_set: + _dict["sourceId"] = None + + # set to None if source_color (nullable) is None + # and model_fields_set contains the field + if self.source_color is None and "source_color" in self.model_fields_set: + _dict["sourceColor"] = None + + # set to None if is_mercer (nullable) is None + # and model_fields_set contains the field + if self.is_mercer is None and "is_mercer" in self.model_fields_set: + _dict["isMercer"] = None + + # set to None if data_year (nullable) is None + # and model_fields_set contains the field + if self.data_year is None and "data_year" in self.model_fields_set: + _dict["dataYear"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkOverview from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "values": CompensationBenchmarkOverviewValues.from_dict(obj["values"]) + if obj.get("values") is not None + else None, + "sourceId": obj.get("sourceId"), + "sourceColor": obj.get("sourceColor"), + "isMercer": obj.get("isMercer"), + "dataYear": obj.get("dataYear"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/compensation_benchmark_overview_values.py b/bamboohr_sdk/models/compensation_benchmark_overview_values.py new file mode 100644 index 0000000..55e6f9c --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_overview_values.py @@ -0,0 +1,147 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + + +class CompensationBenchmarkOverviewValues(BaseModel): + """ + CompensationBenchmarkOverviewValues + """ + + median: StrictFloat | StrictInt | None = None + min: StrictFloat | StrictInt | None = None + max: StrictFloat | StrictInt | None = None + currency_code: StrictStr | None = Field(default=None, alias="currencyCode") + original_median: StrictFloat | StrictInt | None = Field(default=None, alias="originalMedian") + original_min: StrictFloat | StrictInt | None = Field(default=None, alias="originalMin") + original_max: StrictFloat | StrictInt | None = Field(default=None, alias="originalMax") + original_currency_code: StrictStr | None = Field(default=None, alias="originalCurrencyCode") + __properties: ClassVar[list[str]] = [ + "median", + "min", + "max", + "currencyCode", + "originalMedian", + "originalMin", + "originalMax", + "originalCurrencyCode", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkOverviewValues from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if median (nullable) is None + # and model_fields_set contains the field + if self.median is None and "median" in self.model_fields_set: + _dict["median"] = None + + # set to None if min (nullable) is None + # and model_fields_set contains the field + if self.min is None and "min" in self.model_fields_set: + _dict["min"] = None + + # set to None if max (nullable) is None + # and model_fields_set contains the field + if self.max is None and "max" in self.model_fields_set: + _dict["max"] = None + + # set to None if currency_code (nullable) is None + # and model_fields_set contains the field + if self.currency_code is None and "currency_code" in self.model_fields_set: + _dict["currencyCode"] = None + + # set to None if original_median (nullable) is None + # and model_fields_set contains the field + if self.original_median is None and "original_median" in self.model_fields_set: + _dict["originalMedian"] = None + + # set to None if original_min (nullable) is None + # and model_fields_set contains the field + if self.original_min is None and "original_min" in self.model_fields_set: + _dict["originalMin"] = None + + # set to None if original_max (nullable) is None + # and model_fields_set contains the field + if self.original_max is None and "original_max" in self.model_fields_set: + _dict["originalMax"] = None + + # set to None if original_currency_code (nullable) is None + # and model_fields_set contains the field + if self.original_currency_code is None and "original_currency_code" in self.model_fields_set: + _dict["originalCurrencyCode"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkOverviewValues from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "median": obj.get("median"), + "min": obj.get("min"), + "max": obj.get("max"), + "currencyCode": obj.get("currencyCode"), + "originalMedian": obj.get("originalMedian"), + "originalMin": obj.get("originalMin"), + "originalMax": obj.get("originalMax"), + "originalCurrencyCode": obj.get("originalCurrencyCode"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/compensation_benchmark_source.py b/bamboohr_sdk/models/compensation_benchmark_source.py new file mode 100644 index 0000000..d127d74 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_source.py @@ -0,0 +1,109 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class CompensationBenchmarkSource(BaseModel): + """ + CompensationBenchmarkSource + """ + + id: StrictStr | None = None + name: StrictStr | None = None + sort: StrictStr | None = Field(default=None, description="Sort order position, returned as a numeric string.") + count: StrictStr | None = Field( + default=None, description="Number of benchmarks attached to this source, returned as a numeric string." + ) + color_code: StrictStr | None = Field(default=None, alias="colorCode") + __properties: ClassVar[list[str]] = ["id", "name", "sort", "count", "colorCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkSource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict["id"] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict["name"] = None + + # set to None if color_code (nullable) is None + # and model_fields_set contains the field + if self.color_code is None and "color_code" in self.model_fields_set: + _dict["colorCode"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkSource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "sort": obj.get("sort"), + "count": obj.get("count"), + "colorCode": obj.get("colorCode"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/compensation_benchmarking_column_map.py b/bamboohr_sdk/models/compensation_benchmarking_column_map.py new file mode 100644 index 0000000..3fc1830 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmarking_column_map.py @@ -0,0 +1,88 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class CompensationBenchmarkingColumnMap(BaseModel): + """ + Schema for compensation benchmarking column map + """ + + expected_column_key: StrictStr | None = Field(default=None, alias="expectedColumnKey") + column_name: StrictStr | None = Field(default=None, description="Column name", alias="columnName") + __properties: ClassVar[list[str]] = ["expectedColumnKey", "columnName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarkingColumnMap from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if expected_column_key (nullable) is None + # and model_fields_set contains the field + if self.expected_column_key is None and "expected_column_key" in self.model_fields_set: + _dict["expectedColumnKey"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarkingColumnMap from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"expectedColumnKey": obj.get("expectedColumnKey"), "columnName": obj.get("columnName")} + ) + return _obj diff --git a/bamboohr_sdk/models/compensation_benchmarks_list.py b/bamboohr_sdk/models/compensation_benchmarks_list.py new file mode 100644 index 0000000..1a3cdaf --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmarks_list.py @@ -0,0 +1,125 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing_extensions import Self + +from bamboohr_sdk.models.compensation_benchmark_job_location_pair import CompensationBenchmarkJobLocationPair + + +class CompensationBenchmarksList(BaseModel): + """ + CompensationBenchmarksList + """ + + job_location_pairs: list[CompensationBenchmarkJobLocationPair] | None = Field( + default=None, alias="jobLocationPairs" + ) + dismiss_review_banner: StrictBool | None = Field(default=None, alias="dismissReviewBanner") + dismiss_add_location_banner: StrictBool | None = Field(default=None, alias="dismissAddLocationBanner") + dismiss_mercer_data_info_banner: StrictBool | None = Field(default=None, alias="dismissMercerDataInfoBanner") + __properties: ClassVar[list[str]] = [ + "jobLocationPairs", + "dismissReviewBanner", + "dismissAddLocationBanner", + "dismissMercerDataInfoBanner", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationBenchmarksList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in job_location_pairs (list) + _items = [] + if self.job_location_pairs: + for _item_job_location_pairs in self.job_location_pairs: + if _item_job_location_pairs: + _items.append(_item_job_location_pairs.to_dict()) + _dict["jobLocationPairs"] = _items + # set to None if dismiss_review_banner (nullable) is None + # and model_fields_set contains the field + if self.dismiss_review_banner is None and "dismiss_review_banner" in self.model_fields_set: + _dict["dismissReviewBanner"] = None + + # set to None if dismiss_add_location_banner (nullable) is None + # and model_fields_set contains the field + if self.dismiss_add_location_banner is None and "dismiss_add_location_banner" in self.model_fields_set: + _dict["dismissAddLocationBanner"] = None + + # set to None if dismiss_mercer_data_info_banner (nullable) is None + # and model_fields_set contains the field + if self.dismiss_mercer_data_info_banner is None and "dismiss_mercer_data_info_banner" in self.model_fields_set: + _dict["dismissMercerDataInfoBanner"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationBenchmarksList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "jobLocationPairs": [ + CompensationBenchmarkJobLocationPair.from_dict(_item) for _item in obj["jobLocationPairs"] + ] + if obj.get("jobLocationPairs") is not None + else None, + "dismissReviewBanner": obj.get("dismissReviewBanner"), + "dismissAddLocationBanner": obj.get("dismissAddLocationBanner"), + "dismissMercerDataInfoBanner": obj.get("dismissMercerDataInfoBanner"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/compensation_equity_settings_response.py b/bamboohr_sdk/models/compensation_equity_settings_response.py new file mode 100644 index 0000000..a2ddebc --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response.py @@ -0,0 +1,222 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.compensation_equity_settings_response_company_valuation import ( + CompensationEquitySettingsResponseCompanyValuation, +) +from bamboohr_sdk.models.compensation_equity_settings_response_disclaimers import ( + CompensationEquitySettingsResponseDisclaimers, +) +from bamboohr_sdk.models.compensation_equity_settings_response_outstanding_shares import ( + CompensationEquitySettingsResponseOutstandingShares, +) +from bamboohr_sdk.models.compensation_equity_settings_response_price_per_share import ( + CompensationEquitySettingsResponsePricePerShare, +) +from bamboohr_sdk.models.compensation_equity_settings_response_slider_min import ( + CompensationEquitySettingsResponseSliderMin, +) +from bamboohr_sdk.models.compensation_equity_settings_response_vesting_conditions import ( + CompensationEquitySettingsResponseVestingConditions, +) + + +class CompensationEquitySettingsResponse(BaseModel): + """ + CompensationEquitySettingsResponse + """ + + calculation_type: StrictStr | None = Field(default=None, alias="calculationType") + company_valuation: CompensationEquitySettingsResponseCompanyValuation | None = Field( + default=None, alias="companyValuation" + ) + outstanding_shares: CompensationEquitySettingsResponseOutstandingShares | None = Field( + default=None, alias="outstandingShares" + ) + price_per_share: CompensationEquitySettingsResponsePricePerShare | None = Field(default=None, alias="pricePerShare") + currency_code: StrictStr | None = Field(default=None, alias="currencyCode") + slider_min: CompensationEquitySettingsResponseSliderMin | None = Field(default=None, alias="sliderMin") + slider_max: CompensationEquitySettingsResponseSliderMin | None = Field(default=None, alias="sliderMax") + vesting_conditions: CompensationEquitySettingsResponseVestingConditions | None = Field( + default=None, alias="vestingConditions" + ) + disclaimers: CompensationEquitySettingsResponseDisclaimers | None = None + additional_properties: dict[str, Any] = {} + __properties: ClassVar[list[str]] = [ + "calculationType", + "companyValuation", + "outstandingShares", + "pricePerShare", + "currencyCode", + "sliderMin", + "sliderMax", + "vestingConditions", + "disclaimers", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationEquitySettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: set[str] = set( + [ + "additional_properties", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of company_valuation + if self.company_valuation: + _dict["companyValuation"] = self.company_valuation.to_dict() + # override the default output from pydantic by calling `to_dict()` of outstanding_shares + if self.outstanding_shares: + _dict["outstandingShares"] = self.outstanding_shares.to_dict() + # override the default output from pydantic by calling `to_dict()` of price_per_share + if self.price_per_share: + _dict["pricePerShare"] = self.price_per_share.to_dict() + # override the default output from pydantic by calling `to_dict()` of slider_min + if self.slider_min: + _dict["sliderMin"] = self.slider_min.to_dict() + # override the default output from pydantic by calling `to_dict()` of slider_max + if self.slider_max: + _dict["sliderMax"] = self.slider_max.to_dict() + # override the default output from pydantic by calling `to_dict()` of vesting_conditions + if self.vesting_conditions: + _dict["vestingConditions"] = self.vesting_conditions.to_dict() + # override the default output from pydantic by calling `to_dict()` of disclaimers + if self.disclaimers: + _dict["disclaimers"] = self.disclaimers.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if calculation_type (nullable) is None + # and model_fields_set contains the field + if self.calculation_type is None and "calculation_type" in self.model_fields_set: + _dict["calculationType"] = None + + # set to None if price_per_share (nullable) is None + # and model_fields_set contains the field + if self.price_per_share is None and "price_per_share" in self.model_fields_set: + _dict["pricePerShare"] = None + + # set to None if currency_code (nullable) is None + # and model_fields_set contains the field + if self.currency_code is None and "currency_code" in self.model_fields_set: + _dict["currencyCode"] = None + + # set to None if slider_min (nullable) is None + # and model_fields_set contains the field + if self.slider_min is None and "slider_min" in self.model_fields_set: + _dict["sliderMin"] = None + + # set to None if slider_max (nullable) is None + # and model_fields_set contains the field + if self.slider_max is None and "slider_max" in self.model_fields_set: + _dict["sliderMax"] = None + + # set to None if disclaimers (nullable) is None + # and model_fields_set contains the field + if self.disclaimers is None and "disclaimers" in self.model_fields_set: + _dict["disclaimers"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationEquitySettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "calculationType": obj.get("calculationType"), + "companyValuation": CompensationEquitySettingsResponseCompanyValuation.from_dict( + obj["companyValuation"] + ) + if obj.get("companyValuation") is not None + else None, + "outstandingShares": CompensationEquitySettingsResponseOutstandingShares.from_dict( + obj["outstandingShares"] + ) + if obj.get("outstandingShares") is not None + else None, + "pricePerShare": CompensationEquitySettingsResponsePricePerShare.from_dict(obj["pricePerShare"]) + if obj.get("pricePerShare") is not None + else None, + "currencyCode": obj.get("currencyCode"), + "sliderMin": CompensationEquitySettingsResponseSliderMin.from_dict(obj["sliderMin"]) + if obj.get("sliderMin") is not None + else None, + "sliderMax": CompensationEquitySettingsResponseSliderMin.from_dict(obj["sliderMax"]) + if obj.get("sliderMax") is not None + else None, + "vestingConditions": CompensationEquitySettingsResponseVestingConditions.from_dict( + obj["vestingConditions"] + ) + if obj.get("vestingConditions") is not None + else None, + "disclaimers": CompensationEquitySettingsResponseDisclaimers.from_dict(obj["disclaimers"]) + if obj.get("disclaimers") is not None + else None, + } + ) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/bamboohr_sdk/models/compensation_equity_settings_response_company_valuation.py b/bamboohr_sdk/models/compensation_equity_settings_response_company_valuation.py new file mode 100644 index 0000000..d7f4286 --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response_company_valuation.py @@ -0,0 +1,151 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +from typing import Any + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, ValidationError, field_validator +from typing_extensions import Self + +COMPENSATIONEQUITYSETTINGSRESPONSECOMPANYVALUATION_ONE_OF_SCHEMAS = ["float", "object"] + + +class CompensationEquitySettingsResponseCompanyValuation(BaseModel): + """ + CompensationEquitySettingsResponseCompanyValuation + """ + + # data type: float + oneof_schema_1_validator: StrictFloat | StrictInt | None = None + # data type: object + oneof_schema_2_validator: Any | None = None + actual_instance: float | object | None = None + one_of_schemas: set[str] = {"float", "object"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = CompensationEquitySettingsResponseCompanyValuation.model_construct() + error_messages = [] + match = 0 + # validate data type: float + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: object + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when setting `actual_instance` in CompensationEquitySettingsResponseCompanyValuation with oneOf schemas: float, object. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in CompensationEquitySettingsResponseCompanyValuation with oneOf schemas: float, object. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: str | dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into float + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into object + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into CompensationEquitySettingsResponseCompanyValuation with oneOf schemas: float, object. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into CompensationEquitySettingsResponseCompanyValuation with oneOf schemas: float, object. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict[str, Any] | float | object | None: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/bamboohr_sdk/models/compensation_equity_settings_response_disclaimers.py b/bamboohr_sdk/models/compensation_equity_settings_response_disclaimers.py new file mode 100644 index 0000000..eea3959 --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response_disclaimers.py @@ -0,0 +1,140 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +from typing import Any + +from pydantic import BaseModel, ConfigDict, StrictStr, ValidationError, field_validator +from typing_extensions import Self + +COMPENSATIONEQUITYSETTINGSRESPONSEDISCLAIMERS_ONE_OF_SCHEMAS = ["str"] + + +class CompensationEquitySettingsResponseDisclaimers(BaseModel): + """ + CompensationEquitySettingsResponseDisclaimers + """ + + # data type: str + oneof_schema_1_validator: StrictStr | None = None + actual_instance: str | None = None + one_of_schemas: set[str] = {"str"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = CompensationEquitySettingsResponseDisclaimers.model_construct() + error_messages = [] + match = 0 + # validate data type: str + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when setting `actual_instance` in CompensationEquitySettingsResponseDisclaimers with oneOf schemas: str. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in CompensationEquitySettingsResponseDisclaimers with oneOf schemas: str. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: str | dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str | None) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into str + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into CompensationEquitySettingsResponseDisclaimers with oneOf schemas: str. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into CompensationEquitySettingsResponseDisclaimers with oneOf schemas: str. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict[str, Any] | str | None: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/bamboohr_sdk/models/compensation_equity_settings_response_outstanding_shares.py b/bamboohr_sdk/models/compensation_equity_settings_response_outstanding_shares.py new file mode 100644 index 0000000..6486674 --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response_outstanding_shares.py @@ -0,0 +1,151 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +from typing import Any + +from pydantic import BaseModel, ConfigDict, StrictInt, ValidationError, field_validator +from typing_extensions import Self + +COMPENSATIONEQUITYSETTINGSRESPONSEOUTSTANDINGSHARES_ONE_OF_SCHEMAS = ["int", "object"] + + +class CompensationEquitySettingsResponseOutstandingShares(BaseModel): + """ + CompensationEquitySettingsResponseOutstandingShares + """ + + # data type: int + oneof_schema_1_validator: StrictInt | None = None + # data type: object + oneof_schema_2_validator: Any | None = None + actual_instance: int | object | None = None + one_of_schemas: set[str] = {"int", "object"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = CompensationEquitySettingsResponseOutstandingShares.model_construct() + error_messages = [] + match = 0 + # validate data type: int + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: object + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when setting `actual_instance` in CompensationEquitySettingsResponseOutstandingShares with oneOf schemas: int, object. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in CompensationEquitySettingsResponseOutstandingShares with oneOf schemas: int, object. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: str | dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into int + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into object + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into CompensationEquitySettingsResponseOutstandingShares with oneOf schemas: int, object. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into CompensationEquitySettingsResponseOutstandingShares with oneOf schemas: int, object. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict[str, Any] | int | object | None: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/bamboohr_sdk/models/compensation_equity_settings_response_price_per_share.py b/bamboohr_sdk/models/compensation_equity_settings_response_price_per_share.py new file mode 100644 index 0000000..f7dea54 --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response_price_per_share.py @@ -0,0 +1,140 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +from typing import Any + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, ValidationError, field_validator +from typing_extensions import Self + +COMPENSATIONEQUITYSETTINGSRESPONSEPRICEPERSHARE_ONE_OF_SCHEMAS = ["float"] + + +class CompensationEquitySettingsResponsePricePerShare(BaseModel): + """ + CompensationEquitySettingsResponsePricePerShare + """ + + # data type: float + oneof_schema_1_validator: StrictFloat | StrictInt | None = None + actual_instance: float | None = None + one_of_schemas: set[str] = {"float"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = CompensationEquitySettingsResponsePricePerShare.model_construct() + error_messages = [] + match = 0 + # validate data type: float + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when setting `actual_instance` in CompensationEquitySettingsResponsePricePerShare with oneOf schemas: float. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in CompensationEquitySettingsResponsePricePerShare with oneOf schemas: float. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: str | dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str | None) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into float + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into CompensationEquitySettingsResponsePricePerShare with oneOf schemas: float. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into CompensationEquitySettingsResponsePricePerShare with oneOf schemas: float. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict[str, Any] | float | None: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/bamboohr_sdk/models/compensation_equity_settings_response_slider_min.py b/bamboohr_sdk/models/compensation_equity_settings_response_slider_min.py new file mode 100644 index 0000000..e469bf5 --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response_slider_min.py @@ -0,0 +1,140 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +from typing import Any + +from pydantic import BaseModel, ConfigDict, StrictInt, ValidationError, field_validator +from typing_extensions import Self + +COMPENSATIONEQUITYSETTINGSRESPONSESLIDERMIN_ONE_OF_SCHEMAS = ["int"] + + +class CompensationEquitySettingsResponseSliderMin(BaseModel): + """ + CompensationEquitySettingsResponseSliderMin + """ + + # data type: int + oneof_schema_1_validator: StrictInt | None = None + actual_instance: int | None = None + one_of_schemas: set[str] = {"int"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + if v is None: + return v + + instance = CompensationEquitySettingsResponseSliderMin.model_construct() + error_messages = [] + match = 0 + # validate data type: int + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when setting `actual_instance` in CompensationEquitySettingsResponseSliderMin with oneOf schemas: int. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in CompensationEquitySettingsResponseSliderMin with oneOf schemas: int. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: str | dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str | None) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + if json_str is None: + return instance + + error_messages = [] + match = 0 + + # deserialize data into int + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into CompensationEquitySettingsResponseSliderMin with oneOf schemas: int. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into CompensationEquitySettingsResponseSliderMin with oneOf schemas: int. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict[str, Any] | int | None: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/bamboohr_sdk/models/compensation_equity_settings_response_vesting_conditions.py b/bamboohr_sdk/models/compensation_equity_settings_response_vesting_conditions.py new file mode 100644 index 0000000..ac0f0da --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response_vesting_conditions.py @@ -0,0 +1,151 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +from typing import Any + +from pydantic import BaseModel, ConfigDict, StrictStr, ValidationError, field_validator +from typing_extensions import Self + +COMPENSATIONEQUITYSETTINGSRESPONSEVESTINGCONDITIONS_ONE_OF_SCHEMAS = ["object", "str"] + + +class CompensationEquitySettingsResponseVestingConditions(BaseModel): + """ + CompensationEquitySettingsResponseVestingConditions + """ + + # data type: str + oneof_schema_1_validator: StrictStr | None = None + # data type: object + oneof_schema_2_validator: Any | None = None + actual_instance: object | str | None = None + one_of_schemas: set[str] = {"object", "str"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = CompensationEquitySettingsResponseVestingConditions.model_construct() + error_messages = [] + match = 0 + # validate data type: str + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: object + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when setting `actual_instance` in CompensationEquitySettingsResponseVestingConditions with oneOf schemas: object, str. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in CompensationEquitySettingsResponseVestingConditions with oneOf schemas: object, str. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: str | dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into str + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into object + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into CompensationEquitySettingsResponseVestingConditions with oneOf schemas: object, str. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into CompensationEquitySettingsResponseVestingConditions with oneOf schemas: object, str. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict[str, Any] | object | str | None: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/bamboohr_sdk/models/compensation_equity_settings_update_request.py b/bamboohr_sdk/models/compensation_equity_settings_update_request.py new file mode 100644 index 0000000..ca56ab8 --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_update_request.py @@ -0,0 +1,222 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.compensation_equity_settings_response_disclaimers import ( + CompensationEquitySettingsResponseDisclaimers, +) +from bamboohr_sdk.models.compensation_equity_settings_response_price_per_share import ( + CompensationEquitySettingsResponsePricePerShare, +) +from bamboohr_sdk.models.compensation_equity_settings_response_slider_min import ( + CompensationEquitySettingsResponseSliderMin, +) + + +class CompensationEquitySettingsUpdateRequest(BaseModel): + """ + CompensationEquitySettingsUpdateRequest + """ + + calculation_type: StrictStr | None = Field(default=None, alias="calculationType") + company_valuation: CompensationEquitySettingsResponsePricePerShare | None = Field( + default=None, alias="companyValuation" + ) + outstanding_shares: CompensationEquitySettingsResponseSliderMin | None = Field( + default=None, alias="outstandingShares" + ) + price_per_share: CompensationEquitySettingsResponsePricePerShare | None = Field(default=None, alias="pricePerShare") + currency_code: StrictStr | None = Field(default=None, alias="currencyCode") + slider_min: CompensationEquitySettingsResponseSliderMin | None = Field(default=None, alias="sliderMin") + slider_max: CompensationEquitySettingsResponseSliderMin | None = Field(default=None, alias="sliderMax") + vesting_conditions: CompensationEquitySettingsResponseDisclaimers | None = Field( + default=None, alias="vestingConditions" + ) + disclaimers: CompensationEquitySettingsResponseDisclaimers | None = None + additional_properties: dict[str, Any] = {} + __properties: ClassVar[list[str]] = [ + "calculationType", + "companyValuation", + "outstandingShares", + "pricePerShare", + "currencyCode", + "sliderMin", + "sliderMax", + "vestingConditions", + "disclaimers", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationEquitySettingsUpdateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: set[str] = set( + [ + "additional_properties", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of company_valuation + if self.company_valuation: + _dict["companyValuation"] = self.company_valuation.to_dict() + # override the default output from pydantic by calling `to_dict()` of outstanding_shares + if self.outstanding_shares: + _dict["outstandingShares"] = self.outstanding_shares.to_dict() + # override the default output from pydantic by calling `to_dict()` of price_per_share + if self.price_per_share: + _dict["pricePerShare"] = self.price_per_share.to_dict() + # override the default output from pydantic by calling `to_dict()` of slider_min + if self.slider_min: + _dict["sliderMin"] = self.slider_min.to_dict() + # override the default output from pydantic by calling `to_dict()` of slider_max + if self.slider_max: + _dict["sliderMax"] = self.slider_max.to_dict() + # override the default output from pydantic by calling `to_dict()` of vesting_conditions + if self.vesting_conditions: + _dict["vestingConditions"] = self.vesting_conditions.to_dict() + # override the default output from pydantic by calling `to_dict()` of disclaimers + if self.disclaimers: + _dict["disclaimers"] = self.disclaimers.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if calculation_type (nullable) is None + # and model_fields_set contains the field + if self.calculation_type is None and "calculation_type" in self.model_fields_set: + _dict["calculationType"] = None + + # set to None if company_valuation (nullable) is None + # and model_fields_set contains the field + if self.company_valuation is None and "company_valuation" in self.model_fields_set: + _dict["companyValuation"] = None + + # set to None if outstanding_shares (nullable) is None + # and model_fields_set contains the field + if self.outstanding_shares is None and "outstanding_shares" in self.model_fields_set: + _dict["outstandingShares"] = None + + # set to None if price_per_share (nullable) is None + # and model_fields_set contains the field + if self.price_per_share is None and "price_per_share" in self.model_fields_set: + _dict["pricePerShare"] = None + + # set to None if currency_code (nullable) is None + # and model_fields_set contains the field + if self.currency_code is None and "currency_code" in self.model_fields_set: + _dict["currencyCode"] = None + + # set to None if slider_min (nullable) is None + # and model_fields_set contains the field + if self.slider_min is None and "slider_min" in self.model_fields_set: + _dict["sliderMin"] = None + + # set to None if slider_max (nullable) is None + # and model_fields_set contains the field + if self.slider_max is None and "slider_max" in self.model_fields_set: + _dict["sliderMax"] = None + + # set to None if vesting_conditions (nullable) is None + # and model_fields_set contains the field + if self.vesting_conditions is None and "vesting_conditions" in self.model_fields_set: + _dict["vestingConditions"] = None + + # set to None if disclaimers (nullable) is None + # and model_fields_set contains the field + if self.disclaimers is None and "disclaimers" in self.model_fields_set: + _dict["disclaimers"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationEquitySettingsUpdateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "calculationType": obj.get("calculationType"), + "companyValuation": CompensationEquitySettingsResponsePricePerShare.from_dict(obj["companyValuation"]) + if obj.get("companyValuation") is not None + else None, + "outstandingShares": CompensationEquitySettingsResponseSliderMin.from_dict(obj["outstandingShares"]) + if obj.get("outstandingShares") is not None + else None, + "pricePerShare": CompensationEquitySettingsResponsePricePerShare.from_dict(obj["pricePerShare"]) + if obj.get("pricePerShare") is not None + else None, + "currencyCode": obj.get("currencyCode"), + "sliderMin": CompensationEquitySettingsResponseSliderMin.from_dict(obj["sliderMin"]) + if obj.get("sliderMin") is not None + else None, + "sliderMax": CompensationEquitySettingsResponseSliderMin.from_dict(obj["sliderMax"]) + if obj.get("sliderMax") is not None + else None, + "vestingConditions": CompensationEquitySettingsResponseDisclaimers.from_dict(obj["vestingConditions"]) + if obj.get("vestingConditions") is not None + else None, + "disclaimers": CompensationEquitySettingsResponseDisclaimers.from_dict(obj["disclaimers"]) + if obj.get("disclaimers") is not None + else None, + } + ) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/bamboohr_sdk/models/compensation_planning_cycle_admins_response.py b/bamboohr_sdk/models/compensation_planning_cycle_admins_response.py new file mode 100644 index 0000000..19a1592 --- /dev/null +++ b/bamboohr_sdk/models/compensation_planning_cycle_admins_response.py @@ -0,0 +1,105 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing_extensions import Self + +from bamboohr_sdk.models.compensation_planning_cycle_admins_response_admins_inner import ( + CompensationPlanningCycleAdminsResponseAdminsInner, +) + + +class CompensationPlanningCycleAdminsResponse(BaseModel): + """ + CompensationPlanningCycleAdminsResponse + """ + + admins: list[CompensationPlanningCycleAdminsResponseAdminsInner] | None = Field( + default=None, description="List of admins for the cycle" + ) + is_full_admin: StrictBool | None = Field( + default=None, description="Whether the requesting user is a full compensation plan admin", alias="isFullAdmin" + ) + __properties: ClassVar[list[str]] = ["admins", "isFullAdmin"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationPlanningCycleAdminsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in admins (list) + _items = [] + if self.admins: + for _item_admins in self.admins: + if _item_admins: + _items.append(_item_admins.to_dict()) + _dict["admins"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationPlanningCycleAdminsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "admins": [ + CompensationPlanningCycleAdminsResponseAdminsInner.from_dict(_item) for _item in obj["admins"] + ] + if obj.get("admins") is not None + else None, + "isFullAdmin": obj.get("isFullAdmin"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/compensation_planning_cycle_admins_response_admins_inner.py b/bamboohr_sdk/models/compensation_planning_cycle_admins_response_admins_inner.py new file mode 100644 index 0000000..3e77ff8 --- /dev/null +++ b/bamboohr_sdk/models/compensation_planning_cycle_admins_response_admins_inner.py @@ -0,0 +1,141 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import datetime +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing_extensions import Self + + +class CompensationPlanningCycleAdminsResponseAdminsInner(BaseModel): + """ + CompensationPlanningCycleAdminsResponseAdminsInner + """ + + employee_id: StrictStr | None = Field(default=None, alias="employeeId") + display_name: StrictStr | None = Field(default=None, description="Display name of the admin", alias="displayName") + first_name: StrictStr | None = Field(default=None, description="First name of the admin", alias="firstName") + last_name: StrictStr | None = Field(default=None, description="Last name of the admin", alias="lastName") + job_title: StrictStr | None = Field(default=None, description="Job title of the admin", alias="jobTitle") + photo_url: StrictStr | None = Field(default=None, description="URL to the admin profile photo", alias="photoUrl") + admin_type: StrictStr | None = Field(default=None, description="Type of admin", alias="adminType") + is_removable: StrictBool | None = Field( + default=None, description="Whether this admin can be removed from the cycle", alias="isRemovable" + ) + added_at: datetime | None = Field(default=None, alias="addedAt") + added_by_employee_id: StrictStr | None = Field(default=None, alias="addedByEmployeeId") + __properties: ClassVar[list[str]] = [ + "employeeId", + "displayName", + "firstName", + "lastName", + "jobTitle", + "photoUrl", + "adminType", + "isRemovable", + "addedAt", + "addedByEmployeeId", + ] + + @field_validator("admin_type") + def admin_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["FULL_ACCOUNT_ADMIN", "CYCLE_ADMIN"]): + raise ValueError("must be one of enum values ('FULL_ACCOUNT_ADMIN', 'CYCLE_ADMIN')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationPlanningCycleAdminsResponseAdminsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if employee_id (nullable) is None + # and model_fields_set contains the field + if self.employee_id is None and "employee_id" in self.model_fields_set: + _dict["employeeId"] = None + + # set to None if added_at (nullable) is None + # and model_fields_set contains the field + if self.added_at is None and "added_at" in self.model_fields_set: + _dict["addedAt"] = None + + # set to None if added_by_employee_id (nullable) is None + # and model_fields_set contains the field + if self.added_by_employee_id is None and "added_by_employee_id" in self.model_fields_set: + _dict["addedByEmployeeId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationPlanningCycleAdminsResponseAdminsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "displayName": obj.get("displayName"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "jobTitle": obj.get("jobTitle"), + "photoUrl": obj.get("photoUrl"), + "adminType": obj.get("adminType"), + "isRemovable": obj.get("isRemovable"), + "addedAt": obj.get("addedAt"), + "addedByEmployeeId": obj.get("addedByEmployeeId"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/compensation_planning_cycle_complete_response.py b/bamboohr_sdk/models/compensation_planning_cycle_complete_response.py new file mode 100644 index 0000000..3c97935 --- /dev/null +++ b/bamboohr_sdk/models/compensation_planning_cycle_complete_response.py @@ -0,0 +1,120 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.compensation_planning_cycle_complete_response_errors_inner import ( + CompensationPlanningCycleCompleteResponseErrorsInner, +) + + +class CompensationPlanningCycleCompleteResponse(BaseModel): + """ + CompensationPlanningCycleCompleteResponse + """ + + cycle_id: StrictInt | None = Field(default=None, alias="cycleId") + updated_employees_count: StrictInt | None = Field(default=None, alias="updatedEmployeesCount") + cycle_closed_email_error: StrictStr | None = Field(default=None, alias="cycleClosedEmailError") + errors: list[CompensationPlanningCycleCompleteResponseErrorsInner] | None = None + __properties: ClassVar[list[str]] = ["cycleId", "updatedEmployeesCount", "cycleClosedEmailError", "errors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationPlanningCycleCompleteResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict["errors"] = _items + # set to None if cycle_id (nullable) is None + # and model_fields_set contains the field + if self.cycle_id is None and "cycle_id" in self.model_fields_set: + _dict["cycleId"] = None + + # set to None if updated_employees_count (nullable) is None + # and model_fields_set contains the field + if self.updated_employees_count is None and "updated_employees_count" in self.model_fields_set: + _dict["updatedEmployeesCount"] = None + + # set to None if cycle_closed_email_error (nullable) is None + # and model_fields_set contains the field + if self.cycle_closed_email_error is None and "cycle_closed_email_error" in self.model_fields_set: + _dict["cycleClosedEmailError"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationPlanningCycleCompleteResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "cycleId": obj.get("cycleId"), + "updatedEmployeesCount": obj.get("updatedEmployeesCount"), + "cycleClosedEmailError": obj.get("cycleClosedEmailError"), + "errors": [ + CompensationPlanningCycleCompleteResponseErrorsInner.from_dict(_item) for _item in obj["errors"] + ] + if obj.get("errors") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/xml_directory_employee_employees_employee_inner_field_inner.py b/bamboohr_sdk/models/compensation_planning_cycle_complete_response_errors_inner.py similarity index 51% rename from bamboohr_sdk/models/xml_directory_employee_employees_employee_inner_field_inner.py rename to bamboohr_sdk/models/compensation_planning_cycle_complete_response_errors_inner.py index 521aeec..6fb2227 100644 --- a/bamboohr_sdk/models/xml_directory_employee_employees_employee_inner_field_inner.py +++ b/bamboohr_sdk/models/compensation_planning_cycle_complete_response_errors_inner.py @@ -1,34 +1,37 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner(BaseModel): + +class CompensationPlanningCycleCompleteResponseErrorsInner(BaseModel): """ - XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Field identifier on the `` element.") - value: Optional[StrictStr] = Field(default=None, description="Field value serialized as the `` element text content.") - __properties: ClassVar[List[str]] = ["id", "value"] + CompensationPlanningCycleCompleteResponseErrorsInner + """ + + employee_id: StrictStr | None = Field( + default=None, + description="The internal employee ID of the employee with the completion error.", + alias="employeeId", + ) + message: StrictStr | None = None + __properties: ClassVar[list[str]] = ["employeeId", "message"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +39,6 @@ class XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +49,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationPlanningCycleCompleteResponseErrorsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,29 +63,28 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, exclude=excluded_fields, exclude_none=True, ) + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict["message"] = None + return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationPlanningCycleCompleteResponseErrorsInner from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "value": obj.get("value") - }) + _obj = cls.model_validate({"employeeId": obj.get("employeeId"), "message": obj.get("message")}) return _obj - - diff --git a/bamboohr_sdk/models/compensation_tools_data_object.py b/bamboohr_sdk/models/compensation_tools_data_object.py new file mode 100644 index 0000000..1092146 --- /dev/null +++ b/bamboohr_sdk/models/compensation_tools_data_object.py @@ -0,0 +1,112 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing_extensions import Self + + +class CompensationToolsDataObject(BaseModel): + """ + Schema for the compensation tools list. + """ + + levels_and_bands: StrictBool | None = Field( + default=None, description="Has access to Levels & Bands tool", alias="levelsAndBands" + ) + compensation_benchmarking: StrictBool | None = Field( + default=None, description="Has access to Compensation Benchmarking tool", alias="compensationBenchmarking" + ) + compensation_planning: StrictBool | None = Field( + default=None, + description="Can view Compensation Planning (includes read-only access for formerly-Elite accounts)", + alias="compensationPlanning", + ) + can_manage_compensation_planning: StrictBool | None = Field( + default=None, + description="Can create/manage Compensation Planning cycles (Elite tool required); false for read-only view access", + alias="canManageCompensationPlanning", + ) + total_rewards: StrictBool | None = Field( + default=None, description="Has access to Total Rewards tool", alias="totalRewards" + ) + __properties: ClassVar[list[str]] = [ + "levelsAndBands", + "compensationBenchmarking", + "compensationPlanning", + "canManageCompensationPlanning", + "totalRewards", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationToolsDataObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationToolsDataObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "levelsAndBands": obj.get("levelsAndBands"), + "compensationBenchmarking": obj.get("compensationBenchmarking"), + "compensationPlanning": obj.get("compensationPlanning"), + "canManageCompensationPlanning": obj.get("canManageCompensationPlanning"), + "totalRewards": obj.get("totalRewards"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/compensation_tools_response.py b/bamboohr_sdk/models/compensation_tools_response.py new file mode 100644 index 0000000..bf8671f --- /dev/null +++ b/bamboohr_sdk/models/compensation_tools_response.py @@ -0,0 +1,102 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictBool +from typing_extensions import Self + +from bamboohr_sdk.models.compensation_tools_data_object import CompensationToolsDataObject +from bamboohr_sdk.models.compensation_upsell_data import CompensationUpsellData + + +class CompensationToolsResponse(BaseModel): + """ + CompensationToolsResponse + """ + + success: StrictBool | None = None + tools: CompensationToolsDataObject | None = None + upsell: CompensationUpsellData | None = None + __properties: ClassVar[list[str]] = ["success", "tools", "upsell"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationToolsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of tools + if self.tools: + _dict["tools"] = self.tools.to_dict() + # override the default output from pydantic by calling `to_dict()` of upsell + if self.upsell: + _dict["upsell"] = self.upsell.to_dict() + # set to None if success (nullable) is None + # and model_fields_set contains the field + if self.success is None and "success" in self.model_fields_set: + _dict["success"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationToolsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "success": obj.get("success"), + "tools": CompensationToolsDataObject.from_dict(obj["tools"]) if obj.get("tools") is not None else None, + "upsell": CompensationUpsellData.from_dict(obj["upsell"]) if obj.get("upsell") is not None else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/compensation_upsell_data.py b/bamboohr_sdk/models/compensation_upsell_data.py new file mode 100644 index 0000000..acdc871 --- /dev/null +++ b/bamboohr_sdk/models/compensation_upsell_data.py @@ -0,0 +1,101 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.user_permission_data import UserPermissionData + + +class CompensationUpsellData(BaseModel): + """ + Schema for the compensation upsell data. + """ + + account_owner_name: StrictStr | None = Field( + default=None, description="Account owner name", alias="accountOwnerName" + ) + can_request_demo: StrictBool | None = Field( + default=None, description="Whether user can request a demo", alias="canRequestDemo" + ) + user_permissions: UserPermissionData | None = Field( + default=None, description="User permissions", alias="userPermissions" + ) + __properties: ClassVar[list[str]] = ["accountOwnerName", "canRequestDemo", "userPermissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompensationUpsellData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user_permissions + if self.user_permissions: + _dict["userPermissions"] = self.user_permissions.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompensationUpsellData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "accountOwnerName": obj.get("accountOwnerName"), + "canRequestDemo": obj.get("canRequestDemo"), + "userPermissions": UserPermissionData.from_dict(obj["userPermissions"]) + if obj.get("userPermissions") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/completed_questions_and_response_data_object.py b/bamboohr_sdk/models/completed_questions_and_response_data_object.py new file mode 100644 index 0000000..22fb4e1 --- /dev/null +++ b/bamboohr_sdk/models/completed_questions_and_response_data_object.py @@ -0,0 +1,117 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing_extensions import Self + + +class CompletedQuestionsAndResponseDataObject(BaseModel): + """ + Data object for completed questions and responses + """ + + question: StrictStr | None = Field(default=None, description="The question that was completed") + is_required: StrictBool | None = Field( + default=None, description="Indicates if the question is required", alias="isRequired" + ) + archived: StrictBool | None = Field(default=None, description="Indicates if the question is archived") + sort_order: StrictInt | None = Field(default=None, description="The sort order of the question", alias="sortOrder") + employee_id: StrictInt | None = Field( + default=None, description="The employee ID associated with the question", alias="employeeId" + ) + employee_personal_question_id: StrictInt | None = Field( + default=None, + description="The employee personal question ID associated with the question", + alias="employeePersonalQuestionId", + ) + employee_response: StrictStr | None = Field( + default=None, description="The response to the question", alias="employeeResponse" + ) + hidden: StrictBool | None = Field(default=None, description="Indicates if the question is hidden") + __properties: ClassVar[list[str]] = [ + "question", + "isRequired", + "archived", + "sortOrder", + "employeeId", + "employeePersonalQuestionId", + "employeeResponse", + "hidden", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CompletedQuestionsAndResponseDataObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CompletedQuestionsAndResponseDataObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "question": obj.get("question"), + "isRequired": obj.get("isRequired"), + "archived": obj.get("archived"), + "sortOrder": obj.get("sortOrder"), + "employeeId": obj.get("employeeId"), + "employeePersonalQuestionId": obj.get("employeePersonalQuestionId"), + "employeeResponse": obj.get("employeeResponse"), + "hidden": obj.get("hidden"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/conversion_rate_data_object.py b/bamboohr_sdk/models/conversion_rate_data_object.py new file mode 100644 index 0000000..9d17c9f --- /dev/null +++ b/bamboohr_sdk/models/conversion_rate_data_object.py @@ -0,0 +1,94 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + + +class ConversionRateDataObject(BaseModel): + """ + Represents a currency conversion rate from a source to a target currency. + """ + + currency_name: StrictStr | None = Field( + default=None, description="The full name of the target currency.", alias="currencyName" + ) + currency_code: StrictStr | None = Field( + default=None, description="The code of the target currency (e.g. USD, EUR, JPY).", alias="currencyCode" + ) + conversion_rate: StrictFloat | StrictInt | None = Field( + default=None, description="The numeric conversion rate to the target currency.", alias="conversionRate" + ) + __properties: ClassVar[list[str]] = ["currencyName", "currencyCode", "conversionRate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of ConversionRateDataObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of ConversionRateDataObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "currencyName": obj.get("currencyName"), + "currencyCode": obj.get("currencyCode"), + "conversionRate": obj.get("conversionRate"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/countries_options_response.py b/bamboohr_sdk/models/countries_options_response.py new file mode 100644 index 0000000..2a94cee --- /dev/null +++ b/bamboohr_sdk/models/countries_options_response.py @@ -0,0 +1,152 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +from typing import Any + +from pydantic import BaseModel, ConfigDict, Field, ValidationError, field_validator +from typing_extensions import Self + +from bamboohr_sdk.models.country_schema import CountrySchema + +COUNTRIESOPTIONSRESPONSE_ONE_OF_SCHEMAS = ["CountrySchema", "List[CountrySchema]"] + + +class CountriesOptionsResponse(BaseModel): + """ + CountriesOptionsResponse + """ + + # data type: List[CountrySchema] + oneof_schema_1_validator: list[CountrySchema] | None = Field( + default=None, + description="Top-level JSON array of country objects. The response is not wrapped in a parent object.", + ) + # data type: CountrySchema + oneof_schema_2_validator: CountrySchema | None = None + actual_instance: CountrySchema | list[CountrySchema] | None = None + one_of_schemas: set[str] = {"CountrySchema", "List[CountrySchema]"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = CountriesOptionsResponse.model_construct() + error_messages = [] + match = 0 + # validate data type: List[CountrySchema] + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: CountrySchema + if not isinstance(v, CountrySchema): + error_messages.append(f"Error! Input type `{type(v)}` is not `CountrySchema`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when setting `actual_instance` in CountriesOptionsResponse with oneOf schemas: CountrySchema, List[CountrySchema]. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in CountriesOptionsResponse with oneOf schemas: CountrySchema, List[CountrySchema]. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: str | dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into List[CountrySchema] + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CountrySchema + try: + instance.actual_instance = CountrySchema.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into CountriesOptionsResponse with oneOf schemas: CountrySchema, List[CountrySchema]. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into CountriesOptionsResponse with oneOf schemas: CountrySchema, List[CountrySchema]. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict[str, Any] | CountrySchema | list[CountrySchema] | None: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/bamboohr_sdk/models/country.py b/bamboohr_sdk/models/country.py index e6a6b78..b60bd24 100644 --- a/bamboohr_sdk/models/country.py +++ b/bamboohr_sdk/models/country.py @@ -1,35 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class Country(BaseModel): """ Country - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="The ID of the country") - name: Optional[StrictStr] = Field(default=None, description="The name of the country") - iso_code: Optional[StrictStr] = Field(default=None, description="The ISO standard code of the country") - __properties: ClassVar[List[str]] = ["id", "name", "iso_code"] + """ + + id: StrictInt | None = Field(default=None, description="The ID of the country") + name: StrictStr | None = Field(default=None, description="The name of the country") + iso_code: StrictStr | None = Field(default=None, description="The ISO standard code of the country") + __properties: ClassVar[list[str]] = ["id", "name", "iso_code"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +36,6 @@ class Country(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of Country from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of Country from a dict""" if obj is None: return None @@ -81,11 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "iso_code": obj.get("iso_code") - }) + _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name"), "iso_code": obj.get("iso_code")}) return _obj - - diff --git a/bamboohr_sdk/models/country_schema.py b/bamboohr_sdk/models/country_schema.py index 949dce6..b368920 100644 --- a/bamboohr_sdk/models/country_schema.py +++ b/bamboohr_sdk/models/country_schema.py @@ -1,35 +1,46 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations -import pprint -import re # noqa: F401 + import json +import pprint +import re +from typing import Annotated, Any, ClassVar -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing_extensions import Self + class CountrySchema(BaseModel): """ - Schema for country data - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the country") - name: Optional[StrictStr] = Field(default=None, description="Full name of the country") - iso_code: Optional[StrictStr] = Field(default=None, description="ISO 3166-1 alpha-2 code for the country, or null if no ISO code is defined.", alias="isoCode") - __properties: ClassVar[List[str]] = ["id", "name", "isoCode"] + A country in the list returned by the Get Countries endpoint + """ + + id: Annotated[str, Field(strict=True)] | None = Field( + default=None, description="Internal country identifier, returned as a numeric string." + ) + name: StrictStr | None = Field(default=None, description="Full display name of the country") + iso_code: StrictStr | None = Field(default=None, alias="isoCode") + __properties: ClassVar[list[str]] = ["id", "name", "isoCode"] + + @field_validator("id") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^\d+$", value): + raise ValueError(r"must validate the regular expression /^\d+$/") + return value model_config = ConfigDict( populate_by_name=True, @@ -37,7 +48,6 @@ class CountrySchema(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +58,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CountrySchema from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,8 +72,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,12 +82,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if iso_code (nullable) is None # and model_fields_set contains the field if self.iso_code is None and "iso_code" in self.model_fields_set: - _dict['isoCode'] = None + _dict["isoCode"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CountrySchema from a dict""" if obj is None: return None @@ -86,11 +95,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "isoCode": obj.get("isoCode") - }) + _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name"), "isoCode": obj.get("isoCode")}) return _obj - - diff --git a/bamboohr_sdk/models/create_application_comment_request.py b/bamboohr_sdk/models/create_application_comment_request.py index a84178d..7c0bde5 100644 --- a/bamboohr_sdk/models/create_application_comment_request.py +++ b/bamboohr_sdk/models/create_application_comment_request.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CreateApplicationCommentRequest(BaseModel): """ CreateApplicationCommentRequest - """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, description="The comment type. Defaults to `comment` if omitted.") + """ + + type: StrictStr | None = Field(default=None, description="The comment type. Defaults to `comment` if omitted.") comment: StrictStr = Field(description="The comment being posted.") - __properties: ClassVar[List[str]] = ["type", "comment"] + __properties: ClassVar[list[str]] = ["type", "comment"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class CreateApplicationCommentRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CreateApplicationCommentRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CreateApplicationCommentRequest from a dict""" if obj is None: return None @@ -80,10 +77,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type"), - "comment": obj.get("comment") - }) + _obj = cls.model_validate({"type": obj.get("type"), "comment": obj.get("comment")}) return _obj - - diff --git a/bamboohr_sdk/models/create_candidate_response.py b/bamboohr_sdk/models/create_candidate_response.py index 1f15c7b..a0ab17d 100644 --- a/bamboohr_sdk/models/create_candidate_response.py +++ b/bamboohr_sdk/models/create_candidate_response.py @@ -1,34 +1,35 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CreateCandidateResponse(BaseModel): """ CreateCandidateResponse - """ # noqa: E501 - result: Optional[StrictStr] = Field(default=None, description="Always 'success' on a successful request") - candidate_id: Optional[StrictInt] = Field(default=None, description="The ID of the newly created candidate", alias="candidateId") - __properties: ClassVar[List[str]] = ["result", "candidateId"] + """ + + result: StrictStr | None = Field(default=None, description="Always 'success' on a successful request") + candidate_id: StrictInt | None = Field( + default=None, description="The ID of the newly created candidate", alias="candidateId" + ) + __properties: ClassVar[list[str]] = ["result", "candidateId"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +37,6 @@ class CreateCandidateResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +47,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CreateCandidateResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CreateCandidateResponse from a dict""" if obj is None: return None @@ -80,10 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "result": obj.get("result"), - "candidateId": obj.get("candidateId") - }) + _obj = cls.model_validate({"result": obj.get("result"), "candidateId": obj.get("candidateId")}) return _obj - - diff --git a/bamboohr_sdk/models/create_comment_response.py b/bamboohr_sdk/models/create_comment_response.py index 48d5721..f041650 100644 --- a/bamboohr_sdk/models/create_comment_response.py +++ b/bamboohr_sdk/models/create_comment_response.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CreateCommentResponse(BaseModel): """ CreateCommentResponse - """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, description="The type of comment created, e.g. 'comment'") - id: Optional[StrictInt] = Field(default=None, description="The ID of the newly created comment") - __properties: ClassVar[List[str]] = ["type", "id"] + """ + + type: StrictStr | None = Field(default=None, description="The type of comment created, e.g. 'comment'") + id: StrictInt | None = Field(default=None, description="The ID of the newly created comment") + __properties: ClassVar[list[str]] = ["type", "id"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class CreateCommentResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CreateCommentResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CreateCommentResponse from a dict""" if obj is None: return None @@ -80,10 +77,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type"), - "id": obj.get("id") - }) + _obj = cls.model_validate({"type": obj.get("type"), "id": obj.get("id")}) return _obj - - diff --git a/bamboohr_sdk/models/create_compensation_benchmark_request.py b/bamboohr_sdk/models/create_compensation_benchmark_request.py new file mode 100644 index 0000000..d7dab03 --- /dev/null +++ b/bamboohr_sdk/models/create_compensation_benchmark_request.py @@ -0,0 +1,218 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + + +class CreateCompensationBenchmarkRequest(BaseModel): + """ + CreateCompensationBenchmarkRequest + """ + + job_title_id: StrictStr = Field( + description="ID of the company job title the benchmark applies to.", alias="jobTitleId" + ) + job_location_id: StrictStr | None = Field( + default=None, + description="Optional job location ID to scope the benchmark to a specific location.", + alias="jobLocationId", + ) + currency_code: StrictStr = Field( + description="ISO 4217 currency code for the benchmark values.", alias="currencyCode" + ) + mjl_job_code: StrictStr | None = Field( + default=None, + description="Mercer Job Library code associated with this benchmark. Stored on the benchmark as `mercerJobCode`.", + alias="mjlJobCode", + ) + benchmark_value: StrictFloat | StrictInt = Field(description="Benchmark median value.", alias="benchmarkValue") + benchmark_min: StrictFloat | StrictInt = Field(description="Benchmark minimum value.", alias="benchmarkMin") + benchmark_max: StrictFloat | StrictInt = Field(description="Benchmark maximum value.", alias="benchmarkMax") + benchmark_source: StrictStr | None = Field( + default=None, description="Free-text label describing where the benchmark came from.", alias="benchmarkSource" + ) + external_job_title: StrictStr | None = Field(default=None, alias="externalJobTitle") + external_location: StrictStr | None = Field(default=None, alias="externalLocation") + external_level: StrictStr | None = Field(default=None, alias="externalLevel") + external_job_description: StrictStr | None = Field(default=None, alias="externalJobDescription") + companies_surveyed: StrictInt | None = Field(default=None, alias="companiesSurveyed") + employees_surveyed: StrictInt | None = Field(default=None, alias="employeesSurveyed") + source_id: StrictStr | None = Field( + default=None, + description="ID of the benchmark source from `GET /api/v1/compensation/benchmarks/sources`.", + alias="sourceId", + ) + source_date: StrictStr | None = Field( + default=None, description="Date the benchmark source data applies to.", alias="sourceDate" + ) + data_year: StrictStr | None = Field( + default=None, description="Year of the underlying survey data.", alias="dataYear" + ) + external_country: StrictStr | None = Field(default=None, alias="externalCountry") + external_secondary_location: StrictStr | None = Field(default=None, alias="externalSecondaryLocation") + external_company_size: StrictStr | None = Field(default=None, alias="externalCompanySize") + external_industry: StrictStr | None = Field(default=None, alias="externalIndustry") + __properties: ClassVar[list[str]] = [ + "jobTitleId", + "jobLocationId", + "currencyCode", + "mjlJobCode", + "benchmarkValue", + "benchmarkMin", + "benchmarkMax", + "benchmarkSource", + "externalJobTitle", + "externalLocation", + "externalLevel", + "externalJobDescription", + "companiesSurveyed", + "employeesSurveyed", + "sourceId", + "sourceDate", + "dataYear", + "externalCountry", + "externalSecondaryLocation", + "externalCompanySize", + "externalIndustry", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreateCompensationBenchmarkRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if external_job_title (nullable) is None + # and model_fields_set contains the field + if self.external_job_title is None and "external_job_title" in self.model_fields_set: + _dict["externalJobTitle"] = None + + # set to None if external_location (nullable) is None + # and model_fields_set contains the field + if self.external_location is None and "external_location" in self.model_fields_set: + _dict["externalLocation"] = None + + # set to None if external_level (nullable) is None + # and model_fields_set contains the field + if self.external_level is None and "external_level" in self.model_fields_set: + _dict["externalLevel"] = None + + # set to None if external_job_description (nullable) is None + # and model_fields_set contains the field + if self.external_job_description is None and "external_job_description" in self.model_fields_set: + _dict["externalJobDescription"] = None + + # set to None if companies_surveyed (nullable) is None + # and model_fields_set contains the field + if self.companies_surveyed is None and "companies_surveyed" in self.model_fields_set: + _dict["companiesSurveyed"] = None + + # set to None if employees_surveyed (nullable) is None + # and model_fields_set contains the field + if self.employees_surveyed is None and "employees_surveyed" in self.model_fields_set: + _dict["employeesSurveyed"] = None + + # set to None if external_country (nullable) is None + # and model_fields_set contains the field + if self.external_country is None and "external_country" in self.model_fields_set: + _dict["externalCountry"] = None + + # set to None if external_secondary_location (nullable) is None + # and model_fields_set contains the field + if self.external_secondary_location is None and "external_secondary_location" in self.model_fields_set: + _dict["externalSecondaryLocation"] = None + + # set to None if external_company_size (nullable) is None + # and model_fields_set contains the field + if self.external_company_size is None and "external_company_size" in self.model_fields_set: + _dict["externalCompanySize"] = None + + # set to None if external_industry (nullable) is None + # and model_fields_set contains the field + if self.external_industry is None and "external_industry" in self.model_fields_set: + _dict["externalIndustry"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreateCompensationBenchmarkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "jobTitleId": obj.get("jobTitleId"), + "jobLocationId": obj.get("jobLocationId"), + "currencyCode": obj.get("currencyCode"), + "mjlJobCode": obj.get("mjlJobCode"), + "benchmarkValue": obj.get("benchmarkValue"), + "benchmarkMin": obj.get("benchmarkMin"), + "benchmarkMax": obj.get("benchmarkMax"), + "benchmarkSource": obj.get("benchmarkSource"), + "externalJobTitle": obj.get("externalJobTitle"), + "externalLocation": obj.get("externalLocation"), + "externalLevel": obj.get("externalLevel"), + "externalJobDescription": obj.get("externalJobDescription"), + "companiesSurveyed": obj.get("companiesSurveyed"), + "employeesSurveyed": obj.get("employeesSurveyed"), + "sourceId": obj.get("sourceId"), + "sourceDate": obj.get("sourceDate"), + "dataYear": obj.get("dataYear"), + "externalCountry": obj.get("externalCountry"), + "externalSecondaryLocation": obj.get("externalSecondaryLocation"), + "externalCompanySize": obj.get("externalCompanySize"), + "externalIndustry": obj.get("externalIndustry"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/create_compensation_benchmark_source_request.py b/bamboohr_sdk/models/create_compensation_benchmark_source_request.py new file mode 100644 index 0000000..b8b0c0d --- /dev/null +++ b/bamboohr_sdk/models/create_compensation_benchmark_source_request.py @@ -0,0 +1,85 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class CreateCompensationBenchmarkSourceRequest(BaseModel): + """ + CreateCompensationBenchmarkSourceRequest + """ + + name: StrictStr = Field( + description="Display name for the new benchmark source. Cannot be empty or equal to `mercer`." + ) + color_code: StrictStr | None = Field( + default=None, description="Optional hex color used to display the source in the UI.", alias="colorCode" + ) + __properties: ClassVar[list[str]] = ["name", "colorCode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreateCompensationBenchmarkSourceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreateCompensationBenchmarkSourceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"name": obj.get("name"), "colorCode": obj.get("colorCode")}) + return _obj diff --git a/bamboohr_sdk/models/create_employee_training_record_request.py b/bamboohr_sdk/models/create_employee_training_record_request.py index ae51ef3..5a29ad4 100644 --- a/bamboohr_sdk/models/create_employee_training_record_request.py +++ b/bamboohr_sdk/models/create_employee_training_record_request.py @@ -1,40 +1,40 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from bamboohr_sdk.models.create_employee_training_record_request_cost import CreateEmployeeTrainingRecordRequestCost -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.create_employee_training_record_request_cost import CreateEmployeeTrainingRecordRequestCost + + class CreateEmployeeTrainingRecordRequest(BaseModel): """ CreateEmployeeTrainingRecordRequest - """ # noqa: E501 + """ + completed: StrictStr = Field(description="Completed is a required field and must be in yyyy-mm-dd format.") - cost: Optional[CreateEmployeeTrainingRecordRequestCost] = None - instructor: Optional[StrictStr] = Field(default=None, description="Name of the training instructor.") - hours: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of hours for the training.") - credits: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Credits earned for the training.") - notes: Optional[StrictStr] = Field(default=None, description="Optional notes about the training record.") + cost: CreateEmployeeTrainingRecordRequestCost | None = None + instructor: StrictStr | None = Field(default=None, description="Name of the training instructor.") + hours: StrictFloat | StrictInt | None = Field(default=None, description="Number of hours for the training.") + credits: StrictFloat | StrictInt | None = Field(default=None, description="Credits earned for the training.") + notes: StrictStr | None = Field(default=None, description="Optional notes about the training record.") type: StrictInt = Field(description="This must be an existing training type ID.") - __properties: ClassVar[List[str]] = ["completed", "cost", "instructor", "hours", "credits", "notes", "type"] + __properties: ClassVar[list[str]] = ["completed", "cost", "instructor", "hours", "credits", "notes", "type"] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +42,6 @@ class CreateEmployeeTrainingRecordRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,11 +52,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CreateEmployeeTrainingRecordRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -67,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,11 +75,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of cost if self.cost: - _dict['cost'] = self.cost.to_dict() + _dict["cost"] = self.cost.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CreateEmployeeTrainingRecordRequest from a dict""" if obj is None: return None @@ -89,15 +87,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "completed": obj.get("completed"), - "cost": CreateEmployeeTrainingRecordRequestCost.from_dict(obj["cost"]) if obj.get("cost") is not None else None, - "instructor": obj.get("instructor"), - "hours": obj.get("hours"), - "credits": obj.get("credits"), - "notes": obj.get("notes"), - "type": obj.get("type") - }) + _obj = cls.model_validate( + { + "completed": obj.get("completed"), + "cost": CreateEmployeeTrainingRecordRequestCost.from_dict(obj["cost"]) + if obj.get("cost") is not None + else None, + "instructor": obj.get("instructor"), + "hours": obj.get("hours"), + "credits": obj.get("credits"), + "notes": obj.get("notes"), + "type": obj.get("type"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/create_employee_training_record_request_cost.py b/bamboohr_sdk/models/create_employee_training_record_request_cost.py index 3ecdd5b..47e70fd 100644 --- a/bamboohr_sdk/models/create_employee_training_record_request_cost.py +++ b/bamboohr_sdk/models/create_employee_training_record_request_cost.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CreateEmployeeTrainingRecordRequestCost(BaseModel): """ Optional cost for the training record. - """ # noqa: E501 - currency: Optional[StrictStr] = Field(default=None, description="ISO 4217 currency code (e.g. 'USD').") - amount: Optional[StrictStr] = Field(default=None, description="Monetary amount as a decimal string (e.g. '100.00').") - __properties: ClassVar[List[str]] = ["currency", "amount"] + """ + + currency: StrictStr | None = Field(default=None, description="ISO 4217 currency code (e.g. 'USD').") + amount: StrictStr | None = Field(default=None, description="Monetary amount as a decimal string (e.g. '100.00').") + __properties: ClassVar[list[str]] = ["currency", "amount"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class CreateEmployeeTrainingRecordRequestCost(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CreateEmployeeTrainingRecordRequestCost from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CreateEmployeeTrainingRecordRequestCost from a dict""" if obj is None: return None @@ -80,10 +77,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "currency": obj.get("currency"), - "amount": obj.get("amount") - }) + _obj = cls.model_validate({"currency": obj.get("currency"), "amount": obj.get("amount")}) return _obj - - diff --git a/bamboohr_sdk/models/post_goal_comment_request.py b/bamboohr_sdk/models/create_goal_comment_request.py similarity index 62% rename from bamboohr_sdk/models/post_goal_comment_request.py rename to bamboohr_sdk/models/create_goal_comment_request.py index 670bbeb..79c6088 100644 --- a/bamboohr_sdk/models/post_goal_comment_request.py +++ b/bamboohr_sdk/models/create_goal_comment_request.py @@ -1,33 +1,32 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set from typing_extensions import Self -class PostGoalCommentRequest(BaseModel): + +class CreateGoalCommentRequest(BaseModel): + """ + CreateGoalCommentRequest """ - PostGoalCommentRequest - """ # noqa: E501 + text: StrictStr = Field(description="The text content of the comment.") - __properties: ClassVar[List[str]] = ["text"] + __properties: ClassVar[list[str]] = ["text"] model_config = ConfigDict( populate_by_name=True, @@ -35,7 +34,6 @@ class PostGoalCommentRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -46,11 +44,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PostGoalCommentRequest from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreateGoalCommentRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -60,8 +58,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,17 +68,13 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PostGoalCommentRequest from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreateGoalCommentRequest from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "text": obj.get("text") - }) + _obj = cls.model_validate({"text": obj.get("text")}) return _obj - - diff --git a/bamboohr_sdk/models/create_goal_request.py b/bamboohr_sdk/models/create_goal_request.py new file mode 100644 index 0000000..ef6c10d --- /dev/null +++ b/bamboohr_sdk/models/create_goal_request.py @@ -0,0 +1,139 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date +from typing import Annotated, Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.create_goal_request_milestones_inner import CreateGoalRequestMilestonesInner + + +class CreateGoalRequest(BaseModel): + """ + CreateGoalRequest + """ + + title: StrictStr = Field(description="The title of the goal") + description: StrictStr | None = Field(default=None, description="A detailed description of the goal") + due_date: date = Field(description="The due date for the goal in YYYY-MM-DD format", alias="dueDate") + percent_complete: Annotated[int, Field(le=100, strict=True, ge=0)] | None = Field( + default=None, + description="Initial percentage of completion for a simple goal (0-100). Defaults to 0 if omitted. Ignored when `milestones` is provided; milestone-based goals derive percent complete from milestone completion and should be updated via `update-goal-milestone-progress`.", + alias="percentComplete", + ) + completion_date: date | None = Field(default=None, alias="completionDate") + shared_with_employee_ids: list[StrictInt | None] = Field( + description="List of internal employee IDs with whom the goal is shared. Must include the internal employee ID of the goal owner.", + alias="sharedWithEmployeeIds", + ) + aligns_with_option_id: StrictInt | None = Field(default=None, alias="alignsWithOptionId") + milestones: list[CreateGoalRequestMilestonesInner] | None = Field( + default=None, + description="Optional. Provide a non-empty array of milestone objects to create a milestone-based goal. Omit this field (or send `null`) to create a simple goal.", + ) + __properties: ClassVar[list[str]] = [ + "title", + "description", + "dueDate", + "percentComplete", + "completionDate", + "sharedWithEmployeeIds", + "alignsWithOptionId", + "milestones", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreateGoalRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in milestones (list) + _items = [] + if self.milestones: + for _item_milestones in self.milestones: + if _item_milestones: + _items.append(_item_milestones.to_dict()) + _dict["milestones"] = _items + # set to None if completion_date (nullable) is None + # and model_fields_set contains the field + if self.completion_date is None and "completion_date" in self.model_fields_set: + _dict["completionDate"] = None + + # set to None if aligns_with_option_id (nullable) is None + # and model_fields_set contains the field + if self.aligns_with_option_id is None and "aligns_with_option_id" in self.model_fields_set: + _dict["alignsWithOptionId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreateGoalRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "title": obj.get("title"), + "description": obj.get("description"), + "dueDate": obj.get("dueDate"), + "percentComplete": obj.get("percentComplete"), + "completionDate": obj.get("completionDate"), + "sharedWithEmployeeIds": obj.get("sharedWithEmployeeIds"), + "alignsWithOptionId": obj.get("alignsWithOptionId"), + "milestones": [CreateGoalRequestMilestonesInner.from_dict(_item) for _item in obj["milestones"]] + if obj.get("milestones") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/put_goal_v11_request_milestones_inner.py b/bamboohr_sdk/models/create_goal_request_milestones_inner.py similarity index 59% rename from bamboohr_sdk/models/put_goal_v11_request_milestones_inner.py rename to bamboohr_sdk/models/create_goal_request_milestones_inner.py index ee34e6c..90942d0 100644 --- a/bamboohr_sdk/models/put_goal_v11_request_milestones_inner.py +++ b/bamboohr_sdk/models/create_goal_request_milestones_inner.py @@ -1,33 +1,32 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class PutGoalV11RequestMilestonesInner(BaseModel): + +class CreateGoalRequestMilestonesInner(BaseModel): + """ + CreateGoalRequestMilestonesInner """ - PutGoalV11RequestMilestonesInner - """ # noqa: E501 - title: Optional[StrictStr] = Field(default=None, description="The title of the milestone") - __properties: ClassVar[List[str]] = ["title"] + + title: StrictStr | None = Field(default=None, description="The title of the milestone") + __properties: ClassVar[list[str]] = ["title"] model_config = ConfigDict( populate_by_name=True, @@ -35,7 +34,6 @@ class PutGoalV11RequestMilestonesInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -46,11 +44,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PutGoalV11RequestMilestonesInner from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreateGoalRequestMilestonesInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -60,8 +58,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,17 +68,13 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PutGoalV11RequestMilestonesInner from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreateGoalRequestMilestonesInner from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "title": obj.get("title") - }) + _obj = cls.model_validate({"title": obj.get("title")}) return _obj - - diff --git a/bamboohr_sdk/models/create_job_opening_response.py b/bamboohr_sdk/models/create_job_opening_response.py index fb3b9bf..24ffcb3 100644 --- a/bamboohr_sdk/models/create_job_opening_response.py +++ b/bamboohr_sdk/models/create_job_opening_response.py @@ -1,34 +1,35 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CreateJobOpeningResponse(BaseModel): """ CreateJobOpeningResponse - """ # noqa: E501 - result: Optional[StrictStr] = Field(default=None, description="Always 'success' on a successful request") - job_opening_id: Optional[StrictStr] = Field(default=None, description="The ID of the newly created job opening", alias="jobOpeningId") - __properties: ClassVar[List[str]] = ["result", "jobOpeningId"] + """ + + result: StrictStr | None = Field(default=None, description="Always 'success' on a successful request") + job_opening_id: StrictStr | None = Field( + default=None, description="The ID of the newly created job opening", alias="jobOpeningId" + ) + __properties: ClassVar[list[str]] = ["result", "jobOpeningId"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +37,6 @@ class CreateJobOpeningResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +47,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CreateJobOpeningResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CreateJobOpeningResponse from a dict""" if obj is None: return None @@ -80,10 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "result": obj.get("result"), - "jobOpeningId": obj.get("jobOpeningId") - }) + _obj = cls.model_validate({"result": obj.get("result"), "jobOpeningId": obj.get("jobOpeningId")}) return _obj - - diff --git a/bamboohr_sdk/models/create_location_request.py b/bamboohr_sdk/models/create_location_request.py new file mode 100644 index 0000000..281e290 --- /dev/null +++ b/bamboohr_sdk/models/create_location_request.py @@ -0,0 +1,95 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.create_location_request_address import CreateLocationRequestAddress + + +class CreateLocationRequest(BaseModel): + """ + CreateLocationRequest + """ + + label: StrictStr = Field(description="Display name for the location") + archived: StrictBool | None = Field(default=False, description="Whether the location is archived") + address: CreateLocationRequestAddress + __properties: ClassVar[list[str]] = ["label", "archived", "address"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreateLocationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of address + if self.address: + _dict["address"] = self.address.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreateLocationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "label": obj.get("label"), + "archived": obj.get("archived") if obj.get("archived") is not None else False, + "address": CreateLocationRequestAddress.from_dict(obj["address"]) + if obj.get("address") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/create_location_request_address.py b/bamboohr_sdk/models/create_location_request_address.py new file mode 100644 index 0000000..2174254 --- /dev/null +++ b/bamboohr_sdk/models/create_location_request_address.py @@ -0,0 +1,147 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing_extensions import Self + + +class CreateLocationRequestAddress(BaseModel): + """ + Address details for the location. When remoteLocation is true, none are required and must be null or omitted + """ + + address1: StrictStr | None = None + address2: StrictStr | None = None + city: StrictStr | None = None + state_id: StrictStr | None = Field(default=None, alias="stateId") + zipcode: StrictStr | None = None + country_id: StrictStr | None = Field(default=None, alias="countryId") + timezone: StrictStr | None = None + remote_location: StrictBool | None = Field(alias="remoteLocation") + __properties: ClassVar[list[str]] = [ + "address1", + "address2", + "city", + "stateId", + "zipcode", + "countryId", + "timezone", + "remoteLocation", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreateLocationRequestAddress from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if address1 (nullable) is None + # and model_fields_set contains the field + if self.address1 is None and "address1" in self.model_fields_set: + _dict["address1"] = None + + # set to None if address2 (nullable) is None + # and model_fields_set contains the field + if self.address2 is None and "address2" in self.model_fields_set: + _dict["address2"] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict["city"] = None + + # set to None if state_id (nullable) is None + # and model_fields_set contains the field + if self.state_id is None and "state_id" in self.model_fields_set: + _dict["stateId"] = None + + # set to None if zipcode (nullable) is None + # and model_fields_set contains the field + if self.zipcode is None and "zipcode" in self.model_fields_set: + _dict["zipcode"] = None + + # set to None if country_id (nullable) is None + # and model_fields_set contains the field + if self.country_id is None and "country_id" in self.model_fields_set: + _dict["countryId"] = None + + # set to None if timezone (nullable) is None + # and model_fields_set contains the field + if self.timezone is None and "timezone" in self.model_fields_set: + _dict["timezone"] = None + + # set to None if remote_location (nullable) is None + # and model_fields_set contains the field + if self.remote_location is None and "remote_location" in self.model_fields_set: + _dict["remoteLocation"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreateLocationRequestAddress from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "address1": obj.get("address1"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "stateId": obj.get("stateId"), + "zipcode": obj.get("zipcode"), + "countryId": obj.get("countryId"), + "timezone": obj.get("timezone"), + "remoteLocation": obj.get("remoteLocation"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/create_training_category_request.py b/bamboohr_sdk/models/create_training_category_request.py index 8017844..65e6ab6 100644 --- a/bamboohr_sdk/models/create_training_category_request.py +++ b/bamboohr_sdk/models/create_training_category_request.py @@ -1,33 +1,32 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set from typing_extensions import Self + class CreateTrainingCategoryRequest(BaseModel): """ CreateTrainingCategoryRequest - """ # noqa: E501 + """ + name: StrictStr = Field(description="Name of the new training category.") - __properties: ClassVar[List[str]] = ["name"] + __properties: ClassVar[list[str]] = ["name"] model_config = ConfigDict( populate_by_name=True, @@ -35,7 +34,6 @@ class CreateTrainingCategoryRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -46,11 +44,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CreateTrainingCategoryRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -60,8 +58,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,7 +68,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CreateTrainingCategoryRequest from a dict""" if obj is None: return None @@ -79,9 +76,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name") - }) + _obj = cls.model_validate({"name": obj.get("name")}) return _obj - - diff --git a/bamboohr_sdk/models/create_training_type_request.py b/bamboohr_sdk/models/create_training_type_request.py index 4b2c8d0..8d85111 100644 --- a/bamboohr_sdk/models/create_training_type_request.py +++ b/bamboohr_sdk/models/create_training_type_request.py @@ -1,43 +1,68 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.create_training_type_request_category import CreateTrainingTypeRequestCategory -from bamboohr_sdk.models.create_training_type_request_due_from_hire_date import CreateTrainingTypeRequestDueFromHireDate -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.create_training_type_request_category import CreateTrainingTypeRequestCategory + + class CreateTrainingTypeRequest(BaseModel): """ CreateTrainingTypeRequest - """ # noqa: E501 + """ + name: StrictStr = Field(description="Name of the new training type.") - frequency: Optional[StrictInt] = Field(default=None, description="The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable.") - renewable: Optional[StrictBool] = Field(default=None, description="Renewable is optional but if you are setting it to true you must pass a frequency which is the months between renewals.") - category: Optional[CreateTrainingTypeRequestCategory] = None - required: Optional[StrictBool] = Field(default=None, description="Is this a required training?") - due_from_hire_date: Optional[CreateTrainingTypeRequestDueFromHireDate] = Field(default=None, alias="dueFromHireDate") - link_url: Optional[StrictStr] = Field(default=None, description="Optional URL that can be included with a training.", alias="linkUrl") - description: Optional[StrictStr] = Field(default=None, description="Description for the training.") - allow_employees_to_mark_complete: Optional[StrictBool] = Field(default=None, description="Allows all employees who can view the training to be able to mark it complete.", alias="allowEmployeesToMarkComplete") - __properties: ClassVar[List[str]] = ["name", "frequency", "renewable", "category", "required", "dueFromHireDate", "linkUrl", "description", "allowEmployeesToMarkComplete"] + frequency: StrictInt | None = Field( + default=None, + description="The frequency is the (optional) amount of months between renewing trainings. Not valid if training are not renewable.", + ) + renewable: StrictBool | None = Field( + default=None, + description="Renewable is optional but if you are setting it to true you must pass a frequency which is the months between renewals.", + ) + category: CreateTrainingTypeRequestCategory | None = None + required: StrictBool | None = Field(default=None, description="Is this a required training?") + due_from_hire_date: StrictInt | None = Field( + default=None, + description="Number of days before the training is due for new hires. Not valid unless training is required.", + alias="dueFromHireDate", + ) + link_url: StrictStr | None = Field( + default=None, description="Optional URL that can be included with a training.", alias="linkUrl" + ) + description: StrictStr | None = Field(default=None, description="Description for the training.") + allow_employees_to_mark_complete: StrictBool | None = Field( + default=None, + description="Allows all employees who can view the training to be able to mark it complete.", + alias="allowEmployeesToMarkComplete", + ) + __properties: ClassVar[list[str]] = [ + "name", + "frequency", + "renewable", + "category", + "required", + "dueFromHireDate", + "linkUrl", + "description", + "allowEmployeesToMarkComplete", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +70,6 @@ class CreateTrainingTypeRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -56,11 +80,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CreateTrainingTypeRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -70,8 +94,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,14 +103,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of category if self.category: - _dict['category'] = self.category.to_dict() - # override the default output from pydantic by calling `to_dict()` of due_from_hire_date - if self.due_from_hire_date: - _dict['dueFromHireDate'] = self.due_from_hire_date.to_dict() + _dict["category"] = self.category.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CreateTrainingTypeRequest from a dict""" if obj is None: return None @@ -95,17 +115,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "frequency": obj.get("frequency"), - "renewable": obj.get("renewable"), - "category": CreateTrainingTypeRequestCategory.from_dict(obj["category"]) if obj.get("category") is not None else None, - "required": obj.get("required"), - "dueFromHireDate": CreateTrainingTypeRequestDueFromHireDate.from_dict(obj["dueFromHireDate"]) if obj.get("dueFromHireDate") is not None else None, - "linkUrl": obj.get("linkUrl"), - "description": obj.get("description"), - "allowEmployeesToMarkComplete": obj.get("allowEmployeesToMarkComplete") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "frequency": obj.get("frequency"), + "renewable": obj.get("renewable"), + "category": CreateTrainingTypeRequestCategory.from_dict(obj["category"]) + if obj.get("category") is not None + else None, + "required": obj.get("required"), + "dueFromHireDate": obj.get("dueFromHireDate"), + "linkUrl": obj.get("linkUrl"), + "description": obj.get("description"), + "allowEmployeesToMarkComplete": obj.get("allowEmployeesToMarkComplete"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/create_training_type_request_category.py b/bamboohr_sdk/models/create_training_type_request_category.py index 08184c5..5f1f3fe 100644 --- a/bamboohr_sdk/models/create_training_type_request_category.py +++ b/bamboohr_sdk/models/create_training_type_request_category.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CreateTrainingTypeRequestCategory(BaseModel): """ The category is optional and you can pass either a category id or a category name. - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Category ID") - name: Optional[StrictStr] = Field(default=None, description="Category Name") - __properties: ClassVar[List[str]] = ["id", "name"] + """ + + id: StrictInt | None = Field(default=None, description="Category ID") + name: StrictStr | None = Field(default=None, description="Category Name") + __properties: ClassVar[list[str]] = ["id", "name"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class CreateTrainingTypeRequestCategory(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CreateTrainingTypeRequestCategory from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CreateTrainingTypeRequestCategory from a dict""" if obj is None: return None @@ -80,10 +77,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name") - }) + _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name")}) return _obj - - diff --git a/bamboohr_sdk/models/create_training_type_request_due_from_hire_date.py b/bamboohr_sdk/models/create_training_type_request_due_from_hire_date.py deleted file mode 100644 index 0751178..0000000 --- a/bamboohr_sdk/models/create_training_type_request_due_from_hire_date.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from bamboohr_sdk.models.create_training_type_request_due_from_hire_date_one_of import CreateTrainingTypeRequestDueFromHireDateOneOf -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -CREATETRAININGTYPEREQUESTDUEFROMHIREDATE_ONE_OF_SCHEMAS = ["CreateTrainingTypeRequestDueFromHireDateOneOf", "int"] - -class CreateTrainingTypeRequestDueFromHireDate(BaseModel): - """ - Days before the training is due for new hires (only valid when required is true). Accepts an integer number of days or an object with 'unit' and 'amount'. - """ - # data type: int - oneof_schema_1_validator: Optional[StrictInt] = Field(default=None, description="Number of days, e.g. 30") - # data type: CreateTrainingTypeRequestDueFromHireDateOneOf - oneof_schema_2_validator: Optional[CreateTrainingTypeRequestDueFromHireDateOneOf] = None - actual_instance: Optional[Union[CreateTrainingTypeRequestDueFromHireDateOneOf, int]] = None - one_of_schemas: Set[str] = { "CreateTrainingTypeRequestDueFromHireDateOneOf", "int" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = CreateTrainingTypeRequestDueFromHireDate.model_construct() - error_messages = [] - match = 0 - # validate data type: int - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: CreateTrainingTypeRequestDueFromHireDateOneOf - if not isinstance(v, CreateTrainingTypeRequestDueFromHireDateOneOf): - error_messages.append(f"Error! Input type `{type(v)}` is not `CreateTrainingTypeRequestDueFromHireDateOneOf`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in CreateTrainingTypeRequestDueFromHireDate with oneOf schemas: CreateTrainingTypeRequestDueFromHireDateOneOf, int. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in CreateTrainingTypeRequestDueFromHireDate with oneOf schemas: CreateTrainingTypeRequestDueFromHireDateOneOf, int. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into int - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into CreateTrainingTypeRequestDueFromHireDateOneOf - try: - instance.actual_instance = CreateTrainingTypeRequestDueFromHireDateOneOf.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into CreateTrainingTypeRequestDueFromHireDate with oneOf schemas: CreateTrainingTypeRequestDueFromHireDateOneOf, int. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into CreateTrainingTypeRequestDueFromHireDate with oneOf schemas: CreateTrainingTypeRequestDueFromHireDateOneOf, int. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], CreateTrainingTypeRequestDueFromHireDateOneOf, int]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/bamboohr_sdk/models/create_webhook_bad_request_response.py b/bamboohr_sdk/models/create_webhook_bad_request_response.py index d0debe7..fa659c6 100644 --- a/bamboohr_sdk/models/create_webhook_bad_request_response.py +++ b/bamboohr_sdk/models/create_webhook_bad_request_response.py @@ -1,47 +1,46 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional +from typing import Any + +from pydantic import BaseModel, ConfigDict, ValidationError, field_validator +from typing_extensions import Self + from bamboohr_sdk.models.webhook_bad_request import WebhookBadRequest from bamboohr_sdk.models.webhook_error import WebhookError -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self CREATEWEBHOOKBADREQUESTRESPONSE_ONE_OF_SCHEMAS = ["WebhookBadRequest", "WebhookError"] + class CreateWebhookBadRequestResponse(BaseModel): """ CreateWebhookBadRequestResponse """ + # data type: WebhookBadRequest - oneof_schema_1_validator: Optional[WebhookBadRequest] = None + oneof_schema_1_validator: WebhookBadRequest | None = None # data type: WebhookError - oneof_schema_2_validator: Optional[WebhookError] = None - actual_instance: Optional[Union[WebhookBadRequest, WebhookError]] = None - one_of_schemas: Set[str] = { "WebhookBadRequest", "WebhookError" } + oneof_schema_2_validator: WebhookError | None = None + actual_instance: WebhookBadRequest | WebhookError | None = None + one_of_schemas: set[str] = {"WebhookBadRequest", "WebhookError"} model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), ) - def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -52,7 +51,7 @@ def __init__(self, *args, **kwargs) -> None: else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_oneof(cls, v): instance = CreateWebhookBadRequestResponse.model_construct() error_messages = [] @@ -69,15 +68,21 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in CreateWebhookBadRequestResponse with oneOf schemas: WebhookBadRequest, WebhookError. Details: " + ", ".join(error_messages)) + raise ValueError( + "Multiple matches found when setting `actual_instance` in CreateWebhookBadRequestResponse with oneOf schemas: WebhookBadRequest, WebhookError. Details: " + + ", ".join(error_messages) + ) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in CreateWebhookBadRequestResponse with oneOf schemas: WebhookBadRequest, WebhookError. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting `actual_instance` in CreateWebhookBadRequestResponse with oneOf schemas: WebhookBadRequest, WebhookError. Details: " + + ", ".join(error_messages) + ) else: return v @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + def from_dict(cls, obj: str | dict[str, Any]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -102,10 +107,16 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into CreateWebhookBadRequestResponse with oneOf schemas: WebhookBadRequest, WebhookError. Details: " + ", ".join(error_messages)) + raise ValueError( + "Multiple matches found when deserializing the JSON string into CreateWebhookBadRequestResponse with oneOf schemas: WebhookBadRequest, WebhookError. Details: " + + ", ".join(error_messages) + ) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into CreateWebhookBadRequestResponse with oneOf schemas: WebhookBadRequest, WebhookError. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into CreateWebhookBadRequestResponse with oneOf schemas: WebhookBadRequest, WebhookError. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -119,7 +130,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], WebhookBadRequest, WebhookError]]: + def to_dict(self) -> dict[str, Any] | WebhookBadRequest | WebhookError | None: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None @@ -133,5 +144,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], WebhookBadRequest, WebhookEr def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/bamboohr_sdk/models/created_compensation_benchmark.py b/bamboohr_sdk/models/created_compensation_benchmark.py new file mode 100644 index 0000000..cbc6508 --- /dev/null +++ b/bamboohr_sdk/models/created_compensation_benchmark.py @@ -0,0 +1,100 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.created_compensation_benchmark_saved_benchmark import ( + CreatedCompensationBenchmarkSavedBenchmark, +) + + +class CreatedCompensationBenchmark(BaseModel): + """ + CreatedCompensationBenchmark + """ + + saved_benchmark: CreatedCompensationBenchmarkSavedBenchmark | None = Field(default=None, alias="savedBenchmark") + message: StrictStr | None = None + __properties: ClassVar[list[str]] = ["savedBenchmark", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreatedCompensationBenchmark from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of saved_benchmark + if self.saved_benchmark: + _dict["savedBenchmark"] = self.saved_benchmark.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict["message"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreatedCompensationBenchmark from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "savedBenchmark": CreatedCompensationBenchmarkSavedBenchmark.from_dict(obj["savedBenchmark"]) + if obj.get("savedBenchmark") is not None + else None, + "message": obj.get("message"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/created_compensation_benchmark_saved_benchmark.py b/bamboohr_sdk/models/created_compensation_benchmark_saved_benchmark.py new file mode 100644 index 0000000..099b22f --- /dev/null +++ b/bamboohr_sdk/models/created_compensation_benchmark_saved_benchmark.py @@ -0,0 +1,249 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + + +class CreatedCompensationBenchmarkSavedBenchmark(BaseModel): + """ + CreatedCompensationBenchmarkSavedBenchmark + """ + + id: StrictStr | None = None + job_title_id: StrictStr | None = Field(default=None, alias="jobTitleId") + job_location_id: StrictStr | None = Field(default=None, alias="jobLocationId") + mercer_job_code: StrictStr | None = Field(default=None, alias="mercerJobCode") + benchmark_source: StrictStr | None = Field(default=None, alias="benchmarkSource") + currency_code: StrictStr | None = Field(default=None, alias="currencyCode") + benchmark_value: StrictFloat | StrictInt | None = Field(default=None, alias="benchmarkValue") + benchmark_min: StrictFloat | StrictInt | None = Field(default=None, alias="benchmarkMin") + benchmark_max: StrictFloat | StrictInt | None = Field(default=None, alias="benchmarkMax") + external_job_title: StrictStr | None = Field(default=None, alias="externalJobTitle") + external_location: StrictStr | None = Field(default=None, alias="externalLocation") + external_level: StrictStr | None = Field(default=None, alias="externalLevel") + external_job_description: StrictStr | None = Field(default=None, alias="externalJobDescription") + companies_surveyed: StrictInt | None = Field(default=None, alias="companiesSurveyed") + employees_surveyed: StrictInt | None = Field(default=None, alias="employeesSurveyed") + source_id: StrictStr | None = Field(default=None, alias="sourceId") + source_date: StrictStr | None = Field(default=None, alias="sourceDate") + data_year: StrictStr | None = Field(default=None, alias="dataYear") + external_country: StrictStr | None = Field(default=None, alias="externalCountry") + external_secondary_location: StrictStr | None = Field(default=None, alias="externalSecondaryLocation") + external_company_size: StrictStr | None = Field(default=None, alias="externalCompanySize") + external_industry: StrictStr | None = Field(default=None, alias="externalIndustry") + __properties: ClassVar[list[str]] = [ + "id", + "jobTitleId", + "jobLocationId", + "mercerJobCode", + "benchmarkSource", + "currencyCode", + "benchmarkValue", + "benchmarkMin", + "benchmarkMax", + "externalJobTitle", + "externalLocation", + "externalLevel", + "externalJobDescription", + "companiesSurveyed", + "employeesSurveyed", + "sourceId", + "sourceDate", + "dataYear", + "externalCountry", + "externalSecondaryLocation", + "externalCompanySize", + "externalIndustry", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreatedCompensationBenchmarkSavedBenchmark from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if job_location_id (nullable) is None + # and model_fields_set contains the field + if self.job_location_id is None and "job_location_id" in self.model_fields_set: + _dict["jobLocationId"] = None + + # set to None if mercer_job_code (nullable) is None + # and model_fields_set contains the field + if self.mercer_job_code is None and "mercer_job_code" in self.model_fields_set: + _dict["mercerJobCode"] = None + + # set to None if benchmark_source (nullable) is None + # and model_fields_set contains the field + if self.benchmark_source is None and "benchmark_source" in self.model_fields_set: + _dict["benchmarkSource"] = None + + # set to None if currency_code (nullable) is None + # and model_fields_set contains the field + if self.currency_code is None and "currency_code" in self.model_fields_set: + _dict["currencyCode"] = None + + # set to None if benchmark_value (nullable) is None + # and model_fields_set contains the field + if self.benchmark_value is None and "benchmark_value" in self.model_fields_set: + _dict["benchmarkValue"] = None + + # set to None if benchmark_min (nullable) is None + # and model_fields_set contains the field + if self.benchmark_min is None and "benchmark_min" in self.model_fields_set: + _dict["benchmarkMin"] = None + + # set to None if benchmark_max (nullable) is None + # and model_fields_set contains the field + if self.benchmark_max is None and "benchmark_max" in self.model_fields_set: + _dict["benchmarkMax"] = None + + # set to None if external_job_title (nullable) is None + # and model_fields_set contains the field + if self.external_job_title is None and "external_job_title" in self.model_fields_set: + _dict["externalJobTitle"] = None + + # set to None if external_location (nullable) is None + # and model_fields_set contains the field + if self.external_location is None and "external_location" in self.model_fields_set: + _dict["externalLocation"] = None + + # set to None if external_level (nullable) is None + # and model_fields_set contains the field + if self.external_level is None and "external_level" in self.model_fields_set: + _dict["externalLevel"] = None + + # set to None if external_job_description (nullable) is None + # and model_fields_set contains the field + if self.external_job_description is None and "external_job_description" in self.model_fields_set: + _dict["externalJobDescription"] = None + + # set to None if companies_surveyed (nullable) is None + # and model_fields_set contains the field + if self.companies_surveyed is None and "companies_surveyed" in self.model_fields_set: + _dict["companiesSurveyed"] = None + + # set to None if employees_surveyed (nullable) is None + # and model_fields_set contains the field + if self.employees_surveyed is None and "employees_surveyed" in self.model_fields_set: + _dict["employeesSurveyed"] = None + + # set to None if source_id (nullable) is None + # and model_fields_set contains the field + if self.source_id is None and "source_id" in self.model_fields_set: + _dict["sourceId"] = None + + # set to None if source_date (nullable) is None + # and model_fields_set contains the field + if self.source_date is None and "source_date" in self.model_fields_set: + _dict["sourceDate"] = None + + # set to None if data_year (nullable) is None + # and model_fields_set contains the field + if self.data_year is None and "data_year" in self.model_fields_set: + _dict["dataYear"] = None + + # set to None if external_country (nullable) is None + # and model_fields_set contains the field + if self.external_country is None and "external_country" in self.model_fields_set: + _dict["externalCountry"] = None + + # set to None if external_secondary_location (nullable) is None + # and model_fields_set contains the field + if self.external_secondary_location is None and "external_secondary_location" in self.model_fields_set: + _dict["externalSecondaryLocation"] = None + + # set to None if external_company_size (nullable) is None + # and model_fields_set contains the field + if self.external_company_size is None and "external_company_size" in self.model_fields_set: + _dict["externalCompanySize"] = None + + # set to None if external_industry (nullable) is None + # and model_fields_set contains the field + if self.external_industry is None and "external_industry" in self.model_fields_set: + _dict["externalIndustry"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreatedCompensationBenchmarkSavedBenchmark from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "jobTitleId": obj.get("jobTitleId"), + "jobLocationId": obj.get("jobLocationId"), + "mercerJobCode": obj.get("mercerJobCode"), + "benchmarkSource": obj.get("benchmarkSource"), + "currencyCode": obj.get("currencyCode"), + "benchmarkValue": obj.get("benchmarkValue"), + "benchmarkMin": obj.get("benchmarkMin"), + "benchmarkMax": obj.get("benchmarkMax"), + "externalJobTitle": obj.get("externalJobTitle"), + "externalLocation": obj.get("externalLocation"), + "externalLevel": obj.get("externalLevel"), + "externalJobDescription": obj.get("externalJobDescription"), + "companiesSurveyed": obj.get("companiesSurveyed"), + "employeesSurveyed": obj.get("employeesSurveyed"), + "sourceId": obj.get("sourceId"), + "sourceDate": obj.get("sourceDate"), + "dataYear": obj.get("dataYear"), + "externalCountry": obj.get("externalCountry"), + "externalSecondaryLocation": obj.get("externalSecondaryLocation"), + "externalCompanySize": obj.get("externalCompanySize"), + "externalIndustry": obj.get("externalIndustry"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/timesheet_entry_info_api_transformer_break_info.py b/bamboohr_sdk/models/created_compensation_benchmark_source.py similarity index 55% rename from bamboohr_sdk/models/timesheet_entry_info_api_transformer_break_info.py rename to bamboohr_sdk/models/created_compensation_benchmark_source.py index 11a9e86..f4c8bf9 100644 --- a/bamboohr_sdk/models/timesheet_entry_info_api_transformer_break_info.py +++ b/bamboohr_sdk/models/created_compensation_benchmark_source.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class TimesheetEntryInfoApiTransformerBreakInfo(BaseModel): + +class CreatedCompensationBenchmarkSource(BaseModel): """ - Break information - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Break ID") - name: Optional[StrictStr] = Field(default=None, description="Break name") - __properties: ClassVar[List[str]] = ["id", "name"] + CreatedCompensationBenchmarkSource + """ + + id: StrictInt | None = Field(default=None, description="ID of the newly created benchmark source.") + name: StrictStr | None = None + __properties: ClassVar[list[str]] = ["id", "name"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class TimesheetEntryInfoApiTransformerBreakInfo(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of TimesheetEntryInfoApiTransformerBreakInfo from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreatedCompensationBenchmarkSource from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,29 +59,28 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, exclude=excluded_fields, exclude_none=True, ) + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict["name"] = None + return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TimesheetEntryInfoApiTransformerBreakInfo from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreatedCompensationBenchmarkSource from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name") - }) + _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name")}) return _obj - - diff --git a/bamboohr_sdk/models/created_time_off_request.py b/bamboohr_sdk/models/created_time_off_request.py new file mode 100644 index 0000000..2f23349 --- /dev/null +++ b/bamboohr_sdk/models/created_time_off_request.py @@ -0,0 +1,214 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.created_time_off_request_amount import CreatedTimeOffRequestAmount +from bamboohr_sdk.models.created_time_off_request_notes import CreatedTimeOffRequestNotes +from bamboohr_sdk.models.created_time_off_request_status import CreatedTimeOffRequestStatus +from bamboohr_sdk.models.created_time_off_request_type import CreatedTimeOffRequestType +from bamboohr_sdk.models.employee_time_off_request_approver_response_inner import ( + EmployeeTimeOffRequestApproverResponseInner, +) + + +class CreatedTimeOffRequest(BaseModel): + """ + CreatedTimeOffRequest + """ + + id: StrictInt | None = Field( + default=None, + description="The newly created time off request ID. Use this to chain follow-up operations such as approving, canceling, or superseding the request.", + ) + employee_id: StrictInt | None = Field( + default=None, + description="The internal employee ID of the employee the request was created for.", + alias="employeeId", + ) + name: StrictStr | None = Field( + default=None, description="The employee's full name. Only present when the employee record could be loaded." + ) + start: date | None = Field(default=None, description="The start date of the request in YYYY-MM-DD format.") + end: date | None = Field(default=None, description="The end date of the request in YYYY-MM-DD format.") + created: date | None = Field( + default=None, description="The date the request was created in YYYY-MM-DD format (company timezone)." + ) + status: CreatedTimeOffRequestStatus | None = None + type: CreatedTimeOffRequestType | None = None + amount: CreatedTimeOffRequestAmount | None = None + dates: dict[str, StrictFloat | StrictInt | None] | None = Field( + default=None, + description="A map of dates (YYYY-MM-DD) to daily amounts. Only present when daily details were attached to the request.", + ) + notes: CreatedTimeOffRequestNotes | None = None + comments: list[dict[str, Any] | None] | None = Field( + default=None, + description="Comments attached to the request. Always present; empty array when no comments exist.", + ) + approvers: list[list[EmployeeTimeOffRequestApproverResponseInner]] | None = Field( + default=None, description="The approval chain for this request. Only present when the request has approvers." + ) + actions: dict[str, StrictBool | None] | None = Field( + default=None, + description="Actions the current user can perform on this request. Only present when PTO action permissions are available. Keys are restricted to `view`, `edit`, `cancel`, `approve`, `deny`, `bypass`; values are booleans.", + ) + overlapping_requests: list[dict[str, Any] | None] | None = Field( + default=None, + description="Other existing time off requests whose date ranges overlap this request. Only present when overlap data was loaded with the request.", + alias="overlappingRequests", + ) + policy_type: StrictStr | None = Field( + default=None, + description="The policy type backing this request (e.g. accruing, manual, unlimited).", + alias="policyType", + ) + used_year_to_date: StrictFloat | StrictInt | None = Field(default=None, alias="usedYearToDate") + balance_on_date_of_request: StrictFloat | StrictInt | None = Field(default=None, alias="balanceOnDateOfRequest") + __properties: ClassVar[list[str]] = [ + "id", + "employeeId", + "name", + "start", + "end", + "created", + "status", + "type", + "amount", + "dates", + "notes", + "comments", + "approvers", + "actions", + "overlappingRequests", + "policyType", + "usedYearToDate", + "balanceOnDateOfRequest", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreatedTimeOffRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of status + if self.status: + _dict["status"] = self.status.to_dict() + # override the default output from pydantic by calling `to_dict()` of type + if self.type: + _dict["type"] = self.type.to_dict() + # override the default output from pydantic by calling `to_dict()` of amount + if self.amount: + _dict["amount"] = self.amount.to_dict() + # override the default output from pydantic by calling `to_dict()` of notes + if self.notes: + _dict["notes"] = self.notes.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in approvers (list of list) + _items = [] + if self.approvers: + for _item_approvers in self.approvers: + if _item_approvers: + _items.append([_inner_item.to_dict() for _inner_item in _item_approvers if _inner_item is not None]) + _dict["approvers"] = _items + # set to None if used_year_to_date (nullable) is None + # and model_fields_set contains the field + if self.used_year_to_date is None and "used_year_to_date" in self.model_fields_set: + _dict["usedYearToDate"] = None + + # set to None if balance_on_date_of_request (nullable) is None + # and model_fields_set contains the field + if self.balance_on_date_of_request is None and "balance_on_date_of_request" in self.model_fields_set: + _dict["balanceOnDateOfRequest"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreatedTimeOffRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "employeeId": obj.get("employeeId"), + "name": obj.get("name"), + "start": obj.get("start"), + "end": obj.get("end"), + "created": obj.get("created"), + "status": CreatedTimeOffRequestStatus.from_dict(obj["status"]) + if obj.get("status") is not None + else None, + "type": CreatedTimeOffRequestType.from_dict(obj["type"]) if obj.get("type") is not None else None, + "amount": CreatedTimeOffRequestAmount.from_dict(obj["amount"]) + if obj.get("amount") is not None + else None, + "dates": obj.get("dates"), + "notes": CreatedTimeOffRequestNotes.from_dict(obj["notes"]) if obj.get("notes") is not None else None, + "comments": obj.get("comments"), + "approvers": [ + [EmployeeTimeOffRequestApproverResponseInner.from_dict(_inner_item) for _inner_item in _item] + for _item in obj["approvers"] + ] + if obj.get("approvers") is not None + else None, + "actions": obj.get("actions"), + "overlappingRequests": obj.get("overlappingRequests"), + "policyType": obj.get("policyType"), + "usedYearToDate": obj.get("usedYearToDate"), + "balanceOnDateOfRequest": obj.get("balanceOnDateOfRequest"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/created_time_off_request_amount.py b/bamboohr_sdk/models/created_time_off_request_amount.py new file mode 100644 index 0000000..3aadd3c --- /dev/null +++ b/bamboohr_sdk/models/created_time_off_request_amount.py @@ -0,0 +1,91 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing_extensions import Self + + +class CreatedTimeOffRequestAmount(BaseModel): + """ + The amount of time off requested. Only present when the underlying time off type record could be loaded. + """ + + unit: StrictStr | None = Field(default=None, description="The unit of measurement.") + amount: StrictFloat | StrictInt | None = Field(default=None, description="The total amount requested.") + __properties: ClassVar[list[str]] = ["unit", "amount"] + + @field_validator("unit") + def unit_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["hours", "days"]): + raise ValueError("must be one of enum values ('hours', 'days')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreatedTimeOffRequestAmount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreatedTimeOffRequestAmount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"unit": obj.get("unit"), "amount": obj.get("amount")}) + return _obj diff --git a/bamboohr_sdk/models/created_time_off_request_notes.py b/bamboohr_sdk/models/created_time_off_request_notes.py new file mode 100644 index 0000000..455e7e7 --- /dev/null +++ b/bamboohr_sdk/models/created_time_off_request_notes.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class CreatedTimeOffRequestNotes(BaseModel): + """ + Notes from employee and/or manager. The object is always present; the `employee` and `manager` keys are each included only when a non-empty note was provided. + """ + + employee: StrictStr | None = Field(default=None, description="Note from the employee.") + manager: StrictStr | None = Field(default=None, description="Note from the manager.") + __properties: ClassVar[list[str]] = ["employee", "manager"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreatedTimeOffRequestNotes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreatedTimeOffRequestNotes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"employee": obj.get("employee"), "manager": obj.get("manager")}) + return _obj diff --git a/bamboohr_sdk/models/created_time_off_request_status.py b/bamboohr_sdk/models/created_time_off_request_status.py new file mode 100644 index 0000000..4e953f4 --- /dev/null +++ b/bamboohr_sdk/models/created_time_off_request_status.py @@ -0,0 +1,96 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + + +class CreatedTimeOffRequestStatus(BaseModel): + """ + The current status of the request. + """ + + status: StrictStr | None = Field( + default=None, description="The current status value (e.g. `approved`, `denied`, `requested`)." + ) + last_changed: StrictStr | None = Field( + default=None, + description="The date and time the status was last changed, formatted as `YYYY-MM-DD HH:MM:SS` in the company timezone.", + alias="lastChanged", + ) + last_changed_by_user_id: StrictInt | None = Field( + default=None, description="The user ID who last changed the status.", alias="lastChangedByUserId" + ) + __properties: ClassVar[list[str]] = ["status", "lastChanged", "lastChangedByUserId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreatedTimeOffRequestStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreatedTimeOffRequestStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "status": obj.get("status"), + "lastChanged": obj.get("lastChanged"), + "lastChangedByUserId": obj.get("lastChangedByUserId"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/project_info_api_transformer_task.py b/bamboohr_sdk/models/created_time_off_request_type.py similarity index 56% rename from bamboohr_sdk/models/project_info_api_transformer_task.py rename to bamboohr_sdk/models/created_time_off_request_type.py index 42d8148..3e480e5 100644 --- a/bamboohr_sdk/models/project_info_api_transformer_task.py +++ b/bamboohr_sdk/models/created_time_off_request_type.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class ProjectInfoApiTransformerTask(BaseModel): + +class CreatedTimeOffRequestType(BaseModel): + """ + The time off type for this request. Only present when the underlying time off type record could be loaded. """ - Task information - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Task ID") - name: Optional[StrictStr] = Field(default=None, description="Task name") - __properties: ClassVar[List[str]] = ["id", "name"] + + id: StrictInt | None = Field(default=None, description="The time off type ID.") + name: StrictStr | None = Field(default=None, description="The time off type name.") + __properties: ClassVar[list[str]] = ["id", "name"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class ProjectInfoApiTransformerTask(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ProjectInfoApiTransformerTask from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CreatedTimeOffRequestType from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,18 +69,13 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ProjectInfoApiTransformerTask from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CreatedTimeOffRequestType from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name") - }) + _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name")}) return _obj - - diff --git a/bamboohr_sdk/models/currency_conversions_response.py b/bamboohr_sdk/models/currency_conversions_response.py new file mode 100644 index 0000000..1802dcf --- /dev/null +++ b/bamboohr_sdk/models/currency_conversions_response.py @@ -0,0 +1,100 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import datetime +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + + +class CurrencyConversionsResponse(BaseModel): + """ + CurrencyConversionsResponse + """ + + base_currency: StrictStr | None = Field( + default=None, description="ISO 4217 base currency code the rates are relative to", alias="baseCurrency" + ) + last_updated: datetime | None = Field( + default=None, description="ISO 8601 UTC timestamp of the last rate update", alias="lastUpdated" + ) + next_update: datetime | None = Field( + default=None, description="ISO 8601 UTC timestamp of the next scheduled rate update", alias="nextUpdate" + ) + rates: dict[str, StrictFloat | StrictInt | None] | None = Field( + default=None, + description="Map of ISO 4217 currency codes to conversion rates relative to the base currency, returned as JSON numbers. The base currency maps to 1.", + ) + __properties: ClassVar[list[str]] = ["baseCurrency", "lastUpdated", "nextUpdate", "rates"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CurrencyConversionsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CurrencyConversionsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "baseCurrency": obj.get("baseCurrency"), + "lastUpdated": obj.get("lastUpdated"), + "nextUpdate": obj.get("nextUpdate"), + "rates": obj.get("rates"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/cursor_paged_response_metadata.py b/bamboohr_sdk/models/cursor_paged_response_metadata.py index 7ebf2b3..7f8ee25 100644 --- a/bamboohr_sdk/models/cursor_paged_response_metadata.py +++ b/bamboohr_sdk/models/cursor_paged_response_metadata.py @@ -1,35 +1,35 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List -from bamboohr_sdk.models.cursor_pages_response import CursorPagesResponse -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.cursor_pages_response import CursorPagesResponse + + class CursorPagedResponseMetadata(BaseModel): """ Metadata information for employee list responses including total count and pagination details - """ # noqa: E501 + """ + total: StrictInt = Field(description="Total number of employees matching the filter criteria") page: CursorPagesResponse = Field(description="Pagination information for the current response") - __properties: ClassVar[List[str]] = ["total", "page"] + __properties: ClassVar[list[str]] = ["total", "page"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +37,6 @@ class CursorPagedResponseMetadata(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +47,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CursorPagedResponseMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,11 +70,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of page if self.page: - _dict['page'] = self.page.to_dict() + _dict["page"] = self.page.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CursorPagedResponseMetadata from a dict""" if obj is None: return None @@ -84,10 +82,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "total": obj.get("total"), - "page": CursorPagesResponse.from_dict(obj["page"]) if obj.get("page") is not None else None - }) + _obj = cls.model_validate( + { + "total": obj.get("total"), + "page": CursorPagesResponse.from_dict(obj["page"]) if obj.get("page") is not None else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/cursor_pages_response.py b/bamboohr_sdk/models/cursor_pages_response.py index da29323..ed01ab3 100644 --- a/bamboohr_sdk/models/cursor_pages_response.py +++ b/bamboohr_sdk/models/cursor_pages_response.py @@ -1,35 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class CursorPagesResponse(BaseModel): """ Pagination information for employee list responses including limit and cursor-based navigation - """ # noqa: E501 - limit: Optional[StrictInt] = Field(description="Maximum number of items per page") - next_cursor: Optional[StrictStr] = Field(description="Cursor for the next page of results, null if no more pages. This should be used with the after pagination parameter.", alias="nextCursor") - prev_cursor: Optional[StrictStr] = Field(description="Cursor for the previous page of results, null if on first page. This should be used with the before pagination parameter.", alias="prevCursor") - __properties: ClassVar[List[str]] = ["limit", "nextCursor", "prevCursor"] + """ + + limit: StrictInt | None + next_cursor: StrictStr | None = Field(alias="nextCursor") + prev_cursor: StrictStr | None = Field(alias="prevCursor") + __properties: ClassVar[list[str]] = ["limit", "nextCursor", "prevCursor"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +36,6 @@ class CursorPagesResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of CursorPagesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,22 +70,22 @@ def to_dict(self) -> Dict[str, Any]: # set to None if limit (nullable) is None # and model_fields_set contains the field if self.limit is None and "limit" in self.model_fields_set: - _dict['limit'] = None + _dict["limit"] = None # set to None if next_cursor (nullable) is None # and model_fields_set contains the field if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['nextCursor'] = None + _dict["nextCursor"] = None # set to None if prev_cursor (nullable) is None # and model_fields_set contains the field if self.prev_cursor is None and "prev_cursor" in self.model_fields_set: - _dict['prevCursor'] = None + _dict["prevCursor"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of CursorPagesResponse from a dict""" if obj is None: return None @@ -96,11 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "limit": obj.get("limit"), - "nextCursor": obj.get("nextCursor"), - "prevCursor": obj.get("prevCursor") - }) + _obj = cls.model_validate( + {"limit": obj.get("limit"), "nextCursor": obj.get("nextCursor"), "prevCursor": obj.get("prevCursor")} + ) return _obj - - diff --git a/bamboohr_sdk/models/cursor_pagination_query_object.py b/bamboohr_sdk/models/cursor_pagination_query_object.py deleted file mode 100644 index c02f1ad..0000000 --- a/bamboohr_sdk/models/cursor_pagination_query_object.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class CursorPaginationQueryObject(BaseModel): - """ - CursorPaginationQueryObject - """ # noqa: E501 - before: Optional[StrictStr] = Field(default=None, description="Cursor pointing to the start of the previous page. Use the `prevCursor` value from the last response to paginate backward.") - after: Optional[StrictStr] = Field(default=None, description="Cursor pointing to the start of the next page. Use the `nextCursor` value from the last response to paginate forward.") - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = Field(default=50, description="Maximum number of items to return. This can be at most 100.") - __properties: ClassVar[List[str]] = ["before", "after", "limit"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CursorPaginationQueryObject from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CursorPaginationQueryObject from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "before": obj.get("before"), - "after": obj.get("after"), - "limit": obj.get("limit") if obj.get("limit") is not None else 50 - }) - return _obj - - diff --git a/bamboohr_sdk/models/custom_field_definition_response_object.py b/bamboohr_sdk/models/custom_field_definition_response_object.py new file mode 100644 index 0000000..7a9546b --- /dev/null +++ b/bamboohr_sdk/models/custom_field_definition_response_object.py @@ -0,0 +1,234 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.custom_field_definition_response_object_values_inner import ( + CustomFieldDefinitionResponseObjectValuesInner, +) + + +class CustomFieldDefinitionResponseObject(BaseModel): + """ + CustomFieldDefinitionResponseObject + """ + + id: StrictStr | None = Field(default=None, description="The string custom field or custom table ID.") + legacy_id: StrictInt | None = Field( + default=None, description="The legacy numeric custom field or custom table ID.", alias="legacyId" + ) + name: StrictStr | None = Field(default=None, description="The custom field or custom table name.") + type: StrictStr | None = Field(default=None, description="The custom field or custom table type.") + is_encrypted: StrictBool | None = Field( + default=None, description="Whether the custom field is encrypted.", alias="isEncrypted" + ) + is_calculated: StrictBool | None = Field( + default=None, description="Whether the custom field is calculated.", alias="isCalculated" + ) + is_required: StrictBool | None = Field( + default=None, description="Whether the custom field is required.", alias="isRequired" + ) + order: StrictInt | None = None + page_id: StrictStr | None = Field(default=None, alias="pageId") + page_legacy_id: StrictInt | None = Field(default=None, alias="pageLegacyId") + section_id: StrictStr | None = Field(default=None, alias="sectionId") + section_legacy_id: StrictInt | None = Field(default=None, alias="sectionLegacyId") + custom_table_id: StrictStr | None = Field(default=None, alias="customTableId") + custom_table_legacy_id: StrictInt | None = Field(default=None, alias="customTableLegacyId") + sort_order_direction: StrictStr | None = Field(default=None, alias="sortOrderDirection") + summarize: StrictStr | None = None + sort_field: StrictBool | None = Field(default=None, alias="sortField") + values: list[CustomFieldDefinitionResponseObjectValuesInner] | None = None + fields: list[CustomFieldDefinitionResponseObject] | None = None + __properties: ClassVar[list[str]] = [ + "id", + "legacyId", + "name", + "type", + "isEncrypted", + "isCalculated", + "isRequired", + "order", + "pageId", + "pageLegacyId", + "sectionId", + "sectionLegacyId", + "customTableId", + "customTableLegacyId", + "sortOrderDirection", + "summarize", + "sortField", + "values", + "fields", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CustomFieldDefinitionResponseObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in values (list) + _items = [] + if self.values: + for _item_values in self.values: + if _item_values: + _items.append(_item_values.to_dict()) + _dict["values"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item_fields in self.fields: + if _item_fields: + _items.append(_item_fields.to_dict()) + _dict["fields"] = _items + # set to None if order (nullable) is None + # and model_fields_set contains the field + if self.order is None and "order" in self.model_fields_set: + _dict["order"] = None + + # set to None if page_id (nullable) is None + # and model_fields_set contains the field + if self.page_id is None and "page_id" in self.model_fields_set: + _dict["pageId"] = None + + # set to None if page_legacy_id (nullable) is None + # and model_fields_set contains the field + if self.page_legacy_id is None and "page_legacy_id" in self.model_fields_set: + _dict["pageLegacyId"] = None + + # set to None if section_id (nullable) is None + # and model_fields_set contains the field + if self.section_id is None and "section_id" in self.model_fields_set: + _dict["sectionId"] = None + + # set to None if section_legacy_id (nullable) is None + # and model_fields_set contains the field + if self.section_legacy_id is None and "section_legacy_id" in self.model_fields_set: + _dict["sectionLegacyId"] = None + + # set to None if custom_table_id (nullable) is None + # and model_fields_set contains the field + if self.custom_table_id is None and "custom_table_id" in self.model_fields_set: + _dict["customTableId"] = None + + # set to None if custom_table_legacy_id (nullable) is None + # and model_fields_set contains the field + if self.custom_table_legacy_id is None and "custom_table_legacy_id" in self.model_fields_set: + _dict["customTableLegacyId"] = None + + # set to None if sort_order_direction (nullable) is None + # and model_fields_set contains the field + if self.sort_order_direction is None and "sort_order_direction" in self.model_fields_set: + _dict["sortOrderDirection"] = None + + # set to None if summarize (nullable) is None + # and model_fields_set contains the field + if self.summarize is None and "summarize" in self.model_fields_set: + _dict["summarize"] = None + + # set to None if sort_field (nullable) is None + # and model_fields_set contains the field + if self.sort_field is None and "sort_field" in self.model_fields_set: + _dict["sortField"] = None + + # set to None if values (nullable) is None + # and model_fields_set contains the field + if self.values is None and "values" in self.model_fields_set: + _dict["values"] = None + + # set to None if fields (nullable) is None + # and model_fields_set contains the field + if self.fields is None and "fields" in self.model_fields_set: + _dict["fields"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CustomFieldDefinitionResponseObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "legacyId": obj.get("legacyId"), + "name": obj.get("name"), + "type": obj.get("type"), + "isEncrypted": obj.get("isEncrypted"), + "isCalculated": obj.get("isCalculated"), + "isRequired": obj.get("isRequired"), + "order": obj.get("order"), + "pageId": obj.get("pageId"), + "pageLegacyId": obj.get("pageLegacyId"), + "sectionId": obj.get("sectionId"), + "sectionLegacyId": obj.get("sectionLegacyId"), + "customTableId": obj.get("customTableId"), + "customTableLegacyId": obj.get("customTableLegacyId"), + "sortOrderDirection": obj.get("sortOrderDirection"), + "summarize": obj.get("summarize"), + "sortField": obj.get("sortField"), + "values": [CustomFieldDefinitionResponseObjectValuesInner.from_dict(_item) for _item in obj["values"]] + if obj.get("values") is not None + else None, + "fields": [CustomFieldDefinitionResponseObject.from_dict(_item) for _item in obj["fields"]] + if obj.get("fields") is not None + else None, + } + ) + return _obj + + +# TODO: Rewrite to not use raise_errors +CustomFieldDefinitionResponseObject.model_rebuild(raise_errors=False) diff --git a/bamboohr_sdk/models/custom_field_definition_response_object_values_inner.py b/bamboohr_sdk/models/custom_field_definition_response_object_values_inner.py new file mode 100644 index 0000000..cfe034c --- /dev/null +++ b/bamboohr_sdk/models/custom_field_definition_response_object_values_inner.py @@ -0,0 +1,82 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + + +class CustomFieldDefinitionResponseObjectValuesInner(BaseModel): + """ + CustomFieldDefinitionResponseObjectValuesInner + """ + + id: StrictStr | None = Field(default=None, description="The string list value ID.") + legacy_id: StrictInt | None = Field(default=None, description="The legacy numeric list value ID.", alias="legacyId") + display: StrictStr | None = Field(default=None, description="The list value display name.") + __properties: ClassVar[list[str]] = ["id", "legacyId", "display"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CustomFieldDefinitionResponseObjectValuesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CustomFieldDefinitionResponseObjectValuesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"id": obj.get("id"), "legacyId": obj.get("legacyId"), "display": obj.get("display")}) + return _obj diff --git a/bamboohr_sdk/models/custom_field_request.py b/bamboohr_sdk/models/custom_field_request.py new file mode 100644 index 0000000..f16f21e --- /dev/null +++ b/bamboohr_sdk/models/custom_field_request.py @@ -0,0 +1,100 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing_extensions import Self + + +class CustomFieldRequest(BaseModel): + """ + CustomFieldRequest + """ + + id: StrictStr | None = Field(default=None, description="The id of the Custom Field to be edited") + name: StrictStr | None = Field(default=None, description="The name of the Custom Field to be edited / created") + type: StrictStr | None = Field(default=None, description="The type of the Custom Field to be edited / created") + tab: StrictInt | None = Field(default=None, description="The id of the tab where the Custom Field will be added") + section: StrictInt | None = Field( + default=None, description="The id of the section where the Custom Field will be added" + ) + required: StrictBool | None = Field(default=None, description="Whether the Custom Field is required or not") + options: list[StrictStr] | None = Field( + default=None, description="The options of the Custom Field to be edited / created" + ) + __properties: ClassVar[list[str]] = ["id", "name", "type", "tab", "section", "required", "options"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CustomFieldRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CustomFieldRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "tab": obj.get("tab"), + "section": obj.get("section"), + "required": obj.get("required"), + "options": obj.get("options"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/custom_field_type_view_object.py b/bamboohr_sdk/models/custom_field_type_view_object.py new file mode 100644 index 0000000..ee80abf --- /dev/null +++ b/bamboohr_sdk/models/custom_field_type_view_object.py @@ -0,0 +1,82 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class CustomFieldTypeViewObject(BaseModel): + """ + CustomFieldTypeViewObject + """ + + name: StrictStr | None = Field(default=None, description="The name of the Custom Field Type") + type: StrictStr | None = Field(default=None, description="The type of the Custom Field Type") + label: StrictStr | None = Field(default=None, description="The label of the Custom Field Type") + __properties: ClassVar[list[str]] = ["name", "type", "label"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CustomFieldTypeViewObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CustomFieldTypeViewObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"name": obj.get("name"), "type": obj.get("type"), "label": obj.get("label")}) + return _obj diff --git a/bamboohr_sdk/models/custom_field_view_object.py b/bamboohr_sdk/models/custom_field_view_object.py new file mode 100644 index 0000000..c92e96f --- /dev/null +++ b/bamboohr_sdk/models/custom_field_view_object.py @@ -0,0 +1,113 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing_extensions import Self + + +class CustomFieldViewObject(BaseModel): + """ + CustomFieldViewObject + """ + + id: StrictInt | None = Field(default=None, description="The id of the Custom Field") + name: StrictStr | None = Field(default=None, description="The name of the Custom Field") + type: StrictStr | None = Field(default=None, description="The type of the Custom Field") + is_encrypted: StrictBool | None = Field( + default=None, description="Whether the Custom Field is encrypted or not", alias="isEncrypted" + ) + is_calculated: StrictBool | None = Field( + default=None, description="Whether the Custom Field is calculated or not", alias="isCalculated" + ) + is_required: StrictBool | None = Field( + default=None, description="Whether the Custom Field is required or not", alias="isRequired" + ) + order: StrictInt | None = Field(default=None, description="The order of the Custom Field") + values: list[StrictStr] | None = Field(default=None, description="The values of the Custom Field") + __properties: ClassVar[list[str]] = [ + "id", + "name", + "type", + "isEncrypted", + "isCalculated", + "isRequired", + "order", + "values", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CustomFieldViewObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CustomFieldViewObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "isEncrypted": obj.get("isEncrypted"), + "isCalculated": obj.get("isCalculated"), + "isRequired": obj.get("isRequired"), + "order": obj.get("order"), + "values": obj.get("values"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/custom_fields_list_response.py b/bamboohr_sdk/models/custom_fields_list_response.py new file mode 100644 index 0000000..e8f63fd --- /dev/null +++ b/bamboohr_sdk/models/custom_fields_list_response.py @@ -0,0 +1,113 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from bamboohr_sdk.models.available_action import AvailableAction +from bamboohr_sdk.models.custom_field_definition_response_object import CustomFieldDefinitionResponseObject +from bamboohr_sdk.models.pagination_meta_data import PaginationMetaData + + +class CustomFieldsListResponse(BaseModel): + """ + CustomFieldsListResponse + """ + + data: list[CustomFieldDefinitionResponseObject] | None = None + meta: PaginationMetaData | None = Field(default=None, description="The pagination metadata for the response.") + links: dict[str, AvailableAction] | None = Field(default=None, alias="_links") + __properties: ClassVar[list[str]] = ["data", "meta", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CustomFieldsListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict["data"] = _items + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict["meta"] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of each value in links (dict) + _field_dict = {} + if self.links: + for _key_links in self.links: + if self.links[_key_links]: + _field_dict[_key_links] = self.links[_key_links].to_dict() + _dict["_links"] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CustomFieldsListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "data": [CustomFieldDefinitionResponseObject.from_dict(_item) for _item in obj["data"]] + if obj.get("data") is not None + else None, + "meta": PaginationMetaData.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "_links": dict((_k, AvailableAction.from_dict(_v)) for _k, _v in obj["_links"].items()) + if obj.get("_links") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/custom_report_response.py b/bamboohr_sdk/models/custom_report_response.py new file mode 100644 index 0000000..bd478f8 --- /dev/null +++ b/bamboohr_sdk/models/custom_report_response.py @@ -0,0 +1,117 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from bamboohr_sdk.models.custom_report_response_fields_inner import CustomReportResponseFieldsInner +from bamboohr_sdk.models.employee_response_aggregations_inner import EmployeeResponseAggregationsInner +from bamboohr_sdk.models.pagination import Pagination + + +class CustomReportResponse(BaseModel): + """ + Data from a saved custom report, plus a `fields` array describing its columns. + """ + + fields: list[CustomReportResponseFieldsInner] | None = Field( + default=None, description="The report's columns, in the order the report shows them." + ) + data: list[dict[str, Any]] | None = None + aggregations: list[EmployeeResponseAggregationsInner] | None = None + pagination: Pagination | None = None + __properties: ClassVar[list[str]] = ["fields", "data", "aggregations", "pagination"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CustomReportResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item_fields in self.fields: + if _item_fields: + _items.append(_item_fields.to_dict()) + _dict["fields"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in aggregations (list) + _items = [] + if self.aggregations: + for _item_aggregations in self.aggregations: + if _item_aggregations: + _items.append(_item_aggregations.to_dict()) + _dict["aggregations"] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict["pagination"] = self.pagination.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CustomReportResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "fields": [CustomReportResponseFieldsInner.from_dict(_item) for _item in obj["fields"]] + if obj.get("fields") is not None + else None, + "data": obj.get("data"), + "aggregations": [EmployeeResponseAggregationsInner.from_dict(_item) for _item in obj["aggregations"]] + if obj.get("aggregations") is not None + else None, + "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/custom_report_response_fields_inner.py b/bamboohr_sdk/models/custom_report_response_fields_inner.py new file mode 100644 index 0000000..1c9eaf2 --- /dev/null +++ b/bamboohr_sdk/models/custom_report_response_fields_inner.py @@ -0,0 +1,86 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class CustomReportResponseFieldsInner(BaseModel): + """ + CustomReportResponseFieldsInner + """ + + name: StrictStr | None = Field(default=None, description="Key this column uses in every `data` record.") + label: StrictStr | None = None + __properties: ClassVar[list[str]] = ["name", "label"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of CustomReportResponseFieldsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict["label"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of CustomReportResponseFieldsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"name": obj.get("name"), "label": obj.get("label")}) + return _obj diff --git a/bamboohr_sdk/models/dacd313af2106213fc4696175941ce65_request.py b/bamboohr_sdk/models/dacd313af2106213fc4696175941ce65_request.py new file mode 100644 index 0000000..57422de --- /dev/null +++ b/bamboohr_sdk/models/dacd313af2106213fc4696175941ce65_request.py @@ -0,0 +1,94 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing_extensions import Self + + +class Dacd313af2106213fc4696175941ce65Request(BaseModel): + """ + Dacd313af2106213fc4696175941ce65Request + """ + + use_guidelines: StrictBool | None = Field(default=None, alias="useGuidelines") + soft_min: StrictFloat | StrictInt | None = Field(default=None, alias="softMin") + soft_max: StrictFloat | StrictInt | None = Field(default=None, alias="softMax") + __properties: ClassVar[list[str]] = ["useGuidelines", "softMin", "softMax"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of Dacd313af2106213fc4696175941ce65Request from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if soft_min (nullable) is None + # and model_fields_set contains the field + if self.soft_min is None and "soft_min" in self.model_fields_set: + _dict["softMin"] = None + + # set to None if soft_max (nullable) is None + # and model_fields_set contains the field + if self.soft_max is None and "soft_max" in self.model_fields_set: + _dict["softMax"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of Dacd313af2106213fc4696175941ce65Request from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"useGuidelines": obj.get("useGuidelines"), "softMin": obj.get("softMin"), "softMax": obj.get("softMax")} + ) + return _obj diff --git a/bamboohr_sdk/models/data_request.py b/bamboohr_sdk/models/data_request.py index 61eceb7..01387af 100644 --- a/bamboohr_sdk/models/data_request.py +++ b/bamboohr_sdk/models/data_request.py @@ -1,41 +1,55 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.data_request_aggregations_inner import DataRequestAggregationsInner +from typing_extensions import Self + +from bamboohr_sdk.models.data_request_aggregations import DataRequestAggregations from bamboohr_sdk.models.data_request_filters import DataRequestFilters from bamboohr_sdk.models.data_request_sort_by_inner import DataRequestSortByInner -from typing import Optional, Set -from typing_extensions import Self + class DataRequest(BaseModel): """ DataRequest - """ # noqa: E501 - fields: List[StrictStr] - aggregations: Optional[List[DataRequestAggregationsInner]] = None - sort_by: Optional[List[DataRequestSortByInner]] = Field(default=None, alias="sortBy") - filters: Optional[DataRequestFilters] = None - group_by: Optional[List[StrictStr]] = Field(default=None, alias="groupBy") - show_history: Optional[List[StrictStr]] = Field(default=None, alias="showHistory") - __properties: ClassVar[List[str]] = ["fields", "aggregations", "sortBy", "filters", "groupBy", "showHistory"] + """ + + fields: list[StrictStr] = Field( + description='Field names to include in each returned record. Use "Get Fields from Dataset" to discover available names.' + ) + aggregations: DataRequestAggregations | None = None + sort_by: list[DataRequestSortByInner] | None = Field( + default=None, + description="Ordered list of sort rules. Priority follows array order. Include aggregationType when sorting by an aggregated value in a grouped request; it must match an aggregation requested for the same field.", + alias="sortBy", + ) + filters: DataRequestFilters | None = None + group_by: list[StrictStr] | None = Field( + default=None, + description="Field names to group results by. Currently supports only one field. When grouping is active, the `data` key in the response becomes an object keyed by group value instead of an array.", + alias="groupBy", + ) + show_history: list[StrictStr] | None = Field( + default=None, + description='Entity names of historical table fields whose history rows should be included. Entity names are returned by "Get Fields from Dataset".', + alias="showHistory", + ) + __properties: ClassVar[list[str]] = ["fields", "aggregations", "sortBy", "filters", "groupBy", "showHistory"] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +57,6 @@ class DataRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -54,11 +67,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of DataRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -68,35 +81,30 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in aggregations (list) - _items = [] + # override the default output from pydantic by calling `to_dict()` of aggregations if self.aggregations: - for _item_aggregations in self.aggregations: - if _item_aggregations: - _items.append(_item_aggregations.to_dict()) - _dict['aggregations'] = _items + _dict["aggregations"] = self.aggregations.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in sort_by (list) _items = [] if self.sort_by: for _item_sort_by in self.sort_by: if _item_sort_by: _items.append(_item_sort_by.to_dict()) - _dict['sortBy'] = _items + _dict["sortBy"] = _items # override the default output from pydantic by calling `to_dict()` of filters if self.filters: - _dict['filters'] = self.filters.to_dict() + _dict["filters"] = self.filters.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of DataRequest from a dict""" if obj is None: return None @@ -104,14 +112,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "fields": obj.get("fields"), - "aggregations": [DataRequestAggregationsInner.from_dict(_item) for _item in obj["aggregations"]] if obj.get("aggregations") is not None else None, - "sortBy": [DataRequestSortByInner.from_dict(_item) for _item in obj["sortBy"]] if obj.get("sortBy") is not None else None, - "filters": DataRequestFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None, - "groupBy": obj.get("groupBy"), - "showHistory": obj.get("showHistory") - }) + _obj = cls.model_validate( + { + "fields": obj.get("fields"), + "aggregations": DataRequestAggregations.from_dict(obj["aggregations"]) + if obj.get("aggregations") is not None + else None, + "sortBy": [DataRequestSortByInner.from_dict(_item) for _item in obj["sortBy"]] + if obj.get("sortBy") is not None + else None, + "filters": DataRequestFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None, + "groupBy": obj.get("groupBy"), + "showHistory": obj.get("showHistory"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/data_request_aggregations.py b/bamboohr_sdk/models/data_request_aggregations.py new file mode 100644 index 0000000..8ec1d07 --- /dev/null +++ b/bamboohr_sdk/models/data_request_aggregations.py @@ -0,0 +1,105 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing_extensions import Self + + +class DataRequestAggregations(BaseModel): + """ + Aggregation configuration. Set `defaultAggregation` to apply one aggregation type to every requested field, or use `overridingAggregations` to target specific fields. Both may be combined. + """ + + default_aggregation: StrictStr | None = Field(default=None, alias="defaultAggregation") + overriding_aggregations: list[dict[str, StrictStr]] | None = Field( + default=None, + description="Per-field aggregation overrides. Each element is an object whose single key is the field name and whose value is the aggregation type.", + alias="overridingAggregations", + ) + __properties: ClassVar[list[str]] = ["defaultAggregation", "overridingAggregations"] + + @field_validator("default_aggregation") + def default_aggregation_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["count", "count_unique", "sum", "avg", "min", "max"]): + raise ValueError("must be one of enum values ('count', 'count_unique', 'sum', 'avg', 'min', 'max')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of DataRequestAggregations from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if default_aggregation (nullable) is None + # and model_fields_set contains the field + if self.default_aggregation is None and "default_aggregation" in self.model_fields_set: + _dict["defaultAggregation"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of DataRequestAggregations from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "defaultAggregation": obj.get("defaultAggregation"), + "overridingAggregations": obj.get("overridingAggregations"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/data_request_filters.py b/bamboohr_sdk/models/data_request_filters.py index 6f85414..302d0f8 100644 --- a/bamboohr_sdk/models/data_request_filters.py +++ b/bamboohr_sdk/models/data_request_filters.py @@ -1,35 +1,50 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.data_request_filters_filters_inner import DataRequestFiltersFiltersInner -from typing import Optional, Set +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing_extensions import Self +from bamboohr_sdk.models.data_request_filters_filters_inner import DataRequestFiltersFiltersInner + + class DataRequestFilters(BaseModel): """ - DataRequestFilters - """ # noqa: E501 - match: Optional[StrictStr] = None - filters: Optional[List[DataRequestFiltersFiltersInner]] = None - __properties: ClassVar[List[str]] = ["match", "filters"] + Filter configuration. Combine multiple conditions with a `match` strategy. + """ + + match: StrictStr | None = Field( + default=None, description="Logical operator for combining filters: `all` (AND) or `any` (OR)." + ) + filters: list[DataRequestFiltersFiltersInner] | None = Field( + default=None, + description="Array of filter conditions. Filter fields do not need to appear in the top-level `fields` array.", + ) + __properties: ClassVar[list[str]] = ["match", "filters"] + + @field_validator("match") + def match_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["all", "any"]): + raise ValueError("must be one of enum values ('all', 'any')") + return value model_config = ConfigDict( populate_by_name=True, @@ -37,7 +52,6 @@ class DataRequestFilters(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +62,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of DataRequestFilters from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,8 +76,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,11 +89,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_filters in self.filters: if _item_filters: _items.append(_item_filters.to_dict()) - _dict['filters'] = _items + _dict["filters"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of DataRequestFilters from a dict""" if obj is None: return None @@ -88,10 +101,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "match": obj.get("match"), - "filters": [DataRequestFiltersFiltersInner.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None - }) + _obj = cls.model_validate( + { + "match": obj.get("match"), + "filters": [DataRequestFiltersFiltersInner.from_dict(_item) for _item in obj["filters"]] + if obj.get("filters") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/data_request_filters_filters_inner.py b/bamboohr_sdk/models/data_request_filters_filters_inner.py index edbafcf..7b6331d 100644 --- a/bamboohr_sdk/models/data_request_filters_filters_inner.py +++ b/bamboohr_sdk/models/data_request_filters_filters_inner.py @@ -1,44 +1,68 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class DataRequestFiltersFiltersInner(BaseModel): """ DataRequestFiltersFiltersInner - """ # noqa: E501 - var_field: Optional[StrictStr] = Field(default=None, alias="field") - operator: Optional[StrictStr] = None - value: Optional[Any] = None - __properties: ClassVar[List[str]] = ["field", "operator", "value"] + """ + + var_field: StrictStr | None = Field(default=None, description="Field name to filter on.", alias="field") + operator: StrictStr | None = Field( + default=None, + description="Comparison operator. Available operators depend on field type (see endpoint description).", + ) + value: Any | None = None + __properties: ClassVar[list[str]] = ["field", "operator", "value"] - @field_validator('operator') + @field_validator("operator") def operator_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['contains', 'does_not_contain', 'equal', 'not_equal', 'empty', 'not_empty', 'lt', 'lte', 'gt', 'gte', 'last', 'next', 'range', 'checked', 'not_checked', 'includes', 'does_not_include']): - raise ValueError("must be one of enum values ('contains', 'does_not_contain', 'equal', 'not_equal', 'empty', 'not_empty', 'lt', 'lte', 'gt', 'gte', 'last', 'next', 'range', 'checked', 'not_checked', 'includes', 'does_not_include')") + if value not in set( + [ + "contains", + "does_not_contain", + "equal", + "not_equal", + "empty", + "not_empty", + "lt", + "lte", + "gt", + "gte", + "last", + "next", + "range", + "checked", + "not_checked", + "includes", + "does_not_include", + ] + ): + raise ValueError( + "must be one of enum values ('contains', 'does_not_contain', 'equal', 'not_equal', 'empty', 'not_empty', 'lt', 'lte', 'gt', 'gte', 'last', 'next', 'range', 'checked', 'not_checked', 'includes', 'does_not_include')" + ) return value model_config = ConfigDict( @@ -47,7 +71,6 @@ def operator_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -58,11 +81,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of DataRequestFiltersFiltersInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -72,8 +95,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -83,12 +105,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if value (nullable) is None # and model_fields_set contains the field if self.value is None and "value" in self.model_fields_set: - _dict['value'] = None + _dict["value"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of DataRequestFiltersFiltersInner from a dict""" if obj is None: return None @@ -96,11 +118,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "field": obj.get("field"), - "operator": obj.get("operator"), - "value": obj.get("value") - }) + _obj = cls.model_validate( + {"field": obj.get("field"), "operator": obj.get("operator"), "value": obj.get("value")} + ) return _obj - - diff --git a/bamboohr_sdk/models/data_request_sort_by_inner.py b/bamboohr_sdk/models/data_request_sort_by_inner.py index 3d64690..9d33e24 100644 --- a/bamboohr_sdk/models/data_request_sort_by_inner.py +++ b/bamboohr_sdk/models/data_request_sort_by_inner.py @@ -1,52 +1,65 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class DataRequestSortByInner(BaseModel): """ DataRequestSortByInner - """ # noqa: E501 - var_field: Optional[StrictStr] = Field(default=None, alias="field") - sort: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["field", "sort"] + """ + + var_field: StrictStr | None = Field(default=None, description="Field name to sort by.", alias="field") + sort: StrictStr | None = Field(default=None, description="Sort direction.") + aggregation_type: StrictStr | None = Field( + default=None, + description="Optional. Use when sorting by an aggregated value; must match the requested aggregation for this field.", + alias="aggregationType", + ) + __properties: ClassVar[list[str]] = ["field", "sort", "aggregationType"] - @field_validator('sort') + @field_validator("sort") def sort_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['asc', 'desc']): + if value not in set(["asc", "desc"]): raise ValueError("must be one of enum values ('asc', 'desc')") return value + @field_validator("aggregation_type") + def aggregation_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["count", "count_unique", "sum", "avg", "min", "max"]): + raise ValueError("must be one of enum values ('count', 'count_unique', 'sum', 'avg', 'min', 'max')") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -57,11 +70,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of DataRequestSortByInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -71,8 +84,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -82,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of DataRequestSortByInner from a dict""" if obj is None: return None @@ -90,10 +102,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "field": obj.get("field"), - "sort": obj.get("sort") - }) + _obj = cls.model_validate( + {"field": obj.get("field"), "sort": obj.get("sort"), "aggregationType": obj.get("aggregationType")} + ) return _obj - - diff --git a/bamboohr_sdk/models/dataset_data_response_v2.py b/bamboohr_sdk/models/dataset_data_response_v2.py new file mode 100644 index 0000000..72bdbe3 --- /dev/null +++ b/bamboohr_sdk/models/dataset_data_response_v2.py @@ -0,0 +1,110 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from bamboohr_sdk.models.dataset_data_response_v2_data_inner import DatasetDataResponseV2DataInner +from bamboohr_sdk.models.dataset_data_response_v2_links import DatasetDataResponseV2Links +from bamboohr_sdk.models.dataset_data_response_v2_meta import DatasetDataResponseV2Meta + + +class DatasetDataResponseV2(BaseModel): + """ + DatasetDataResponseV2 + """ + + data: list[DatasetDataResponseV2DataInner] | None = Field( + default=None, + description="Array of record objects. Each object contains a `fields` object whose keys are the requested field names. Values may be strings, numbers, booleans, arrays/objects, or null depending on the dataset field and value.", + ) + links: DatasetDataResponseV2Links | None = None + meta: DatasetDataResponseV2Meta | None = None + __properties: ClassVar[list[str]] = ["data", "links", "meta"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of DatasetDataResponseV2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict["data"] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict["links"] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict["meta"] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of DatasetDataResponseV2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "data": [DatasetDataResponseV2DataInner.from_dict(_item) for _item in obj["data"]] + if obj.get("data") is not None + else None, + "links": DatasetDataResponseV2Links.from_dict(obj["links"]) if obj.get("links") is not None else None, + "meta": DatasetDataResponseV2Meta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/dataset_data_response_v2_data_inner.py b/bamboohr_sdk/models/dataset_data_response_v2_data_inner.py new file mode 100644 index 0000000..aaa8119 --- /dev/null +++ b/bamboohr_sdk/models/dataset_data_response_v2_data_inner.py @@ -0,0 +1,99 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + +from bamboohr_sdk.models.dataset_data_response_v2_data_inner_fields_value import ( + DatasetDataResponseV2DataInnerFieldsValue, +) + + +class DatasetDataResponseV2DataInner(BaseModel): + """ + DatasetDataResponseV2DataInner + """ + + fields: dict[str, DatasetDataResponseV2DataInnerFieldsValue | None] | None = None + __properties: ClassVar[list[str]] = ["fields"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of DatasetDataResponseV2DataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each value in fields (dict) + _field_dict = {} + if self.fields: + for _key_fields in self.fields: + if self.fields[_key_fields]: + _field_dict[_key_fields] = self.fields[_key_fields].to_dict() + _dict["fields"] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of DatasetDataResponseV2DataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "fields": dict( + (_k, DatasetDataResponseV2DataInnerFieldsValue.from_dict(_v)) for _k, _v in obj["fields"].items() + ) + if obj.get("fields") is not None + else None + } + ) + return _obj diff --git a/bamboohr_sdk/models/employee_table_row_value_any_of_inner.py b/bamboohr_sdk/models/dataset_data_response_v2_data_inner_fields_value.py similarity index 69% rename from bamboohr_sdk/models/employee_table_row_value_any_of_inner.py rename to bamboohr_sdk/models/dataset_data_response_v2_data_inner_fields_value.py index 391a0b0..119316b 100644 --- a/bamboohr_sdk/models/employee_table_row_value_any_of_inner.py +++ b/bamboohr_sdk/models/dataset_data_response_v2_data_inner_fields_value.py @@ -1,50 +1,55 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator -from typing import Any, Dict, Optional, Union -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field +from typing import TYPE_CHECKING, Any -EMPLOYEETABLEROWVALUEANYOFINNER_ANY_OF_SCHEMAS = ["Dict[str, object]", "bool", "float", "int", "str"] +from pydantic import ( + BaseModel, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Self -class EmployeeTableRowValueAnyOfInner(BaseModel): +DATASETDATARESPONSEV2DATAINNERFIELDSVALUE_ANY_OF_SCHEMAS = ["List[object]", "bool", "float", "object", "str"] + + +class DatasetDataResponseV2DataInnerFieldsValue(BaseModel): """ - EmployeeTableRowValueAnyOfInner + DatasetDataResponseV2DataInnerFieldsValue """ # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None + anyof_schema_1_validator: StrictStr | None = None # data type: float - anyof_schema_2_validator: Optional[Union[StrictFloat, StrictInt]] = None + anyof_schema_2_validator: StrictFloat | StrictInt | None = None # data type: bool - anyof_schema_3_validator: Optional[StrictBool] = None - # data type: int - anyof_schema_4_validator: Optional[StrictInt] = None - # data type: Dict[str, object] - anyof_schema_5_validator: Optional[Dict[str, Any]] = None + anyof_schema_3_validator: StrictBool | None = None + # data type: List[object] + anyof_schema_4_validator: list[Any] | None = None + # data type: object + anyof_schema_5_validator: dict[str, Any] | None = None if TYPE_CHECKING: - actual_instance: Optional[Union[Dict[str, object], bool, float, int, str]] = None + actual_instance: list[object] | bool | float | object | str | None = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "Dict[str, object]", "bool", "float", "int", "str" } + any_of_schemas: set[str] = {"List[object]", "bool", "float", "object", "str"} model_config = { "validate_assignment": True, @@ -61,12 +66,12 @@ def __init__(self, *args, **kwargs) -> None: else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): if v is None: return v - instance = EmployeeTableRowValueAnyOfInner.model_construct() + instance = DatasetDataResponseV2DataInnerFieldsValue.model_construct() error_messages = [] # validate data type: str try: @@ -86,13 +91,13 @@ def actual_instance_must_validate_anyof(cls, v): return v except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # validate data type: int + # validate data type: List[object] try: instance.anyof_schema_4_validator = v return v except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # validate data type: Dict[str, object] + # validate data type: object try: instance.anyof_schema_5_validator = v return v @@ -100,12 +105,15 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in EmployeeTableRowValueAnyOfInner with anyOf schemas: Dict[str, object], bool, float, int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in DatasetDataResponseV2DataInnerFieldsValue with anyOf schemas: List[object], bool, float, object, str. Details: " + + ", ".join(error_messages) + ) else: return v @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: + def from_dict(cls, obj: dict[str, Any]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -143,7 +151,7 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into int + # deserialize data into List[object] try: # validation instance.anyof_schema_4_validator = json.loads(json_str) @@ -152,7 +160,7 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into Dict[str, object] + # deserialize data into object try: # validation instance.anyof_schema_5_validator = json.loads(json_str) @@ -164,7 +172,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into EmployeeTableRowValueAnyOfInner with anyOf schemas: Dict[str, object], bool, float, int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into DatasetDataResponseV2DataInnerFieldsValue with anyOf schemas: List[object], bool, float, object, str. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -178,7 +189,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, object], bool, float, int, str]]: + def to_dict(self) -> dict[str, Any] | list[object] | bool | float | object | str | None: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None @@ -191,5 +202,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, object], bool, flo def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/bamboohr_sdk/models/dataset_data_response_v2_links.py b/bamboohr_sdk/models/dataset_data_response_v2_links.py new file mode 100644 index 0000000..ab963c1 --- /dev/null +++ b/bamboohr_sdk/models/dataset_data_response_v2_links.py @@ -0,0 +1,91 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing_extensions import Self + + +class DatasetDataResponseV2Links(BaseModel): + """ + Pagination navigation links. Contains `next` and/or `prev` URLs when applicable. + """ + + next: StrictStr | None = None + prev: StrictStr | None = None + __properties: ClassVar[list[str]] = ["next", "prev"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of DatasetDataResponseV2Links from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if next (nullable) is None + # and model_fields_set contains the field + if self.next is None and "next" in self.model_fields_set: + _dict["next"] = None + + # set to None if prev (nullable) is None + # and model_fields_set contains the field + if self.prev is None and "prev" in self.model_fields_set: + _dict["prev"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of DatasetDataResponseV2Links from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"next": obj.get("next"), "prev": obj.get("prev")}) + return _obj diff --git a/bamboohr_sdk/models/dataset_data_response_v2_meta.py b/bamboohr_sdk/models/dataset_data_response_v2_meta.py new file mode 100644 index 0000000..13a328f --- /dev/null +++ b/bamboohr_sdk/models/dataset_data_response_v2_meta.py @@ -0,0 +1,110 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing_extensions import Self + + +class DatasetDataResponseV2Meta(BaseModel): + """ + Pagination metadata. + """ + + page: StrictInt | None = None + page_size: StrictInt | None = Field(default=None, alias="pageSize") + total_pages: StrictInt | None = Field(default=None, alias="totalPages") + total_items: StrictInt | None = Field(default=None, alias="totalItems") + __properties: ClassVar[list[str]] = ["page", "pageSize", "totalPages", "totalItems"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of DatasetDataResponseV2Meta from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if total_pages (nullable) is None + # and model_fields_set contains the field + if self.total_pages is None and "total_pages" in self.model_fields_set: + _dict["totalPages"] = None + + # set to None if total_items (nullable) is None + # and model_fields_set contains the field + if self.total_items is None and "total_items" in self.model_fields_set: + _dict["totalItems"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of DatasetDataResponseV2Meta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "page": obj.get("page"), + "pageSize": obj.get("pageSize"), + "totalPages": obj.get("totalPages"), + "totalItems": obj.get("totalItems"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/dataset_fields_response.py b/bamboohr_sdk/models/dataset_fields_response.py index 6af4773..50ee4af 100644 --- a/bamboohr_sdk/models/dataset_fields_response.py +++ b/bamboohr_sdk/models/dataset_fields_response.py @@ -1,38 +1,42 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional from bamboohr_sdk.models.model_field import ModelField from bamboohr_sdk.models.pagination import Pagination -from typing import Optional, Set -from typing_extensions import Self + class DatasetFieldsResponse(BaseModel): """ DatasetFieldsResponse - """ # noqa: E501 - pagination: Optional[Pagination] = None - name: Optional[StrictStr] = None - label: Optional[StrictStr] = None - fields: Optional[List[ModelField]] = None - __properties: ClassVar[List[str]] = ["pagination", "name", "label", "fields"] + """ + + pagination: Pagination | None = None + name: StrictStr | None = Field( + default=None, description="Machine-readable dataset identifier matching the requested datasetName." + ) + label: StrictStr | None = Field(default=None, description="Human-readable display name for the dataset.") + fields: list[ModelField] | None = Field( + default=None, description="Paginated array of field descriptors for this dataset." + ) + __properties: ClassVar[list[str]] = ["pagination", "name", "label", "fields"] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +44,6 @@ class DatasetFieldsResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,11 +54,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of DatasetFieldsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -65,8 +68,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,18 +77,18 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of pagination if self.pagination: - _dict['pagination'] = self.pagination.to_dict() + _dict["pagination"] = self.pagination.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in fields (list) _items = [] if self.fields: for _item_fields in self.fields: if _item_fields: _items.append(_item_fields.to_dict()) - _dict['fields'] = _items + _dict["fields"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of DatasetFieldsResponse from a dict""" if obj is None: return None @@ -94,12 +96,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, - "name": obj.get("name"), - "label": obj.get("label"), - "fields": [ModelField.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None - }) + _obj = cls.model_validate( + { + "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "name": obj.get("name"), + "label": obj.get("label"), + "fields": [ModelField.from_dict(_item) for _item in obj["fields"]] + if obj.get("fields") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/dataset_response.py b/bamboohr_sdk/models/dataset_response_v1.py similarity index 59% rename from bamboohr_sdk/models/dataset_response.py rename to bamboohr_sdk/models/dataset_response_v1.py index 3a74d74..9e26478 100644 --- a/bamboohr_sdk/models/dataset_response.py +++ b/bamboohr_sdk/models/dataset_response_v1.py @@ -1,34 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.dataset import Dataset -from typing import Optional, Set +from pydantic import BaseModel, ConfigDict, Field from typing_extensions import Self -class DatasetResponse(BaseModel): +from bamboohr_sdk.models.dataset_v1 import DatasetV1 + + +class DatasetResponseV1(BaseModel): + """ + DatasetResponseV1 """ - DatasetResponse - """ # noqa: E501 - datasets: Optional[List[Dataset]] = None - __properties: ClassVar[List[str]] = ["datasets"] + + datasets: list[DatasetV1] | None = Field(default=None, description="Array of available datasets.") + __properties: ClassVar[list[str]] = ["datasets"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +36,6 @@ class DatasetResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DatasetResponse from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of DatasetResponseV1 from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,21 +73,23 @@ def to_dict(self) -> Dict[str, Any]: for _item_datasets in self.datasets: if _item_datasets: _items.append(_item_datasets.to_dict()) - _dict['datasets'] = _items + _dict["datasets"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DatasetResponse from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of DatasetResponseV1 from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "datasets": [Dataset.from_dict(_item) for _item in obj["datasets"]] if obj.get("datasets") is not None else None - }) + _obj = cls.model_validate( + { + "datasets": [DatasetV1.from_dict(_item) for _item in obj["datasets"]] + if obj.get("datasets") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/dataset_v1.py b/bamboohr_sdk/models/dataset_v1.py new file mode 100644 index 0000000..b29db32 --- /dev/null +++ b/bamboohr_sdk/models/dataset_v1.py @@ -0,0 +1,84 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class DatasetV1(BaseModel): + """ + DatasetV1 + """ + + name: StrictStr | None = Field( + default=None, + description="Machine-readable dataset identifier, used as the datasetName path parameter in other Datasets endpoints.", + ) + label: StrictStr | None = Field(default=None, description="Human-readable display name for the dataset.") + __properties: ClassVar[list[str]] = ["name", "label"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of DatasetV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of DatasetV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"name": obj.get("name"), "label": obj.get("label")}) + return _obj diff --git a/bamboohr_sdk/models/datasets_response.py b/bamboohr_sdk/models/datasets_response_v12.py similarity index 57% rename from bamboohr_sdk/models/datasets_response.py rename to bamboohr_sdk/models/datasets_response_v12.py index 0bcbcd2..7c46cbd 100644 --- a/bamboohr_sdk/models/datasets_response.py +++ b/bamboohr_sdk/models/datasets_response_v12.py @@ -1,34 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.datasets_response_datasets_inner import DatasetsResponseDatasetsInner -from typing import Optional, Set from typing_extensions import Self -class DatasetsResponse(BaseModel): +from bamboohr_sdk.models.datasets_response_v12_datasets_inner import DatasetsResponseV12DatasetsInner + + +class DatasetsResponseV12(BaseModel): """ - DatasetsResponse - """ # noqa: E501 - datasets: Optional[List[DatasetsResponseDatasetsInner]] = Field(default=None, description="Array of available datasets") - __properties: ClassVar[List[str]] = ["datasets"] + DatasetsResponseV12 + """ + + datasets: list[DatasetsResponseV12DatasetsInner] | None = Field( + default=None, description="Array of available datasets" + ) + __properties: ClassVar[list[str]] = ["datasets"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +38,6 @@ class DatasetsResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DatasetsResponse from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of DatasetsResponseV12 from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,21 +75,23 @@ def to_dict(self) -> Dict[str, Any]: for _item_datasets in self.datasets: if _item_datasets: _items.append(_item_datasets.to_dict()) - _dict['datasets'] = _items + _dict["datasets"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DatasetsResponse from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of DatasetsResponseV12 from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "datasets": [DatasetsResponseDatasetsInner.from_dict(_item) for _item in obj["datasets"]] if obj.get("datasets") is not None else None - }) + _obj = cls.model_validate( + { + "datasets": [DatasetsResponseV12DatasetsInner.from_dict(_item) for _item in obj["datasets"]] + if obj.get("datasets") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/datasets_response_v12_datasets_inner.py b/bamboohr_sdk/models/datasets_response_v12_datasets_inner.py new file mode 100644 index 0000000..d61b842 --- /dev/null +++ b/bamboohr_sdk/models/datasets_response_v12_datasets_inner.py @@ -0,0 +1,84 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class DatasetsResponseV12DatasetsInner(BaseModel): + """ + DatasetsResponseV12DatasetsInner + """ + + name: StrictStr | None = Field( + default=None, + description="Machine-readable dataset identifier, used as the datasetName path parameter in other Datasets endpoints.", + ) + label: StrictStr | None = Field(default=None, description="Human-readable display name for the dataset.") + __properties: ClassVar[list[str]] = ["name", "label"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of DatasetsResponseV12DatasetsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of DatasetsResponseV12DatasetsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"name": obj.get("name"), "label": obj.get("label")}) + return _obj diff --git a/bamboohr_sdk/models/delete_compensation_benchmark_source_request.py b/bamboohr_sdk/models/delete_compensation_benchmark_source_request.py new file mode 100644 index 0000000..d046b4c --- /dev/null +++ b/bamboohr_sdk/models/delete_compensation_benchmark_source_request.py @@ -0,0 +1,80 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class DeleteCompensationBenchmarkSourceRequest(BaseModel): + """ + DeleteCompensationBenchmarkSourceRequest + """ + + id: StrictStr = Field(description="ID of the benchmark source to delete. Must be non-empty.") + __properties: ClassVar[list[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of DeleteCompensationBenchmarkSourceRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of DeleteCompensationBenchmarkSourceRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"id": obj.get("id")}) + return _obj diff --git a/bamboohr_sdk/models/delete_compensation_benchmark_source_response.py b/bamboohr_sdk/models/delete_compensation_benchmark_source_response.py new file mode 100644 index 0000000..0878ba9 --- /dev/null +++ b/bamboohr_sdk/models/delete_compensation_benchmark_source_response.py @@ -0,0 +1,85 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing_extensions import Self + + +class DeleteCompensationBenchmarkSourceResponse(BaseModel): + """ + DeleteCompensationBenchmarkSourceResponse + """ + + result: StrictStr | None = None + __properties: ClassVar[list[str]] = ["result"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of DeleteCompensationBenchmarkSourceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if result (nullable) is None + # and model_fields_set contains the field + if self.result is None and "result" in self.model_fields_set: + _dict["result"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of DeleteCompensationBenchmarkSourceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"result": obj.get("result")}) + return _obj diff --git a/bamboohr_sdk/models/details_and_currency_request_data_object.py b/bamboohr_sdk/models/details_and_currency_request_data_object.py new file mode 100644 index 0000000..326bb6d --- /dev/null +++ b/bamboohr_sdk/models/details_and_currency_request_data_object.py @@ -0,0 +1,161 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.conversion_rate_data_object import ConversionRateDataObject + + +class DetailsAndCurrencyRequestDataObject(BaseModel): + """ + Request data for updating compensation planning cycle details and currency settings. Pre-condition: User must have permission to update cycle. Post-condition: Cycle configuration is updated. + """ + + id: StrictStr | None = Field(default=None, description="ID of the cycle to update") + cycle_name: StrictStr | None = Field(default=None, description="Name of the cycle to update", alias="cycleName") + cycle_currency: StrictStr | None = Field(default=None, alias="cycleCurrency") + cycle_window_start_ymd: date | None = Field( + default=None, description="Start date of the cycle window", alias="cycleWindowStartYmd" + ) + cycle_window_end_ymd: date | None = Field( + default=None, description="End date of the cycle window", alias="cycleWindowEndYmd" + ) + recommendations_due_ymd: date | None = Field( + default=None, description="Date when recommendations are due", alias="recommendationsDueYmd" + ) + approvals_due_ymd: date | None = Field( + default=None, description="Date when approvals are due", alias="approvalsDueYmd" + ) + cycle_effective_date: date | None = Field( + default=None, description="Effective date of the cycle", alias="cycleEffectiveDate" + ) + salary_included: StrictBool | None = Field( + default=None, description="Whether salary is included in this cycle", alias="salaryIncluded" + ) + bonus_included: StrictBool | None = Field( + default=None, description="Whether bonus is included in this cycle", alias="bonusIncluded" + ) + equity_included: StrictBool | None = Field( + default=None, description="Whether equity is included in this cycle", alias="equityIncluded" + ) + cycle_currency_conversion_rates: list[ConversionRateDataObject] | None = Field( + default=None, description="Currency conversion rates", alias="cycleCurrencyConversionRates" + ) + paycheck_date_ymd: date | None = Field( + default=None, description="Date of first paycheck with new compensation updates", alias="paycheckDateYmd" + ) + __properties: ClassVar[list[str]] = [ + "id", + "cycleName", + "cycleCurrency", + "cycleWindowStartYmd", + "cycleWindowEndYmd", + "recommendationsDueYmd", + "approvalsDueYmd", + "cycleEffectiveDate", + "salaryIncluded", + "bonusIncluded", + "equityIncluded", + "cycleCurrencyConversionRates", + "paycheckDateYmd", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of DetailsAndCurrencyRequestDataObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in cycle_currency_conversion_rates (list) + _items = [] + if self.cycle_currency_conversion_rates: + for _item_cycle_currency_conversion_rates in self.cycle_currency_conversion_rates: + if _item_cycle_currency_conversion_rates: + _items.append(_item_cycle_currency_conversion_rates.to_dict()) + _dict["cycleCurrencyConversionRates"] = _items + # set to None if cycle_currency (nullable) is None + # and model_fields_set contains the field + if self.cycle_currency is None and "cycle_currency" in self.model_fields_set: + _dict["cycleCurrency"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of DetailsAndCurrencyRequestDataObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "cycleName": obj.get("cycleName"), + "cycleCurrency": obj.get("cycleCurrency"), + "cycleWindowStartYmd": obj.get("cycleWindowStartYmd"), + "cycleWindowEndYmd": obj.get("cycleWindowEndYmd"), + "recommendationsDueYmd": obj.get("recommendationsDueYmd"), + "approvalsDueYmd": obj.get("approvalsDueYmd"), + "cycleEffectiveDate": obj.get("cycleEffectiveDate"), + "salaryIncluded": obj.get("salaryIncluded"), + "bonusIncluded": obj.get("bonusIncluded"), + "equityIncluded": obj.get("equityIncluded"), + "cycleCurrencyConversionRates": [ + ConversionRateDataObject.from_dict(_item) for _item in obj["cycleCurrencyConversionRates"] + ] + if obj.get("cycleCurrencyConversionRates") is not None + else None, + "paycheckDateYmd": obj.get("paycheckDateYmd"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/ec1ba8e76f33960b018d0d7518fe97b5_request.py b/bamboohr_sdk/models/ec1ba8e76f33960b018d0d7518fe97b5_request.py new file mode 100644 index 0000000..789db8b --- /dev/null +++ b/bamboohr_sdk/models/ec1ba8e76f33960b018d0d7518fe97b5_request.py @@ -0,0 +1,135 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing_extensions import Self + + +class Ec1ba8e76f33960b018d0d7518fe97b5Request(BaseModel): + """ + Ec1ba8e76f33960b018d0d7518fe97b5Request + """ + + contact_employee_id: StrictInt | None = Field(default=None, alias="contactEmployeeId") + requires_personal_information: StrictBool | None = Field( + default=None, + description="Whether personal information collection is required.", + alias="requiresPersonalInformation", + ) + requires_photo: StrictBool | None = Field( + default=None, description="Whether a photo is required.", alias="requiresPhoto" + ) + requires_personal_questions: StrictBool | None = Field( + default=None, description="Whether personal questions are required.", alias="requiresPersonalQuestions" + ) + arrive_by_time: StrictStr | None = Field(default=None, alias="arriveByTime") + location: StrictStr | None = None + send_get_to_know_you_email: StrictBool | None = Field( + default=None, description="Whether to send the Get To Know You email.", alias="sendGetToKnowYouEmail" + ) + show_payroll_state: StrictBool | None = Field( + default=None, description="Whether to show state payroll fields.", alias="showPayrollState" + ) + show_payroll_federal: StrictBool | None = Field( + default=None, description="Whether to show federal payroll fields.", alias="showPayrollFederal" + ) + show_payroll_direct_deposit: StrictBool | None = Field( + default=None, description="Whether to show direct deposit payroll fields.", alias="showPayrollDirectDeposit" + ) + nhp_template_id: StrictInt | None = Field(default=None, alias="nhpTemplateId") + employee_id: StrictInt = Field(description="Employee to attach the new packet to.", alias="employeeId") + __properties: ClassVar[list[str]] = [ + "contactEmployeeId", + "requiresPersonalInformation", + "requiresPhoto", + "requiresPersonalQuestions", + "arriveByTime", + "location", + "sendGetToKnowYouEmail", + "showPayrollState", + "showPayrollFederal", + "showPayrollDirectDeposit", + "nhpTemplateId", + "employeeId", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of Ec1ba8e76f33960b018d0d7518fe97b5Request from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of Ec1ba8e76f33960b018d0d7518fe97b5Request from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "contactEmployeeId": obj.get("contactEmployeeId"), + "requiresPersonalInformation": obj.get("requiresPersonalInformation"), + "requiresPhoto": obj.get("requiresPhoto"), + "requiresPersonalQuestions": obj.get("requiresPersonalQuestions"), + "arriveByTime": obj.get("arriveByTime"), + "location": obj.get("location"), + "sendGetToKnowYouEmail": obj.get("sendGetToKnowYouEmail"), + "showPayrollState": obj.get("showPayrollState"), + "showPayrollFederal": obj.get("showPayrollFederal"), + "showPayrollDirectDeposit": obj.get("showPayrollDirectDeposit"), + "nhpTemplateId": obj.get("nhpTemplateId"), + "employeeId": obj.get("employeeId"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/employee.py b/bamboohr_sdk/models/employee.py index c9a5b0b..98ea127 100644 --- a/bamboohr_sdk/models/employee.py +++ b/bamboohr_sdk/models/employee.py @@ -1,50 +1,84 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class Employee(BaseModel): """ - A dictionary of employee field names and their new values. The properties listed below are commonly used fields, but any valid employee field name can be used as a key. To discover all available field names, call the list-fields endpoint (operationId: list-fields, GET /api/v1/meta/fields). Only the fields you include will be updated; omitted fields are left unchanged. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered. - """ # noqa: E501 - first_name: Optional[StrictStr] = Field(default=None, description="Legal first name.", alias="firstName") - last_name: Optional[StrictStr] = Field(default=None, description="Legal last name.", alias="lastName") - work_email: Optional[StrictStr] = Field(default=None, description="Work email address.", alias="workEmail") - job_title: Optional[StrictStr] = Field(default=None, description="Job title.", alias="jobTitle") - department: Optional[StrictStr] = Field(default=None, description="Department name.") - division: Optional[StrictStr] = Field(default=None, description="Division name.") - location: Optional[StrictStr] = Field(default=None, description="Location name.") - hire_date: Optional[date] = Field(default=None, description="Hire date in YYYY-MM-DD format.", alias="hireDate") - mobile_phone: Optional[StrictStr] = Field(default=None, description="Mobile phone number.", alias="mobilePhone") - home_phone: Optional[StrictStr] = Field(default=None, description="Home phone number.", alias="homePhone") - work_phone: Optional[StrictStr] = Field(default=None, description="Work phone number.", alias="workPhone") - address1: Optional[StrictStr] = Field(default=None, description="Street address line 1.") - city: Optional[StrictStr] = Field(default=None, description="City.") - state: Optional[StrictStr] = Field(default=None, description="State or province. Values are normalized to standard abbreviations (e.g., \"Pennsylvania\" becomes \"PA\").") - zipcode: Optional[StrictStr] = Field(default=None, description="ZIP or postal code.") - country: Optional[StrictStr] = Field(default=None, description="Country name.") - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["firstName", "lastName", "workEmail", "jobTitle", "department", "division", "location", "hireDate", "mobilePhone", "homePhone", "workPhone", "address1", "city", "state", "zipcode", "country"] + A dictionary of employee field names and their new values. The properties listed below are commonly used fields, but any valid writable employee field name can be used as a key. To discover all available field names, call **List Fields** (`list-fields`). Only the fields you include will be updated; omitted fields are left unchanged. Some string-valued fields are backed by lists or lookups, so callers should use valid option values from BambooHR metadata rather than assuming any free-text string will persist as entered. **Important for AI agents:** Unknown or misspelled field names are silently ignored — the endpoint returns 200 but the field is not updated. Always use the exact alias from the schema properties below or from the list-fields endpoint; do not invent aliases by adding prefixes such as `home` (e.g., `homeCity` is wrong — the correct alias is `city`). Photo data is not writable through this schema: photo-related keys are silently ignored. To change a profile photo, use the Upload Employee Photo endpoint (`upload-employee-photo`). AI connectors cannot use that endpoint reliably and should redirect the user to the BambooHR web UI. + """ + + first_name: StrictStr | None = Field(default=None, description="Legal first name.", alias="firstName") + last_name: StrictStr | None = Field(default=None, description="Legal last name.", alias="lastName") + work_email: StrictStr | None = Field(default=None, description="Work email address.", alias="workEmail") + job_title: StrictStr | None = Field(default=None, description="Job title.", alias="jobTitle") + department: StrictStr | None = Field(default=None, description="Department name.") + division: StrictStr | None = Field(default=None, description="Division name.") + location: StrictStr | None = Field(default=None, description="Location name.") + hire_date: date | None = Field(default=None, description="Hire date in YYYY-MM-DD format.", alias="hireDate") + mobile_phone: StrictStr | None = Field(default=None, description="Mobile phone number.", alias="mobilePhone") + home_phone: StrictStr | None = Field(default=None, description="Home phone number.", alias="homePhone") + work_phone: StrictStr | None = Field(default=None, description="Work phone number.", alias="workPhone") + address1: StrictStr | None = Field( + default=None, + description="Home street address line 1. The correct alias is `address1` — do not use `homeAddress1`, `homeStreet1`, or `street1`.", + ) + address2: StrictStr | None = Field( + default=None, + description="Home street address line 2 (apartment, suite, etc.). The correct alias is `address2` — do not use `homeAddress2` or `homeStreet2`.", + ) + city: StrictStr | None = Field( + default=None, description="Home city. The correct alias is `city` — do not use `homeCity`." + ) + state: StrictStr | None = Field( + default=None, + description='Home state or province. The correct alias is `state` — do not use `homeState`. Values are normalized to standard abbreviations (e.g., "Pennsylvania" becomes "PA").', + ) + zipcode: StrictStr | None = Field( + default=None, + description="Home ZIP or postal code. The correct alias is `zipcode` — do not use `homeZipcode` or `homeZip`.", + ) + country: StrictStr | None = Field( + default=None, description="Home country name. The correct alias is `country` — do not use `homeCountry`." + ) + additional_properties: dict[str, Any] = {} + __properties: ClassVar[list[str]] = [ + "firstName", + "lastName", + "workEmail", + "jobTitle", + "department", + "division", + "location", + "hireDate", + "mobilePhone", + "homePhone", + "workPhone", + "address1", + "address2", + "city", + "state", + "zipcode", + "country", + ] model_config = ConfigDict( populate_by_name=True, @@ -52,7 +86,6 @@ class Employee(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,11 +96,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of Employee from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -78,9 +111,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) + excluded_fields: set[str] = set( + [ + "additional_properties", + ] + ) _dict = self.model_dump( by_alias=True, @@ -95,7 +130,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of Employee from a dict""" if obj is None: return None @@ -103,29 +138,30 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "firstName": obj.get("firstName"), - "lastName": obj.get("lastName"), - "workEmail": obj.get("workEmail"), - "jobTitle": obj.get("jobTitle"), - "department": obj.get("department"), - "division": obj.get("division"), - "location": obj.get("location"), - "hireDate": obj.get("hireDate"), - "mobilePhone": obj.get("mobilePhone"), - "homePhone": obj.get("homePhone"), - "workPhone": obj.get("workPhone"), - "address1": obj.get("address1"), - "city": obj.get("city"), - "state": obj.get("state"), - "zipcode": obj.get("zipcode"), - "country": obj.get("country") - }) + _obj = cls.model_validate( + { + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "workEmail": obj.get("workEmail"), + "jobTitle": obj.get("jobTitle"), + "department": obj.get("department"), + "division": obj.get("division"), + "location": obj.get("location"), + "hireDate": obj.get("hireDate"), + "mobilePhone": obj.get("mobilePhone"), + "homePhone": obj.get("homePhone"), + "workPhone": obj.get("workPhone"), + "address1": obj.get("address1"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zipcode": obj.get("zipcode"), + "country": obj.get("country"), + } + ) # store additional fields in additional_properties for _key in obj.keys(): if _key not in cls.__properties: _obj.additional_properties[_key] = obj.get(_key) return _obj - - diff --git a/bamboohr_sdk/models/employee_benefit_filters.py b/bamboohr_sdk/models/employee_benefit_filters.py index 7dc707b..b228639 100644 --- a/bamboohr_sdk/models/employee_benefit_filters.py +++ b/bamboohr_sdk/models/employee_benefit_filters.py @@ -1,34 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.employee_benefit_filters_filters import EmployeeBenefitFiltersFilters -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.employee_benefit_filters_filters import EmployeeBenefitFiltersFilters + + class EmployeeBenefitFilters(BaseModel): """ EmployeeBenefitFilters - """ # noqa: E501 - filters: Optional[EmployeeBenefitFiltersFilters] - __properties: ClassVar[List[str]] = ["filters"] + """ + + filters: EmployeeBenefitFiltersFilters + __properties: ClassVar[list[str]] = ["filters"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +36,6 @@ class EmployeeBenefitFilters(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeBenefitFilters from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,16 +69,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of filters if self.filters: - _dict['filters'] = self.filters.to_dict() - # set to None if filters (nullable) is None - # and model_fields_set contains the field - if self.filters is None and "filters" in self.model_fields_set: - _dict['filters'] = None - + _dict["filters"] = self.filters.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeBenefitFilters from a dict""" if obj is None: return None @@ -88,9 +81,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "filters": EmployeeBenefitFiltersFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None - }) + _obj = cls.model_validate( + { + "filters": EmployeeBenefitFiltersFilters.from_dict(obj["filters"]) + if obj.get("filters") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_benefit_filters_filters.py b/bamboohr_sdk/models/employee_benefit_filters_filters.py index f3d1816..2c53732 100644 --- a/bamboohr_sdk/models/employee_benefit_filters_filters.py +++ b/bamboohr_sdk/models/employee_benefit_filters_filters.py @@ -1,36 +1,47 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class EmployeeBenefitFiltersFilters(BaseModel): """ - Scope filters for the request. At least one of employeeId, companyBenefitId, or enrollmentStatusEffectiveDate must be provided; omitting all three returns a 400 validation error. - """ # noqa: E501 - employee_id: Optional[StrictInt] = Field(default=None, description="Return benefit enrollments for a specific employee identified by their numeric ID.", alias="employeeId") - company_benefit_id: Optional[StrictInt] = Field(default=None, description="Return benefit enrollments for a specific company benefit plan identified by its numeric ID.", alias="companyBenefitId") - enrollment_status_effective_date: Optional[date] = Field(default=None, description="Return benefit enrollments whose enrollment status became effective on this date. Must be in YYYY-MM-DD format.", alias="enrollmentStatusEffectiveDate") - __properties: ClassVar[List[str]] = [] + Scope filters for the request. At least one of `employeeId`, `companyBenefitId`, or `enrollmentStatusEffectiveDate` must be provided; none of the three is individually required, but omitting all three returns a 400 validation error. Any combination of the three is accepted. + """ + + employee_id: StrictInt | None = Field( + default=None, + description="Return benefit enrollments for a specific employee identified by their internal employee ID. Optional unless neither `companyBenefitId` nor `enrollmentStatusEffectiveDate` is supplied.", + alias="employeeId", + ) + company_benefit_id: StrictInt | None = Field( + default=None, + description="Return benefit enrollments for a specific company benefit plan identified by its numeric ID. Optional unless neither `employeeId` nor `enrollmentStatusEffectiveDate` is supplied.", + alias="companyBenefitId", + ) + enrollment_status_effective_date: date | None = Field( + default=None, + description="Return benefit enrollments whose enrollment status became effective on this date. Must be in `YYYY-MM-DD` format. Optional unless neither `employeeId` nor `companyBenefitId` is supplied.", + alias="enrollmentStatusEffectiveDate", + ) + __properties: ClassVar[list[str]] = ["employeeId", "companyBenefitId", "enrollmentStatusEffectiveDate"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +49,6 @@ class EmployeeBenefitFiltersFilters(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +59,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeBenefitFiltersFilters from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeBenefitFiltersFilters from a dict""" if obj is None: return None @@ -82,8 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - }) + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "companyBenefitId": obj.get("companyBenefitId"), + "enrollmentStatusEffectiveDate": obj.get("enrollmentStatusEffectiveDate"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_benefits_list_response.py b/bamboohr_sdk/models/employee_benefits_list_response.py index e464cfb..3a9ae61 100644 --- a/bamboohr_sdk/models/employee_benefits_list_response.py +++ b/bamboohr_sdk/models/employee_benefits_list_response.py @@ -1,34 +1,38 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.employee_benefits_list_response_employee_benefits_inner import EmployeeBenefitsListResponseEmployeeBenefitsInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.employee_benefits_list_response_employee_benefits_inner import ( + EmployeeBenefitsListResponseEmployeeBenefitsInner, +) + + class EmployeeBenefitsListResponse(BaseModel): """ EmployeeBenefitsListResponse - """ # noqa: E501 - employee_benefits: Optional[List[EmployeeBenefitsListResponseEmployeeBenefitsInner]] = Field(default=None, description="List of per-employee benefit enrollment records.", alias="employeeBenefits") - __properties: ClassVar[List[str]] = ["employeeBenefits"] + """ + + employee_benefits: list[EmployeeBenefitsListResponseEmployeeBenefitsInner] | None = Field( + default=None, description="List of per-employee benefit enrollment records.", alias="employeeBenefits" + ) + __properties: ClassVar[list[str]] = ["employeeBenefits"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +40,6 @@ class EmployeeBenefitsListResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +50,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeBenefitsListResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,11 +77,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_employee_benefits in self.employee_benefits: if _item_employee_benefits: _items.append(_item_employee_benefits.to_dict()) - _dict['employeeBenefits'] = _items + _dict["employeeBenefits"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeBenefitsListResponse from a dict""" if obj is None: return None @@ -87,9 +89,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "employeeBenefits": [EmployeeBenefitsListResponseEmployeeBenefitsInner.from_dict(_item) for _item in obj["employeeBenefits"]] if obj.get("employeeBenefits") is not None else None - }) + _obj = cls.model_validate( + { + "employeeBenefits": [ + EmployeeBenefitsListResponseEmployeeBenefitsInner.from_dict(_item) + for _item in obj["employeeBenefits"] + ] + if obj.get("employeeBenefits") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_benefits_list_response_employee_benefits_inner.py b/bamboohr_sdk/models/employee_benefits_list_response_employee_benefits_inner.py index 286e389..c51fb02 100644 --- a/bamboohr_sdk/models/employee_benefits_list_response_employee_benefits_inner.py +++ b/bamboohr_sdk/models/employee_benefits_list_response_employee_benefits_inner.py @@ -1,36 +1,42 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.employee_benefits_list_response_employee_benefits_inner_employee_benefit_inner import EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.employee_benefits_list_response_employee_benefits_inner_employee_benefit_inner import ( + EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner, +) + + class EmployeeBenefitsListResponseEmployeeBenefitsInner(BaseModel): """ EmployeeBenefitsListResponseEmployeeBenefitsInner - """ # noqa: E501 - employee_id: Optional[StrictInt] = Field(default=None, description="The ID of the employee.", alias="employeeId") - pay_frequency: Optional[StrictStr] = Field(default=None, description="The employee's current pay frequency (e.g., 'semi-monthly', 'biweekly'), or null if no pay schedule is set.", alias="payFrequency") - employee_benefit: Optional[List[EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner]] = Field(default=None, description="The employee's benefit plan enrollments, including both current and future scheduled changes.", alias="employeeBenefit") - __properties: ClassVar[List[str]] = ["employeeId", "payFrequency", "employeeBenefit"] + """ + + employee_id: StrictInt | None = Field(default=None, description="The internal employee ID.", alias="employeeId") + pay_frequency: StrictStr | None = Field(default=None, alias="payFrequency") + employee_benefit: list[EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner] | None = Field( + default=None, + description="The employee's benefit plan enrollments, including both current and future scheduled changes.", + alias="employeeBenefit", + ) + __properties: ClassVar[list[str]] = ["employeeId", "payFrequency", "employeeBenefit"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +44,6 @@ class EmployeeBenefitsListResponseEmployeeBenefitsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +54,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeBenefitsListResponseEmployeeBenefitsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +68,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -77,16 +81,16 @@ def to_dict(self) -> Dict[str, Any]: for _item_employee_benefit in self.employee_benefit: if _item_employee_benefit: _items.append(_item_employee_benefit.to_dict()) - _dict['employeeBenefit'] = _items + _dict["employeeBenefit"] = _items # set to None if pay_frequency (nullable) is None # and model_fields_set contains the field if self.pay_frequency is None and "pay_frequency" in self.model_fields_set: - _dict['payFrequency'] = None + _dict["payFrequency"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeBenefitsListResponseEmployeeBenefitsInner from a dict""" if obj is None: return None @@ -94,11 +98,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "employeeId": obj.get("employeeId"), - "payFrequency": obj.get("payFrequency"), - "employeeBenefit": [EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.from_dict(_item) for _item in obj["employeeBenefit"]] if obj.get("employeeBenefit") is not None else None - }) + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "payFrequency": obj.get("payFrequency"), + "employeeBenefit": [ + EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner.from_dict(_item) + for _item in obj["employeeBenefit"] + ] + if obj.get("employeeBenefit") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_benefits_list_response_employee_benefits_inner_employee_benefit_inner.py b/bamboohr_sdk/models/employee_benefits_list_response_employee_benefits_inner_employee_benefit_inner.py index 9ac942e..189b459 100644 --- a/bamboohr_sdk/models/employee_benefits_list_response_employee_benefits_inner_employee_benefit_inner.py +++ b/bamboohr_sdk/models/employee_benefits_list_response_employee_benefits_inner_employee_benefit_inner.py @@ -1,63 +1,100 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set from typing_extensions import Self + class EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner(BaseModel): """ EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner - """ # noqa: E501 - company_benefit_id: Optional[StrictStr] = Field(default=None, description="The ID of the company benefit plan.", alias="companyBenefitId") - company_benefit_name: Optional[StrictStr] = Field(default=None, description="The name of the company benefit plan.", alias="companyBenefitName") - coverage_level: Optional[StrictStr] = Field(default=None, description="The coverage level for this enrollment, or null if not applicable.", alias="coverageLevel") - deduction_start_date: Optional[date] = Field(default=None, description="The date deductions begin for this enrollment (YYYY-MM-DD), or null.", alias="deductionStartDate") - deduction_end_date: Optional[date] = Field(default=None, description="The date deductions end for this enrollment (YYYY-MM-DD), or null.", alias="deductionEndDate") - enrollment_status: Optional[StrictStr] = Field(default=None, description="The current or scheduled enrollment status.", alias="enrollmentStatus") - enrollment_status_effective_date: Optional[date] = Field(default=None, description="The date the enrollment status takes effect (YYYY-MM-DD).", alias="enrollmentStatusEffectiveDate") - currency_code: Optional[StrictStr] = Field(default=None, description="ISO 4217 currency code for deduction amounts, or null if not applicable.", alias="currencyCode") - employee_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The employee-paid deduction amount.", alias="employeeAmount") - employee_amount_type: Optional[StrictStr] = Field(default=None, description="The unit for employeeAmount (e.g., '%', '$').", alias="employeeAmountType") - employee_percent_based_on: Optional[StrictStr] = Field(default=None, description="The basis for percent-based employee deductions (e.g., 'Gross'), or null.", alias="employeePercentBasedOn") - employee_cap_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The cap on employee deductions, or null if none.", alias="employeeCapAmount") - employee_cap_amount_type: Optional[StrictStr] = Field(default=None, description="The unit for employeeCapAmount, or null.", alias="employeeCapAmountType") - employee_annual_max: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The annual maximum employee contribution, or null if none.", alias="employeeAnnualMax") - company_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The employer-paid contribution amount.", alias="companyAmount") - company_amount_type: Optional[StrictStr] = Field(default=None, description="The unit for companyAmount (e.g., '%', '$').", alias="companyAmountType") - company_percent_based_on: Optional[StrictStr] = Field(default=None, description="The basis for percent-based employer contributions (e.g., 'Gross'), or null.", alias="companyPercentBasedOn") - company_cap_amount: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The cap on employer contributions, or null if none.", alias="companyCapAmount") - company_cap_amount_type: Optional[StrictStr] = Field(default=None, description="The unit for companyCapAmount, or null.", alias="companyCapAmountType") - company_annual_max: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The annual maximum employer contribution, or null if none.", alias="companyAnnualMax") - occurrences_per_year: Optional[StrictInt] = Field(default=None, description="The number of deduction occurrences per year based on the employee's pay schedule.", alias="occurrencesPerYear") - __properties: ClassVar[List[str]] = ["companyBenefitId", "companyBenefitName", "coverageLevel", "deductionStartDate", "deductionEndDate", "enrollmentStatus", "enrollmentStatusEffectiveDate", "currencyCode", "employeeAmount", "employeeAmountType", "employeePercentBasedOn", "employeeCapAmount", "employeeCapAmountType", "employeeAnnualMax", "companyAmount", "companyAmountType", "companyPercentBasedOn", "companyCapAmount", "companyCapAmountType", "companyAnnualMax", "occurrencesPerYear"] - - @field_validator('enrollment_status') + """ + + company_benefit_id: StrictStr | None = Field( + default=None, description="The ID of the company benefit plan.", alias="companyBenefitId" + ) + company_benefit_name: StrictStr | None = Field( + default=None, description="The name of the company benefit plan.", alias="companyBenefitName" + ) + coverage_level: StrictStr | None = Field(default=None, alias="coverageLevel") + deduction_end_date: date | None = Field(default=None, alias="deductionEndDate") + deduction_start_date: date | None = Field(default=None, alias="deductionStartDate") + enrollment_status: StrictStr | None = Field( + default=None, description="The current or scheduled enrollment status.", alias="enrollmentStatus" + ) + enrollment_status_effective_date: date | None = Field( + default=None, + description="The date the enrollment status takes effect (YYYY-MM-DD).", + alias="enrollmentStatusEffectiveDate", + ) + currency_code: StrictStr | None = Field(default=None, alias="currencyCode") + employee_amount: StrictFloat | StrictInt | None = Field(default=None, alias="employeeAmount") + employee_amount_type: StrictStr | None = Field(default=None, alias="employeeAmountType") + employee_percent_based_on: StrictStr | None = Field(default=None, alias="employeePercentBasedOn") + employee_cap_amount: StrictFloat | StrictInt | None = Field(default=None, alias="employeeCapAmount") + employee_cap_amount_type: StrictStr | None = Field(default=None, alias="employeeCapAmountType") + employee_annual_max: StrictFloat | StrictInt | None = Field(default=None, alias="employeeAnnualMax") + company_amount: StrictFloat | StrictInt | None = Field(default=None, alias="companyAmount") + company_amount_type: StrictStr | None = Field(default=None, alias="companyAmountType") + company_percent_based_on: StrictStr | None = Field(default=None, alias="companyPercentBasedOn") + company_cap_amount: StrictFloat | StrictInt | None = Field(default=None, alias="companyCapAmount") + company_cap_amount_type: StrictStr | None = Field(default=None, alias="companyCapAmountType") + company_annual_max: StrictFloat | StrictInt | None = Field(default=None, alias="companyAnnualMax") + occurrences_per_year: StrictInt | None = Field( + default=None, + description="The number of deduction occurrences per year based on the employee's pay schedule.", + alias="occurrencesPerYear", + ) + __properties: ClassVar[list[str]] = [ + "companyBenefitId", + "companyBenefitName", + "coverageLevel", + "deductionEndDate", + "deductionStartDate", + "enrollmentStatus", + "enrollmentStatusEffectiveDate", + "currencyCode", + "employeeAmount", + "employeeAmountType", + "employeePercentBasedOn", + "employeeCapAmount", + "employeeCapAmountType", + "employeeAnnualMax", + "companyAmount", + "companyAmountType", + "companyPercentBasedOn", + "companyCapAmount", + "companyCapAmountType", + "companyAnnualMax", + "occurrencesPerYear", + ] + + @field_validator("enrollment_status") def enrollment_status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['Eligible', 'Enrolled', 'Waived', 'Withdrawn', 'Terminated', 'Ineligible']): - raise ValueError("must be one of enum values ('Eligible', 'Enrolled', 'Waived', 'Withdrawn', 'Terminated', 'Ineligible')") + if value not in set(["Eligible", "Enrolled", "Waived", "Withdrew", "Terminated", "Ineligible"]): + raise ValueError( + "must be one of enum values ('Eligible', 'Enrolled', 'Waived', 'Withdrew', 'Terminated', 'Ineligible')" + ) return value model_config = ConfigDict( @@ -66,7 +103,6 @@ def enrollment_status_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,11 +113,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -91,8 +127,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -102,87 +137,87 @@ def to_dict(self) -> Dict[str, Any]: # set to None if coverage_level (nullable) is None # and model_fields_set contains the field if self.coverage_level is None and "coverage_level" in self.model_fields_set: - _dict['coverageLevel'] = None - - # set to None if deduction_start_date (nullable) is None - # and model_fields_set contains the field - if self.deduction_start_date is None and "deduction_start_date" in self.model_fields_set: - _dict['deductionStartDate'] = None + _dict["coverageLevel"] = None # set to None if deduction_end_date (nullable) is None # and model_fields_set contains the field if self.deduction_end_date is None and "deduction_end_date" in self.model_fields_set: - _dict['deductionEndDate'] = None + _dict["deductionEndDate"] = None + + # set to None if deduction_start_date (nullable) is None + # and model_fields_set contains the field + if self.deduction_start_date is None and "deduction_start_date" in self.model_fields_set: + _dict["deductionStartDate"] = None # set to None if currency_code (nullable) is None # and model_fields_set contains the field if self.currency_code is None and "currency_code" in self.model_fields_set: - _dict['currencyCode'] = None + _dict["currencyCode"] = None # set to None if employee_amount (nullable) is None # and model_fields_set contains the field if self.employee_amount is None and "employee_amount" in self.model_fields_set: - _dict['employeeAmount'] = None + _dict["employeeAmount"] = None # set to None if employee_amount_type (nullable) is None # and model_fields_set contains the field if self.employee_amount_type is None and "employee_amount_type" in self.model_fields_set: - _dict['employeeAmountType'] = None + _dict["employeeAmountType"] = None # set to None if employee_percent_based_on (nullable) is None # and model_fields_set contains the field if self.employee_percent_based_on is None and "employee_percent_based_on" in self.model_fields_set: - _dict['employeePercentBasedOn'] = None + _dict["employeePercentBasedOn"] = None # set to None if employee_cap_amount (nullable) is None # and model_fields_set contains the field if self.employee_cap_amount is None and "employee_cap_amount" in self.model_fields_set: - _dict['employeeCapAmount'] = None + _dict["employeeCapAmount"] = None # set to None if employee_cap_amount_type (nullable) is None # and model_fields_set contains the field if self.employee_cap_amount_type is None and "employee_cap_amount_type" in self.model_fields_set: - _dict['employeeCapAmountType'] = None + _dict["employeeCapAmountType"] = None # set to None if employee_annual_max (nullable) is None # and model_fields_set contains the field if self.employee_annual_max is None and "employee_annual_max" in self.model_fields_set: - _dict['employeeAnnualMax'] = None + _dict["employeeAnnualMax"] = None # set to None if company_amount (nullable) is None # and model_fields_set contains the field if self.company_amount is None and "company_amount" in self.model_fields_set: - _dict['companyAmount'] = None + _dict["companyAmount"] = None # set to None if company_amount_type (nullable) is None # and model_fields_set contains the field if self.company_amount_type is None and "company_amount_type" in self.model_fields_set: - _dict['companyAmountType'] = None + _dict["companyAmountType"] = None # set to None if company_percent_based_on (nullable) is None # and model_fields_set contains the field if self.company_percent_based_on is None and "company_percent_based_on" in self.model_fields_set: - _dict['companyPercentBasedOn'] = None + _dict["companyPercentBasedOn"] = None # set to None if company_cap_amount (nullable) is None # and model_fields_set contains the field if self.company_cap_amount is None and "company_cap_amount" in self.model_fields_set: - _dict['companyCapAmount'] = None + _dict["companyCapAmount"] = None # set to None if company_cap_amount_type (nullable) is None # and model_fields_set contains the field if self.company_cap_amount_type is None and "company_cap_amount_type" in self.model_fields_set: - _dict['companyCapAmountType'] = None + _dict["companyCapAmountType"] = None # set to None if company_annual_max (nullable) is None # and model_fields_set contains the field if self.company_annual_max is None and "company_annual_max" in self.model_fields_set: - _dict['companyAnnualMax'] = None + _dict["companyAnnualMax"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeBenefitsListResponseEmployeeBenefitsInnerEmployeeBenefitInner from a dict""" if obj is None: return None @@ -190,29 +225,29 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "companyBenefitId": obj.get("companyBenefitId"), - "companyBenefitName": obj.get("companyBenefitName"), - "coverageLevel": obj.get("coverageLevel"), - "deductionStartDate": obj.get("deductionStartDate"), - "deductionEndDate": obj.get("deductionEndDate"), - "enrollmentStatus": obj.get("enrollmentStatus"), - "enrollmentStatusEffectiveDate": obj.get("enrollmentStatusEffectiveDate"), - "currencyCode": obj.get("currencyCode"), - "employeeAmount": obj.get("employeeAmount"), - "employeeAmountType": obj.get("employeeAmountType"), - "employeePercentBasedOn": obj.get("employeePercentBasedOn"), - "employeeCapAmount": obj.get("employeeCapAmount"), - "employeeCapAmountType": obj.get("employeeCapAmountType"), - "employeeAnnualMax": obj.get("employeeAnnualMax"), - "companyAmount": obj.get("companyAmount"), - "companyAmountType": obj.get("companyAmountType"), - "companyPercentBasedOn": obj.get("companyPercentBasedOn"), - "companyCapAmount": obj.get("companyCapAmount"), - "companyCapAmountType": obj.get("companyCapAmountType"), - "companyAnnualMax": obj.get("companyAnnualMax"), - "occurrencesPerYear": obj.get("occurrencesPerYear") - }) + _obj = cls.model_validate( + { + "companyBenefitId": obj.get("companyBenefitId"), + "companyBenefitName": obj.get("companyBenefitName"), + "coverageLevel": obj.get("coverageLevel"), + "deductionEndDate": obj.get("deductionEndDate"), + "deductionStartDate": obj.get("deductionStartDate"), + "enrollmentStatus": obj.get("enrollmentStatus"), + "enrollmentStatusEffectiveDate": obj.get("enrollmentStatusEffectiveDate"), + "currencyCode": obj.get("currencyCode"), + "employeeAmount": obj.get("employeeAmount"), + "employeeAmountType": obj.get("employeeAmountType"), + "employeePercentBasedOn": obj.get("employeePercentBasedOn"), + "employeeCapAmount": obj.get("employeeCapAmount"), + "employeeCapAmountType": obj.get("employeeCapAmountType"), + "employeeAnnualMax": obj.get("employeeAnnualMax"), + "companyAmount": obj.get("companyAmount"), + "companyAmountType": obj.get("companyAmountType"), + "companyPercentBasedOn": obj.get("companyPercentBasedOn"), + "companyCapAmount": obj.get("companyCapAmount"), + "companyCapAmountType": obj.get("companyCapAmountType"), + "companyAnnualMax": obj.get("companyAnnualMax"), + "occurrencesPerYear": obj.get("occurrencesPerYear"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_created_webhook_payload.py b/bamboohr_sdk/models/employee_created_webhook_payload.py index 31ed2ac..b898b94 100644 --- a/bamboohr_sdk/models/employee_created_webhook_payload.py +++ b/bamboohr_sdk/models/employee_created_webhook_payload.py @@ -1,45 +1,45 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.employee_created_webhook_payload_data import EmployeeCreatedWebhookPayloadData -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.employee_created_webhook_payload_data import EmployeeCreatedWebhookPayloadData + + class EmployeeCreatedWebhookPayload(BaseModel): """ Webhook payload sent when a new employee is created. - """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, description="The event type identifier") - timestamp: Optional[datetime] = Field(default=None, description="ISO 8601 timestamp (UTC) when the event was fired") - data: Optional[EmployeeCreatedWebhookPayloadData] = None - __properties: ClassVar[List[str]] = ["type", "timestamp", "data"] + """ + + type: StrictStr | None = Field(default=None, description="The event type identifier") + timestamp: datetime | None = Field(default=None, description="ISO 8601 timestamp (UTC) when the event was fired") + data: EmployeeCreatedWebhookPayloadData | None = None + __properties: ClassVar[list[str]] = ["type", "timestamp", "data"] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['employee.created']): + if value not in set(["employee.created"]): raise ValueError("must be one of enum values ('employee.created')") return value @@ -49,7 +49,6 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,11 +59,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeCreatedWebhookPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -74,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -84,11 +82,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of data if self.data: - _dict['data'] = self.data.to_dict() + _dict["data"] = self.data.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeCreatedWebhookPayload from a dict""" if obj is None: return None @@ -96,11 +94,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type"), - "timestamp": obj.get("timestamp"), - "data": EmployeeCreatedWebhookPayloadData.from_dict(obj["data"]) if obj.get("data") is not None else None - }) + _obj = cls.model_validate( + { + "type": obj.get("type"), + "timestamp": obj.get("timestamp"), + "data": EmployeeCreatedWebhookPayloadData.from_dict(obj["data"]) + if obj.get("data") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_created_webhook_payload_data.py b/bamboohr_sdk/models/employee_created_webhook_payload_data.py index 3ab2834..b693f83 100644 --- a/bamboohr_sdk/models/employee_created_webhook_payload_data.py +++ b/bamboohr_sdk/models/employee_created_webhook_payload_data.py @@ -1,34 +1,35 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class EmployeeCreatedWebhookPayloadData(BaseModel): """ Event data containing employee information - """ # noqa: E501 - company_id: Optional[StrictStr] = Field(default=None, description="The company ID", alias="companyId") - employee_id: Optional[StrictStr] = Field(default=None, description="The employee ID that was created", alias="employeeId") - __properties: ClassVar[List[str]] = ["companyId", "employeeId"] + """ + + company_id: StrictStr | None = Field(default=None, description="The company ID", alias="companyId") + employee_id: StrictStr | None = Field( + default=None, description="The employee ID that was created", alias="employeeId" + ) + __properties: ClassVar[list[str]] = ["companyId", "employeeId"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +37,6 @@ class EmployeeCreatedWebhookPayloadData(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +47,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeCreatedWebhookPayloadData from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeCreatedWebhookPayloadData from a dict""" if obj is None: return None @@ -80,10 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "companyId": obj.get("companyId"), - "employeeId": obj.get("employeeId") - }) + _obj = cls.model_validate({"companyId": obj.get("companyId"), "employeeId": obj.get("employeeId")}) return _obj - - diff --git a/bamboohr_sdk/models/employee_cursor_pagination_query_object.py b/bamboohr_sdk/models/employee_cursor_pagination_query_object.py new file mode 100644 index 0000000..5c4391f --- /dev/null +++ b/bamboohr_sdk/models/employee_cursor_pagination_query_object.py @@ -0,0 +1,96 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Annotated, Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class EmployeeCursorPaginationQueryObject(BaseModel): + """ + EmployeeCursorPaginationQueryObject + """ + + before: StrictStr | None = Field( + default=None, + description="Cursor pointing to the start of the previous page. Use the `prevCursor` value from the last response to paginate backward.", + ) + after: StrictStr | None = Field( + default=None, + description="Cursor pointing to the start of the next page. Use the `nextCursor` value from the last response to paginate forward.", + ) + limit: Annotated[int, Field(le=2500, strict=True, ge=1)] | None = Field( + default=250, description="Maximum number of items to return. This can be at most 2500." + ) + __properties: ClassVar[list[str]] = ["before", "after", "limit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeeCursorPaginationQueryObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeeCursorPaginationQueryObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "before": obj.get("before"), + "after": obj.get("after"), + "limit": obj.get("limit") if obj.get("limit") is not None else 250, + } + ) + return _obj diff --git a/bamboohr_sdk/models/employee_deleted_webhook_payload.py b/bamboohr_sdk/models/employee_deleted_webhook_payload.py index 7a3c627..6e73113 100644 --- a/bamboohr_sdk/models/employee_deleted_webhook_payload.py +++ b/bamboohr_sdk/models/employee_deleted_webhook_payload.py @@ -1,45 +1,45 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.employee_deleted_webhook_payload_data import EmployeeDeletedWebhookPayloadData -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.employee_deleted_webhook_payload_data import EmployeeDeletedWebhookPayloadData + + class EmployeeDeletedWebhookPayload(BaseModel): """ Webhook payload sent when an employee is deleted. - """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, description="The event type identifier") - timestamp: Optional[datetime] = Field(default=None, description="ISO 8601 timestamp (UTC) when the event was fired") - data: Optional[EmployeeDeletedWebhookPayloadData] = None - __properties: ClassVar[List[str]] = ["type", "timestamp", "data"] + """ + + type: StrictStr | None = Field(default=None, description="The event type identifier") + timestamp: datetime | None = Field(default=None, description="ISO 8601 timestamp (UTC) when the event was fired") + data: EmployeeDeletedWebhookPayloadData | None = None + __properties: ClassVar[list[str]] = ["type", "timestamp", "data"] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['employee.deleted']): + if value not in set(["employee.deleted"]): raise ValueError("must be one of enum values ('employee.deleted')") return value @@ -49,7 +49,6 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,11 +59,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeDeletedWebhookPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -74,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -84,11 +82,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of data if self.data: - _dict['data'] = self.data.to_dict() + _dict["data"] = self.data.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeDeletedWebhookPayload from a dict""" if obj is None: return None @@ -96,11 +94,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type"), - "timestamp": obj.get("timestamp"), - "data": EmployeeDeletedWebhookPayloadData.from_dict(obj["data"]) if obj.get("data") is not None else None - }) + _obj = cls.model_validate( + { + "type": obj.get("type"), + "timestamp": obj.get("timestamp"), + "data": EmployeeDeletedWebhookPayloadData.from_dict(obj["data"]) + if obj.get("data") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_deleted_webhook_payload_data.py b/bamboohr_sdk/models/employee_deleted_webhook_payload_data.py index 676592e..868f9a3 100644 --- a/bamboohr_sdk/models/employee_deleted_webhook_payload_data.py +++ b/bamboohr_sdk/models/employee_deleted_webhook_payload_data.py @@ -1,34 +1,35 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class EmployeeDeletedWebhookPayloadData(BaseModel): """ Event data containing employee information - """ # noqa: E501 - company_id: Optional[StrictStr] = Field(default=None, description="The company ID", alias="companyId") - employee_id: Optional[StrictStr] = Field(default=None, description="The employee ID that was deleted", alias="employeeId") - __properties: ClassVar[List[str]] = ["companyId", "employeeId"] + """ + + company_id: StrictStr | None = Field(default=None, description="The company ID", alias="companyId") + employee_id: StrictStr | None = Field( + default=None, description="The employee ID that was deleted", alias="employeeId" + ) + __properties: ClassVar[list[str]] = ["companyId", "employeeId"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +37,6 @@ class EmployeeDeletedWebhookPayloadData(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +47,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeDeletedWebhookPayloadData from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeDeletedWebhookPayloadData from a dict""" if obj is None: return None @@ -80,10 +79,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "companyId": obj.get("companyId"), - "employeeId": obj.get("employeeId") - }) + _obj = cls.model_validate({"companyId": obj.get("companyId"), "employeeId": obj.get("employeeId")}) return _obj - - diff --git a/bamboohr_sdk/models/employee_dependent.py b/bamboohr_sdk/models/employee_dependent.py index bf188cd..8fb70f2 100644 --- a/bamboohr_sdk/models/employee_dependent.py +++ b/bamboohr_sdk/models/employee_dependent.py @@ -1,69 +1,120 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class EmployeeDependent(BaseModel): """ EmployeeDependent - """ # noqa: E501 - employee_id: StrictStr = Field(description="The ID of the employee this dependent belongs to. Required.", alias="employeeId") - first_name: Optional[StrictStr] = Field(default=None, description="The dependent's first name.", alias="firstName") - middle_name: Optional[StrictStr] = Field(default=None, description="The dependent's middle name.", alias="middleName") - last_name: Optional[StrictStr] = Field(default=None, description="The dependent's last name.", alias="lastName") - relationship: Optional[StrictStr] = Field(default=None, description="The dependent's relationship to the employee (e.g. \"spouse\", \"child\", \"domestic_partner\").") - gender: Optional[StrictStr] = Field(default=None, description="The dependent's gender.") - ssn: Optional[StrictStr] = Field(default=None, description="The dependent's Social Security Number, provided as plain text. Stored encrypted. Returned as a masked value (e.g. \"xxx-xx-1234\") on read.") - sin: Optional[StrictStr] = Field(default=None, description="The dependent's Social Insurance Number (Canadian equivalent of SSN), provided as plain text. Stored encrypted. Returned as a masked value on read.") - date_of_birth: Optional[date] = Field(default=None, description="The dependent's date of birth in YYYY-MM-DD format.", alias="dateOfBirth") - address_line1: Optional[StrictStr] = Field(default=None, description="The first line of the dependent's address.", alias="addressLine1") - address_line2: Optional[StrictStr] = Field(default=None, description="The second line of the dependent's address.", alias="addressLine2") - city: Optional[StrictStr] = Field(default=None, description="The dependent's city.") - state: Optional[StrictStr] = Field(default=None, description="The dependent's state, provided as a state code (e.g. \"UT\"). Returned as a full state name on read.") - zip_code: Optional[StrictStr] = Field(default=None, description="The dependent's ZIP or postal code.", alias="zipCode") - home_phone: Optional[StrictStr] = Field(default=None, description="The dependent's home phone number.", alias="homePhone") - country: Optional[StrictStr] = Field(default=None, description="The dependent's country, provided as an ISO 3166-1 alpha-2 country code (e.g. \"US\"). Returned as a full country name on read.") - is_us_citizen: Optional[StrictStr] = Field(default=None, description="Whether the dependent is a US citizen. Accepted values: \"yes\" or \"no\".", alias="isUsCitizen") - is_student: Optional[StrictStr] = Field(default=None, description="Whether the dependent is currently a student. Accepted values: \"yes\" or \"no\".", alias="isStudent") - __properties: ClassVar[List[str]] = ["employeeId", "firstName", "middleName", "lastName", "relationship", "gender", "ssn", "sin", "dateOfBirth", "addressLine1", "addressLine2", "city", "state", "zipCode", "homePhone", "country", "isUsCitizen", "isStudent"] - - @field_validator('is_us_citizen') + """ + + employee_id: StrictStr = Field( + description="The internal employee ID of the employee this dependent belongs to. Required.", alias="employeeId" + ) + first_name: StrictStr | None = Field(default=None, description="The dependent's first name.", alias="firstName") + middle_name: StrictStr | None = Field(default=None, description="The dependent's middle name.", alias="middleName") + last_name: StrictStr | None = Field(default=None, description="The dependent's last name.", alias="lastName") + relationship: StrictStr | None = Field( + default=None, + description='The dependent\'s relationship to the employee (e.g. "spouse", "child", "domestic_partner").', + ) + gender: StrictStr | None = Field(default=None, description="The dependent's gender.") + ssn: StrictStr | None = Field( + default=None, + description='The dependent\'s Social Security Number, provided as plain text. Stored encrypted. Returned as a masked value (e.g. "xxx-xx-1234") on read.', + ) + sin: StrictStr | None = Field( + default=None, + description="The dependent's Social Insurance Number (Canadian equivalent of SSN), provided as plain text. Stored encrypted. Returned as a masked value on read.", + ) + date_of_birth: date | None = Field( + default=None, description="The dependent's date of birth in YYYY-MM-DD format.", alias="dateOfBirth" + ) + address_line1: StrictStr | None = Field( + default=None, description="The first line of the dependent's address.", alias="addressLine1" + ) + address_line2: StrictStr | None = Field( + default=None, description="The second line of the dependent's address.", alias="addressLine2" + ) + city: StrictStr | None = Field(default=None, description="The dependent's city.") + state: StrictStr | None = Field( + default=None, + description='The dependent\'s state, provided as a state code (e.g. "UT"). Returned as a full state name on read.', + ) + zip_code: StrictStr | None = Field(default=None, description="The dependent's ZIP or postal code.", alias="zipCode") + home_phone: StrictStr | None = Field( + default=None, description="The dependent's home phone number.", alias="homePhone" + ) + country: StrictStr | None = Field( + default=None, + description='The dependent\'s country, provided as an ISO 3166-1 alpha-2 country code (e.g. "US"). Returned as a full country name on read.', + ) + is_us_citizen: StrictStr | None = Field( + default=None, + description='Whether the dependent is a US citizen. Accepted values: "yes" or "no".', + alias="isUsCitizen", + ) + is_student: StrictStr | None = Field( + default=None, + description='Whether the dependent is currently a student. Accepted values: "yes" or "no".', + alias="isStudent", + ) + __properties: ClassVar[list[str]] = [ + "employeeId", + "firstName", + "middleName", + "lastName", + "relationship", + "gender", + "ssn", + "sin", + "dateOfBirth", + "addressLine1", + "addressLine2", + "city", + "state", + "zipCode", + "homePhone", + "country", + "isUsCitizen", + "isStudent", + ] + + @field_validator("is_us_citizen") def is_us_citizen_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value - @field_validator('is_student') + @field_validator("is_student") def is_student_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value @@ -73,7 +124,6 @@ def is_student_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -84,11 +134,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeDependent from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -98,8 +148,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -109,7 +158,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeDependent from a dict""" if obj is None: return None @@ -117,26 +166,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "employeeId": obj.get("employeeId"), - "firstName": obj.get("firstName"), - "middleName": obj.get("middleName"), - "lastName": obj.get("lastName"), - "relationship": obj.get("relationship"), - "gender": obj.get("gender"), - "ssn": obj.get("ssn"), - "sin": obj.get("sin"), - "dateOfBirth": obj.get("dateOfBirth"), - "addressLine1": obj.get("addressLine1"), - "addressLine2": obj.get("addressLine2"), - "city": obj.get("city"), - "state": obj.get("state"), - "zipCode": obj.get("zipCode"), - "homePhone": obj.get("homePhone"), - "country": obj.get("country"), - "isUsCitizen": obj.get("isUsCitizen"), - "isStudent": obj.get("isStudent") - }) + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "relationship": obj.get("relationship"), + "gender": obj.get("gender"), + "ssn": obj.get("ssn"), + "sin": obj.get("sin"), + "dateOfBirth": obj.get("dateOfBirth"), + "addressLine1": obj.get("addressLine1"), + "addressLine2": obj.get("addressLine2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zipCode": obj.get("zipCode"), + "homePhone": obj.get("homePhone"), + "country": obj.get("country"), + "isUsCitizen": obj.get("isUsCitizen"), + "isStudent": obj.get("isStudent"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_dependents_response.py b/bamboohr_sdk/models/employee_dependents_response.py index a764740..9daea5d 100644 --- a/bamboohr_sdk/models/employee_dependents_response.py +++ b/bamboohr_sdk/models/employee_dependents_response.py @@ -1,34 +1,38 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.employee_dependents_response_employee_dependents_inner import EmployeeDependentsResponseEmployeeDependentsInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.employee_dependents_response_employee_dependents_inner import ( + EmployeeDependentsResponseEmployeeDependentsInner, +) + + class EmployeeDependentsResponse(BaseModel): """ EmployeeDependentsResponse - """ # noqa: E501 - employee_dependents: Optional[List[EmployeeDependentsResponseEmployeeDependentsInner]] = Field(default=None, description="Array of employee dependent objects.", alias="Employee Dependents") - __properties: ClassVar[List[str]] = ["Employee Dependents"] + """ + + employee_dependents: list[EmployeeDependentsResponseEmployeeDependentsInner] | None = Field( + default=None, description="Array of employee dependent objects.", alias="Employee Dependents" + ) + __properties: ClassVar[list[str]] = ["Employee Dependents"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +40,6 @@ class EmployeeDependentsResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +50,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeDependentsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,11 +77,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_employee_dependents in self.employee_dependents: if _item_employee_dependents: _items.append(_item_employee_dependents.to_dict()) - _dict['Employee Dependents'] = _items + _dict["Employee Dependents"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeDependentsResponse from a dict""" if obj is None: return None @@ -87,9 +89,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "Employee Dependents": [EmployeeDependentsResponseEmployeeDependentsInner.from_dict(_item) for _item in obj["Employee Dependents"]] if obj.get("Employee Dependents") is not None else None - }) + _obj = cls.model_validate( + { + "Employee Dependents": [ + EmployeeDependentsResponseEmployeeDependentsInner.from_dict(_item) + for _item in obj["Employee Dependents"] + ] + if obj.get("Employee Dependents") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_dependents_response_employee_dependents_inner.py b/bamboohr_sdk/models/employee_dependents_response_employee_dependents_inner.py index 9dd3690..501039c 100644 --- a/bamboohr_sdk/models/employee_dependents_response_employee_dependents_inner.py +++ b/bamboohr_sdk/models/employee_dependents_response_employee_dependents_inner.py @@ -1,70 +1,95 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class EmployeeDependentsResponseEmployeeDependentsInner(BaseModel): """ EmployeeDependentsResponseEmployeeDependentsInner - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The unique ID of the dependent record.") - employee_id: Optional[StrictStr] = Field(default=None, description="The ID of the employee this dependent belongs to.", alias="employeeId") - first_name: Optional[StrictStr] = Field(default=None, description="The dependent's first name.", alias="firstName") - middle_name: Optional[StrictStr] = Field(default=None, description="The dependent's middle name. Null if not set.", alias="middleName") - last_name: Optional[StrictStr] = Field(default=None, description="The dependent's last name.", alias="lastName") - relationship: Optional[StrictStr] = Field(default=None, description="The dependent's relationship to the employee.") - gender: Optional[StrictStr] = Field(default=None, description="The dependent's gender.") - masked_ssn: Optional[StrictStr] = Field(default=None, description="The dependent's masked SSN (e.g. \"xxx-xx-1234\"). Null if no SSN on file.", alias="maskedSSN") - masked_sin: Optional[StrictStr] = Field(default=None, description="The dependent's masked SIN. Null if no SIN on file.", alias="maskedSIN") - date_of_birth: Optional[date] = Field(default=None, description="The dependent's date of birth in YYYY-MM-DD format.", alias="dateOfBirth") - address_line1: Optional[StrictStr] = Field(default=None, description="The first line of the dependent's address. Null if not set.", alias="addressLine1") - address_line2: Optional[StrictStr] = Field(default=None, description="The second line of the dependent's address. Null if not set.", alias="addressLine2") - city: Optional[StrictStr] = Field(default=None, description="The dependent's city. Null if not set.") - state: Optional[StrictStr] = Field(default=None, description="The dependent's state as a full name (e.g. \"Utah\"). Null if not set.") - zip_code: Optional[StrictStr] = Field(default=None, description="The dependent's ZIP or postal code. Null if not set.", alias="zipCode") - home_phone: Optional[StrictStr] = Field(default=None, description="The dependent's home phone number. Null if not set.", alias="homePhone") - country: Optional[StrictStr] = Field(default=None, description="The dependent's country as a full name (e.g. \"United States\"). Null if not set.") - is_us_citizen: Optional[StrictStr] = Field(default=None, description="Whether the dependent is a US citizen. \"yes\" or \"no\".", alias="isUsCitizen") - is_student: Optional[StrictStr] = Field(default=None, description="Whether the dependent is currently a student. \"yes\" or \"no\".", alias="isStudent") - __properties: ClassVar[List[str]] = ["id", "employeeId", "firstName", "middleName", "lastName", "relationship", "gender", "maskedSSN", "maskedSIN", "dateOfBirth", "addressLine1", "addressLine2", "city", "state", "zipCode", "homePhone", "country", "isUsCitizen", "isStudent"] - - @field_validator('is_us_citizen') + """ + + id: StrictStr | None = Field(default=None, description="The unique ID of the dependent record.") + employee_id: StrictStr | None = Field( + default=None, + description="The internal employee ID of the employee this dependent belongs to.", + alias="employeeId", + ) + first_name: StrictStr | None = Field(default=None, description="The dependent's first name.", alias="firstName") + middle_name: StrictStr | None = Field(default=None, alias="middleName") + last_name: StrictStr | None = Field(default=None, description="The dependent's last name.", alias="lastName") + relationship: StrictStr | None = Field(default=None, description="The dependent's relationship to the employee.") + gender: StrictStr | None = Field(default=None, description="The dependent's gender.") + masked_ssn: StrictStr | None = Field(default=None, alias="maskedSSN") + masked_sin: StrictStr | None = Field(default=None, alias="maskedSIN") + date_of_birth: date | None = Field( + default=None, description="The dependent's date of birth in YYYY-MM-DD format.", alias="dateOfBirth" + ) + address_line1: StrictStr | None = Field(default=None, alias="addressLine1") + address_line2: StrictStr | None = Field(default=None, alias="addressLine2") + city: StrictStr | None = None + state: StrictStr | None = None + zip_code: StrictStr | None = Field(default=None, alias="zipCode") + home_phone: StrictStr | None = Field(default=None, alias="homePhone") + country: StrictStr | None = None + is_us_citizen: StrictStr | None = Field(default=None, alias="isUsCitizen") + is_student: StrictStr | None = Field(default=None, alias="isStudent") + __properties: ClassVar[list[str]] = [ + "id", + "employeeId", + "firstName", + "middleName", + "lastName", + "relationship", + "gender", + "maskedSSN", + "maskedSIN", + "dateOfBirth", + "addressLine1", + "addressLine2", + "city", + "state", + "zipCode", + "homePhone", + "country", + "isUsCitizen", + "isStudent", + ] + + @field_validator("is_us_citizen") def is_us_citizen_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value - @field_validator('is_student') + @field_validator("is_student") def is_student_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value @@ -74,7 +99,6 @@ def is_student_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -85,11 +109,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeDependentsResponseEmployeeDependentsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -99,8 +123,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -110,57 +133,67 @@ def to_dict(self) -> Dict[str, Any]: # set to None if middle_name (nullable) is None # and model_fields_set contains the field if self.middle_name is None and "middle_name" in self.model_fields_set: - _dict['middleName'] = None + _dict["middleName"] = None # set to None if masked_ssn (nullable) is None # and model_fields_set contains the field if self.masked_ssn is None and "masked_ssn" in self.model_fields_set: - _dict['maskedSSN'] = None + _dict["maskedSSN"] = None # set to None if masked_sin (nullable) is None # and model_fields_set contains the field if self.masked_sin is None and "masked_sin" in self.model_fields_set: - _dict['maskedSIN'] = None + _dict["maskedSIN"] = None # set to None if address_line1 (nullable) is None # and model_fields_set contains the field if self.address_line1 is None and "address_line1" in self.model_fields_set: - _dict['addressLine1'] = None + _dict["addressLine1"] = None # set to None if address_line2 (nullable) is None # and model_fields_set contains the field if self.address_line2 is None and "address_line2" in self.model_fields_set: - _dict['addressLine2'] = None + _dict["addressLine2"] = None # set to None if city (nullable) is None # and model_fields_set contains the field if self.city is None and "city" in self.model_fields_set: - _dict['city'] = None + _dict["city"] = None # set to None if state (nullable) is None # and model_fields_set contains the field if self.state is None and "state" in self.model_fields_set: - _dict['state'] = None + _dict["state"] = None # set to None if zip_code (nullable) is None # and model_fields_set contains the field if self.zip_code is None and "zip_code" in self.model_fields_set: - _dict['zipCode'] = None + _dict["zipCode"] = None # set to None if home_phone (nullable) is None # and model_fields_set contains the field if self.home_phone is None and "home_phone" in self.model_fields_set: - _dict['homePhone'] = None + _dict["homePhone"] = None # set to None if country (nullable) is None # and model_fields_set contains the field if self.country is None and "country" in self.model_fields_set: - _dict['country'] = None + _dict["country"] = None + + # set to None if is_us_citizen (nullable) is None + # and model_fields_set contains the field + if self.is_us_citizen is None and "is_us_citizen" in self.model_fields_set: + _dict["isUsCitizen"] = None + + # set to None if is_student (nullable) is None + # and model_fields_set contains the field + if self.is_student is None and "is_student" in self.model_fields_set: + _dict["isStudent"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeDependentsResponseEmployeeDependentsInner from a dict""" if obj is None: return None @@ -168,27 +201,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "employeeId": obj.get("employeeId"), - "firstName": obj.get("firstName"), - "middleName": obj.get("middleName"), - "lastName": obj.get("lastName"), - "relationship": obj.get("relationship"), - "gender": obj.get("gender"), - "maskedSSN": obj.get("maskedSSN"), - "maskedSIN": obj.get("maskedSIN"), - "dateOfBirth": obj.get("dateOfBirth"), - "addressLine1": obj.get("addressLine1"), - "addressLine2": obj.get("addressLine2"), - "city": obj.get("city"), - "state": obj.get("state"), - "zipCode": obj.get("zipCode"), - "homePhone": obj.get("homePhone"), - "country": obj.get("country"), - "isUsCitizen": obj.get("isUsCitizen"), - "isStudent": obj.get("isStudent") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "employeeId": obj.get("employeeId"), + "firstName": obj.get("firstName"), + "middleName": obj.get("middleName"), + "lastName": obj.get("lastName"), + "relationship": obj.get("relationship"), + "gender": obj.get("gender"), + "maskedSSN": obj.get("maskedSSN"), + "maskedSIN": obj.get("maskedSIN"), + "dateOfBirth": obj.get("dateOfBirth"), + "addressLine1": obj.get("addressLine1"), + "addressLine2": obj.get("addressLine2"), + "city": obj.get("city"), + "state": obj.get("state"), + "zipCode": obj.get("zipCode"), + "homePhone": obj.get("homePhone"), + "country": obj.get("country"), + "isUsCitizen": obj.get("isUsCitizen"), + "isStudent": obj.get("isStudent"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_file_update.py b/bamboohr_sdk/models/employee_file_update.py index 7cd63be..36f6506 100644 --- a/bamboohr_sdk/models/employee_file_update.py +++ b/bamboohr_sdk/models/employee_file_update.py @@ -1,54 +1,63 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class EmployeeFileUpdate(BaseModel): """ EmployeeFileUpdate - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="The new display name for the file.") - category_id: Optional[StrictInt] = Field(default=None, description="The ID of the file category (section) to move the file into.", alias="categoryId") - share_with_employee: Optional[StrictStr] = Field(default=None, description="Whether the file is shared with the employee. Also accepted as 'shareWithEmployees'.", alias="shareWithEmployee") - share_with_employees: Optional[StrictStr] = Field(default=None, description="Alias for shareWithEmployee. Whether the file is shared with the employee.", alias="shareWithEmployees") - __properties: ClassVar[List[str]] = ["name", "categoryId", "shareWithEmployee", "shareWithEmployees"] - - @field_validator('share_with_employee') + """ + + name: StrictStr | None = Field(default=None, description="The new display name for the file.") + category_id: StrictInt | None = Field( + default=None, description="The ID of the file category (section) to move the file into.", alias="categoryId" + ) + share_with_employee: StrictStr | None = Field( + default=None, + description="Whether the file is shared with the employee. Also accepted as 'shareWithEmployees'.", + alias="shareWithEmployee", + ) + share_with_employees: StrictStr | None = Field( + default=None, + description="Alias for shareWithEmployee. Whether the file is shared with the employee.", + alias="shareWithEmployees", + ) + __properties: ClassVar[list[str]] = ["name", "categoryId", "shareWithEmployee", "shareWithEmployees"] + + @field_validator("share_with_employee") def share_with_employee_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value - @field_validator('share_with_employees') + @field_validator("share_with_employees") def share_with_employees_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value @@ -58,7 +67,6 @@ def share_with_employees_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,11 +77,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeFileUpdate from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -83,8 +91,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -94,7 +101,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeFileUpdate from a dict""" if obj is None: return None @@ -102,12 +109,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "categoryId": obj.get("categoryId"), - "shareWithEmployee": obj.get("shareWithEmployee"), - "shareWithEmployees": obj.get("shareWithEmployees") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "categoryId": obj.get("categoryId"), + "shareWithEmployee": obj.get("shareWithEmployee"), + "shareWithEmployees": obj.get("shareWithEmployees"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_optional_field.py b/bamboohr_sdk/models/employee_optional_field.py new file mode 100644 index 0000000..85c5c1c --- /dev/null +++ b/bamboohr_sdk/models/employee_optional_field.py @@ -0,0 +1,156 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +from enum import Enum + +from typing_extensions import Self + + +class EmployeeOptionalField(str, Enum): + """ + Valid field names that can be passed via the `fields` query parameter to request additional employee data beyond the default set. + """ + + """ + allowed enum values + """ + ADDRESSLINE1 = "addressLine1" + ADDRESSLINE2 = "addressLine2" + AGE = "age" + ALLERGIES = "allergies" + BESTEMAIL = "bestEmail" + BIRTHDATE = "birthDate" + BIRTHPLACE = "birthplace" + CITIZENSHIP = "citizenship" + CITIZENSHIPID = "citizenshipId" + CITY = "city" + COMPENSATIONCHANGEREASON = "compensationChangeReason" + COMPENSATIONCHANGEREASONID = "compensationChangeReasonId" + COMPENSATIONCOMMENT = "compensationComment" + COMPENSATIONEFFECTIVEDATE = "compensationEffectiveDate" + COMPENSATIONENDDATE = "compensationEndDate" + CONTRACTENDDATE = "contractEndDate" + COUNTRY = "country" + COUNTRYID = "countryId" + DEPARTMENTID = "departmentId" + DEPARTMENTNAME = "departmentName" + DIETARYRESTRICTIONS = "dietaryRestrictions" + DISPLAYNAME = "displayName" + DIVISIONID = "divisionId" + DIVISIONNAME = "divisionName" + EEOJOBCATEGORY = "eeoJobCategory" + EEOJOBCATEGORYID = "eeoJobCategoryId" + EIN = "ein" + ELIGIBLEFORREHIRE = "eligibleForRehire" + ELIGIBLEFORREHIREID = "eligibleForRehireId" + EMPLOYEENAME = "employeeName" + EMPLOYEENUMBER = "employeeNumber" + EMPLOYMENTSTATUSCOMMENT = "employmentStatusComment" + EMPLOYMENTSTATUSEFFECTIVEDATE = "employmentStatusEffectiveDate" + EMPLOYMENTSTATUSID = "employmentStatusId" + EMPLOYMENTSTATUSNAME = "employmentStatusName" + EMPLOYMENTTYPE = "employmentType" + EMPLOYMENTTYPEID = "employmentTypeId" + ETHNICITY = "ethnicity" + ETHNICITYID = "ethnicityId" + FACEBOOKURL = "facebookUrl" + FINALDOSEADMINISTRATIONDATE = "finalDoseAdministrationDate" + FINALPAYDATE = "finalPayDate" + FIRSTNAMELASTNAME = "firstNameLastName" + FIRSTNAMEMIDDLEINITIAL = "firstNameMiddleInitial" + FLSACODE = "flsaCode" + FLSACODEID = "flsaCodeId" + GENDER = "gender" + GENDERIDENTITY = "genderIdentity" + GENDERIDENTITYID = "genderIdentityId" + HIREDATE = "hireDate" + HOMEEMAIL = "homeEmail" + HOMEPHONE = "homePhone" + HOURSPERPAYCYCLE = "hoursPerPayCycle" + INSTAGRAMURL = "instagramUrl" + ISMANAGER = "isManager" + JACKETSIZE = "jacketSize" + JACKETSIZEID = "jacketSizeId" + JOBINFORMATIONEFFECTIVEDATE = "jobInformationEffectiveDate" + JOBTITLEID = "jobTitleId" + LINKEDINURL = "linkedinUrl" + LOCATIONID = "locationId" + LOCATIONNAME = "locationName" + MARITALSTATUS = "maritalStatus" + MIDDLEINITIAL = "middleInitial" + MIDDLENAME = "middleName" + MOBILEPHONE = "mobilePhone" + NATIONALID = "nationalId" + NATIONALINSURANCECATEGORY = "nationalInsuranceCategory" + NATIONALINSURANCECATEGORYID = "nationalInsuranceCategoryId" + NATIONALITY = "nationality" + NATIONALITYID = "nationalityId" + NICKNAME = "nickName" + NIN = "nin" + NOTICEPERIOD = "noticePeriod" + NOTICEPERIODID = "noticePeriodId" + ORIGINALHIREDATE = "originalHireDate" + OVERTIME = "overtime" + OVERTIMERATE = "overtimeRate" + PAIDPER = "paidPer" + PAYRATE = "payRate" + PAYSCHEDULE = "paySchedule" + PAYSCHEDULEID = "payScheduleId" + PAYTYPE = "payType" + PINTERESTURL = "pinterestUrl" + PREFERREDNAMELASTNAME = "preferredNameLastName" + PROBATIONENDDATE = "probationEndDate" + PRONOUNS = "pronouns" + PRONOUNSID = "pronounsId" + PROOFOFVACCINATION = "proofOfVaccination" + REPORTSTOID = "reportsToId" + REPORTSTONAME = "reportsToName" + SECONDARYLANGUAGE = "secondaryLanguage" + SHIRTSIZE = "shirtSize" + SHIRTSIZEID = "shirtSizeId" + SIN = "sin" + SKYPEUSERNAME = "skypeUsername" + SSN = "ssn" + STATE = "state" + STATEID = "stateId" + TAXTYPEID = "taxTypeId" + TEAMS = "teams" + TENURE = "tenure" + TERMINATIONDATE = "terminationDate" + TERMINATIONREASON = "terminationReason" + TERMINATIONREASONID = "terminationReasonId" + TERMINATIONREGRETTABLE = "terminationRegrettable" + TERMINATIONREGRETTABLEID = "terminationRegrettableId" + TERMINATIONTYPE = "terminationType" + TERMINATIONTYPEID = "terminationTypeId" + TIMEZONE = "timezone" + TSHIRTSIZE = "tShirtSize" + TSHIRTSIZEID = "tShirtSizeId" + TWITTERURL = "twitterUrl" + USERID = "userId" + VACCINATIONSTATUS = "vaccinationStatus" + VACCINATIONSTATUSID = "vaccinationStatusId" + VACCINERECEIVED = "vaccineReceived" + VACCINERECEIVEDID = "vaccineReceivedId" + VETERANSTATUS = "veteranStatus" + VETERANSTATUSID = "veteranStatusId" + WORKEMAIL = "workEmail" + WORKPHONE = "workPhone" + WORKPHONEEXTENSION = "workPhoneExtension" + ZIPCODE = "zipcode" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EmployeeOptionalField from a JSON string""" + return cls(json.loads(json_str)) diff --git a/bamboohr_sdk/models/employee_photo_json_response.py b/bamboohr_sdk/models/employee_photo_json_response.py new file mode 100644 index 0000000..22a2a42 --- /dev/null +++ b/bamboohr_sdk/models/employee_photo_json_response.py @@ -0,0 +1,87 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing_extensions import Self + + +class EmployeePhotoJsonResponse(BaseModel): + """ + EmployeePhotoJsonResponse + """ + + mime_type: StrictStr = Field( + description="The actual MIME type of the underlying image (e.g. `image/jpeg`, `image/png`, `image/bmp`, `image/gif`, `image/tiff`). Use this to identify the format of the decoded bytes.", + alias="mimeType", + ) + file_base64: StrictBytes | StrictStr = Field( + description="Base64-encoded image bytes. Decoding produces the same bytes returned by the binary variant of this endpoint.", + alias="fileBase64", + ) + __properties: ClassVar[list[str]] = ["mimeType", "fileBase64"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeePhotoJsonResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeePhotoJsonResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"mimeType": obj.get("mimeType"), "fileBase64": obj.get("fileBase64")}) + return _obj diff --git a/bamboohr_sdk/models/employee_response.py b/bamboohr_sdk/models/employee_response.py index 4d9ece9..8561294 100644 --- a/bamboohr_sdk/models/employee_response.py +++ b/bamboohr_sdk/models/employee_response.py @@ -1,37 +1,37 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from bamboohr_sdk.models.employee_response_aggregations_inner import EmployeeResponseAggregationsInner from bamboohr_sdk.models.pagination import Pagination -from typing import Optional, Set -from typing_extensions import Self + class EmployeeResponse(BaseModel): """ EmployeeResponse - """ # noqa: E501 - data: Optional[List[Dict[str, Any]]] = None - aggregations: Optional[List[EmployeeResponseAggregationsInner]] = None - pagination: Optional[Pagination] = None - __properties: ClassVar[List[str]] = ["data", "aggregations", "pagination"] + """ + + data: list[dict[str, Any]] | None = None + aggregations: list[EmployeeResponseAggregationsInner] | None = None + pagination: Pagination | None = None + __properties: ClassVar[list[str]] = ["data", "aggregations", "pagination"] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +39,6 @@ class EmployeeResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,11 +49,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -64,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -78,14 +76,14 @@ def to_dict(self) -> Dict[str, Any]: for _item_aggregations in self.aggregations: if _item_aggregations: _items.append(_item_aggregations.to_dict()) - _dict['aggregations'] = _items + _dict["aggregations"] = _items # override the default output from pydantic by calling `to_dict()` of pagination if self.pagination: - _dict['pagination'] = self.pagination.to_dict() + _dict["pagination"] = self.pagination.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeResponse from a dict""" if obj is None: return None @@ -93,11 +91,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "data": obj.get("data"), - "aggregations": [EmployeeResponseAggregationsInner.from_dict(_item) for _item in obj["aggregations"]] if obj.get("aggregations") is not None else None, - "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None - }) + _obj = cls.model_validate( + { + "data": obj.get("data"), + "aggregations": [EmployeeResponseAggregationsInner.from_dict(_item) for _item in obj["aggregations"]] + if obj.get("aggregations") is not None + else None, + "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_response_aggregations_inner.py b/bamboohr_sdk/models/employee_response_aggregations_inner.py index 3a3551d..9202387 100644 --- a/bamboohr_sdk/models/employee_response_aggregations_inner.py +++ b/bamboohr_sdk/models/employee_response_aggregations_inner.py @@ -1,36 +1,35 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class EmployeeResponseAggregationsInner(BaseModel): """ EmployeeResponseAggregationsInner - """ # noqa: E501 - var_field: Optional[StrictStr] = Field(default=None, alias="field") - aggregation_type: Optional[StrictStr] = Field(default=None, alias="aggregationType") - groups: Optional[Dict[str, Any]] = None - all: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = ["field", "aggregationType", "groups", "all"] + """ + + var_field: StrictStr | None = Field(default=None, alias="field") + aggregation_type: StrictStr | None = Field(default=None, alias="aggregationType") + groups: dict[str, Any] | None = None + all: StrictInt | None = None + __properties: ClassVar[list[str]] = ["field", "aggregationType", "groups", "all"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +37,6 @@ class EmployeeResponseAggregationsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +47,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeResponseAggregationsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +61,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,7 +71,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeResponseAggregationsInner from a dict""" if obj is None: return None @@ -82,12 +79,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "field": obj.get("field"), - "aggregationType": obj.get("aggregationType"), - "groups": obj.get("groups"), - "all": obj.get("all") - }) + _obj = cls.model_validate( + { + "field": obj.get("field"), + "aggregationType": obj.get("aggregationType"), + "groups": obj.get("groups"), + "all": obj.get("all"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_string_code_error_response_v1.py b/bamboohr_sdk/models/employee_string_code_error_response_v1.py new file mode 100644 index 0000000..d09a9ec --- /dev/null +++ b/bamboohr_sdk/models/employee_string_code_error_response_v1.py @@ -0,0 +1,91 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + +from bamboohr_sdk.models.employee_string_code_error_response_v1_error import EmployeeStringCodeErrorResponseV1Error + + +class EmployeeStringCodeErrorResponseV1(BaseModel): + """ + Error response returned by Employee API endpoints where `error.code` is a string identifier. + """ + + error: EmployeeStringCodeErrorResponseV1Error + __properties: ClassVar[list[str]] = ["error"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeeStringCodeErrorResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict["error"] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeeStringCodeErrorResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "error": EmployeeStringCodeErrorResponseV1Error.from_dict(obj["error"]) + if obj.get("error") is not None + else None + } + ) + return _obj diff --git a/bamboohr_sdk/models/employee_string_code_error_response_v1_error.py b/bamboohr_sdk/models/employee_string_code_error_response_v1_error.py new file mode 100644 index 0000000..ab46b0a --- /dev/null +++ b/bamboohr_sdk/models/employee_string_code_error_response_v1_error.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class EmployeeStringCodeErrorResponseV1Error(BaseModel): + """ + EmployeeStringCodeErrorResponseV1Error + """ + + code: StrictStr = Field(description="String error code identifier (for example `BadRequest` or `BadPage`).") + message: StrictStr = Field(description="Human-readable error message.") + __properties: ClassVar[list[str]] = ["code", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeeStringCodeErrorResponseV1Error from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeeStringCodeErrorResponseV1Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"code": obj.get("code"), "message": obj.get("message")}) + return _obj diff --git a/bamboohr_sdk/models/employee_table_row.py b/bamboohr_sdk/models/employee_table_row.py index 9ed1a1c..f3fc8d7 100644 --- a/bamboohr_sdk/models/employee_table_row.py +++ b/bamboohr_sdk/models/employee_table_row.py @@ -1,35 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class EmployeeTableRow(BaseModel): """ A single row from the requested table. The returned fields depend on the table and the caller's field-level permissions. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The table row ID.") - employee_id: Optional[StrictStr] = Field(default=None, description="The employee ID that owns this row.", alias="employeeId") - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["id", "employeeId"] + """ + + id: StrictStr | None = Field(default=None, description="The table row ID.") + employee_id: StrictStr | None = Field( + default=None, description="The internal employee ID that owns this row.", alias="employeeId" + ) + additional_properties: dict[str, Any] = {} + __properties: ClassVar[list[str]] = ["id", "employeeId"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +38,6 @@ class EmployeeTableRow(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeTableRow from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,9 +63,11 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) + excluded_fields: set[str] = set( + [ + "additional_properties", + ] + ) _dict = self.model_dump( by_alias=True, @@ -80,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeTableRow from a dict""" if obj is None: return None @@ -88,15 +90,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "employeeId": obj.get("employeeId") - }) + _obj = cls.model_validate({"id": obj.get("id"), "employeeId": obj.get("employeeId")}) # store additional fields in additional_properties for _key in obj.keys(): if _key not in cls.__properties: _obj.additional_properties[_key] = obj.get(_key) return _obj - - diff --git a/bamboohr_sdk/models/employee_table_row_value.py b/bamboohr_sdk/models/employee_table_row_value.py deleted file mode 100644 index dc845c3..0000000 --- a/bamboohr_sdk/models/employee_table_row_value.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator -from typing import Any, Dict, List, Optional, Union -from bamboohr_sdk.models.employee_table_row_value_any_of_inner import EmployeeTableRowValueAnyOfInner -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -EMPLOYEETABLEROWVALUE_ANY_OF_SCHEMAS = ["Dict[str, object]", "List[EmployeeTableRowValueAnyOfInner]", "bool", "float", "int", "str"] - -class EmployeeTableRowValue(BaseModel): - """ - EmployeeTableRowValue - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: float - anyof_schema_2_validator: Optional[Union[StrictFloat, StrictInt]] = None - # data type: bool - anyof_schema_3_validator: Optional[StrictBool] = None - # data type: int - anyof_schema_4_validator: Optional[StrictInt] = None - # data type: List[EmployeeTableRowValueAnyOfInner] - anyof_schema_5_validator: Optional[List[Optional[EmployeeTableRowValueAnyOfInner]]] = None - # data type: Dict[str, object] - anyof_schema_6_validator: Optional[Dict[str, Any]] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[Dict[str, object], List[EmployeeTableRowValueAnyOfInner], bool, float, int, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "Dict[str, object]", "List[EmployeeTableRowValueAnyOfInner]", "bool", "float", "int", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - if v is None: - return v - - instance = EmployeeTableRowValue.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: float - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: bool - try: - instance.anyof_schema_3_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: int - try: - instance.anyof_schema_4_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: List[EmployeeTableRowValueAnyOfInner] - try: - instance.anyof_schema_5_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: Dict[str, object] - try: - instance.anyof_schema_6_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in EmployeeTableRowValue with anyOf schemas: Dict[str, object], List[EmployeeTableRowValueAnyOfInner], bool, float, int, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - if json_str is None: - return instance - - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into float - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into bool - try: - # validation - instance.anyof_schema_3_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_3_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into int - try: - # validation - instance.anyof_schema_4_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_4_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into List[EmployeeTableRowValueAnyOfInner] - try: - # validation - instance.anyof_schema_5_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_5_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Dict[str, object] - try: - # validation - instance.anyof_schema_6_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_6_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into EmployeeTableRowValue with anyOf schemas: Dict[str, object], List[EmployeeTableRowValueAnyOfInner], bool, float, int, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Dict[str, object], List[EmployeeTableRowValueAnyOfInner], bool, float, int, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/bamboohr_sdk/models/employee_time_off_policy_assignment.py b/bamboohr_sdk/models/employee_time_off_policy_assignment.py index 7e83b0e..1725e76 100644 --- a/bamboohr_sdk/models/employee_time_off_policy_assignment.py +++ b/bamboohr_sdk/models/employee_time_off_policy_assignment.py @@ -1,36 +1,41 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing_extensions import Self + class EmployeeTimeOffPolicyAssignment(BaseModel): """ EmployeeTimeOffPolicyAssignment - """ # noqa: E501 - time_off_policy_id: Optional[StrictInt] = Field(default=None, description="The ID of the assigned time off policy.", alias="timeOffPolicyId") - time_off_type_id: Optional[StrictInt] = Field(default=None, description="The ID of the time off type.", alias="timeOffTypeId") - accrual_start_date: Optional[date] = Field(default=None, description="The date accruals started in YYYY-MM-DD format.", alias="accrualStartDate") - __properties: ClassVar[List[str]] = ["timeOffPolicyId", "timeOffTypeId", "accrualStartDate"] + """ + + time_off_policy_id: StrictStr | None = Field( + default=None, description="The ID of the assigned time off policy.", alias="timeOffPolicyId" + ) + time_off_type_id: StrictInt | None = Field( + default=None, description="The ID of the time off type.", alias="timeOffTypeId" + ) + accrual_start_date: date | None = Field( + default=None, description="The date accruals started in YYYY-MM-DD format.", alias="accrualStartDate" + ) + __properties: ClassVar[list[str]] = ["timeOffPolicyId", "timeOffTypeId", "accrualStartDate"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +43,6 @@ class EmployeeTimeOffPolicyAssignment(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +53,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeTimeOffPolicyAssignment from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +67,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeTimeOffPolicyAssignment from a dict""" if obj is None: return None @@ -82,11 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "timeOffPolicyId": obj.get("timeOffPolicyId"), - "timeOffTypeId": obj.get("timeOffTypeId"), - "accrualStartDate": obj.get("accrualStartDate") - }) + _obj = cls.model_validate( + { + "timeOffPolicyId": obj.get("timeOffPolicyId"), + "timeOffTypeId": obj.get("timeOffTypeId"), + "accrualStartDate": obj.get("accrualStartDate"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_time_off_policy_assignment_v11.py b/bamboohr_sdk/models/employee_time_off_policy_assignment_v11.py index 5730d99..4ff952b 100644 --- a/bamboohr_sdk/models/employee_time_off_policy_assignment_v11.py +++ b/bamboohr_sdk/models/employee_time_off_policy_assignment_v11.py @@ -1,36 +1,39 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing_extensions import Self + class EmployeeTimeOffPolicyAssignmentV11(BaseModel): """ EmployeeTimeOffPolicyAssignmentV11 - """ # noqa: E501 - time_off_policy_id: Optional[StrictInt] = Field(default=None, description="The ID of the assigned time off policy.", alias="timeOffPolicyId") - time_off_type_id: Optional[StrictInt] = Field(default=None, description="The ID of the time off type.", alias="timeOffTypeId") - accrual_start_date: Optional[date] = Field(default=None, description="The date accruals started in YYYY-MM-DD format. Null for manual and unlimited policy types.", alias="accrualStartDate") - __properties: ClassVar[List[str]] = ["timeOffPolicyId", "timeOffTypeId", "accrualStartDate"] + """ + + time_off_policy_id: StrictStr | None = Field( + default=None, description="The ID of the assigned time off policy.", alias="timeOffPolicyId" + ) + time_off_type_id: StrictInt | None = Field( + default=None, description="The ID of the time off type.", alias="timeOffTypeId" + ) + accrual_start_date: date | None = Field(default=None, alias="accrualStartDate") + __properties: ClassVar[list[str]] = ["timeOffPolicyId", "timeOffTypeId", "accrualStartDate"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +41,6 @@ class EmployeeTimeOffPolicyAssignmentV11(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +51,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeTimeOffPolicyAssignmentV11 from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -74,12 +75,12 @@ def to_dict(self) -> Dict[str, Any]: # set to None if accrual_start_date (nullable) is None # and model_fields_set contains the field if self.accrual_start_date is None and "accrual_start_date" in self.model_fields_set: - _dict['accrualStartDate'] = None + _dict["accrualStartDate"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeTimeOffPolicyAssignmentV11 from a dict""" if obj is None: return None @@ -87,11 +88,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "timeOffPolicyId": obj.get("timeOffPolicyId"), - "timeOffTypeId": obj.get("timeOffTypeId"), - "accrualStartDate": obj.get("accrualStartDate") - }) + _obj = cls.model_validate( + { + "timeOffPolicyId": obj.get("timeOffPolicyId"), + "timeOffTypeId": obj.get("timeOffTypeId"), + "accrualStartDate": obj.get("accrualStartDate"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_time_off_request_approver_response_inner.py b/bamboohr_sdk/models/employee_time_off_request_approver_response_inner.py new file mode 100644 index 0000000..ccf57e9 --- /dev/null +++ b/bamboohr_sdk/models/employee_time_off_request_approver_response_inner.py @@ -0,0 +1,95 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + + +class EmployeeTimeOffRequestApproverResponseInner(BaseModel): + """ + EmployeeTimeOffRequestApproverResponseInner + """ + + user_id: StrictInt = Field(description="User ID of the approver", alias="userId") + display_name: StrictStr = Field(description="Display name of the approver", alias="displayName") + employee_id: StrictInt = Field(description="Employee ID of the approver", alias="employeeId") + photo_url: StrictStr | None = Field(default=None, alias="photoUrl") + __properties: ClassVar[list[str]] = ["userId", "displayName", "employeeId", "photoUrl"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeeTimeOffRequestApproverResponseInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if photo_url (nullable) is None + # and model_fields_set contains the field + if self.photo_url is None and "photo_url" in self.model_fields_set: + _dict["photoUrl"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeeTimeOffRequestApproverResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "userId": obj.get("userId"), + "displayName": obj.get("displayName"), + "employeeId": obj.get("employeeId"), + "photoUrl": obj.get("photoUrl"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/employee_timesheet_entry_transformer.py b/bamboohr_sdk/models/employee_timesheet_entry_transformer.py index 1b31539..4cd7193 100644 --- a/bamboohr_sdk/models/employee_timesheet_entry_transformer.py +++ b/bamboohr_sdk/models/employee_timesheet_entry_transformer.py @@ -1,48 +1,63 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date, datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from bamboohr_sdk.models.project_info_api_transformer import ProjectInfoApiTransformer -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.project_info_api_transformer import ProjectInfoApiTransformer + + class EmployeeTimesheetEntryTransformer(BaseModel): """ EmployeeTimesheetEntryTransformer - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Timesheet entry ID") - employee_id: Optional[StrictInt] = Field(default=None, description="Employee ID", alias="employeeId") - type: Optional[StrictStr] = Field(default=None, description="Entry type") - var_date: Optional[date] = Field(default=None, description="Date of the timesheet", alias="date") - start: Optional[datetime] = Field(default=None, description="Start time") - end: Optional[datetime] = Field(default=None, description="End time") - timezone: Optional[StrictStr] = Field(default=None, description="Timezone") - hours: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Hours worked") - note: Optional[StrictStr] = Field(default=None, description="Note") - project_info: Optional[ProjectInfoApiTransformer] = Field(default=None, alias="projectInfo") - approved_at: Optional[datetime] = Field(default=None, description="Approved time", alias="approvedAt") - approved: Optional[StrictBool] = Field(default=None, description="Whether the timesheet entry is approved") - created_at: Optional[datetime] = Field(default=None, description="Created time", alias="createdAt") - updated_at: Optional[datetime] = Field(default=None, description="Updated time", alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "employeeId", "type", "date", "start", "end", "timezone", "hours", "note", "projectInfo", "approvedAt", "approved", "createdAt", "updatedAt"] + """ + + id: StrictInt | None = Field(default=None, description="Timesheet entry ID") + employee_id: StrictInt | None = Field(default=None, description="Employee ID", alias="employeeId") + type: StrictStr | None = Field(default=None, description="Entry type") + var_date: date | None = Field(default=None, description="Date of the timesheet", alias="date") + start: datetime | None = None + end: datetime | None = None + timezone: StrictStr | None = None + hours: StrictFloat | StrictInt | None = None + note: StrictStr | None = None + project_info: ProjectInfoApiTransformer | None = Field(default=None, alias="projectInfo") + approved_at: datetime | None = Field(default=None, alias="approvedAt") + approved: StrictBool | None = Field(default=None, description="Whether the timesheet entry is approved") + created_at: datetime | None = Field(default=None, description="Created time", alias="createdAt") + updated_at: datetime | None = Field(default=None, alias="updatedAt") + __properties: ClassVar[list[str]] = [ + "id", + "employeeId", + "type", + "date", + "start", + "end", + "timezone", + "hours", + "note", + "projectInfo", + "approvedAt", + "approved", + "createdAt", + "updatedAt", + ] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +65,6 @@ class EmployeeTimesheetEntryTransformer(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,11 +75,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeTimesheetEntryTransformer from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -75,8 +89,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -85,51 +98,51 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of project_info if self.project_info: - _dict['projectInfo'] = self.project_info.to_dict() + _dict["projectInfo"] = self.project_info.to_dict() # set to None if start (nullable) is None # and model_fields_set contains the field if self.start is None and "start" in self.model_fields_set: - _dict['start'] = None + _dict["start"] = None # set to None if end (nullable) is None # and model_fields_set contains the field if self.end is None and "end" in self.model_fields_set: - _dict['end'] = None + _dict["end"] = None # set to None if timezone (nullable) is None # and model_fields_set contains the field if self.timezone is None and "timezone" in self.model_fields_set: - _dict['timezone'] = None + _dict["timezone"] = None # set to None if hours (nullable) is None # and model_fields_set contains the field if self.hours is None and "hours" in self.model_fields_set: - _dict['hours'] = None + _dict["hours"] = None # set to None if note (nullable) is None # and model_fields_set contains the field if self.note is None and "note" in self.model_fields_set: - _dict['note'] = None + _dict["note"] = None # set to None if project_info (nullable) is None # and model_fields_set contains the field if self.project_info is None and "project_info" in self.model_fields_set: - _dict['projectInfo'] = None + _dict["projectInfo"] = None # set to None if approved_at (nullable) is None # and model_fields_set contains the field if self.approved_at is None and "approved_at" in self.model_fields_set: - _dict['approvedAt'] = None + _dict["approvedAt"] = None # set to None if updated_at (nullable) is None # and model_fields_set contains the field if self.updated_at is None and "updated_at" in self.model_fields_set: - _dict['updatedAt'] = None + _dict["updatedAt"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeTimesheetEntryTransformer from a dict""" if obj is None: return None @@ -137,22 +150,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "employeeId": obj.get("employeeId"), - "type": obj.get("type"), - "date": obj.get("date"), - "start": obj.get("start"), - "end": obj.get("end"), - "timezone": obj.get("timezone"), - "hours": obj.get("hours"), - "note": obj.get("note"), - "projectInfo": ProjectInfoApiTransformer.from_dict(obj["projectInfo"]) if obj.get("projectInfo") is not None else None, - "approvedAt": obj.get("approvedAt"), - "approved": obj.get("approved"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "employeeId": obj.get("employeeId"), + "type": obj.get("type"), + "date": obj.get("date"), + "start": obj.get("start"), + "end": obj.get("end"), + "timezone": obj.get("timezone"), + "hours": obj.get("hours"), + "note": obj.get("note"), + "projectInfo": ProjectInfoApiTransformer.from_dict(obj["projectInfo"]) + if obj.get("projectInfo") is not None + else None, + "approvedAt": obj.get("approvedAt"), + "approved": obj.get("approved"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_updated_webhook_payload.py b/bamboohr_sdk/models/employee_updated_webhook_payload.py index 7cc9d9d..be84fcf 100644 --- a/bamboohr_sdk/models/employee_updated_webhook_payload.py +++ b/bamboohr_sdk/models/employee_updated_webhook_payload.py @@ -1,45 +1,45 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.employee_updated_webhook_payload_data import EmployeeUpdatedWebhookPayloadData -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.employee_updated_webhook_payload_data import EmployeeUpdatedWebhookPayloadData + + class EmployeeUpdatedWebhookPayload(BaseModel): """ Webhook payload sent when an employee is updated. - """ # noqa: E501 - type: Optional[StrictStr] = Field(default=None, description="The event type identifier") - timestamp: Optional[datetime] = Field(default=None, description="ISO 8601 timestamp (UTC) when the event was fired") - data: Optional[EmployeeUpdatedWebhookPayloadData] = None - __properties: ClassVar[List[str]] = ["type", "timestamp", "data"] + """ + + type: StrictStr | None = Field(default=None, description="The event type identifier") + timestamp: datetime | None = Field(default=None, description="ISO 8601 timestamp (UTC) when the event was fired") + data: EmployeeUpdatedWebhookPayloadData | None = None + __properties: ClassVar[list[str]] = ["type", "timestamp", "data"] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['employee.updated']): + if value not in set(["employee.updated"]): raise ValueError("must be one of enum values ('employee.updated')") return value @@ -49,7 +49,6 @@ def type_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,11 +59,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeUpdatedWebhookPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -74,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -84,11 +82,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of data if self.data: - _dict['data'] = self.data.to_dict() + _dict["data"] = self.data.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeUpdatedWebhookPayload from a dict""" if obj is None: return None @@ -96,11 +94,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type"), - "timestamp": obj.get("timestamp"), - "data": EmployeeUpdatedWebhookPayloadData.from_dict(obj["data"]) if obj.get("data") is not None else None - }) + _obj = cls.model_validate( + { + "type": obj.get("type"), + "timestamp": obj.get("timestamp"), + "data": EmployeeUpdatedWebhookPayloadData.from_dict(obj["data"]) + if obj.get("data") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_updated_webhook_payload_data.py b/bamboohr_sdk/models/employee_updated_webhook_payload_data.py index ba18491..4663ccb 100644 --- a/bamboohr_sdk/models/employee_updated_webhook_payload_data.py +++ b/bamboohr_sdk/models/employee_updated_webhook_payload_data.py @@ -1,35 +1,40 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class EmployeeUpdatedWebhookPayloadData(BaseModel): """ Event data containing employee and change information - """ # noqa: E501 - company_id: Optional[StrictStr] = Field(default=None, description="The company ID", alias="companyId") - employee_id: Optional[StrictStr] = Field(default=None, description="The employee ID that was updated", alias="employeeId") - changed_fields: Optional[List[StrictStr]] = Field(default=None, description="Array of API aliases for fields that changed and are monitored by this webhook", alias="changedFields") - __properties: ClassVar[List[str]] = ["companyId", "employeeId", "changedFields"] + """ + + company_id: StrictStr | None = Field(default=None, description="The company ID", alias="companyId") + employee_id: StrictStr | None = Field( + default=None, description="The employee ID that was updated", alias="employeeId" + ) + changed_fields: list[StrictStr | None] | None = Field( + default=None, + description="Array of API aliases for fields that changed and are monitored by this webhook", + alias="changedFields", + ) + __properties: ClassVar[list[str]] = ["companyId", "employeeId", "changedFields"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +42,6 @@ class EmployeeUpdatedWebhookPayloadData(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -48,11 +52,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of EmployeeUpdatedWebhookPayloadData from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -62,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of EmployeeUpdatedWebhookPayloadData from a dict""" if obj is None: return None @@ -81,11 +84,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "companyId": obj.get("companyId"), - "employeeId": obj.get("employeeId"), - "changedFields": obj.get("changedFields") - }) + _obj = cls.model_validate( + { + "companyId": obj.get("companyId"), + "employeeId": obj.get("employeeId"), + "changedFields": obj.get("changedFields"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employee_value.py b/bamboohr_sdk/models/employee_value.py index be827f6..3d0cee2 100644 --- a/bamboohr_sdk/models/employee_value.py +++ b/bamboohr_sdk/models/employee_value.py @@ -1,30 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator -from typing import Any, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Any + +from pydantic import ( + BaseModel, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Self + from bamboohr_sdk.models.employee_value_any_of_inner import EmployeeValueAnyOfInner -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field -EMPLOYEEVALUE_ANY_OF_SCHEMAS = ["List[EmployeeValueAnyOfInner]", "bool", "float", "int", "object", "str"] +EMPLOYEEVALUE_ANY_OF_SCHEMAS = ["Dict[str, object]", "List[EmployeeValueAnyOfInner]", "bool", "float", "int", "str"] + class EmployeeValue(BaseModel): """ @@ -32,22 +38,22 @@ class EmployeeValue(BaseModel): """ # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None + anyof_schema_1_validator: StrictStr | None = None # data type: float - anyof_schema_2_validator: Optional[Union[StrictFloat, StrictInt]] = None + anyof_schema_2_validator: StrictFloat | StrictInt | None = None # data type: bool - anyof_schema_3_validator: Optional[StrictBool] = None + anyof_schema_3_validator: StrictBool | None = None # data type: int - anyof_schema_4_validator: Optional[StrictInt] = None + anyof_schema_4_validator: StrictInt | None = None # data type: List[EmployeeValueAnyOfInner] - anyof_schema_5_validator: Optional[List[Optional[EmployeeValueAnyOfInner]]] = None - # data type: object - anyof_schema_6_validator: Optional[Dict[str, Any]] = None + anyof_schema_5_validator: list[EmployeeValueAnyOfInner | None] | None = None + # data type: Dict[str, object] + anyof_schema_6_validator: dict[str, Any] | None = None if TYPE_CHECKING: - actual_instance: Optional[Union[List[EmployeeValueAnyOfInner], bool, float, int, object, str]] = None + actual_instance: dict[str, object] | list[EmployeeValueAnyOfInner] | bool | float | int | str | None = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "List[EmployeeValueAnyOfInner]", "bool", "float", "int", "object", "str" } + any_of_schemas: set[str] = {"Dict[str, object]", "List[EmployeeValueAnyOfInner]", "bool", "float", "int", "str"} model_config = { "validate_assignment": True, @@ -64,7 +70,7 @@ def __init__(self, *args, **kwargs) -> None: else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): if v is None: return v @@ -101,7 +107,7 @@ def actual_instance_must_validate_anyof(cls, v): return v except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # validate data type: object + # validate data type: Dict[str, object] try: instance.anyof_schema_6_validator = v return v @@ -109,12 +115,15 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in EmployeeValue with anyOf schemas: List[EmployeeValueAnyOfInner], bool, float, int, object, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in EmployeeValue with anyOf schemas: Dict[str, object], List[EmployeeValueAnyOfInner], bool, float, int, str. Details: " + + ", ".join(error_messages) + ) else: return v @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: + def from_dict(cls, obj: dict[str, Any]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -170,7 +179,7 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into object + # deserialize data into Dict[str, object] try: # validation instance.anyof_schema_6_validator = json.loads(json_str) @@ -182,7 +191,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into EmployeeValue with anyOf schemas: List[EmployeeValueAnyOfInner], bool, float, int, object, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into EmployeeValue with anyOf schemas: Dict[str, object], List[EmployeeValueAnyOfInner], bool, float, int, str. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -196,7 +208,9 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], List[EmployeeValueAnyOfInner], bool, float, int, object, str]]: + def to_dict( + self, + ) -> dict[str, Any] | dict[str, object] | list[EmployeeValueAnyOfInner] | bool | float | int | str | None: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None @@ -209,5 +223,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], List[EmployeeValueAnyOfInner def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/bamboohr_sdk/models/employee_value_any_of_inner.py b/bamboohr_sdk/models/employee_value_any_of_inner.py index 9f481e4..2cfd16b 100644 --- a/bamboohr_sdk/models/employee_value_any_of_inner.py +++ b/bamboohr_sdk/models/employee_value_any_of_inner.py @@ -1,29 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator -from typing import Any, Dict, Optional, Union -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field +from typing import TYPE_CHECKING, Any + +from pydantic import ( + BaseModel, + StrictBool, + StrictFloat, + StrictInt, + StrictStr, + ValidationError, + field_validator, +) +from typing_extensions import Self + +EMPLOYEEVALUEANYOFINNER_ANY_OF_SCHEMAS = ["Dict[str, object]", "bool", "float", "int", "str"] -EMPLOYEEVALUEANYOFINNER_ANY_OF_SCHEMAS = ["bool", "float", "int", "object", "str"] class EmployeeValueAnyOfInner(BaseModel): """ @@ -31,20 +36,20 @@ class EmployeeValueAnyOfInner(BaseModel): """ # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None + anyof_schema_1_validator: StrictStr | None = None # data type: float - anyof_schema_2_validator: Optional[Union[StrictFloat, StrictInt]] = None + anyof_schema_2_validator: StrictFloat | StrictInt | None = None # data type: bool - anyof_schema_3_validator: Optional[StrictBool] = None + anyof_schema_3_validator: StrictBool | None = None # data type: int - anyof_schema_4_validator: Optional[StrictInt] = None - # data type: object - anyof_schema_5_validator: Optional[Dict[str, Any]] = None + anyof_schema_4_validator: StrictInt | None = None + # data type: Dict[str, object] + anyof_schema_5_validator: dict[str, Any] | None = None if TYPE_CHECKING: - actual_instance: Optional[Union[bool, float, int, object, str]] = None + actual_instance: dict[str, object] | bool | float | int | str | None = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "bool", "float", "int", "object", "str" } + any_of_schemas: set[str] = {"Dict[str, object]", "bool", "float", "int", "str"} model_config = { "validate_assignment": True, @@ -61,7 +66,7 @@ def __init__(self, *args, **kwargs) -> None: else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_anyof(cls, v): if v is None: return v @@ -92,7 +97,7 @@ def actual_instance_must_validate_anyof(cls, v): return v except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # validate data type: object + # validate data type: Dict[str, object] try: instance.anyof_schema_5_validator = v return v @@ -100,12 +105,15 @@ def actual_instance_must_validate_anyof(cls, v): error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in EmployeeValueAnyOfInner with anyOf schemas: bool, float, int, object, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting the actual_instance in EmployeeValueAnyOfInner with anyOf schemas: Dict[str, object], bool, float, int, str. Details: " + + ", ".join(error_messages) + ) else: return v @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: + def from_dict(cls, obj: dict[str, Any]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -152,7 +160,7 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into object + # deserialize data into Dict[str, object] try: # validation instance.anyof_schema_5_validator = json.loads(json_str) @@ -164,7 +172,10 @@ def from_json(cls, json_str: str) -> Self: if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into EmployeeValueAnyOfInner with anyOf schemas: bool, float, int, object, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into EmployeeValueAnyOfInner with anyOf schemas: Dict[str, object], bool, float, int, str. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -178,7 +189,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], bool, float, int, object, str]]: + def to_dict(self) -> dict[str, Any] | dict[str, object] | bool | float | int | str | None: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None @@ -191,5 +202,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], bool, float, int, object, st def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/bamboohr_sdk/models/employee_verification_integration.py b/bamboohr_sdk/models/employee_verification_integration.py new file mode 100644 index 0000000..b05f863 --- /dev/null +++ b/bamboohr_sdk/models/employee_verification_integration.py @@ -0,0 +1,86 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing_extensions import Self + + +class EmployeeVerificationIntegration(BaseModel): + """ + Install state and partner metadata for the company's employee verification integration. + """ + + enabled: StrictBool = Field( + description="True when the integration is installed for the company and partner endpoints are usable." + ) + integration_type: StrictStr = Field( + description="Identifier of the configured employee verification partner (opaque string; matches `integrationType` from the integration GET response).", + alias="integrationType", + ) + __properties: ClassVar[list[str]] = ["enabled", "integrationType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeeVerificationIntegration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeeVerificationIntegration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"enabled": obj.get("enabled"), "integrationType": obj.get("integrationType")}) + return _obj diff --git a/bamboohr_sdk/models/employee_verification_integration_response.py b/bamboohr_sdk/models/employee_verification_integration_response.py new file mode 100644 index 0000000..afc3fbd --- /dev/null +++ b/bamboohr_sdk/models/employee_verification_integration_response.py @@ -0,0 +1,91 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + +from bamboohr_sdk.models.employee_verification_integration import EmployeeVerificationIntegration + + +class EmployeeVerificationIntegrationResponse(BaseModel): + """ + EmployeeVerificationIntegrationResponse + """ + + integration: EmployeeVerificationIntegration + __properties: ClassVar[list[str]] = ["integration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeeVerificationIntegrationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of integration + if self.integration: + _dict["integration"] = self.integration.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeeVerificationIntegrationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "integration": EmployeeVerificationIntegration.from_dict(obj["integration"]) + if obj.get("integration") is not None + else None + } + ) + return _obj diff --git a/bamboohr_sdk/models/employee_verification_lifecycle_email_accepted_response.py b/bamboohr_sdk/models/employee_verification_lifecycle_email_accepted_response.py new file mode 100644 index 0000000..7a846c1 --- /dev/null +++ b/bamboohr_sdk/models/employee_verification_lifecycle_email_accepted_response.py @@ -0,0 +1,97 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing_extensions import Self + + +class EmployeeVerificationLifecycleEmailAcceptedResponse(BaseModel): + """ + EmployeeVerificationLifecycleEmailAcceptedResponse + """ + + status: StrictStr + message: StrictStr | None = None + additional_properties: dict[str, Any] = {} + __properties: ClassVar[list[str]] = ["status", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeeVerificationLifecycleEmailAcceptedResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: set[str] = set( + [ + "additional_properties", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeeVerificationLifecycleEmailAcceptedResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"status": obj.get("status"), "message": obj.get("message")}) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/bamboohr_sdk/models/employee_verification_public_api_record.py b/bamboohr_sdk/models/employee_verification_public_api_record.py new file mode 100644 index 0000000..43dce4b --- /dev/null +++ b/bamboohr_sdk/models/employee_verification_public_api_record.py @@ -0,0 +1,154 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing_extensions import Self + + +class EmployeeVerificationPublicApiRecord(BaseModel): + """ + A single employee verification row as returned by the public list API. + """ + + id: StrictInt | None = None + employee_id: StrictInt | None = Field(default=None, alias="employeeId") + integration_type: StrictStr | None = Field(default=None, alias="integrationType") + verification_type: StrictStr | None = Field(default=None, alias="verificationType") + verification_status: StrictStr | None = Field(default=None, alias="verificationStatus") + verification_status_notes: StrictStr | None = Field(default=None, alias="verificationStatusNotes") + remote_access_url: StrictStr | None = Field(default=None, alias="remoteAccessUrl") + e_verify_status: StrictStr | None = Field(default=None, alias="eVerifyStatus") + archived: StrictBool | None = None + billing_processed: StrictBool | None = Field(default=None, alias="billingProcessed") + created_by_user_id: StrictInt | None = Field(default=None, alias="createdByUserId") + created_ymdt: StrictStr | None = Field( + default=None, description="Creation timestamp (company DB format).", alias="createdYmdt" + ) + last_modified_ymdt: StrictStr | None = Field( + default=None, description="Last modified timestamp (company DB format).", alias="lastModifiedYmdt" + ) + start_date_ymdt: StrictStr | None = Field(default=None, alias="startDateYmdt") + __properties: ClassVar[list[str]] = [ + "id", + "employeeId", + "integrationType", + "verificationType", + "verificationStatus", + "verificationStatusNotes", + "remoteAccessUrl", + "eVerifyStatus", + "archived", + "billingProcessed", + "createdByUserId", + "createdYmdt", + "lastModifiedYmdt", + "startDateYmdt", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeeVerificationPublicApiRecord from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if employee_id (nullable) is None + # and model_fields_set contains the field + if self.employee_id is None and "employee_id" in self.model_fields_set: + _dict["employeeId"] = None + + # set to None if verification_status (nullable) is None + # and model_fields_set contains the field + if self.verification_status is None and "verification_status" in self.model_fields_set: + _dict["verificationStatus"] = None + + # set to None if verification_status_notes (nullable) is None + # and model_fields_set contains the field + if self.verification_status_notes is None and "verification_status_notes" in self.model_fields_set: + _dict["verificationStatusNotes"] = None + + # set to None if remote_access_url (nullable) is None + # and model_fields_set contains the field + if self.remote_access_url is None and "remote_access_url" in self.model_fields_set: + _dict["remoteAccessUrl"] = None + + # set to None if e_verify_status (nullable) is None + # and model_fields_set contains the field + if self.e_verify_status is None and "e_verify_status" in self.model_fields_set: + _dict["eVerifyStatus"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeeVerificationPublicApiRecord from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "employeeId": obj.get("employeeId"), + "integrationType": obj.get("integrationType"), + "verificationType": obj.get("verificationType"), + "verificationStatus": obj.get("verificationStatus"), + "verificationStatusNotes": obj.get("verificationStatusNotes"), + "remoteAccessUrl": obj.get("remoteAccessUrl"), + "eVerifyStatus": obj.get("eVerifyStatus"), + "archived": obj.get("archived"), + "billingProcessed": obj.get("billingProcessed"), + "createdByUserId": obj.get("createdByUserId"), + "createdYmdt": obj.get("createdYmdt"), + "lastModifiedYmdt": obj.get("lastModifiedYmdt"), + "startDateYmdt": obj.get("startDateYmdt"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/employee_verification_update_response.py b/bamboohr_sdk/models/employee_verification_update_response.py new file mode 100644 index 0000000..05c94de --- /dev/null +++ b/bamboohr_sdk/models/employee_verification_update_response.py @@ -0,0 +1,91 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from bamboohr_sdk.models.employee_verification_public_api_record import EmployeeVerificationPublicApiRecord + + +class EmployeeVerificationUpdateResponse(BaseModel): + """ + EmployeeVerificationUpdateResponse + """ + + employee_verification: EmployeeVerificationPublicApiRecord = Field(alias="employeeVerification") + __properties: ClassVar[list[str]] = ["employeeVerification"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeeVerificationUpdateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of employee_verification + if self.employee_verification: + _dict["employeeVerification"] = self.employee_verification.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeeVerificationUpdateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "employeeVerification": EmployeeVerificationPublicApiRecord.from_dict(obj["employeeVerification"]) + if obj.get("employeeVerification") is not None + else None + } + ) + return _obj diff --git a/bamboohr_sdk/models/employee_verifications_list_response.py b/bamboohr_sdk/models/employee_verifications_list_response.py new file mode 100644 index 0000000..f56c26e --- /dev/null +++ b/bamboohr_sdk/models/employee_verifications_list_response.py @@ -0,0 +1,115 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from bamboohr_sdk.models.employee_verification_public_api_record import EmployeeVerificationPublicApiRecord + + +class EmployeeVerificationsListResponse(BaseModel): + """ + EmployeeVerificationsListResponse + """ + + employee_verifications: list[EmployeeVerificationPublicApiRecord] = Field( + description="Verification records for the employee, newest first.", alias="employeeVerifications" + ) + additional_properties: dict[str, Any] = {} + __properties: ClassVar[list[str]] = ["employeeVerifications"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeeVerificationsListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: set[str] = set( + [ + "additional_properties", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in employee_verifications (list) + _items = [] + if self.employee_verifications: + for _item_employee_verifications in self.employee_verifications: + if _item_employee_verifications: + _items.append(_item_employee_verifications.to_dict()) + _dict["employeeVerifications"] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeeVerificationsListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "employeeVerifications": [ + EmployeeVerificationPublicApiRecord.from_dict(_item) for _item in obj["employeeVerifications"] + ] + if obj.get("employeeVerifications") is not None + else None + } + ) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/bamboohr_sdk/models/employees_directory_json_response.py b/bamboohr_sdk/models/employees_directory_json_response.py new file mode 100644 index 0000000..fb6fec2 --- /dev/null +++ b/bamboohr_sdk/models/employees_directory_json_response.py @@ -0,0 +1,103 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from bamboohr_sdk.models.employees_directory_json_response_fields_inner import EmployeesDirectoryJsonResponseFieldsInner + + +class EmployeesDirectoryJsonResponse(BaseModel): + """ + EmployeesDirectoryJsonResponse + """ + + fields: list[EmployeesDirectoryJsonResponseFieldsInner] | None = Field( + default=None, + description="Field definitions included in this response. Each entry describes one key that appears on every employee object. The set of fields is fixed by company directory configuration; the `canUploadPhoto` entry is always appended.", + ) + employees: list[dict[str, Any]] | None = Field( + default=None, + description="One object per directory employee. Every object includes `id` (internal employee ID as a string) and `canUploadPhoto` (1 if the authenticated caller may upload a photo for this employee, 0 otherwise), plus one key per entry in `fields`. The exact key set varies with company directory configuration. Field values are returned in the JSON type indicated by the matching `fields[].type` (for example, `bool` fields are JSON booleans).", + ) + __properties: ClassVar[list[str]] = ["fields", "employees"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeesDirectoryJsonResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item_fields in self.fields: + if _item_fields: + _items.append(_item_fields.to_dict()) + _dict["fields"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeesDirectoryJsonResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "fields": [EmployeesDirectoryJsonResponseFieldsInner.from_dict(_item) for _item in obj["fields"]] + if obj.get("fields") is not None + else None, + "employees": obj.get("employees"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/employees_directory_json_response_fields_inner.py b/bamboohr_sdk/models/employees_directory_json_response_fields_inner.py new file mode 100644 index 0000000..9b36465 --- /dev/null +++ b/bamboohr_sdk/models/employees_directory_json_response_fields_inner.py @@ -0,0 +1,87 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class EmployeesDirectoryJsonResponseFieldsInner(BaseModel): + """ + EmployeesDirectoryJsonResponseFieldsInner + """ + + id: StrictStr | None = Field( + default=None, description="Field identifier; appears as a key on each employee object." + ) + type: StrictStr | None = Field( + default=None, + description="Field data type. Observed values include `text`, `list`, `email`, `bool`, `url`, and `employee`.", + ) + name: StrictStr | None = Field(default=None, description="Human-readable field label.") + __properties: ClassVar[list[str]] = ["id", "type", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeesDirectoryJsonResponseFieldsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeesDirectoryJsonResponseFieldsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"id": obj.get("id"), "type": obj.get("type"), "name": obj.get("name")}) + return _obj diff --git a/bamboohr_sdk/models/xml_directory_employee.py b/bamboohr_sdk/models/employees_directory_xml_response.py similarity index 50% rename from bamboohr_sdk/models/xml_directory_employee.py rename to bamboohr_sdk/models/employees_directory_xml_response.py index cce9d78..4a2c773 100644 --- a/bamboohr_sdk/models/xml_directory_employee.py +++ b/bamboohr_sdk/models/employees_directory_xml_response.py @@ -1,36 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.xml_directory_employee_employees import XmlDirectoryEmployeeEmployees -from bamboohr_sdk.models.xml_directory_employee_fieldset import XmlDirectoryEmployeeFieldset -from typing import Optional, Set from typing_extensions import Self -class XmlDirectoryEmployee(BaseModel): +from bamboohr_sdk.models.employees_directory_xml_response_employees import EmployeesDirectoryXmlResponseEmployees +from bamboohr_sdk.models.employees_directory_xml_response_fieldset import EmployeesDirectoryXmlResponseFieldset + + +class EmployeesDirectoryXmlResponse(BaseModel): + """ + EmployeesDirectoryXmlResponse """ - XmlDirectoryEmployee - """ # noqa: E501 - fieldset: Optional[XmlDirectoryEmployeeFieldset] = None - employees: Optional[XmlDirectoryEmployeeEmployees] = None - __properties: ClassVar[List[str]] = ["fieldset", "employees"] + + fieldset: EmployeesDirectoryXmlResponseFieldset | None = None + employees: EmployeesDirectoryXmlResponseEmployees | None = None + __properties: ClassVar[list[str]] = ["fieldset", "employees"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +38,6 @@ class XmlDirectoryEmployee(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of XmlDirectoryEmployee from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeesDirectoryXmlResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,25 +71,29 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of fieldset if self.fieldset: - _dict['fieldset'] = self.fieldset.to_dict() + _dict["fieldset"] = self.fieldset.to_dict() # override the default output from pydantic by calling `to_dict()` of employees if self.employees: - _dict['employees'] = self.employees.to_dict() + _dict["employees"] = self.employees.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of XmlDirectoryEmployee from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeesDirectoryXmlResponse from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "fieldset": XmlDirectoryEmployeeFieldset.from_dict(obj["fieldset"]) if obj.get("fieldset") is not None else None, - "employees": XmlDirectoryEmployeeEmployees.from_dict(obj["employees"]) if obj.get("employees") is not None else None - }) + _obj = cls.model_validate( + { + "fieldset": EmployeesDirectoryXmlResponseFieldset.from_dict(obj["fieldset"]) + if obj.get("fieldset") is not None + else None, + "employees": EmployeesDirectoryXmlResponseEmployees.from_dict(obj["employees"]) + if obj.get("employees") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/xml_directory_employee_employees.py b/bamboohr_sdk/models/employees_directory_xml_response_employees.py similarity index 56% rename from bamboohr_sdk/models/xml_directory_employee_employees.py rename to bamboohr_sdk/models/employees_directory_xml_response_employees.py index ace201a..39b9653 100644 --- a/bamboohr_sdk/models/xml_directory_employee_employees.py +++ b/bamboohr_sdk/models/employees_directory_xml_response_employees.py @@ -1,34 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.xml_directory_employee_employees_employee_inner import XmlDirectoryEmployeeEmployeesEmployeeInner -from typing import Optional, Set from typing_extensions import Self -class XmlDirectoryEmployeeEmployees(BaseModel): +from bamboohr_sdk.models.employees_directory_xml_response_employees_employee_inner import ( + EmployeesDirectoryXmlResponseEmployeesEmployeeInner, +) + + +class EmployeesDirectoryXmlResponseEmployees(BaseModel): + """ + Directory employee records. """ - Employee records. - """ # noqa: E501 - employee: Optional[List[XmlDirectoryEmployeeEmployeesEmployeeInner]] = None - __properties: ClassVar[List[str]] = ["employee"] + + employee: list[EmployeesDirectoryXmlResponseEmployeesEmployeeInner] | None = None + __properties: ClassVar[list[str]] = ["employee"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +38,6 @@ class XmlDirectoryEmployeeEmployees(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of XmlDirectoryEmployeeEmployees from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeesDirectoryXmlResponseEmployees from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,21 +75,25 @@ def to_dict(self) -> Dict[str, Any]: for _item_employee in self.employee: if _item_employee: _items.append(_item_employee.to_dict()) - _dict['employee'] = _items + _dict["employee"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of XmlDirectoryEmployeeEmployees from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeesDirectoryXmlResponseEmployees from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "employee": [XmlDirectoryEmployeeEmployeesEmployeeInner.from_dict(_item) for _item in obj["employee"]] if obj.get("employee") is not None else None - }) + _obj = cls.model_validate( + { + "employee": [ + EmployeesDirectoryXmlResponseEmployeesEmployeeInner.from_dict(_item) for _item in obj["employee"] + ] + if obj.get("employee") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employees_directory_xml_response_employees_employee_inner.py b/bamboohr_sdk/models/employees_directory_xml_response_employees_employee_inner.py new file mode 100644 index 0000000..a95ca80 --- /dev/null +++ b/bamboohr_sdk/models/employees_directory_xml_response_employees_employee_inner.py @@ -0,0 +1,108 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.employees_directory_xml_response_employees_employee_inner_field_inner import ( + EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner, +) + + +class EmployeesDirectoryXmlResponseEmployeesEmployeeInner(BaseModel): + """ + EmployeesDirectoryXmlResponseEmployeesEmployeeInner + """ + + id: StrictStr | None = Field( + default=None, description="Internal employee ID, serialized as an attribute on the `` element." + ) + var_field: list[EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner] | None = Field( + default=None, + description="Field values for the employee. Each `` element has an `id` attribute matching one of the `
` ids and the value as element text. Currency fields additionally carry a `currency` attribute (ISO currency code). Boolean fields are serialized as the strings `true`/`false`; the appended `canUploadPhoto` field is serialized as `yes`/`no`.", + alias="field", + ) + __properties: ClassVar[list[str]] = ["id", "field"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeesDirectoryXmlResponseEmployeesEmployeeInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in var_field (list) + _items = [] + if self.var_field: + for _item_var_field in self.var_field: + if _item_var_field: + _items.append(_item_var_field.to_dict()) + _dict["field"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeesDirectoryXmlResponseEmployeesEmployeeInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "field": [ + EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner.from_dict(_item) + for _item in obj["field"] + ] + if obj.get("field") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/employees_directory_xml_response_employees_employee_inner_field_inner.py b/bamboohr_sdk/models/employees_directory_xml_response_employees_employee_inner_field_inner.py new file mode 100644 index 0000000..b8de23c --- /dev/null +++ b/bamboohr_sdk/models/employees_directory_xml_response_employees_employee_inner_field_inner.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner(BaseModel): + """ + EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner + """ + + id: StrictStr | None = Field(default=None, description="Field identifier matching one of the ids in `
`.") + value: StrictStr | None = Field(default=None, description="Field value serialized as element text content.") + __properties: ClassVar[list[str]] = ["id", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeesDirectoryXmlResponseEmployeesEmployeeInnerFieldInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"id": obj.get("id"), "value": obj.get("value")}) + return _obj diff --git a/bamboohr_sdk/models/xml_directory_employee_fieldset.py b/bamboohr_sdk/models/employees_directory_xml_response_fieldset.py similarity index 56% rename from bamboohr_sdk/models/xml_directory_employee_fieldset.py rename to bamboohr_sdk/models/employees_directory_xml_response_fieldset.py index 009839b..5f9ae6a 100644 --- a/bamboohr_sdk/models/xml_directory_employee_fieldset.py +++ b/bamboohr_sdk/models/employees_directory_xml_response_fieldset.py @@ -1,34 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.xml_directory_employee_fieldset_field_inner import XmlDirectoryEmployeeFieldsetFieldInner -from typing import Optional, Set from typing_extensions import Self -class XmlDirectoryEmployeeFieldset(BaseModel): +from bamboohr_sdk.models.employees_directory_xml_response_fieldset_field_inner import ( + EmployeesDirectoryXmlResponseFieldsetFieldInner, +) + + +class EmployeesDirectoryXmlResponseFieldset(BaseModel): + """ + Field definitions included in this response. """ - Field definitions included in this directory response. - """ # noqa: E501 - var_field: Optional[List[XmlDirectoryEmployeeFieldsetFieldInner]] = Field(default=None, alias="field") - __properties: ClassVar[List[str]] = ["field"] + + var_field: list[EmployeesDirectoryXmlResponseFieldsetFieldInner] | None = Field(default=None, alias="field") + __properties: ClassVar[list[str]] = ["field"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +38,6 @@ class XmlDirectoryEmployeeFieldset(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of XmlDirectoryEmployeeFieldset from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeesDirectoryXmlResponseFieldset from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,21 +75,23 @@ def to_dict(self) -> Dict[str, Any]: for _item_var_field in self.var_field: if _item_var_field: _items.append(_item_var_field.to_dict()) - _dict['field'] = _items + _dict["field"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of XmlDirectoryEmployeeFieldset from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeesDirectoryXmlResponseFieldset from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "field": [XmlDirectoryEmployeeFieldsetFieldInner.from_dict(_item) for _item in obj["field"]] if obj.get("field") is not None else None - }) + _obj = cls.model_validate( + { + "field": [EmployeesDirectoryXmlResponseFieldsetFieldInner.from_dict(_item) for _item in obj["field"]] + if obj.get("field") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/employees_directory_xml_response_fieldset_field_inner.py b/bamboohr_sdk/models/employees_directory_xml_response_fieldset_field_inner.py new file mode 100644 index 0000000..52a7e37 --- /dev/null +++ b/bamboohr_sdk/models/employees_directory_xml_response_fieldset_field_inner.py @@ -0,0 +1,86 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class EmployeesDirectoryXmlResponseFieldsetFieldInner(BaseModel): + """ + EmployeesDirectoryXmlResponseFieldsetFieldInner + """ + + id: StrictStr | None = Field( + default=None, + description="Field identifier; matches the `id` attribute on each `` element inside ``.", + ) + value: StrictStr | None = Field( + default=None, description="Human-readable field label, serialized as the element's text content." + ) + __properties: ClassVar[list[str]] = ["id", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of EmployeesDirectoryXmlResponseFieldsetFieldInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of EmployeesDirectoryXmlResponseFieldsetFieldInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"id": obj.get("id"), "value": obj.get("value")}) + return _obj diff --git a/bamboohr_sdk/models/invalid_request.py b/bamboohr_sdk/models/error_response.py similarity index 57% rename from bamboohr_sdk/models/invalid_request.py rename to bamboohr_sdk/models/error_response.py index ac57282..a230fd4 100644 --- a/bamboohr_sdk/models/invalid_request.py +++ b/bamboohr_sdk/models/error_response.py @@ -1,34 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.invalid_request_error import InvalidRequestError -from typing import Optional, Set from typing_extensions import Self -class InvalidRequest(BaseModel): +from bamboohr_sdk.models.error_response_error import ErrorResponseError + + +class ErrorResponse(BaseModel): + """ + Standard error response from BaseController """ - InvalidRequest - """ # noqa: E501 - error: Optional[InvalidRequestError] = None - __properties: ClassVar[List[str]] = ["error"] + + error: ErrorResponseError | None = None + __properties: ClassVar[list[str]] = ["error"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +36,6 @@ class InvalidRequest(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InvalidRequest from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of ErrorResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,21 +69,19 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of error if self.error: - _dict['error'] = self.error.to_dict() + _dict["error"] = self.error.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InvalidRequest from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of ErrorResponse from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "error": InvalidRequestError.from_dict(obj["error"]) if obj.get("error") is not None else None - }) + _obj = cls.model_validate( + {"error": ErrorResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None} + ) return _obj - - diff --git a/bamboohr_sdk/models/error_response_error.py b/bamboohr_sdk/models/error_response_error.py new file mode 100644 index 0000000..dd6a16d --- /dev/null +++ b/bamboohr_sdk/models/error_response_error.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing_extensions import Self + + +class ErrorResponseError(BaseModel): + """ + ErrorResponseError + """ + + code: StrictInt | None = None + message: StrictStr | None = None + __properties: ClassVar[list[str]] = ["code", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of ErrorResponseError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of ErrorResponseError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"code": obj.get("code"), "message": obj.get("message")}) + return _obj diff --git a/bamboohr_sdk/models/f3883a522dadbe9e11b34f8b656e3adb_request.py b/bamboohr_sdk/models/f3883a522dadbe9e11b34f8b656e3adb_request.py new file mode 100644 index 0000000..b1f5be7 --- /dev/null +++ b/bamboohr_sdk/models/f3883a522dadbe9e11b34f8b656e3adb_request.py @@ -0,0 +1,132 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing_extensions import Self + + +class F3883a522dadbe9e11b34f8b656e3adbRequest(BaseModel): + """ + F3883a522dadbe9e11b34f8b656e3adbRequest + """ + + employee_id: StrictStr = Field( + description="The internal employee ID of the employee receiving the recommendation", alias="employeeId" + ) + assignee_employee_id: StrictStr = Field( + description="The internal employee ID of the employee making the recommendation", alias="assigneeEmployeeId" + ) + approval_flow_id: StrictInt | None = Field( + default=None, description="The ID of the approval flow", alias="approvalFlowId" + ) + approval_stage: StrictInt = Field(description="The approval stage", alias="approvalStage") + rec_salary_increase: dict[str, Any] | None = Field(default=None, alias="recSalaryIncrease") + rec_bonus_increase: dict[str, Any] | None = Field(default=None, alias="recBonusIncrease") + rec_equity_increase: dict[str, Any] | None = Field(default=None, alias="recEquityIncrease") + __properties: ClassVar[list[str]] = [ + "employeeId", + "assigneeEmployeeId", + "approvalFlowId", + "approvalStage", + "recSalaryIncrease", + "recBonusIncrease", + "recEquityIncrease", + ] + + @field_validator("approval_stage") + def approval_stage_validate_enum(cls, value): + """Validates the enum""" + if value not in set([0, 1, 2, 3, 4, 5, 999]): + raise ValueError("must be one of enum values (0, 1, 2, 3, 4, 5, 999)") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of F3883a522dadbe9e11b34f8b656e3adbRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if rec_salary_increase (nullable) is None + # and model_fields_set contains the field + if self.rec_salary_increase is None and "rec_salary_increase" in self.model_fields_set: + _dict["recSalaryIncrease"] = None + + # set to None if rec_bonus_increase (nullable) is None + # and model_fields_set contains the field + if self.rec_bonus_increase is None and "rec_bonus_increase" in self.model_fields_set: + _dict["recBonusIncrease"] = None + + # set to None if rec_equity_increase (nullable) is None + # and model_fields_set contains the field + if self.rec_equity_increase is None and "rec_equity_increase" in self.model_fields_set: + _dict["recEquityIncrease"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of F3883a522dadbe9e11b34f8b656e3adbRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "assigneeEmployeeId": obj.get("assigneeEmployeeId"), + "approvalFlowId": obj.get("approvalFlowId"), + "approvalStage": obj.get("approvalStage"), + "recSalaryIncrease": obj.get("recSalaryIncrease"), + "recBonusIncrease": obj.get("recBonusIncrease"), + "recEquityIncrease": obj.get("recEquityIncrease"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/field1.py b/bamboohr_sdk/models/field1.py index 418d4c1..2e68066 100644 --- a/bamboohr_sdk/models/field1.py +++ b/bamboohr_sdk/models/field1.py @@ -1,38 +1,43 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.field1_id import Field1Id -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.field1_id import Field1Id + + class Field1(BaseModel): """ Field1 - """ # noqa: E501 + """ + id: Field1Id name: StrictStr = Field(description="The display name of the field.") type: StrictStr = Field(description="The data type of the field (e.g., text, date, list, checkbox).") - alias: Optional[StrictStr] = Field(default=None, description="The API alias for the field. Only present when the field has an alias.") - deprecated: Optional[StrictBool] = Field(default=None, description="Whether the field is deprecated and should no longer be used. Only present for deprecated fields.") - __properties: ClassVar[List[str]] = ["id", "name", "type", "alias", "deprecated"] + alias: StrictStr | None = Field( + default=None, description="The API alias for the field. Only present when the field has an alias." + ) + deprecated: StrictBool | None = Field( + default=None, + description="Whether the field is deprecated and should no longer be used. Only present for deprecated fields.", + ) + __properties: ClassVar[list[str]] = ["id", "name", "type", "alias", "deprecated"] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +45,6 @@ class Field1(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,11 +55,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of Field1 from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -65,8 +69,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,11 +78,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of id if self.id: - _dict['id'] = self.id.to_dict() + _dict["id"] = self.id.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of Field1 from a dict""" if obj is None: return None @@ -87,13 +90,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": Field1Id.from_dict(obj["id"]) if obj.get("id") is not None else None, - "name": obj.get("name"), - "type": obj.get("type"), - "alias": obj.get("alias"), - "deprecated": obj.get("deprecated") - }) + _obj = cls.model_validate( + { + "id": Field1Id.from_dict(obj["id"]) if obj.get("id") is not None else None, + "name": obj.get("name"), + "type": obj.get("type"), + "alias": obj.get("alias"), + "deprecated": obj.get("deprecated"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/field1_id.py b/bamboohr_sdk/models/field1_id.py index 6db6ef2..845b23d 100644 --- a/bamboohr_sdk/models/field1_id.py +++ b/bamboohr_sdk/models/field1_id.py @@ -1,45 +1,43 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self +from typing import Any + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, ValidationError, field_validator +from typing_extensions import Self FIELD1ID_ONE_OF_SCHEMAS = ["int", "str"] + class Field1Id(BaseModel): """ The field identifier. For subfields this is a dotted string (e.g., \"4340.4\"); for top-level fields it may be an integer. """ + # data type: str - oneof_schema_1_validator: Optional[StrictStr] = None + oneof_schema_1_validator: StrictStr | None = None # data type: int - oneof_schema_2_validator: Optional[StrictInt] = None - actual_instance: Optional[Union[int, str]] = None - one_of_schemas: Set[str] = { "int", "str" } + oneof_schema_2_validator: StrictInt | None = None + actual_instance: int | str | None = None + one_of_schemas: set[str] = {"int", "str"} model_config = ConfigDict( validate_assignment=True, protected_namespaces=(), ) - def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -50,7 +48,7 @@ def __init__(self, *args, **kwargs) -> None: else: super().__init__(**kwargs) - @field_validator('actual_instance') + @field_validator("actual_instance") def actual_instance_must_validate_oneof(cls, v): instance = Field1Id.model_construct() error_messages = [] @@ -69,15 +67,21 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in Field1Id with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "Multiple matches found when setting `actual_instance` in Field1Id with oneOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in Field1Id with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when setting `actual_instance` in Field1Id with oneOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) else: return v @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + def from_dict(cls, obj: str | dict[str, Any]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -108,10 +112,16 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into Field1Id with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "Multiple matches found when deserializing the JSON string into Field1Id with oneOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into Field1Id with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) + raise ValueError( + "No match found when deserializing the JSON string into Field1Id with oneOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) else: return instance @@ -125,7 +135,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: + def to_dict(self) -> dict[str, Any] | int | str | None: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None @@ -139,5 +149,3 @@ def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: def to_str(self) -> str: """Returns the string representation of the actual instance""" return pprint.pformat(self.model_dump()) - - diff --git a/bamboohr_sdk/models/field_list_fields_inner.py b/bamboohr_sdk/models/field_list_fields_inner.py deleted file mode 100644 index 9ac665c..0000000 --- a/bamboohr_sdk/models/field_list_fields_inner.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class FieldListFieldsInner(BaseModel): - """ - FieldListFieldsInner - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The field ID, returned as a string.") - name: Optional[StrictStr] = Field(default=None, description="The human-readable field name.") - alias: Optional[StrictStr] = Field(default=None, description="The field alias used in the BambooHR API (e.g. `firstName`). Null if no alias is defined for this field.") - __properties: ClassVar[List[str]] = ["id", "name", "alias"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FieldListFieldsInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if alias (nullable) is None - # and model_fields_set contains the field - if self.alias is None and "alias" in self.model_fields_set: - _dict['alias'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FieldListFieldsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "alias": obj.get("alias") - }) - return _obj - - diff --git a/bamboohr_sdk/models/field_options_request_schema.py b/bamboohr_sdk/models/field_options_request_schema.py index c763d21..fabab38 100644 --- a/bamboohr_sdk/models/field_options_request_schema.py +++ b/bamboohr_sdk/models/field_options_request_schema.py @@ -1,36 +1,40 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.field_options_request_schema_dependent_fields_value_inner import FieldOptionsRequestSchemaDependentFieldsValueInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.field_options_request_schema_dependent_fields_value_inner import ( + FieldOptionsRequestSchemaDependentFieldsValueInner, +) + + class FieldOptionsRequestSchema(BaseModel): """ Schema for field options request - """ # noqa: E501 - fields: List[StrictStr] = Field(description="List of field names to get options for") - dependent_fields: Optional[Dict[str, List[FieldOptionsRequestSchemaDependentFieldsValueInner]]] = Field(default=None, description="Dependent fields and their values that affect the options of the requested fields", alias="dependentFields") - filters: Optional[Dict[str, Any]] = Field(default=None, description="Optional filters to apply when retrieving field options. Filters limit the returned options based on other field values.") - __properties: ClassVar[List[str]] = ["fields", "dependentFields", "filters"] + """ + + fields: list[StrictStr] = Field(description="List of field names to get options for") + dependent_fields: dict[str, list[FieldOptionsRequestSchemaDependentFieldsValueInner]] | None = Field( + default=None, alias="dependentFields" + ) + filters: dict[str, Any] | None = None + __properties: ClassVar[list[str]] = ["fields", "dependentFields", "filters"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +42,6 @@ class FieldOptionsRequestSchema(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +52,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of FieldOptionsRequestSchema from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,16 +81,21 @@ def to_dict(self) -> Dict[str, Any]: _field_dict_of_array[_key_dependent_fields] = [ _item.to_dict() for _item in self.dependent_fields[_key_dependent_fields] ] - _dict['dependentFields'] = _field_dict_of_array + _dict["dependentFields"] = _field_dict_of_array + # set to None if dependent_fields (nullable) is None + # and model_fields_set contains the field + if self.dependent_fields is None and "dependent_fields" in self.model_fields_set: + _dict["dependentFields"] = None + # set to None if filters (nullable) is None # and model_fields_set contains the field if self.filters is None and "filters" in self.model_fields_set: - _dict['filters'] = None + _dict["filters"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of FieldOptionsRequestSchema from a dict""" if obj is None: return None @@ -96,18 +103,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "fields": obj.get("fields"), - "dependentFields": dict( - (_k, + _obj = cls.model_validate( + { + "fields": obj.get("fields"), + "dependentFields": dict( + ( + _k, [FieldOptionsRequestSchemaDependentFieldsValueInner.from_dict(_item) for _item in _v] if _v is not None - else None - ) - for _k, _v in obj.get("dependentFields", {}).items() - ), - "filters": obj.get("filters") - }) + else None, + ) + for _k, _v in obj.get("dependentFields", {}).items() + ), + "filters": obj.get("filters"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/field_options_request_schema_dependent_fields_value_inner.py b/bamboohr_sdk/models/field_options_request_schema_dependent_fields_value_inner.py index 055ca5b..cb7fdba 100644 --- a/bamboohr_sdk/models/field_options_request_schema_dependent_fields_value_inner.py +++ b/bamboohr_sdk/models/field_options_request_schema_dependent_fields_value_inner.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class FieldOptionsRequestSchemaDependentFieldsValueInner(BaseModel): """ FieldOptionsRequestSchemaDependentFieldsValueInner - """ # noqa: E501 - var_field: Optional[StrictStr] = Field(default=None, alias="field") - value: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["field", "value"] + """ + + var_field: StrictStr | None = Field(default=None, alias="field") + value: StrictStr | None = None + __properties: ClassVar[list[str]] = ["field", "value"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class FieldOptionsRequestSchemaDependentFieldsValueInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of FieldOptionsRequestSchemaDependentFieldsValueInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of FieldOptionsRequestSchemaDependentFieldsValueInner from a dict""" if obj is None: return None @@ -80,10 +77,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "field": obj.get("field"), - "value": obj.get("value") - }) + _obj = cls.model_validate({"field": obj.get("field"), "value": obj.get("value")}) return _obj - - diff --git a/bamboohr_sdk/models/field_options_transformer.py b/bamboohr_sdk/models/field_options_transformer.py index db8c999..5e29a93 100644 --- a/bamboohr_sdk/models/field_options_transformer.py +++ b/bamboohr_sdk/models/field_options_transformer.py @@ -1,34 +1,35 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.field_options_transformer_id import FieldOptionsTransformerId + + class FieldOptionsTransformer(BaseModel): """ FieldOptionsTransformer - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The ID of the field option") - value: Optional[StrictStr] = Field(default=None, description="The value of the field option") - __properties: ClassVar[List[str]] = ["id", "value"] + """ + + id: FieldOptionsTransformerId | None = None + value: StrictStr | None = Field(default=None, description="The human-readable label of the field option") + __properties: ClassVar[list[str]] = ["id", "value"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +37,6 @@ class FieldOptionsTransformer(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +47,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of FieldOptionsTransformer from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,18 +61,20 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of id + if self.id: + _dict["id"] = self.id.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of FieldOptionsTransformer from a dict""" if obj is None: return None @@ -80,10 +82,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "id": FieldOptionsTransformerId.from_dict(obj["id"]) if obj.get("id") is not None else None, + "value": obj.get("value"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/field_options_transformer_id.py b/bamboohr_sdk/models/field_options_transformer_id.py new file mode 100644 index 0000000..b0c103f --- /dev/null +++ b/bamboohr_sdk/models/field_options_transformer_id.py @@ -0,0 +1,151 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +from typing import Any + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, ValidationError, field_validator +from typing_extensions import Self + +FIELDOPTIONSTRANSFORMERID_ONE_OF_SCHEMAS = ["int", "str"] + + +class FieldOptionsTransformerId(BaseModel): + """ + The ID of the field option. May be a string or an integer depending on the field type. + """ + + # data type: str + oneof_schema_1_validator: StrictStr | None = None + # data type: int + oneof_schema_2_validator: StrictInt | None = None + actual_instance: int | str | None = None + one_of_schemas: set[str] = {"int", "str"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = FieldOptionsTransformerId.model_construct() + error_messages = [] + match = 0 + # validate data type: str + try: + instance.oneof_schema_1_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # validate data type: int + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when setting `actual_instance` in FieldOptionsTransformerId with oneOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in FieldOptionsTransformerId with oneOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: str | dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into str + try: + # validation + instance.oneof_schema_1_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_1_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into int + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into FieldOptionsTransformerId with oneOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into FieldOptionsTransformerId with oneOf schemas: int, str. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> dict[str, Any] | int | str | None: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/bamboohr_sdk/models/forbidden_v1.py b/bamboohr_sdk/models/forbidden_v1.py new file mode 100644 index 0000000..be75954 --- /dev/null +++ b/bamboohr_sdk/models/forbidden_v1.py @@ -0,0 +1,87 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + +from bamboohr_sdk.models.forbidden_v1_error import ForbiddenV1Error + + +class ForbiddenV1(BaseModel): + """ + ForbiddenV1 + """ + + error: ForbiddenV1Error | None = None + __properties: ClassVar[list[str]] = ["error"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of ForbiddenV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict["error"] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of ForbiddenV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"error": ForbiddenV1Error.from_dict(obj["error"]) if obj.get("error") is not None else None} + ) + return _obj diff --git a/bamboohr_sdk/models/bad_request_error.py b/bamboohr_sdk/models/forbidden_v1_error.py similarity index 58% rename from bamboohr_sdk/models/bad_request_error.py rename to bamboohr_sdk/models/forbidden_v1_error.py index 2411d8f..89dcf72 100644 --- a/bamboohr_sdk/models/bad_request_error.py +++ b/bamboohr_sdk/models/forbidden_v1_error.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class BadRequestError(BaseModel): + +class ForbiddenV1Error(BaseModel): + """ + ForbiddenV1Error """ - BadRequestError - """ # noqa: E501 - code: Optional[StrictInt] = None - message: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["code", "message"] + + code: StrictInt | None = None + message: StrictStr | None = None + __properties: ClassVar[list[str]] = ["code", "message"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class BadRequestError(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of BadRequestError from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of ForbiddenV1Error from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,18 +69,13 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BadRequestError from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of ForbiddenV1Error from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message") - }) + _obj = cls.model_validate({"code": obj.get("code"), "message": obj.get("message")}) return _obj - - diff --git a/bamboohr_sdk/models/get_break_policy_suggestions_request.py b/bamboohr_sdk/models/get_break_policy_suggestions_request.py new file mode 100644 index 0000000..63d81a6 --- /dev/null +++ b/bamboohr_sdk/models/get_break_policy_suggestions_request.py @@ -0,0 +1,82 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Annotated, Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + + +class GetBreakPolicySuggestionsRequest(BaseModel): + """ + GetBreakPolicySuggestionsRequest + """ + + prompt: Annotated[str, Field(min_length=1, strict=True)] = Field( + description='The user\'s request or question for break policy suggestions (e.g. "What policies do we need for our California employees?")' + ) + __properties: ClassVar[list[str]] = ["prompt"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of GetBreakPolicySuggestionsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of GetBreakPolicySuggestionsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"prompt": obj.get("prompt")}) + return _obj diff --git a/bamboohr_sdk/models/get_company_report_response.py b/bamboohr_sdk/models/get_company_report_response.py index 910499d..daf63a1 100644 --- a/bamboohr_sdk/models/get_company_report_response.py +++ b/bamboohr_sdk/models/get_company_report_response.py @@ -1,37 +1,42 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.request_custom_report_response_employees_inner import RequestCustomReportResponseEmployeesInner -from bamboohr_sdk.models.request_custom_report_response_fields_inner import RequestCustomReportResponseFieldsInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.get_company_report_response_employees_inner import GetCompanyReportResponseEmployeesInner +from bamboohr_sdk.models.request_custom_report_response_fields_inner import RequestCustomReportResponseFieldsInner + + class GetCompanyReportResponse(BaseModel): """ GetCompanyReportResponse - """ # noqa: E501 - title: Optional[StrictStr] = Field(default=None, description="The report title.") - fields: Optional[List[RequestCustomReportResponseFieldsInner]] = Field(default=None, description="Metadata for each field included in the report.") - employees: Optional[List[RequestCustomReportResponseEmployeesInner]] = Field(default=None, description="One object per employee. Each object contains an `id` property plus one key per report field.") - __properties: ClassVar[List[str]] = ["title", "fields", "employees"] + """ + + title: StrictStr | None = Field(default=None, description="The report title.") + fields: list[RequestCustomReportResponseFieldsInner] | None = Field( + default=None, description="Metadata for each field included in the report." + ) + employees: list[GetCompanyReportResponseEmployeesInner] | None = Field( + default=None, + description="One object per employee. Each object contains an `id` property plus one key per report field.", + ) + __properties: ClassVar[list[str]] = ["title", "fields", "employees"] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +44,6 @@ class GetCompanyReportResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,11 +54,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GetCompanyReportResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -64,8 +68,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -78,18 +81,18 @@ def to_dict(self) -> Dict[str, Any]: for _item_fields in self.fields: if _item_fields: _items.append(_item_fields.to_dict()) - _dict['fields'] = _items + _dict["fields"] = _items # override the default output from pydantic by calling `to_dict()` of each item in employees (list) _items = [] if self.employees: for _item_employees in self.employees: if _item_employees: _items.append(_item_employees.to_dict()) - _dict['employees'] = _items + _dict["employees"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GetCompanyReportResponse from a dict""" if obj is None: return None @@ -97,11 +100,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "title": obj.get("title"), - "fields": [RequestCustomReportResponseFieldsInner.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None, - "employees": [RequestCustomReportResponseEmployeesInner.from_dict(_item) for _item in obj["employees"]] if obj.get("employees") is not None else None - }) + _obj = cls.model_validate( + { + "title": obj.get("title"), + "fields": [RequestCustomReportResponseFieldsInner.from_dict(_item) for _item in obj["fields"]] + if obj.get("fields") is not None + else None, + "employees": [GetCompanyReportResponseEmployeesInner.from_dict(_item) for _item in obj["employees"]] + if obj.get("employees") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/get_company_report_response_employees_inner.py b/bamboohr_sdk/models/get_company_report_response_employees_inner.py new file mode 100644 index 0000000..4ea4a2b --- /dev/null +++ b/bamboohr_sdk/models/get_company_report_response_employees_inner.py @@ -0,0 +1,96 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class GetCompanyReportResponseEmployeesInner(BaseModel): + """ + GetCompanyReportResponseEmployeesInner + """ + + id: StrictStr | None = Field(default=None, description="The internal employee ID.") + additional_properties: dict[str, Any] = {} + __properties: ClassVar[list[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of GetCompanyReportResponseEmployeesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: set[str] = set( + [ + "additional_properties", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of GetCompanyReportResponseEmployeesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"id": obj.get("id")}) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/bamboohr_sdk/models/get_data_from_dataset_v2_request.py b/bamboohr_sdk/models/get_data_from_dataset_v2_request.py new file mode 100644 index 0000000..c879dd1 --- /dev/null +++ b/bamboohr_sdk/models/get_data_from_dataset_v2_request.py @@ -0,0 +1,108 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Annotated, Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class GetDataFromDatasetV2Request(BaseModel): + """ + GetDataFromDatasetV2Request + """ + + fields: list[StrictStr | None] = Field( + description="Field names to return for each row. Names are dataset-specific; discover valid names via Get Fields from Dataset (v1.2) (`get-fields-from-dataset-v1_2`). The field-name vocabulary differs from the dedicated employee endpoints (e.g., the `employee` dataset uses `jobInformationReportsTo` / `jobInformationDepartment` / `employmentStatus` rather than List Employees' `reportsTo` / `department` / `status`)." + ) + filter: StrictStr | None = None + order_by: StrictStr | None = Field(default=None, alias="orderBy") + page: Annotated[int, Field(strict=True, ge=1)] | None = Field( + default=1, description="Page number to retrieve (1-indexed). Defaults to 1." + ) + page_size: Annotated[int, Field(le=1000, strict=True, ge=1)] | None = Field( + default=100, description="Number of records per page. Defaults to 100. Maximum is 1000.", alias="pageSize" + ) + __properties: ClassVar[list[str]] = ["fields", "filter", "orderBy", "page", "pageSize"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of GetDataFromDatasetV2Request from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if filter (nullable) is None + # and model_fields_set contains the field + if self.filter is None and "filter" in self.model_fields_set: + _dict["filter"] = None + + # set to None if order_by (nullable) is None + # and model_fields_set contains the field + if self.order_by is None and "order_by" in self.model_fields_set: + _dict["orderBy"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of GetDataFromDatasetV2Request from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "fields": obj.get("fields"), + "filter": obj.get("filter"), + "orderBy": obj.get("orderBy"), + "page": obj.get("page") if obj.get("page") is not None else 1, + "pageSize": obj.get("pageSize") if obj.get("pageSize") is not None else 100, + } + ) + return _obj diff --git a/bamboohr_sdk/models/get_employee_response.py b/bamboohr_sdk/models/get_employee_response.py new file mode 100644 index 0000000..0c2ed60 --- /dev/null +++ b/bamboohr_sdk/models/get_employee_response.py @@ -0,0 +1,490 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing_extensions import Self + + +class GetEmployeeResponse(BaseModel): + """ + Employee data returned by the Get Employee endpoint. The `id` field is always present; all other named properties are included only when explicitly requested via the `fields` query parameter. Additional custom or company-configured fields may also appear. + """ + + id: StrictStr = Field( + description="The internal employee ID — the canonical, immutable identifier for this employee across all employee endpoints. Equivalent to `employeeId` on `list-employees` and `eeid` on the `employee` dataset. Use this value (not `employeeNumber`) for employee ID inputs such as `{id}` path parameters or `filter[ids]`." + ) + employee_number: StrictStr | None = Field(default=None, alias="employeeNumber") + first_name: StrictStr | None = Field(default=None, alias="firstName") + last_name: StrictStr | None = Field(default=None, alias="lastName") + preferred_name: StrictStr | None = Field(default=None, alias="preferredName") + middle_name: StrictStr | None = Field(default=None, alias="middleName") + photo_url: StrictStr | None = Field(default=None, alias="photoUrl") + job_title_name: StrictStr | None = Field(default=None, alias="jobTitleName") + job_title_id: StrictStr | None = Field(default=None, alias="jobTitleId") + status: StrictStr | None = None + work_email: StrictStr | None = Field(default=None, alias="workEmail") + home_email: StrictStr | None = Field(default=None, alias="homeEmail") + best_email: StrictStr | None = Field(default=None, alias="bestEmail") + work_phone: StrictStr | None = Field(default=None, alias="workPhone") + work_phone_extension: StrictStr | None = Field(default=None, alias="workPhoneExtension") + mobile_phone: StrictStr | None = Field(default=None, alias="mobilePhone") + home_phone: StrictStr | None = Field(default=None, alias="homePhone") + skype_username: StrictStr | None = Field(default=None, alias="skypeUsername") + linkedin_url: StrictStr | None = Field(default=None, alias="linkedinUrl") + facebook_url: StrictStr | None = Field(default=None, alias="facebookUrl") + instagram_url: StrictStr | None = Field(default=None, alias="instagramUrl") + twitter_url: StrictStr | None = Field(default=None, alias="twitterUrl") + pinterest_url: StrictStr | None = Field(default=None, alias="pinterestUrl") + birth_date: StrictStr | None = Field(default=None, alias="birthDate") + hire_date: StrictStr | None = Field(default=None, alias="hireDate") + original_hire_date: StrictStr | None = Field(default=None, alias="originalHireDate") + termination_date: StrictStr | None = Field(default=None, alias="terminationDate") + address1: StrictStr | None = None + city: StrictStr | None = None + state: StrictStr | None = None + country: StrictStr | None = None + gender: StrictStr | None = None + marital: StrictStr | None = None + pay_rate: StrictStr | None = Field(default=None, alias="payRate") + pay_type: StrictStr | None = Field(default=None, alias="payType") + pay_period: StrictStr | None = Field(default=None, alias="payPeriod") + exempt: StrictStr | None = None + can_upload_photo: StrictBool | None = Field(default=None, alias="canUploadPhoto") + division: StrictStr | None = None + division_id: StrictStr | None = Field(default=None, alias="divisionId") + department: StrictStr | None = None + department_id: StrictStr | None = Field(default=None, alias="departmentId") + location: StrictStr | None = None + location_id: StrictStr | None = Field(default=None, alias="locationId") + employment_status: StrictStr | None = Field(default=None, alias="employmentStatus") + employment_status_id: StrictStr | None = Field(default=None, alias="employmentStatusId") + reports_to_name: StrictStr | None = Field(default=None, alias="reportsToName") + reports_to_id: StrictStr | None = Field(default=None, alias="reportsToId") + additional_properties: dict[str, Any] = {} + __properties: ClassVar[list[str]] = [ + "id", + "employeeNumber", + "firstName", + "lastName", + "preferredName", + "middleName", + "photoUrl", + "jobTitleName", + "jobTitleId", + "status", + "workEmail", + "homeEmail", + "bestEmail", + "workPhone", + "workPhoneExtension", + "mobilePhone", + "homePhone", + "skypeUsername", + "linkedinUrl", + "facebookUrl", + "instagramUrl", + "twitterUrl", + "pinterestUrl", + "birthDate", + "hireDate", + "originalHireDate", + "terminationDate", + "address1", + "city", + "state", + "country", + "gender", + "marital", + "payRate", + "payType", + "payPeriod", + "exempt", + "canUploadPhoto", + "division", + "divisionId", + "department", + "departmentId", + "location", + "locationId", + "employmentStatus", + "employmentStatusId", + "reportsToName", + "reportsToId", + ] + + @field_validator("status") + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["Active", "Inactive"]): + raise ValueError("must be one of enum values ('Active', 'Inactive')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of GetEmployeeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: set[str] = set( + [ + "additional_properties", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if employee_number (nullable) is None + # and model_fields_set contains the field + if self.employee_number is None and "employee_number" in self.model_fields_set: + _dict["employeeNumber"] = None + + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict["firstName"] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict["lastName"] = None + + # set to None if preferred_name (nullable) is None + # and model_fields_set contains the field + if self.preferred_name is None and "preferred_name" in self.model_fields_set: + _dict["preferredName"] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict["middleName"] = None + + # set to None if photo_url (nullable) is None + # and model_fields_set contains the field + if self.photo_url is None and "photo_url" in self.model_fields_set: + _dict["photoUrl"] = None + + # set to None if job_title_name (nullable) is None + # and model_fields_set contains the field + if self.job_title_name is None and "job_title_name" in self.model_fields_set: + _dict["jobTitleName"] = None + + # set to None if job_title_id (nullable) is None + # and model_fields_set contains the field + if self.job_title_id is None and "job_title_id" in self.model_fields_set: + _dict["jobTitleId"] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict["status"] = None + + # set to None if work_email (nullable) is None + # and model_fields_set contains the field + if self.work_email is None and "work_email" in self.model_fields_set: + _dict["workEmail"] = None + + # set to None if home_email (nullable) is None + # and model_fields_set contains the field + if self.home_email is None and "home_email" in self.model_fields_set: + _dict["homeEmail"] = None + + # set to None if best_email (nullable) is None + # and model_fields_set contains the field + if self.best_email is None and "best_email" in self.model_fields_set: + _dict["bestEmail"] = None + + # set to None if work_phone (nullable) is None + # and model_fields_set contains the field + if self.work_phone is None and "work_phone" in self.model_fields_set: + _dict["workPhone"] = None + + # set to None if work_phone_extension (nullable) is None + # and model_fields_set contains the field + if self.work_phone_extension is None and "work_phone_extension" in self.model_fields_set: + _dict["workPhoneExtension"] = None + + # set to None if mobile_phone (nullable) is None + # and model_fields_set contains the field + if self.mobile_phone is None and "mobile_phone" in self.model_fields_set: + _dict["mobilePhone"] = None + + # set to None if home_phone (nullable) is None + # and model_fields_set contains the field + if self.home_phone is None and "home_phone" in self.model_fields_set: + _dict["homePhone"] = None + + # set to None if skype_username (nullable) is None + # and model_fields_set contains the field + if self.skype_username is None and "skype_username" in self.model_fields_set: + _dict["skypeUsername"] = None + + # set to None if linkedin_url (nullable) is None + # and model_fields_set contains the field + if self.linkedin_url is None and "linkedin_url" in self.model_fields_set: + _dict["linkedinUrl"] = None + + # set to None if facebook_url (nullable) is None + # and model_fields_set contains the field + if self.facebook_url is None and "facebook_url" in self.model_fields_set: + _dict["facebookUrl"] = None + + # set to None if instagram_url (nullable) is None + # and model_fields_set contains the field + if self.instagram_url is None and "instagram_url" in self.model_fields_set: + _dict["instagramUrl"] = None + + # set to None if twitter_url (nullable) is None + # and model_fields_set contains the field + if self.twitter_url is None and "twitter_url" in self.model_fields_set: + _dict["twitterUrl"] = None + + # set to None if pinterest_url (nullable) is None + # and model_fields_set contains the field + if self.pinterest_url is None and "pinterest_url" in self.model_fields_set: + _dict["pinterestUrl"] = None + + # set to None if birth_date (nullable) is None + # and model_fields_set contains the field + if self.birth_date is None and "birth_date" in self.model_fields_set: + _dict["birthDate"] = None + + # set to None if hire_date (nullable) is None + # and model_fields_set contains the field + if self.hire_date is None and "hire_date" in self.model_fields_set: + _dict["hireDate"] = None + + # set to None if original_hire_date (nullable) is None + # and model_fields_set contains the field + if self.original_hire_date is None and "original_hire_date" in self.model_fields_set: + _dict["originalHireDate"] = None + + # set to None if termination_date (nullable) is None + # and model_fields_set contains the field + if self.termination_date is None and "termination_date" in self.model_fields_set: + _dict["terminationDate"] = None + + # set to None if address1 (nullable) is None + # and model_fields_set contains the field + if self.address1 is None and "address1" in self.model_fields_set: + _dict["address1"] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict["city"] = None + + # set to None if state (nullable) is None + # and model_fields_set contains the field + if self.state is None and "state" in self.model_fields_set: + _dict["state"] = None + + # set to None if country (nullable) is None + # and model_fields_set contains the field + if self.country is None and "country" in self.model_fields_set: + _dict["country"] = None + + # set to None if gender (nullable) is None + # and model_fields_set contains the field + if self.gender is None and "gender" in self.model_fields_set: + _dict["gender"] = None + + # set to None if marital (nullable) is None + # and model_fields_set contains the field + if self.marital is None and "marital" in self.model_fields_set: + _dict["marital"] = None + + # set to None if pay_rate (nullable) is None + # and model_fields_set contains the field + if self.pay_rate is None and "pay_rate" in self.model_fields_set: + _dict["payRate"] = None + + # set to None if pay_type (nullable) is None + # and model_fields_set contains the field + if self.pay_type is None and "pay_type" in self.model_fields_set: + _dict["payType"] = None + + # set to None if pay_period (nullable) is None + # and model_fields_set contains the field + if self.pay_period is None and "pay_period" in self.model_fields_set: + _dict["payPeriod"] = None + + # set to None if exempt (nullable) is None + # and model_fields_set contains the field + if self.exempt is None and "exempt" in self.model_fields_set: + _dict["exempt"] = None + + # set to None if can_upload_photo (nullable) is None + # and model_fields_set contains the field + if self.can_upload_photo is None and "can_upload_photo" in self.model_fields_set: + _dict["canUploadPhoto"] = None + + # set to None if division (nullable) is None + # and model_fields_set contains the field + if self.division is None and "division" in self.model_fields_set: + _dict["division"] = None + + # set to None if division_id (nullable) is None + # and model_fields_set contains the field + if self.division_id is None and "division_id" in self.model_fields_set: + _dict["divisionId"] = None + + # set to None if department (nullable) is None + # and model_fields_set contains the field + if self.department is None and "department" in self.model_fields_set: + _dict["department"] = None + + # set to None if department_id (nullable) is None + # and model_fields_set contains the field + if self.department_id is None and "department_id" in self.model_fields_set: + _dict["departmentId"] = None + + # set to None if location (nullable) is None + # and model_fields_set contains the field + if self.location is None and "location" in self.model_fields_set: + _dict["location"] = None + + # set to None if location_id (nullable) is None + # and model_fields_set contains the field + if self.location_id is None and "location_id" in self.model_fields_set: + _dict["locationId"] = None + + # set to None if employment_status (nullable) is None + # and model_fields_set contains the field + if self.employment_status is None and "employment_status" in self.model_fields_set: + _dict["employmentStatus"] = None + + # set to None if employment_status_id (nullable) is None + # and model_fields_set contains the field + if self.employment_status_id is None and "employment_status_id" in self.model_fields_set: + _dict["employmentStatusId"] = None + + # set to None if reports_to_name (nullable) is None + # and model_fields_set contains the field + if self.reports_to_name is None and "reports_to_name" in self.model_fields_set: + _dict["reportsToName"] = None + + # set to None if reports_to_id (nullable) is None + # and model_fields_set contains the field + if self.reports_to_id is None and "reports_to_id" in self.model_fields_set: + _dict["reportsToId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of GetEmployeeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "employeeNumber": obj.get("employeeNumber"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "preferredName": obj.get("preferredName"), + "middleName": obj.get("middleName"), + "photoUrl": obj.get("photoUrl"), + "jobTitleName": obj.get("jobTitleName"), + "jobTitleId": obj.get("jobTitleId"), + "status": obj.get("status"), + "workEmail": obj.get("workEmail"), + "homeEmail": obj.get("homeEmail"), + "bestEmail": obj.get("bestEmail"), + "workPhone": obj.get("workPhone"), + "workPhoneExtension": obj.get("workPhoneExtension"), + "mobilePhone": obj.get("mobilePhone"), + "homePhone": obj.get("homePhone"), + "skypeUsername": obj.get("skypeUsername"), + "linkedinUrl": obj.get("linkedinUrl"), + "facebookUrl": obj.get("facebookUrl"), + "instagramUrl": obj.get("instagramUrl"), + "twitterUrl": obj.get("twitterUrl"), + "pinterestUrl": obj.get("pinterestUrl"), + "birthDate": obj.get("birthDate"), + "hireDate": obj.get("hireDate"), + "originalHireDate": obj.get("originalHireDate"), + "terminationDate": obj.get("terminationDate"), + "address1": obj.get("address1"), + "city": obj.get("city"), + "state": obj.get("state"), + "country": obj.get("country"), + "gender": obj.get("gender"), + "marital": obj.get("marital"), + "payRate": obj.get("payRate"), + "payType": obj.get("payType"), + "payPeriod": obj.get("payPeriod"), + "exempt": obj.get("exempt"), + "canUploadPhoto": obj.get("canUploadPhoto"), + "division": obj.get("division"), + "divisionId": obj.get("divisionId"), + "department": obj.get("department"), + "departmentId": obj.get("departmentId"), + "location": obj.get("location"), + "locationId": obj.get("locationId"), + "employmentStatus": obj.get("employmentStatus"), + "employmentStatusId": obj.get("employmentStatusId"), + "reportsToName": obj.get("reportsToName"), + "reportsToId": obj.get("reportsToId"), + } + ) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/bamboohr_sdk/models/get_employees_employee_base_response.py b/bamboohr_sdk/models/get_employees_employee_base_response.py new file mode 100644 index 0000000..eccaf3f --- /dev/null +++ b/bamboohr_sdk/models/get_employees_employee_base_response.py @@ -0,0 +1,142 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class GetEmployeesEmployeeBaseResponse(BaseModel): + """ + Base employee fields that are always included in the response. + """ + + employee_id: StrictStr = Field( + description="The internal employee ID — the canonical, immutable identifier for this employee across all employee endpoints. Equivalent to `id` on `get-employee` and `eeid` on the `employee` dataset. Use this value (not `employeeNumber`) for employee ID inputs such as `{id}` path parameters or `filter[ids]`.", + alias="employeeId", + ) + first_name: StrictStr | None = Field(alias="firstName") + last_name: StrictStr | None = Field(alias="lastName") + preferred_name: StrictStr | None = Field(alias="preferredName") + photo_url: StrictStr | None = Field(alias="photoUrl") + job_title_name: StrictStr | None = Field(alias="jobTitleName") + status: StrictStr | None + restricted_fields: list[StrictStr] = Field( + description="Array of field names that are restricted due to permission checks", alias="_restrictedFields" + ) + __properties: ClassVar[list[str]] = [ + "employeeId", + "firstName", + "lastName", + "preferredName", + "photoUrl", + "jobTitleName", + "status", + "_restrictedFields", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of GetEmployeesEmployeeBaseResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if first_name (nullable) is None + # and model_fields_set contains the field + if self.first_name is None and "first_name" in self.model_fields_set: + _dict["firstName"] = None + + # set to None if last_name (nullable) is None + # and model_fields_set contains the field + if self.last_name is None and "last_name" in self.model_fields_set: + _dict["lastName"] = None + + # set to None if preferred_name (nullable) is None + # and model_fields_set contains the field + if self.preferred_name is None and "preferred_name" in self.model_fields_set: + _dict["preferredName"] = None + + # set to None if photo_url (nullable) is None + # and model_fields_set contains the field + if self.photo_url is None and "photo_url" in self.model_fields_set: + _dict["photoUrl"] = None + + # set to None if job_title_name (nullable) is None + # and model_fields_set contains the field + if self.job_title_name is None and "job_title_name" in self.model_fields_set: + _dict["jobTitleName"] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict["status"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of GetEmployeesEmployeeBaseResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "preferredName": obj.get("preferredName"), + "photoUrl": obj.get("photoUrl"), + "jobTitleName": obj.get("jobTitleName"), + "status": obj.get("status"), + "_restrictedFields": obj.get("_restrictedFields"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/get_employees_employee_response.py b/bamboohr_sdk/models/get_employees_employee_response.py index d9a9d05..bbb4e7a 100644 --- a/bamboohr_sdk/models/get_employees_employee_response.py +++ b/bamboohr_sdk/models/get_employees_employee_response.py @@ -1,54 +1,317 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing_extensions import Self +from bamboohr_sdk.models.get_employees_employee_response_all_of_overtime_rate import ( + GetEmployeesEmployeeResponseAllOfOvertimeRate, +) +from bamboohr_sdk.models.get_employees_employee_response_all_of_pay_rate import GetEmployeesEmployeeResponseAllOfPayRate +from bamboohr_sdk.models.get_employees_employee_response_all_of_teams import GetEmployeesEmployeeResponseAllOfTeams + + class GetEmployeesEmployeeResponse(BaseModel): """ - Employee data response object containing basic employee information and permission-restricted fields. When the `fields` parameter is provided, additional requested fields will be included in the response. Invalid field names are silently ignored. Field values are subject to permission checks - restricted fields will be null and their names will appear in `_restrictedFields`. The `_restrictedFields` property is only present when at least one field is restricted; it is omitted entirely on records with no restrictions. - """ # noqa: E501 - employee_id: StrictStr = Field(description="Unique identifier for the employee", alias="employeeId") - first_name: Optional[StrictStr] = Field(description="Employee's first name", alias="firstName") - last_name: Optional[StrictStr] = Field(description="Employee's last name", alias="lastName") - preferred_name: Optional[StrictStr] = Field(description="Employee's preferred name", alias="preferredName") - photo_url: Optional[StrictStr] = Field(description="URL to employee's profile photo", alias="photoUrl") - job_title_name: Optional[StrictStr] = Field(description="Employee's current job title", alias="jobTitleName") - status: Optional[StrictStr] = Field(description="Employee's current status (Active or Inactive).") - restricted_fields: Optional[List[StrictStr]] = Field(default=None, description="Array of field names that are restricted due to permission checks", alias="_restrictedFields") - work_email: Optional[StrictStr] = Field(default=None, description="Employee's work email address. Only included when requested via the `fields` parameter.", alias="workEmail") - home_email: Optional[StrictStr] = Field(default=None, description="Employee's home email address. Only included when requested via the `fields` parameter.", alias="homeEmail") - best_email: Optional[StrictStr] = Field(default=None, description="Employee's best email address. Only included when requested via the `fields` parameter.", alias="bestEmail") - middle_name: Optional[StrictStr] = Field(default=None, description="Employee's middle name. Only included when requested via the `fields` parameter.", alias="middleName") - work_phone: Optional[StrictStr] = Field(default=None, description="Employee's work phone number. Only included when requested via the `fields` parameter.", alias="workPhone") - work_phone_extension: Optional[StrictStr] = Field(default=None, description="Employee's work phone extension. Only included when requested via the `fields` parameter.", alias="workPhoneExtension") - mobile_phone: Optional[StrictStr] = Field(default=None, description="Employee's mobile phone number. Only included when requested via the `fields` parameter.", alias="mobilePhone") - home_phone: Optional[StrictStr] = Field(default=None, description="Employee's home phone number. Only included when requested via the `fields` parameter.", alias="homePhone") - skype_username: Optional[StrictStr] = Field(default=None, description="Employee's Skype username. Only included when requested via the `fields` parameter.", alias="skypeUsername") - linkedin_url: Optional[StrictStr] = Field(default=None, description="Employee's LinkedIn profile URL. Only included when requested via the `fields` parameter.", alias="linkedinUrl") - facebook_url: Optional[StrictStr] = Field(default=None, description="Employee's Facebook profile URL. Only included when requested via the `fields` parameter.", alias="facebookUrl") - instagram_url: Optional[StrictStr] = Field(default=None, description="Employee's Instagram profile URL. Only included when requested via the `fields` parameter.", alias="instagramUrl") - twitter_url: Optional[StrictStr] = Field(default=None, description="Employee's Twitter/X profile URL. Only included when requested via the `fields` parameter.", alias="twitterUrl") - pinterest_url: Optional[StrictStr] = Field(default=None, description="Employee's Pinterest profile URL. Only included when requested via the `fields` parameter.", alias="pinterestUrl") - __properties: ClassVar[List[str]] = ["employeeId", "firstName", "lastName", "preferredName", "photoUrl", "jobTitleName", "status", "_restrictedFields", "workEmail", "homeEmail", "bestEmail", "middleName", "workPhone", "workPhoneExtension", "mobilePhone", "homePhone", "skypeUsername", "linkedinUrl", "facebookUrl", "instagramUrl", "twitterUrl", "pinterestUrl"] + Employee data response object containing basic employee information and optionally requested fields. When the `fields` parameter is provided, additional requested fields will be included. Field values are subject to permission checks — restricted fields are returned as `null` and their names are listed in `_restrictedFields`. + """ + + employee_id: StrictStr = Field( + description="The internal employee ID — the canonical, immutable identifier for this employee across all employee endpoints. Equivalent to `id` on `get-employee` and `eeid` on the `employee` dataset. Use this value (not `employeeNumber`) for employee ID inputs such as `{id}` path parameters or `filter[ids]`.", + alias="employeeId", + ) + first_name: StrictStr = Field(alias="firstName") + last_name: StrictStr = Field(alias="lastName") + preferred_name: StrictStr = Field(alias="preferredName") + photo_url: StrictStr = Field(alias="photoUrl") + job_title_name: StrictStr = Field(alias="jobTitleName") + status: StrictStr + restricted_fields: list[StrictStr] = Field( + description="Array of field names that are restricted due to permission checks", alias="_restrictedFields" + ) + address_line1: StrictStr | None = Field(default=None, alias="addressLine1") + address_line2: StrictStr | None = Field(default=None, alias="addressLine2") + age: StrictStr | None = None + allergies: StrictStr | None = None + best_email: StrictStr | None = Field(default=None, alias="bestEmail") + birth_date: StrictStr | None = Field(default=None, alias="birthDate") + birthplace: StrictStr | None = None + citizenship: StrictStr | None = None + citizenship_id: StrictStr | None = Field(default=None, alias="citizenshipId") + city: StrictStr | None = None + compensation_change_reason: StrictStr | None = Field(default=None, alias="compensationChangeReason") + compensation_change_reason_id: StrictStr | None = Field(default=None, alias="compensationChangeReasonId") + compensation_comment: StrictStr | None = Field(default=None, alias="compensationComment") + compensation_effective_date: StrictStr | None = Field(default=None, alias="compensationEffectiveDate") + compensation_end_date: StrictStr | None = Field(default=None, alias="compensationEndDate") + contract_end_date: StrictStr | None = Field(default=None, alias="contractEndDate") + country: StrictStr | None = None + country_id: StrictStr | None = Field(default=None, alias="countryId") + department_id: StrictStr | None = Field(default=None, alias="departmentId") + department_name: StrictStr | None = Field(default=None, alias="departmentName") + dietary_restrictions: StrictStr | None = Field(default=None, alias="dietaryRestrictions") + display_name: StrictStr | None = Field(default=None, alias="displayName") + division_id: StrictStr | None = Field(default=None, alias="divisionId") + division_name: StrictStr | None = Field(default=None, alias="divisionName") + eeo_job_category: StrictStr | None = Field(default=None, alias="eeoJobCategory") + eeo_job_category_id: StrictStr | None = Field(default=None, alias="eeoJobCategoryId") + ein: StrictStr | None = None + eligible_for_rehire: StrictStr | None = Field(default=None, alias="eligibleForRehire") + eligible_for_rehire_id: StrictStr | None = Field(default=None, alias="eligibleForRehireId") + employee_name: StrictStr | None = Field(default=None, alias="employeeName") + employee_number: StrictStr | None = Field(default=None, alias="employeeNumber") + employment_status_comment: StrictStr | None = Field(default=None, alias="employmentStatusComment") + employment_status_effective_date: StrictStr | None = Field(default=None, alias="employmentStatusEffectiveDate") + employment_status_id: StrictStr | None = Field(default=None, alias="employmentStatusId") + employment_status_name: StrictStr | None = Field(default=None, alias="employmentStatusName") + employment_type: StrictStr | None = Field(default=None, alias="employmentType") + employment_type_id: StrictStr | None = Field(default=None, alias="employmentTypeId") + ethnicity: StrictStr | None = None + ethnicity_id: StrictStr | None = Field(default=None, alias="ethnicityId") + facebook_url: StrictStr | None = Field(default=None, alias="facebookUrl") + final_dose_administration_date: StrictStr | None = Field(default=None, alias="finalDoseAdministrationDate") + final_pay_date: StrictStr | None = Field(default=None, alias="finalPayDate") + first_name_last_name: StrictStr | None = Field(default=None, alias="firstNameLastName") + first_name_middle_initial: StrictStr | None = Field(default=None, alias="firstNameMiddleInitial") + flsa_code: StrictStr | None = Field(default=None, alias="flsaCode") + flsa_code_id: StrictStr | None = Field(default=None, alias="flsaCodeId") + gender: StrictStr | None = None + gender_identity: StrictStr | None = Field(default=None, alias="genderIdentity") + gender_identity_id: list[StrictInt] | None = Field( + default=None, + description="Employee's gender identity ID. Only included when requested via the `fields` parameter.", + alias="genderIdentityId", + ) + hire_date: StrictStr | None = Field(default=None, alias="hireDate") + home_email: StrictStr | None = Field(default=None, alias="homeEmail") + home_phone: StrictStr | None = Field(default=None, alias="homePhone") + hours_per_pay_cycle: StrictStr | None = Field(default=None, alias="hoursPerPayCycle") + instagram_url: StrictStr | None = Field(default=None, alias="instagramUrl") + is_manager: StrictBool | None = Field(default=None, alias="isManager") + jacket_size: StrictStr | None = Field(default=None, alias="jacketSize") + jacket_size_id: StrictStr | None = Field(default=None, alias="jacketSizeId") + job_information_effective_date: StrictStr | None = Field(default=None, alias="jobInformationEffectiveDate") + job_title_id: StrictStr | None = Field(default=None, alias="jobTitleId") + linkedin_url: StrictStr | None = Field(default=None, alias="linkedinUrl") + location_id: StrictStr | None = Field(default=None, alias="locationId") + location_name: StrictStr | None = Field(default=None, alias="locationName") + marital_status: StrictStr | None = Field(default=None, alias="maritalStatus") + middle_initial: StrictStr | None = Field(default=None, alias="middleInitial") + middle_name: StrictStr | None = Field(default=None, alias="middleName") + mobile_phone: StrictStr | None = Field(default=None, alias="mobilePhone") + national_id: StrictStr | None = Field(default=None, alias="nationalId") + national_insurance_category: StrictStr | None = Field(default=None, alias="nationalInsuranceCategory") + national_insurance_category_id: StrictStr | None = Field(default=None, alias="nationalInsuranceCategoryId") + nationality: StrictStr | None = None + nationality_id: StrictStr | None = Field(default=None, alias="nationalityId") + nick_name: StrictStr | None = Field(default=None, alias="nickName") + nin: StrictStr | None = None + notice_period: StrictStr | None = Field(default=None, alias="noticePeriod") + notice_period_id: StrictStr | None = Field(default=None, alias="noticePeriodId") + original_hire_date: StrictStr | None = Field(default=None, alias="originalHireDate") + overtime: StrictStr | None = None + overtime_rate: GetEmployeesEmployeeResponseAllOfOvertimeRate | None = Field(default=None, alias="overtimeRate") + paid_per: StrictStr | None = Field(default=None, alias="paidPer") + pay_rate: GetEmployeesEmployeeResponseAllOfPayRate | None = Field(default=None, alias="payRate") + pay_schedule: StrictStr | None = Field(default=None, alias="paySchedule") + pay_schedule_id: StrictStr | None = Field(default=None, alias="payScheduleId") + pay_type: StrictStr | None = Field(default=None, alias="payType") + pinterest_url: StrictStr | None = Field(default=None, alias="pinterestUrl") + preferred_name_last_name: StrictStr | None = Field(default=None, alias="preferredNameLastName") + probation_end_date: StrictStr | None = Field(default=None, alias="probationEndDate") + pronouns: StrictStr | None = None + pronouns_id: StrictStr | None = Field(default=None, alias="pronounsId") + proof_of_vaccination: StrictBool | None = Field(default=None, alias="proofOfVaccination") + reports_to_id: StrictStr | None = Field(default=None, alias="reportsToId") + reports_to_name: StrictStr | None = Field(default=None, alias="reportsToName") + secondary_language: StrictStr | None = Field(default=None, alias="secondaryLanguage") + shirt_size: StrictStr | None = Field(default=None, alias="shirtSize") + shirt_size_id: StrictStr | None = Field(default=None, alias="shirtSizeId") + sin: StrictStr | None = None + skype_username: StrictStr | None = Field(default=None, alias="skypeUsername") + ssn: StrictStr | None = None + state: StrictStr | None = None + state_id: StrictStr | None = Field(default=None, alias="stateId") + tax_type_id: StrictStr | None = Field(default=None, alias="taxTypeId") + teams: list[GetEmployeesEmployeeResponseAllOfTeams] | None = Field( + default=None, description="Employee's teams. Only included when requested via the `fields` parameter." + ) + tenure: StrictStr | None = None + termination_date: StrictStr | None = Field(default=None, alias="terminationDate") + termination_reason: StrictStr | None = Field(default=None, alias="terminationReason") + termination_reason_id: StrictStr | None = Field(default=None, alias="terminationReasonId") + termination_regrettable: StrictStr | None = Field(default=None, alias="terminationRegrettable") + termination_regrettable_id: StrictStr | None = Field(default=None, alias="terminationRegrettableId") + termination_type: StrictStr | None = Field(default=None, alias="terminationType") + termination_type_id: StrictStr | None = Field(default=None, alias="terminationTypeId") + timezone: StrictStr | None = None + t_shirt_size: StrictStr | None = Field(default=None, alias="tShirtSize") + t_shirt_size_id: StrictStr | None = Field(default=None, alias="tShirtSizeId") + twitter_url: StrictStr | None = Field(default=None, alias="twitterUrl") + user_id: StrictStr | None = Field(default=None, alias="userId") + vaccination_status: StrictStr | None = Field(default=None, alias="vaccinationStatus") + vaccination_status_id: StrictStr | None = Field(default=None, alias="vaccinationStatusId") + vaccine_received: StrictStr | None = Field(default=None, alias="vaccineReceived") + vaccine_received_id: StrictStr | None = Field(default=None, alias="vaccineReceivedId") + veteran_status: StrictStr | None = Field(default=None, alias="veteranStatus") + veteran_status_id: list[StrictInt] | None = Field( + default=None, + description="Employee's veteran status ID. Only included when requested via the `fields` parameter.", + alias="veteranStatusId", + ) + work_email: StrictStr | None = Field(default=None, alias="workEmail") + work_phone: StrictStr | None = Field(default=None, alias="workPhone") + work_phone_extension: StrictStr | None = Field(default=None, alias="workPhoneExtension") + zipcode: StrictStr | None = None + __properties: ClassVar[list[str]] = [ + "employeeId", + "firstName", + "lastName", + "preferredName", + "photoUrl", + "jobTitleName", + "status", + "_restrictedFields", + "addressLine1", + "addressLine2", + "age", + "allergies", + "bestEmail", + "birthDate", + "birthplace", + "citizenship", + "citizenshipId", + "city", + "compensationChangeReason", + "compensationChangeReasonId", + "compensationComment", + "compensationEffectiveDate", + "compensationEndDate", + "contractEndDate", + "country", + "countryId", + "departmentId", + "departmentName", + "dietaryRestrictions", + "displayName", + "divisionId", + "divisionName", + "eeoJobCategory", + "eeoJobCategoryId", + "ein", + "eligibleForRehire", + "eligibleForRehireId", + "employeeName", + "employeeNumber", + "employmentStatusComment", + "employmentStatusEffectiveDate", + "employmentStatusId", + "employmentStatusName", + "employmentType", + "employmentTypeId", + "ethnicity", + "ethnicityId", + "facebookUrl", + "finalDoseAdministrationDate", + "finalPayDate", + "firstNameLastName", + "firstNameMiddleInitial", + "flsaCode", + "flsaCodeId", + "gender", + "genderIdentity", + "genderIdentityId", + "hireDate", + "homeEmail", + "homePhone", + "hoursPerPayCycle", + "instagramUrl", + "isManager", + "jacketSize", + "jacketSizeId", + "jobInformationEffectiveDate", + "jobTitleId", + "linkedinUrl", + "locationId", + "locationName", + "maritalStatus", + "middleInitial", + "middleName", + "mobilePhone", + "nationalId", + "nationalInsuranceCategory", + "nationalInsuranceCategoryId", + "nationality", + "nationalityId", + "nickName", + "nin", + "noticePeriod", + "noticePeriodId", + "originalHireDate", + "overtime", + "overtimeRate", + "paidPer", + "payRate", + "paySchedule", + "payScheduleId", + "payType", + "pinterestUrl", + "preferredNameLastName", + "probationEndDate", + "pronouns", + "pronounsId", + "proofOfVaccination", + "reportsToId", + "reportsToName", + "secondaryLanguage", + "shirtSize", + "shirtSizeId", + "sin", + "skypeUsername", + "ssn", + "state", + "stateId", + "taxTypeId", + "teams", + "tenure", + "terminationDate", + "terminationReason", + "terminationReasonId", + "terminationRegrettable", + "terminationRegrettableId", + "terminationType", + "terminationTypeId", + "timezone", + "tShirtSize", + "tShirtSizeId", + "twitterUrl", + "userId", + "vaccinationStatus", + "vaccinationStatusId", + "vaccineReceived", + "vaccineReceivedId", + "veteranStatus", + "veteranStatusId", + "workEmail", + "workPhone", + "workPhoneExtension", + "zipcode", + ] model_config = ConfigDict( populate_by_name=True, @@ -56,7 +319,6 @@ class GetEmployeesEmployeeResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,11 +329,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GetEmployeesEmployeeResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -81,118 +343,628 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, exclude=excluded_fields, exclude_none=True, ) - # set to None if first_name (nullable) is None + # override the default output from pydantic by calling `to_dict()` of overtime_rate + if self.overtime_rate: + _dict["overtimeRate"] = self.overtime_rate.to_dict() + # override the default output from pydantic by calling `to_dict()` of pay_rate + if self.pay_rate: + _dict["payRate"] = self.pay_rate.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in teams (list) + _items = [] + if self.teams: + for _item_teams in self.teams: + if _item_teams: + _items.append(_item_teams.to_dict()) + _dict["teams"] = _items + # set to None if address_line1 (nullable) is None # and model_fields_set contains the field - if self.first_name is None and "first_name" in self.model_fields_set: - _dict['firstName'] = None + if self.address_line1 is None and "address_line1" in self.model_fields_set: + _dict["addressLine1"] = None - # set to None if last_name (nullable) is None + # set to None if address_line2 (nullable) is None # and model_fields_set contains the field - if self.last_name is None and "last_name" in self.model_fields_set: - _dict['lastName'] = None + if self.address_line2 is None and "address_line2" in self.model_fields_set: + _dict["addressLine2"] = None - # set to None if preferred_name (nullable) is None + # set to None if age (nullable) is None # and model_fields_set contains the field - if self.preferred_name is None and "preferred_name" in self.model_fields_set: - _dict['preferredName'] = None + if self.age is None and "age" in self.model_fields_set: + _dict["age"] = None - # set to None if photo_url (nullable) is None + # set to None if allergies (nullable) is None # and model_fields_set contains the field - if self.photo_url is None and "photo_url" in self.model_fields_set: - _dict['photoUrl'] = None + if self.allergies is None and "allergies" in self.model_fields_set: + _dict["allergies"] = None - # set to None if job_title_name (nullable) is None + # set to None if best_email (nullable) is None # and model_fields_set contains the field - if self.job_title_name is None and "job_title_name" in self.model_fields_set: - _dict['jobTitleName'] = None + if self.best_email is None and "best_email" in self.model_fields_set: + _dict["bestEmail"] = None - # set to None if status (nullable) is None + # set to None if birth_date (nullable) is None # and model_fields_set contains the field - if self.status is None and "status" in self.model_fields_set: - _dict['status'] = None + if self.birth_date is None and "birth_date" in self.model_fields_set: + _dict["birthDate"] = None - # set to None if work_email (nullable) is None + # set to None if birthplace (nullable) is None # and model_fields_set contains the field - if self.work_email is None and "work_email" in self.model_fields_set: - _dict['workEmail'] = None + if self.birthplace is None and "birthplace" in self.model_fields_set: + _dict["birthplace"] = None + + # set to None if citizenship (nullable) is None + # and model_fields_set contains the field + if self.citizenship is None and "citizenship" in self.model_fields_set: + _dict["citizenship"] = None + + # set to None if citizenship_id (nullable) is None + # and model_fields_set contains the field + if self.citizenship_id is None and "citizenship_id" in self.model_fields_set: + _dict["citizenshipId"] = None + + # set to None if city (nullable) is None + # and model_fields_set contains the field + if self.city is None and "city" in self.model_fields_set: + _dict["city"] = None + + # set to None if compensation_change_reason (nullable) is None + # and model_fields_set contains the field + if self.compensation_change_reason is None and "compensation_change_reason" in self.model_fields_set: + _dict["compensationChangeReason"] = None + + # set to None if compensation_change_reason_id (nullable) is None + # and model_fields_set contains the field + if self.compensation_change_reason_id is None and "compensation_change_reason_id" in self.model_fields_set: + _dict["compensationChangeReasonId"] = None + + # set to None if compensation_comment (nullable) is None + # and model_fields_set contains the field + if self.compensation_comment is None and "compensation_comment" in self.model_fields_set: + _dict["compensationComment"] = None + + # set to None if compensation_effective_date (nullable) is None + # and model_fields_set contains the field + if self.compensation_effective_date is None and "compensation_effective_date" in self.model_fields_set: + _dict["compensationEffectiveDate"] = None + + # set to None if compensation_end_date (nullable) is None + # and model_fields_set contains the field + if self.compensation_end_date is None and "compensation_end_date" in self.model_fields_set: + _dict["compensationEndDate"] = None + + # set to None if contract_end_date (nullable) is None + # and model_fields_set contains the field + if self.contract_end_date is None and "contract_end_date" in self.model_fields_set: + _dict["contractEndDate"] = None + + # set to None if country (nullable) is None + # and model_fields_set contains the field + if self.country is None and "country" in self.model_fields_set: + _dict["country"] = None + + # set to None if country_id (nullable) is None + # and model_fields_set contains the field + if self.country_id is None and "country_id" in self.model_fields_set: + _dict["countryId"] = None + + # set to None if department_id (nullable) is None + # and model_fields_set contains the field + if self.department_id is None and "department_id" in self.model_fields_set: + _dict["departmentId"] = None + + # set to None if department_name (nullable) is None + # and model_fields_set contains the field + if self.department_name is None and "department_name" in self.model_fields_set: + _dict["departmentName"] = None + + # set to None if dietary_restrictions (nullable) is None + # and model_fields_set contains the field + if self.dietary_restrictions is None and "dietary_restrictions" in self.model_fields_set: + _dict["dietaryRestrictions"] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict["displayName"] = None + + # set to None if division_id (nullable) is None + # and model_fields_set contains the field + if self.division_id is None and "division_id" in self.model_fields_set: + _dict["divisionId"] = None + + # set to None if division_name (nullable) is None + # and model_fields_set contains the field + if self.division_name is None and "division_name" in self.model_fields_set: + _dict["divisionName"] = None + + # set to None if eeo_job_category (nullable) is None + # and model_fields_set contains the field + if self.eeo_job_category is None and "eeo_job_category" in self.model_fields_set: + _dict["eeoJobCategory"] = None + + # set to None if eeo_job_category_id (nullable) is None + # and model_fields_set contains the field + if self.eeo_job_category_id is None and "eeo_job_category_id" in self.model_fields_set: + _dict["eeoJobCategoryId"] = None + + # set to None if ein (nullable) is None + # and model_fields_set contains the field + if self.ein is None and "ein" in self.model_fields_set: + _dict["ein"] = None + + # set to None if eligible_for_rehire (nullable) is None + # and model_fields_set contains the field + if self.eligible_for_rehire is None and "eligible_for_rehire" in self.model_fields_set: + _dict["eligibleForRehire"] = None + + # set to None if eligible_for_rehire_id (nullable) is None + # and model_fields_set contains the field + if self.eligible_for_rehire_id is None and "eligible_for_rehire_id" in self.model_fields_set: + _dict["eligibleForRehireId"] = None + + # set to None if employee_name (nullable) is None + # and model_fields_set contains the field + if self.employee_name is None and "employee_name" in self.model_fields_set: + _dict["employeeName"] = None + + # set to None if employee_number (nullable) is None + # and model_fields_set contains the field + if self.employee_number is None and "employee_number" in self.model_fields_set: + _dict["employeeNumber"] = None + + # set to None if employment_status_comment (nullable) is None + # and model_fields_set contains the field + if self.employment_status_comment is None and "employment_status_comment" in self.model_fields_set: + _dict["employmentStatusComment"] = None + + # set to None if employment_status_effective_date (nullable) is None + # and model_fields_set contains the field + if ( + self.employment_status_effective_date is None + and "employment_status_effective_date" in self.model_fields_set + ): + _dict["employmentStatusEffectiveDate"] = None + + # set to None if employment_status_id (nullable) is None + # and model_fields_set contains the field + if self.employment_status_id is None and "employment_status_id" in self.model_fields_set: + _dict["employmentStatusId"] = None + + # set to None if employment_status_name (nullable) is None + # and model_fields_set contains the field + if self.employment_status_name is None and "employment_status_name" in self.model_fields_set: + _dict["employmentStatusName"] = None + + # set to None if employment_type (nullable) is None + # and model_fields_set contains the field + if self.employment_type is None and "employment_type" in self.model_fields_set: + _dict["employmentType"] = None + + # set to None if employment_type_id (nullable) is None + # and model_fields_set contains the field + if self.employment_type_id is None and "employment_type_id" in self.model_fields_set: + _dict["employmentTypeId"] = None + + # set to None if ethnicity (nullable) is None + # and model_fields_set contains the field + if self.ethnicity is None and "ethnicity" in self.model_fields_set: + _dict["ethnicity"] = None + + # set to None if ethnicity_id (nullable) is None + # and model_fields_set contains the field + if self.ethnicity_id is None and "ethnicity_id" in self.model_fields_set: + _dict["ethnicityId"] = None + + # set to None if facebook_url (nullable) is None + # and model_fields_set contains the field + if self.facebook_url is None and "facebook_url" in self.model_fields_set: + _dict["facebookUrl"] = None + + # set to None if final_dose_administration_date (nullable) is None + # and model_fields_set contains the field + if self.final_dose_administration_date is None and "final_dose_administration_date" in self.model_fields_set: + _dict["finalDoseAdministrationDate"] = None + + # set to None if final_pay_date (nullable) is None + # and model_fields_set contains the field + if self.final_pay_date is None and "final_pay_date" in self.model_fields_set: + _dict["finalPayDate"] = None + + # set to None if first_name_last_name (nullable) is None + # and model_fields_set contains the field + if self.first_name_last_name is None and "first_name_last_name" in self.model_fields_set: + _dict["firstNameLastName"] = None + + # set to None if first_name_middle_initial (nullable) is None + # and model_fields_set contains the field + if self.first_name_middle_initial is None and "first_name_middle_initial" in self.model_fields_set: + _dict["firstNameMiddleInitial"] = None + + # set to None if flsa_code (nullable) is None + # and model_fields_set contains the field + if self.flsa_code is None and "flsa_code" in self.model_fields_set: + _dict["flsaCode"] = None + + # set to None if flsa_code_id (nullable) is None + # and model_fields_set contains the field + if self.flsa_code_id is None and "flsa_code_id" in self.model_fields_set: + _dict["flsaCodeId"] = None + + # set to None if gender (nullable) is None + # and model_fields_set contains the field + if self.gender is None and "gender" in self.model_fields_set: + _dict["gender"] = None + + # set to None if gender_identity (nullable) is None + # and model_fields_set contains the field + if self.gender_identity is None and "gender_identity" in self.model_fields_set: + _dict["genderIdentity"] = None + + # set to None if hire_date (nullable) is None + # and model_fields_set contains the field + if self.hire_date is None and "hire_date" in self.model_fields_set: + _dict["hireDate"] = None # set to None if home_email (nullable) is None # and model_fields_set contains the field if self.home_email is None and "home_email" in self.model_fields_set: - _dict['homeEmail'] = None + _dict["homeEmail"] = None - # set to None if best_email (nullable) is None + # set to None if home_phone (nullable) is None # and model_fields_set contains the field - if self.best_email is None and "best_email" in self.model_fields_set: - _dict['bestEmail'] = None + if self.home_phone is None and "home_phone" in self.model_fields_set: + _dict["homePhone"] = None - # set to None if middle_name (nullable) is None + # set to None if hours_per_pay_cycle (nullable) is None # and model_fields_set contains the field - if self.middle_name is None and "middle_name" in self.model_fields_set: - _dict['middleName'] = None + if self.hours_per_pay_cycle is None and "hours_per_pay_cycle" in self.model_fields_set: + _dict["hoursPerPayCycle"] = None - # set to None if work_phone (nullable) is None + # set to None if instagram_url (nullable) is None # and model_fields_set contains the field - if self.work_phone is None and "work_phone" in self.model_fields_set: - _dict['workPhone'] = None + if self.instagram_url is None and "instagram_url" in self.model_fields_set: + _dict["instagramUrl"] = None - # set to None if work_phone_extension (nullable) is None + # set to None if is_manager (nullable) is None # and model_fields_set contains the field - if self.work_phone_extension is None and "work_phone_extension" in self.model_fields_set: - _dict['workPhoneExtension'] = None + if self.is_manager is None and "is_manager" in self.model_fields_set: + _dict["isManager"] = None + + # set to None if jacket_size (nullable) is None + # and model_fields_set contains the field + if self.jacket_size is None and "jacket_size" in self.model_fields_set: + _dict["jacketSize"] = None + + # set to None if jacket_size_id (nullable) is None + # and model_fields_set contains the field + if self.jacket_size_id is None and "jacket_size_id" in self.model_fields_set: + _dict["jacketSizeId"] = None + + # set to None if job_information_effective_date (nullable) is None + # and model_fields_set contains the field + if self.job_information_effective_date is None and "job_information_effective_date" in self.model_fields_set: + _dict["jobInformationEffectiveDate"] = None + + # set to None if job_title_id (nullable) is None + # and model_fields_set contains the field + if self.job_title_id is None and "job_title_id" in self.model_fields_set: + _dict["jobTitleId"] = None + + # set to None if linkedin_url (nullable) is None + # and model_fields_set contains the field + if self.linkedin_url is None and "linkedin_url" in self.model_fields_set: + _dict["linkedinUrl"] = None + + # set to None if location_id (nullable) is None + # and model_fields_set contains the field + if self.location_id is None and "location_id" in self.model_fields_set: + _dict["locationId"] = None + + # set to None if location_name (nullable) is None + # and model_fields_set contains the field + if self.location_name is None and "location_name" in self.model_fields_set: + _dict["locationName"] = None + + # set to None if marital_status (nullable) is None + # and model_fields_set contains the field + if self.marital_status is None and "marital_status" in self.model_fields_set: + _dict["maritalStatus"] = None + + # set to None if middle_initial (nullable) is None + # and model_fields_set contains the field + if self.middle_initial is None and "middle_initial" in self.model_fields_set: + _dict["middleInitial"] = None + + # set to None if middle_name (nullable) is None + # and model_fields_set contains the field + if self.middle_name is None and "middle_name" in self.model_fields_set: + _dict["middleName"] = None # set to None if mobile_phone (nullable) is None # and model_fields_set contains the field if self.mobile_phone is None and "mobile_phone" in self.model_fields_set: - _dict['mobilePhone'] = None + _dict["mobilePhone"] = None - # set to None if home_phone (nullable) is None + # set to None if national_id (nullable) is None # and model_fields_set contains the field - if self.home_phone is None and "home_phone" in self.model_fields_set: - _dict['homePhone'] = None + if self.national_id is None and "national_id" in self.model_fields_set: + _dict["nationalId"] = None + + # set to None if national_insurance_category (nullable) is None + # and model_fields_set contains the field + if self.national_insurance_category is None and "national_insurance_category" in self.model_fields_set: + _dict["nationalInsuranceCategory"] = None + + # set to None if national_insurance_category_id (nullable) is None + # and model_fields_set contains the field + if self.national_insurance_category_id is None and "national_insurance_category_id" in self.model_fields_set: + _dict["nationalInsuranceCategoryId"] = None + + # set to None if nationality (nullable) is None + # and model_fields_set contains the field + if self.nationality is None and "nationality" in self.model_fields_set: + _dict["nationality"] = None + + # set to None if nationality_id (nullable) is None + # and model_fields_set contains the field + if self.nationality_id is None and "nationality_id" in self.model_fields_set: + _dict["nationalityId"] = None + + # set to None if nick_name (nullable) is None + # and model_fields_set contains the field + if self.nick_name is None and "nick_name" in self.model_fields_set: + _dict["nickName"] = None + + # set to None if nin (nullable) is None + # and model_fields_set contains the field + if self.nin is None and "nin" in self.model_fields_set: + _dict["nin"] = None + + # set to None if notice_period (nullable) is None + # and model_fields_set contains the field + if self.notice_period is None and "notice_period" in self.model_fields_set: + _dict["noticePeriod"] = None + + # set to None if notice_period_id (nullable) is None + # and model_fields_set contains the field + if self.notice_period_id is None and "notice_period_id" in self.model_fields_set: + _dict["noticePeriodId"] = None + + # set to None if original_hire_date (nullable) is None + # and model_fields_set contains the field + if self.original_hire_date is None and "original_hire_date" in self.model_fields_set: + _dict["originalHireDate"] = None + + # set to None if overtime (nullable) is None + # and model_fields_set contains the field + if self.overtime is None and "overtime" in self.model_fields_set: + _dict["overtime"] = None + + # set to None if paid_per (nullable) is None + # and model_fields_set contains the field + if self.paid_per is None and "paid_per" in self.model_fields_set: + _dict["paidPer"] = None + + # set to None if pay_schedule (nullable) is None + # and model_fields_set contains the field + if self.pay_schedule is None and "pay_schedule" in self.model_fields_set: + _dict["paySchedule"] = None + + # set to None if pay_schedule_id (nullable) is None + # and model_fields_set contains the field + if self.pay_schedule_id is None and "pay_schedule_id" in self.model_fields_set: + _dict["payScheduleId"] = None + + # set to None if pay_type (nullable) is None + # and model_fields_set contains the field + if self.pay_type is None and "pay_type" in self.model_fields_set: + _dict["payType"] = None + + # set to None if pinterest_url (nullable) is None + # and model_fields_set contains the field + if self.pinterest_url is None and "pinterest_url" in self.model_fields_set: + _dict["pinterestUrl"] = None + + # set to None if preferred_name_last_name (nullable) is None + # and model_fields_set contains the field + if self.preferred_name_last_name is None and "preferred_name_last_name" in self.model_fields_set: + _dict["preferredNameLastName"] = None + + # set to None if probation_end_date (nullable) is None + # and model_fields_set contains the field + if self.probation_end_date is None and "probation_end_date" in self.model_fields_set: + _dict["probationEndDate"] = None + + # set to None if pronouns (nullable) is None + # and model_fields_set contains the field + if self.pronouns is None and "pronouns" in self.model_fields_set: + _dict["pronouns"] = None + + # set to None if pronouns_id (nullable) is None + # and model_fields_set contains the field + if self.pronouns_id is None and "pronouns_id" in self.model_fields_set: + _dict["pronounsId"] = None + + # set to None if proof_of_vaccination (nullable) is None + # and model_fields_set contains the field + if self.proof_of_vaccination is None and "proof_of_vaccination" in self.model_fields_set: + _dict["proofOfVaccination"] = None + + # set to None if reports_to_id (nullable) is None + # and model_fields_set contains the field + if self.reports_to_id is None and "reports_to_id" in self.model_fields_set: + _dict["reportsToId"] = None + + # set to None if reports_to_name (nullable) is None + # and model_fields_set contains the field + if self.reports_to_name is None and "reports_to_name" in self.model_fields_set: + _dict["reportsToName"] = None + + # set to None if secondary_language (nullable) is None + # and model_fields_set contains the field + if self.secondary_language is None and "secondary_language" in self.model_fields_set: + _dict["secondaryLanguage"] = None + + # set to None if shirt_size (nullable) is None + # and model_fields_set contains the field + if self.shirt_size is None and "shirt_size" in self.model_fields_set: + _dict["shirtSize"] = None + + # set to None if shirt_size_id (nullable) is None + # and model_fields_set contains the field + if self.shirt_size_id is None and "shirt_size_id" in self.model_fields_set: + _dict["shirtSizeId"] = None + + # set to None if sin (nullable) is None + # and model_fields_set contains the field + if self.sin is None and "sin" in self.model_fields_set: + _dict["sin"] = None # set to None if skype_username (nullable) is None # and model_fields_set contains the field if self.skype_username is None and "skype_username" in self.model_fields_set: - _dict['skypeUsername'] = None + _dict["skypeUsername"] = None - # set to None if linkedin_url (nullable) is None + # set to None if ssn (nullable) is None # and model_fields_set contains the field - if self.linkedin_url is None and "linkedin_url" in self.model_fields_set: - _dict['linkedinUrl'] = None + if self.ssn is None and "ssn" in self.model_fields_set: + _dict["ssn"] = None - # set to None if facebook_url (nullable) is None + # set to None if state (nullable) is None # and model_fields_set contains the field - if self.facebook_url is None and "facebook_url" in self.model_fields_set: - _dict['facebookUrl'] = None + if self.state is None and "state" in self.model_fields_set: + _dict["state"] = None - # set to None if instagram_url (nullable) is None + # set to None if state_id (nullable) is None # and model_fields_set contains the field - if self.instagram_url is None and "instagram_url" in self.model_fields_set: - _dict['instagramUrl'] = None + if self.state_id is None and "state_id" in self.model_fields_set: + _dict["stateId"] = None + + # set to None if tax_type_id (nullable) is None + # and model_fields_set contains the field + if self.tax_type_id is None and "tax_type_id" in self.model_fields_set: + _dict["taxTypeId"] = None + + # set to None if tenure (nullable) is None + # and model_fields_set contains the field + if self.tenure is None and "tenure" in self.model_fields_set: + _dict["tenure"] = None + + # set to None if termination_date (nullable) is None + # and model_fields_set contains the field + if self.termination_date is None and "termination_date" in self.model_fields_set: + _dict["terminationDate"] = None + + # set to None if termination_reason (nullable) is None + # and model_fields_set contains the field + if self.termination_reason is None and "termination_reason" in self.model_fields_set: + _dict["terminationReason"] = None + + # set to None if termination_reason_id (nullable) is None + # and model_fields_set contains the field + if self.termination_reason_id is None and "termination_reason_id" in self.model_fields_set: + _dict["terminationReasonId"] = None + + # set to None if termination_regrettable (nullable) is None + # and model_fields_set contains the field + if self.termination_regrettable is None and "termination_regrettable" in self.model_fields_set: + _dict["terminationRegrettable"] = None + + # set to None if termination_regrettable_id (nullable) is None + # and model_fields_set contains the field + if self.termination_regrettable_id is None and "termination_regrettable_id" in self.model_fields_set: + _dict["terminationRegrettableId"] = None + + # set to None if termination_type (nullable) is None + # and model_fields_set contains the field + if self.termination_type is None and "termination_type" in self.model_fields_set: + _dict["terminationType"] = None + + # set to None if termination_type_id (nullable) is None + # and model_fields_set contains the field + if self.termination_type_id is None and "termination_type_id" in self.model_fields_set: + _dict["terminationTypeId"] = None + + # set to None if timezone (nullable) is None + # and model_fields_set contains the field + if self.timezone is None and "timezone" in self.model_fields_set: + _dict["timezone"] = None + + # set to None if t_shirt_size (nullable) is None + # and model_fields_set contains the field + if self.t_shirt_size is None and "t_shirt_size" in self.model_fields_set: + _dict["tShirtSize"] = None + + # set to None if t_shirt_size_id (nullable) is None + # and model_fields_set contains the field + if self.t_shirt_size_id is None and "t_shirt_size_id" in self.model_fields_set: + _dict["tShirtSizeId"] = None # set to None if twitter_url (nullable) is None # and model_fields_set contains the field if self.twitter_url is None and "twitter_url" in self.model_fields_set: - _dict['twitterUrl'] = None + _dict["twitterUrl"] = None - # set to None if pinterest_url (nullable) is None + # set to None if user_id (nullable) is None # and model_fields_set contains the field - if self.pinterest_url is None and "pinterest_url" in self.model_fields_set: - _dict['pinterestUrl'] = None + if self.user_id is None and "user_id" in self.model_fields_set: + _dict["userId"] = None + + # set to None if vaccination_status (nullable) is None + # and model_fields_set contains the field + if self.vaccination_status is None and "vaccination_status" in self.model_fields_set: + _dict["vaccinationStatus"] = None + + # set to None if vaccination_status_id (nullable) is None + # and model_fields_set contains the field + if self.vaccination_status_id is None and "vaccination_status_id" in self.model_fields_set: + _dict["vaccinationStatusId"] = None + + # set to None if vaccine_received (nullable) is None + # and model_fields_set contains the field + if self.vaccine_received is None and "vaccine_received" in self.model_fields_set: + _dict["vaccineReceived"] = None + + # set to None if vaccine_received_id (nullable) is None + # and model_fields_set contains the field + if self.vaccine_received_id is None and "vaccine_received_id" in self.model_fields_set: + _dict["vaccineReceivedId"] = None + + # set to None if veteran_status (nullable) is None + # and model_fields_set contains the field + if self.veteran_status is None and "veteran_status" in self.model_fields_set: + _dict["veteranStatus"] = None + + # set to None if work_email (nullable) is None + # and model_fields_set contains the field + if self.work_email is None and "work_email" in self.model_fields_set: + _dict["workEmail"] = None + + # set to None if work_phone (nullable) is None + # and model_fields_set contains the field + if self.work_phone is None and "work_phone" in self.model_fields_set: + _dict["workPhone"] = None + + # set to None if work_phone_extension (nullable) is None + # and model_fields_set contains the field + if self.work_phone_extension is None and "work_phone_extension" in self.model_fields_set: + _dict["workPhoneExtension"] = None + + # set to None if zipcode (nullable) is None + # and model_fields_set contains the field + if self.zipcode is None and "zipcode" in self.model_fields_set: + _dict["zipcode"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GetEmployeesEmployeeResponse from a dict""" if obj is None: return None @@ -200,30 +972,146 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "employeeId": obj.get("employeeId"), - "firstName": obj.get("firstName"), - "lastName": obj.get("lastName"), - "preferredName": obj.get("preferredName"), - "photoUrl": obj.get("photoUrl"), - "jobTitleName": obj.get("jobTitleName"), - "status": obj.get("status"), - "_restrictedFields": obj.get("_restrictedFields"), - "workEmail": obj.get("workEmail"), - "homeEmail": obj.get("homeEmail"), - "bestEmail": obj.get("bestEmail"), - "middleName": obj.get("middleName"), - "workPhone": obj.get("workPhone"), - "workPhoneExtension": obj.get("workPhoneExtension"), - "mobilePhone": obj.get("mobilePhone"), - "homePhone": obj.get("homePhone"), - "skypeUsername": obj.get("skypeUsername"), - "linkedinUrl": obj.get("linkedinUrl"), - "facebookUrl": obj.get("facebookUrl"), - "instagramUrl": obj.get("instagramUrl"), - "twitterUrl": obj.get("twitterUrl"), - "pinterestUrl": obj.get("pinterestUrl") - }) + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "preferredName": obj.get("preferredName"), + "photoUrl": obj.get("photoUrl"), + "jobTitleName": obj.get("jobTitleName"), + "status": obj.get("status"), + "_restrictedFields": obj.get("_restrictedFields"), + "addressLine1": obj.get("addressLine1"), + "addressLine2": obj.get("addressLine2"), + "age": obj.get("age"), + "allergies": obj.get("allergies"), + "bestEmail": obj.get("bestEmail"), + "birthDate": obj.get("birthDate"), + "birthplace": obj.get("birthplace"), + "citizenship": obj.get("citizenship"), + "citizenshipId": obj.get("citizenshipId"), + "city": obj.get("city"), + "compensationChangeReason": obj.get("compensationChangeReason"), + "compensationChangeReasonId": obj.get("compensationChangeReasonId"), + "compensationComment": obj.get("compensationComment"), + "compensationEffectiveDate": obj.get("compensationEffectiveDate"), + "compensationEndDate": obj.get("compensationEndDate"), + "contractEndDate": obj.get("contractEndDate"), + "country": obj.get("country"), + "countryId": obj.get("countryId"), + "departmentId": obj.get("departmentId"), + "departmentName": obj.get("departmentName"), + "dietaryRestrictions": obj.get("dietaryRestrictions"), + "displayName": obj.get("displayName"), + "divisionId": obj.get("divisionId"), + "divisionName": obj.get("divisionName"), + "eeoJobCategory": obj.get("eeoJobCategory"), + "eeoJobCategoryId": obj.get("eeoJobCategoryId"), + "ein": obj.get("ein"), + "eligibleForRehire": obj.get("eligibleForRehire"), + "eligibleForRehireId": obj.get("eligibleForRehireId"), + "employeeName": obj.get("employeeName"), + "employeeNumber": obj.get("employeeNumber"), + "employmentStatusComment": obj.get("employmentStatusComment"), + "employmentStatusEffectiveDate": obj.get("employmentStatusEffectiveDate"), + "employmentStatusId": obj.get("employmentStatusId"), + "employmentStatusName": obj.get("employmentStatusName"), + "employmentType": obj.get("employmentType"), + "employmentTypeId": obj.get("employmentTypeId"), + "ethnicity": obj.get("ethnicity"), + "ethnicityId": obj.get("ethnicityId"), + "facebookUrl": obj.get("facebookUrl"), + "finalDoseAdministrationDate": obj.get("finalDoseAdministrationDate"), + "finalPayDate": obj.get("finalPayDate"), + "firstNameLastName": obj.get("firstNameLastName"), + "firstNameMiddleInitial": obj.get("firstNameMiddleInitial"), + "flsaCode": obj.get("flsaCode"), + "flsaCodeId": obj.get("flsaCodeId"), + "gender": obj.get("gender"), + "genderIdentity": obj.get("genderIdentity"), + "genderIdentityId": obj.get("genderIdentityId"), + "hireDate": obj.get("hireDate"), + "homeEmail": obj.get("homeEmail"), + "homePhone": obj.get("homePhone"), + "hoursPerPayCycle": obj.get("hoursPerPayCycle"), + "instagramUrl": obj.get("instagramUrl"), + "isManager": obj.get("isManager"), + "jacketSize": obj.get("jacketSize"), + "jacketSizeId": obj.get("jacketSizeId"), + "jobInformationEffectiveDate": obj.get("jobInformationEffectiveDate"), + "jobTitleId": obj.get("jobTitleId"), + "linkedinUrl": obj.get("linkedinUrl"), + "locationId": obj.get("locationId"), + "locationName": obj.get("locationName"), + "maritalStatus": obj.get("maritalStatus"), + "middleInitial": obj.get("middleInitial"), + "middleName": obj.get("middleName"), + "mobilePhone": obj.get("mobilePhone"), + "nationalId": obj.get("nationalId"), + "nationalInsuranceCategory": obj.get("nationalInsuranceCategory"), + "nationalInsuranceCategoryId": obj.get("nationalInsuranceCategoryId"), + "nationality": obj.get("nationality"), + "nationalityId": obj.get("nationalityId"), + "nickName": obj.get("nickName"), + "nin": obj.get("nin"), + "noticePeriod": obj.get("noticePeriod"), + "noticePeriodId": obj.get("noticePeriodId"), + "originalHireDate": obj.get("originalHireDate"), + "overtime": obj.get("overtime"), + "overtimeRate": GetEmployeesEmployeeResponseAllOfOvertimeRate.from_dict(obj["overtimeRate"]) + if obj.get("overtimeRate") is not None + else None, + "paidPer": obj.get("paidPer"), + "payRate": GetEmployeesEmployeeResponseAllOfPayRate.from_dict(obj["payRate"]) + if obj.get("payRate") is not None + else None, + "paySchedule": obj.get("paySchedule"), + "payScheduleId": obj.get("payScheduleId"), + "payType": obj.get("payType"), + "pinterestUrl": obj.get("pinterestUrl"), + "preferredNameLastName": obj.get("preferredNameLastName"), + "probationEndDate": obj.get("probationEndDate"), + "pronouns": obj.get("pronouns"), + "pronounsId": obj.get("pronounsId"), + "proofOfVaccination": obj.get("proofOfVaccination"), + "reportsToId": obj.get("reportsToId"), + "reportsToName": obj.get("reportsToName"), + "secondaryLanguage": obj.get("secondaryLanguage"), + "shirtSize": obj.get("shirtSize"), + "shirtSizeId": obj.get("shirtSizeId"), + "sin": obj.get("sin"), + "skypeUsername": obj.get("skypeUsername"), + "ssn": obj.get("ssn"), + "state": obj.get("state"), + "stateId": obj.get("stateId"), + "taxTypeId": obj.get("taxTypeId"), + "teams": [GetEmployeesEmployeeResponseAllOfTeams.from_dict(_item) for _item in obj["teams"]] + if obj.get("teams") is not None + else None, + "tenure": obj.get("tenure"), + "terminationDate": obj.get("terminationDate"), + "terminationReason": obj.get("terminationReason"), + "terminationReasonId": obj.get("terminationReasonId"), + "terminationRegrettable": obj.get("terminationRegrettable"), + "terminationRegrettableId": obj.get("terminationRegrettableId"), + "terminationType": obj.get("terminationType"), + "terminationTypeId": obj.get("terminationTypeId"), + "timezone": obj.get("timezone"), + "tShirtSize": obj.get("tShirtSize"), + "tShirtSizeId": obj.get("tShirtSizeId"), + "twitterUrl": obj.get("twitterUrl"), + "userId": obj.get("userId"), + "vaccinationStatus": obj.get("vaccinationStatus"), + "vaccinationStatusId": obj.get("vaccinationStatusId"), + "vaccineReceived": obj.get("vaccineReceived"), + "vaccineReceivedId": obj.get("vaccineReceivedId"), + "veteranStatus": obj.get("veteranStatus"), + "veteranStatusId": obj.get("veteranStatusId"), + "workEmail": obj.get("workEmail"), + "workPhone": obj.get("workPhone"), + "workPhoneExtension": obj.get("workPhoneExtension"), + "zipcode": obj.get("zipcode"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/get_employees_employee_response_all_of_overtime_rate.py b/bamboohr_sdk/models/get_employees_employee_response_all_of_overtime_rate.py new file mode 100644 index 0000000..0cce8c6 --- /dev/null +++ b/bamboohr_sdk/models/get_employees_employee_response_all_of_overtime_rate.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing_extensions import Self + + +class GetEmployeesEmployeeResponseAllOfOvertimeRate(BaseModel): + """ + Employee's overtime rate. Only included when requested via the `fields` parameter. + """ + + amount: StrictStr | None = None + currency: StrictStr | None = None + __properties: ClassVar[list[str]] = ["amount", "currency"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of GetEmployeesEmployeeResponseAllOfOvertimeRate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of GetEmployeesEmployeeResponseAllOfOvertimeRate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"amount": obj.get("amount"), "currency": obj.get("currency")}) + return _obj diff --git a/bamboohr_sdk/models/get_employees_employee_response_all_of_pay_rate.py b/bamboohr_sdk/models/get_employees_employee_response_all_of_pay_rate.py new file mode 100644 index 0000000..6d207dd --- /dev/null +++ b/bamboohr_sdk/models/get_employees_employee_response_all_of_pay_rate.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing_extensions import Self + + +class GetEmployeesEmployeeResponseAllOfPayRate(BaseModel): + """ + Employee's pay rate. Only included when requested via the `fields` parameter. + """ + + amount: StrictStr | None = None + currency: StrictStr | None = None + __properties: ClassVar[list[str]] = ["amount", "currency"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of GetEmployeesEmployeeResponseAllOfPayRate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of GetEmployeesEmployeeResponseAllOfPayRate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"amount": obj.get("amount"), "currency": obj.get("currency")}) + return _obj diff --git a/bamboohr_sdk/models/get_employees_employee_response_all_of_teams.py b/bamboohr_sdk/models/get_employees_employee_response_all_of_teams.py new file mode 100644 index 0000000..cbb2162 --- /dev/null +++ b/bamboohr_sdk/models/get_employees_employee_response_all_of_teams.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing_extensions import Self + + +class GetEmployeesEmployeeResponseAllOfTeams(BaseModel): + """ + GetEmployeesEmployeeResponseAllOfTeams + """ + + id: StrictInt | None = None + label: StrictStr | None = None + __properties: ClassVar[list[str]] = ["id", "label"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of GetEmployeesEmployeeResponseAllOfTeams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of GetEmployeesEmployeeResponseAllOfTeams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"id": obj.get("id"), "label": obj.get("label")}) + return _obj diff --git a/bamboohr_sdk/models/get_employees_filter_request_object.py b/bamboohr_sdk/models/get_employees_filter_request_object.py index 5196fb8..371ca13 100644 --- a/bamboohr_sdk/models/get_employees_filter_request_object.py +++ b/bamboohr_sdk/models/get_employees_filter_request_object.py @@ -1,45 +1,506 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from datetime import date +from typing import Any, ClassVar -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing_extensions import Self + class GetEmployeesFilterRequestObject(BaseModel): """ - Filter criteria for the employee list endpoint. All filter fields are optional. Multiple fields are combined with AND logic. - """ # noqa: E501 - first_name: Optional[StrictStr] = Field(default=None, description="This will match any employees whose first name contains this string (case insensitive)", alias="firstName") - last_name: Optional[StrictStr] = Field(default=None, description="This will match any employees whose last name contains this string (case insensitive)", alias="lastName") - job_title_name: Optional[StrictStr] = Field(default=None, description="This will match any employees whose current job title descriptor contains this string (case insensitive)", alias="jobTitleName") - status: Optional[StrictStr] = Field(default=None, description="Employee status") - ids: Optional[List[StrictInt]] = Field(default=None, description="List of employee IDs for batch fetch. Accepts repeated keys (filter[ids][]=123&filter[ids][]=124) or a single comma-separated string (filter[ids]=123,124).") - __properties: ClassVar[List[str]] = ["firstName", "lastName", "jobTitleName", "status", "ids"] - - @field_validator('status') + Filter criteria for the employee list endpoint, supplied as `filter[fieldName]=value` query parameters. All filter fields are optional, and multiple fields are combined with AND logic. Three matching strategies are used depending on the field: - **Substring** (case-insensitive `LIKE`) — applied to free-text fields such as names, addresses, social URLs, and free-form labels. - **Equality** — applied to IDs (integer), enumerated string values, booleans (`true`/`false`), numeric values, and ISO 8601 dates (`YYYY-MM-DD`). - **Special** — `ids` accepts a list of internal employee IDs (`filter[ids][]=123&filter[ids][]=124` or `filter[ids]=123,124`). Filtering is **not supported** for the following fields and will return a 422: `bestEmail`, `ein`, `genderIdentity`, `genderIdentityId`, `nationalId`, `nin`, `overtime`, `overtimeRate`, `payRate`, `sin`, `ssn`, `teams`, `userId`, `veteranStatus`, `veteranStatusId`. Any unrecognized filter key will also return a 422. + """ + + address_line1: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="addressLine1" + ) + address_line2: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="addressLine2" + ) + allergies: StrictStr | None = Field(default=None, description="Substring match (case-insensitive).") + birthplace: StrictStr | None = Field(default=None, description="Substring match (case-insensitive).") + citizenship: StrictStr | None = Field(default=None, description="Substring match (case-insensitive).") + city: StrictStr | None = Field(default=None, description="Substring match (case-insensitive).") + compensation_change_reason: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="compensationChangeReason" + ) + compensation_comment: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="compensationComment" + ) + country: StrictStr | None = Field(default=None, description="Substring match (case-insensitive).") + department_name: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="departmentName" + ) + dietary_restrictions: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="dietaryRestrictions" + ) + display_name: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="displayName" + ) + division_name: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="divisionName" + ) + eeo_job_category: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="eeoJobCategory" + ) + eligible_for_rehire: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="eligibleForRehire" + ) + employee_name: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="employeeName" + ) + employee_number: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="employeeNumber" + ) + employment_status_name: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="employmentStatusName" + ) + employment_status_comment: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="employmentStatusComment" + ) + employment_type: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="employmentType" + ) + ethnicity: StrictStr | None = Field(default=None, description="Substring match (case-insensitive).") + facebook_url: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="facebookUrl" + ) + first_name_last_name: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="firstNameLastName" + ) + first_name_middle_initial: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="firstNameMiddleInitial" + ) + flsa_code: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="flsaCode" + ) + home_email: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="homeEmail" + ) + home_phone: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="homePhone" + ) + instagram_url: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="instagramUrl" + ) + jacket_size: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="jacketSize" + ) + linkedin_url: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="linkedinUrl" + ) + location_name: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="locationName" + ) + marital_status: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="maritalStatus" + ) + middle_initial: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="middleInitial" + ) + middle_name: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="middleName" + ) + mobile_phone: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="mobilePhone" + ) + national_insurance_category: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="nationalInsuranceCategory" + ) + nationality: StrictStr | None = Field(default=None, description="Substring match (case-insensitive).") + nick_name: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="nickName" + ) + notice_period: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="noticePeriod" + ) + pay_schedule: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="paySchedule" + ) + pinterest_url: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="pinterestUrl" + ) + preferred_name_last_name: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="preferredNameLastName" + ) + pronouns: StrictStr | None = Field(default=None, description="Substring match (case-insensitive).") + reports_to_name: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="reportsToName" + ) + secondary_language: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="secondaryLanguage" + ) + shirt_size: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="shirtSize" + ) + skype_username: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="skypeUsername" + ) + state: StrictStr | None = Field(default=None, description="Substring match (case-insensitive).") + termination_reason: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="terminationReason" + ) + termination_regrettable: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="terminationRegrettable" + ) + termination_type: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="terminationType" + ) + t_shirt_size: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="tShirtSize" + ) + twitter_url: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="twitterUrl" + ) + vaccination_status: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="vaccinationStatus" + ) + vaccine_received: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="vaccineReceived" + ) + work_email: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="workEmail" + ) + work_phone: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="workPhone" + ) + work_phone_extension: StrictStr | None = Field( + default=None, description="Substring match (case-insensitive).", alias="workPhoneExtension" + ) + zipcode: StrictStr | None = Field(default=None, description="Substring match (case-insensitive).") + gender: StrictStr | None = Field(default=None, description="Exact match.") + paid_per: StrictStr | None = Field(default=None, description="Exact match.", alias="paidPer") + pay_type: StrictStr | None = Field(default=None, description="Exact match.", alias="payType") + citizenship_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="citizenshipId" + ) + compensation_change_reason_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="compensationChangeReasonId" + ) + country_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="countryId" + ) + department_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="departmentId" + ) + division_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="divisionId" + ) + eeo_job_category_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="eeoJobCategoryId" + ) + eligible_for_rehire_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="eligibleForRehireId" + ) + employment_status_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="employmentStatusId" + ) + employment_type_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="employmentTypeId" + ) + ethnicity_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="ethnicityId" + ) + flsa_code_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="flsaCodeId" + ) + jacket_size_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="jacketSizeId" + ) + job_title_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="jobTitleId" + ) + location_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="locationId" + ) + national_insurance_category_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="nationalInsuranceCategoryId" + ) + nationality_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="nationalityId" + ) + notice_period_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="noticePeriodId" + ) + pay_schedule_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="payScheduleId" + ) + pronouns_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="pronounsId" + ) + reports_to_id: StrictInt | None = Field( + default=None, + description="Exact match against the internal employee ID of the employee's manager.", + alias="reportsToId", + ) + shirt_size_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="shirtSizeId" + ) + state_id: StrictInt | None = Field(default=None, description="Exact match against an integer ID.", alias="stateId") + tax_type_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="taxTypeId" + ) + termination_reason_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="terminationReasonId" + ) + termination_regrettable_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="terminationRegrettableId" + ) + termination_type_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="terminationTypeId" + ) + t_shirt_size_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="tShirtSizeId" + ) + vaccination_status_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="vaccinationStatusId" + ) + vaccine_received_id: StrictInt | None = Field( + default=None, description="Exact match against an integer ID.", alias="vaccineReceivedId" + ) + is_manager: StrictBool | None = Field(default=None, description="Exact match (true/false).", alias="isManager") + proof_of_vaccination: StrictBool | None = Field( + default=None, description="Exact match (true/false).", alias="proofOfVaccination" + ) + age: StrictFloat | StrictInt | None = Field(default=None, description="Exact numeric match.") + tenure: StrictFloat | StrictInt | None = Field(default=None, description="Exact numeric match.") + hours_per_pay_cycle: StrictFloat | StrictInt | None = Field( + default=None, description="Exact numeric match.", alias="hoursPerPayCycle" + ) + birth_date: date | None = Field( + default=None, description="Exact match against an ISO 8601 date (YYYY-MM-DD).", alias="birthDate" + ) + compensation_effective_date: date | None = Field( + default=None, + description="Exact match against an ISO 8601 date (YYYY-MM-DD).", + alias="compensationEffectiveDate", + ) + compensation_end_date: date | None = Field( + default=None, description="Exact match against an ISO 8601 date (YYYY-MM-DD).", alias="compensationEndDate" + ) + contract_end_date: date | None = Field( + default=None, description="Exact match against an ISO 8601 date (YYYY-MM-DD).", alias="contractEndDate" + ) + employment_status_effective_date: date | None = Field( + default=None, + description="Exact match against an ISO 8601 date (YYYY-MM-DD).", + alias="employmentStatusEffectiveDate", + ) + final_dose_administration_date: date | None = Field( + default=None, + description="Exact match against an ISO 8601 date (YYYY-MM-DD).", + alias="finalDoseAdministrationDate", + ) + final_pay_date: date | None = Field( + default=None, description="Exact match against an ISO 8601 date (YYYY-MM-DD).", alias="finalPayDate" + ) + hire_date: date | None = Field( + default=None, description="Exact match against an ISO 8601 date (YYYY-MM-DD).", alias="hireDate" + ) + job_information_effective_date: date | None = Field( + default=None, + description="Exact match against an ISO 8601 date (YYYY-MM-DD).", + alias="jobInformationEffectiveDate", + ) + original_hire_date: date | None = Field( + default=None, description="Exact match against an ISO 8601 date (YYYY-MM-DD).", alias="originalHireDate" + ) + probation_end_date: date | None = Field( + default=None, description="Exact match against an ISO 8601 date (YYYY-MM-DD).", alias="probationEndDate" + ) + termination_date: date | None = Field( + default=None, description="Exact match against an ISO 8601 date (YYYY-MM-DD).", alias="terminationDate" + ) + first_name: StrictStr | None = Field( + default=None, + description="This will match any employees whose first name contains this string (case insensitive)", + alias="firstName", + ) + last_name: StrictStr | None = Field( + default=None, + description="This will match any employees whose last name contains this string (case insensitive)", + alias="lastName", + ) + job_title_name: StrictStr | None = Field( + default=None, + description="This will match any employees whose current job title descriptor contains this string (case insensitive)", + alias="jobTitleName", + ) + status: StrictStr | None = Field(default=None, description="Employee status") + ids: list[StrictInt] | None = Field( + default=None, + description="List of internal employee IDs for batch fetch. Documented form: repeated keys (`filter[ids][]=123&filter[ids][]=124`). For backward compatibility, the endpoint also accepts a single comma-separated string (`filter[ids]=123,124`).", + ) + __properties: ClassVar[list[str]] = [ + "addressLine1", + "addressLine2", + "allergies", + "birthplace", + "citizenship", + "city", + "compensationChangeReason", + "compensationComment", + "country", + "departmentName", + "dietaryRestrictions", + "displayName", + "divisionName", + "eeoJobCategory", + "eligibleForRehire", + "employeeName", + "employeeNumber", + "employmentStatusName", + "employmentStatusComment", + "employmentType", + "ethnicity", + "facebookUrl", + "firstNameLastName", + "firstNameMiddleInitial", + "flsaCode", + "homeEmail", + "homePhone", + "instagramUrl", + "jacketSize", + "linkedinUrl", + "locationName", + "maritalStatus", + "middleInitial", + "middleName", + "mobilePhone", + "nationalInsuranceCategory", + "nationality", + "nickName", + "noticePeriod", + "paySchedule", + "pinterestUrl", + "preferredNameLastName", + "pronouns", + "reportsToName", + "secondaryLanguage", + "shirtSize", + "skypeUsername", + "state", + "terminationReason", + "terminationRegrettable", + "terminationType", + "tShirtSize", + "twitterUrl", + "vaccinationStatus", + "vaccineReceived", + "workEmail", + "workPhone", + "workPhoneExtension", + "zipcode", + "gender", + "paidPer", + "payType", + "citizenshipId", + "compensationChangeReasonId", + "countryId", + "departmentId", + "divisionId", + "eeoJobCategoryId", + "eligibleForRehireId", + "employmentStatusId", + "employmentTypeId", + "ethnicityId", + "flsaCodeId", + "jacketSizeId", + "jobTitleId", + "locationId", + "nationalInsuranceCategoryId", + "nationalityId", + "noticePeriodId", + "payScheduleId", + "pronounsId", + "reportsToId", + "shirtSizeId", + "stateId", + "taxTypeId", + "terminationReasonId", + "terminationRegrettableId", + "terminationTypeId", + "tShirtSizeId", + "vaccinationStatusId", + "vaccineReceivedId", + "isManager", + "proofOfVaccination", + "age", + "tenure", + "hoursPerPayCycle", + "birthDate", + "compensationEffectiveDate", + "compensationEndDate", + "contractEndDate", + "employmentStatusEffectiveDate", + "finalDoseAdministrationDate", + "finalPayDate", + "hireDate", + "jobInformationEffectiveDate", + "originalHireDate", + "probationEndDate", + "terminationDate", + "firstName", + "lastName", + "jobTitleName", + "status", + "ids", + ] + + @field_validator("gender") + def gender_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["Male", "Female", "Non-Binary"]): + raise ValueError("must be one of enum values ('Male', 'Female', 'Non-Binary')") + return value + + @field_validator("paid_per") + def paid_per_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["Day", "Week", "Month", "Quarter", "Year", "PayPeriod", "Piece"]): + raise ValueError( + "must be one of enum values ('Day', 'Week', 'Month', 'Quarter', 'Year', 'PayPeriod', 'Piece')" + ) + return value + + @field_validator("pay_type") + def pay_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["Hourly", "Salary", "Commission"]): + raise ValueError("must be one of enum values ('Hourly', 'Salary', 'Commission')") + return value + + @field_validator("status") def status_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['active', 'inactive']): + if value not in set(["active", "inactive"]): raise ValueError("must be one of enum values ('active', 'inactive')") return value @@ -49,7 +510,6 @@ def status_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,11 +520,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GetEmployeesFilterRequestObject from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -74,8 +534,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -85,7 +544,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GetEmployeesFilterRequestObject from a dict""" if obj is None: return None @@ -93,13 +552,121 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "firstName": obj.get("firstName"), - "lastName": obj.get("lastName"), - "jobTitleName": obj.get("jobTitleName"), - "status": obj.get("status"), - "ids": obj.get("ids") - }) + _obj = cls.model_validate( + { + "addressLine1": obj.get("addressLine1"), + "addressLine2": obj.get("addressLine2"), + "allergies": obj.get("allergies"), + "birthplace": obj.get("birthplace"), + "citizenship": obj.get("citizenship"), + "city": obj.get("city"), + "compensationChangeReason": obj.get("compensationChangeReason"), + "compensationComment": obj.get("compensationComment"), + "country": obj.get("country"), + "departmentName": obj.get("departmentName"), + "dietaryRestrictions": obj.get("dietaryRestrictions"), + "displayName": obj.get("displayName"), + "divisionName": obj.get("divisionName"), + "eeoJobCategory": obj.get("eeoJobCategory"), + "eligibleForRehire": obj.get("eligibleForRehire"), + "employeeName": obj.get("employeeName"), + "employeeNumber": obj.get("employeeNumber"), + "employmentStatusName": obj.get("employmentStatusName"), + "employmentStatusComment": obj.get("employmentStatusComment"), + "employmentType": obj.get("employmentType"), + "ethnicity": obj.get("ethnicity"), + "facebookUrl": obj.get("facebookUrl"), + "firstNameLastName": obj.get("firstNameLastName"), + "firstNameMiddleInitial": obj.get("firstNameMiddleInitial"), + "flsaCode": obj.get("flsaCode"), + "homeEmail": obj.get("homeEmail"), + "homePhone": obj.get("homePhone"), + "instagramUrl": obj.get("instagramUrl"), + "jacketSize": obj.get("jacketSize"), + "linkedinUrl": obj.get("linkedinUrl"), + "locationName": obj.get("locationName"), + "maritalStatus": obj.get("maritalStatus"), + "middleInitial": obj.get("middleInitial"), + "middleName": obj.get("middleName"), + "mobilePhone": obj.get("mobilePhone"), + "nationalInsuranceCategory": obj.get("nationalInsuranceCategory"), + "nationality": obj.get("nationality"), + "nickName": obj.get("nickName"), + "noticePeriod": obj.get("noticePeriod"), + "paySchedule": obj.get("paySchedule"), + "pinterestUrl": obj.get("pinterestUrl"), + "preferredNameLastName": obj.get("preferredNameLastName"), + "pronouns": obj.get("pronouns"), + "reportsToName": obj.get("reportsToName"), + "secondaryLanguage": obj.get("secondaryLanguage"), + "shirtSize": obj.get("shirtSize"), + "skypeUsername": obj.get("skypeUsername"), + "state": obj.get("state"), + "terminationReason": obj.get("terminationReason"), + "terminationRegrettable": obj.get("terminationRegrettable"), + "terminationType": obj.get("terminationType"), + "tShirtSize": obj.get("tShirtSize"), + "twitterUrl": obj.get("twitterUrl"), + "vaccinationStatus": obj.get("vaccinationStatus"), + "vaccineReceived": obj.get("vaccineReceived"), + "workEmail": obj.get("workEmail"), + "workPhone": obj.get("workPhone"), + "workPhoneExtension": obj.get("workPhoneExtension"), + "zipcode": obj.get("zipcode"), + "gender": obj.get("gender"), + "paidPer": obj.get("paidPer"), + "payType": obj.get("payType"), + "citizenshipId": obj.get("citizenshipId"), + "compensationChangeReasonId": obj.get("compensationChangeReasonId"), + "countryId": obj.get("countryId"), + "departmentId": obj.get("departmentId"), + "divisionId": obj.get("divisionId"), + "eeoJobCategoryId": obj.get("eeoJobCategoryId"), + "eligibleForRehireId": obj.get("eligibleForRehireId"), + "employmentStatusId": obj.get("employmentStatusId"), + "employmentTypeId": obj.get("employmentTypeId"), + "ethnicityId": obj.get("ethnicityId"), + "flsaCodeId": obj.get("flsaCodeId"), + "jacketSizeId": obj.get("jacketSizeId"), + "jobTitleId": obj.get("jobTitleId"), + "locationId": obj.get("locationId"), + "nationalInsuranceCategoryId": obj.get("nationalInsuranceCategoryId"), + "nationalityId": obj.get("nationalityId"), + "noticePeriodId": obj.get("noticePeriodId"), + "payScheduleId": obj.get("payScheduleId"), + "pronounsId": obj.get("pronounsId"), + "reportsToId": obj.get("reportsToId"), + "shirtSizeId": obj.get("shirtSizeId"), + "stateId": obj.get("stateId"), + "taxTypeId": obj.get("taxTypeId"), + "terminationReasonId": obj.get("terminationReasonId"), + "terminationRegrettableId": obj.get("terminationRegrettableId"), + "terminationTypeId": obj.get("terminationTypeId"), + "tShirtSizeId": obj.get("tShirtSizeId"), + "vaccinationStatusId": obj.get("vaccinationStatusId"), + "vaccineReceivedId": obj.get("vaccineReceivedId"), + "isManager": obj.get("isManager"), + "proofOfVaccination": obj.get("proofOfVaccination"), + "age": obj.get("age"), + "tenure": obj.get("tenure"), + "hoursPerPayCycle": obj.get("hoursPerPayCycle"), + "birthDate": obj.get("birthDate"), + "compensationEffectiveDate": obj.get("compensationEffectiveDate"), + "compensationEndDate": obj.get("compensationEndDate"), + "contractEndDate": obj.get("contractEndDate"), + "employmentStatusEffectiveDate": obj.get("employmentStatusEffectiveDate"), + "finalDoseAdministrationDate": obj.get("finalDoseAdministrationDate"), + "finalPayDate": obj.get("finalPayDate"), + "hireDate": obj.get("hireDate"), + "jobInformationEffectiveDate": obj.get("jobInformationEffectiveDate"), + "originalHireDate": obj.get("originalHireDate"), + "probationEndDate": obj.get("probationEndDate"), + "terminationDate": obj.get("terminationDate"), + "firstName": obj.get("firstName"), + "lastName": obj.get("lastName"), + "jobTitleName": obj.get("jobTitleName"), + "status": obj.get("status"), + "ids": obj.get("ids"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/get_employees_response_object.py b/bamboohr_sdk/models/get_employees_response_object.py index 3384f75..28c5f0d 100644 --- a/bamboohr_sdk/models/get_employees_response_object.py +++ b/bamboohr_sdk/models/get_employees_response_object.py @@ -1,38 +1,40 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List +from typing_extensions import Self + from bamboohr_sdk.models.cursor_paged_response_metadata import CursorPagedResponseMetadata from bamboohr_sdk.models.get_employees_employee_response import GetEmployeesEmployeeResponse from bamboohr_sdk.models.get_employees_response_object_links import GetEmployeesResponseObjectLinks -from typing import Optional, Set -from typing_extensions import Self + class GetEmployeesResponseObject(BaseModel): """ Complete response object for employee list API containing employee data, metadata, and navigation links - """ # noqa: E501 - data: List[GetEmployeesEmployeeResponse] = Field(description="Typed collection of employee response objects") - meta: CursorPagedResponseMetadata = Field(description="Metadata information including total count and pagination details") + """ + + data: list[GetEmployeesEmployeeResponse] = Field(description="Typed collection of employee response objects") + meta: CursorPagedResponseMetadata = Field( + description="Metadata information including total count and pagination details" + ) links: GetEmployeesResponseObjectLinks = Field(alias="_links") - __properties: ClassVar[List[str]] = ["data", "meta", "_links"] + __properties: ClassVar[list[str]] = ["data", "meta", "_links"] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +42,6 @@ class GetEmployeesResponseObject(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,11 +52,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GetEmployeesResponseObject from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -65,8 +66,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,17 +79,17 @@ def to_dict(self) -> Dict[str, Any]: for _item_data in self.data: if _item_data: _items.append(_item_data.to_dict()) - _dict['data'] = _items + _dict["data"] = _items # override the default output from pydantic by calling `to_dict()` of meta if self.meta: - _dict['meta'] = self.meta.to_dict() + _dict["meta"] = self.meta.to_dict() # override the default output from pydantic by calling `to_dict()` of links if self.links: - _dict['_links'] = self.links.to_dict() + _dict["_links"] = self.links.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GetEmployeesResponseObject from a dict""" if obj is None: return None @@ -97,11 +97,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "data": [GetEmployeesEmployeeResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, - "meta": CursorPagedResponseMetadata.from_dict(obj["meta"]) if obj.get("meta") is not None else None, - "_links": GetEmployeesResponseObjectLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None - }) + _obj = cls.model_validate( + { + "data": [GetEmployeesEmployeeResponse.from_dict(_item) for _item in obj["data"]] + if obj.get("data") is not None + else None, + "meta": CursorPagedResponseMetadata.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "_links": GetEmployeesResponseObjectLinks.from_dict(obj["_links"]) + if obj.get("_links") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/get_employees_response_object_links.py b/bamboohr_sdk/models/get_employees_response_object_links.py index c8796f0..36d855f 100644 --- a/bamboohr_sdk/models/get_employees_response_object_links.py +++ b/bamboohr_sdk/models/get_employees_response_object_links.py @@ -1,38 +1,38 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from bamboohr_sdk.models.get_employees_response_object_links_next import GetEmployeesResponseObjectLinksNext from bamboohr_sdk.models.get_employees_response_object_links_prev import GetEmployeesResponseObjectLinksPrev from bamboohr_sdk.models.get_employees_response_object_links_self import GetEmployeesResponseObjectLinksSelf -from typing import Optional, Set -from typing_extensions import Self + class GetEmployeesResponseObjectLinks(BaseModel): """ Navigation links for API pagination - """ # noqa: E501 - var_self: Optional[GetEmployeesResponseObjectLinksSelf] = Field(default=None, alias="self") - next: Optional[GetEmployeesResponseObjectLinksNext] = None - prev: Optional[GetEmployeesResponseObjectLinksPrev] = None - __properties: ClassVar[List[str]] = ["self", "next", "prev"] + """ + + var_self: GetEmployeesResponseObjectLinksSelf | None = Field(default=None, alias="self") + next: GetEmployeesResponseObjectLinksNext | None = None + prev: GetEmployeesResponseObjectLinksPrev | None = None + __properties: ClassVar[list[str]] = ["self", "next", "prev"] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +40,6 @@ class GetEmployeesResponseObjectLinks(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,11 +50,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GetEmployeesResponseObjectLinks from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -65,8 +64,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,17 +73,17 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of var_self if self.var_self: - _dict['self'] = self.var_self.to_dict() + _dict["self"] = self.var_self.to_dict() # override the default output from pydantic by calling `to_dict()` of next if self.next: - _dict['next'] = self.next.to_dict() + _dict["next"] = self.next.to_dict() # override the default output from pydantic by calling `to_dict()` of prev if self.prev: - _dict['prev'] = self.prev.to_dict() + _dict["prev"] = self.prev.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GetEmployeesResponseObjectLinks from a dict""" if obj is None: return None @@ -93,11 +91,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "self": GetEmployeesResponseObjectLinksSelf.from_dict(obj["self"]) if obj.get("self") is not None else None, - "next": GetEmployeesResponseObjectLinksNext.from_dict(obj["next"]) if obj.get("next") is not None else None, - "prev": GetEmployeesResponseObjectLinksPrev.from_dict(obj["prev"]) if obj.get("prev") is not None else None - }) + _obj = cls.model_validate( + { + "self": GetEmployeesResponseObjectLinksSelf.from_dict(obj["self"]) + if obj.get("self") is not None + else None, + "next": GetEmployeesResponseObjectLinksNext.from_dict(obj["next"]) + if obj.get("next") is not None + else None, + "prev": GetEmployeesResponseObjectLinksPrev.from_dict(obj["prev"]) + if obj.get("prev") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/get_employees_response_object_links_next.py b/bamboohr_sdk/models/get_employees_response_object_links_next.py index 873ba58..400ec61 100644 --- a/bamboohr_sdk/models/get_employees_response_object_links_next.py +++ b/bamboohr_sdk/models/get_employees_response_object_links_next.py @@ -1,33 +1,32 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GetEmployeesResponseObjectLinksNext(BaseModel): """ Link to next page - """ # noqa: E501 - href: Optional[StrictStr] = Field(default=None, description="URL of the next page") - __properties: ClassVar[List[str]] = ["href"] + """ + + href: StrictStr | None = Field(default=None, description="URL of the next page") + __properties: ClassVar[list[str]] = ["href"] model_config = ConfigDict( populate_by_name=True, @@ -35,7 +34,6 @@ class GetEmployeesResponseObjectLinksNext(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -46,11 +44,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GetEmployeesResponseObjectLinksNext from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -60,8 +58,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,7 +68,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GetEmployeesResponseObjectLinksNext from a dict""" if obj is None: return None @@ -79,9 +76,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "href": obj.get("href") - }) + _obj = cls.model_validate({"href": obj.get("href")}) return _obj - - diff --git a/bamboohr_sdk/models/get_employees_response_object_links_prev.py b/bamboohr_sdk/models/get_employees_response_object_links_prev.py index bf37f17..1eaebde 100644 --- a/bamboohr_sdk/models/get_employees_response_object_links_prev.py +++ b/bamboohr_sdk/models/get_employees_response_object_links_prev.py @@ -1,33 +1,32 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GetEmployeesResponseObjectLinksPrev(BaseModel): """ Link to previous page - """ # noqa: E501 - href: Optional[StrictStr] = Field(default=None, description="URL of the previous page") - __properties: ClassVar[List[str]] = ["href"] + """ + + href: StrictStr | None = Field(default=None, description="URL of the previous page") + __properties: ClassVar[list[str]] = ["href"] model_config = ConfigDict( populate_by_name=True, @@ -35,7 +34,6 @@ class GetEmployeesResponseObjectLinksPrev(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -46,11 +44,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GetEmployeesResponseObjectLinksPrev from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -60,8 +58,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,7 +68,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GetEmployeesResponseObjectLinksPrev from a dict""" if obj is None: return None @@ -79,9 +76,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "href": obj.get("href") - }) + _obj = cls.model_validate({"href": obj.get("href")}) return _obj - - diff --git a/bamboohr_sdk/models/get_employees_response_object_links_self.py b/bamboohr_sdk/models/get_employees_response_object_links_self.py index e2a3676..3d17320 100644 --- a/bamboohr_sdk/models/get_employees_response_object_links_self.py +++ b/bamboohr_sdk/models/get_employees_response_object_links_self.py @@ -1,33 +1,32 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GetEmployeesResponseObjectLinksSelf(BaseModel): """ Link to current page - """ # noqa: E501 - href: Optional[StrictStr] = Field(default=None, description="URL of the current page") - __properties: ClassVar[List[str]] = ["href"] + """ + + href: StrictStr | None = Field(default=None, description="URL of the current page") + __properties: ClassVar[list[str]] = ["href"] model_config = ConfigDict( populate_by_name=True, @@ -35,7 +34,6 @@ class GetEmployeesResponseObjectLinksSelf(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -46,11 +44,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GetEmployeesResponseObjectLinksSelf from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -60,8 +58,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,7 +68,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GetEmployeesResponseObjectLinksSelf from a dict""" if obj is None: return None @@ -79,9 +76,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "href": obj.get("href") - }) + _obj = cls.model_validate({"href": obj.get("href")}) return _obj - - diff --git a/bamboohr_sdk/models/global_holiday_global_holiday_v1.py b/bamboohr_sdk/models/global_holiday_global_holiday_v1.py new file mode 100644 index 0000000..3db19ac --- /dev/null +++ b/bamboohr_sdk/models/global_holiday_global_holiday_v1.py @@ -0,0 +1,122 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date +from typing import Any, ClassVar +from uuid import UUID + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing_extensions import Self + + +class GlobalHolidayGlobalHolidayV1(BaseModel): + """ + A read-only entry in the global holiday catalog + """ + + uuid: UUID | None = Field( + default=None, description="The catalog entry UUID. Use it to seed a company holiday from this catalog entry." + ) + name: StrictStr | None = Field(default=None, description="The holiday name") + type: StrictStr | None = Field(default=None, description="The holiday type") + start_date: date | None = Field(default=None, description="The start date of the holiday", alias="startDate") + end_date: date | None = Field(default=None, alias="endDate") + country_code: StrictStr | None = Field( + default=None, description="ISO 3166-1 alpha-2 country code", alias="countryCode" + ) + source: StrictStr | None = Field(default=None, description="The upstream catalog source") + __properties: ClassVar[list[str]] = ["uuid", "name", "type", "startDate", "endDate", "countryCode", "source"] + + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["PUBLIC", "CULTURAL", "RELIGIOUS", "REGIONAL"]): + raise ValueError("must be one of enum values ('PUBLIC', 'CULTURAL', 'RELIGIOUS', 'REGIONAL')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of GlobalHolidayGlobalHolidayV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: set[str] = set( + [ + "uuid", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if end_date (nullable) is None + # and model_fields_set contains the field + if self.end_date is None and "end_date" in self.model_fields_set: + _dict["endDate"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of GlobalHolidayGlobalHolidayV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uuid": obj.get("uuid"), + "name": obj.get("name"), + "type": obj.get("type"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "countryCode": obj.get("countryCode"), + "source": obj.get("source"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/goal.py b/bamboohr_sdk/models/goal.py deleted file mode 100644 index 6cb2997..0000000 --- a/bamboohr_sdk/models/goal.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self - -class Goal(BaseModel): - """ - Goal - """ # noqa: E501 - id: StrictInt = Field(description="A unique identifier for the record. Use this ID to reference this goal.") - title: StrictStr = Field(description="The goal title.") - description: Optional[StrictStr] = Field(default=None, description="The goal description.") - percent_complete: Optional[StrictInt] = Field(default=None, description="The goal completion percentage (0 - 100).", alias="percentComplete") - aligns_with_option_id: Optional[StrictStr] = Field(default=None, description="The option ID that aligns with this goal.", alias="alignsWithOptionId") - shared_with_employee_ids: Optional[List[StrictInt]] = Field(default=None, description="Employee IDs of employees with whom the goal is shared. All goal owners are considered \"shared with\".", alias="sharedWithEmployeeIds") - due_date: Optional[StrictStr] = Field(default=None, description="The goal due date in YYYY-mm-dd format.", alias="dueDate") - completion_date: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The date the goal was completed.", alias="completionDate") - __properties: ClassVar[List[str]] = ["id", "title", "description", "percentComplete", "alignsWithOptionId", "sharedWithEmployeeIds", "dueDate", "completionDate"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Goal from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Goal from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "title": obj.get("title"), - "description": obj.get("description"), - "percentComplete": obj.get("percentComplete"), - "alignsWithOptionId": obj.get("alignsWithOptionId"), - "sharedWithEmployeeIds": obj.get("sharedWithEmployeeIds"), - "dueDate": obj.get("dueDate"), - "completionDate": obj.get("completionDate") - }) - return _obj - - diff --git a/bamboohr_sdk/models/goal_aggregate.py b/bamboohr_sdk/models/goal_aggregate.py index e49d2af..befb6e4 100644 --- a/bamboohr_sdk/models/goal_aggregate.py +++ b/bamboohr_sdk/models/goal_aggregate.py @@ -1,42 +1,59 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from bamboohr_sdk.models.goal_aggregate_aligns_with_options_inner import GoalAggregateAlignsWithOptionsInner from bamboohr_sdk.models.goal_aggregate_comments_inner import GoalAggregateCommentsInner from bamboohr_sdk.models.goal_aggregate_persons_inner import GoalAggregatePersonsInner from bamboohr_sdk.models.transformed_api_goal import TransformedApiGoal -from typing import Optional, Set -from typing_extensions import Self + class GoalAggregate(BaseModel): """ GoalAggregate - """ # noqa: E501 - goal: Optional[TransformedApiGoal] = None - can_align: Optional[StrictBool] = Field(default=None, description="The selected user can align goals with other users.", alias="canAlign") - can_create_goals: Optional[StrictBool] = Field(default=None, description="The selected user can create a goal.", alias="canCreateGoals") - aligns_with_options: Optional[List[GoalAggregateAlignsWithOptionsInner]] = Field(default=None, description="All possible goals that this goal could be aligned with.", alias="alignsWithOptions") - comments: Optional[List[GoalAggregateCommentsInner]] = Field(default=None, description="Comments linked to selected goal.") - persons: Optional[List[GoalAggregatePersonsInner]] = Field(default=None, description="A list of people with access to the goal.") - __properties: ClassVar[List[str]] = ["goal", "canAlign", "canCreateGoals", "alignsWithOptions", "comments", "persons"] + """ + + goal: TransformedApiGoal | None = None + can_align: StrictBool | None = Field( + default=None, description="The selected user can align goals with other users.", alias="canAlign" + ) + can_create_goals: StrictBool | None = Field( + default=None, description="The selected user can create a goal.", alias="canCreateGoals" + ) + aligns_with_options: list[GoalAggregateAlignsWithOptionsInner] | None = Field( + default=None, description="All possible goals that this goal could be aligned with.", alias="alignsWithOptions" + ) + comments: list[GoalAggregateCommentsInner] | None = Field( + default=None, description="Comments linked to selected goal." + ) + persons: list[GoalAggregatePersonsInner] | None = Field( + default=None, description="A list of people with access to the goal." + ) + __properties: ClassVar[list[str]] = [ + "goal", + "canAlign", + "canCreateGoals", + "alignsWithOptions", + "comments", + "persons", + ] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +61,6 @@ class GoalAggregate(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,11 +71,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalAggregate from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -69,8 +85,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -79,32 +94,32 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of goal if self.goal: - _dict['goal'] = self.goal.to_dict() + _dict["goal"] = self.goal.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in aligns_with_options (list) _items = [] if self.aligns_with_options: for _item_aligns_with_options in self.aligns_with_options: if _item_aligns_with_options: _items.append(_item_aligns_with_options.to_dict()) - _dict['alignsWithOptions'] = _items + _dict["alignsWithOptions"] = _items # override the default output from pydantic by calling `to_dict()` of each item in comments (list) _items = [] if self.comments: for _item_comments in self.comments: if _item_comments: _items.append(_item_comments.to_dict()) - _dict['comments'] = _items + _dict["comments"] = _items # override the default output from pydantic by calling `to_dict()` of each item in persons (list) _items = [] if self.persons: for _item_persons in self.persons: if _item_persons: _items.append(_item_persons.to_dict()) - _dict['persons'] = _items + _dict["persons"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalAggregate from a dict""" if obj is None: return None @@ -112,14 +127,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "goal": TransformedApiGoal.from_dict(obj["goal"]) if obj.get("goal") is not None else None, - "canAlign": obj.get("canAlign"), - "canCreateGoals": obj.get("canCreateGoals"), - "alignsWithOptions": [GoalAggregateAlignsWithOptionsInner.from_dict(_item) for _item in obj["alignsWithOptions"]] if obj.get("alignsWithOptions") is not None else None, - "comments": [GoalAggregateCommentsInner.from_dict(_item) for _item in obj["comments"]] if obj.get("comments") is not None else None, - "persons": [GoalAggregatePersonsInner.from_dict(_item) for _item in obj["persons"]] if obj.get("persons") is not None else None - }) + _obj = cls.model_validate( + { + "goal": TransformedApiGoal.from_dict(obj["goal"]) if obj.get("goal") is not None else None, + "canAlign": obj.get("canAlign"), + "canCreateGoals": obj.get("canCreateGoals"), + "alignsWithOptions": [ + GoalAggregateAlignsWithOptionsInner.from_dict(_item) for _item in obj["alignsWithOptions"] + ] + if obj.get("alignsWithOptions") is not None + else None, + "comments": [GoalAggregateCommentsInner.from_dict(_item) for _item in obj["comments"]] + if obj.get("comments") is not None + else None, + "persons": [GoalAggregatePersonsInner.from_dict(_item) for _item in obj["persons"]] + if obj.get("persons") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goal_aggregate_aligns_with_options_inner.py b/bamboohr_sdk/models/goal_aggregate_aligns_with_options_inner.py index bd0d5ab..cbd85f6 100644 --- a/bamboohr_sdk/models/goal_aggregate_aligns_with_options_inner.py +++ b/bamboohr_sdk/models/goal_aggregate_aligns_with_options_inner.py @@ -1,34 +1,37 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GoalAggregateAlignsWithOptionsInner(BaseModel): """ GoalAggregateAlignsWithOptionsInner - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Id of the goal that the selected goal could be aligned with.") - title: Optional[StrictStr] = Field(default=None, description="Title of the goal that the selected goal could be aligned with.") - __properties: ClassVar[List[str]] = ["id", "title"] + """ + + id: StrictInt | None = Field( + default=None, description="Id of the goal that the selected goal could be aligned with." + ) + title: StrictStr | None = Field( + default=None, description="Title of the goal that the selected goal could be aligned with." + ) + __properties: ClassVar[list[str]] = ["id", "title"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +39,6 @@ class GoalAggregateAlignsWithOptionsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +49,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalAggregateAlignsWithOptionsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalAggregateAlignsWithOptionsInner from a dict""" if obj is None: return None @@ -80,10 +81,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "title": obj.get("title") - }) + _obj = cls.model_validate({"id": obj.get("id"), "title": obj.get("title")}) return _obj - - diff --git a/bamboohr_sdk/models/goal_aggregate_comments_inner.py b/bamboohr_sdk/models/goal_aggregate_comments_inner.py index db7bf03..27f44cd 100644 --- a/bamboohr_sdk/models/goal_aggregate_comments_inner.py +++ b/bamboohr_sdk/models/goal_aggregate_comments_inner.py @@ -1,38 +1,41 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GoalAggregateCommentsInner(BaseModel): """ GoalAggregateCommentsInner - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Id of the comment.") - author_user_id: Optional[StrictInt] = Field(default=None, description="Id of the author of the comment.", alias="authorUserId") - created_at: Optional[StrictStr] = Field(default=None, description="The date and time that the comment was created.", alias="createdAt") - text: Optional[StrictStr] = Field(default=None, description="The actual text of the comment.") - can_edit: Optional[StrictBool] = Field(default=None, description="Can the comment be edited.", alias="canEdit") - can_delete: Optional[StrictBool] = Field(default=None, description="Can the comment be deleted.", alias="canDelete") - __properties: ClassVar[List[str]] = ["id", "authorUserId", "createdAt", "text", "canEdit", "canDelete"] + """ + + id: StrictStr | None = Field(default=None, description="Id of the comment.") + author_user_id: StrictInt | None = Field( + default=None, description="Id of the author of the comment.", alias="authorUserId" + ) + created_at: StrictStr | None = Field( + default=None, description="ISO 8601 UTC timestamp when the comment was created.", alias="createdAt" + ) + text: StrictStr | None = Field(default=None, description="The actual text of the comment.") + can_edit: StrictBool | None = Field(default=None, description="Can the comment be edited.", alias="canEdit") + can_delete: StrictBool | None = Field(default=None, description="Can the comment be deleted.", alias="canDelete") + __properties: ClassVar[list[str]] = ["id", "authorUserId", "createdAt", "text", "canEdit", "canDelete"] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +43,6 @@ class GoalAggregateCommentsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,11 +53,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalAggregateCommentsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -65,8 +67,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalAggregateCommentsInner from a dict""" if obj is None: return None @@ -84,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "authorUserId": obj.get("authorUserId"), - "createdAt": obj.get("createdAt"), - "text": obj.get("text"), - "canEdit": obj.get("canEdit"), - "canDelete": obj.get("canDelete") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "authorUserId": obj.get("authorUserId"), + "createdAt": obj.get("createdAt"), + "text": obj.get("text"), + "canEdit": obj.get("canEdit"), + "canDelete": obj.get("canDelete"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goal_aggregate_persons_inner.py b/bamboohr_sdk/models/goal_aggregate_persons_inner.py index 5d2e046..fd1bb68 100644 --- a/bamboohr_sdk/models/goal_aggregate_persons_inner.py +++ b/bamboohr_sdk/models/goal_aggregate_persons_inner.py @@ -1,37 +1,42 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GoalAggregatePersonsInner(BaseModel): """ GoalAggregatePersonsInner - """ # noqa: E501 - employee_id: Optional[StrictInt] = Field(default=None, description="The id of this employee.", alias="employeeId") - user_id: Optional[StrictInt] = Field(default=None, description="The user id of the person if applicable.", alias="userId") - display_first_name: Optional[StrictStr] = Field(default=None, description="First name of the person.", alias="displayFirstName") - last_name: Optional[StrictStr] = Field(default=None, description="Last name of the person.", alias="lastName") - photo_url: Optional[StrictStr] = Field(default=None, description="url of the user profile image.", alias="photoUrl") - __properties: ClassVar[List[str]] = ["employeeId", "userId", "displayFirstName", "lastName", "photoUrl"] + """ + + employee_id: StrictInt | None = Field( + default=None, description="The internal employee ID of this employee.", alias="employeeId" + ) + user_id: StrictInt | None = Field( + default=None, description="The user id of the person if applicable.", alias="userId" + ) + display_first_name: StrictStr | None = Field( + default=None, description="First name of the person.", alias="displayFirstName" + ) + last_name: StrictStr | None = Field(default=None, description="Last name of the person.", alias="lastName") + photo_url: StrictStr | None = Field(default=None, description="url of the user profile image.", alias="photoUrl") + __properties: ClassVar[list[str]] = ["employeeId", "userId", "displayFirstName", "lastName", "photoUrl"] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +44,6 @@ class GoalAggregatePersonsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,11 +54,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalAggregatePersonsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -64,8 +68,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalAggregatePersonsInner from a dict""" if obj is None: return None @@ -83,13 +86,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "employeeId": obj.get("employeeId"), - "userId": obj.get("userId"), - "displayFirstName": obj.get("displayFirstName"), - "lastName": obj.get("lastName"), - "photoUrl": obj.get("photoUrl") - }) + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "userId": obj.get("userId"), + "displayFirstName": obj.get("displayFirstName"), + "lastName": obj.get("lastName"), + "photoUrl": obj.get("photoUrl"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goal_comment_response.py b/bamboohr_sdk/models/goal_comment_response.py index 953f576..a928e25 100644 --- a/bamboohr_sdk/models/goal_comment_response.py +++ b/bamboohr_sdk/models/goal_comment_response.py @@ -1,38 +1,45 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GoalCommentResponse(BaseModel): """ GoalCommentResponse - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The comment ID.") - author_user_id: Optional[StrictInt] = Field(default=None, description="The user ID of the comment author.", alias="authorUserId") - created_at: Optional[StrictStr] = Field(default=None, description="ISO 8601 UTC timestamp when the comment was created.", alias="createdAt") - text: Optional[StrictStr] = Field(default=None, description="The text content of the comment.") - can_edit: Optional[StrictBool] = Field(default=None, description="Whether the API user can edit this comment.", alias="canEdit") - can_delete: Optional[StrictBool] = Field(default=None, description="Whether the API user can delete this comment.", alias="canDelete") - __properties: ClassVar[List[str]] = ["id", "authorUserId", "createdAt", "text", "canEdit", "canDelete"] + """ + + id: StrictStr | None = Field(default=None, description="The comment ID.") + author_user_id: StrictInt | None = Field( + default=None, description="The user ID of the comment author.", alias="authorUserId" + ) + created_at: StrictStr | None = Field( + default=None, description="ISO 8601 UTC timestamp when the comment was created.", alias="createdAt" + ) + text: StrictStr | None = Field(default=None, description="The text content of the comment.") + can_edit: StrictBool | None = Field( + default=None, description="Whether the authenticated caller can edit this comment.", alias="canEdit" + ) + can_delete: StrictBool | None = Field( + default=None, description="Whether the authenticated caller can delete this comment.", alias="canDelete" + ) + __properties: ClassVar[list[str]] = ["id", "authorUserId", "createdAt", "text", "canEdit", "canDelete"] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +47,6 @@ class GoalCommentResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,11 +57,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalCommentResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -65,8 +71,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalCommentResponse from a dict""" if obj is None: return None @@ -84,14 +89,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "authorUserId": obj.get("authorUserId"), - "createdAt": obj.get("createdAt"), - "text": obj.get("text"), - "canEdit": obj.get("canEdit"), - "canDelete": obj.get("canDelete") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "authorUserId": obj.get("authorUserId"), + "createdAt": obj.get("createdAt"), + "text": obj.get("text"), + "canEdit": obj.get("canEdit"), + "canDelete": obj.get("canDelete"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goal_comments_response.py b/bamboohr_sdk/models/goal_comments_response.py index 8ea8f30..e1b0d24 100644 --- a/bamboohr_sdk/models/goal_comments_response.py +++ b/bamboohr_sdk/models/goal_comments_response.py @@ -1,34 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.goal_comments_response_comments_inner import GoalCommentsResponseCommentsInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.goal_comments_response_comments_inner import GoalCommentsResponseCommentsInner + + class GoalCommentsResponse(BaseModel): """ GoalCommentsResponse - """ # noqa: E501 - comments: Optional[List[GoalCommentsResponseCommentsInner]] = Field(default=None, description="Array of comment objects for the goal.") - __properties: ClassVar[List[str]] = ["comments"] + """ + + comments: list[GoalCommentsResponseCommentsInner] | None = Field( + default=None, description="Array of comment objects for the goal." + ) + __properties: ClassVar[list[str]] = ["comments"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +38,6 @@ class GoalCommentsResponse(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalCommentsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,11 +75,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_comments in self.comments: if _item_comments: _items.append(_item_comments.to_dict()) - _dict['comments'] = _items + _dict["comments"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalCommentsResponse from a dict""" if obj is None: return None @@ -87,9 +87,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "comments": [GoalCommentsResponseCommentsInner.from_dict(_item) for _item in obj["comments"]] if obj.get("comments") is not None else None - }) + _obj = cls.model_validate( + { + "comments": [GoalCommentsResponseCommentsInner.from_dict(_item) for _item in obj["comments"]] + if obj.get("comments") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goal_comments_response_comments_inner.py b/bamboohr_sdk/models/goal_comments_response_comments_inner.py index 9dcfc11..91a49a1 100644 --- a/bamboohr_sdk/models/goal_comments_response_comments_inner.py +++ b/bamboohr_sdk/models/goal_comments_response_comments_inner.py @@ -1,38 +1,45 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GoalCommentsResponseCommentsInner(BaseModel): """ GoalCommentsResponseCommentsInner - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The comment ID.") - author_user_id: Optional[StrictInt] = Field(default=None, description="The user ID of the comment author.", alias="authorUserId") - created_at: Optional[StrictStr] = Field(default=None, description="ISO 8601 UTC timestamp when the comment was created.", alias="createdAt") - text: Optional[StrictStr] = Field(default=None, description="The text content of the comment.") - can_edit: Optional[StrictBool] = Field(default=None, description="Whether the API user can edit this comment.", alias="canEdit") - can_delete: Optional[StrictBool] = Field(default=None, description="Whether the API user can delete this comment.", alias="canDelete") - __properties: ClassVar[List[str]] = ["id", "authorUserId", "createdAt", "text", "canEdit", "canDelete"] + """ + + id: StrictStr | None = Field(default=None, description="The comment ID.") + author_user_id: StrictInt | None = Field( + default=None, description="The user ID of the comment author.", alias="authorUserId" + ) + created_at: StrictStr | None = Field( + default=None, description="ISO 8601 UTC timestamp when the comment was created.", alias="createdAt" + ) + text: StrictStr | None = Field(default=None, description="The text content of the comment.") + can_edit: StrictBool | None = Field( + default=None, description="Whether the authenticated caller can edit this comment.", alias="canEdit" + ) + can_delete: StrictBool | None = Field( + default=None, description="Whether the authenticated caller can delete this comment.", alias="canDelete" + ) + __properties: ClassVar[list[str]] = ["id", "authorUserId", "createdAt", "text", "canEdit", "canDelete"] model_config = ConfigDict( populate_by_name=True, @@ -40,7 +47,6 @@ class GoalCommentsResponseCommentsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,11 +57,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalCommentsResponseCommentsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -65,8 +71,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -76,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalCommentsResponseCommentsInner from a dict""" if obj is None: return None @@ -84,14 +89,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "authorUserId": obj.get("authorUserId"), - "createdAt": obj.get("createdAt"), - "text": obj.get("text"), - "canEdit": obj.get("canEdit"), - "canDelete": obj.get("canDelete") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "authorUserId": obj.get("authorUserId"), + "createdAt": obj.get("createdAt"), + "text": obj.get("text"), + "canEdit": obj.get("canEdit"), + "canDelete": obj.get("canDelete"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goal_filters_v1.py b/bamboohr_sdk/models/goal_filters_v1.py index 06d48a2..25d283d 100644 --- a/bamboohr_sdk/models/goal_filters_v1.py +++ b/bamboohr_sdk/models/goal_filters_v1.py @@ -1,34 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.goal_filters_v1_filters_inner import GoalFiltersV1FiltersInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.goal_filters_v1_filters_inner import GoalFiltersV1FiltersInner + + class GoalFiltersV1(BaseModel): """ Array containing goal filters and their counts for API v1 - """ # noqa: E501 - filters: Optional[List[GoalFiltersV1FiltersInner]] = Field(default=None, description="Array of goal filter objects with counts") - __properties: ClassVar[List[str]] = ["filters"] + """ + + filters: list[GoalFiltersV1FiltersInner] | None = Field( + default=None, description="Array of goal filter objects with counts" + ) + __properties: ClassVar[list[str]] = ["filters"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +38,6 @@ class GoalFiltersV1(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalFiltersV1 from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,11 +75,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_filters in self.filters: if _item_filters: _items.append(_item_filters.to_dict()) - _dict['filters'] = _items + _dict["filters"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalFiltersV1 from a dict""" if obj is None: return None @@ -90,9 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "filters": [GoalFiltersV1FiltersInner.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None - }) + _obj = cls.model_validate( + { + "filters": [GoalFiltersV1FiltersInner.from_dict(_item) for _item in obj["filters"]] + if obj.get("filters") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goal_filters_v11.py b/bamboohr_sdk/models/goal_filters_v11.py index 97d4d69..90dceb3 100644 --- a/bamboohr_sdk/models/goal_filters_v11.py +++ b/bamboohr_sdk/models/goal_filters_v11.py @@ -1,34 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.goal_filters_v11_filters_inner import GoalFiltersV11FiltersInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.goal_filters_v11_filters_inner import GoalFiltersV11FiltersInner + + class GoalFiltersV11(BaseModel): """ Array containing goal filters, their counts, and actions - """ # noqa: E501 - filters: Optional[List[GoalFiltersV11FiltersInner]] = Field(default=None, description="Array of goal filter objects with counts") - __properties: ClassVar[List[str]] = ["filters"] + """ + + filters: list[GoalFiltersV11FiltersInner] | None = Field( + default=None, description="Array of goal filter objects with counts" + ) + __properties: ClassVar[list[str]] = ["filters"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +38,6 @@ class GoalFiltersV11(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalFiltersV11 from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,11 +75,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_filters in self.filters: if _item_filters: _items.append(_item_filters.to_dict()) - _dict['filters'] = _items + _dict["filters"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalFiltersV11 from a dict""" if obj is None: return None @@ -87,9 +87,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "filters": [GoalFiltersV11FiltersInner.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None - }) + _obj = cls.model_validate( + { + "filters": [GoalFiltersV11FiltersInner.from_dict(_item) for _item in obj["filters"]] + if obj.get("filters") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goal_filters_v11_filters_inner.py b/bamboohr_sdk/models/goal_filters_v11_filters_inner.py index 960ce46..4257035 100644 --- a/bamboohr_sdk/models/goal_filters_v11_filters_inner.py +++ b/bamboohr_sdk/models/goal_filters_v11_filters_inner.py @@ -1,55 +1,55 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.goal_filters_v11_filters_inner_actions import GoalFiltersV11FiltersInnerActions -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.goal_filters_v11_filters_inner_actions import GoalFiltersV11FiltersInnerActions + + class GoalFiltersV11FiltersInner(BaseModel): """ GoalFiltersV11FiltersInner - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Filter identifier based on goal status.") - name: Optional[StrictStr] = Field(default=None, description="Display name of the filter") - count: Optional[StrictInt] = Field(default=None, description="Number of goals matching this filter") - actions: Optional[GoalFiltersV11FiltersInnerActions] = None - __properties: ClassVar[List[str]] = ["id", "name", "count", "actions"] - - @field_validator('id') + """ + + id: StrictStr | None = Field(default=None, description="Filter identifier based on goal status.") + name: StrictStr | None = Field(default=None, description="Display name of the filter") + count: StrictInt | None = Field(default=None, description="Number of goals matching this filter") + actions: GoalFiltersV11FiltersInnerActions | None = None + __properties: ClassVar[list[str]] = ["id", "name", "count", "actions"] + + @field_validator("id") def id_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['status-inProgress', 'status-completed', 'status-closed']): + if value not in set(["status-inProgress", "status-completed", "status-closed"]): raise ValueError("must be one of enum values ('status-inProgress', 'status-completed', 'status-closed')") return value - @field_validator('name') + @field_validator("name") def name_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['In Progress', 'Completed', 'Closed']): + if value not in set(["In Progress", "Completed", "Closed"]): raise ValueError("must be one of enum values ('In Progress', 'Completed', 'Closed')") return value @@ -59,7 +59,6 @@ def name_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,11 +69,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalFiltersV11FiltersInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -84,8 +83,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -94,11 +92,11 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of actions if self.actions: - _dict['actions'] = self.actions.to_dict() + _dict["actions"] = self.actions.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalFiltersV11FiltersInner from a dict""" if obj is None: return None @@ -106,12 +104,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "count": obj.get("count"), - "actions": GoalFiltersV11FiltersInnerActions.from_dict(obj["actions"]) if obj.get("actions") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "count": obj.get("count"), + "actions": GoalFiltersV11FiltersInnerActions.from_dict(obj["actions"]) + if obj.get("actions") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goal_filters_v11_filters_inner_actions.py b/bamboohr_sdk/models/goal_filters_v11_filters_inner_actions.py index 48cbef6..abb9c0e 100644 --- a/bamboohr_sdk/models/goal_filters_v11_filters_inner_actions.py +++ b/bamboohr_sdk/models/goal_filters_v11_filters_inner_actions.py @@ -1,37 +1,54 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GoalFiltersV11FiltersInnerActions(BaseModel): """ Available actions for goals in this state, defined by PerformanceDefinitions::GOAL_FILTER_ACTIONS - """ # noqa: E501 - can_close_goal: Optional[StrictBool] = Field(default=None, description="Whether goals in this state can be closed", alias="canCloseGoal") - can_edit_goal: Optional[StrictBool] = Field(default=None, description="Whether goals in this state can be edited", alias="canEditGoal") - can_edit_goal_progress_bar: Optional[StrictBool] = Field(default=None, description="Whether progress bar can be edited for goals in this state", alias="canEditGoalProgressBar") - can_reopen_goal: Optional[StrictBool] = Field(default=None, description="Whether goals in this state can be reopened", alias="canReopenGoal") - can_share_goal: Optional[StrictBool] = Field(default=None, description="Whether goals in this state can be shared", alias="canShareGoal") - __properties: ClassVar[List[str]] = ["canCloseGoal", "canEditGoal", "canEditGoalProgressBar", "canReopenGoal", "canShareGoal"] + """ + + can_close_goal: StrictBool | None = Field( + default=None, description="Whether goals in this state can be closed", alias="canCloseGoal" + ) + can_edit_goal: StrictBool | None = Field( + default=None, description="Whether goals in this state can be edited", alias="canEditGoal" + ) + can_edit_goal_progress_bar: StrictBool | None = Field( + default=None, + description="Whether progress bar can be edited for goals in this state", + alias="canEditGoalProgressBar", + ) + can_reopen_goal: StrictBool | None = Field( + default=None, description="Whether goals in this state can be reopened", alias="canReopenGoal" + ) + can_share_goal: StrictBool | None = Field( + default=None, description="Whether goals in this state can be shared", alias="canShareGoal" + ) + __properties: ClassVar[list[str]] = [ + "canCloseGoal", + "canEditGoal", + "canEditGoalProgressBar", + "canReopenGoal", + "canShareGoal", + ] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +56,6 @@ class GoalFiltersV11FiltersInnerActions(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,11 +66,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalFiltersV11FiltersInnerActions from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -64,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,7 +90,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalFiltersV11FiltersInnerActions from a dict""" if obj is None: return None @@ -83,13 +98,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "canCloseGoal": obj.get("canCloseGoal"), - "canEditGoal": obj.get("canEditGoal"), - "canEditGoalProgressBar": obj.get("canEditGoalProgressBar"), - "canReopenGoal": obj.get("canReopenGoal"), - "canShareGoal": obj.get("canShareGoal") - }) + _obj = cls.model_validate( + { + "canCloseGoal": obj.get("canCloseGoal"), + "canEditGoal": obj.get("canEditGoal"), + "canEditGoalProgressBar": obj.get("canEditGoalProgressBar"), + "canReopenGoal": obj.get("canReopenGoal"), + "canShareGoal": obj.get("canShareGoal"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goal_filters_v1_filters_inner.py b/bamboohr_sdk/models/goal_filters_v1_filters_inner.py index bd81b93..47f108e 100644 --- a/bamboohr_sdk/models/goal_filters_v1_filters_inner.py +++ b/bamboohr_sdk/models/goal_filters_v1_filters_inner.py @@ -1,53 +1,52 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GoalFiltersV1FiltersInner(BaseModel): """ GoalFiltersV1FiltersInner - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Filter identifier based on goal status.") - name: Optional[StrictStr] = Field(default=None, description="Display name of the filter") - count: Optional[StrictInt] = Field(default=None, description="Number of goals matching this filter") - __properties: ClassVar[List[str]] = ["id", "name", "count"] + """ + + id: StrictStr | None = Field(default=None, description="Filter identifier based on goal status.") + name: StrictStr | None = Field(default=None, description="Display name of the filter") + count: StrictInt | None = Field(default=None, description="Number of goals matching this filter") + __properties: ClassVar[list[str]] = ["id", "name", "count"] - @field_validator('id') + @field_validator("id") def id_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['status-inProgress', 'status-completed']): + if value not in set(["status-inProgress", "status-completed"]): raise ValueError("must be one of enum values ('status-inProgress', 'status-completed')") return value - @field_validator('name') + @field_validator("name") def name_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['In Progress', 'Completed']): + if value not in set(["In Progress", "Completed"]): raise ValueError("must be one of enum values ('In Progress', 'Completed')") return value @@ -57,7 +56,6 @@ def name_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,11 +66,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalFiltersV1FiltersInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -82,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -93,7 +90,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalFiltersV1FiltersInner from a dict""" if obj is None: return None @@ -101,11 +98,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "count": obj.get("count") - }) + _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name"), "count": obj.get("count")}) return _obj - - diff --git a/bamboohr_sdk/models/goal_response.py b/bamboohr_sdk/models/goal_response.py new file mode 100644 index 0000000..5842dec --- /dev/null +++ b/bamboohr_sdk/models/goal_response.py @@ -0,0 +1,87 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + +from bamboohr_sdk.models.transformed_api_goal import TransformedApiGoal + + +class GoalResponse(BaseModel): + """ + GoalResponse + """ + + goal: TransformedApiGoal | None = None + __properties: ClassVar[list[str]] = ["goal"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of GoalResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of goal + if self.goal: + _dict["goal"] = self.goal.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of GoalResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"goal": TransformedApiGoal.from_dict(obj["goal"]) if obj.get("goal") is not None else None} + ) + return _obj diff --git a/bamboohr_sdk/models/goals_aggregate_v1.py b/bamboohr_sdk/models/goals_aggregate_v1.py index 685c7c0..23c8b48 100644 --- a/bamboohr_sdk/models/goals_aggregate_v1.py +++ b/bamboohr_sdk/models/goals_aggregate_v1.py @@ -1,43 +1,61 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from bamboohr_sdk.models.goal_filters_v1 import GoalFiltersV1 from bamboohr_sdk.models.goals_aggregate_v1_comments_inner import GoalsAggregateV1CommentsInner from bamboohr_sdk.models.goals_aggregate_v1_persons_inner import GoalsAggregateV1PersonsInner from bamboohr_sdk.models.transformed_api_goal import TransformedApiGoal -from typing import Optional, Set -from typing_extensions import Self + class GoalsAggregateV1(BaseModel): """ GoalsAggregateV1 - """ # noqa: E501 - can_align: Optional[StrictBool] = Field(default=None, description="The selected user can align goals with other users.", alias="canAlign") - can_create_goals: Optional[StrictBool] = Field(default=None, description="The selected user can create a goal.", alias="canCreateGoals") - filters: Optional[GoalFiltersV1] = None - selected_filter: Optional[StrictStr] = Field(default=None, description="The id of the current selected filter.", alias="selectedFilter") - goals: Optional[List[TransformedApiGoal]] = Field(default=None, description="All goals in selected filter.") - persons: Optional[List[GoalsAggregateV1PersonsInner]] = Field(default=None, description="A list of people with access to the goal.") - comments: Optional[List[GoalsAggregateV1CommentsInner]] = Field(default=None, description="A list of how many comments belong to each goal.") - __properties: ClassVar[List[str]] = ["canAlign", "canCreateGoals", "filters", "selectedFilter", "goals", "persons", "comments"] + """ + + can_align: StrictBool | None = Field( + default=None, description="The selected user can align goals with other users.", alias="canAlign" + ) + can_create_goals: StrictBool | None = Field( + default=None, description="The selected user can create a goal.", alias="canCreateGoals" + ) + filters: GoalFiltersV1 | None = None + selected_filter: StrictStr | None = Field( + default=None, description="The id of the current selected filter.", alias="selectedFilter" + ) + goals: list[TransformedApiGoal] | None = Field(default=None, description="All goals in selected filter.") + persons: list[GoalsAggregateV1PersonsInner] | None = Field( + default=None, description="A list of people with access to the goal." + ) + comments: list[GoalsAggregateV1CommentsInner] | None = Field( + default=None, description="A list of how many comments belong to each goal." + ) + __properties: ClassVar[list[str]] = [ + "canAlign", + "canCreateGoals", + "filters", + "selectedFilter", + "goals", + "persons", + "comments", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +63,6 @@ class GoalsAggregateV1(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -56,11 +73,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalsAggregateV1 from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -70,8 +87,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,32 +96,32 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of filters if self.filters: - _dict['filters'] = self.filters.to_dict() + _dict["filters"] = self.filters.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in goals (list) _items = [] if self.goals: for _item_goals in self.goals: if _item_goals: _items.append(_item_goals.to_dict()) - _dict['goals'] = _items + _dict["goals"] = _items # override the default output from pydantic by calling `to_dict()` of each item in persons (list) _items = [] if self.persons: for _item_persons in self.persons: if _item_persons: _items.append(_item_persons.to_dict()) - _dict['persons'] = _items + _dict["persons"] = _items # override the default output from pydantic by calling `to_dict()` of each item in comments (list) _items = [] if self.comments: for _item_comments in self.comments: if _item_comments: _items.append(_item_comments.to_dict()) - _dict['comments'] = _items + _dict["comments"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalsAggregateV1 from a dict""" if obj is None: return None @@ -113,15 +129,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "canAlign": obj.get("canAlign"), - "canCreateGoals": obj.get("canCreateGoals"), - "filters": GoalFiltersV1.from_dict(obj["filters"]) if obj.get("filters") is not None else None, - "selectedFilter": obj.get("selectedFilter"), - "goals": [TransformedApiGoal.from_dict(_item) for _item in obj["goals"]] if obj.get("goals") is not None else None, - "persons": [GoalsAggregateV1PersonsInner.from_dict(_item) for _item in obj["persons"]] if obj.get("persons") is not None else None, - "comments": [GoalsAggregateV1CommentsInner.from_dict(_item) for _item in obj["comments"]] if obj.get("comments") is not None else None - }) + _obj = cls.model_validate( + { + "canAlign": obj.get("canAlign"), + "canCreateGoals": obj.get("canCreateGoals"), + "filters": GoalFiltersV1.from_dict(obj["filters"]) if obj.get("filters") is not None else None, + "selectedFilter": obj.get("selectedFilter"), + "goals": [TransformedApiGoal.from_dict(_item) for _item in obj["goals"]] + if obj.get("goals") is not None + else None, + "persons": [GoalsAggregateV1PersonsInner.from_dict(_item) for _item in obj["persons"]] + if obj.get("persons") is not None + else None, + "comments": [GoalsAggregateV1CommentsInner.from_dict(_item) for _item in obj["comments"]] + if obj.get("comments") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goals_aggregate_v11.py b/bamboohr_sdk/models/goals_aggregate_v11.py index 80b76c9..44c6496 100644 --- a/bamboohr_sdk/models/goals_aggregate_v11.py +++ b/bamboohr_sdk/models/goals_aggregate_v11.py @@ -1,43 +1,61 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from bamboohr_sdk.models.goal_filters_v11 import GoalFiltersV11 -from bamboohr_sdk.models.goals_aggregate_v11_comments_inner import GoalsAggregateV11CommentsInner from bamboohr_sdk.models.goals_aggregate_v1_persons_inner import GoalsAggregateV1PersonsInner +from bamboohr_sdk.models.goals_aggregate_v11_comments_inner import GoalsAggregateV11CommentsInner from bamboohr_sdk.models.transformed_api_goal import TransformedApiGoal -from typing import Optional, Set -from typing_extensions import Self + class GoalsAggregateV11(BaseModel): """ GoalsAggregateV11 - """ # noqa: E501 - can_align: Optional[StrictBool] = Field(default=None, description="The selected user can align goals with other users.", alias="canAlign") - can_create_goals: Optional[StrictBool] = Field(default=None, description="The selected user can create a goal.", alias="canCreateGoals") - filters: Optional[GoalFiltersV11] = None - selected_filter: Optional[StrictStr] = Field(default=None, description="The id of the current selected filter.", alias="selectedFilter") - goals: Optional[List[TransformedApiGoal]] = Field(default=None, description="All goals in selected filter.") - persons: Optional[List[GoalsAggregateV1PersonsInner]] = Field(default=None, description="A list of people with access to the goal.") - comments: Optional[List[GoalsAggregateV11CommentsInner]] = Field(default=None, description="A list of how many comments belong to each goal.") - __properties: ClassVar[List[str]] = ["canAlign", "canCreateGoals", "filters", "selectedFilter", "goals", "persons", "comments"] + """ + + can_align: StrictBool | None = Field( + default=None, description="The selected user can align goals with other users.", alias="canAlign" + ) + can_create_goals: StrictBool | None = Field( + default=None, description="The selected user can create a goal.", alias="canCreateGoals" + ) + filters: GoalFiltersV11 | None = None + selected_filter: StrictStr | None = Field( + default=None, description="The id of the current selected filter.", alias="selectedFilter" + ) + goals: list[TransformedApiGoal] | None = Field(default=None, description="All goals in selected filter.") + persons: list[GoalsAggregateV1PersonsInner] | None = Field( + default=None, description="A list of people with access to the goal." + ) + comments: list[GoalsAggregateV11CommentsInner] | None = Field( + default=None, description="A list of how many comments belong to each goal." + ) + __properties: ClassVar[list[str]] = [ + "canAlign", + "canCreateGoals", + "filters", + "selectedFilter", + "goals", + "persons", + "comments", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +63,6 @@ class GoalsAggregateV11(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -56,11 +73,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalsAggregateV11 from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -70,8 +87,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,32 +96,32 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of filters if self.filters: - _dict['filters'] = self.filters.to_dict() + _dict["filters"] = self.filters.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in goals (list) _items = [] if self.goals: for _item_goals in self.goals: if _item_goals: _items.append(_item_goals.to_dict()) - _dict['goals'] = _items + _dict["goals"] = _items # override the default output from pydantic by calling `to_dict()` of each item in persons (list) _items = [] if self.persons: for _item_persons in self.persons: if _item_persons: _items.append(_item_persons.to_dict()) - _dict['persons'] = _items + _dict["persons"] = _items # override the default output from pydantic by calling `to_dict()` of each item in comments (list) _items = [] if self.comments: for _item_comments in self.comments: if _item_comments: _items.append(_item_comments.to_dict()) - _dict['comments'] = _items + _dict["comments"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalsAggregateV11 from a dict""" if obj is None: return None @@ -113,15 +129,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "canAlign": obj.get("canAlign"), - "canCreateGoals": obj.get("canCreateGoals"), - "filters": GoalFiltersV11.from_dict(obj["filters"]) if obj.get("filters") is not None else None, - "selectedFilter": obj.get("selectedFilter"), - "goals": [TransformedApiGoal.from_dict(_item) for _item in obj["goals"]] if obj.get("goals") is not None else None, - "persons": [GoalsAggregateV1PersonsInner.from_dict(_item) for _item in obj["persons"]] if obj.get("persons") is not None else None, - "comments": [GoalsAggregateV11CommentsInner.from_dict(_item) for _item in obj["comments"]] if obj.get("comments") is not None else None - }) + _obj = cls.model_validate( + { + "canAlign": obj.get("canAlign"), + "canCreateGoals": obj.get("canCreateGoals"), + "filters": GoalFiltersV11.from_dict(obj["filters"]) if obj.get("filters") is not None else None, + "selectedFilter": obj.get("selectedFilter"), + "goals": [TransformedApiGoal.from_dict(_item) for _item in obj["goals"]] + if obj.get("goals") is not None + else None, + "persons": [GoalsAggregateV1PersonsInner.from_dict(_item) for _item in obj["persons"]] + if obj.get("persons") is not None + else None, + "comments": [GoalsAggregateV11CommentsInner.from_dict(_item) for _item in obj["comments"]] + if obj.get("comments") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goals_aggregate_v11_comments_inner.py b/bamboohr_sdk/models/goals_aggregate_v11_comments_inner.py index 5c8a67d..588f139 100644 --- a/bamboohr_sdk/models/goals_aggregate_v11_comments_inner.py +++ b/bamboohr_sdk/models/goals_aggregate_v11_comments_inner.py @@ -1,34 +1,37 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GoalsAggregateV11CommentsInner(BaseModel): """ GoalsAggregateV11CommentsInner - """ # noqa: E501 - goal_id: Optional[StrictStr] = Field(default=None, description="The goalId that the comments are linked to.", alias="goalId") - comment_count: Optional[StrictInt] = Field(default=None, description="How many comments are linked to the goal", alias="commentCount") - __properties: ClassVar[List[str]] = ["goalId", "commentCount"] + """ + + goal_id: StrictStr | None = Field( + default=None, description="The goalId that the comments are linked to.", alias="goalId" + ) + comment_count: StrictInt | None = Field( + default=None, description="How many comments are linked to the goal", alias="commentCount" + ) + __properties: ClassVar[list[str]] = ["goalId", "commentCount"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +39,6 @@ class GoalsAggregateV11CommentsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +49,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalsAggregateV11CommentsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalsAggregateV11CommentsInner from a dict""" if obj is None: return None @@ -80,10 +81,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "goalId": obj.get("goalId"), - "commentCount": obj.get("commentCount") - }) + _obj = cls.model_validate({"goalId": obj.get("goalId"), "commentCount": obj.get("commentCount")}) return _obj - - diff --git a/bamboohr_sdk/models/goals_aggregate_v12.py b/bamboohr_sdk/models/goals_aggregate_v12.py index 9161936..0291cd5 100644 --- a/bamboohr_sdk/models/goals_aggregate_v12.py +++ b/bamboohr_sdk/models/goals_aggregate_v12.py @@ -1,43 +1,61 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from bamboohr_sdk.models.goal_aggregate_persons_inner import GoalAggregatePersonsInner from bamboohr_sdk.models.goal_filters_v11 import GoalFiltersV11 from bamboohr_sdk.models.goals_aggregate_v12_comments_inner import GoalsAggregateV12CommentsInner from bamboohr_sdk.models.transformed_api_goal import TransformedApiGoal -from typing import Optional, Set -from typing_extensions import Self + class GoalsAggregateV12(BaseModel): """ GoalsAggregateV12 - """ # noqa: E501 - can_align: Optional[StrictBool] = Field(default=None, description="The selected user can align goals with other users.", alias="canAlign") - can_create_goals: Optional[StrictBool] = Field(default=None, description="The selected user can create a goal.", alias="canCreateGoals") - filters: Optional[GoalFiltersV11] = None - selected_filter: Optional[StrictStr] = Field(default=None, description="The id of the current selected filter.", alias="selectedFilter") - goals: Optional[List[TransformedApiGoal]] = Field(default=None, description="All goals in selected filter.") - persons: Optional[List[GoalAggregatePersonsInner]] = Field(default=None, description="A list of people with access to the goal.") - comments: Optional[List[GoalsAggregateV12CommentsInner]] = Field(default=None, description="A list of how many comments belong to each goal.") - __properties: ClassVar[List[str]] = ["canAlign", "canCreateGoals", "filters", "selectedFilter", "goals", "persons", "comments"] + """ + + can_align: StrictBool | None = Field( + default=None, description="The selected user can align goals with other users.", alias="canAlign" + ) + can_create_goals: StrictBool | None = Field( + default=None, description="The selected user can create a goal.", alias="canCreateGoals" + ) + filters: GoalFiltersV11 | None = None + selected_filter: StrictStr | None = Field( + default=None, description="The id of the current selected filter.", alias="selectedFilter" + ) + goals: list[TransformedApiGoal] | None = Field(default=None, description="All goals in selected filter.") + persons: list[GoalAggregatePersonsInner] | None = Field( + default=None, description="A list of people with access to the goal." + ) + comments: list[GoalsAggregateV12CommentsInner] | None = Field( + default=None, description="A list of how many comments belong to each goal." + ) + __properties: ClassVar[list[str]] = [ + "canAlign", + "canCreateGoals", + "filters", + "selectedFilter", + "goals", + "persons", + "comments", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +63,6 @@ class GoalsAggregateV12(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -56,11 +73,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalsAggregateV12 from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -70,8 +87,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,32 +96,32 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of filters if self.filters: - _dict['filters'] = self.filters.to_dict() + _dict["filters"] = self.filters.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in goals (list) _items = [] if self.goals: for _item_goals in self.goals: if _item_goals: _items.append(_item_goals.to_dict()) - _dict['goals'] = _items + _dict["goals"] = _items # override the default output from pydantic by calling `to_dict()` of each item in persons (list) _items = [] if self.persons: for _item_persons in self.persons: if _item_persons: _items.append(_item_persons.to_dict()) - _dict['persons'] = _items + _dict["persons"] = _items # override the default output from pydantic by calling `to_dict()` of each item in comments (list) _items = [] if self.comments: for _item_comments in self.comments: if _item_comments: _items.append(_item_comments.to_dict()) - _dict['comments'] = _items + _dict["comments"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalsAggregateV12 from a dict""" if obj is None: return None @@ -113,15 +129,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "canAlign": obj.get("canAlign"), - "canCreateGoals": obj.get("canCreateGoals"), - "filters": GoalFiltersV11.from_dict(obj["filters"]) if obj.get("filters") is not None else None, - "selectedFilter": obj.get("selectedFilter"), - "goals": [TransformedApiGoal.from_dict(_item) for _item in obj["goals"]] if obj.get("goals") is not None else None, - "persons": [GoalAggregatePersonsInner.from_dict(_item) for _item in obj["persons"]] if obj.get("persons") is not None else None, - "comments": [GoalsAggregateV12CommentsInner.from_dict(_item) for _item in obj["comments"]] if obj.get("comments") is not None else None - }) + _obj = cls.model_validate( + { + "canAlign": obj.get("canAlign"), + "canCreateGoals": obj.get("canCreateGoals"), + "filters": GoalFiltersV11.from_dict(obj["filters"]) if obj.get("filters") is not None else None, + "selectedFilter": obj.get("selectedFilter"), + "goals": [TransformedApiGoal.from_dict(_item) for _item in obj["goals"]] + if obj.get("goals") is not None + else None, + "persons": [GoalAggregatePersonsInner.from_dict(_item) for _item in obj["persons"]] + if obj.get("persons") is not None + else None, + "comments": [GoalsAggregateV12CommentsInner.from_dict(_item) for _item in obj["comments"]] + if obj.get("comments") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goals_aggregate_v12_comments_inner.py b/bamboohr_sdk/models/goals_aggregate_v12_comments_inner.py index c0fbb03..3e425fd 100644 --- a/bamboohr_sdk/models/goals_aggregate_v12_comments_inner.py +++ b/bamboohr_sdk/models/goals_aggregate_v12_comments_inner.py @@ -1,34 +1,37 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing_extensions import Self + class GoalsAggregateV12CommentsInner(BaseModel): """ GoalsAggregateV12CommentsInner - """ # noqa: E501 - goal_id: Optional[StrictInt] = Field(default=None, description="The goalId that the comments are linked to.", alias="goalId") - comment_count: Optional[StrictInt] = Field(default=None, description="How many comments are linked to the goal", alias="commentCount") - __properties: ClassVar[List[str]] = ["goalId", "commentCount"] + """ + + goal_id: StrictStr | None = Field( + default=None, description="The goalId that the comments are linked to.", alias="goalId" + ) + comment_count: StrictInt | None = Field( + default=None, description="How many comments are linked to the goal", alias="commentCount" + ) + __properties: ClassVar[list[str]] = ["goalId", "commentCount"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +39,6 @@ class GoalsAggregateV12CommentsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +49,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalsAggregateV12CommentsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalsAggregateV12CommentsInner from a dict""" if obj is None: return None @@ -80,10 +81,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "goalId": obj.get("goalId"), - "commentCount": obj.get("commentCount") - }) + _obj = cls.model_validate({"goalId": obj.get("goalId"), "commentCount": obj.get("commentCount")}) return _obj - - diff --git a/bamboohr_sdk/models/goals_aggregate_v1_comments_inner.py b/bamboohr_sdk/models/goals_aggregate_v1_comments_inner.py index d5bf11a..f711e68 100644 --- a/bamboohr_sdk/models/goals_aggregate_v1_comments_inner.py +++ b/bamboohr_sdk/models/goals_aggregate_v1_comments_inner.py @@ -1,34 +1,37 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GoalsAggregateV1CommentsInner(BaseModel): """ GoalsAggregateV1CommentsInner - """ # noqa: E501 - goal_id: Optional[StrictInt] = Field(default=None, description="The goalId that the comments are linked to.", alias="goalId") - comment_count: Optional[StrictInt] = Field(default=None, description="How many comments are linked to the goal", alias="commentCount") - __properties: ClassVar[List[str]] = ["goalId", "commentCount"] + """ + + goal_id: StrictInt | StrictStr | None = Field( + default=None, description="The goalId that the comments are linked to.", alias="goalId" + ) + comment_count: StrictInt | StrictStr | None = Field( + default=None, description="How many comments are linked to the goal", alias="commentCount" + ) + __properties: ClassVar[list[str]] = ["goalId", "commentCount"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +39,6 @@ class GoalsAggregateV1CommentsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +49,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalsAggregateV1CommentsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalsAggregateV1CommentsInner from a dict""" if obj is None: return None @@ -80,10 +81,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "goalId": obj.get("goalId"), - "commentCount": obj.get("commentCount") - }) + _obj = cls.model_validate({"goalId": obj.get("goalId"), "commentCount": obj.get("commentCount")}) return _obj - - diff --git a/bamboohr_sdk/models/goals_aggregate_v1_persons_inner.py b/bamboohr_sdk/models/goals_aggregate_v1_persons_inner.py index 62317d7..5eb899b 100644 --- a/bamboohr_sdk/models/goals_aggregate_v1_persons_inner.py +++ b/bamboohr_sdk/models/goals_aggregate_v1_persons_inner.py @@ -1,37 +1,42 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class GoalsAggregateV1PersonsInner(BaseModel): """ GoalsAggregateV1PersonsInner - """ # noqa: E501 - employee_id: Optional[StrictInt] = Field(default=None, description="The id of this employee.", alias="employeeId") - user_id: Optional[StrictInt] = Field(default=None, description="The user id of the person if applicable.", alias="userId") - display_first_name: Optional[StrictStr] = Field(default=None, description="First name of the person.", alias="displayFirstName") - last_name: Optional[StrictStr] = Field(default=None, description="Last name of the person.", alias="lastName") - photo_url: Optional[StrictStr] = Field(default=None, description="url of the user profile image.", alias="photoUrl") - __properties: ClassVar[List[str]] = ["employeeId", "userId", "displayFirstName", "lastName", "photoUrl"] + """ + + employee_id: StrictInt | None = Field( + default=None, description="The internal employee ID of this employee.", alias="employeeId" + ) + user_id: StrictInt | None = Field( + default=None, description="The user id of the person if applicable.", alias="userId" + ) + display_first_name: StrictStr | None = Field( + default=None, description="First name of the person.", alias="displayFirstName" + ) + last_name: StrictStr | None = Field(default=None, description="Last name of the person.", alias="lastName") + photo_url: StrictStr | None = Field(default=None, description="url of the user profile image.", alias="photoUrl") + __properties: ClassVar[list[str]] = ["employeeId", "userId", "displayFirstName", "lastName", "photoUrl"] model_config = ConfigDict( populate_by_name=True, @@ -39,7 +44,6 @@ class GoalsAggregateV1PersonsInner(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,11 +54,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalsAggregateV1PersonsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -64,8 +68,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalsAggregateV1PersonsInner from a dict""" if obj is None: return None @@ -83,13 +86,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "employeeId": obj.get("employeeId"), - "userId": obj.get("userId"), - "displayFirstName": obj.get("displayFirstName"), - "lastName": obj.get("lastName"), - "photoUrl": obj.get("photoUrl") - }) + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "userId": obj.get("userId"), + "displayFirstName": obj.get("displayFirstName"), + "lastName": obj.get("lastName"), + "photoUrl": obj.get("photoUrl"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/goals_list.py b/bamboohr_sdk/models/goals_list.py index eb9ef8d..3c8af4b 100644 --- a/bamboohr_sdk/models/goals_list.py +++ b/bamboohr_sdk/models/goals_list.py @@ -1,34 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.transformed_api_goal import TransformedApiGoal -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.transformed_api_goal import TransformedApiGoal + + class GoalsList(BaseModel): """ GoalsList - """ # noqa: E501 - goals: Optional[List[TransformedApiGoal]] = Field(default=None, description="All goals of the selected employee") - __properties: ClassVar[List[str]] = ["goals"] + """ + + goals: list[TransformedApiGoal] | None = Field(default=None, description="All goals of the selected employee") + __properties: ClassVar[list[str]] = ["goals"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +36,6 @@ class GoalsList(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of GoalsList from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,11 +73,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_goals in self.goals: if _item_goals: _items.append(_item_goals.to_dict()) - _dict['goals'] = _items + _dict["goals"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of GoalsList from a dict""" if obj is None: return None @@ -87,9 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "goals": [TransformedApiGoal.from_dict(_item) for _item in obj["goals"]] if obj.get("goals") is not None else None - }) + _obj = cls.model_validate( + { + "goals": [TransformedApiGoal.from_dict(_item) for _item in obj["goals"]] + if obj.get("goals") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/hiring_lead.py b/bamboohr_sdk/models/hiring_lead.py index 0d53f6b..e410c1b 100644 --- a/bamboohr_sdk/models/hiring_lead.py +++ b/bamboohr_sdk/models/hiring_lead.py @@ -1,34 +1,39 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class HiringLead(BaseModel): """ HiringLead - """ # noqa: E501 - employee_id: Optional[StrictInt] = Field(default=None, description="The employee ID to use as the `hiringLead` value in the Create Job Opening request", alias="employeeId") - preferred_full_name: Optional[StrictStr] = Field(default=None, description="The employee's preferred full name", alias="preferredFullName") - __properties: ClassVar[List[str]] = ["employeeId", "preferredFullName"] + """ + + employee_id: StrictInt | None = Field( + default=None, + description="The internal employee ID to use as the `hiringLead` value in the Create Job Opening request", + alias="employeeId", + ) + preferred_full_name: StrictStr | None = Field( + default=None, description="The employee's preferred full name", alias="preferredFullName" + ) + __properties: ClassVar[list[str]] = ["employeeId", "preferredFullName"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +41,6 @@ class HiringLead(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +51,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of HiringLead from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +65,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of HiringLead from a dict""" if obj is None: return None @@ -80,10 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "employeeId": obj.get("employeeId"), - "preferredFullName": obj.get("preferredFullName") - }) + _obj = cls.model_validate( + {"employeeId": obj.get("employeeId"), "preferredFullName": obj.get("preferredFullName")} + ) return _obj - - diff --git a/bamboohr_sdk/models/holiday_bulk_insert_company_holiday_error_v1.py b/bamboohr_sdk/models/holiday_bulk_insert_company_holiday_error_v1.py new file mode 100644 index 0000000..883f001 --- /dev/null +++ b/bamboohr_sdk/models/holiday_bulk_insert_company_holiday_error_v1.py @@ -0,0 +1,100 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + + +class HolidayBulkInsertCompanyHolidayErrorV1(BaseModel): + """ + A problem-details style error for a single record within a bulk-insert request. + """ + + record_index: StrictInt | None = Field( + default=None, description="Zero-based index of the failed record in the request body array", alias="recordIndex" + ) + type: StrictStr | None = Field(default=None, description="Problem type URI identifying the error category") + title: StrictStr | None = Field(default=None, description="Short, human-readable summary of the problem type") + status: StrictInt | None = Field( + default=None, description="HTTP status code the record would have received from the single-create endpoint" + ) + detail: StrictStr | None = Field( + default=None, description="Human-readable explanation specific to this record failure" + ) + code: StrictStr | None = Field(default=None, description="Application-specific error code") + __properties: ClassVar[list[str]] = ["recordIndex", "type", "title", "status", "detail", "code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayBulkInsertCompanyHolidayErrorV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayBulkInsertCompanyHolidayErrorV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "recordIndex": obj.get("recordIndex"), + "type": obj.get("type"), + "title": obj.get("title"), + "status": obj.get("status"), + "detail": obj.get("detail"), + "code": obj.get("code"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/holiday_bulk_insert_company_holiday_record_v1.py b/bamboohr_sdk/models/holiday_bulk_insert_company_holiday_record_v1.py new file mode 100644 index 0000000..895e75b --- /dev/null +++ b/bamboohr_sdk/models/holiday_bulk_insert_company_holiday_record_v1.py @@ -0,0 +1,104 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.holiday_company_holiday_v1 import HolidayCompanyHolidayV1 + + +class HolidayBulkInsertCompanyHolidayRecordV1(BaseModel): + """ + A successfully created record within a bulk-insert response. + """ + + id: StrictInt | None = Field(default=None, description="The ID of the created company holiday") + status: StrictStr | None = Field(default=None, description="Per-record operation outcome") + http_status: StrictInt | None = Field( + default=None, description="HTTP status code representing the per-record result", alias="httpStatus" + ) + record: HolidayCompanyHolidayV1 | None = Field( + default=None, description="The full created company holiday. Present only when returnRecords=true." + ) + __properties: ClassVar[list[str]] = ["id", "status", "httpStatus", "record"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayBulkInsertCompanyHolidayRecordV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of record + if self.record: + _dict["record"] = self.record.to_dict() + # set to None if record (nullable) is None + # and model_fields_set contains the field + if self.record is None and "record" in self.model_fields_set: + _dict["record"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayBulkInsertCompanyHolidayRecordV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "status": obj.get("status"), + "httpStatus": obj.get("httpStatus"), + "record": HolidayCompanyHolidayV1.from_dict(obj["record"]) if obj.get("record") is not None else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/holiday_bulk_insert_company_holidays_failure_response_v1.py b/bamboohr_sdk/models/holiday_bulk_insert_company_holidays_failure_response_v1.py new file mode 100644 index 0000000..fb600a6 --- /dev/null +++ b/bamboohr_sdk/models/holiday_bulk_insert_company_holidays_failure_response_v1.py @@ -0,0 +1,153 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +from typing import Any + +from pydantic import BaseModel, ConfigDict, ValidationError, field_validator +from typing_extensions import Self + +from bamboohr_sdk.models.holiday_bulk_insert_company_holidays_response_v1 import ( + HolidayBulkInsertCompanyHolidaysResponseV1, +) +from bamboohr_sdk.models.problem_details_response import ProblemDetailsResponse + +HOLIDAYBULKINSERTCOMPANYHOLIDAYSFAILURERESPONSEV1_ONE_OF_SCHEMAS = [ + "HolidayBulkInsertCompanyHolidaysResponseV1", + "ProblemDetailsResponse", +] + + +class HolidayBulkInsertCompanyHolidaysFailureResponseV1(BaseModel): + """ + HolidayBulkInsertCompanyHolidaysFailureResponseV1 + """ + + # data type: ProblemDetailsResponse + oneof_schema_1_validator: ProblemDetailsResponse | None = None + # data type: HolidayBulkInsertCompanyHolidaysResponseV1 + oneof_schema_2_validator: HolidayBulkInsertCompanyHolidaysResponseV1 | None = None + actual_instance: HolidayBulkInsertCompanyHolidaysResponseV1 | ProblemDetailsResponse | None = None + one_of_schemas: set[str] = {"HolidayBulkInsertCompanyHolidaysResponseV1", "ProblemDetailsResponse"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = HolidayBulkInsertCompanyHolidaysFailureResponseV1.model_construct() + error_messages = [] + match = 0 + # validate data type: ProblemDetailsResponse + if not isinstance(v, ProblemDetailsResponse): + error_messages.append(f"Error! Input type `{type(v)}` is not `ProblemDetailsResponse`") + else: + match += 1 + # validate data type: HolidayBulkInsertCompanyHolidaysResponseV1 + if not isinstance(v, HolidayBulkInsertCompanyHolidaysResponseV1): + error_messages.append(f"Error! Input type `{type(v)}` is not `HolidayBulkInsertCompanyHolidaysResponseV1`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when setting `actual_instance` in HolidayBulkInsertCompanyHolidaysFailureResponseV1 with oneOf schemas: HolidayBulkInsertCompanyHolidaysResponseV1, ProblemDetailsResponse. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in HolidayBulkInsertCompanyHolidaysFailureResponseV1 with oneOf schemas: HolidayBulkInsertCompanyHolidaysResponseV1, ProblemDetailsResponse. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: str | dict[str, Any]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into ProblemDetailsResponse + try: + instance.actual_instance = ProblemDetailsResponse.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into HolidayBulkInsertCompanyHolidaysResponseV1 + try: + instance.actual_instance = HolidayBulkInsertCompanyHolidaysResponseV1.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into HolidayBulkInsertCompanyHolidaysFailureResponseV1 with oneOf schemas: HolidayBulkInsertCompanyHolidaysResponseV1, ProblemDetailsResponse. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into HolidayBulkInsertCompanyHolidaysFailureResponseV1 with oneOf schemas: HolidayBulkInsertCompanyHolidaysResponseV1, ProblemDetailsResponse. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict( + self, + ) -> dict[str, Any] | HolidayBulkInsertCompanyHolidaysResponseV1 | ProblemDetailsResponse | None: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/bamboohr_sdk/models/holiday_bulk_insert_company_holidays_response_v1.py b/bamboohr_sdk/models/holiday_bulk_insert_company_holidays_response_v1.py new file mode 100644 index 0000000..087ddcc --- /dev/null +++ b/bamboohr_sdk/models/holiday_bulk_insert_company_holidays_response_v1.py @@ -0,0 +1,143 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing_extensions import Self + +from bamboohr_sdk.models.holiday_bulk_insert_company_holiday_error_v1 import HolidayBulkInsertCompanyHolidayErrorV1 +from bamboohr_sdk.models.holiday_bulk_insert_company_holiday_record_v1 import HolidayBulkInsertCompanyHolidayRecordV1 + + +class HolidayBulkInsertCompanyHolidaysResponseV1(BaseModel): + """ + Result envelope for a synchronous bulk-insert of company holidays. + """ + + status: StrictStr | None = Field(default=None, description="Overall batch outcome") + operation: StrictStr | None = Field(default=None, description="Operation type for this bulk request") + total_requested: StrictInt | None = Field( + default=None, description="Total number of records in the request", alias="totalRequested" + ) + total_processed: StrictInt | None = Field( + default=None, description="Total number of records created successfully", alias="totalProcessed" + ) + failed: StrictInt | None = Field(default=None, description="Total number of records that failed") + errors: list[HolidayBulkInsertCompanyHolidayErrorV1] | None = Field( + default=None, description="Per-record problem-details style errors" + ) + records: list[HolidayBulkInsertCompanyHolidayRecordV1] | None = Field( + default=None, description="Per-record success results, in request order" + ) + __properties: ClassVar[list[str]] = [ + "status", + "operation", + "totalRequested", + "totalProcessed", + "failed", + "errors", + "records", + ] + + @field_validator("status") + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["success", "partial_success", "failed"]): + raise ValueError("must be one of enum values ('success', 'partial_success', 'failed')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayBulkInsertCompanyHolidaysResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict["errors"] = _items + # override the default output from pydantic by calling `to_dict()` of each item in records (list) + _items = [] + if self.records: + for _item_records in self.records: + if _item_records: + _items.append(_item_records.to_dict()) + _dict["records"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayBulkInsertCompanyHolidaysResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "status": obj.get("status"), + "operation": obj.get("operation"), + "totalRequested": obj.get("totalRequested"), + "totalProcessed": obj.get("totalProcessed"), + "failed": obj.get("failed"), + "errors": [HolidayBulkInsertCompanyHolidayErrorV1.from_dict(_item) for _item in obj["errors"]] + if obj.get("errors") is not None + else None, + "records": [HolidayBulkInsertCompanyHolidayRecordV1.from_dict(_item) for _item in obj["records"]] + if obj.get("records") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/holiday_catalog_holiday_list_response_v1.py b/bamboohr_sdk/models/holiday_catalog_holiday_list_response_v1.py new file mode 100644 index 0000000..79ce613 --- /dev/null +++ b/bamboohr_sdk/models/holiday_catalog_holiday_list_response_v1.py @@ -0,0 +1,111 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from bamboohr_sdk.models.global_holiday_global_holiday_v1 import GlobalHolidayGlobalHolidayV1 +from bamboohr_sdk.models.holiday_catalog_holiday_list_response_v1_links import HolidayCatalogHolidayListResponseV1Links +from bamboohr_sdk.models.pagination_meta_data import PaginationMetaData + + +class HolidayCatalogHolidayListResponseV1(BaseModel): + """ + HolidayCatalogHolidayListResponseV1 + """ + + data: list[GlobalHolidayGlobalHolidayV1] | None = Field( + default=None, description="Catalog holidays for the current page" + ) + links: HolidayCatalogHolidayListResponseV1Links | None = Field(default=None, alias="_links") + meta: PaginationMetaData | None = Field(default=None, description="Pagination metadata") + __properties: ClassVar[list[str]] = ["data", "_links", "meta"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayCatalogHolidayListResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict["data"] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict["_links"] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict["meta"] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayCatalogHolidayListResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "data": [GlobalHolidayGlobalHolidayV1.from_dict(_item) for _item in obj["data"]] + if obj.get("data") is not None + else None, + "_links": HolidayCatalogHolidayListResponseV1Links.from_dict(obj["_links"]) + if obj.get("_links") is not None + else None, + "meta": PaginationMetaData.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/holiday_catalog_holiday_list_response_v1_links.py b/bamboohr_sdk/models/holiday_catalog_holiday_list_response_v1_links.py new file mode 100644 index 0000000..a5e16d1 --- /dev/null +++ b/bamboohr_sdk/models/holiday_catalog_holiday_list_response_v1_links.py @@ -0,0 +1,91 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + + +class HolidayCatalogHolidayListResponseV1Links(BaseModel): + """ + Pagination navigation links + """ + + next: dict[str, Any] | None = None + prev: dict[str, Any] | None = None + __properties: ClassVar[list[str]] = ["next", "prev"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayCatalogHolidayListResponseV1Links from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if next (nullable) is None + # and model_fields_set contains the field + if self.next is None and "next" in self.model_fields_set: + _dict["next"] = None + + # set to None if prev (nullable) is None + # and model_fields_set contains the field + if self.prev is None and "prev" in self.model_fields_set: + _dict["prev"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayCatalogHolidayListResponseV1Links from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"next": obj.get("next"), "prev": obj.get("prev")}) + return _obj diff --git a/bamboohr_sdk/models/holiday_company_holiday_audience_v1.py b/bamboohr_sdk/models/holiday_company_holiday_audience_v1.py new file mode 100644 index 0000000..3db3955 --- /dev/null +++ b/bamboohr_sdk/models/holiday_company_holiday_audience_v1.py @@ -0,0 +1,124 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing_extensions import Self + + +class HolidayCompanyHolidayAudienceV1(BaseModel): + """ + Defines which employees a company holiday applies to + """ + + mode: StrictStr | None = Field(default=None, description="How the holiday audience is determined") + filter_list_value_ids: list[StrictInt] | None = Field( + default=None, + description="List-value IDs that filter the audience. Only populated in FILTERED mode.", + alias="filterListValueIds", + ) + specific_employee_ids: list[StrictInt] | None = Field( + default=None, + description="Employee IDs that define the audience. Only populated in SPECIFIC_EMPLOYEES mode.", + alias="specificEmployeeIds", + ) + additional_employee_ids: list[StrictInt] | None = Field( + default=None, + description="Employee IDs explicitly included on top of the mode's default audience.", + alias="additionalEmployeeIds", + ) + exempt_employee_ids: list[StrictInt] | None = Field( + default=None, + description="Employee IDs explicitly excluded from the mode's default audience.", + alias="exemptEmployeeIds", + ) + __properties: ClassVar[list[str]] = [ + "mode", + "filterListValueIds", + "specificEmployeeIds", + "additionalEmployeeIds", + "exemptEmployeeIds", + ] + + @field_validator("mode") + def mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["ALL_EMPLOYEES", "FILTERED", "SPECIFIC_EMPLOYEES"]): + raise ValueError("must be one of enum values ('ALL_EMPLOYEES', 'FILTERED', 'SPECIFIC_EMPLOYEES')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayCompanyHolidayAudienceV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayCompanyHolidayAudienceV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "mode": obj.get("mode"), + "filterListValueIds": obj.get("filterListValueIds"), + "specificEmployeeIds": obj.get("specificEmployeeIds"), + "additionalEmployeeIds": obj.get("additionalEmployeeIds"), + "exemptEmployeeIds": obj.get("exemptEmployeeIds"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/holiday_company_holiday_list_response_v1.py b/bamboohr_sdk/models/holiday_company_holiday_list_response_v1.py new file mode 100644 index 0000000..a28d5cc --- /dev/null +++ b/bamboohr_sdk/models/holiday_company_holiday_list_response_v1.py @@ -0,0 +1,111 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from bamboohr_sdk.models.holiday_company_holiday_list_response_v1_links import HolidayCompanyHolidayListResponseV1Links +from bamboohr_sdk.models.holiday_company_holiday_list_response_v1_meta import HolidayCompanyHolidayListResponseV1Meta +from bamboohr_sdk.models.holiday_company_holiday_v1 import HolidayCompanyHolidayV1 + + +class HolidayCompanyHolidayListResponseV1(BaseModel): + """ + HolidayCompanyHolidayListResponseV1 + """ + + data: list[HolidayCompanyHolidayV1] | None = Field(default=None, description="Collection of company holidays") + meta: HolidayCompanyHolidayListResponseV1Meta | None = None + links: HolidayCompanyHolidayListResponseV1Links | None = Field(default=None, alias="_links") + __properties: ClassVar[list[str]] = ["data", "meta", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayCompanyHolidayListResponseV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict["data"] = _items + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict["meta"] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict["_links"] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayCompanyHolidayListResponseV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "data": [HolidayCompanyHolidayV1.from_dict(_item) for _item in obj["data"]] + if obj.get("data") is not None + else None, + "meta": HolidayCompanyHolidayListResponseV1Meta.from_dict(obj["meta"]) + if obj.get("meta") is not None + else None, + "_links": HolidayCompanyHolidayListResponseV1Links.from_dict(obj["_links"]) + if obj.get("_links") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/holiday_company_holiday_list_response_v1_links.py b/bamboohr_sdk/models/holiday_company_holiday_list_response_v1_links.py new file mode 100644 index 0000000..fcb8ff3 --- /dev/null +++ b/bamboohr_sdk/models/holiday_company_holiday_list_response_v1_links.py @@ -0,0 +1,91 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + + +class HolidayCompanyHolidayListResponseV1Links(BaseModel): + """ + Pagination links. + """ + + prev: dict[str, Any] | None + next: dict[str, Any] | None + __properties: ClassVar[list[str]] = ["prev", "next"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayCompanyHolidayListResponseV1Links from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if prev (nullable) is None + # and model_fields_set contains the field + if self.prev is None and "prev" in self.model_fields_set: + _dict["prev"] = None + + # set to None if next (nullable) is None + # and model_fields_set contains the field + if self.next is None and "next" in self.model_fields_set: + _dict["next"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayCompanyHolidayListResponseV1Links from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"prev": obj.get("prev"), "next": obj.get("next")}) + return _obj diff --git a/bamboohr_sdk/models/holiday_company_holiday_list_response_v1_meta.py b/bamboohr_sdk/models/holiday_company_holiday_list_response_v1_meta.py new file mode 100644 index 0000000..16ceb74 --- /dev/null +++ b/bamboohr_sdk/models/holiday_company_holiday_list_response_v1_meta.py @@ -0,0 +1,90 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing_extensions import Self + + +class HolidayCompanyHolidayListResponseV1Meta(BaseModel): + """ + Pagination metadata. + """ + + page: StrictInt + page_size: StrictInt = Field(alias="pageSize") + total_pages: StrictInt = Field(alias="totalPages") + total_items: StrictInt = Field(alias="totalItems") + __properties: ClassVar[list[str]] = ["page", "pageSize", "totalPages", "totalItems"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayCompanyHolidayListResponseV1Meta from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayCompanyHolidayListResponseV1Meta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "page": obj.get("page"), + "pageSize": obj.get("pageSize"), + "totalPages": obj.get("totalPages"), + "totalItems": obj.get("totalItems"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/create_training_type_request_due_from_hire_date_one_of.py b/bamboohr_sdk/models/holiday_company_holiday_pay_status_hours_v1.py similarity index 53% rename from bamboohr_sdk/models/create_training_type_request_due_from_hire_date_one_of.py rename to bamboohr_sdk/models/holiday_company_holiday_pay_status_hours_v1.py index 6939017..928b82a 100644 --- a/bamboohr_sdk/models/create_training_type_request_due_from_hire_date_one_of.py +++ b/bamboohr_sdk/models/holiday_company_holiday_pay_status_hours_v1.py @@ -1,34 +1,37 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self -class CreateTrainingTypeRequestDueFromHireDateOneOf(BaseModel): + +class HolidayCompanyHolidayPayStatusHoursV1(BaseModel): """ - CreateTrainingTypeRequestDueFromHireDateOneOf - """ # noqa: E501 - unit: Optional[StrictStr] = Field(default=None, description="Unit of time, e.g. 'day'") - amount: Optional[StrictInt] = Field(default=None, description="Amount of time") - __properties: ClassVar[List[str]] = ["unit", "amount"] + Paid-hour override for one employment status + """ + + employment_status_list_value_id: StrictInt | None = Field( + default=None, + description="List-value ID from the company's Employment Status list", + alias="employmentStatusListValueId", + ) + hours: StrictStr | None = Field(default=None, description="Paid hours for the employment status") + __properties: ClassVar[list[str]] = ["employmentStatusListValueId", "hours"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +39,6 @@ class CreateTrainingTypeRequestDueFromHireDateOneOf(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +49,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateTrainingTypeRequestDueFromHireDateOneOf from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayCompanyHolidayPayStatusHoursV1 from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +63,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,18 +73,15 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateTrainingTypeRequestDueFromHireDateOneOf from a dict""" + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayCompanyHolidayPayStatusHoursV1 from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "unit": obj.get("unit"), - "amount": obj.get("amount") - }) + _obj = cls.model_validate( + {"employmentStatusListValueId": obj.get("employmentStatusListValueId"), "hours": obj.get("hours")} + ) return _obj - - diff --git a/bamboohr_sdk/models/holiday_company_holiday_v1.py b/bamboohr_sdk/models/holiday_company_holiday_v1.py new file mode 100644 index 0000000..e072c2a --- /dev/null +++ b/bamboohr_sdk/models/holiday_company_holiday_v1.py @@ -0,0 +1,173 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date, datetime +from typing import Any, ClassVar +from uuid import UUID + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.holiday_company_holiday_audience_v1 import HolidayCompanyHolidayAudienceV1 + + +class HolidayCompanyHolidayV1(BaseModel): + """ + A company holiday + """ + + id: StrictInt | None = Field(default=None, description="The ID of the holiday") + name: StrictStr | None = Field(default=None, description="The name of the holiday") + start_date: date | None = Field(default=None, description="The start date of the holiday", alias="startDate") + end_date: date | None = Field(default=None, alias="endDate") + is_public: StrictBool | None = Field( + default=None, + description="Whether the holiday is visible to all employees on calendars, independent of audience", + alias="isPublic", + ) + country_codes: list[StrictStr] | None = Field( + default=None, + description="Country filter as ISO 3166-1 alpha-2 codes. Empty means no country filter.", + alias="countryCodes", + ) + audience: HolidayCompanyHolidayAudienceV1 | None = Field(default=None, description="Who the holiday applies to") + holiday_pay: dict[str, Any] | None = Field(default=None, alias="holidayPay") + global_holiday_uuid: UUID | None = Field(default=None, alias="globalHolidayUuid") + created_at: datetime | None = Field( + default=None, description="ISO 8601 timestamp when the holiday was created", alias="createdAt" + ) + updated_at: datetime | None = Field( + default=None, description="ISO 8601 timestamp when the holiday was last updated", alias="updatedAt" + ) + deleted_at: datetime | None = Field(default=None, alias="deletedAt") + __properties: ClassVar[list[str]] = [ + "id", + "name", + "startDate", + "endDate", + "isPublic", + "countryCodes", + "audience", + "holidayPay", + "globalHolidayUuid", + "createdAt", + "updatedAt", + "deletedAt", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayCompanyHolidayV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: set[str] = set( + [ + "id", + "global_holiday_uuid", + "created_at", + "updated_at", + "deleted_at", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of audience + if self.audience: + _dict["audience"] = self.audience.to_dict() + # set to None if end_date (nullable) is None + # and model_fields_set contains the field + if self.end_date is None and "end_date" in self.model_fields_set: + _dict["endDate"] = None + + # set to None if holiday_pay (nullable) is None + # and model_fields_set contains the field + if self.holiday_pay is None and "holiday_pay" in self.model_fields_set: + _dict["holidayPay"] = None + + # set to None if global_holiday_uuid (nullable) is None + # and model_fields_set contains the field + if self.global_holiday_uuid is None and "global_holiday_uuid" in self.model_fields_set: + _dict["globalHolidayUuid"] = None + + # set to None if deleted_at (nullable) is None + # and model_fields_set contains the field + if self.deleted_at is None and "deleted_at" in self.model_fields_set: + _dict["deletedAt"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayCompanyHolidayV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "isPublic": obj.get("isPublic"), + "countryCodes": obj.get("countryCodes"), + "audience": HolidayCompanyHolidayAudienceV1.from_dict(obj["audience"]) + if obj.get("audience") is not None + else None, + "holidayPay": obj.get("holidayPay"), + "globalHolidayUuid": obj.get("globalHolidayUuid"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "deletedAt": obj.get("deletedAt"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/holiday_create_company_holiday_request_v1.py b/bamboohr_sdk/models/holiday_create_company_holiday_request_v1.py new file mode 100644 index 0000000..d5128d4 --- /dev/null +++ b/bamboohr_sdk/models/holiday_create_company_holiday_request_v1.py @@ -0,0 +1,150 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date +from typing import Any, ClassVar +from uuid import UUID + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.holiday_company_holiday_audience_v1 import HolidayCompanyHolidayAudienceV1 + + +class HolidayCreateCompanyHolidayRequestV1(BaseModel): + """ + Payload to create a company holiday. May be fully-specified or reference a global catalog entry via globalHolidayUuid. name and startDate are required unless seeded by globalHolidayUuid. + """ + + global_holiday_uuid: UUID | None = Field(default=None, alias="globalHolidayUuid") + name: StrictStr | None = None + start_date: date | None = Field(default=None, alias="startDate") + end_date: date | None = Field(default=None, alias="endDate") + is_public: StrictBool | None = Field( + default=True, + description="Whether the holiday is visible to all employees on calendars, independent of audience. Defaults to true.", + alias="isPublic", + ) + country_codes: list[StrictStr] | None = Field(default=None, alias="countryCodes") + audience: HolidayCompanyHolidayAudienceV1 = Field(description="Who the holiday applies to") + holiday_pay: dict[str, Any] | None = Field(default=None, alias="holidayPay") + __properties: ClassVar[list[str]] = [ + "globalHolidayUuid", + "name", + "startDate", + "endDate", + "isPublic", + "countryCodes", + "audience", + "holidayPay", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayCreateCompanyHolidayRequestV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of audience + if self.audience: + _dict["audience"] = self.audience.to_dict() + # set to None if global_holiday_uuid (nullable) is None + # and model_fields_set contains the field + if self.global_holiday_uuid is None and "global_holiday_uuid" in self.model_fields_set: + _dict["globalHolidayUuid"] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict["name"] = None + + # set to None if start_date (nullable) is None + # and model_fields_set contains the field + if self.start_date is None and "start_date" in self.model_fields_set: + _dict["startDate"] = None + + # set to None if end_date (nullable) is None + # and model_fields_set contains the field + if self.end_date is None and "end_date" in self.model_fields_set: + _dict["endDate"] = None + + # set to None if country_codes (nullable) is None + # and model_fields_set contains the field + if self.country_codes is None and "country_codes" in self.model_fields_set: + _dict["countryCodes"] = None + + # set to None if holiday_pay (nullable) is None + # and model_fields_set contains the field + if self.holiday_pay is None and "holiday_pay" in self.model_fields_set: + _dict["holidayPay"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayCreateCompanyHolidayRequestV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "globalHolidayUuid": obj.get("globalHolidayUuid"), + "name": obj.get("name"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "isPublic": obj.get("isPublic") if obj.get("isPublic") is not None else True, + "countryCodes": obj.get("countryCodes"), + "audience": HolidayCompanyHolidayAudienceV1.from_dict(obj["audience"]) + if obj.get("audience") is not None + else None, + "holidayPay": obj.get("holidayPay"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/holiday_update_company_holiday_request_v1.py b/bamboohr_sdk/models/holiday_update_company_holiday_request_v1.py new file mode 100644 index 0000000..0555261 --- /dev/null +++ b/bamboohr_sdk/models/holiday_update_company_holiday_request_v1.py @@ -0,0 +1,133 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.holiday_company_holiday_audience_v1 import HolidayCompanyHolidayAudienceV1 + + +class HolidayUpdateCompanyHolidayRequestV1(BaseModel): + """ + JSON Merge Patch payload to update a company holiday. Only the fields present in the document are changed; countryCodes, audience, and holidayPay replace their stored blocks wholesale when supplied. globalHolidayUuid is read-only and rejected if present. + """ + + name: StrictStr | None = Field(default=None, description="The name of the holiday. 1-255 characters.") + start_date: date | None = Field(default=None, description="The start date of the holiday.", alias="startDate") + end_date: date | None = Field(default=None, alias="endDate") + is_public: StrictBool | None = Field( + default=None, + description="Whether the holiday is visible to all employees on calendars, independent of audience.", + alias="isPublic", + ) + country_codes: list[StrictStr] | None = Field( + default=None, + description="Country filter as ISO 3166-1 alpha-2 codes. Replaces the stored country filter wholesale; an empty array removes the filter.", + alias="countryCodes", + ) + audience: HolidayCompanyHolidayAudienceV1 | None = Field( + default=None, + description="Who the holiday applies to. Replaces the stored audience block wholesale; sub-rows that no longer apply to the new mode are cleared.", + ) + holiday_pay: dict[str, Any] | None = Field(default=None, alias="holidayPay") + __properties: ClassVar[list[str]] = [ + "name", + "startDate", + "endDate", + "isPublic", + "countryCodes", + "audience", + "holidayPay", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HolidayUpdateCompanyHolidayRequestV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of audience + if self.audience: + _dict["audience"] = self.audience.to_dict() + # set to None if end_date (nullable) is None + # and model_fields_set contains the field + if self.end_date is None and "end_date" in self.model_fields_set: + _dict["endDate"] = None + + # set to None if holiday_pay (nullable) is None + # and model_fields_set contains the field + if self.holiday_pay is None and "holiday_pay" in self.model_fields_set: + _dict["holidayPay"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HolidayUpdateCompanyHolidayRequestV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "name": obj.get("name"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "isPublic": obj.get("isPublic"), + "countryCodes": obj.get("countryCodes"), + "audience": HolidayCompanyHolidayAudienceV1.from_dict(obj["audience"]) + if obj.get("audience") is not None + else None, + "holidayPay": obj.get("holidayPay"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/hour_entries_request_schema.py b/bamboohr_sdk/models/hour_entries_request_schema.py index 7cbc481..82acbe2 100644 --- a/bamboohr_sdk/models/hour_entries_request_schema.py +++ b/bamboohr_sdk/models/hour_entries_request_schema.py @@ -1,34 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from bamboohr_sdk.models.hour_entry_schema import HourEntrySchema -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.hour_entry_schema import HourEntrySchema + + class HourEntriesRequestSchema(BaseModel): """ Schema for timesheet hour entries request - """ # noqa: E501 - hours: List[HourEntrySchema] = Field(description="Array of hour entries to add or update") - __properties: ClassVar[List[str]] = ["hours"] + """ + + hours: list[HourEntrySchema] = Field(description="Array of hour entries to add or update") + __properties: ClassVar[list[str]] = ["hours"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +36,6 @@ class HourEntriesRequestSchema(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of HourEntriesRequestSchema from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -75,11 +73,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_hours in self.hours: if _item_hours: _items.append(_item_hours.to_dict()) - _dict['hours'] = _items + _dict["hours"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of HourEntriesRequestSchema from a dict""" if obj is None: return None @@ -87,9 +85,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "hours": [HourEntrySchema.from_dict(_item) for _item in obj["hours"]] if obj.get("hours") is not None else None - }) + _obj = cls.model_validate( + { + "hours": [HourEntrySchema.from_dict(_item) for _item in obj["hours"]] + if obj.get("hours") is not None + else None + } + ) return _obj - - diff --git a/bamboohr_sdk/models/hour_entry_create_hour_entry_v1.py b/bamboohr_sdk/models/hour_entry_create_hour_entry_v1.py new file mode 100644 index 0000000..648e9a3 --- /dev/null +++ b/bamboohr_sdk/models/hour_entry_create_hour_entry_v1.py @@ -0,0 +1,110 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + + +class HourEntryCreateHourEntryV1(BaseModel): + """ + Request body for creating a time tracking hour entry. + """ + + employee_id: StrictInt = Field(description="The employee who owns the entry.", alias="employeeId") + var_date: date = Field(description="Calendar date the hours are attributed to.", alias="date") + hours: StrictFloat | StrictInt = Field(description="Hours worked on this date. Must be greater than zero.") + note: StrictStr | None = None + project_id: StrictInt | None = Field(default=None, alias="projectId") + task_id: StrictInt | None = Field(default=None, alias="taskId") + __properties: ClassVar[list[str]] = ["employeeId", "date", "hours", "note", "projectId", "taskId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HourEntryCreateHourEntryV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if note (nullable) is None + # and model_fields_set contains the field + if self.note is None and "note" in self.model_fields_set: + _dict["note"] = None + + # set to None if project_id (nullable) is None + # and model_fields_set contains the field + if self.project_id is None and "project_id" in self.model_fields_set: + _dict["projectId"] = None + + # set to None if task_id (nullable) is None + # and model_fields_set contains the field + if self.task_id is None and "task_id" in self.model_fields_set: + _dict["taskId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HourEntryCreateHourEntryV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "date": obj.get("date"), + "hours": obj.get("hours"), + "note": obj.get("note"), + "projectId": obj.get("projectId"), + "taskId": obj.get("taskId"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/hour_entry_ids_schema.py b/bamboohr_sdk/models/hour_entry_ids_schema.py index 2ec5201..e2598e8 100644 --- a/bamboohr_sdk/models/hour_entry_ids_schema.py +++ b/bamboohr_sdk/models/hour_entry_ids_schema.py @@ -1,34 +1,34 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Annotated, Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set from typing_extensions import Self + class HourEntryIdsSchema(BaseModel): """ Request body schema for operations involving multiple hour entry IDs - """ # noqa: E501 - hour_entry_ids: Annotated[List[StrictInt], Field(min_length=1)] = Field(description="Array of hour entry IDs to process", alias="hourEntryIds") - __properties: ClassVar[List[str]] = ["hourEntryIds"] + """ + + hour_entry_ids: Annotated[list[StrictInt], Field(min_length=1)] = Field( + description="Array of hour entry IDs to process", alias="hourEntryIds" + ) + __properties: ClassVar[list[str]] = ["hourEntryIds"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +36,6 @@ class HourEntryIdsSchema(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +46,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of HourEntryIdsSchema from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +60,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +70,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of HourEntryIdsSchema from a dict""" if obj is None: return None @@ -80,9 +78,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "hourEntryIds": obj.get("hourEntryIds") - }) + _obj = cls.model_validate({"hourEntryIds": obj.get("hourEntryIds")}) return _obj - - diff --git a/bamboohr_sdk/models/hour_entry_patch_hour_entry_v1.py b/bamboohr_sdk/models/hour_entry_patch_hour_entry_v1.py new file mode 100644 index 0000000..cb93e2d --- /dev/null +++ b/bamboohr_sdk/models/hour_entry_patch_hour_entry_v1.py @@ -0,0 +1,114 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import date +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + + +class HourEntryPatchHourEntryV1(BaseModel): + """ + Request body for partially updating a time tracking hour entry. All fields are optional, but at least one must be provided. employeeId is not mutable. + """ + + var_date: date | None = Field( + default=None, + description="Calendar date the hours are attributed to. Must fall inside an existing pay period for the entry's employee.", + alias="date", + ) + hours: StrictFloat | StrictInt | None = Field( + default=None, description="Hours worked on this date. Must be greater than zero." + ) + note: StrictStr | None = None + project_id: StrictInt | None = Field(default=None, alias="projectId") + task_id: StrictInt | None = Field(default=None, alias="taskId") + __properties: ClassVar[list[str]] = ["date", "hours", "note", "projectId", "taskId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of HourEntryPatchHourEntryV1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if note (nullable) is None + # and model_fields_set contains the field + if self.note is None and "note" in self.model_fields_set: + _dict["note"] = None + + # set to None if project_id (nullable) is None + # and model_fields_set contains the field + if self.project_id is None and "project_id" in self.model_fields_set: + _dict["projectId"] = None + + # set to None if task_id (nullable) is None + # and model_fields_set contains the field + if self.task_id is None and "task_id" in self.model_fields_set: + _dict["taskId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of HourEntryPatchHourEntryV1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "date": obj.get("date"), + "hours": obj.get("hours"), + "note": obj.get("note"), + "projectId": obj.get("projectId"), + "taskId": obj.get("taskId"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/hour_entry_schema.py b/bamboohr_sdk/models/hour_entry_schema.py index ca3a630..ccb7d07 100644 --- a/bamboohr_sdk/models/hour_entry_schema.py +++ b/bamboohr_sdk/models/hour_entry_schema.py @@ -1,40 +1,50 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import date +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set from typing_extensions import Self + class HourEntrySchema(BaseModel): """ Schema for a single timesheet hour entry - """ # noqa: E501 - employee_id: Optional[StrictInt] = Field(default=None, description="Unique identifier for the employee", alias="employeeId") - var_date: Optional[date] = Field(default=None, description="Date for the timesheet entry. Must be in YYYY-MM-DD format", alias="date") - hours: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Hours worked for this timesheet entry") - id: Optional[StrictInt] = Field(default=None, description="The ID of an existing timesheet entry. This can be specified to edit an existing entry") - project_id: Optional[StrictInt] = Field(default=None, description="The ID of the project to associate with the timesheet entry", alias="projectId") - task_id: Optional[StrictInt] = Field(default=None, description="The ID of the task to associate with the timesheet entry", alias="taskId") - note: Optional[StrictStr] = Field(default=None, description="Optional note to associate with the timesheet entry") - __properties: ClassVar[List[str]] = ["employeeId", "date", "hours", "id", "projectId", "taskId", "note"] + """ + + employee_id: StrictInt | None = Field( + default=None, description="Unique identifier for the employee", alias="employeeId" + ) + var_date: date | None = Field( + default=None, description="Date for the timesheet entry. Must be in YYYY-MM-DD format", alias="date" + ) + hours: StrictFloat | StrictInt | None = Field(default=None, description="Hours worked for this timesheet entry") + id: StrictInt | None = Field( + default=None, + description="The ID of an existing timesheet entry. This can be specified to edit an existing entry", + ) + project_id: StrictInt | None = Field( + default=None, description="The ID of the project to associate with the timesheet entry", alias="projectId" + ) + task_id: StrictInt | None = Field( + default=None, description="The ID of the task to associate with the timesheet entry", alias="taskId" + ) + note: StrictStr | None = Field(default=None, description="Optional note to associate with the timesheet entry") + __properties: ClassVar[list[str]] = ["employeeId", "date", "hours", "id", "projectId", "taskId", "note"] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +52,6 @@ class HourEntrySchema(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,11 +62,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of HourEntrySchema from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -67,8 +76,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -78,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of HourEntrySchema from a dict""" if obj is None: return None @@ -86,15 +94,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "employeeId": obj.get("employeeId"), - "date": obj.get("date"), - "hours": obj.get("hours"), - "id": obj.get("id"), - "projectId": obj.get("projectId"), - "taskId": obj.get("taskId"), - "note": obj.get("note") - }) + _obj = cls.model_validate( + { + "employeeId": obj.get("employeeId"), + "date": obj.get("date"), + "hours": obj.get("hours"), + "id": obj.get("id"), + "projectId": obj.get("projectId"), + "taskId": obj.get("taskId"), + "note": obj.get("note"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/import_compensation_benchmarks_response.py b/bamboohr_sdk/models/import_compensation_benchmarks_response.py new file mode 100644 index 0000000..8c0f25c --- /dev/null +++ b/bamboohr_sdk/models/import_compensation_benchmarks_response.py @@ -0,0 +1,103 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.compensation_benchmarking_column_map import CompensationBenchmarkingColumnMap + + +class ImportCompensationBenchmarksResponse(BaseModel): + """ + ImportCompensationBenchmarksResponse + """ + + upload_data: list[list[StrictStr | None]] | None = Field( + default=None, description="Parsed CSV rows. Each row is an array of cell values as strings.", alias="uploadData" + ) + column_map: list[CompensationBenchmarkingColumnMap] | None = Field( + default=None, + description="Suggested mapping between expected benchmark fields and CSV column headers.", + alias="columnMap", + ) + __properties: ClassVar[list[str]] = ["uploadData", "columnMap"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of ImportCompensationBenchmarksResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in column_map (list) + _items = [] + if self.column_map: + for _item_column_map in self.column_map: + if _item_column_map: + _items.append(_item_column_map.to_dict()) + _dict["columnMap"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of ImportCompensationBenchmarksResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uploadData": obj.get("uploadData"), + "columnMap": [CompensationBenchmarkingColumnMap.from_dict(_item) for _item in obj["columnMap"]] + if obj.get("columnMap") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/industry.py b/bamboohr_sdk/models/industry.py new file mode 100644 index 0000000..705ab1d --- /dev/null +++ b/bamboohr_sdk/models/industry.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + + +class Industry(BaseModel): + """ + Industry + """ + + id: StrictInt | None = Field(default=None, description="Industry ID.") + name: StrictStr | None = Field(default=None, description="Industry name.") + __properties: ClassVar[list[str]] = ["id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of Industry from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of Industry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name")}) + return _obj diff --git a/bamboohr_sdk/models/inline_object.py b/bamboohr_sdk/models/inline_object.py new file mode 100644 index 0000000..6ddc344 --- /dev/null +++ b/bamboohr_sdk/models/inline_object.py @@ -0,0 +1,85 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class InlineObject(BaseModel): + """ + InlineObject + """ + + plan_ids: list[StrictStr] | None = Field(default=None, alias="planIds") + __properties: ClassVar[list[str]] = ["planIds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of InlineObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if plan_ids (nullable) is None + # and model_fields_set contains the field + if self.plan_ids is None and "plan_ids" in self.model_fields_set: + _dict["planIds"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of InlineObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"planIds": obj.get("planIds")}) + return _obj diff --git a/bamboohr_sdk/models/inline_object1.py b/bamboohr_sdk/models/inline_object1.py new file mode 100644 index 0000000..1c2f27d --- /dev/null +++ b/bamboohr_sdk/models/inline_object1.py @@ -0,0 +1,101 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + +from bamboohr_sdk.models.inline_object1_employees_inner import InlineObject1EmployeesInner +from bamboohr_sdk.models.inline_object1_status import InlineObject1Status + + +class InlineObject1(BaseModel): + """ + InlineObject1 + """ + + status: InlineObject1Status | None = None + employees: list[InlineObject1EmployeesInner] | None = None + __properties: ClassVar[list[str]] = ["status", "employees"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of InlineObject1 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of status + if self.status: + _dict["status"] = self.status.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in employees (list) + _items = [] + if self.employees: + for _item_employees in self.employees: + if _item_employees: + _items.append(_item_employees.to_dict()) + _dict["employees"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of InlineObject1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "status": InlineObject1Status.from_dict(obj["status"]) if obj.get("status") is not None else None, + "employees": [InlineObject1EmployeesInner.from_dict(_item) for _item in obj["employees"]] + if obj.get("employees") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/inline_object1_employees_inner.py b/bamboohr_sdk/models/inline_object1_employees_inner.py new file mode 100644 index 0000000..2e981c3 --- /dev/null +++ b/bamboohr_sdk/models/inline_object1_employees_inner.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing_extensions import Self + + +class InlineObject1EmployeesInner(BaseModel): + """ + Employees that can be synced with the integration + """ + + name: StrictStr | None = Field(default=None, description="First and last name") + id: StrictInt | None = Field(default=None, description="ID") + __properties: ClassVar[list[str]] = ["name", "id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of InlineObject1EmployeesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of InlineObject1EmployeesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"name": obj.get("name"), "id": obj.get("id")}) + return _obj diff --git a/bamboohr_sdk/models/inline_object1_status.py b/bamboohr_sdk/models/inline_object1_status.py new file mode 100644 index 0000000..5d6faf9 --- /dev/null +++ b/bamboohr_sdk/models/inline_object1_status.py @@ -0,0 +1,80 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing_extensions import Self + + +class InlineObject1Status(BaseModel): + """ + Integration status + """ + + enabled: StrictBool | None = Field(default=None, description="Integration is enabled") + __properties: ClassVar[list[str]] = ["enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of InlineObject1Status from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of InlineObject1Status from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"enabled": obj.get("enabled")}) + return _obj diff --git a/bamboohr_sdk/models/inline_object2.py b/bamboohr_sdk/models/inline_object2.py new file mode 100644 index 0000000..44f882a --- /dev/null +++ b/bamboohr_sdk/models/inline_object2.py @@ -0,0 +1,235 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class InlineObject2(BaseModel): + """ + InlineObject2 + """ + + emp_dep_first_name: StrictStr | None = Field(default=None, alias="empDepFirstName") + emp_dep_last_name: StrictStr | None = Field(default=None, alias="empDepLastName") + emp_dep_middlename: StrictStr | None = Field(default=None, alias="empDepMiddlename") + emp_dep_add1: StrictStr | None = Field(default=None, alias="empDepAdd1") + emp_dep_add2: StrictStr | None = Field(default=None, alias="empDepAdd2") + emp_dep_city: StrictStr | None = Field(default=None, alias="empDepCity") + emp_dep_relationship: StrictStr | None = Field(default=None, alias="empDepRelationship") + employee_dependent_ssn: StrictStr | None = Field(default=None, alias="employeeDependentSsn") + employee_dependent_sin: StrictStr | None = Field(default=None, alias="employeeDependentSin") + emp_dep_state: StrictStr | None = Field(default=None, alias="empDepState") + emp_dep_zip_code: StrictStr | None = Field(default=None, alias="empDepZipCode") + emp_dep_gender: StrictStr | None = Field(default=None, alias="empDepGender") + emp_dep_birthday: StrictStr | None = Field(default=None, alias="empDepBirthday") + emp_dep_ft_student: StrictStr | None = Field(default=None, alias="empDepFTStudent") + emp_dep_us_citizen: StrictStr | None = Field(default=None, alias="empDepUSCitizen") + emp_dep_home_phone: StrictStr | None = Field(default=None, alias="empDepHomePhone") + emp_dep_country: StrictStr | None = Field(default=None, alias="empDepCountry") + additional_properties: dict[str, Any] = {} + __properties: ClassVar[list[str]] = [ + "empDepFirstName", + "empDepLastName", + "empDepMiddlename", + "empDepAdd1", + "empDepAdd2", + "empDepCity", + "empDepRelationship", + "employeeDependentSsn", + "employeeDependentSin", + "empDepState", + "empDepZipCode", + "empDepGender", + "empDepBirthday", + "empDepFTStudent", + "empDepUSCitizen", + "empDepHomePhone", + "empDepCountry", + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of InlineObject2 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: set[str] = set( + [ + "additional_properties", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if emp_dep_first_name (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_first_name is None and "emp_dep_first_name" in self.model_fields_set: + _dict["empDepFirstName"] = None + + # set to None if emp_dep_last_name (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_last_name is None and "emp_dep_last_name" in self.model_fields_set: + _dict["empDepLastName"] = None + + # set to None if emp_dep_middlename (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_middlename is None and "emp_dep_middlename" in self.model_fields_set: + _dict["empDepMiddlename"] = None + + # set to None if emp_dep_add1 (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_add1 is None and "emp_dep_add1" in self.model_fields_set: + _dict["empDepAdd1"] = None + + # set to None if emp_dep_add2 (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_add2 is None and "emp_dep_add2" in self.model_fields_set: + _dict["empDepAdd2"] = None + + # set to None if emp_dep_city (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_city is None and "emp_dep_city" in self.model_fields_set: + _dict["empDepCity"] = None + + # set to None if emp_dep_relationship (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_relationship is None and "emp_dep_relationship" in self.model_fields_set: + _dict["empDepRelationship"] = None + + # set to None if employee_dependent_ssn (nullable) is None + # and model_fields_set contains the field + if self.employee_dependent_ssn is None and "employee_dependent_ssn" in self.model_fields_set: + _dict["employeeDependentSsn"] = None + + # set to None if employee_dependent_sin (nullable) is None + # and model_fields_set contains the field + if self.employee_dependent_sin is None and "employee_dependent_sin" in self.model_fields_set: + _dict["employeeDependentSin"] = None + + # set to None if emp_dep_state (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_state is None and "emp_dep_state" in self.model_fields_set: + _dict["empDepState"] = None + + # set to None if emp_dep_zip_code (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_zip_code is None and "emp_dep_zip_code" in self.model_fields_set: + _dict["empDepZipCode"] = None + + # set to None if emp_dep_gender (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_gender is None and "emp_dep_gender" in self.model_fields_set: + _dict["empDepGender"] = None + + # set to None if emp_dep_birthday (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_birthday is None and "emp_dep_birthday" in self.model_fields_set: + _dict["empDepBirthday"] = None + + # set to None if emp_dep_ft_student (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_ft_student is None and "emp_dep_ft_student" in self.model_fields_set: + _dict["empDepFTStudent"] = None + + # set to None if emp_dep_us_citizen (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_us_citizen is None and "emp_dep_us_citizen" in self.model_fields_set: + _dict["empDepUSCitizen"] = None + + # set to None if emp_dep_home_phone (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_home_phone is None and "emp_dep_home_phone" in self.model_fields_set: + _dict["empDepHomePhone"] = None + + # set to None if emp_dep_country (nullable) is None + # and model_fields_set contains the field + if self.emp_dep_country is None and "emp_dep_country" in self.model_fields_set: + _dict["empDepCountry"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of InlineObject2 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "empDepFirstName": obj.get("empDepFirstName"), + "empDepLastName": obj.get("empDepLastName"), + "empDepMiddlename": obj.get("empDepMiddlename"), + "empDepAdd1": obj.get("empDepAdd1"), + "empDepAdd2": obj.get("empDepAdd2"), + "empDepCity": obj.get("empDepCity"), + "empDepRelationship": obj.get("empDepRelationship"), + "employeeDependentSsn": obj.get("employeeDependentSsn"), + "employeeDependentSin": obj.get("employeeDependentSin"), + "empDepState": obj.get("empDepState"), + "empDepZipCode": obj.get("empDepZipCode"), + "empDepGender": obj.get("empDepGender"), + "empDepBirthday": obj.get("empDepBirthday"), + "empDepFTStudent": obj.get("empDepFTStudent"), + "empDepUSCitizen": obj.get("empDepUSCitizen"), + "empDepHomePhone": obj.get("empDepHomePhone"), + "empDepCountry": obj.get("empDepCountry"), + } + ) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/bamboohr_sdk/models/inline_object2_inner.py b/bamboohr_sdk/models/inline_object2_inner.py new file mode 100644 index 0000000..00a53a1 --- /dev/null +++ b/bamboohr_sdk/models/inline_object2_inner.py @@ -0,0 +1,107 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing_extensions import Self + + +class InlineObject2Inner(BaseModel): + """ + InlineObject2Inner + """ + + id: StrictStr | None = Field(default=None, description="Plan ID") + type: StrictStr | None = Field(default=None, description="Plan category") + name: StrictStr | None = Field(default=None, description="Plan name") + carrier_name: StrictStr | None = Field(default=None, description="Carrier name", alias="carrierName") + syncing_capabilities: list[StrictStr] | None = Field( + default=None, + description="Which integration the plan is capable of being synced with", + alias="syncingCapabilities", + ) + __properties: ClassVar[list[str]] = ["id", "type", "name", "carrierName", "syncingCapabilities"] + + @field_validator("syncing_capabilities") + def syncing_capabilities_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + for i in value: + if i not in set(["ideon", "noyo"]): + raise ValueError("each list item must be one of ('ideon', 'noyo')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of InlineObject2Inner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of InlineObject2Inner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "id": obj.get("id"), + "type": obj.get("type"), + "name": obj.get("name"), + "carrierName": obj.get("carrierName"), + "syncingCapabilities": obj.get("syncingCapabilities"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/invalid_request_error.py b/bamboohr_sdk/models/invalid_request_error.py deleted file mode 100644 index 64e550f..0000000 --- a/bamboohr_sdk/models/invalid_request_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class InvalidRequestError(BaseModel): - """ - Error details. - """ # noqa: E501 - code: StrictStr = Field(description="Error code indicating the type of validation failure. For BadPage errors, common causes include: 1) Invalid page parameter format, 2) Using the wrong paging parameter for before/after cursors, or 3) An employee on the page boundary changed between calls (for example, the employee was deleted or no longer matches the filter criteria).") - message: StrictStr = Field(description="Human-readable message describing the validation failure.") - __properties: ClassVar[List[str]] = ["code", "message"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InvalidRequestError from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InvalidRequestError from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message") - }) - return _obj - - diff --git a/bamboohr_sdk/models/job_summary.py b/bamboohr_sdk/models/job_summary.py index 7620e9a..608421f 100644 --- a/bamboohr_sdk/models/job_summary.py +++ b/bamboohr_sdk/models/job_summary.py @@ -1,49 +1,66 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime +from typing import Any, ClassVar + from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from bamboohr_sdk.models.application_details_job_title import ApplicationDetailsJobTitle -from bamboohr_sdk.models.job_summary_department import JobSummaryDepartment -from bamboohr_sdk.models.job_summary_hiring_lead import JobSummaryHiringLead -from bamboohr_sdk.models.job_summary_location import JobSummaryLocation from bamboohr_sdk.models.job_summary_status import JobSummaryStatus -from typing import Optional, Set -from typing_extensions import Self + class JobSummary(BaseModel): """ JobSummary - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Job opening ID") - title: Optional[ApplicationDetailsJobTitle] = None - posted_date: Optional[datetime] = Field(default=None, description="ISO 8601 datetime when the job opening was posted", alias="postedDate") - location: Optional[JobSummaryLocation] = None - department: Optional[JobSummaryDepartment] = None - status: Optional[JobSummaryStatus] = None - hiring_lead: Optional[JobSummaryHiringLead] = Field(default=None, alias="hiringLead") - new_applicants_count: Optional[StrictInt] = Field(default=None, description="Number of applicants in 'New' status", alias="newApplicantsCount") - active_applicants_count: Optional[StrictInt] = Field(default=None, description="Number of applicants in an active status", alias="activeApplicantsCount") - total_applicants_count: Optional[StrictInt] = Field(default=None, description="Total number of applicants", alias="totalApplicantsCount") - posting_url: Optional[StrictStr] = Field(default=None, description="Public URL for the job posting, or null if not posted", alias="postingUrl") - __properties: ClassVar[List[str]] = ["id", "title", "postedDate", "location", "department", "status", "hiringLead", "newApplicantsCount", "activeApplicantsCount", "totalApplicantsCount", "postingUrl"] + """ + + id: StrictInt | None = Field(default=None, description="Job opening ID") + title: ApplicationDetailsJobTitle | None = None + posted_date: datetime | None = Field( + default=None, description="ISO 8601 datetime when the job opening was posted", alias="postedDate" + ) + location: dict[str, Any] | None = None + department: dict[str, Any] | None = None + status: JobSummaryStatus | None = None + hiring_lead: dict[str, Any] | None = Field(default=None, alias="hiringLead") + new_applicants_count: StrictInt | None = Field( + default=None, description="Number of applicants in 'New' status", alias="newApplicantsCount" + ) + active_applicants_count: StrictInt | None = Field( + default=None, description="Number of applicants in an active status", alias="activeApplicantsCount" + ) + total_applicants_count: StrictInt | None = Field( + default=None, description="Total number of applicants", alias="totalApplicantsCount" + ) + posting_url: StrictStr | None = Field(default=None, alias="postingUrl") + __properties: ClassVar[list[str]] = [ + "id", + "title", + "postedDate", + "location", + "department", + "status", + "hiringLead", + "newApplicantsCount", + "activeApplicantsCount", + "totalApplicantsCount", + "postingUrl", + ] model_config = ConfigDict( populate_by_name=True, @@ -51,7 +68,6 @@ class JobSummary(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,11 +78,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of JobSummary from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -76,8 +92,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -86,28 +101,34 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of title if self.title: - _dict['title'] = self.title.to_dict() - # override the default output from pydantic by calling `to_dict()` of location - if self.location: - _dict['location'] = self.location.to_dict() - # override the default output from pydantic by calling `to_dict()` of department - if self.department: - _dict['department'] = self.department.to_dict() + _dict["title"] = self.title.to_dict() # override the default output from pydantic by calling `to_dict()` of status if self.status: - _dict['status'] = self.status.to_dict() - # override the default output from pydantic by calling `to_dict()` of hiring_lead - if self.hiring_lead: - _dict['hiringLead'] = self.hiring_lead.to_dict() + _dict["status"] = self.status.to_dict() + # set to None if location (nullable) is None + # and model_fields_set contains the field + if self.location is None and "location" in self.model_fields_set: + _dict["location"] = None + + # set to None if department (nullable) is None + # and model_fields_set contains the field + if self.department is None and "department" in self.model_fields_set: + _dict["department"] = None + + # set to None if hiring_lead (nullable) is None + # and model_fields_set contains the field + if self.hiring_lead is None and "hiring_lead" in self.model_fields_set: + _dict["hiringLead"] = None + # set to None if posting_url (nullable) is None # and model_fields_set contains the field if self.posting_url is None and "posting_url" in self.model_fields_set: - _dict['postingUrl'] = None + _dict["postingUrl"] = None return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of JobSummary from a dict""" if obj is None: return None @@ -115,19 +136,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "title": ApplicationDetailsJobTitle.from_dict(obj["title"]) if obj.get("title") is not None else None, - "postedDate": obj.get("postedDate"), - "location": JobSummaryLocation.from_dict(obj["location"]) if obj.get("location") is not None else None, - "department": JobSummaryDepartment.from_dict(obj["department"]) if obj.get("department") is not None else None, - "status": JobSummaryStatus.from_dict(obj["status"]) if obj.get("status") is not None else None, - "hiringLead": JobSummaryHiringLead.from_dict(obj["hiringLead"]) if obj.get("hiringLead") is not None else None, - "newApplicantsCount": obj.get("newApplicantsCount"), - "activeApplicantsCount": obj.get("activeApplicantsCount"), - "totalApplicantsCount": obj.get("totalApplicantsCount"), - "postingUrl": obj.get("postingUrl") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "title": ApplicationDetailsJobTitle.from_dict(obj["title"]) if obj.get("title") is not None else None, + "postedDate": obj.get("postedDate"), + "location": obj.get("location"), + "department": obj.get("department"), + "status": JobSummaryStatus.from_dict(obj["status"]) if obj.get("status") is not None else None, + "hiringLead": obj.get("hiringLead"), + "newApplicantsCount": obj.get("newApplicantsCount"), + "activeApplicantsCount": obj.get("activeApplicantsCount"), + "totalApplicantsCount": obj.get("totalApplicantsCount"), + "postingUrl": obj.get("postingUrl"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/job_summary_hiring_lead.py b/bamboohr_sdk/models/job_summary_hiring_lead.py deleted file mode 100644 index 398578e..0000000 --- a/bamboohr_sdk/models/job_summary_hiring_lead.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class JobSummaryHiringLead(BaseModel): - """ - The hiring lead for this job opening - """ # noqa: E501 - employee_id: Optional[StrictInt] = Field(default=None, description="Employee ID", alias="employeeId") - first_name: Optional[StrictStr] = Field(default=None, description="First name", alias="firstName") - last_name: Optional[StrictStr] = Field(default=None, description="Last name", alias="lastName") - avatar: Optional[StrictStr] = Field(default=None, description="URL to avatar image") - job_title: Optional[Dict[str, Any]] = Field(default=None, description="Hiring lead's job title", alias="jobTitle") - __properties: ClassVar[List[str]] = ["employeeId", "firstName", "lastName", "avatar", "jobTitle"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of JobSummaryHiringLead from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if avatar (nullable) is None - # and model_fields_set contains the field - if self.avatar is None and "avatar" in self.model_fields_set: - _dict['avatar'] = None - - # set to None if job_title (nullable) is None - # and model_fields_set contains the field - if self.job_title is None and "job_title" in self.model_fields_set: - _dict['jobTitle'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of JobSummaryHiringLead from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "employeeId": obj.get("employeeId"), - "firstName": obj.get("firstName"), - "lastName": obj.get("lastName"), - "avatar": obj.get("avatar"), - "jobTitle": obj.get("jobTitle") - }) - return _obj - - diff --git a/bamboohr_sdk/models/job_summary_status.py b/bamboohr_sdk/models/job_summary_status.py index 1a7fa30..83e9760 100644 --- a/bamboohr_sdk/models/job_summary_status.py +++ b/bamboohr_sdk/models/job_summary_status.py @@ -1,34 +1,33 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class JobSummaryStatus(BaseModel): """ Job opening status - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Status ID") - label: Optional[StrictStr] = Field(default=None, description="Status name") - __properties: ClassVar[List[str]] = ["id", "label"] + """ + + id: StrictInt | None = Field(default=None, description="Status ID") + label: StrictStr | None = Field(default=None, description="Status name") + __properties: ClassVar[list[str]] = ["id", "label"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,6 @@ class JobSummaryStatus(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -47,11 +45,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of JobSummaryStatus from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -61,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -72,7 +69,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of JobSummaryStatus from a dict""" if obj is None: return None @@ -80,10 +77,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "label": obj.get("label") - }) + _obj = cls.model_validate({"id": obj.get("id"), "label": obj.get("label")}) return _obj - - diff --git a/bamboohr_sdk/models/json_directory_employee.py b/bamboohr_sdk/models/json_directory_employee.py deleted file mode 100644 index a54cfe6..0000000 --- a/bamboohr_sdk/models/json_directory_employee.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.json_directory_employee_fields_inner import JsonDirectoryEmployeeFieldsInner -from typing import Optional, Set -from typing_extensions import Self - -class JsonDirectoryEmployee(BaseModel): - """ - JsonDirectoryEmployee - """ # noqa: E501 - fields: Optional[List[JsonDirectoryEmployeeFieldsInner]] = Field(default=None, description="Array of field definitions included in this directory response.") - employees: Optional[List[Dict[str, Any]]] = Field(default=None, description="Array of employee records. Each object contains keys matching the 'id' values from the 'fields' array. Common keys include: id, displayName, firstName, lastName, preferredName, jobTitle, workPhone, mobilePhone, workEmail, department, location, division, twitterFeed, pronouns, workPhoneExtension, photoUploaded, photoUrl, canUploadPhoto. Actual keys vary by company configuration.") - __properties: ClassVar[List[str]] = ["fields", "employees"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of JsonDirectoryEmployee from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in fields (list) - _items = [] - if self.fields: - for _item_fields in self.fields: - if _item_fields: - _items.append(_item_fields.to_dict()) - _dict['fields'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of JsonDirectoryEmployee from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "fields": [JsonDirectoryEmployeeFieldsInner.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None, - "employees": obj.get("employees") - }) - return _obj - - diff --git a/bamboohr_sdk/models/json_employee_files.py b/bamboohr_sdk/models/json_employee_files.py index 0093c76..bb8224a 100644 --- a/bamboohr_sdk/models/json_employee_files.py +++ b/bamboohr_sdk/models/json_employee_files.py @@ -1,36 +1,36 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Self + from bamboohr_sdk.models.json_employee_files_categories_inner import JsonEmployeeFilesCategoriesInner from bamboohr_sdk.models.json_employee_files_employee import JsonEmployeeFilesEmployee -from typing import Optional, Set -from typing_extensions import Self + class JsonEmployeeFiles(BaseModel): """ JsonEmployeeFiles - """ # noqa: E501 - employee: Optional[JsonEmployeeFilesEmployee] = None - categories: Optional[List[JsonEmployeeFilesCategoriesInner]] = None - __properties: ClassVar[List[str]] = ["employee", "categories"] + """ + + employee: JsonEmployeeFilesEmployee | None = None + categories: list[JsonEmployeeFilesCategoriesInner] | None = None + __properties: ClassVar[list[str]] = ["employee", "categories"] model_config = ConfigDict( populate_by_name=True, @@ -38,7 +38,6 @@ class JsonEmployeeFiles(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -49,11 +48,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of JsonEmployeeFiles from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -63,8 +62,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -73,18 +71,18 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of employee if self.employee: - _dict['employee'] = self.employee.to_dict() + _dict["employee"] = self.employee.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in categories (list) _items = [] if self.categories: for _item_categories in self.categories: if _item_categories: _items.append(_item_categories.to_dict()) - _dict['categories'] = _items + _dict["categories"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of JsonEmployeeFiles from a dict""" if obj is None: return None @@ -92,10 +90,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "employee": JsonEmployeeFilesEmployee.from_dict(obj["employee"]) if obj.get("employee") is not None else None, - "categories": [JsonEmployeeFilesCategoriesInner.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None - }) + _obj = cls.model_validate( + { + "employee": JsonEmployeeFilesEmployee.from_dict(obj["employee"]) + if obj.get("employee") is not None + else None, + "categories": [JsonEmployeeFilesCategoriesInner.from_dict(_item) for _item in obj["categories"]] + if obj.get("categories") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/json_employee_files_categories_inner.py b/bamboohr_sdk/models/json_employee_files_categories_inner.py index 37b0cbf..f7044d9 100644 --- a/bamboohr_sdk/models/json_employee_files_categories_inner.py +++ b/bamboohr_sdk/models/json_employee_files_categories_inner.py @@ -1,78 +1,96 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.json_employee_files_categories_inner_files_inner import JsonEmployeeFilesCategoriesInnerFilesInner -from typing import Optional, Set from typing_extensions import Self +from bamboohr_sdk.models.json_employee_files_categories_inner_files_inner import ( + JsonEmployeeFilesCategoriesInnerFilesInner, +) + + class JsonEmployeeFilesCategoriesInner(BaseModel): """ JsonEmployeeFilesCategoriesInner - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Category ID.") - name: Optional[StrictStr] = Field(default=None, description="Category display name.") - can_rename_category: Optional[StrictStr] = Field(default=None, description="Whether the caller can rename this category.", alias="canRenameCategory") - can_delete_category: Optional[StrictStr] = Field(default=None, description="Whether the caller can delete this category.", alias="canDeleteCategory") - can_upload_files: Optional[StrictStr] = Field(default=None, description="Whether the caller can upload files to this category.", alias="canUploadFiles") - display_if_empty: Optional[StrictStr] = Field(default=None, description="Whether to display the category when it has no files.", alias="displayIfEmpty") - files: Optional[List[JsonEmployeeFilesCategoriesInnerFilesInner]] = None - __properties: ClassVar[List[str]] = ["id", "name", "canRenameCategory", "canDeleteCategory", "canUploadFiles", "displayIfEmpty", "files"] - - @field_validator('can_rename_category') + """ + + id: StrictInt | None = Field(default=None, description="Category ID.") + name: StrictStr | None = Field(default=None, description="Category display name.") + can_rename_category: StrictStr | None = Field( + default=None, description="Whether the caller can rename this category.", alias="canRenameCategory" + ) + can_delete_category: StrictStr | None = Field( + default=None, description="Whether the caller can delete this category.", alias="canDeleteCategory" + ) + can_upload_files: StrictStr | None = Field( + default=None, description="Whether the caller can upload files to this category.", alias="canUploadFiles" + ) + display_if_empty: StrictStr | None = Field( + default=None, description="Whether to display the category when it has no files.", alias="displayIfEmpty" + ) + files: list[JsonEmployeeFilesCategoriesInnerFilesInner] | None = None + __properties: ClassVar[list[str]] = [ + "id", + "name", + "canRenameCategory", + "canDeleteCategory", + "canUploadFiles", + "displayIfEmpty", + "files", + ] + + @field_validator("can_rename_category") def can_rename_category_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value - @field_validator('can_delete_category') + @field_validator("can_delete_category") def can_delete_category_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value - @field_validator('can_upload_files') + @field_validator("can_upload_files") def can_upload_files_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value - @field_validator('display_if_empty') + @field_validator("display_if_empty") def display_if_empty_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value @@ -82,7 +100,6 @@ def display_if_empty_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -93,11 +110,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of JsonEmployeeFilesCategoriesInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -107,8 +124,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -121,11 +137,11 @@ def to_dict(self) -> Dict[str, Any]: for _item_files in self.files: if _item_files: _items.append(_item_files.to_dict()) - _dict['files'] = _items + _dict["files"] = _items return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of JsonEmployeeFilesCategoriesInner from a dict""" if obj is None: return None @@ -133,15 +149,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "canRenameCategory": obj.get("canRenameCategory"), - "canDeleteCategory": obj.get("canDeleteCategory"), - "canUploadFiles": obj.get("canUploadFiles"), - "displayIfEmpty": obj.get("displayIfEmpty"), - "files": [JsonEmployeeFilesCategoriesInnerFilesInner.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "canRenameCategory": obj.get("canRenameCategory"), + "canDeleteCategory": obj.get("canDeleteCategory"), + "canUploadFiles": obj.get("canUploadFiles"), + "displayIfEmpty": obj.get("displayIfEmpty"), + "files": [JsonEmployeeFilesCategoriesInnerFilesInner.from_dict(_item) for _item in obj["files"]] + if obj.get("files") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/json_employee_files_categories_inner_files_inner.py b/bamboohr_sdk/models/json_employee_files_categories_inner_files_inner.py index 2a02cf1..5fdbbe2 100644 --- a/bamboohr_sdk/models/json_employee_files_categories_inner_files_inner.py +++ b/bamboohr_sdk/models/json_employee_files_categories_inner_files_inner.py @@ -1,80 +1,108 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class JsonEmployeeFilesCategoriesInnerFilesInner(BaseModel): """ JsonEmployeeFilesCategoriesInnerFilesInner - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="File ID.") - name: Optional[StrictStr] = Field(default=None, description="File display name.") - original_file_name: Optional[StrictStr] = Field(default=None, description="Original uploaded filename.", alias="originalFileName") - size: Optional[StrictInt] = Field(default=None, description="File size in bytes.") - date_created: Optional[StrictStr] = Field(default=None, description="UTC creation timestamp in `YYYY-MM-DDTHH:MM:SS+0000` format.", alias="dateCreated") - created_by: Optional[StrictStr] = Field(default=None, description="Full name of the user who uploaded the file.", alias="createdBy") - share_with_employee: Optional[StrictStr] = Field(default=None, description="Whether the file is shared with the employee.", alias="shareWithEmployee") - can_rename_file: Optional[StrictStr] = Field(default=None, description="Whether the caller can rename this file.", alias="canRenameFile") - can_delete_file: Optional[StrictStr] = Field(default=None, description="Whether the caller can delete this file.", alias="canDeleteFile") - can_change_share_with_employee_field_value: Optional[StrictStr] = Field(default=None, description="Whether the caller can toggle the share-with-employee setting.", alias="canChangeShareWithEmployeeFieldValue") - __properties: ClassVar[List[str]] = ["id", "name", "originalFileName", "size", "dateCreated", "createdBy", "shareWithEmployee", "canRenameFile", "canDeleteFile", "canChangeShareWithEmployeeFieldValue"] - - @field_validator('share_with_employee') + """ + + id: StrictInt | None = Field(default=None, description="File ID.") + name: StrictStr | None = Field(default=None, description="File display name.") + original_file_name: StrictStr | None = Field( + default=None, description="Original uploaded filename.", alias="originalFileName" + ) + size: StrictInt | None = Field(default=None, description="File size in bytes.") + date_created: StrictStr | None = Field( + default=None, + description="UTC creation timestamp in ISO 8601 format (e.g. `2024-01-15T12:30:00+0000`).", + alias="dateCreated", + ) + created_by: StrictStr | None = Field( + default=None, description="Full name of the user who uploaded the file.", alias="createdBy" + ) + share_with_employee: StrictStr | None = Field( + default=None, description="Whether the file is shared with the employee.", alias="shareWithEmployee" + ) + can_rename_file: StrictStr | None = Field( + default=None, description="Whether the caller can rename this file.", alias="canRenameFile" + ) + can_delete_file: StrictStr | None = Field( + default=None, description="Whether the caller can delete this file.", alias="canDeleteFile" + ) + can_change_share_with_employee_field_value: StrictStr | None = Field( + default=None, + description="Whether the caller can toggle the share-with-employee setting.", + alias="canChangeShareWithEmployeeFieldValue", + ) + __properties: ClassVar[list[str]] = [ + "id", + "name", + "originalFileName", + "size", + "dateCreated", + "createdBy", + "shareWithEmployee", + "canRenameFile", + "canDeleteFile", + "canChangeShareWithEmployeeFieldValue", + ] + + @field_validator("share_with_employee") def share_with_employee_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value - @field_validator('can_rename_file') + @field_validator("can_rename_file") def can_rename_file_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value - @field_validator('can_delete_file') + @field_validator("can_delete_file") def can_delete_file_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value - @field_validator('can_change_share_with_employee_field_value') + @field_validator("can_change_share_with_employee_field_value") def can_change_share_with_employee_field_value_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['yes', 'no']): + if value not in set(["yes", "no"]): raise ValueError("must be one of enum values ('yes', 'no')") return value @@ -84,7 +112,6 @@ def can_change_share_with_employee_field_value_validate_enum(cls, value): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -95,11 +122,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of JsonEmployeeFilesCategoriesInnerFilesInner from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -109,8 +136,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -120,7 +146,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of JsonEmployeeFilesCategoriesInnerFilesInner from a dict""" if obj is None: return None @@ -128,18 +154,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "name": obj.get("name"), - "originalFileName": obj.get("originalFileName"), - "size": obj.get("size"), - "dateCreated": obj.get("dateCreated"), - "createdBy": obj.get("createdBy"), - "shareWithEmployee": obj.get("shareWithEmployee"), - "canRenameFile": obj.get("canRenameFile"), - "canDeleteFile": obj.get("canDeleteFile"), - "canChangeShareWithEmployeeFieldValue": obj.get("canChangeShareWithEmployeeFieldValue") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "name": obj.get("name"), + "originalFileName": obj.get("originalFileName"), + "size": obj.get("size"), + "dateCreated": obj.get("dateCreated"), + "createdBy": obj.get("createdBy"), + "shareWithEmployee": obj.get("shareWithEmployee"), + "canRenameFile": obj.get("canRenameFile"), + "canDeleteFile": obj.get("canDeleteFile"), + "canChangeShareWithEmployeeFieldValue": obj.get("canChangeShareWithEmployeeFieldValue"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/json_employee_files_employee.py b/bamboohr_sdk/models/json_employee_files_employee.py index f981b56..ee6f022 100644 --- a/bamboohr_sdk/models/json_employee_files_employee.py +++ b/bamboohr_sdk/models/json_employee_files_employee.py @@ -1,33 +1,32 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set from typing_extensions import Self + class JsonEmployeeFilesEmployee(BaseModel): """ JsonEmployeeFilesEmployee - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="Employee ID.") - __properties: ClassVar[List[str]] = ["id"] + """ + + id: StrictInt | None = Field(default=None, description="Employee ID.") + __properties: ClassVar[list[str]] = ["id"] model_config = ConfigDict( populate_by_name=True, @@ -35,7 +34,6 @@ class JsonEmployeeFilesEmployee(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -46,11 +44,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of JsonEmployeeFilesEmployee from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -60,8 +58,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -71,7 +68,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of JsonEmployeeFilesEmployee from a dict""" if obj is None: return None @@ -79,9 +76,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id") - }) + _obj = cls.model_validate({"id": obj.get("id")}) return _obj - - diff --git a/bamboohr_sdk/models/legacy_report_field_map_response.py b/bamboohr_sdk/models/legacy_report_field_map_response.py new file mode 100644 index 0000000..119b567 --- /dev/null +++ b/bamboohr_sdk/models/legacy_report_field_map_response.py @@ -0,0 +1,97 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + +from bamboohr_sdk.models.legacy_report_field_map_response_mappings_inner import ( + LegacyReportFieldMapResponseMappingsInner, +) + + +class LegacyReportFieldMapResponse(BaseModel): + """ + LegacyReportFieldMapResponse + """ + + mappings: list[LegacyReportFieldMapResponseMappingsInner] | None = None + __properties: ClassVar[list[str]] = ["mappings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of LegacyReportFieldMapResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in mappings (list) + _items = [] + if self.mappings: + for _item_mappings in self.mappings: + if _item_mappings: + _items.append(_item_mappings.to_dict()) + _dict["mappings"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LegacyReportFieldMapResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "mappings": [LegacyReportFieldMapResponseMappingsInner.from_dict(_item) for _item in obj["mappings"]] + if obj.get("mappings") is not None + else None + } + ) + return _obj diff --git a/bamboohr_sdk/models/legacy_report_field_map_response_mappings_inner.py b/bamboohr_sdk/models/legacy_report_field_map_response_mappings_inner.py new file mode 100644 index 0000000..ef5deb3 --- /dev/null +++ b/bamboohr_sdk/models/legacy_report_field_map_response_mappings_inner.py @@ -0,0 +1,122 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class LegacyReportFieldMapResponseMappingsInner(BaseModel): + """ + LegacyReportFieldMapResponseMappingsInner + """ + + legacy_field_id: StrictStr | None = Field( + default=None, + description="Identifier the legacy report API emitted for this field: an api alias such as `location`, or `` / `.` when the field had no alias. Numeric ids may be negative — calculated columns such as full name or length of service carry a negative id — so match them as signed integers, not as digits only.", + alias="legacyFieldId", + ) + field_name: StrictStr | None = Field( + default=None, + description="Field name this legacy identifier now maps to. Matches the key the report and dataset endpoints use in their responses, so it can be used as-is.", + alias="fieldName", + ) + field_label: StrictStr | None = Field(default=None, alias="fieldLabel") + type: StrictStr | None = None + entity_name: StrictStr | None = Field(default=None, alias="entityName") + qualifier: dict[str, Any] | None = None + __properties: ClassVar[list[str]] = ["legacyFieldId", "fieldName", "fieldLabel", "type", "entityName", "qualifier"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of LegacyReportFieldMapResponseMappingsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if field_label (nullable) is None + # and model_fields_set contains the field + if self.field_label is None and "field_label" in self.model_fields_set: + _dict["fieldLabel"] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict["type"] = None + + # set to None if entity_name (nullable) is None + # and model_fields_set contains the field + if self.entity_name is None and "entity_name" in self.model_fields_set: + _dict["entityName"] = None + + # set to None if qualifier (nullable) is None + # and model_fields_set contains the field + if self.qualifier is None and "qualifier" in self.model_fields_set: + _dict["qualifier"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LegacyReportFieldMapResponseMappingsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "legacyFieldId": obj.get("legacyFieldId"), + "fieldName": obj.get("fieldName"), + "fieldLabel": obj.get("fieldLabel"), + "type": obj.get("type"), + "entityName": obj.get("entityName"), + "qualifier": obj.get("qualifier"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/legacy_report_id_map_response.py b/bamboohr_sdk/models/legacy_report_id_map_response.py new file mode 100644 index 0000000..ed66040 --- /dev/null +++ b/bamboohr_sdk/models/legacy_report_id_map_response.py @@ -0,0 +1,95 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + +from bamboohr_sdk.models.legacy_report_id_map_response_mappings_inner import LegacyReportIDMapResponseMappingsInner + + +class LegacyReportIDMapResponse(BaseModel): + """ + LegacyReportIDMapResponse + """ + + mappings: list[LegacyReportIDMapResponseMappingsInner] | None = None + __properties: ClassVar[list[str]] = ["mappings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of LegacyReportIDMapResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in mappings (list) + _items = [] + if self.mappings: + for _item_mappings in self.mappings: + if _item_mappings: + _items.append(_item_mappings.to_dict()) + _dict["mappings"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LegacyReportIDMapResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "mappings": [LegacyReportIDMapResponseMappingsInner.from_dict(_item) for _item in obj["mappings"]] + if obj.get("mappings") is not None + else None + } + ) + return _obj diff --git a/bamboohr_sdk/models/legacy_report_id_map_response_mappings_inner.py b/bamboohr_sdk/models/legacy_report_id_map_response_mappings_inner.py new file mode 100644 index 0000000..8872c0b --- /dev/null +++ b/bamboohr_sdk/models/legacy_report_id_map_response_mappings_inner.py @@ -0,0 +1,103 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing_extensions import Self + + +class LegacyReportIDMapResponseMappingsInner(BaseModel): + """ + LegacyReportIDMapResponseMappingsInner + """ + + legacy_report_id: StrictInt | None = Field(default=None, alias="legacyReportId") + new_report_id: StrictInt | None = Field(default=None, alias="newReportId") + status: StrictStr | None = None + __properties: ClassVar[list[str]] = ["legacyReportId", "newReportId", "status"] + + @field_validator("status") + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["migrated", "notMigrated"]): + raise ValueError("must be one of enum values ('migrated', 'notMigrated')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of LegacyReportIDMapResponseMappingsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if new_report_id (nullable) is None + # and model_fields_set contains the field + if self.new_report_id is None and "new_report_id" in self.model_fields_set: + _dict["newReportId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LegacyReportIDMapResponseMappingsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "legacyReportId": obj.get("legacyReportId"), + "newReportId": obj.get("newReportId"), + "status": obj.get("status"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_column_map.py b/bamboohr_sdk/models/levels_and_bands_column_map.py new file mode 100644 index 0000000..811a4bd --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_column_map.py @@ -0,0 +1,88 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + + +class LevelsAndBandsColumnMap(BaseModel): + """ + Schema for levels and bands column map + """ + + expected_column_key: StrictStr | None = Field(default=None, alias="expectedColumnKey") + column_name: StrictStr | None = Field(default=None, description="Column name", alias="columnName") + __properties: ClassVar[list[str]] = ["expectedColumnKey", "columnName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of LevelsAndBandsColumnMap from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if expected_column_key (nullable) is None + # and model_fields_set contains the field + if self.expected_column_key is None and "expected_column_key" in self.model_fields_set: + _dict["expectedColumnKey"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LevelsAndBandsColumnMap from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"expectedColumnKey": obj.get("expectedColumnKey"), "columnName": obj.get("columnName")} + ) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_group_status_counts.py b/bamboohr_sdk/models/levels_and_bands_group_status_counts.py new file mode 100644 index 0000000..7d76ce3 --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_group_status_counts.py @@ -0,0 +1,88 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing_extensions import Self + + +class LevelsAndBandsGroupStatusCounts(BaseModel): + """ + Schema for levels and bands group status counts + """ + + draft: StrictInt | None = Field(default=None, description="Number of compensation level groups in draft status") + historic: StrictInt | None = Field( + default=None, description="Number of compensation level groups in historic status" + ) + published: StrictInt | None = Field( + default=None, description="Number of compensation level groups in published status" + ) + __properties: ClassVar[list[str]] = ["draft", "historic", "published"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of LevelsAndBandsGroupStatusCounts from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LevelsAndBandsGroupStatusCounts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"draft": obj.get("draft"), "historic": obj.get("historic"), "published": obj.get("published")} + ) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_job_title_assignment.py b/bamboohr_sdk/models/levels_and_bands_job_title_assignment.py new file mode 100644 index 0000000..1a648bb --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_job_title_assignment.py @@ -0,0 +1,81 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing_extensions import Self + + +class LevelsAndBandsJobTitleAssignment(BaseModel): + """ + Job title assignment to a level + """ + + job_title_id: StrictInt = Field(description="Job title id", alias="jobTitleId") + level_id: StrictInt = Field(description="Compensation level id", alias="levelId") + __properties: ClassVar[list[str]] = ["jobTitleId", "levelId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of LevelsAndBandsJobTitleAssignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LevelsAndBandsJobTitleAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"jobTitleId": obj.get("jobTitleId"), "levelId": obj.get("levelId")}) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_job_title_assignments_request.py b/bamboohr_sdk/models/levels_and_bands_job_title_assignments_request.py new file mode 100644 index 0000000..8ec02ca --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_job_title_assignments_request.py @@ -0,0 +1,97 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from bamboohr_sdk.models.levels_and_bands_job_title_assignment import LevelsAndBandsJobTitleAssignment + + +class LevelsAndBandsJobTitleAssignmentsRequest(BaseModel): + """ + Request to bulk assign job titles to levels + """ + + job_titles: list[LevelsAndBandsJobTitleAssignment] = Field( + description="Array of job title assignments", alias="jobTitles" + ) + __properties: ClassVar[list[str]] = ["jobTitles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of LevelsAndBandsJobTitleAssignmentsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in job_titles (list) + _items = [] + if self.job_titles: + for _item_job_titles in self.job_titles: + if _item_job_titles: + _items.append(_item_job_titles.to_dict()) + _dict["jobTitles"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LevelsAndBandsJobTitleAssignmentsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "jobTitles": [LevelsAndBandsJobTitleAssignment.from_dict(_item) for _item in obj["jobTitles"]] + if obj.get("jobTitles") is not None + else None + } + ) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_pay_band_value.py b/bamboohr_sdk/models/levels_and_bands_pay_band_value.py new file mode 100644 index 0000000..2d27f72 --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_pay_band_value.py @@ -0,0 +1,89 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing_extensions import Self + + +class LevelsAndBandsPayBandValue(BaseModel): + """ + Represents a single compensation pay band value + """ + + value: StrictFloat | StrictInt | None = None + errors: list[StrictStr] | None = Field(default=None, description="Array of validation errors for this pay band") + warnings: list[StrictStr] | None = Field(default=None, description="Array of validation warnings for this pay band") + __properties: ClassVar[list[str]] = ["value", "errors", "warnings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of LevelsAndBandsPayBandValue from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if value (nullable) is None + # and model_fields_set contains the field + if self.value is None and "value" in self.model_fields_set: + _dict["value"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LevelsAndBandsPayBandValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"value": obj.get("value"), "errors": obj.get("errors"), "warnings": obj.get("warnings")} + ) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_upload_response.py b/bamboohr_sdk/models/levels_and_bands_upload_response.py new file mode 100644 index 0000000..50662a0 --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_upload_response.py @@ -0,0 +1,101 @@ +""" +BambooHR API + +BambooHR API documentation. https://documentation.bamboohr.com/ + +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from bamboohr_sdk.models.levels_and_bands_column_map import LevelsAndBandsColumnMap + + +class LevelsAndBandsUploadResponse(BaseModel): + """ + Schema for levels and bands import upload response + """ + + upload_data: list[list[StrictStr]] | None = Field( + default=None, + description="Parsed CSV data rows. Each element is an array of raw cell strings for one row.", + alias="uploadData", + ) + column_map: list[LevelsAndBandsColumnMap] | None = Field(default=None, description="Column map", alias="columnMap") + __properties: ClassVar[list[str]] = ["uploadData", "columnMap"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of LevelsAndBandsUploadResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in column_map (list) + _items = [] + if self.column_map: + for _item_column_map in self.column_map: + if _item_column_map: + _items.append(_item_column_map.to_dict()) + _dict["columnMap"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LevelsAndBandsUploadResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "uploadData": obj.get("uploadData"), + "columnMap": [LevelsAndBandsColumnMap.from_dict(_item) for _item in obj["columnMap"]] + if obj.get("columnMap") is not None + else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/list_field_detail.py b/bamboohr_sdk/models/list_field_detail.py index ee195b0..29ccf36 100644 --- a/bamboohr_sdk/models/list_field_detail.py +++ b/bamboohr_sdk/models/list_field_detail.py @@ -1,39 +1,64 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from bamboohr_sdk.models.list_field_option import ListFieldOption -from typing import Optional, Set +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing_extensions import Self +from bamboohr_sdk.models.list_field_option import ListFieldOption + + class ListFieldDetail(BaseModel): """ A single list field and its available options. - """ # noqa: E501 - field_id: Optional[StrictStr] = Field(default=None, description="The field ID.", alias="fieldId") - name: Optional[StrictStr] = Field(default=None, description="The display name of the list field.") - alias: Optional[StrictStr] = Field(default=None, description="The API alias for the list field.") - manageable: Optional[StrictStr] = Field(default=None, description="Whether the list field options can be modified via the API. One of: yes, no.") - multiple: Optional[StrictStr] = Field(default=None, description="Whether this field supports multiple values. One of: yes, no.") - options: Optional[List[ListFieldOption]] = Field(default=None, description="The available options for this list field.") - __properties: ClassVar[List[str]] = ["fieldId", "name", "alias", "manageable", "multiple", "options"] + """ + + id: StrictInt | None = Field(default=None, description="The list ID.") + field_id: StrictInt | None = Field(default=None, description="The field ID.", alias="fieldId") + name: StrictStr | None = Field(default=None, description="The display name of the list field.") + alias: StrictStr | None = None + manageable: StrictStr | None = Field( + default=None, description="Whether the list field options can be modified via the API." + ) + multiple: StrictStr | None = Field(default=None, description="Whether this field supports multiple values.") + options: list[ListFieldOption] | None = Field( + default=None, description="The available options for this list field." + ) + __properties: ClassVar[list[str]] = ["id", "fieldId", "name", "alias", "manageable", "multiple", "options"] + + @field_validator("manageable") + def manageable_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["yes", "no"]): + raise ValueError("must be one of enum values ('yes', 'no')") + return value + + @field_validator("multiple") + def multiple_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["yes", "no"]): + raise ValueError("must be one of enum values ('yes', 'no')") + return value model_config = ConfigDict( populate_by_name=True, @@ -41,7 +66,6 @@ class ListFieldDetail(BaseModel): protected_namespaces=(), ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,11 +76,11 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of ListFieldDetail from a JSON string""" return cls.from_dict(json.loads(json_str)) - def to_dict(self) -> Dict[str, Any]: + def to_dict(self) -> dict[str, Any]: """Return the dictionary representation of the model using alias. This has the following differences from calling pydantic's @@ -66,8 +90,7 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([ - ]) + excluded_fields: set[str] = set([]) _dict = self.model_dump( by_alias=True, @@ -80,11 +103,16 @@ def to_dict(self) -> Dict[str, Any]: for _item_options in self.options: if _item_options: _items.append(_item_options.to_dict()) - _dict['options'] = _items + _dict["options"] = _items + # set to None if alias (nullable) is None + # and model_fields_set contains the field + if self.alias is None and "alias" in self.model_fields_set: + _dict["alias"] = None + return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: """Create an instance of ListFieldDetail from a dict""" if obj is None: return None @@ -92,14 +120,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "fieldId": obj.get("fieldId"), - "name": obj.get("name"), - "alias": obj.get("alias"), - "manageable": obj.get("manageable"), - "multiple": obj.get("multiple"), - "options": [ListFieldOption.from_dict(_item) for _item in obj["options"]] if obj.get("options") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "fieldId": obj.get("fieldId"), + "name": obj.get("name"), + "alias": obj.get("alias"), + "manageable": obj.get("manageable"), + "multiple": obj.get("multiple"), + "options": [ListFieldOption.from_dict(_item) for _item in obj["options"]] + if obj.get("options") is not None + else None, + } + ) return _obj - - diff --git a/bamboohr_sdk/models/list_field_option.py b/bamboohr_sdk/models/list_field_option.py index bcafbe4..648ef37 100644 --- a/bamboohr_sdk/models/list_field_option.py +++ b/bamboohr_sdk/models/list_field_option.py @@ -1,37 +1,74 @@ -# coding: utf-8 - """ - BambooHR API - - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +BambooHR API - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) +BambooHR API documentation. https://documentation.bamboohr.com/ - Do not edit the class manually. -""" # noqa: E501 +The version of the OpenAPI document: 1.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) +Do not edit the class manually. +""" from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json +from typing import Any, ClassVar -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing_extensions import Self + class ListFieldOption(BaseModel): """ A single option on a list field. - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="The option ID.") - name: Optional[StrictStr] = Field(default=None, description="The display value of the option.") - archived: Optional[StrictStr] = Field(default=None, description="Whether this option is archived. One of: yes, no.") - created_date: Optional[StrictStr] = Field(default=None, description="When the option was created, in ISO 8601 format when available.", alias="createdDate") - archived_date: Optional[StrictStr] = Field(default=None, description="When the option was archived, in ISO 8601 format when available.", alias="archivedDate") - __properties: ClassVar[List[str]] = ["id", "name", "archived", "createdDate", "archivedDate"] + """ + + id: StrictInt | None = Field(default=None, description="The option ID.") + name: StrictStr | None = Field( + default=None, + description="The display value of the option. In XML format, this is the text content of the