From 7f137e2137334545a3a953f9928b72d495358cea Mon Sep 17 00:00:00 2001 From: bhr-sdk-bot Date: Mon, 1 Jun 2026 20:23:21 +0000 Subject: [PATCH] =?UTF-8?q?[auto]=20SDK=20update=20=E2=80=94=20spec=2060e3?= =?UTF-8?q?a426b2be76e7e7ca22b44a89961068ddd29b?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .openapi-generator/FILES | 688 +- README.md | 715 +- bamboohr_sdk/__init__.py | 1642 +- bamboohr_sdk/api/__init__.py | 12 +- bamboohr_sdk/api/account_information_api.py | 2745 +- bamboohr_sdk/api/alert_api.py | 234 + bamboohr_sdk/api/alert_configurations_api.py | 940 + bamboohr_sdk/api/applicant_tracking_api.py | 2627 +- bamboohr_sdk/api/benefits_api.py | 2119 +- bamboohr_sdk/api/company_api.py | 276 + bamboohr_sdk/api/company_files_api.py | 1053 +- bamboohr_sdk/api/company_profile_api.py | 648 +- bamboohr_sdk/api/compensation_api.py | 675 + .../api/compensation_benchmarking_api.py | 2629 ++ bamboohr_sdk/api/compensation_planning_api.py | 6856 ++++ bamboohr_sdk/api/custom_reports_api.py | 463 +- bamboohr_sdk/api/datasets_api.py | 1953 +- bamboohr_sdk/api/employee_files_api.py | 1201 +- bamboohr_sdk/api/employee_verification_api.py | 1261 + bamboohr_sdk/api/employees_api.py | 1528 +- bamboohr_sdk/api/goals_api.py | 5643 ++- bamboohr_sdk/api/hours_api.py | 866 +- .../api/last_change_information_api.py | 213 +- bamboohr_sdk/api/locations_api.py | 1406 + bamboohr_sdk/api/login_api.py | 264 +- bamboohr_sdk/api/manual_api.py | 72 +- bamboohr_sdk/api/onboarding_api.py | 2839 ++ bamboohr_sdk/api/photos_api.py | 466 +- bamboohr_sdk/api/reports_api.py | 598 +- bamboohr_sdk/api/scheduling_api.py | 3587 ++ bamboohr_sdk/api/tabular_data_api.py | 1493 +- bamboohr_sdk/api/time_off_api.py | 2647 +- bamboohr_sdk/api/time_tracking_api.py | 9551 +++-- bamboohr_sdk/api/total_rewards_api.py | 1939 + bamboohr_sdk/api/training_api.py | 2275 +- bamboohr_sdk/api/webhook_events_api.py | 986 +- bamboohr_sdk/api/webhooks_api.py | 1533 +- 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/auth/__init__.py | 2 +- bamboohr_sdk/client/auth/token_manager.py | 27 +- .../client/auth/token_refresh_provider.py | 11 +- bamboohr_sdk/client/auth_builder.py | 47 +- bamboohr_sdk/client/bamboohr_client.py | 86 +- .../client/logger/secure_log_filter.py | 12 +- .../client/middleware/oauth2_middleware.py | 3 +- .../middleware/request_id_middleware.py | 7 +- bamboohr_sdk/configuration.py | 349 +- bamboohr_sdk/exceptions.py | 159 +- bamboohr_sdk/models/__init__.py | 596 +- ...5b6d5f564f805d688ff2c1e37c3990_request.py} | 63 +- ...d7871529b2a9c6612f8dd3c62192c08_request.py | 104 + .../models/add_cycle_admins_response.py | 107 + .../add_cycle_admins_response_added_inner.py | 91 + ...add_cycle_admins_response_skipped_inner.py | 96 + .../add_total_rewards_employees_request.py | 82 + .../models/adjust_time_off_balance.py | 68 +- .../adjust_time_tracking_request_schema.py | 90 +- .../models/alert_template_list_response.py | 95 + ...rt_template_list_response_alerts_inner.py} | 59 +- .../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 +- ...ssign_employees_to_break_policy_request.py | 48 +- .../assign_time_off_policies_request_inner.py | 56 +- .../models/assigned_time_off_policy.py | 65 +- .../models/assigned_time_off_policy_v11.py | 65 +- bamboohr_sdk/models/available_action.py | 50 +- .../{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 + .../models/can_create_goals_response.py | 47 +- ...f87b8e09a001b6fb81dfce6c20ab9e3_request.py | 81 + .../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 +- 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_alert_data_object.py | 237 + .../models/company_benefit_summary.py | 136 +- .../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 | 200 + ...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 | 159 + ..._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 + ...ng_cycle_complete_response_errors_inner.py | 91 + .../models/compensation_tools_data_object.py | 103 + .../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 | 60 +- .../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 | 212 + .../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 | 66 +- ...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 | 187 +- bamboohr_sdk/models/employee_file_update.py | 81 +- .../models/employee_optional_field.py | 155 + ...ion.py => employee_photo_json_response.py} | 66 +- 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 | 65 +- ...employee_time_off_policy_assignment_v11.py | 65 +- ...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 +- ...tory_xml_response_fieldset_field_inner.py} | 61 +- .../{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 | 480 + .../get_employees_employee_base_response.py | 139 + .../models/get_employees_employee_response.py | 1119 +- ..._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 | 643 +- .../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 +- 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 | 69 +- 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 | 69 +- bamboohr_sdk/models/goals_list.py | 56 +- bamboohr_sdk/models/hiring_lead.py | 56 +- .../models/hour_entries_request_schema.py | 56 +- bamboohr_sdk/models/hour_entry_ids_schema.py | 48 +- 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_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 +- ...nner.py => levels_and_bands_column_map.py} | 65 +- .../models/levels_and_bands_employee.py | 81 + ...vels_and_bands_error_warning_identifier.py | 81 + bamboohr_sdk/models/levels_and_bands_group.py | 109 + .../levels_and_bands_group_status_counts.py | 84 + .../models/levels_and_bands_job_title.py | 81 + .../levels_and_bands_job_title_assignment.py | 81 + ...and_bands_job_title_assignments_request.py | 97 + ...vels_and_bands_job_title_with_employees.py | 106 + .../levels_and_bands_job_titles_status.py | 84 + bamboohr_sdk/models/levels_and_bands_level.py | 123 + .../levels_and_bands_levels_and_bands.py | 95 + ...evels_and_bands_levels_and_bands_status.py | 113 + .../models/levels_and_bands_pay_band.py | 118 + .../models/levels_and_bands_step_status.py | 108 + .../levels_and_bands_upload_response.py | 97 + 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 +- 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 | 111 + ...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 +- .../models/monitor_field_list_fields_inner.py | 87 + ...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 + ... pay_grades_and_bands_publish_response.py} | 53 +- ..._grades_and_bands_save_levels_response.py} | 55 +- ...es_and_bands_update_job_titles_response.py | 80 + ...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/project_create_request_schema.py | 95 +- ...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_paginated_response_data_v1.py | 99 + ...roject_paginated_response_data_v1_links.py | 99 + ...t_paginated_response_data_v1_links_next.py | 80 + ...t_paginated_response_data_v1_links_prev.py | 80 + ...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 | 113 + .../project_time_tracking_project_v1.py | 157 + .../models/project_time_tracking_task_v1.py | 125 + ...t_update_time_tracking_project_task_v1.py} | 60 +- ...project_update_time_tracking_project_v1.py | 120 + bamboohr_sdk/models/province_item.py | 94 + .../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 | 62 +- ...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 | 117 + ...ling_create_scheduling_shift_request_v1.py | 170 + .../scheduling_publish_shifts_failure_v1.py | 81 + ...y => scheduling_publish_shifts_request.py} | 55 +- .../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 | 155 + .../models/scheduling_scheduling_shift_v1.py | 226 + .../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 | 119 + ...ling_update_scheduling_shift_request_v1.py | 180 + ...cation_lifecycle_email_by_user_request.py} | 71 +- .../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 +- 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 | 48 +- 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 | 63 +- bamboohr_sdk/models/time_off_request1_type.py | 51 +- .../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 | 73 +- ...eak_policy_employee_collection_v1_inner.py | 53 +- ...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 +- ...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 +- .../time_tracking_delete_response_schema.py | 50 +- .../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 +- ...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_project_with_tasks_and_employee_ids.py | 74 +- 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 +- ...ng_update_time_tracking_break_policy_v1.py | 63 +- ..._tracking_update_time_tracking_break_v1.py | 115 +- .../timesheet_entry_info_api_transformer.py | 131 +- 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 +- ...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 + .../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 +- ...ctory_employee_employees_employee_inner.py | 97 - ...ee_employees_employee_inner_field_inner.py | 89 - ...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 | 440 +- ...Ad7871529b2a9c6612f8dd3c62192c08Request.md | 30 + docs/AddCycleAdminsResponse.md | 30 + docs/AddCycleAdminsResponseAddedInner.md | 30 + docs/AddCycleAdminsResponseSkippedInner.md | 30 + docs/AddTotalRewardsEmployeesRequest.md | 29 + docs/AdjustTimeTrackingRequestSchema.md | 8 +- docs/AlertApi.md | 82 + docs/AlertConfigurationsApi.md | 321 + docs/AlertTemplateListResponse.md | 29 + docs/AlertTemplateListResponseAlertsInner.md | 31 + docs/ApplicantStatus.md | 4 +- docs/ApplicantTrackingApi.md | 10 +- 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/AssignEmployeesToBreakPolicyRequest.md | 2 +- docs/AssignTimeOffPoliciesRequestInner.md | 2 +- docs/AssignedTimeOffPolicyV11.md | 2 +- docs/AvailableAction.md | 2 +- docs/BadRequest.md | 29 - 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 | 204 +- docs/BudgetBreakdownImportResponse.md | 29 + docs/BudgetGuidelinesView.md | 34 + docs/BudgetGuidelinesWarnings.md | 31 + ...C79f9c5950f983e59d2626faa30c00a1Request.md | 30 + ...C7c32ed5278ac67e2e518bf7484a75dcRequest.md | 30 + ...Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md | 30 + docs/ClockEntrySchema.md | 2 +- docs/ClockInRequestSchema.md | 14 +- docs/CloseGoalRequest.md | 29 + docs/CompanyAlertDataObject.md | 51 + docs/CompanyApi.md | 90 + docs/CompanyBenefitSummary.md | 14 +- docs/CompanyFilesApi.md | 16 +- docs/CompanyIndustryDataObject.md | 33 + docs/CompanyProfileApi.md | 161 + docs/CompanyProfileData.md | 37 + docs/CompanyProfileDataAddress.md | 33 + docs/CompanyProfileIntegrations.md | 2 +- docs/CompensationApi.md | 236 + docs/CompensationBenchmarkDetailEmployee.md | 42 + ...ensationBenchmarkDetailEmployeeJobTitle.md | 31 + ...mpensationBenchmarkDetailEmployeeSalary.md | 30 + docs/CompensationBenchmarkDetails.md | 37 + ...ionBenchmarkDetailsBenchmarkValuesInner.md | 40 + ...ompensationBenchmarkJobLocationEmployee.md | 37 + ...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 | 870 + 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 | 2247 ++ ...CompensationPlanningCycleAdminsResponse.md | 30 + ...nPlanningCycleAdminsResponseAdminsInner.md | 38 + ...mpensationPlanningCycleCompleteResponse.md | 32 + ...lanningCycleCompleteResponseErrorsInner.md | 30 + docs/CompensationToolsDataObject.md | 33 + 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/CustomReportsApi.md | 56 +- ...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 | 429 +- 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 | 2 +- ...ployeeBenefitsInnerEmployeeBenefitInner.md | 32 +- docs/EmployeeCursorPaginationQueryObject.md | 31 + ...pendentsResponseEmployeeDependentsInner.md | 24 +- docs/EmployeeFilesApi.md | 52 +- docs/EmployeeOptionalField.md | 255 + docs/EmployeePhotoJsonResponse.md | 30 + docs/EmployeeStringCodeErrorResponseV1.md | 30 + .../EmployeeStringCodeErrorResponseV1Error.md | 30 + docs/EmployeeTableRowValue.md | 28 - docs/EmployeeTableRowValueAnyOfInner.md | 28 - docs/EmployeeTimeOffPolicyAssignmentV11.md | 2 +- ...oyeeTimeOffRequestApproverResponseInner.md | 32 + docs/EmployeeTimesheetEntryTransformer.md | 14 +- docs/EmployeeUpdatedWebhookPayloadData.md | 2 +- docs/EmployeeVerificationApi.md | 407 + 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 | 211 +- 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 | 76 + docs/GetEmployeesEmployeeBaseResponse.md | 37 + docs/GetEmployeesEmployeeResponse.md | 153 +- ...loyeesEmployeeResponseAllOfOvertimeRate.md | 31 + ...etEmployeesEmployeeResponseAllOfPayRate.md | 31 + .../GetEmployeesEmployeeResponseAllOfTeams.md | 30 + docs/GetEmployeesFilterRequestObject.md | 112 +- docs/Goal.md | 36 - docs/GoalAggregateCommentsInner.md | 4 +- docs/GoalResponse.md | 29 + docs/GoalsAggregateV12CommentsInner.md | 2 +- docs/GoalsApi.md | 722 +- docs/ImportCompensationBenchmarksResponse.md | 30 + docs/{Forbidden.md => Industry.md} | 19 +- docs/InlineObjectInner.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/LevelsAndBandsColumnMap.md | 31 + docs/LevelsAndBandsEmployee.md | 31 + docs/LevelsAndBandsErrorWarningIdentifier.md | 31 + docs/LevelsAndBandsGroup.md | 32 + docs/LevelsAndBandsGroupStatusCounts.md | 32 + docs/LevelsAndBandsJobTitle.md | 31 + docs/LevelsAndBandsJobTitleAssignment.md | 31 + ...evelsAndBandsJobTitleAssignmentsRequest.md | 30 + docs/LevelsAndBandsJobTitleWithEmployees.md | 33 + docs/LevelsAndBandsJobTitlesStatus.md | 32 + docs/LevelsAndBandsLevel.md | 35 + docs/LevelsAndBandsLevelsAndBands.md | 30 + docs/LevelsAndBandsLevelsAndBandsStatus.md | 33 + docs/LevelsAndBandsPayBand.md | 36 + docs/LevelsAndBandsStepStatus.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/LocationResponseObject.md | 36 + docs/LocationResponseObjectAddress.md | 39 + docs/LocationResponseObjectAddressCountry.md | 32 + docs/LocationResponseObjectAddressState.md | 32 + docs/LocationsApi.md | 424 + docs/LoginApi.md | 6 +- docs/LoginResponse.md | 2 +- ...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 | 967 + docs/OnboardingExperiencePublicApi.md | 35 + docs/OnboardingExperiencesListResponse.md | 29 + docs/PagedLocationResponse.md | 31 + docs/PagedResponse.md | 2 +- ...CompanyProfileCompanyInformationRequest.md | 31 + ...ProfileCompanyInformationRequestAddress.md | 34 + docs/PayGradesAndBandsPublishResponse.md | 29 + docs/PayGradesAndBandsSaveLevelsResponse.md | 29 + ...ayGradesAndBandsUpdateJobTitlesResponse.md | 29 + ...PayGradesAndBandsUpdatePayBandsResponse.md | 29 + docs/PersonInfoApiTransformer.md | 4 +- docs/PhotosApi.md | 25 +- docs/PostGoalCommentRequest.md | 29 - docs/PostGoalRequest.md | 36 - docs/PostGoalRequestMilestonesInner.md | 29 - docs/PostNewEmployee.md | 2 +- .../ProjectCreateTimeTrackingProjectTaskV1.md | 31 + docs/ProjectCreateTimeTrackingProjectV1.md | 35 + ...ctCreateTimeTrackingProjectV1TasksInner.md | 30 + docs/ProjectInfoApiTransformer.md | 2 +- docs/ProjectInfoApiTransformerTask.md | 31 - docs/ProjectPaginatedResponseDataV1.md | 31 + docs/ProjectPaginatedResponseDataV1Links.md | 31 + ...ProjectPaginatedResponseDataV1LinksNext.md | 30 + ...ProjectPaginatedResponseDataV1LinksPrev.md | 30 + docs/ProjectPaginatedResponseDataV1Meta.md | 33 + docs/ProjectPaginatedTasksResponseV1.md | 31 + docs/ProjectPaginatedTasksResponseV1Links.md | 30 + docs/ProjectPaginatedTasksResponseV1Meta.md | 32 + ...PaginatedTimeTrackingProjectsResponseV1.md | 31 + docs/ProjectTimeTrackingProjectV1.md | 40 + docs/ProjectTimeTrackingTaskV1.md | 36 + .../ProjectUpdateTimeTrackingProjectTaskV1.md | 31 + docs/ProjectUpdateTimeTrackingProjectV1.md | 36 + docs/ProvinceItem.md | 33 + 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 | 28 +- docs/RequestCustomReportFiltersLastChanged.md | 1 - docs/SaveChangeCommTemplateResponse.md | 29 + docs/SchedulingApi.md | 1160 + docs/SchedulingCreateScheduleRequestV1.md | 36 + ...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 | 40 + docs/SchedulingSchedulingShiftV1.md | 48 + 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 | 36 + ...chedulingUpdateSchedulingShiftRequestV1.md | 42 + ...VerificationLifecycleEmailByUserRequest.md | 29 + docs/SendRecommendationsResponse.md | 29 + docs/SetBreakPolicyEmployeesRequest.md | 2 +- .../SetTotalRewardsCustomDisclaimerRequest.md | 29 + docs/SetTotalRewardsOnboardingStepRequest.md | 29 + docs/StateProvinceResponseSchema.md | 4 +- docs/StateProvinceSchema.md | 8 +- docs/TableRowDeleteResponse.md | 1 + docs/TabularDataApi.md | 30 +- docs/TimeOffApi.md | 31 +- docs/TimeOffPolicy.md | 2 +- docs/TimeOffRequest1.md | 2 +- ...ffTypesAndDefaultHoursTimeOffTypesInner.md | 4 +- docs/TimeTrackingApi.md | 1308 +- ...ingBreakPolicyEmployeeCollectionV1Inner.md | 4 +- ...rackingBreakPolicySuggestionsResponseV1.md | 29 + ...estionsResponseV1SuggestedPoliciesInner.md | 32 + ...onseV1SuggestedPoliciesInnerBreaksInner.md | 33 + .../TimeTrackingBulkResponseSchemaResponse.md | 2 +- ...rUpdateTimeTrackingBreakWithoutPolicyV1.md | 10 +- ...TrackingCreateTimeTrackingBreakPolicyV1.md | 2 +- docs/TimeTrackingCreateTimeTrackingBreakV1.md | 8 +- ...ckingOffsetPaginatedResponseDataV1Links.md | 4 +- ...gOffsetPaginatedResponseDataV1LinksNext.md | 30 - ...gOffsetPaginatedResponseDataV1LinksPrev.md | 30 - 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 +- ...TrackingUpdateTimeTrackingBreakPolicyV1.md | 2 +- docs/TimeTrackingUpdateTimeTrackingBreakV1.md | 8 +- docs/TimesheetEntryInfoApiTransformer.md | 12 +- ...mesheetEntryInfoApiTransformerBreakInfo.md | 31 - docs/TimezoneListResponse.md | 2 +- docs/TotalRewardsApi.md | 624 + 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/TrainingRecord.md | 10 +- 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 +- ...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/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 | 146 +- docs/WebhooksListWebhooksInner.md | 2 +- docs/WhosOutEntry.md | 6 +- 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 | 30388 ++++++++++------ specs/spec-source.json | 6 +- test/test_alert_api.py | 47 + test/test_alert_configurations_api.py | 68 + 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_employee_verification_api.py | 75 + test/test_locations_api.py | 75 + test/test_onboarding_api.py | 124 + test/test_scheduling_api.py | 131 + test/test_total_rewards_api.py | 96 + 1104 files changed, 128298 insertions(+), 49731 deletions(-) create mode 100644 bamboohr_sdk/api/alert_api.py create mode 100644 bamboohr_sdk/api/alert_configurations_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/employee_verification_api.py create mode 100644 bamboohr_sdk/api/locations_api.py create mode 100644 bamboohr_sdk/api/onboarding_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/{create_training_type_request_due_from_hire_date_one_of.py => a05b6d5f564f805d688ff2c1e37c3990_request.py} (51%) create mode 100644 bamboohr_sdk/models/ad7871529b2a9c6612f8dd3c62192c08_request.py create mode 100644 bamboohr_sdk/models/add_cycle_admins_response.py create mode 100644 bamboohr_sdk/models/add_cycle_admins_response_added_inner.py create mode 100644 bamboohr_sdk/models/add_cycle_admins_response_skipped_inner.py create mode 100644 bamboohr_sdk/models/add_total_rewards_employees_request.py create mode 100644 bamboohr_sdk/models/alert_template_list_response.py rename bamboohr_sdk/models/{time_tracking_record_schema_shift_differential.py => alert_template_list_response_alerts_inner.py} (54%) 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 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/cf87b8e09a001b6fb81dfce6c20ab9e3_request.py create mode 100644 bamboohr_sdk/models/close_goal_request.py create mode 100644 bamboohr_sdk/models/company_alert_data_object.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 create mode 100644 bamboohr_sdk/models/compensation_planning_cycle_complete_response_errors_inner.py 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 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 rename bamboohr_sdk/models/{job_summary_location.py => employee_photo_json_response.py} (50%) 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%) rename bamboohr_sdk/models/{datasets_response_datasets_inner.py => employees_directory_xml_response_fieldset_field_inner.py} (54%) 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 delete mode 100644 bamboohr_sdk/models/goal.py create mode 100644 bamboohr_sdk/models/goal_response.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_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 rename bamboohr_sdk/models/{json_directory_employee_fields_inner.py => levels_and_bands_column_map.py} (52%) create mode 100644 bamboohr_sdk/models/levels_and_bands_employee.py create mode 100644 bamboohr_sdk/models/levels_and_bands_error_warning_identifier.py create mode 100644 bamboohr_sdk/models/levels_and_bands_group.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.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_job_title_with_employees.py create mode 100644 bamboohr_sdk/models/levels_and_bands_job_titles_status.py create mode 100644 bamboohr_sdk/models/levels_and_bands_level.py create mode 100644 bamboohr_sdk/models/levels_and_bands_levels_and_bands.py create mode 100644 bamboohr_sdk/models/levels_and_bands_levels_and_bands_status.py create mode 100644 bamboohr_sdk/models/levels_and_bands_pay_band.py create mode 100644 bamboohr_sdk/models/levels_and_bands_step_status.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 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%) create mode 100644 bamboohr_sdk/models/monitor_field_list_fields_inner.py 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 rename bamboohr_sdk/models/{forbidden.py => pay_grades_and_bands_publish_response.py} (61%) rename bamboohr_sdk/models/{dataset.py => pay_grades_and_bands_save_levels_response.py} (59%) 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_pay_bands_response.py delete mode 100644 bamboohr_sdk/models/post_goal_request.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_paginated_response_data_v1.py create mode 100644 bamboohr_sdk/models/project_paginated_response_data_v1_links.py create mode 100644 bamboohr_sdk/models/project_paginated_response_data_v1_links_next.py create mode 100644 bamboohr_sdk/models/project_paginated_response_data_v1_links_prev.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_time_tracking_project_v1.py create mode 100644 bamboohr_sdk/models/project_time_tracking_task_v1.py rename bamboohr_sdk/models/{application_details_applicant_education_level.py => project_update_time_tracking_project_task_v1.py} (52%) 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/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 rename bamboohr_sdk/models/{post_goal_request_milestones_inner.py => scheduling_publish_shifts_request.py} (59%) 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_v1.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 rename bamboohr_sdk/models/{data_request_aggregations_inner.py => send_employee_verification_lifecycle_email_by_user_request.py} (51%) 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/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 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 delete mode 100644 bamboohr_sdk/models/time_tracking_record_schema_project.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/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/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 delete mode 100644 bamboohr_sdk/models/xml_directory_employee_employees_employee_inner.py delete mode 100644 bamboohr_sdk/models/xml_directory_employee_employees_employee_inner_field_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/Ad7871529b2a9c6612f8dd3c62192c08Request.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/AlertApi.md create mode 100644 docs/AlertConfigurationsApi.md create mode 100644 docs/AlertTemplateListResponse.md create mode 100644 docs/AlertTemplateListResponseAlertsInner.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 delete mode 100644 docs/BadRequest.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/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md create mode 100644 docs/CloseGoalRequest.md create mode 100644 docs/CompanyAlertDataObject.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/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 create mode 100644 docs/EmployeeCursorPaginationQueryObject.md 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 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 delete mode 100644 docs/Goal.md create mode 100644 docs/GoalResponse.md create mode 100644 docs/ImportCompensationBenchmarksResponse.md rename docs/{Forbidden.md => Industry.md} (50%) create mode 100644 docs/InlineObjectInner.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 create mode 100644 docs/LevelsAndBandsColumnMap.md create mode 100644 docs/LevelsAndBandsEmployee.md create mode 100644 docs/LevelsAndBandsErrorWarningIdentifier.md create mode 100644 docs/LevelsAndBandsGroup.md create mode 100644 docs/LevelsAndBandsGroupStatusCounts.md create mode 100644 docs/LevelsAndBandsJobTitle.md create mode 100644 docs/LevelsAndBandsJobTitleAssignment.md create mode 100644 docs/LevelsAndBandsJobTitleAssignmentsRequest.md create mode 100644 docs/LevelsAndBandsJobTitleWithEmployees.md create mode 100644 docs/LevelsAndBandsJobTitlesStatus.md create mode 100644 docs/LevelsAndBandsLevel.md create mode 100644 docs/LevelsAndBandsLevelsAndBands.md create mode 100644 docs/LevelsAndBandsLevelsAndBandsStatus.md create mode 100644 docs/LevelsAndBandsPayBand.md create mode 100644 docs/LevelsAndBandsStepStatus.md create mode 100644 docs/LevelsAndBandsUploadResponse.md create mode 100644 docs/ListFieldValuesXml.md create mode 100644 docs/ListFieldValuesXmlOptionInner.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/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/PayGradesAndBandsPublishResponse.md create mode 100644 docs/PayGradesAndBandsSaveLevelsResponse.md create mode 100644 docs/PayGradesAndBandsUpdateJobTitlesResponse.md create mode 100644 docs/PayGradesAndBandsUpdatePayBandsResponse.md delete mode 100644 docs/PostGoalCommentRequest.md delete mode 100644 docs/PostGoalRequest.md delete mode 100644 docs/PostGoalRequestMilestonesInner.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/ProjectPaginatedResponseDataV1.md create mode 100644 docs/ProjectPaginatedResponseDataV1Links.md create mode 100644 docs/ProjectPaginatedResponseDataV1LinksNext.md create mode 100644 docs/ProjectPaginatedResponseDataV1LinksPrev.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/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/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/SchedulingSchedulingShiftV1.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/TimeTrackingBreakPolicySuggestionsResponseV1.md create mode 100644 docs/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner.md create mode 100644 docs/TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner.md delete mode 100644 docs/TimeTrackingOffsetPaginatedResponseDataV1LinksNext.md delete mode 100644 docs/TimeTrackingOffsetPaginatedResponseDataV1LinksPrev.md delete mode 100644 docs/TimeTrackingRecordSchemaProject.md delete mode 100644 docs/TimeTrackingRecordSchemaProjectTask.md delete mode 100644 docs/TimeTrackingRecordSchemaShiftDifferential.md delete mode 100644 docs/TimesheetEntryInfoApiTransformerBreakInfo.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/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/UpdatedCompensationBenchmark.md create mode 100644 docs/UpdatedCompensationBenchmarkSavedBenchmark.md create mode 100644 docs/UploadEmployeePhotoRequest1.md create mode 100644 docs/UserPermissionData.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_alert_api.py create mode 100644 test/test_alert_configurations_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_employee_verification_api.py create mode 100644 test/test_locations_api.py create mode 100644 test/test_onboarding_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..64e7408 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,26 +1,36 @@ -.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/alert_api.py +bamboohr_sdk/api/alert_configurations_api.py bamboohr_sdk/api/applicant_tracking_api.py bamboohr_sdk/api/benefits_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_reports_api.py bamboohr_sdk/api/datasets_api.py bamboohr_sdk/api/employee_files_api.py +bamboohr_sdk/api/employee_verification_api.py bamboohr_sdk/api/employees_api.py bamboohr_sdk/api/goals_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/onboarding_api.py bamboohr_sdk/api/photos_api.py bamboohr_sdk/api/reports_api.py +bamboohr_sdk/api/scheduling_api.py bamboohr_sdk/api/tabular_data_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,27 +39,28 @@ 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/ad7871529b2a9c6612f8dd3c62192c08_request.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_template_list_response.py +bamboohr_sdk/models/alert_template_list_response_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 @@ -61,14 +72,21 @@ bamboohr_sdk/models/assign_time_off_policies_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/can_create_goals_response.py +bamboohr_sdk/models/cf87b8e09a001b6fb81dfce6c20ab9e3_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 @@ -80,6 +98,8 @@ 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_alert_data_object.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 +107,98 @@ 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/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 +207,69 @@ 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/goal_aggregate.py bamboohr_sdk/models/goal_aggregate_aligns_with_options_inner.py bamboohr_sdk/models/goal_aggregate_comments_inner.py @@ -175,6 +282,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 @@ -187,27 +295,45 @@ bamboohr_sdk/models/hiring_lead.py bamboohr_sdk/models/hour_entries_request_schema.py bamboohr_sdk/models/hour_entry_ids_schema.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_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/levels_and_bands_column_map.py +bamboohr_sdk/models/levels_and_bands_employee.py +bamboohr_sdk/models/levels_and_bands_error_warning_identifier.py +bamboohr_sdk/models/levels_and_bands_group.py +bamboohr_sdk/models/levels_and_bands_group_status_counts.py +bamboohr_sdk/models/levels_and_bands_job_title.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_job_title_with_employees.py +bamboohr_sdk/models/levels_and_bands_job_titles_status.py +bamboohr_sdk/models/levels_and_bands_level.py +bamboohr_sdk/models/levels_and_bands_levels_and_bands.py +bamboohr_sdk/models/levels_and_bands_levels_and_bands_status.py +bamboohr_sdk/models/levels_and_bands_pay_band.py +bamboohr_sdk/models/levels_and_bands_step_status.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/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 +352,67 @@ 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_publish_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_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/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_paginated_response_data_v1.py +bamboohr_sdk/models/project_paginated_response_data_v1_links.py +bamboohr_sdk/models/project_paginated_response_data_v1_links_next.py +bamboohr_sdk/models/project_paginated_response_data_v1_links_prev.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_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/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,7 +422,32 @@ 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_v1.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/state.py bamboohr_sdk/models/state_province_response_schema.py @@ -282,6 +473,9 @@ 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_create_or_update_time_tracking_break_without_policy_v1.py @@ -291,8 +485,6 @@ bamboohr_sdk/models/time_tracking_delete_response_schema.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_paginated_break_assessments_response_v1.py bamboohr_sdk/models/time_tracking_paginated_break_policies_response_v1.py @@ -301,9 +493,6 @@ bamboohr_sdk/models/time_tracking_paginated_breaks_response_v1.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 @@ -315,30 +504,76 @@ bamboohr_sdk/models/time_tracking_time_tracking_break_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/timesheet_entry_info_api_transformer.py -bamboohr_sdk/models/timesheet_entry_info_api_transformer_break_info.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/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_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,40 +597,37 @@ 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/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/Ad7871529b2a9c6612f8dd3c62192c08Request.md +docs/AddCycleAdminsResponse.md +docs/AddCycleAdminsResponseAddedInner.md +docs/AddCycleAdminsResponseSkippedInner.md +docs/AddTotalRewardsEmployeesRequest.md docs/AdjustTimeOffBalance.md docs/AdjustTimeTrackingRequestSchema.md +docs/AlertApi.md +docs/AlertConfigurationsApi.md +docs/AlertTemplateListResponse.md +docs/AlertTemplateListResponseAlertsInner.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 @@ -407,15 +639,22 @@ docs/AssignTimeOffPoliciesRequestInner.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/CanCreateGoalsResponse.md +docs/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md docs/ChangedEmployeeIdsResponse.md docs/ChangedEmployeeIdsResponseEmployeesValue.md docs/ChangedEmployeeTableDataResponse.md @@ -427,6 +666,9 @@ docs/ClockEntryIdsSchema.md docs/ClockEntrySchema.md docs/ClockInRequestSchema.md docs/ClockOutRequestSchema.md +docs/CloseGoalRequest.md +docs/CompanyAlertDataObject.md +docs/CompanyApi.md docs/CompanyBenefitSummary.md docs/CompanyBenefitsListResponse.md docs/CompanyDeletedWebhookPayload.md @@ -435,42 +677,104 @@ 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/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 +783,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 +791,64 @@ 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/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/GoalAggregate.md docs/GoalAggregateAlignsWithOptionsInner.md docs/GoalAggregateCommentsInner.md @@ -528,6 +861,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 @@ -542,28 +876,47 @@ docs/HourEntriesRequestSchema.md docs/HourEntryIdsSchema.md docs/HourEntrySchema.md docs/HoursApi.md -docs/InvalidRequest.md -docs/InvalidRequestError.md +docs/ImportCompensationBenchmarksResponse.md +docs/Industry.md +docs/InlineObjectInner.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/LevelsAndBandsColumnMap.md +docs/LevelsAndBandsEmployee.md +docs/LevelsAndBandsErrorWarningIdentifier.md +docs/LevelsAndBandsGroup.md +docs/LevelsAndBandsGroupStatusCounts.md +docs/LevelsAndBandsJobTitle.md +docs/LevelsAndBandsJobTitleAssignment.md +docs/LevelsAndBandsJobTitleAssignmentsRequest.md +docs/LevelsAndBandsJobTitleWithEmployees.md +docs/LevelsAndBandsJobTitlesStatus.md +docs/LevelsAndBandsLevel.md +docs/LevelsAndBandsLevelsAndBands.md +docs/LevelsAndBandsLevelsAndBandsStatus.md +docs/LevelsAndBandsPayBand.md +docs/LevelsAndBandsStepStatus.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/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 @@ -583,28 +936,69 @@ 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/PayGradesAndBandsPublishResponse.md +docs/PayGradesAndBandsSaveLevelsResponse.md +docs/PayGradesAndBandsUpdateJobTitlesResponse.md +docs/PayGradesAndBandsUpdatePayBandsResponse.md docs/PersonInfoApiTransformer.md docs/PhotosApi.md -docs/PostGoalCommentRequest.md -docs/PostGoalRequest.md -docs/PostGoalRequestMilestonesInner.md docs/PostNewEmployee.md docs/ProblemDetailsResponse.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/ProjectPaginatedResponseDataV1.md +docs/ProjectPaginatedResponseDataV1Links.md +docs/ProjectPaginatedResponseDataV1LinksNext.md +docs/ProjectPaginatedResponseDataV1LinksPrev.md +docs/ProjectPaginatedResponseDataV1Meta.md +docs/ProjectPaginatedTasksResponseV1.md +docs/ProjectPaginatedTasksResponseV1Links.md +docs/ProjectPaginatedTasksResponseV1Meta.md +docs/ProjectPaginatedTimeTrackingProjectsResponseV1.md +docs/ProjectTimeTrackingProjectV1.md +docs/ProjectTimeTrackingTaskV1.md +docs/ProjectUpdateTimeTrackingProjectTaskV1.md +docs/ProjectUpdateTimeTrackingProjectV1.md +docs/ProvinceItem.md +docs/PutCompanyIndustryCodesRequest.md +docs/PutCompanyProfileDisplayNameRequest.md +docs/RemoveCycleAdminSelfResponse.md +docs/RemoveTotalRewardsEmployeesRequest.md docs/Report.md docs/ReportsApi.md docs/ReportsResponse.md @@ -615,7 +1009,33 @@ 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/SchedulingSchedulingShiftV1.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/State.md docs/StateProvinceResponseSchema.md @@ -644,6 +1064,9 @@ 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/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md @@ -653,8 +1076,6 @@ docs/TimeTrackingDeleteResponseSchema.md docs/TimeTrackingIdResponseSchema.md docs/TimeTrackingOffsetPaginatedResponseDataV1.md docs/TimeTrackingOffsetPaginatedResponseDataV1Links.md -docs/TimeTrackingOffsetPaginatedResponseDataV1LinksNext.md -docs/TimeTrackingOffsetPaginatedResponseDataV1LinksPrev.md docs/TimeTrackingOffsetPaginatedResponseDataV1Meta.md docs/TimeTrackingPaginatedBreakAssessmentsResponseV1.md docs/TimeTrackingPaginatedBreakPoliciesResponseV1.md @@ -663,9 +1084,6 @@ docs/TimeTrackingPaginatedBreaksResponseV1.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 @@ -677,9 +1095,29 @@ docs/TimeTrackingTimeTrackingBreakV1.md docs/TimeTrackingUpdateTimeTrackingBreakPolicyV1.md docs/TimeTrackingUpdateTimeTrackingBreakV1.md docs/TimesheetEntryInfoApiTransformer.md -docs/TimesheetEntryInfoApiTransformerBreakInfo.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 +1125,48 @@ 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/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/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 +1192,19 @@ 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/XmlEmployeeFiles.md docs/XmlEmployeeFilesCategoryInner.md docs/XmlEmployeeFilesCategoryInnerFileInner.md test-requirements.txt test/__init__.py +test/test_alert_api.py +test/test_alert_configurations_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_employee_verification_api.py +test/test_locations_api.py +test/test_onboarding_api.py +test/test_scheduling_api.py +test/test_total_rewards_api.py diff --git a/README.md b/README.md index af5f9bd..4f34baf 100644 --- a/README.md +++ b/README.md @@ -102,14 +102,24 @@ 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_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_fields**](docs/AccountInformationApi.md#list_fields) | **GET** /api/v1/meta/fields | List Fields *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 +*AlertApi* | [**call_0f0dcb585e5883175b6557c16cf6755a**](docs/AlertApi.md#call_0f0dcb585e5883175b6557c16cf6755a) | **GET** /api/v1/alerts | List alert templates +*AlertConfigurationsApi* | [**a05e93bc2eb9c39a40fbd71e6e07f3c6**](docs/AlertConfigurationsApi.md#a05e93bc2eb9c39a40fbd71e6e07f3c6) | **POST** /api/v1/alert-configurations | Create an alert configuration +*AlertConfigurationsApi* | [**call_14e66bfb5f075043221ce1e843c97493**](docs/AlertConfigurationsApi.md#call_14e66bfb5f075043221ce1e843c97493) | **GET** /api/v1/alert-configurations/{id} | Get an alert configuration +*AlertConfigurationsApi* | [**call_6d0a073cbf3e97fe0409de42c68fe779**](docs/AlertConfigurationsApi.md#call_6d0a073cbf3e97fe0409de42c68fe779) | **GET** /api/v1/alert-configurations | List alert configurations +*AlertConfigurationsApi* | [**eb42aa2fa339ba5c08b147fc13c6a79e**](docs/AlertConfigurationsApi.md#eb42aa2fa339ba5c08b147fc13c6a79e) | **PUT** /api/v1/alert-configurations/{id} | Update an 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,93 +132,222 @@ 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 +*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 +*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) +*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 +*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 *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_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_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_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 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_v1_1**](docs/GoalsApi.md#update_goal_v1_1) | **PUT** /api/v1_1/performance/employees/{employeeId}/goals/{goalId} | Update Goal (v1.1) *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 +*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 *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* | [**a05e93bc2eb9c39a40fbd71e6e07f3c6**](docs/PublicAPIApi.md#a05e93bc2eb9c39a40fbd71e6e07f3c6) | **POST** /api/v1/alert-configurations | Create an alert configuration +*PublicAPIApi* | [**a6b8da1348a3151fe95adc03aaf64447**](docs/PublicAPIApi.md#a6b8da1348a3151fe95adc03aaf64447) | **GET** /api/v1/compensation/planning_cycles/{id}/employees | List employees in compensation planning cycle +*PublicAPIApi* | [**ad7871529b2a9c6612f8dd3c62192c08**](docs/PublicAPIApi.md#ad7871529b2a9c6612f8dd3c62192c08) | **PUT** /api/v1/pay-grades-and-bands/pay-bands | Update pay bands +*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* | [**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* | [**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* | [**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_0da9c9f851462d2e44dfe866b8e67e74**](docs/PublicAPIApi.md#call_0da9c9f851462d2e44dfe866b8e67e74) | **DELETE** /api/v1/pay-grades-and-bands/levels/{segment} | Delete groups by status or delete one level +*PublicAPIApi* | [**call_0f0dcb585e5883175b6557c16cf6755a**](docs/PublicAPIApi.md#call_0f0dcb585e5883175b6557c16cf6755a) | **GET** /api/v1/alerts | List alert templates +*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_12c40475623893cf0434b3ae69e36975**](docs/PublicAPIApi.md#call_12c40475623893cf0434b3ae69e36975) | **GET** /api/v1/pay-grades-and-bands/review | Get levels and bands review data +*PublicAPIApi* | [**call_14e66bfb5f075043221ce1e843c97493**](docs/PublicAPIApi.md#call_14e66bfb5f075043221ce1e843c97493) | **GET** /api/v1/alert-configurations/{id} | Get an alert configuration +*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_22932a81ba129f22114ccdef397af933**](docs/PublicAPIApi.md#call_22932a81ba129f22114ccdef397af933) | **POST** /api/v1/pay-grades-and-bands/publish | Publish draft compensation level groups +*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_2a0b847ceec3a4f9bfe20cf27e10e81a**](docs/PublicAPIApi.md#call_2a0b847ceec3a4f9bfe20cf27e10e81a) | **PUT** /api/v1/pay-grades-and-bands/job-titles | Update job title level assignments +*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_3af7d1ac36c35008b8ebb93fecbdb35b**](docs/PublicAPIApi.md#call_3af7d1ac36c35008b8ebb93fecbdb35b) | **GET** /api/v1/pay-grades-and-bands/job-titles-with-employees | List job titles with employees +*PublicAPIApi* | [**call_432e469fe5959a6ccd765d02018e7db4**](docs/PublicAPIApi.md#call_432e469fe5959a6ccd765d02018e7db4) | **PUT** /api/v1/pay-grades-and-bands/levels | Save compensation level groups and levels +*PublicAPIApi* | [**call_4acdbb25aa278f9f94b44b42ef9f1b27**](docs/PublicAPIApi.md#call_4acdbb25aa278f9f94b44b42ef9f1b27) | **GET** /api/v1/pay-grades-and-bands/job-titles | Get job titles and level assignments +*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_6d0a073cbf3e97fe0409de42c68fe779**](docs/PublicAPIApi.md#call_6d0a073cbf3e97fe0409de42c68fe779) | **GET** /api/v1/alert-configurations | List alert configurations +*PublicAPIApi* | [**call_6fbb2fe60e374d2204f1222252105945**](docs/PublicAPIApi.md#call_6fbb2fe60e374d2204f1222252105945) | **GET** /api/v1/pay-grades-and-bands/status | Get levels and bands status +*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_99b887959832c80eead3a176acc0c2d4**](docs/PublicAPIApi.md#call_99b887959832c80eead3a176acc0c2d4) | **GET** /api/v1/pay-grades-and-bands/status-counts | Get compensation level group status counts +*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* | [**cdd8659ca89fb38042fd56feab507edf**](docs/PublicAPIApi.md#cdd8659ca89fb38042fd56feab507edf) | **POST** /api/v1/pay-grades-and-bands/import | Import levels and bands from CSV +*PublicAPIApi* | [**cf87b8e09a001b6fb81dfce6c20ab9e3**](docs/PublicAPIApi.md#cf87b8e09a001b6fb81dfce6c20ab9e3) | **PUT** /api/v1/compensation/planning_cycles/{id}/approvals/{templateId} | Update approval flow +*PublicAPIApi* | [**cfacff2b34cf1e65ccd1ab188c5e1d12**](docs/PublicAPIApi.md#cfacff2b34cf1e65ccd1ab188c5e1d12) | **GET** /api/v1/pay-grades-and-bands | Get published levels and bands +*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* | [**close_goal**](docs/PublicAPIApi.md#close_goal) | **POST** /api/v1/performance/employees/{employeeId}/goals/{goalId}/close | Close Goal *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_company_file_category**](docs/PublicAPIApi.md#create_company_file_category) | **POST** /api/v1/files/categories | Create Company File Category +*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_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_project**](docs/PublicAPIApi.md#create_project) | **POST** /api/v1/time-tracking/projects | Create Time Tracking Project +*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_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_time_off_history**](docs/PublicAPIApi.md#create_time_off_history) | **PUT** /api/v1/employees/{employeeId}/time_off/history | Create Time Off History Item @@ -220,26 +359,49 @@ Class | Method | HTTP request | Description *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* | [**db8c61787c931b69afbf9e501be85256**](docs/PublicAPIApi.md#db8c61787c931b69afbf9e501be85256) | **GET** /api/v1/pay-grades-and-bands/levels | List compensation level groups and levels *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_company_file**](docs/PublicAPIApi.md#delete_company_file) | **DELETE** /api/v1/files/{fileId} | Delete Company File +*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_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_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_task**](docs/PublicAPIApi.md#delete_task) | **DELETE** /api/v1/time-tracking/tasks/{id} | Delete Time Tracking Task *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_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* | [**eb42aa2fa339ba5c08b147fc13c6a79e**](docs/PublicAPIApi.md#eb42aa2fa339ba5c08b147fc13c6a79e) | **PUT** /api/v1/alert-configurations/{id} | Update an alert configuration +*PublicAPIApi* | [**ec1ba8e76f33960b018d0d7518fe97b5**](docs/PublicAPIApi.md#ec1ba8e76f33960b018d0d7518fe97b5) | **POST** /api/v1/new-hire-packets | Create new hire packet +*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* | [**fb29d4d4790104b6892a4b6d6db67e19**](docs/PublicAPIApi.md#fb29d4d4790104b6892a4b6d6db67e19) | **GET** /api/v1/pay-grades-and-bands/pay-bands | Get pay bands for levels +*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_bank_holidays**](docs/PublicAPIApi.md#get_bank_holidays) | **GET** /api/v1/meta/bank-holidays | List bank holidays *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_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_company_file**](docs/PublicAPIApi.md#get_company_file) | **GET** /api/v1/files/{fileId} | Get Company File @@ -247,42 +409,49 @@ Class | Method | HTTP request | Description *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_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_currency_conversions**](docs/PublicAPIApi.md#get_currency_conversions) | **GET** /api/v1/meta/currency-conversions | Get currency conversion rates +*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_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_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_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 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_industries**](docs/PublicAPIApi.md#get_industries) | **GET** /api/v1/meta/industries | Get Industries *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_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_meta_country_by_id**](docs/PublicAPIApi.md#get_meta_country_by_id) | **GET** /api/v1/meta/countries/{id} | Get country by ID +*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/{projectId} | Get Time Tracking Project +*PublicAPIApi* | [**get_report_by_id**](docs/PublicAPIApi.md#get_report_by_id) | **GET** /api/v1/custom-reports/{reportId} | Get Report by ID +*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_record**](docs/PublicAPIApi.md#get_time_tracking_record) | **GET** /api/v1/timetracking/record/{id} | Get Time Tracking Record +*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_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 @@ -291,6 +460,10 @@ Class | Method | HTTP request | Description *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_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_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_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 @@ -299,10 +472,18 @@ Class | Method | HTTP request | Description *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_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_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_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 @@ -312,35 +493,62 @@ Class | Method | HTTP request | Description *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* | [**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* | [**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_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* | [**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_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* | [**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_company_file**](docs/PublicAPIApi.md#update_company_file) | **POST** /api/v1/files/{fileId} | Update Company File +*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_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_v1_1**](docs/PublicAPIApi.md#update_goal_v1_1) | **PUT** /api/v1_1/performance/employees/{employeeId}/goals/{goalId} | Update Goal (v1.1) *PublicAPIApi* | [**update_list_field_values**](docs/PublicAPIApi.md#update_list_field_values) | **PUT** /api/v1/meta/lists/{listFieldId} | Update List Field Values +*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_project**](docs/PublicAPIApi.md#update_project) | **PATCH** /api/v1/time-tracking/projects/{id} | Update Time Tracking Project *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_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_record**](docs/PublicAPIApi.md#update_time_tracking_record) | **PUT** /api/v1/timetracking/adjust | Update Hour Record *PublicAPIApi* | [**update_training_category**](docs/PublicAPIApi.md#update_training_category) | **PUT** /api/v1/training/category/{trainingCategoryId} | Update Training Category @@ -351,6 +559,19 @@ Class | Method | HTTP request | Description *PublicAPIApi* | [**upload_employee_photo**](docs/PublicAPIApi.md#upload_employee_photo) | **POST** /api/v1/employees/{employeeId}/photo | Upload Employee Photo *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 +*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_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 *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 @@ -376,21 +597,30 @@ Class | Method | HTTP request | Description *TimeTrackingApi* | [**create_break_policy**](docs/TimeTrackingApi.md#create_break_policy) | **POST** /api/v1/time-tracking/break-policies | Create Break Policy *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_project**](docs/TimeTrackingApi.md#create_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_time_tracking_project**](docs/TimeTrackingApi.md#create_time_tracking_project) | **POST** /api/v1/time_tracking/projects | Create Time Tracking Project *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_project**](docs/TimeTrackingApi.md#delete_project) | **DELETE** /api/v1/time-tracking/projects/{id} | Delete Time Tracking Project +*TimeTrackingApi* | [**delete_task**](docs/TimeTrackingApi.md#delete_task) | **DELETE** /api/v1/time-tracking/tasks/{id} | Delete Time Tracking Task *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* | [**get_break_policy_suggestions**](docs/TimeTrackingApi.md#get_break_policy_suggestions) | **POST** /api/v1/time-tracking/break-policies/suggestions | Get Break Policy Suggestions +*TimeTrackingApi* | [**get_project**](docs/TimeTrackingApi.md#get_project) | **GET** /api/v1/time-tracking/projects/{projectId} | Get Time Tracking Project +*TimeTrackingApi* | [**get_task**](docs/TimeTrackingApi.md#get_task) | **GET** /api/v1/time-tracking/tasks/{id} | Get Time Tracking Task *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* | [**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_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 @@ -398,6 +628,16 @@ Class | Method | HTTP request | Description *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* | [**update_project**](docs/TimeTrackingApi.md#update_project) | **PATCH** /api/v1/time-tracking/projects/{id} | Update Time Tracking Project +*TimeTrackingApi* | [**update_task**](docs/TimeTrackingApi.md#update_task) | **PATCH** /api/v1/time-tracking/tasks/{id} | Update Time Tracking Task +*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,37 +652,38 @@ 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) +- [Ad7871529b2a9c6612f8dd3c62192c08Request](docs/Ad7871529b2a9c6612f8dd3c62192c08Request.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) +- [AlertTemplateListResponse](docs/AlertTemplateListResponse.md) +- [AlertTemplateListResponseAlertsInner](docs/AlertTemplateListResponseAlertsInner.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) @@ -454,14 +695,21 @@ Class | Method | HTTP request | Description - [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) - [CanCreateGoalsResponse](docs/CanCreateGoalsResponse.md) +- [Cf87b8e09a001b6fb81dfce6c20ab9e3Request](docs/Cf87b8e09a001b6fb81dfce6c20ab9e3Request.md) - [ChangedEmployeeIdsResponse](docs/ChangedEmployeeIdsResponse.md) - [ChangedEmployeeIdsResponseEmployeesValue](docs/ChangedEmployeeIdsResponseEmployeesValue.md) - [ChangedEmployeeTableDataResponse](docs/ChangedEmployeeTableDataResponse.md) @@ -473,6 +721,8 @@ Class | Method | HTTP request | Description - [ClockEntrySchema](docs/ClockEntrySchema.md) - [ClockInRequestSchema](docs/ClockInRequestSchema.md) - [ClockOutRequestSchema](docs/ClockOutRequestSchema.md) +- [CloseGoalRequest](docs/CloseGoalRequest.md) +- [CompanyAlertDataObject](docs/CompanyAlertDataObject.md) - [CompanyBenefitSummary](docs/CompanyBenefitSummary.md) - [CompanyBenefitsListResponse](docs/CompanyBenefitsListResponse.md) - [CompanyDeletedWebhookPayload](docs/CompanyDeletedWebhookPayload.md) @@ -480,39 +730,98 @@ 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) +- [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 +830,69 @@ 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) - [GoalAggregate](docs/GoalAggregate.md) - [GoalAggregateAlignsWithOptionsInner](docs/GoalAggregateAlignsWithOptionsInner.md) - [GoalAggregateCommentsInner](docs/GoalAggregateCommentsInner.md) @@ -568,6 +905,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) @@ -580,27 +918,45 @@ Class | Method | HTTP request | Description - [HourEntriesRequestSchema](docs/HourEntriesRequestSchema.md) - [HourEntryIdsSchema](docs/HourEntryIdsSchema.md) - [HourEntrySchema](docs/HourEntrySchema.md) -- [InvalidRequest](docs/InvalidRequest.md) -- [InvalidRequestError](docs/InvalidRequestError.md) +- [ImportCompensationBenchmarksResponse](docs/ImportCompensationBenchmarksResponse.md) +- [Industry](docs/Industry.md) +- [InlineObjectInner](docs/InlineObjectInner.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) +- [LevelsAndBandsColumnMap](docs/LevelsAndBandsColumnMap.md) +- [LevelsAndBandsEmployee](docs/LevelsAndBandsEmployee.md) +- [LevelsAndBandsErrorWarningIdentifier](docs/LevelsAndBandsErrorWarningIdentifier.md) +- [LevelsAndBandsGroup](docs/LevelsAndBandsGroup.md) +- [LevelsAndBandsGroupStatusCounts](docs/LevelsAndBandsGroupStatusCounts.md) +- [LevelsAndBandsJobTitle](docs/LevelsAndBandsJobTitle.md) +- [LevelsAndBandsJobTitleAssignment](docs/LevelsAndBandsJobTitleAssignment.md) +- [LevelsAndBandsJobTitleAssignmentsRequest](docs/LevelsAndBandsJobTitleAssignmentsRequest.md) +- [LevelsAndBandsJobTitleWithEmployees](docs/LevelsAndBandsJobTitleWithEmployees.md) +- [LevelsAndBandsJobTitlesStatus](docs/LevelsAndBandsJobTitlesStatus.md) +- [LevelsAndBandsLevel](docs/LevelsAndBandsLevel.md) +- [LevelsAndBandsLevelsAndBands](docs/LevelsAndBandsLevelsAndBands.md) +- [LevelsAndBandsLevelsAndBandsStatus](docs/LevelsAndBandsLevelsAndBandsStatus.md) +- [LevelsAndBandsPayBand](docs/LevelsAndBandsPayBand.md) +- [LevelsAndBandsStepStatus](docs/LevelsAndBandsStepStatus.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) - [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 +975,67 @@ 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) +- [PayGradesAndBandsPublishResponse](docs/PayGradesAndBandsPublishResponse.md) +- [PayGradesAndBandsSaveLevelsResponse](docs/PayGradesAndBandsSaveLevelsResponse.md) +- [PayGradesAndBandsUpdateJobTitlesResponse](docs/PayGradesAndBandsUpdateJobTitlesResponse.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) - [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) +- [ProjectPaginatedResponseDataV1](docs/ProjectPaginatedResponseDataV1.md) +- [ProjectPaginatedResponseDataV1Links](docs/ProjectPaginatedResponseDataV1Links.md) +- [ProjectPaginatedResponseDataV1LinksNext](docs/ProjectPaginatedResponseDataV1LinksNext.md) +- [ProjectPaginatedResponseDataV1LinksPrev](docs/ProjectPaginatedResponseDataV1LinksPrev.md) +- [ProjectPaginatedResponseDataV1Meta](docs/ProjectPaginatedResponseDataV1Meta.md) +- [ProjectPaginatedTasksResponseV1](docs/ProjectPaginatedTasksResponseV1.md) +- [ProjectPaginatedTasksResponseV1Links](docs/ProjectPaginatedTasksResponseV1Links.md) +- [ProjectPaginatedTasksResponseV1Meta](docs/ProjectPaginatedTasksResponseV1Meta.md) +- [ProjectPaginatedTimeTrackingProjectsResponseV1](docs/ProjectPaginatedTimeTrackingProjectsResponseV1.md) +- [ProjectTimeTrackingProjectV1](docs/ProjectTimeTrackingProjectV1.md) +- [ProjectTimeTrackingTaskV1](docs/ProjectTimeTrackingTaskV1.md) +- [ProjectUpdateTimeTrackingProjectTaskV1](docs/ProjectUpdateTimeTrackingProjectTaskV1.md) +- [ProjectUpdateTimeTrackingProjectV1](docs/ProjectUpdateTimeTrackingProjectV1.md) +- [ProvinceItem](docs/ProvinceItem.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,7 +1045,32 @@ 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) +- [SchedulingSchedulingShiftV1](docs/SchedulingSchedulingShiftV1.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) - [State](docs/State.md) - [StateProvinceResponseSchema](docs/StateProvinceResponseSchema.md) @@ -675,6 +1096,9 @@ 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) - [TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1](docs/TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1.md) @@ -684,8 +1108,6 @@ Class | Method | HTTP request | Description - [TimeTrackingIdResponseSchema](docs/TimeTrackingIdResponseSchema.md) - [TimeTrackingOffsetPaginatedResponseDataV1](docs/TimeTrackingOffsetPaginatedResponseDataV1.md) - [TimeTrackingOffsetPaginatedResponseDataV1Links](docs/TimeTrackingOffsetPaginatedResponseDataV1Links.md) -- [TimeTrackingOffsetPaginatedResponseDataV1LinksNext](docs/TimeTrackingOffsetPaginatedResponseDataV1LinksNext.md) -- [TimeTrackingOffsetPaginatedResponseDataV1LinksPrev](docs/TimeTrackingOffsetPaginatedResponseDataV1LinksPrev.md) - [TimeTrackingOffsetPaginatedResponseDataV1Meta](docs/TimeTrackingOffsetPaginatedResponseDataV1Meta.md) - [TimeTrackingPaginatedBreakAssessmentsResponseV1](docs/TimeTrackingPaginatedBreakAssessmentsResponseV1.md) - [TimeTrackingPaginatedBreakPoliciesResponseV1](docs/TimeTrackingPaginatedBreakPoliciesResponseV1.md) @@ -694,9 +1116,6 @@ Class | Method | HTTP request | Description - [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) @@ -708,30 +1127,76 @@ Class | Method | HTTP request | Description - [TimeTrackingUpdateTimeTrackingBreakPolicyV1](docs/TimeTrackingUpdateTimeTrackingBreakPolicyV1.md) - [TimeTrackingUpdateTimeTrackingBreakV1](docs/TimeTrackingUpdateTimeTrackingBreakV1.md) - [TimesheetEntryInfoApiTransformer](docs/TimesheetEntryInfoApiTransformer.md) -- [TimesheetEntryInfoApiTransformerBreakInfo](docs/TimesheetEntryInfoApiTransformerBreakInfo.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) - [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) - [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 +1220,6 @@ 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) - [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..4a92b8b 100644 --- a/bamboohr_sdk/__init__.py +++ b/bamboohr_sdk/__init__.py @@ -3,39 +3,49 @@ # flake8: noqa """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +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) +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", + "AlertApi", + "AlertConfigurationsApi", "ApplicantTrackingApi", "BenefitsApi", + "CompanyApi", "CompanyFilesApi", "CompanyProfileApi", + "CompensationApi", + "CompensationBenchmarkingApi", + "CompensationPlanningApi", "CustomReportsApi", "DatasetsApi", + "EmployeeVerificationApi", "EmployeeFilesApi", "EmployeesApi", "GoalsApi", "HoursApi", "LastChangeInformationApi", + "LocationsApi", "LoginApi", + "OnboardingApi", "PhotosApi", "ReportsApi", + "SchedulingApi", "TabularDataApi", "TimeOffApi", "TimeTrackingApi", + "TotalRewardsApi", "TrainingApi", "WebhooksApi", "ApiResponse", @@ -47,27 +57,28 @@ "ApiKeyError", "ApiAttributeError", "ApiException", + "A05b6d5f564f805d688ff2c1e37c3990Request", + "Ad7871529b2a9c6612f8dd3c62192c08Request", + "AddCycleAdminsResponse", + "AddCycleAdminsResponseAddedInner", + "AddCycleAdminsResponseSkippedInner", + "AddTotalRewardsEmployeesRequest", "AdjustTimeOffBalance", "AdjustTimeTrackingRequestSchema", + "AlertTemplateListResponse", + "AlertTemplateListResponseAlertsInner", "AlignmentOptionsResponse", "AlignmentOptionsResponseAlignsWithOptionsInner", "ApplicantStatus", "ApplicationDetails", "ApplicationDetailsApplicant", - "ApplicationDetailsApplicantAddress", - "ApplicationDetailsApplicantEducation", - "ApplicationDetailsApplicantEducationLevel", "ApplicationDetailsAttachmentsInner", "ApplicationDetailsJob", - "ApplicationDetailsJobHiringLead", - "ApplicationDetailsJobHiringLeadJobTitle", "ApplicationDetailsJobTitle", "ApplicationDetailsQuestionsAndAnswersInner", "ApplicationDetailsQuestionsAndAnswersInnerAnswer", "ApplicationDetailsQuestionsAndAnswersInnerQuestion", "ApplicationDetailsStatus", - "ApplicationDetailsStatusChangedByUser", - "ApplicationDetailsStatusChangedByUserJobTitle", "ApplicationsList", "ApplicationsListApplicationsInner", "ApplicationsListApplicationsInnerApplicant", @@ -79,14 +90,21 @@ "AssignedTimeOffPolicy", "AssignedTimeOffPolicyV11", "AvailableAction", - "BadRequest", - "BadRequestError", + "BadRequestV1", + "BadRequestV1Error", + "BankHoliday", "BenefitCoveragesResponse", "BenefitCoveragesResponseBenefitCoveragesInner", "BenefitDeductionSubType", "BenefitDeductionType", "BenefitDeductionTypeId", + "BudgetBreakdownImportResponse", + "BudgetGuidelinesView", + "BudgetGuidelinesWarnings", + "C79f9c5950f983e59d2626faa30c00a1Request", + "C7c32ed5278ac67e2e518bf7484a75dcRequest", "CanCreateGoalsResponse", + "Cf87b8e09a001b6fb81dfce6c20ab9e3Request", "ChangedEmployeeIdsResponse", "ChangedEmployeeIdsResponseEmployeesValue", "ChangedEmployeeTableDataResponse", @@ -98,6 +116,8 @@ "ClockEntrySchema", "ClockInRequestSchema", "ClockOutRequestSchema", + "CloseGoalRequest", + "CompanyAlertDataObject", "CompanyBenefitSummary", "CompanyBenefitsListResponse", "CompanyDeletedWebhookPayload", @@ -105,39 +125,98 @@ "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", + "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 +225,69 @@ "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", "GoalAggregate", "GoalAggregateAlignsWithOptionsInner", "GoalAggregateCommentsInner", @@ -193,6 +300,7 @@ "GoalFiltersV11FiltersInner", "GoalFiltersV11FiltersInnerActions", "GoalFiltersV1FiltersInner", + "GoalResponse", "GoalsAggregateV1", "GoalsAggregateV11", "GoalsAggregateV11CommentsInner", @@ -205,27 +313,45 @@ "HourEntriesRequestSchema", "HourEntryIdsSchema", "HourEntrySchema", - "InvalidRequest", - "InvalidRequestError", + "ImportCompensationBenchmarksResponse", + "Industry", + "InlineObjectInner", "JobSummary", - "JobSummaryDepartment", - "JobSummaryHiringLead", - "JobSummaryLocation", "JobSummaryStatus", - "JsonDirectoryEmployee", - "JsonDirectoryEmployeeFieldsInner", "JsonEmployeeFiles", "JsonEmployeeFilesCategoriesInner", "JsonEmployeeFilesCategoriesInnerFilesInner", "JsonEmployeeFilesEmployee", + "LevelsAndBandsColumnMap", + "LevelsAndBandsEmployee", + "LevelsAndBandsErrorWarningIdentifier", + "LevelsAndBandsGroup", + "LevelsAndBandsGroupStatusCounts", + "LevelsAndBandsJobTitle", + "LevelsAndBandsJobTitleAssignment", + "LevelsAndBandsJobTitleAssignmentsRequest", + "LevelsAndBandsJobTitleWithEmployees", + "LevelsAndBandsJobTitlesStatus", + "LevelsAndBandsLevel", + "LevelsAndBandsLevelsAndBands", + "LevelsAndBandsLevelsAndBandsStatus", + "LevelsAndBandsPayBand", + "LevelsAndBandsStepStatus", + "LevelsAndBandsUploadResponse", "ListFieldDetail", "ListFieldOption", "ListFieldValues", "ListFieldValuesOptionsInner", + "ListFieldValuesXml", + "ListFieldValuesXmlOptionInner", "ListUsersResponseValue", "ListUsersXmlResponse", "ListUsersXmlResponseUserInner", "Location", + "LocationResponseObject", + "LocationResponseObjectAddress", + "LocationResponseObjectAddressCountry", + "LocationResponseObjectAddressState", "LoginFailureResponse", "LoginFailureXmlResponse", "LoginResponse", @@ -244,27 +370,67 @@ "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", + "PayGradesAndBandsPublishResponse", + "PayGradesAndBandsSaveLevelsResponse", + "PayGradesAndBandsUpdateJobTitlesResponse", + "PayGradesAndBandsUpdatePayBandsResponse", "PersonInfoApiTransformer", - "PostGoalCommentRequest", - "PostGoalRequest", - "PostGoalRequestMilestonesInner", "PostNewEmployee", "ProblemDetailsResponse", "ProjectCreateRequestSchema", + "ProjectCreateTimeTrackingProjectTaskV1", + "ProjectCreateTimeTrackingProjectV1", + "ProjectCreateTimeTrackingProjectV1TasksInner", "ProjectInfoApiTransformer", "ProjectInfoApiTransformerProject", - "ProjectInfoApiTransformerTask", - "PutGoalCommentRequest", - "PutGoalMilestoneProgressRequest", - "PutGoalProgressRequest", - "PutGoalSharedWithRequest", - "PutGoalV11Request", - "PutGoalV11RequestMilestonesInner", + "ProjectPaginatedResponseDataV1", + "ProjectPaginatedResponseDataV1Links", + "ProjectPaginatedResponseDataV1LinksNext", + "ProjectPaginatedResponseDataV1LinksPrev", + "ProjectPaginatedResponseDataV1Meta", + "ProjectPaginatedTasksResponseV1", + "ProjectPaginatedTasksResponseV1Links", + "ProjectPaginatedTasksResponseV1Meta", + "ProjectPaginatedTimeTrackingProjectsResponseV1", + "ProjectTimeTrackingProjectV1", + "ProjectTimeTrackingTaskV1", + "ProjectUpdateTimeTrackingProjectTaskV1", + "ProjectUpdateTimeTrackingProjectV1", + "ProvinceItem", + "PutCompanyIndustryCodesRequest", + "PutCompanyProfileDisplayNameRequest", + "RemoveCycleAdminSelfResponse", + "RemoveTotalRewardsEmployeesRequest", "Report", "ReportsResponse", "Request", @@ -274,7 +440,32 @@ "RequestCustomReportResponse", "RequestCustomReportResponseEmployeesInner", "RequestCustomReportResponseFieldsInner", + "SaveChangeCommTemplateResponse", + "SchedulingCreateScheduleRequestV1", + "SchedulingCreateSchedulingShiftRequestV1", + "SchedulingPublishShiftsFailureV1", + "SchedulingPublishShiftsRequest", + "SchedulingPublishShiftsResultV1", + "SchedulingScheduleListResponseV1", + "SchedulingScheduleListResponseV1Links", + "SchedulingScheduleListResponseV1Meta", + "SchedulingScheduleV1", + "SchedulingSchedulingShiftV1", + "SchedulingShiftListResponseV1", + "SchedulingShiftListResponseV1Links", + "SchedulingShiftListResponseV1LinksNext", + "SchedulingShiftListResponseV1LinksPrev", + "SchedulingShiftListResponseV1Meta", + "SchedulingTimezoneListResponseV1", + "SchedulingTimezoneListResponseV1Meta", + "SchedulingTimezoneV1", + "SchedulingUpdateScheduleRequestV1", + "SchedulingUpdateSchedulingShiftRequestV1", + "SendEmployeeVerificationLifecycleEmailByUserRequest", + "SendRecommendationsResponse", "SetBreakPolicyEmployeesRequest", + "SetTotalRewardsCustomDisclaimerRequest", + "SetTotalRewardsOnboardingStepRequest", "ShareOptionsResponse", "State", "StateProvinceResponseSchema", @@ -300,6 +491,9 @@ "TimeOffTypesAndDefaultHoursDefaultHoursInner", "TimeOffTypesAndDefaultHoursTimeOffTypesInner", "TimeTrackingBreakPolicyEmployeeCollectionV1Inner", + "TimeTrackingBreakPolicySuggestionsResponseV1", + "TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInner", + "TimeTrackingBreakPolicySuggestionsResponseV1SuggestedPoliciesInnerBreaksInner", "TimeTrackingBulkResponseSchema", "TimeTrackingBulkResponseSchemaResponse", "TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1", @@ -309,8 +503,6 @@ "TimeTrackingIdResponseSchema", "TimeTrackingOffsetPaginatedResponseDataV1", "TimeTrackingOffsetPaginatedResponseDataV1Links", - "TimeTrackingOffsetPaginatedResponseDataV1LinksNext", - "TimeTrackingOffsetPaginatedResponseDataV1LinksPrev", "TimeTrackingOffsetPaginatedResponseDataV1Meta", "TimeTrackingPaginatedBreakAssessmentsResponseV1", "TimeTrackingPaginatedBreakPoliciesResponseV1", @@ -319,9 +511,6 @@ "TimeTrackingProjectWithTasksAndEmployeeIds", "TimeTrackingRecord", "TimeTrackingRecordSchema", - "TimeTrackingRecordSchemaProject", - "TimeTrackingRecordSchemaProjectTask", - "TimeTrackingRecordSchemaShiftDifferential", "TimeTrackingSyncTimeTrackingBreakPolicyV1", "TimeTrackingTask", "TimeTrackingTimeTrackingBreakAssessmentV1", @@ -333,30 +522,76 @@ "TimeTrackingUpdateTimeTrackingBreakPolicyV1", "TimeTrackingUpdateTimeTrackingBreakV1", "TimesheetEntryInfoApiTransformer", - "TimesheetEntryInfoApiTransformerBreakInfo", "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", "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", "UpdateTrainingCategoryRequest", "UpdateTrainingTypeRequest", "UpdateTrainingTypeRequestCategory", "UpdateWebhookBadRequestResponse", + "UpdatedCompensationBenchmark", + "UpdatedCompensationBenchmarkSavedBenchmark", + "UploadEmployeePhotoRequest1", + "UserPermissionData", "WebHookPostFieldDataObject", "WebHookPostFieldPageDataObject", "WebHookPostFieldResponseObject", @@ -380,12 +615,6 @@ "WebhooksList", "WebhooksListWebhooksInner", "WhosOutEntry", - "XmlDirectoryEmployee", - "XmlDirectoryEmployeeEmployees", - "XmlDirectoryEmployeeEmployeesEmployeeInner", - "XmlDirectoryEmployeeEmployeesEmployeeInnerFieldInner", - "XmlDirectoryEmployeeFieldset", - "XmlDirectoryEmployeeFieldsetFieldInner", "XmlEmployeeFiles", "XmlEmployeeFilesCategoryInner", "XmlEmployeeFilesCategoryInnerFileInner", @@ -393,23 +622,34 @@ # import apis into sdk package from bamboohr_sdk.api.account_information_api import AccountInformationApi as AccountInformationApi +from bamboohr_sdk.api.alert_api import AlertApi as AlertApi +from bamboohr_sdk.api.alert_configurations_api import AlertConfigurationsApi as AlertConfigurationsApi 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.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_reports_api import CustomReportsApi as CustomReportsApi from bamboohr_sdk.api.datasets_api import DatasetsApi as DatasetsApi +from bamboohr_sdk.api.employee_verification_api import EmployeeVerificationApi as EmployeeVerificationApi from bamboohr_sdk.api.employee_files_api import EmployeeFilesApi as EmployeeFilesApi from bamboohr_sdk.api.employees_api import EmployeesApi as EmployeesApi from bamboohr_sdk.api.goals_api import GoalsApi as GoalsApi 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.onboarding_api import OnboardingApi as OnboardingApi from bamboohr_sdk.api.photos_api import PhotosApi as PhotosApi from bamboohr_sdk.api.reports_api import ReportsApi as ReportsApi +from bamboohr_sdk.api.scheduling_api import SchedulingApi as SchedulingApi from bamboohr_sdk.api.tabular_data_api import TabularDataApi as TabularDataApi 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 +665,906 @@ 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.ad7871529b2a9c6612f8dd3c62192c08_request import ( + Ad7871529b2a9c6612f8dd3c62192c08Request as Ad7871529b2a9c6612f8dd3c62192c08Request, +) +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_template_list_response import AlertTemplateListResponse as AlertTemplateListResponse +from bamboohr_sdk.models.alert_template_list_response_alerts_inner import ( + AlertTemplateListResponseAlertsInner as AlertTemplateListResponseAlertsInner, +) 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.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.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.can_create_goals_response import CanCreateGoalsResponse as CanCreateGoalsResponse +from bamboohr_sdk.models.cf87b8e09a001b6fb81dfce6c20ab9e3_request import ( + Cf87b8e09a001b6fb81dfce6c20ab9e3Request as Cf87b8e09a001b6fb81dfce6c20ab9e3Request, +) 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_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_alert_data_object import CompanyAlertDataObject as CompanyAlertDataObject 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.cursor_pagination_query_object import ( + CursorPaginationQueryObject as CursorPaginationQueryObject, +) +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.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.hour_entries_request_schema import HourEntriesRequestSchema as HourEntriesRequestSchema from bamboohr_sdk.models.hour_entry_ids_schema import HourEntryIdsSchema as HourEntryIdsSchema 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_inner import InlineObjectInner as InlineObjectInner 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.levels_and_bands_column_map import LevelsAndBandsColumnMap as LevelsAndBandsColumnMap +from bamboohr_sdk.models.levels_and_bands_employee import LevelsAndBandsEmployee as LevelsAndBandsEmployee +from bamboohr_sdk.models.levels_and_bands_error_warning_identifier import ( + LevelsAndBandsErrorWarningIdentifier as LevelsAndBandsErrorWarningIdentifier, +) +from bamboohr_sdk.models.levels_and_bands_group import LevelsAndBandsGroup as LevelsAndBandsGroup +from bamboohr_sdk.models.levels_and_bands_group_status_counts import ( + LevelsAndBandsGroupStatusCounts as LevelsAndBandsGroupStatusCounts, +) +from bamboohr_sdk.models.levels_and_bands_job_title import LevelsAndBandsJobTitle as LevelsAndBandsJobTitle +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_job_title_with_employees import ( + LevelsAndBandsJobTitleWithEmployees as LevelsAndBandsJobTitleWithEmployees, +) +from bamboohr_sdk.models.levels_and_bands_job_titles_status import ( + LevelsAndBandsJobTitlesStatus as LevelsAndBandsJobTitlesStatus, +) +from bamboohr_sdk.models.levels_and_bands_level import LevelsAndBandsLevel as LevelsAndBandsLevel +from bamboohr_sdk.models.levels_and_bands_levels_and_bands import ( + LevelsAndBandsLevelsAndBands as LevelsAndBandsLevelsAndBands, +) +from bamboohr_sdk.models.levels_and_bands_levels_and_bands_status import ( + LevelsAndBandsLevelsAndBandsStatus as LevelsAndBandsLevelsAndBandsStatus, +) +from bamboohr_sdk.models.levels_and_bands_pay_band import LevelsAndBandsPayBand as LevelsAndBandsPayBand +from bamboohr_sdk.models.levels_and_bands_step_status import LevelsAndBandsStepStatus as LevelsAndBandsStepStatus +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.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_publish_response import ( + PayGradesAndBandsPublishResponse as PayGradesAndBandsPublishResponse, +) +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_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.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_paginated_response_data_v1 import ( + ProjectPaginatedResponseDataV1 as ProjectPaginatedResponseDataV1, +) +from bamboohr_sdk.models.project_paginated_response_data_v1_links import ( + ProjectPaginatedResponseDataV1Links as ProjectPaginatedResponseDataV1Links, +) +from bamboohr_sdk.models.project_paginated_response_data_v1_links_next import ( + ProjectPaginatedResponseDataV1LinksNext as ProjectPaginatedResponseDataV1LinksNext, +) +from bamboohr_sdk.models.project_paginated_response_data_v1_links_prev import ( + ProjectPaginatedResponseDataV1LinksPrev as ProjectPaginatedResponseDataV1LinksPrev, +) +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_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.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_v1 import ( + SchedulingSchedulingShiftV1 as SchedulingSchedulingShiftV1, +) +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.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 +1583,322 @@ 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_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_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_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_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.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.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_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.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..6b22a71 100644 --- a/bamboohr_sdk/api/__init__.py +++ b/bamboohr_sdk/api/__init__.py @@ -2,23 +2,33 @@ # import apis into api package from bamboohr_sdk.api.account_information_api import AccountInformationApi +from bamboohr_sdk.api.alert_api import AlertApi +from bamboohr_sdk.api.alert_configurations_api import AlertConfigurationsApi from bamboohr_sdk.api.applicant_tracking_api import ApplicantTrackingApi from bamboohr_sdk.api.benefits_api import BenefitsApi +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_reports_api import CustomReportsApi from bamboohr_sdk.api.datasets_api import DatasetsApi +from bamboohr_sdk.api.employee_verification_api import EmployeeVerificationApi from bamboohr_sdk.api.employee_files_api import EmployeeFilesApi from bamboohr_sdk.api.employees_api import EmployeesApi from bamboohr_sdk.api.goals_api import GoalsApi 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.onboarding_api import OnboardingApi from bamboohr_sdk.api.photos_api import PhotosApi from bamboohr_sdk.api.reports_api import ReportsApi +from bamboohr_sdk.api.scheduling_api import SchedulingApi from bamboohr_sdk.api.tabular_data_api import TabularDataApi 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..9164b72 100644 --- a/bamboohr_sdk/api/account_information_api.py +++ b/bamboohr_sdk/api/account_information_api.py @@ -1,35 +1,32 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +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) +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.models.country_schema import CountrySchema +from bamboohr_sdk.api_client import ApiClient, RequestSerialized +from bamboohr_sdk.api_response import ApiResponse +from bamboohr_sdk.models.countries_options_response import CountriesOptionsResponse from bamboohr_sdk.models.field1 import Field1 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 @@ -40,47 +37,1202 @@ class AccountInformationApi: 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 + 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 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. + + :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 baa7162824294d030115568d1d8e6ca7_with_http_info( + 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, + ) -> ApiResponse[TimezoneResource]: + """Get timezone by ID + + Retrieves a single timezone by its numeric ID. Returns the same timezone resource shape used by the list endpoint. + + :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, + ) + + @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. + + :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. + + :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, + ).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. + + :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_10d66d8561dd7dac50ff9c21ef63d83b_without_preload_content( + 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, + ) -> RESTResponseType: + """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. + + :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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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 call_5c5fb0f1211ae1c9451753f92f1053b6( + def get_countries_options( 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)] - ] + 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_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, - ) -> TimezoneListResponse: - """List timezones + ) -> CountriesOptionsResponse: + """Get Countries - Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters. + 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). - :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 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 @@ -101,73 +1253,51 @@ 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._get_countries_options_serialize( + iso_code=iso_code, _request_auth=_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": "CountriesOptionsResponse", + "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 call_5c5fb0f1211ae1c9451753f92f1053b6_with_http_info( + def get_countries_options_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)] - ] + 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_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[TimezoneListResponse]: - """List timezones + ) -> ApiResponse[CountriesOptionsResponse]: + """Get Countries - Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters. + 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). - :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 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 @@ -188,73 +1318,51 @@ 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_countries_options_serialize( + iso_code=iso_code, _request_auth=_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": "CountriesOptionsResponse", + "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 call_5c5fb0f1211ae1c9451753f92f1053b6_without_preload_content( + def get_countries_options_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)] - ] + 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_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 timezones + """Get Countries - Retrieves a paginated list of timezones. Supports pagination, filtering, sorting, and field projection via OData query parameters. + 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). - :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 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 @@ -275,41 +1383,27 @@ 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_countries_options_serialize( + iso_code=iso_code, _request_auth=_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": "CountriesOptionsResponse", + "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 _call_5c5fb0f1211ae1c9451753f92f1053b6_serialize( + def _get_countries_options_serialize( self, - page_size, - page, - sort, - select, - filter, + iso_code, _request_auth, _content_type, _headers, @@ -318,62 +1412,34 @@ 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 # 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 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', - '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/countries/options", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -383,31 +1449,23 @@ 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 get_meta_company( 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[CountrySchema]: - """Get Countries + ) -> MetaCompanyPropertiesResponse: + """Get company properties - 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. + Get company properties including ID, name, domain, and base API URL. Provides essential company metadata for API access. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -429,48 +1487,36 @@ 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( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _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, Optional[str]] = { - '200': "List[CountrySchema]", + _response_types_map: dict[str, str | None] = { + "200": "MetaCompanyPropertiesResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_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 get_meta_company_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[CountrySchema]]: - """Get Countries + ) -> ApiResponse[MetaCompanyPropertiesResponse]: + """Get company properties - 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. + Get company properties including ID, name, domain, and base API URL. Provides essential company metadata for API access. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -492,48 +1538,36 @@ 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( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _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, Optional[str]] = { - '200': "List[CountrySchema]", + _response_types_map: dict[str, str | None] = { + "200": "MetaCompanyPropertiesResponse", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_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 get_meta_company_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 Countries + """Get company properties - 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. + Get company properties including ID, name, domain, and base API URL. Provides essential company metadata for API access. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -555,26 +1589,19 @@ 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( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _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, Optional[str]] = { - '200': "List[CountrySchema]", + _response_types_map: dict[str, str | None] = { + "200": "MetaCompanyPropertiesResponse", } - 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 _get_meta_company_serialize( self, _request_auth, _content_type, @@ -584,17 +1611,14 @@ 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 @@ -602,25 +1626,16 @@ def _get_countries_options_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] = ["oauth"] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/meta/countries/options', + method="GET", + resource_path="/api/v1/meta/company", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -630,34 +1645,31 @@ 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( 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)] - ] - ] = 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, ) -> StateProvinceResponseSchema: - """Get States by Country ID + """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. 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 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. - :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) + :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 @@ -679,53 +1691,49 @@ 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, _request_auth=_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": "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, ).data - @validate_call def get_states_by_country_id_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)] - ] - ] = 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, ) -> ApiResponse[StateProvinceResponseSchema]: - """Get States by Country ID + """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. 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 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. - :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) + :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 @@ -747,53 +1755,49 @@ 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, _request_auth=_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": "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 get_states_by_country_id_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)] - ] - ] = 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: - """Get States by Country ID + """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. 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 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. - :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) + :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 @@ -815,27 +1819,23 @@ 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, _request_auth=_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": "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 _get_states_by_country_id_serialize( self, country_id, @@ -847,45 +1847,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 + _path_params["countryId"] = country_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/meta/provinces/{countryId}', + method="GET", + resource_path="/api/v1/meta/provinces/{countryId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -895,29 +1883,23 @@ 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( 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[Field1]: + ) -> list[Field1]: """List Fields 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. @@ -944,47 +1926,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 + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Field1]", + _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 list_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[Field1]]: + ) -> ApiResponse[list[Field1]]: """List Fields 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. @@ -1011,45 +1986,38 @@ 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 + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Field1]", + _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 list_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 Fields @@ -1078,26 +2046,22 @@ 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 + _host_index=_host_index, ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Field1]", + _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 _list_fields_serialize( self, accept_header_parameter, @@ -1109,46 +2073,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 + _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/fields', + method="GET", + resource_path="/api/v1/meta/fields", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1158,33 +2109,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. :param format: Set to \"json\" to receive JSON output as an alternative to using the Accept header. :type format: str @@ -1210,7 +2158,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 +2166,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. :param format: Set to \"json\" to receive JSON output as an alternative to using the Accept header. :type format: str @@ -1282,7 +2226,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 +2234,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. :param format: Set to \"json\" to receive JSON output as an alternative to using the Accept header. :type format: str @@ -1354,7 +2294,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 +2302,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 +2324,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 +2363,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. :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -1490,50 +2406,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. :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -1557,50 +2466,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. :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -1624,26 +2526,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 +2553,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,30 +2589,29 @@ 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. @@ -1756,7 +2640,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,43 +2648,41 @@ 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. @@ -1829,7 +2711,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,41 +2719,39 @@ 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 @@ -1902,7 +2782,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 +2790,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 +2813,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 +2852,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. - :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 +2907,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. - :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 +2986,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. - :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 +3065,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 +3101,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 +3150,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/alert_api.py b/bamboohr_sdk/api/alert_api.py new file mode 100644 index 0000000..d25f27b --- /dev/null +++ b/bamboohr_sdk/api/alert_api.py @@ -0,0 +1,234 @@ +""" +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. +""" + +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_template_list_response import AlertTemplateListResponse +from bamboohr_sdk.rest import RESTResponseType + + +class AlertApi: + """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 call_0f0dcb585e5883175b6557c16cf6755a( + 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, + ) -> AlertTemplateListResponse: + """List alert templates + + Returns all available alert templates with their IDs, names, and group names. Use the returned IDs when creating or updating company alert configurations. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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_0f0dcb585e5883175b6557c16cf6755a_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "AlertTemplateListResponse", + "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_0f0dcb585e5883175b6557c16cf6755a_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[AlertTemplateListResponse]: + """List alert templates + + Returns all available alert templates with their IDs, names, and group names. Use the returned IDs when creating or updating company alert configurations. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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_0f0dcb585e5883175b6557c16cf6755a_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "AlertTemplateListResponse", + "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_0f0dcb585e5883175b6557c16cf6755a_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 all available alert templates with their IDs, names, and group names. Use the returned IDs when creating or updating company alert configurations. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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_0f0dcb585e5883175b6557c16cf6755a_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "AlertTemplateListResponse", + "403": None, + "500": None, + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_0f0dcb585e5883175b6557c16cf6755a_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, + ) diff --git a/bamboohr_sdk/api/alert_configurations_api.py b/bamboohr_sdk/api/alert_configurations_api.py new file mode 100644 index 0000000..d2a0127 --- /dev/null +++ b/bamboohr_sdk/api/alert_configurations_api.py @@ -0,0 +1,940 @@ +""" +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. +""" + +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_alert_data_object import CompanyAlertDataObject +from bamboohr_sdk.rest import RESTResponseType + + +class AlertConfigurationsApi: + """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 a05e93bc2eb9c39a40fbd71e6e07f3c6( + self, + company_alert_data_object: CompanyAlertDataObject, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CompanyAlertDataObject: + """Create an alert configuration + + Creates a new company alert configuration. + + :param company_alert_data_object: (required) + :type company_alert_data_object: CompanyAlertDataObject + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._a05e93bc2eb9c39a40fbd71e6e07f3c6_serialize( + company_alert_data_object=company_alert_data_object, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "CompanyAlertDataObject", + "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 a05e93bc2eb9c39a40fbd71e6e07f3c6_with_http_info( + self, + company_alert_data_object: CompanyAlertDataObject, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CompanyAlertDataObject]: + """Create an alert configuration + + Creates a new company alert configuration. + + :param company_alert_data_object: (required) + :type company_alert_data_object: CompanyAlertDataObject + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._a05e93bc2eb9c39a40fbd71e6e07f3c6_serialize( + company_alert_data_object=company_alert_data_object, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "CompanyAlertDataObject", + "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 a05e93bc2eb9c39a40fbd71e6e07f3c6_without_preload_content( + self, + company_alert_data_object: CompanyAlertDataObject, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 an alert configuration + + Creates a new company alert configuration. + + :param company_alert_data_object: (required) + :type company_alert_data_object: CompanyAlertDataObject + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._a05e93bc2eb9c39a40fbd71e6e07f3c6_serialize( + company_alert_data_object=company_alert_data_object, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "201": "CompanyAlertDataObject", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _a05e93bc2eb9c39a40fbd71e6e07f3c6_serialize( + self, + company_alert_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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if company_alert_data_object is not None: + _body_params = company_alert_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="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 call_14e66bfb5f075043221ce1e843c97493( + 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, + ) -> CompanyAlertDataObject: + """Get an alert configuration + + Returns a single company alert configuration by ID. + + :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_14e66bfb5f075043221ce1e843c97493_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": "CompanyAlertDataObject", + "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_14e66bfb5f075043221ce1e843c97493_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[CompanyAlertDataObject]: + """Get an alert configuration + + Returns a single company alert configuration by ID. + + :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_14e66bfb5f075043221ce1e843c97493_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": "CompanyAlertDataObject", + "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_14e66bfb5f075043221ce1e843c97493_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 an alert configuration + + Returns a single company alert configuration by ID. + + :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_14e66bfb5f075043221ce1e843c97493_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": "CompanyAlertDataObject", + "403": "ProblemDetailsResponse", + "404": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_14e66bfb5f075043221ce1e843c97493_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/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 call_6d0a073cbf3e97fe0409de42c68fe779( + 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[CompanyAlertDataObject]: + """List alert configurations + + Returns all company alert configurations for the authenticated company. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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_6d0a073cbf3e97fe0409de42c68fe779_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[CompanyAlertDataObject]", + "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_6d0a073cbf3e97fe0409de42c68fe779_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[CompanyAlertDataObject]]: + """List alert configurations + + Returns all company alert configurations for the authenticated company. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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_6d0a073cbf3e97fe0409de42c68fe779_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[CompanyAlertDataObject]", + "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_6d0a073cbf3e97fe0409de42c68fe779_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 all company alert configurations for the authenticated company. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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_6d0a073cbf3e97fe0409de42c68fe779_serialize( + _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + ) + + _response_types_map: dict[str, str | None] = { + "200": "List[CompanyAlertDataObject]", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _call_6d0a073cbf3e97fe0409de42c68fe779_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/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 eb42aa2fa339ba5c08b147fc13c6a79e( + self, + id: StrictInt, + company_alert_data_object: CompanyAlertDataObject, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CompanyAlertDataObject: + """Update an alert configuration + + Updates an existing company alert configuration. + + :param id: (required) + :type id: int + :param company_alert_data_object: (required) + :type company_alert_data_object: CompanyAlertDataObject + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._eb42aa2fa339ba5c08b147fc13c6a79e_serialize( + id=id, + company_alert_data_object=company_alert_data_object, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompanyAlertDataObject", + "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 eb42aa2fa339ba5c08b147fc13c6a79e_with_http_info( + self, + id: StrictInt, + company_alert_data_object: CompanyAlertDataObject, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | None = None, + _content_type: StrictStr | None = None, + _headers: dict[StrictStr, Any] | None = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CompanyAlertDataObject]: + """Update an alert configuration + + Updates an existing company alert configuration. + + :param id: (required) + :type id: int + :param company_alert_data_object: (required) + :type company_alert_data_object: CompanyAlertDataObject + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._eb42aa2fa339ba5c08b147fc13c6a79e_serialize( + id=id, + company_alert_data_object=company_alert_data_object, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompanyAlertDataObject", + "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 eb42aa2fa339ba5c08b147fc13c6a79e_without_preload_content( + self, + id: StrictInt, + company_alert_data_object: CompanyAlertDataObject, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 alert configuration + + Updates an existing company alert configuration. + + :param id: (required) + :type id: int + :param company_alert_data_object: (required) + :type company_alert_data_object: CompanyAlertDataObject + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ + + _param = self._eb42aa2fa339ba5c08b147fc13c6a79e_serialize( + id=id, + company_alert_data_object=company_alert_data_object, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: dict[str, str | None] = { + "200": "CompanyAlertDataObject", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "500": "ProblemDetailsResponse", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _eb42aa2fa339ba5c08b147fc13c6a79e_serialize( + self, + id, + company_alert_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 company_alert_data_object is not None: + _body_params = company_alert_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/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..adb9157 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://www.bamboohr.com/api/documentation/ - 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,23 +43,21 @@ 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[ + StrictInt | 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 @@ -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,43 +96,38 @@ 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[ + StrictInt | 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 @@ -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,43 +166,38 @@ 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[ + StrictInt | 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 @@ -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,47 +307,78 @@ 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 @@ -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,62 +474,92 @@ 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, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_request_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 @@ -607,7 +628,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,62 +655,92 @@ 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, } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) + response_data = self.api_client.call_api(*_param, _request_timeout=_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 @@ -758,7 +809,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 +836,19 @@ 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, } - 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 +880,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,48 +964,122 @@ 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 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." + ), + ], 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 @@ -1046,7 +1150,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,63 +1178,136 @@ 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 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." + ), + ], 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 @@ -1201,7 +1378,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,63 +1406,136 @@ 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 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." + ), + ], 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 @@ -1356,7 +1606,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 +1634,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 +1679,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,27 +1765,21 @@ 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[ + StrictInt | 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 @@ -1585,48 +1808,41 @@ 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[ + StrictInt | 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 @@ -1655,48 +1871,41 @@ 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[ + StrictInt | 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 @@ -1725,29 +1934,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 +1964,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,35 +2000,47 @@ 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`)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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 @@ -1880,7 +2085,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,49 +2100,60 @@ 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`)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 @@ -1982,7 +2198,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,49 +2213,60 @@ 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`)." + ), + ] = None, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 @@ -2084,7 +2311,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 +2326,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 +2357,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,28 +2418,20 @@ 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. @@ -2262,48 +2456,36 @@ 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. @@ -2328,46 +2510,34 @@ 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 @@ -2394,28 +2564,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 +2589,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 +2604,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,28 +2623,20 @@ 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. @@ -2518,48 +2661,36 @@ 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. @@ -2584,46 +2715,34 @@ 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 @@ -2650,28 +2769,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 +2794,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 +2809,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,32 +2828,34 @@ 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. @@ -2786,7 +2888,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,46 +2898,47 @@ 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. @@ -2868,7 +2971,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,44 +2981,45 @@ 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 @@ -2950,7 +3054,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 +3064,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 +3090,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,28 +3136,20 @@ 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. @@ -3098,47 +3174,35 @@ 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. @@ -3163,45 +3227,33 @@ 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 @@ -3228,27 +3280,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 +3304,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 +3319,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,28 +3338,24 @@ 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 @@ -3357,7 +3386,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,43 +3394,38 @@ 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 @@ -3432,7 +3456,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,43 +3464,38 @@ 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 @@ -3507,7 +3526,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 +3534,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 +3559,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 +3578,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 +3605,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..e2c93ba 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://www.bamboohr.com/api/documentation/ - 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. :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. :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. :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,28 +276,22 @@ 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 @@ -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,41 +330,34 @@ 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 @@ -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,41 +396,34 @@ 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 @@ -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. - :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. - :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. - :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. - :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. - :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. - :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\". :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\". :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\". :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 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. + :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 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. + :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 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. + :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 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. - :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 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, - _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 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, - ) -> 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. - :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 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, - _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 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, ) -> 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. - :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 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. - :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. - :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. - :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. + :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. + :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, + 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, ) -> 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. + :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. :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. :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. :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/company_api.py b/bamboohr_sdk/api/company_api.py new file mode 100644 index 0000000..fcb727f --- /dev/null +++ b/bamboohr_sdk/api/company_api.py @@ -0,0 +1,276 @@ +""" +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. +""" + +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. + + :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. + + :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. + + :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..2e8b374 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://www.bamboohr.com/api/documentation/ - 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,22 +32,16 @@ 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 @@ -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,22 +95,16 @@ 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 @@ -155,49 +133,40 @@ 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 @@ -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. :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. :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. :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,27 +494,19 @@ 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 @@ -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,22 +558,16 @@ 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 @@ -701,47 +596,38 @@ 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 @@ -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,26 +721,18 @@ 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 @@ -897,44 +759,32 @@ 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 @@ -961,44 +811,32 @@ 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 @@ -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,28 +920,20 @@ 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 @@ -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,23 +989,17 @@ 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 @@ -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,42 +1038,33 @@ 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 @@ -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,30 +1169,31 @@ 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 @@ -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,25 +1257,28 @@ 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 @@ -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,46 +1323,46 @@ 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 @@ -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..f1c7348 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://www.bamboohr.com/api/documentation/ - 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,21 +37,15 @@ 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 @@ -76,45 +72,33 @@ 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 @@ -141,45 +125,33 @@ 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 @@ -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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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..2d8c09b --- /dev/null +++ b/bamboohr_sdk/api/compensation_api.py @@ -0,0 +1,675 @@ +""" +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. +""" + +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. + + :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. + + :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. + + :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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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..0bc39cd --- /dev/null +++ b/bamboohr_sdk/api/compensation_benchmarking_api.py @@ -0,0 +1,2629 @@ +""" +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. +""" + +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`. + + :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", + "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`. + + :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", + "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`. + + :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", + "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. + + :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. + + :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. + + :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`. + + :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`. + + :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`. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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`. + + :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`. + + :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`. + + :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. + + :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. + + :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. + + :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..d30a491 --- /dev/null +++ b/bamboohr_sdk/api/compensation_planning_api.py @@ -0,0 +1,6856 @@ +""" +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. +""" + +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. + + :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. + + :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. + + :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). + + :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). + + :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). + + :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: StrictStr, + 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. + + :param id: (required) + :type id: int + :param employee_id: (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: StrictStr, + 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. + + :param id: (required) + :type id: int + :param employee_id: (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: StrictStr, + 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. + + :param id: (required) + :type id: int + :param employee_id: (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. + + :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. + + :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. + + :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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :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. + + :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. + + :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 employee IDs. + + :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 employee IDs. + + :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 employee IDs. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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="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. + + :param id: (required) + :type id: int + :param model3958585c861325ea7a2cd30a8c74f042_request: 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="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. + + :param id: (required) + :type id: int + :param model3958585c861325ea7a2cd30a8c74f042_request: 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="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. + + :param id: (required) + :type id: int + :param model3958585c861325ea7a2cd30a8c74f042_request: 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. + + :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. + + :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. + + :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). + + :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). + + :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). + + :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. + + :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. + + :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. + + :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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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. + + :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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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. + + :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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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. + + :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: StrictStr | None, + 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. + + :param id: (required) + :type id: int + :param employee_id: (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: StrictStr | None, + 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. + + :param id: (required) + :type id: int + :param employee_id: (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: StrictStr | None, + 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. + + :param id: (required) + :type id: int + :param employee_id: (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. + + :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. + + :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. + + :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="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. + + :param id: (required) + :type id: int + :param model89a5068111ec499135c7d6e9a53d5a30_request: 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="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. + + :param id: (required) + :type id: int + :param model89a5068111ec499135c7d6e9a53d5a30_request: 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="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. + + :param id: (required) + :type id: int + :param model89a5068111ec499135c7d6e9a53d5a30_request: 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). + + :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). + + :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). + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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: 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, + ) -> RemoveCycleAdminSelfResponse: + """Remove cycle admin + + Remove a cycle admin by employee ID. Full account admins cannot be removed. + + :param id: (required) + :type id: int + :param 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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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: 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[RemoveCycleAdminSelfResponse]: + """Remove cycle admin + + Remove a cycle admin by employee ID. Full account admins cannot be removed. + + :param id: (required) + :type id: int + :param 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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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: 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: + """Remove cycle admin + + Remove a cycle admin by employee ID. Full account admins cannot be removed. + + :param id: (required) + :type id: int + :param 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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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_reports_api.py b/bamboohr_sdk/api/custom_reports_api.py index e723104..055e848 100644 --- a/bamboohr_sdk/api/custom_reports_api.py +++ b/bamboohr_sdk/api/custom_reports_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://www.bamboohr.com/api/documentation/ - 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.employee_response import EmployeeResponse +from bamboohr_sdk.models.reports_response import ReportsResponse from bamboohr_sdk.rest import RESTResponseType @@ -39,35 +32,37 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call - def get_by_report_id( + def get_report_by_id( 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, ) -> EmployeeResponse: """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\"]`). 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. - :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 +84,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": "EmployeeResponse", + "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]: """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\"]`). 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. - :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 +162,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": "EmployeeResponse", + "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, - _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, ) -> 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\"]`). 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. - :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 +240,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": "EmployeeResponse", + "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 +275,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 +317,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`. - :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 +369,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 +377,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, + 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, ) -> 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`. - :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 +441,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 +449,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, - _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, ) -> 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`. - :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 +513,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 +521,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 +544,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 +584,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..e5ebb17 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://www.bamboohr.com/api/documentation/ - 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, equal, not_equal, empty, not_empty, last, next, range; 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. - :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, equal, not_equal, empty, not_empty, last, next, range; 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. - :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, equal, not_equal, empty, not_empty, last, next, range; 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. - :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 lightweight directory-style employee listings or batch lookups by ID, use List Employees (`list-employees`) instead. For the full set of fields on a single employee, use Get Employee (`get-employee`) instead. 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 List Employees / Get Employee use shorter names like `jobTitleName`, `department`, `reportsTo`, and `status`. Always source field names from Get Fields from Dataset (v1.2) — names from the employee endpoints will not necessarily resolve here. 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')`. `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. Callers without permission to a requested field receive an error from the semantic layer rather than silent omission of the field from rows; callers without dataset-level access receive `403`. There is no per-row redaction within the response — a row that includes the caller in its access scope returns all requested fields, and a dataset the caller cannot see at all returns `404` (\"not accessible\" rather than disclosing existence). 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. + :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 lightweight directory-style employee listings or batch lookups by ID, use List Employees (`list-employees`) instead. For the full set of fields on a single employee, use Get Employee (`get-employee`) instead. 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 List Employees / Get Employee use shorter names like `jobTitleName`, `department`, `reportsTo`, and `status`. Always source field names from Get Fields from Dataset (v1.2) — names from the employee endpoints will not necessarily resolve here. 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')`. `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. Callers without permission to a requested field receive an error from the semantic layer rather than silent omission of the field from rows; callers without dataset-level access receive `403`. There is no per-row redaction within the response — a row that includes the caller in its access scope returns all requested fields, and a dataset the caller cannot see at all returns `404` (\"not accessible\" rather than disclosing existence). 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. + :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 lightweight directory-style employee listings or batch lookups by ID, use List Employees (`list-employees`) instead. For the full set of fields on a single employee, use Get Employee (`get-employee`) instead. 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 List Employees / Get Employee use shorter names like `jobTitleName`, `department`, `reportsTo`, and `status`. Always source field names from Get Fields from Dataset (v1.2) — names from the employee endpoints will not necessarily resolve here. 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')`. `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. Callers without permission to a requested field receive an error from the semantic layer rather than silent omission of the field from rows; callers without dataset-level access receive `403`. There is no per-row redaction within the response — a row that includes the caller in its access scope returns all requested fields, and a dataset the caller cannot see at all returns `404` (\"not accessible\" rather than disclosing existence). 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. + :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. + :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. + :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. + :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. - :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. - :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. - :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. - :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. - :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. - :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. - :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. - :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. - :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. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + 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. - :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. - :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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. - :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..be47151 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://www.bamboohr.com/api/documentation/ - 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. :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. :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. :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 ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key." + ), + ], + 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 API key. 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. - :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 ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key. (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 ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key." + ), + ], + 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 API key. 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. - :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 ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key. (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 ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key." + ), + ], + 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 API key. 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. - :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 ID of the employee whose file is being deleted. Use 0 to default to the employee associated with the API key. (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 ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key." + ), + ], + 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 API key. 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. - :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 ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key. (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 ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key." + ), + ], + 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 API key. 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. - :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 ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key. (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 ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key." + ), + ], + 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 API key. 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. - :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 ID of the employee whose file is being retrieved. Use 0 to resolve to the employee associated with the API key. (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,34 @@ 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[StrictInt | None, Field(description="The 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. :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 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 +829,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 +837,46 @@ 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[StrictInt | None, Field(description="The 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. :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 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 +898,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 +906,46 @@ 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[StrictInt | None, Field(description="The 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. :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 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 +967,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 +975,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 +998,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,34 +1036,26 @@ 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 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. :param id: The ID of the employee whose file is being updated. (required) :type id: int @@ -1219,7 +1083,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 +1092,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,29 +1110,23 @@ 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 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. :param id: The ID of the employee whose file is being updated. (required) :type id: int @@ -1299,7 +1154,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,49 +1163,40 @@ 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 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. :param id: The ID of the employee whose file is being updated. (required) :type id: int @@ -1378,7 +1224,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 +1233,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 +1259,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 +1280,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,31 +1303,37 @@ 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="{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)." + ), + ], 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 @@ -1537,7 +1370,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 +1381,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,26 +1400,34 @@ 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="{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)." + ), + ], 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 @@ -1626,7 +1464,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,47 +1475,52 @@ 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="{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)." + ), + ], 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 @@ -1714,7 +1557,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 +1568,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 +1597,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 +1645,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/employee_verification_api.py b/bamboohr_sdk/api/employee_verification_api.py new file mode 100644 index 0000000..dc33ada --- /dev/null +++ b/bamboohr_sdk/api/employee_verification_api.py @@ -0,0 +1,1261 @@ +""" +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. +""" + +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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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="Company employee id 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. + + :param employee_id: Company employee id 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="Company employee id 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. + + :param employee_id: Company employee id 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="Company employee id 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. + + :param employee_id: Company employee id 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`. + + :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`. + + :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`. + + :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="Company employee id that 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. + + :param employee_id: Company employee id that 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="Company employee id that 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. + + :param employee_id: Company employee id that 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="Company employee id that 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. + + :param employee_id: Company employee id that 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. + + :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. + + :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. + + :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..4b8ae82 100644 --- a/bamboohr_sdk/api/employees_api.py +++ b/bamboohr_sdk/api/employees_api.py @@ -1,35 +1,28 @@ -# coding: utf-8 - """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +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) +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_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 +38,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 the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/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 creating the employee, use the Upload Employee Photo endpoint (operationId: upload-employee-photo, POST /api/v1/employees/{employeeId}/photo) to set the photo. 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. :param post_new_employee: (required) :type post_new_employee: PostNewEmployee @@ -89,54 +76,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 the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/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 creating the employee, use the Upload Employee Photo endpoint (operationId: upload-employee-photo, POST /api/v1/employees/{employeeId}/photo) to set the photo. 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. :param post_new_employee: (required) :type post_new_employee: PostNewEmployee @@ -160,53 +137,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 the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/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 creating the employee, use the Upload Employee Photo endpoint (operationId: upload-employee-photo, POST /api/v1/employees/{employeeId}/photo) to set the photo. 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. :param post_new_employee: (required) :type post_new_employee: PostNewEmployee @@ -230,29 +198,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 +228,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 +245,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,26 +274,232 @@ 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="ID of the employee 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 + + Permanently deletes an employee record and all associated data. + + :param id: ID of the employee 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_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="ID of the employee 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 + + Permanently deletes an employee record and all associated data. + :param id: ID of the employee 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_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="ID of the employee 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 + + Permanently deletes an employee record and all associated data. + + :param id: ID of the employee 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_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 @@ -366,44 +526,32 @@ 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", + "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_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 @@ -430,44 +578,32 @@ 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", + "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_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 @@ -494,26 +630,19 @@ 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", + "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_company_information_serialize( self, _request_auth, @@ -524,17 +653,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 +668,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 +687,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 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 (`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; 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. 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. 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. The maximum number of fields per request is 400. Use this for fetching arbitrary fields on a single known employee. For batch lookups or directory-style listings across employees, use List Employees (`list-employees`) instead. For complex filtering, multi-field predicates, or tabular reports, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`) instead. - :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 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 (`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 +754,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 +764,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 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 (`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; 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. 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. 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. The maximum number of fields per request is 400. Use this for fetching arbitrary fields on a single known employee. For batch lookups or directory-style listings across employees, use List Employees (`list-employees`) instead. For complex filtering, multi-field predicates, or tabular reports, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`) instead. - :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 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 (`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 +845,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 +855,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 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 (`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; 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. 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. 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. The maximum number of fields per request is 400. Use this for fetching arbitrary fields on a single known employee. For batch lookups or directory-style listings across employees, use List Employees (`list-employees`) instead. For complex filtering, multi-field predicates, or tabular reports, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`) instead. - :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 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 (`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 +936,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 +946,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 +973,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 +1017,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. Coverage is intentionally incomplete — companies can hide individual employees (commonly contractors) from the directory, and those employees are silently absent from the response with no indicator that they exist. The fieldset is also fixed by company directory configuration; callers cannot request additional fields. Use this endpoint only when you specifically want the company's curated directory subset (for example, an org-style listing that respects the company's directory settings). For complete or general-purpose employee listings, batch lookups by ID, or filtering by name/status, use **List Employees** (`list-employees`) instead. For tabular reporting, custom field selection, or analytical queries across many employees, use **Get Data from Dataset (v2)** (`get-data-from-dataset-v2`) instead. 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 returned as strings in both formats. The response shape varies by caller permission and per-company configuration: when neither company-wide directory sharing nor org-chart sharing is enabled the endpoint returns 403; when only org-chart sharing is enabled the response uses a reduced fieldset (limited to the fields exposed by the org chart); when the resulting directory has no employees the endpoint returns 404 rather than an empty list. :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 +1068,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 +1076,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. Coverage is intentionally incomplete — companies can hide individual employees (commonly contractors) from the directory, and those employees are silently absent from the response with no indicator that they exist. The fieldset is also fixed by company directory configuration; callers cannot request additional fields. Use this endpoint only when you specifically want the company's curated directory subset (for example, an org-style listing that respects the company's directory settings). For complete or general-purpose employee listings, batch lookups by ID, or filtering by name/status, use **List Employees** (`list-employees`) instead. For tabular reporting, custom field selection, or analytical queries across many employees, use **Get Data from Dataset (v2)** (`get-data-from-dataset-v2`) instead. 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 returned as strings in both formats. The response shape varies by caller permission and per-company configuration: when neither company-wide directory sharing nor org-chart sharing is enabled the endpoint returns 403; when only org-chart sharing is enabled the response uses a reduced fieldset (limited to the fields exposed by the org chart); when the resulting directory has no employees the endpoint returns 404 rather than an empty list. :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 +1141,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 +1149,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. Coverage is intentionally incomplete — companies can hide individual employees (commonly contractors) from the directory, and those employees are silently absent from the response with no indicator that they exist. The fieldset is also fixed by company directory configuration; callers cannot request additional fields. Use this endpoint only when you specifically want the company's curated directory subset (for example, an org-style listing that respects the company's directory settings). For complete or general-purpose employee listings, batch lookups by ID, or filtering by name/status, use **List Employees** (`list-employees`) instead. For tabular reporting, custom field selection, or analytical queries across many employees, use **Get Data from Dataset (v2)** (`get-data-from-dataset-v2`) instead. 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 returned as strings in both formats. The response shape varies by caller permission and per-company configuration: when neither company-wide directory sharing nor org-chart sharing is enabled the endpoint returns 403; when only org-chart sharing is enabled the response uses a reduced fieldset (limited to the fields exposed by the org chart); when the resulting directory has no employees the endpoint returns 404 rather than an empty list. :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 +1214,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 +1222,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 +1247,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 +1286,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[ + dict[str, dict[str, Any]] | 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. + Returns a cursor-paginated collection of employees for the authenticated caller's company. 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. Field values the caller cannot read are returned as `null`, and the names of those suppressed fields are listed on the record in `_restrictedFields`; 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. IDs for `filter[ids]` come from prior responses of this endpoint. Use this for lightweight directory-style listings and batch lookups by ID. For a single employee with the full set of fields, use Get Employee (`get-employee`) instead. For complex filtering (date ranges, multi-field predicates, OR/IN logic), arbitrary sorting, or tabular reports across many fields, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`) instead. - :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 +1356,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 +1366,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[ + dict[str, dict[str, Any]] | 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. + Returns a cursor-paginated collection of employees for the authenticated caller's company. 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. Field values the caller cannot read are returned as `null`, and the names of those suppressed fields are listed on the record in `_restrictedFields`; 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. IDs for `filter[ids]` come from prior responses of this endpoint. Use this for lightweight directory-style listings and batch lookups by ID. For a single employee with the full set of fields, use Get Employee (`get-employee`) instead. For complex filtering (date ranges, multi-field predicates, OR/IN logic), arbitrary sorting, or tabular reports across many fields, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`) instead. - :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 +1450,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 +1460,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[ + dict[str, dict[str, Any]] | 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. + Returns a cursor-paginated collection of employees for the authenticated caller's company. 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. Field values the caller cannot read are returned as `null`, and the names of those suppressed fields are listed on the record in `_restrictedFields`; 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. IDs for `filter[ids]` come from prior responses of this endpoint. Use this for lightweight directory-style listings and batch lookups by ID. For a single employee with the full set of fields, use Get Employee (`get-employee`) instead. For complex filtering (date ranges, multi-field predicates, OR/IN logic), arbitrary sorting, or tabular reports across many fields, use Get Data from Dataset (v2) (`get-data-from-dataset-v2`) instead. - :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 +1544,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 +1554,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 +1581,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 +1629,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 the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/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 photo, use the Upload Employee Photo endpoint (operationId: upload-employee-photo, POST /api/v1/employees/{employeeId}/photo). 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. :param id: The employee ID. (required) :type id: str @@ -1558,7 +1673,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 +1681,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 the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/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 photo, use the Upload Employee Photo endpoint (operationId: upload-employee-photo, POST /api/v1/employees/{employeeId}/photo). 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. :param id: The employee ID. (required) :type id: str @@ -1634,7 +1739,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 +1747,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 the List Fields endpoint (operationId: list-fields, GET /api/v1/meta/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 photo, use the Upload Employee Photo endpoint (operationId: upload-employee-photo, POST /api/v1/employees/{employeeId}/photo). 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. :param id: The employee ID. (required) :type id: str @@ -1709,7 +1805,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 +1813,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 +1838,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 +1857,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 +1886,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..23fde5b 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://www.bamboohr.com/api/documentation/ - 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, StrictInt, StrictStr -from typing import 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.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.")], + 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)] - ] + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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.")], + 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)] - ] + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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.")], + 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)] - ] + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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="employeeId is the employee ID with whom the goal is associated.") + ], + 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). :param employee_id: employeeId is the employee ID with whom the goal is associated. (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="employeeId is the employee ID with whom the goal is associated.") + ], + 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). :param employee_id: employeeId is the employee ID with whom the goal is associated. (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="employeeId is the employee ID with whom the goal is associated.") + ], + 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). :param employee_id: employeeId is the employee ID with whom the goal is associated. (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[ + 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.")], + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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[ + 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.")], + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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[ + 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.")], + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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,36 @@ 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, Field(description="employeeId is the employee ID with whom the goal is associated.") + ], + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +912,57 @@ 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, Field(description="employeeId is the employee ID with whom the goal is associated.") + ], + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +984,56 @@ 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, Field(description="employeeId is the employee ID with whom the goal is associated.") + ], + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +1055,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 +1086,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 +1120,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.")], + 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, + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +1171,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.")], + 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, + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +1245,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.")], + 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, + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +1318,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 +1352,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 +1392,37 @@ 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="employeeId is the employee ID to get alignable goal options for.") + ], + 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 API user. 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. - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: employeeId is the employee ID to get alignable goal options for. (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 +1443,58 @@ 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="employeeId is the employee ID to get alignable goal options for.") + ], + 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 API user. 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. - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: employeeId is the employee ID to get alignable goal options for. (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 +1515,58 @@ 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="employeeId is the employee ID to get alignable goal options for.") + ], + 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 API user. 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. - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: employeeId is the employee ID to get alignable goal options for. (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 +1587,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 +1619,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 +1658,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="employeeId is the employee ID with whom the goal is associated.") + ], + 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. - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) + :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +1706,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="employeeId is the employee ID with whom the goal is associated.") + ], + 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. - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) + :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +1774,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="employeeId is the employee ID with whom the goal is associated.") + ], + 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. - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) + :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +1842,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 +1873,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 +1911,29 @@ 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, Field(description="employeeId is the employee ID with whom the goal is associated.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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 API user has permission to create a goal for this employee. - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) + :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +1954,48 @@ 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, Field(description="employeeId is the employee ID with whom the goal is associated.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 API user has permission to create a goal for this employee. - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) + :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +2016,48 @@ 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, Field(description="employeeId is the employee ID with whom the goal is associated.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 API user has permission to create a goal for this employee. - :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) + :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +2078,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 +2107,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 +2143,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="employeeId is the employee ID used to generate the aggregate information."), + ], + 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. :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) - :type employee_id: int + :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 +2195,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="employeeId is the employee ID used to generate the aggregate information."), + ], + 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. :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) - :type employee_id: int + :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 +2269,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="employeeId is the employee ID used to generate the aggregate information."), + ], + 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. :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) - :type employee_id: int + :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 +2343,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 +2376,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 +2415,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_v1_1( 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="employeeId is the employee ID used to generate the aggregate information.") + ], + 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. - :param employee_id: employeeId is the employee ID to get alignable goal options for. (required) + :param employee_id: employeeId is the employee ID used to generate the aggregate information. (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 +2466,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_v1_1_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_v1_1_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="employeeId is the employee ID used to generate the aggregate information.") + ], + 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. - :param employee_id: employeeId is the employee ID to get alignable goal options for. (required) + :param employee_id: employeeId is the employee ID used to generate the aggregate information. (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 +2539,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_v1_1_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_v1_1_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="employeeId is the employee ID used to generate the aggregate information.") + ], + 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. - :param employee_id: employeeId is the employee ID to get alignable goal options for. (required) + :param employee_id: employeeId is the employee ID used to generate the aggregate information. (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 +2612,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_v1_1_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_v1_1_serialize( self, employee_id, - goal_id, + filter, _request_auth, _content_type, _headers, @@ -2819,49 +2645,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 +2684,38 @@ 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_v1_2( 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[ + StrictInt | None, + Field(description="employeeId is the employee ID used to generate the aggregate information."), + ], + 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. - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) :type employee_id: int + :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 +2736,57 @@ 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_v1_2_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_v1_2_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[ + StrictInt | None, + Field(description="employeeId is the employee ID used to generate the aggregate information."), + ], + 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. - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) :type employee_id: int + :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 +2807,57 @@ 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_v1_2_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_v1_2_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[ + StrictInt | None, + Field(description="employeeId is the employee ID used to generate the aggregate information."), + ], + 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. - :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) + :param employee_id: employeeId is the employee ID used to generate the aggregate information. (required) :type employee_id: int + :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 +2878,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_v1_2_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_v1_2_serialize( self, employee_id, + filter, _request_auth, _content_type, _headers, @@ -3094,45 +2908,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,32 +2947,26 @@ 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="employeeId is the employee ID to whom the goals are assigned.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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. :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) :type employee_id: int @@ -3191,53 +2990,46 @@ 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="employeeId is the employee ID to whom the goals are assigned.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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. :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) :type employee_id: int @@ -3261,53 +3053,46 @@ 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="employeeId is the employee ID to whom the goals are assigned.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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. :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) :type employee_id: int @@ -3331,30 +3116,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 +3146,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,32 +3182,26 @@ 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_v1_1( 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="employeeId is the employee ID to whom the goals are assigned.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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. :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) :type employee_id: int @@ -3462,52 +3225,48 @@ 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_v1_1_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_v1_1_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="employeeId is the employee ID to whom the goals are assigned.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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. :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) :type employee_id: int @@ -3531,52 +3290,48 @@ 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_v1_1_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_v1_1_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="employeeId is the employee ID to whom the goals are assigned.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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. :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) :type employee_id: int @@ -3600,29 +3355,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_v1_1_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_v1_1_serialize( self, employee_id, _request_auth, @@ -3633,45 +3387,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 +3423,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_v1_2( 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[ + StrictInt, Field(description="employeeId is the employee ID to whom the goals are assigned.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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. - :param employee_id: employeeId is the employee ID to get sharing options for. (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 employee_id: employeeId is the employee ID to whom the goals are assigned. (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 @@ -3736,63 +3466,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_v1_2_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_v1_2_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[ + StrictInt, Field(description="employeeId is the employee ID to whom the goals are assigned.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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. - :param employee_id: employeeId is the employee ID to get sharing options for. (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 employee_id: employeeId is the employee ID to whom the goals are assigned. (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 @@ -3813,63 +3528,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_v1_2_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_v1_2_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[ + StrictInt, Field(description="employeeId is the employee ID to whom the goals are assigned.") + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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. - :param employee_id: employeeId is the employee ID to get sharing options for. (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 employee_id: employeeId is the employee ID to whom the goals are assigned. (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 @@ -3890,35 +3590,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_v1_2_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_v1_2_serialize( self, employee_id, - search, - limit, _request_auth, _content_type, _headers, @@ -3927,53 +3619,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 - # process the query parameters - if search is not None: - - _query_params.append(('search', search)) - - if limit is not None: - - _query_params.append(('limit', limit)) - + _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/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 +3655,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.")], + 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +3701,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.")], + 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +3767,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.")], + 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +3833,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 +3864,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 +3902,43 @@ 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="employeeId is the employee ID to get sharing options for.") + ], + search: Annotated[ + StrictStr | None, + Field( + description="The search term used to filter employees returned. Will search name, 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. - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: employeeId is the employee ID to get sharing options for. (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, 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 +3959,64 @@ 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="employeeId is the employee ID to get sharing options for.") + ], + search: Annotated[ + StrictStr | None, + Field( + description="The search term used to filter employees returned. Will search name, 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. - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: employeeId is the employee ID to get sharing options for. (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, 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 +4037,64 @@ 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="employeeId is the employee ID to get sharing options for.") + ], + search: Annotated[ + StrictStr | None, + Field( + description="The search term used to filter employees returned. Will search name, 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. - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: employeeId is the employee ID to get sharing options for. (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, 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 +4115,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 +4148,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 +4190,37 @@ 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="employeeId is the employee ID to whom the goals are assigned.") + ], + 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. - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: employeeId is the employee ID to whom the goals are assigned. (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 +4241,56 @@ 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="employeeId is the employee ID to whom the goals are assigned.") + ], + 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. - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: employeeId is the employee ID to whom the goals are assigned. (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 +4311,56 @@ 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="employeeId is the employee ID to whom the goals are assigned.") + ], + 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. - :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) + :param employee_id: employeeId is the employee ID to whom the goals are assigned. (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 +4381,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 +4411,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,33 +4450,27 @@ 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.")], + 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) :type employee_id: str @@ -4959,55 +4496,48 @@ 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.")], + 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) :type employee_id: str @@ -5033,55 +4563,48 @@ 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.")], + 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) :type employee_id: str @@ -5107,31 +4630,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 +4662,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,35 +4700,31 @@ 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.")], + 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, + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) :type employee_id: str @@ -5229,8 +4732,8 @@ def put_goal_comment( :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,59 +4754,54 @@ 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.")], + 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, + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) :type employee_id: str @@ -5311,8 +4809,8 @@ def put_goal_comment_with_http_info( :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,59 +4831,54 @@ 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.")], + 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, + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) :type employee_id: str @@ -5393,8 +4886,8 @@ def put_goal_comment_without_preload_content( :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 +4908,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 +4944,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,35 +4994,31 @@ 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.")], + 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, + 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. :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) :type employee_id: str @@ -5558,8 +5026,8 @@ def put_goal_milestone_progress( :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,60 +5048,55 @@ 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.")], + 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, + 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. :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) :type employee_id: str @@ -5641,8 +5104,8 @@ def put_goal_milestone_progress_with_http_info( :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,60 +5126,55 @@ 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.")], + 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, + 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. :param employee_id: employeeId is the employee ID to whom the goals are assigned. (required) :type employee_id: str @@ -5724,8 +5182,8 @@ def put_goal_milestone_progress_without_preload_content( :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 +5204,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 +5241,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 +5291,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[ + StrictInt | None, Field(description="employeeId is the employee ID with whom the goal is associated.") + ], + goal_id: Annotated[StrictInt | None, Field(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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) :type employee_id: int :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 + :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 +5345,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[ + StrictInt | None, Field(description="employeeId is the employee ID with whom the goal is associated.") + ], + goal_id: Annotated[StrictInt | None, Field(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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) :type employee_id: int :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 + :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 +5421,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[ + StrictInt | None, Field(description="employeeId is the employee ID with whom the goal is associated.") + ], + goal_id: Annotated[StrictInt | None, Field(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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) :type employee_id: int :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 + :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 +5497,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 +5531,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 +5579,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.")], + 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, + update_goal_sharing_request: Annotated[ + UpdateGoalSharingRequest, + Field( + description='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 employee ID. Returns the updated goal object. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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: 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 +5633,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.")], + 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, + update_goal_sharing_request: Annotated[ + UpdateGoalSharingRequest, + Field( + description='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 employee ID. Returns the updated goal object. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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: 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 +5709,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.")], + 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, + update_goal_sharing_request: Annotated[ + UpdateGoalSharingRequest, + Field( + description='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 employee ID. Returns the updated goal object. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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: 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 +5785,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 +5819,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 +5867,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[ + StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.") + ], + goal_id: Annotated[StrictStr | None, Field(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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +5921,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[ + StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.") + ], + goal_id: Annotated[StrictStr | None, Field(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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +6001,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[ + StrictStr, Field(description="employeeId is the employee ID with whom the goal is associated.") + ], + goal_id: Annotated[StrictStr | None, Field(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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (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 +6081,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 +6119,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 +6167,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_v1_1( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID with whom the goal is associated.")], + 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, + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) :type employee_id: int :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 + :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 +6221,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_v1_1_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_v1_1_with_http_info( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID with whom the goal is associated.")], + 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, + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) :type employee_id: int :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 + :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 +6298,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_v1_1_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_v1_1_without_preload_content( self, - employee_id: Annotated[StrictInt, Field(description="employeeId is the employee ID with whom the goal is associated.")], + 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, + 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. :param employee_id: employeeId is the employee ID with whom the goal is associated. (required) :type employee_id: int :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 + :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 +6375,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_v1_1_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_v1_1_serialize( self, employee_id, goal_id, - put_goal_v11_request, + update_goal_v11_request, _request_auth, _content_type, _headers, @@ -7054,62 +6410,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 +6458,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/hours_api.py b/bamboohr_sdk/api/hours_api.py index 4146842..8b6af22 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://www.bamboohr.com/api/documentation/ - 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,22 +36,16 @@ 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 @@ -87,46 +74,37 @@ 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 @@ -155,46 +133,37 @@ 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 @@ -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,27 +266,19 @@ 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 @@ -366,47 +307,38 @@ 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 @@ -435,47 +367,38 @@ 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 @@ -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,27 +500,24 @@ 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 @@ -647,47 +546,39 @@ 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 @@ -716,47 +607,39 @@ 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 @@ -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,27 +729,21 @@ 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 @@ -915,49 +772,38 @@ 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 @@ -986,49 +832,38 @@ 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 @@ -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,27 +955,19 @@ 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 @@ -1189,47 +996,38 @@ 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 @@ -1258,47 +1056,38 @@ 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 @@ -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 index 39db2ef..1286d81 100644 --- a/bamboohr_sdk/api/last_change_information_api.py +++ b/bamboohr_sdk/api/last_change_information_api.py @@ -1,29 +1,22 @@ -# 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://www.bamboohr.com/api/documentation/ - 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 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 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.rest import RESTResponseType @@ -39,23 +32,24 @@ def __init__(self, api_client=None) -> 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)] - ] + 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_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, ) -> ChangedEmployeeIdsResponse: """Get Changed Employee IDs @@ -86,7 +80,7 @@ def get_changed_employee_ids( 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, @@ -94,40 +88,38 @@ def get_changed_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': "ChangedEmployeeIdsResponse", - '400': None, + _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 = self.api_client.call_api(*_param, _request_timeout=_request_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)] - ] + 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_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[ChangedEmployeeIdsResponse]: """Get Changed Employee IDs @@ -158,7 +150,7 @@ def get_changed_employee_ids_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_changed_employee_ids_serialize( since=since, @@ -166,40 +158,38 @@ def get_changed_employee_ids_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': "ChangedEmployeeIdsResponse", - '400': None, + _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 = self.api_client.call_api(*_param, _request_timeout=_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)] - ] + 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_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 Changed Employee IDs @@ -230,7 +220,7 @@ def get_changed_employee_ids_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_changed_employee_ids_serialize( since=since, @@ -238,20 +228,16 @@ def get_changed_employee_ids_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': "ChangedEmployeeIdsResponse", - '400': None, + _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 = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_changed_employee_ids_serialize( self, since, @@ -264,61 +250,40 @@ def _get_changed_employee_ids_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 since is not None: if isinstance(since, datetime): - _query_params.append( - ( - 'since', - since.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) + _query_params.append(("since", since.strftime(self.api_client.configuration.datetime_format))) else: - _query_params.append(('since', since)) - + _query_params.append(("since", since)) + 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', - '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/changed', + method="GET", + resource_path="/api/v1/employees/changed", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -328,7 +293,5 @@ def _get_changed_employee_ids_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/locations_api.py b/bamboohr_sdk/api/locations_api.py new file mode 100644 index 0000000..4a72a1e --- /dev/null +++ b/bamboohr_sdk/api/locations_api.py @@ -0,0 +1,1406 @@ +""" +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. +""" + +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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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..60f3959 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://www.bamboohr.com/api/documentation/ - 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/onboarding_api.py b/bamboohr_sdk/api/onboarding_api.py new file mode 100644 index 0000000..60158f5 --- /dev/null +++ b/bamboohr_sdk/api/onboarding_api.py @@ -0,0 +1,2839 @@ +""" +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. +""" + +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. + + :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. + + :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. + + :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). + + :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). + + :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). + + :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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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). + + :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). + + :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). + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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, + "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. + + :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, + "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. + + :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, + "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). + + :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). + + :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). + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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/photos_api.py b/bamboohr_sdk/api/photos_api.py index 1f545ae..591223d 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://www.bamboohr.com/api/documentation/ - 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` (typical MCP/LLM-connector usage), the body is a JSON object `{ mimeType, fileBase64 }` with the same image bytes base64-encoded, and the response `Content-Type` is `application/json`. 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. :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` (typical MCP/LLM-connector usage), the body is a JSON object `{ mimeType, fileBase64 }` with the same image bytes base64-encoded, and the response `Content-Type` is `application/json`. 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. :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` (typical MCP/LLM-connector usage), the body is a JSON object `{ mimeType, fileBase64 }` with the same image bytes base64-encoded, and the response `Content-Type` is `application/json`. 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. :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,36 @@ 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 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." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 either a `multipart/form-data` POST with a `file` field carrying raw binary image bytes (typical browser/SDK usage), or an `application/json` POST with a `fileBase64` property carrying the base64-encoded image bytes (typical MCP/LLM-connector usage). The server selects the path based on the request `Content-Type`. 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 (width and height must match within one pixel) and at least 150×150 pixels. 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. :param employee_id: The 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. (required) :type file: bytearray :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -402,7 +391,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 +399,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 +419,33 @@ 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 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." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 either a `multipart/form-data` POST with a `file` field carrying raw binary image bytes (typical browser/SDK usage), or an `application/json` POST with a `fileBase64` property carrying the base64-encoded image bytes (typical MCP/LLM-connector usage). The server selects the path based on the request `Content-Type`. 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 (width and height must match within one pixel) and at least 150×150 pixels. 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. :param employee_id: The 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. (required) :type file: bytearray :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -479,7 +467,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 +475,52 @@ 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 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." + ), + ], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 either a `multipart/form-data` POST with a `file` field carrying raw binary image bytes (typical browser/SDK usage), or an `application/json` POST with a `fileBase64` property carrying the base64-encoded image bytes (typical MCP/LLM-connector usage). The server selects the path based on the request `Content-Type`. 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 (width and height must match within one pixel) and at least 150×150 pixels. 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. :param employee_id: The 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. (required) :type file: bytearray :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -555,7 +542,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 +550,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 +577,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 +621,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..a140ec6 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://www.bamboohr.com/api/documentation/ - 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. :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. :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. :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 employee IDs). The maximum number of fields per request is 400. :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 employee IDs). The maximum number of fields per request is 400. :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 employee IDs). The maximum number of fields per request is 400. :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..0ebe0eb --- /dev/null +++ b/bamboohr_sdk/api/scheduling_api.py @@ -0,0 +1,3587 @@ +""" +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. +""" + +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_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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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 + + :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 + + :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 + + :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. + + :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. + + :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. + + :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] | 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. + + :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[Optional[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] | 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. + + :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[Optional[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] | 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. + + :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[Optional[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. + + :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. + + :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. + + :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`, `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, 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. + + :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`, `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, 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`, `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, 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. + + :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`, `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, 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`, `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, 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. + + :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`, `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, 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_shifts( + self, + ids: Annotated[ + list[UUID] | None, Field(description="Filter by shift IDs. 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. Use the string "null" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null).' + ), + ] = None, + schedule_ids: Annotated[list[UUID] | None, Field(description="Filter by schedule IDs.")] = None, + statuses: Annotated[list[StrictStr] | None, Field(description="Filter by shift statuses.")] = 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. + + :param ids: Filter by shift IDs. 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. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null). + :type employee_ids: List[str] + :param schedule_ids: Filter by schedule IDs. + :type schedule_ids: List[str] + :param statuses: Filter by shift statuses. + :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. 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. Use the string "null" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null).' + ), + ] = None, + schedule_ids: Annotated[list[UUID] | None, Field(description="Filter by schedule IDs.")] = None, + statuses: Annotated[list[StrictStr] | None, Field(description="Filter by shift statuses.")] = 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. + + :param ids: Filter by shift IDs. 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. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null). + :type employee_ids: List[str] + :param schedule_ids: Filter by schedule IDs. + :type schedule_ids: List[str] + :param statuses: Filter by shift statuses. + :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. 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. Use the string "null" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null).' + ), + ] = None, + schedule_ids: Annotated[list[UUID] | None, Field(description="Filter by schedule IDs.")] = None, + statuses: Annotated[list[StrictStr] | None, Field(description="Filter by shift statuses.")] = 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. + + :param ids: Filter by shift IDs. 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. Use the string \"null\" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null). + :type employee_ids: List[str] + :param schedule_ids: Filter by schedule IDs. + :type schedule_ids: List[str] + :param statuses: Filter by shift statuses. + :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": "multi", + "employeeIds": "multi", + "scheduleIds": "multi", + "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 + # 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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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/tabular_data_api.py b/bamboohr_sdk/api/tabular_data_api.py index b15203f..6d51c40 100644 --- a/bamboohr_sdk/api/tabular_data_api.py +++ b/bamboohr_sdk/api/tabular_data_api.py @@ -1,32 +1,25 @@ -# 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://www.bamboohr.com/api/documentation/ - 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 datetime -from pydantic import Field, StrictStr, field_validator -from typing import List, Optional -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.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 bamboohr_sdk.api_client import ApiClient, RequestSerialized -from bamboohr_sdk.api_response import ApiResponse from bamboohr_sdk.rest import RESTResponseType @@ -42,24 +35,23 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def create_table_row( 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 @@ -68,7 +60,7 @@ def create_table_row( :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,7 +84,7 @@ def create_table_row( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._create_table_row_serialize( id=id, @@ -101,22 +93,19 @@ def create_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( @@ -124,24 +113,23 @@ def create_table_row( response_types_map=_response_types_map, ) - @validate_call def create_table_row_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 @@ -150,7 +138,7 @@ def create_table_row_with_http_info( :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,7 +162,7 @@ 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 + """ _param = self._create_table_row_serialize( id=id, @@ -183,46 +171,42 @@ def create_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 create_table_row_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 @@ -231,7 +215,7 @@ def create_table_row_without_preload_content( :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,7 +239,7 @@ 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 + """ _param = self._create_table_row_serialize( id=id, @@ -264,25 +248,21 @@ def create_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 _create_table_row_serialize( self, id, @@ -296,23 +276,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 +297,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,29 +322,26 @@ 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 @@ -387,7 +350,7 @@ def create_table_row_v11( :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 +374,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 +383,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,24 +403,23 @@ 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 @@ -469,7 +428,7 @@ def create_table_row_v11_with_http_info( :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 +452,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,46 +461,42 @@ 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 @@ -550,7 +505,7 @@ def create_table_row_v11_without_preload_content( :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 +529,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 +538,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 +566,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 +587,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 +612,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, + 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. :param id: The 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 +664,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 +673,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, + 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. :param id: The 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 +740,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 +749,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, + 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. :param id: The 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 +816,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 +825,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 +852,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,35 +892,37 @@ def _delete_employee_table_row_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _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, + 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. - :param table: The name of the table to retrieve changed data for (e.g., jobInfo, compensation). (required) + :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 @@ -1034,7 +946,7 @@ def get_changed_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_changed_employee_table_data_serialize( table=table, @@ -1042,48 +954,49 @@ def get_changed_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': "ChangedEmployeeTableDataResponse", - '400': None, - '404': None, + _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 = self.api_client.call_api(*_param, _request_timeout=_request_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, + 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. - :param table: The name of the table to retrieve changed data for (e.g., jobInfo, compensation). (required) + :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 @@ -1107,7 +1020,7 @@ def get_changed_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_changed_employee_table_data_serialize( table=table, @@ -1115,48 +1028,49 @@ def get_changed_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': "ChangedEmployeeTableDataResponse", - '400': None, - '404': None, + _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 = self.api_client.call_api(*_param, _request_timeout=_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, + 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. - :param table: The name of the table to retrieve changed data for (e.g., jobInfo, compensation). (required) + :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 @@ -1180,7 +1094,7 @@ def get_changed_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_changed_employee_table_data_serialize( table=table, @@ -1188,21 +1102,17 @@ def get_changed_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': "ChangedEmployeeTableDataResponse", - '400': None, - '404': None, + _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 = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_changed_employee_table_data_serialize( self, table, @@ -1215,59 +1125,39 @@ def _get_changed_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 table is not None: - _path_params['table'] = table + _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 - ) - ) - ) + _query_params.append(("since", since.strftime(self.api_client.configuration.datetime_format))) else: - _query_params.append(('since', since)) - + _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' - ] - ) - + 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/changed/tables/{table}', + method="GET", + resource_path="/api/v1/employees/changed/tables/{table}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1277,38 +1167,42 @@ def _get_changed_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 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 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 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. :param id: The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user 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 +1226,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 +1235,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 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 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. :param id: The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user 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 +1305,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,41 +1314,44 @@ 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 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 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 @@ -1460,7 +1360,7 @@ def get_employee_table_data_without_preload_content( :param id: The employee ID. Use the special value \"all\" to retrieve table data for all employees the API user 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 +1384,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 +1393,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 +1416,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,30 +1456,27 @@ 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( 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 @@ -1605,7 +1485,7 @@ def update_table_row( :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,7 +1511,7 @@ def update_table_row( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ _param = self._update_table_row_serialize( id=id, @@ -1641,22 +1521,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,25 +1541,24 @@ def update_table_row( response_types_map=_response_types_map, ) - @validate_call def update_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 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 @@ -1691,7 +1567,7 @@ def update_table_row_with_http_info( :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,7 +1593,7 @@ 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 + """ _param = self._update_table_row_serialize( id=id, @@ -1727,47 +1603,43 @@ 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( 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 @@ -1776,7 +1648,7 @@ def update_table_row_without_preload_content( :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,7 +1674,7 @@ 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 + """ _param = self._update_table_row_serialize( id=id, @@ -1812,25 +1684,21 @@ 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( self, id, @@ -1845,25 +1713,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 +1736,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,30 +1761,27 @@ 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 @@ -1939,7 +1790,7 @@ def update_table_row_v11( :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 +1816,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 +1826,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,25 +1846,24 @@ 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 @@ -2025,7 +1872,7 @@ def update_table_row_v11_with_http_info( :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 +1898,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,47 +1908,43 @@ 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 @@ -2110,7 +1953,7 @@ def update_table_row_v11_without_preload_content( :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 +1979,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 +1989,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 +2018,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 +2041,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 +2066,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/time_off_api.py b/bamboohr_sdk/api/time_off_api.py index 3f13e1a..1b8b110 100644 --- a/bamboohr_sdk/api/time_off_api.py +++ b/bamboohr_sdk/api/time_off_api.py @@ -1,29 +1,26 @@ -# 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://www.bamboohr.com/api/documentation/ - 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, StrictInt, StrictStr, field_validator -from typing import List, Optional -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.adjust_time_off_balance import AdjustTimeOffBalance from bamboohr_sdk.models.assign_time_off_policies_request_inner import AssignTimeOffPoliciesRequestInner 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 +31,6 @@ 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.rest import RESTResponseType @@ -52,23 +46,17 @@ 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.")], 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 @@ -99,7 +87,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 +95,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,23 +114,17 @@ 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.")], 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 @@ -176,7 +155,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,44 +163,35 @@ 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.")], 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 @@ -252,7 +222,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 +230,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 +256,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 +275,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,30 +302,22 @@ 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( 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 ID of the employee to assign policies to.")], + assign_time_off_policies_request_inner: list[AssignTimeOffPoliciesRequestInner], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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]: + ) -> list[AssignedTimeOffPolicy]: """Assign Time Off Policies 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. @@ -406,7 +346,7 @@ def assign_time_off_policies( 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_serialize( employee_id=employee_id, @@ -414,45 +354,36 @@ def assign_time_off_policies( _request_auth=_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( 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 ID of the employee to assign policies to.")], + assign_time_off_policies_request_inner: list[AssignTimeOffPoliciesRequestInner], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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]]: + ) -> ApiResponse[list[AssignedTimeOffPolicy]]: """Assign Time Off Policies 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. @@ -481,7 +412,7 @@ 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 + """ _param = self._assign_time_off_policies_serialize( employee_id=employee_id, @@ -489,43 +420,34 @@ def assign_time_off_policies_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[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( 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 ID of the employee to assign policies to.")], + assign_time_off_policies_request_inner: list[AssignTimeOffPoliciesRequestInner], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 @@ -556,7 +478,7 @@ 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 + """ _param = self._assign_time_off_policies_serialize( employee_id=employee_id, @@ -564,23 +486,19 @@ def assign_time_off_policies_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[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( self, employee_id, @@ -593,22 +511,20 @@ def _assign_time_off_policies_serialize( _host = None - _collection_formats: Dict[str, str] = { - 'AssignTimeOffPoliciesRequestInner': '', + _collection_formats: dict[str, str] = { + "AssignTimeOffPoliciesRequestInner": "", } - _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 @@ -616,38 +532,24 @@ def _assign_time_off_policies_serialize( if assign_time_off_policies_request_inner is not None: _body_params = assign_time_off_policies_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,30 +559,22 @@ 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( 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, + assign_time_off_policies_request_inner: list[AssignTimeOffPoliciesRequestInner], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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]: + ) -> 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. @@ -709,7 +603,7 @@ 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( employee_id=employee_id, @@ -717,46 +611,37 @@ def assign_time_off_policies_v1_1( _request_auth=_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( 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, + assign_time_off_policies_request_inner: list[AssignTimeOffPoliciesRequestInner], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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]]: + ) -> 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. @@ -785,7 +670,7 @@ 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( employee_id=employee_id, @@ -793,44 +678,35 @@ def assign_time_off_policies_v1_1_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[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( 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, + assign_time_off_policies_request_inner: list[AssignTimeOffPoliciesRequestInner], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 @@ -861,7 +737,7 @@ 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( employee_id=employee_id, @@ -869,24 +745,20 @@ def assign_time_off_policies_v1_1_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[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( self, employee_id, @@ -899,22 +771,20 @@ def _assign_time_off_policies_v1_1_serialize( _host = None - _collection_formats: Dict[str, str] = { - 'AssignTimeOffPoliciesRequestInner': '', + _collection_formats: dict[str, str] = { + "AssignTimeOffPoliciesRequestInner": "", } - _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 @@ -922,38 +792,24 @@ def _assign_time_off_policies_v1_1_serialize( if assign_time_off_policies_request_inner is not None: _body_params = assign_time_off_policies_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,28 +819,20 @@ 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.")], 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 @@ -1015,7 +863,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 +871,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,23 +891,17 @@ 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.")], 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 @@ -1093,7 +932,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,45 +940,36 @@ 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.")], 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 @@ -1170,7 +1000,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 +1008,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 +1035,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 +1054,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,33 +1081,27 @@ 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[ + StrictInt | None, Field(description="The ID of the employee to create the time off request for.") + ], 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. :param employee_id: The ID of the employee to create the time off request for. (required) :type employee_id: int @@ -1325,7 +1127,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,50 +1135,42 @@ 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[ + StrictInt | None, Field(description="The ID of the employee to create the time off request for.") + ], 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. :param employee_id: The ID of the employee to create the time off request for. (required) :type employee_id: int @@ -1402,7 +1196,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,49 +1204,42 @@ 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[ + StrictInt | None, Field(description="The ID of the employee to create the time off request for.") + ], 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. :param employee_id: The ID of the employee to create the time off request for. (required) :type employee_id: int @@ -1478,7 +1265,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 +1273,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 +1299,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 +1318,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,32 +1345,38 @@ 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[ + StrictInt | None, Field(description="The ID of the employee to get time off balances for.") + ], + 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, - ) -> 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. @@ -1638,7 +1409,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,45 +1419,50 @@ 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, + "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[ + StrictInt | None, Field(description="The ID of the employee to get time off balances for.") + ], + 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. @@ -1719,7 +1495,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,43 +1505,48 @@ 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, + "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[ + StrictInt | None, Field(description="The ID of the employee to get time off balances for.") + ], + 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, ) -> RESTResponseType: """Get Time Off Balance @@ -1800,7 +1581,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 +1591,17 @@ 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, + "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 +1616,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,29 +1663,21 @@ 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( 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[StrictInt | None, Field(description="The ID of the 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, - ) -> List[EmployeeTimeOffPolicyAssignment]: + ) -> list[EmployeeTimeOffPolicyAssignment]: """List Employee Time Off Policies Returns the time off policies currently assigned to the specified employee, including policy ID, time off type, and accrual start date. @@ -1956,49 +1704,40 @@ 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 + """ _param = self._list_employee_time_off_policies_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( 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[StrictInt | None, Field(description="The ID of the 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[List[EmployeeTimeOffPolicyAssignment]]: + ) -> ApiResponse[list[EmployeeTimeOffPolicyAssignment]]: """List Employee Time Off Policies Returns the time off policies currently assigned to the specified employee, including policy ID, time off type, and accrual start date. @@ -2025,47 +1764,38 @@ 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 + """ _param = self._list_employee_time_off_policies_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( 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[StrictInt | None, Field(description="The ID of the 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: """List Employee Time Off Policies @@ -2094,28 +1824,24 @@ 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 + """ _param = self._list_employee_time_off_policies_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( self, employee_id, @@ -2127,45 +1853,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,32 +1889,24 @@ 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( 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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[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. :param employee_id: The ID of the employee. (required) :type employee_id: int @@ -2224,52 +1930,43 @@ 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( 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( 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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]]: + ) -> 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. :param employee_id: The ID of the employee. (required) :type employee_id: int @@ -2293,52 +1990,43 @@ 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( 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( 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 - 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. :param employee_id: The ID of the employee. (required) :type employee_id: int @@ -2362,28 +2050,24 @@ 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( 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( self, employee_id, @@ -2395,45 +2079,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,29 +2115,23 @@ 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. @@ -2492,49 +2158,42 @@ 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. @@ -2561,47 +2220,40 @@ 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 @@ -2630,28 +2282,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 +2311,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,44 +2347,70 @@ 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[StrictInt | 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[ + StrictInt | None, Field(description="A particular 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, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = 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. - :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 @@ -2784,7 +2446,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,57 +2461,82 @@ 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[StrictInt | 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[ + StrictInt | None, Field(description="A particular 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_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[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. - :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 @@ -2885,7 +2572,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,57 +2587,82 @@ 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[StrictInt | 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[ + StrictInt | None, Field(description="A particular 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, ) -> 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. - :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 @@ -2986,7 +2698,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 +2713,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 +2743,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,28 +2809,27 @@ 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 @@ -3186,7 +2860,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,40 +2868,38 @@ 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 @@ -3258,7 +2930,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,40 +2938,38 @@ 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, + 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, ) -> RESTResponseType: """List Time Off Types @@ -3330,7 +3000,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 +3008,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 +3030,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 +3069,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, + 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_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[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`. :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -3452,7 +3107,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 +3129,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 +3139,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`. :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -3533,7 +3189,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 +3211,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 +3221,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`. :param accept_header_parameter: This endpoint can produce either JSON or XML. :type accept_header_parameter: str @@ -3614,7 +3271,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 +3293,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 +3303,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 +3328,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,28 +3379,20 @@ 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 update_time_off_request_status( self, - request_id: Annotated[StrictInt, Field(description="The ID of the time off request to update.")], + request_id: Annotated[StrictInt | 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 @@ -3806,7 +3423,7 @@ 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 + """ _param = self._update_time_off_request_status_serialize( request_id=request_id, @@ -3814,20 +3431,17 @@ 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": None, + "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( @@ -3835,23 +3449,17 @@ def update_time_off_request_status( response_types_map=_response_types_map, ) - @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[StrictInt | 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 @@ -3882,7 +3490,7 @@ 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 + """ _param = self._update_time_off_request_status_serialize( request_id=request_id, @@ -3890,43 +3498,34 @@ 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": None, + "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[StrictInt | 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 @@ -3957,7 +3556,7 @@ 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 + """ _param = self._update_time_off_request_status_serialize( request_id=request_id, @@ -3965,23 +3564,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": None, + "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 +3589,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 +3608,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 +3635,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..8e1168e 100644 --- a/bamboohr_sdk/api/time_tracking_api.py +++ b/bamboohr_sdk/api/time_tracking_api.py @@ -1,56 +1,83 @@ -# 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://www.bamboohr.com/api/documentation/ - 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, 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 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.clock_entries_schema import ClockEntriesSchema 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.get_break_policy_suggestions_request import GetBreakPolicySuggestionsRequest from bamboohr_sdk.models.hour_entries_request_schema import HourEntriesRequestSchema from bamboohr_sdk.models.hour_entry_ids_schema import HourEntryIdsSchema 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_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.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_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_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_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_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_policy_v1 import ( + TimeTrackingUpdateTimeTrackingBreakPolicyV1, +) from bamboohr_sdk.models.time_tracking_update_time_tracking_break_v1 import TimeTrackingUpdateTimeTrackingBreakV1 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.rest import RESTResponseType @@ -66,23 +93,17 @@ 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( 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 @@ -113,7 +134,7 @@ 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, @@ -121,20 +142,17 @@ def assign_employees_to_break_policy( _request_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] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "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( @@ -142,23 +160,17 @@ def assign_employees_to_break_policy( 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: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - 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]: """Assign Employees to Break Policy @@ -189,7 +201,7 @@ 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, @@ -197,43 +209,34 @@ def assign_employees_to_break_policy_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]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_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: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - 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: """Assign Employees to Break Policy @@ -264,7 +267,7 @@ 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, @@ -272,23 +275,19 @@ def assign_employees_to_break_policy_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]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _assign_employees_to_break_policy_serialize( self, id, @@ -301,21 +300,18 @@ 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 + _path_params["id"] = id # process the query parameters # process the header parameters # process the form parameters @@ -323,38 +319,24 @@ def _assign_employees_to_break_policy_serialize( 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' - ] - ) + 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/break-policies/{id}/assign", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -364,28 +346,20 @@ 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( 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)] - ] - ] = 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, ) -> TimeTrackingTimeTrackingBreakV1: """Create Break @@ -416,7 +390,7 @@ 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, @@ -424,41 +398,32 @@ def create_break( _request_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] = { + "201": "TimeTrackingTimeTrackingBreakV1", + "422": "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_break_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)] - ] - ] = 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 @@ -489,7 +454,7 @@ 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, @@ -497,41 +462,32 @@ def create_break_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': "TimeTrackingTimeTrackingBreakV1", - '422': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_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: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - 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 Break @@ -562,7 +518,7 @@ 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, @@ -570,21 +526,17 @@ def create_break_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': "TimeTrackingTimeTrackingBreakV1", - '422': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_break_serialize( self, id, @@ -597,21 +549,18 @@ def _create_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 @@ -619,38 +568,24 @@ def _create_break_serialize( 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' - ] - ) + 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/break-policies/{id}/breaks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -660,27 +595,19 @@ 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( 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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 @@ -709,47 +636,38 @@ 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, _request_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": "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", + "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 create_break_policy_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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 @@ -778,47 +696,38 @@ 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, _request_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": "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", + "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 create_break_policy_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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 @@ -847,28 +756,24 @@ 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, _request_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": "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", + "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 _create_break_policy_serialize( self, time_tracking_create_time_tracking_break_policy_v1, @@ -880,17 +785,14 @@ 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 @@ -900,38 +802,24 @@ def _create_break_policy_serialize( 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' - ] - ) + 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/break-policies", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -941,29 +829,21 @@ 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( 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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[TimesheetEntryInfoApiTransformer]: + ) -> list[TimesheetEntryInfoApiTransformer]: """Create or Update Timesheet Clock Entries Creates or updates timesheet clock entries in bulk. Entries with an existing ID are updated; entries without an ID are created. @@ -990,55 +870,46 @@ 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, _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] = { + "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_or_update_timesheet_clock_entries_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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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[TimesheetEntryInfoApiTransformer]]: + ) -> ApiResponse[list[TimesheetEntryInfoApiTransformer]]: """Create or Update Timesheet Clock Entries Creates or updates timesheet clock entries in bulk. Entries with an existing ID are updated; entries without an ID are created. @@ -1065,53 +936,44 @@ 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, _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] = { + "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_or_update_timesheet_clock_entries_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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 @@ -1140,34 +1002,30 @@ 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, _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] = { + "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_or_update_timesheet_clock_entries_serialize( self, clock_entries_schema, @@ -1179,17 +1037,14 @@ 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 @@ -1199,38 +1054,24 @@ def _create_or_update_timesheet_clock_entries_serialize( 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/clock_entries/store', + method="POST", + resource_path="/api/v1/time_tracking/clock_entries/store", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1240,29 +1081,21 @@ 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( 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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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[TimesheetEntryInfoApiTransformer]: + ) -> list[TimesheetEntryInfoApiTransformer]: """Create or Update Timesheet Hour Entries Creates or updates timesheet hour entries in bulk. Entries with an existing ID are updated; entries without an ID are created. @@ -1289,55 +1122,46 @@ 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, _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] = { + "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_or_update_timesheet_hour_entries_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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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[TimesheetEntryInfoApiTransformer]]: + ) -> ApiResponse[list[TimesheetEntryInfoApiTransformer]]: """Create or Update Timesheet Hour Entries Creates or updates timesheet hour entries in bulk. Entries with an existing ID are updated; entries without an ID are created. @@ -1364,53 +1188,44 @@ 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, _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] = { + "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_or_update_timesheet_hour_entries_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, + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 @@ -1439,34 +1254,30 @@ 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, _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] = { + "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_or_update_timesheet_hour_entries_serialize( self, hour_entries_request_schema, @@ -1478,17 +1289,14 @@ 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 @@ -1498,38 +1306,24 @@ def _create_or_update_timesheet_hour_entries_serialize( 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/hour_entries/store', + method="POST", + resource_path="/api/v1/time_tracking/hour_entries/store", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1539,35 +1333,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_project( 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, + 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, - ) -> TimeTrackingProjectWithTasksAndEmployeeIds: + ) -> ProjectTimeTrackingProjectV1: """Create Time Tracking Project - 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 project. Returns the newly created project resource on success. - :param project_create_request_schema: (required) - :type project_create_request_schema: ProjectCreateRequestSchema + :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 @@ -1588,59 +1374,49 @@ 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_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]] = { - '201': "TimeTrackingProjectWithTasksAndEmployeeIds", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "ProjectTimeTrackingProjectV1", + "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_time_tracking_project_with_http_info( + def create_project_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, + 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[TimeTrackingProjectWithTasksAndEmployeeIds]: + ) -> ApiResponse[ProjectTimeTrackingProjectV1]: """Create Time Tracking Project - 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 project. Returns the newly created project resource on success. - :param project_create_request_schema: (required) - :type project_create_request_schema: ProjectCreateRequestSchema + :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 @@ -1661,59 +1437,49 @@ 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_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]] = { - '201': "TimeTrackingProjectWithTasksAndEmployeeIds", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "ProjectTimeTrackingProjectV1", + "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_time_tracking_project_without_preload_content( + def create_project_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, + 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: """Create Time Tracking Project - 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 project. Returns the newly created project resource on success. - :param project_create_request_schema: (required) - :type project_create_request_schema: ProjectCreateRequestSchema + :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 @@ -1734,35 +1500,30 @@ 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_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]] = { - '201': "TimeTrackingProjectWithTasksAndEmployeeIds", - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '406': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _response_types_map: dict[str, str | None] = { + "201": "ProjectTimeTrackingProjectV1", + "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_time_tracking_project_serialize( + def _create_project_serialize( self, - project_create_request_schema, + project_create_time_tracking_project_v1, _request_auth, _content_type, _headers, @@ -1771,58 +1532,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 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"]) # 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/projects", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1832,38 +1576,30 @@ 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_project_task( 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, + 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, - ) -> TimesheetEntryInfoApiTransformer: - """Create Timesheet Clock-In Entry + ) -> ProjectTimeTrackingTaskV1: + """Create Time Tracking Project Task - 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 a new task on the specified time tracking project. - :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 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 @@ -1884,65 +1620,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_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 - ) - - _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", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + _host_index=_host_index, ) + + _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.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_project_task_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, + 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[TimesheetEntryInfoApiTransformer]: - """Create Timesheet Clock-In Entry + ) -> ApiResponse[ProjectTimeTrackingTaskV1]: + """Create Time Tracking Project Task - 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 a new task on the specified time tracking project. - :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 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 @@ -1963,65 +1686,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_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 - ) - - _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", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + _host_index=_host_index, ) + + _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.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_project_task_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, + 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: - """Create Timesheet Clock-In Entry + """Create Time Tracking Project Task - 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 a new task on the specified time tracking project. - :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 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 @@ -2042,39 +1752,31 @@ 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_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 - ) - - _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", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + _host_index=_host_index, ) - return response_data.response + _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) + return response_data.response - def _create_timesheet_clock_in_entry_serialize( + def _create_project_task_serialize( self, - employee_id, - clock_in_request_schema, + project_id, + project_create_time_tracking_project_task_v1, _request_auth, _content_type, _headers, @@ -2083,60 +1785,43 @@ 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 + 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 clock_in_request_schema is not None: - _body_params = clock_in_request_schema - + 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 + _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/projects/{projectId}/tasks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2146,38 +1831,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_time_tracking_project( 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, + 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, - ) -> TimesheetEntryInfoApiTransformer: - """Create Timesheet Clock-Out Entry + ) -> TimeTrackingProjectWithTasksAndEmployeeIds: + """Create Time Tracking Project - 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 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. - :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 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 @@ -2198,64 +1872,50 @@ 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_time_tracking_project_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, Optional[str]] = { - '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 + _host_index=_host_index, ) + + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingProjectWithTasksAndEmployeeIds", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "406": "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_timesheet_clock_out_entry_with_http_info( + def create_time_tracking_project_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, + 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[TimesheetEntryInfoApiTransformer]: - """Create Timesheet Clock-Out Entry + ) -> ApiResponse[TimeTrackingProjectWithTasksAndEmployeeIds]: + """Create Time Tracking Project - 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 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. - :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 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 @@ -2276,64 +1936,50 @@ 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_time_tracking_project_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, Optional[str]] = { - '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 + _host_index=_host_index, ) + + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingProjectWithTasksAndEmployeeIds", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "406": "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_timesheet_clock_out_entry_without_preload_content( + def create_time_tracking_project_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, + 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, ) -> RESTResponseType: - """Create Timesheet Clock-Out Entry + """Create Time Tracking Project - 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 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. - :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 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 @@ -2354,38 +2000,31 @@ 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, - _request_auth=_request_auth, + _param = self._create_time_tracking_project_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, Optional[str]] = { - '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 + _host_index=_host_index, ) - return response_data.response + _response_types_map: dict[str, str | None] = { + "201": "TimeTrackingProjectWithTasksAndEmployeeIds", + "400": "ProblemDetailsResponse", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "406": "ProblemDetailsResponse", + "409": "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( + def _create_time_tracking_project_serialize( self, - employee_id, - clock_out_request_schema, + project_create_request_schema, _request_auth, _content_type, _headers, @@ -2394,60 +2033,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 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' - ] - ) + 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/projects", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2457,35 +2077,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_timesheet_clock_in_entry( 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, + employee_id: Annotated[StrictInt | None, Field(description="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[None]: - """Delete Break + ) -> TimesheetEntryInfoApiTransformer: + """Create Timesheet Clock-In Entry - Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. + 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`. - :param id: The break ID. (required) - :type id: str + :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 _request_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 +2121,56 @@ 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_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, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _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 = 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_timesheet_clock_in_entry_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, + employee_id: Annotated[StrictInt | None, Field(description="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[None]: - """Delete Break + ) -> ApiResponse[TimesheetEntryInfoApiTransformer]: + """Create Timesheet Clock-In Entry - Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. + 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`. - :param id: The break ID. (required) - :type id: str + :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 _request_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 +2191,56 @@ 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_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, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_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_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)] - ] - ] = 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="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: - """Delete Break + """Create Timesheet Clock-In Entry - Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. + 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`. - :param id: The break ID. (required) - :type id: str + :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 _request_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 +2261,35 @@ 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_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, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _delete_break_serialize( + def _create_timesheet_clock_in_entry_serialize( self, - id, + employee_id, + clock_in_request_schema, _request_auth, _content_type, _headers, @@ -2684,45 +2298,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 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' - ] - ) + 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/employees/{employeeId}/clock_in", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2732,35 +2344,30 @@ 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_timesheet_clock_out_entry( 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, + employee_id: Annotated[StrictInt | None, Field(description="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[None]: - """Delete Break Policy + ) -> TimesheetEntryInfoApiTransformer: + """Create Timesheet Clock-Out Entry - Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. + 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`. - :param id: The break policy ID. (required) - :type id: str + :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 _request_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 +2388,55 @@ 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_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, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _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 = 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_timesheet_clock_out_entry_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, + employee_id: Annotated[StrictInt | None, Field(description="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[None]: - """Delete Break Policy + ) -> ApiResponse[TimesheetEntryInfoApiTransformer]: + """Create Timesheet Clock-Out Entry - Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. + 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`. - :param id: The break policy ID. (required) - :type id: str + :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 _request_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 +2457,55 @@ 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_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, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_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_timesheet_clock_out_entry_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, + employee_id: Annotated[StrictInt | None, Field(description="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: - """Delete Break Policy + """Create Timesheet Clock-Out Entry - Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. + 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`. - :param id: The break policy ID. (required) - :type id: str + :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 _request_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 +2526,34 @@ 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_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, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _delete_break_policy_serialize( + def _create_timesheet_clock_out_entry_serialize( self, - id, + employee_id, + clock_out_request_schema, _request_auth, _content_type, _headers, @@ -2959,45 +2562,43 @@ 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 + 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' - ] - ) + 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/employees/{employeeId}/clock_out", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3007,35 +2608,27 @@ 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 delete_break( 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, + 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 Timesheet Clock Entries + """Delete Break - Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. - :param clock_entry_ids_schema: (required) - :type clock_entry_ids_schema: ClockEntryIdsSchema + :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 @@ -3056,29 +2649,20 @@ 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, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _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, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _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 = 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( @@ -3086,30 +2670,24 @@ def delete_timesheet_clock_entries_via_post( response_types_map=_response_types_map, ) - @validate_call - def delete_timesheet_clock_entries_via_post_with_http_info( + def delete_break_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, + 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 Timesheet Clock Entries + """Delete Break - Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. - :param clock_entry_ids_schema: (required) - :type clock_entry_ids_schema: ClockEntryIdsSchema + :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 @@ -3130,59 +2708,44 @@ 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, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _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, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_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 delete_break_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, + 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 Timesheet Clock Entries + """Delete Break - Deletes one or more timesheet clock entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + Deletes a time tracking break by its UUID. The break is soft-deleted and removed from any break policies it was associated with. - :param clock_entry_ids_schema: (required) - :type clock_entry_ids_schema: ClockEntryIdsSchema + :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 @@ -3203,35 +2766,25 @@ 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, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _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, Optional[str]] = { - '204': None, - '400': "ProblemDetailsResponse", - '401': "ProblemDetailsResponse", - '403': "ProblemDetailsResponse", - '409': "ProblemDetailsResponse", - '412': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _delete_timesheet_clock_entries_via_post_serialize( + def _delete_break_serialize( self, - clock_entry_ids_schema, + id, _request_auth, _content_type, _headers, @@ -3240,58 +2793,33 @@ 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 + 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 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 + 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/time_tracking/clock_entries/delete', + method="DELETE", + resource_path="/api/v1/time-tracking/breaks/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3301,35 +2829,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 delete_break_policy( 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, + 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 Timesheet Hour Entries + """Delete Break Policy - Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. - :param hour_entry_ids_schema: (required) - :type hour_entry_ids_schema: HourEntryIdsSchema + :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 @@ -3350,30 +2870,20 @@ 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, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _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_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + _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( @@ -3381,30 +2891,24 @@ def delete_timesheet_hour_entries_via_post( response_types_map=_response_types_map, ) - @validate_call - def delete_timesheet_hour_entries_via_post_with_http_info( + def delete_break_policy_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, + 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 Timesheet Hour Entries + """Delete Break Policy - Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. - :param hour_entry_ids_schema: (required) - :type hour_entry_ids_schema: HourEntryIdsSchema + :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 @@ -3425,60 +2929,44 @@ 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, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _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_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + _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_timesheet_hour_entries_via_post_without_preload_content( + def delete_break_policy_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, + 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 Timesheet Hour Entries + """Delete Break Policy - Deletes one or more timesheet hour entries by their IDs. Delete operations are idempotent; deleting already-removed entries does not require client retries. + Deletes a break policy by its UUID. Associated breaks and employee assignments are also removed. - :param hour_entry_ids_schema: (required) - :type hour_entry_ids_schema: HourEntryIdsSchema + :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 @@ -3499,36 +2987,25 @@ 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, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _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_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + _param = self._delete_break_policy_serialize( + id=id, _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] = { + "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_timesheet_hour_entries_via_post_serialize( + def _delete_break_policy_serialize( self, - hour_entry_ids_schema, + id, _request_auth, _content_type, _headers, @@ -3537,58 +3014,33 @@ 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 + 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 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 + 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/time_tracking/hour_entries/delete', + method="DELETE", + resource_path="/api/v1/time-tracking/break-policies/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3598,35 +3050,27 @@ 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 get_break( + def delete_project( 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, + 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, - ) -> TimeTrackingTimeTrackingBreakV1: - """Get Break + ) -> ApiResponse[None]: + """Delete Time Tracking Project - Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration. + Deletes a time tracking project by its ID. - :param id: The break ID. (required) - :type id: str + :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 @@ -3647,56 +3091,45 @@ def get_break( 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, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _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, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _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 = 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_break_with_http_info( + def delete_project_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, + 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[TimeTrackingTimeTrackingBreakV1]: - """Get Break + ) -> ApiResponse[None]: + """Delete Time Tracking Project - Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration. + Deletes a time tracking project by its ID. - :param id: The break ID. (required) - :type id: str + :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 @@ -3717,56 +3150,44 @@ 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, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _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, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_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 delete_project_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, + 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 Break + """Delete Time Tracking Project - Retrieves a single time tracking break by its UUID. Returns the full break details including name, duration, paid status, and availability configuration. + Deletes a time tracking project by its ID. - :param id: The break ID. (required) - :type id: str + :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 @@ -3787,30 +3208,23 @@ 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, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _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, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_break_serialize( + def _delete_project_serialize( self, id, _request_auth, @@ -3821,45 +3235,33 @@ 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 + _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/time-tracking/breaks/{id}', + method="DELETE", + resource_path="/api/v1/time-tracking/projects/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3869,38 +3271,27 @@ 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 delete_task( 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)] - ] - ] = 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.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, 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 + ) -> ApiResponse[None]: + """Delete Time Tracking Task - Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks. + Deletes a time tracking task by its ID. - :param id: The break policy ID. (required) - :type id: str - :param include_counts: Include employee and break counts - :type include_counts: bool + :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 @@ -3921,61 +3312,45 @@ 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, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _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, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _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 = 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_break_policy_with_http_info( + def delete_task_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)] - ] - ] = 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.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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[None]: + """Delete Time Tracking Task - Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks. + Deletes a time tracking task by its ID. - :param id: The break policy ID. (required) - :type id: str - :param include_counts: Include employee and break counts - :type include_counts: bool + :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 @@ -3996,61 +3371,44 @@ 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, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _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, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_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 delete_task_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)] - ] - ] = 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.")], + _request_timeout: None + | Annotated[StrictFloat, Field(gt=0)] + | tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]] = None, + _request_auth: dict[StrictStr, Any] | 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 + """Delete Time Tracking Task - Retrieves a single break policy by its UUID. When includeCounts is enabled, the response includes the number of associated employees and breaks. + Deletes a time tracking task by its ID. - :param id: The break policy ID. (required) - :type id: str - :param include_counts: Include employee and break counts - :type include_counts: bool + :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 @@ -4071,35 +3429,25 @@ 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, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + _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, Optional[str]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _get_break_policy_serialize( + def _delete_task_serialize( self, id, - include_counts, _request_auth, _content_type, _headers, @@ -4108,49 +3456,33 @@ 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 + _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' - ] - ) - + 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="DELETE", + resource_path="/api/v1/time-tracking/tasks/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4160,41 +3492,2566 @@ 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 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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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_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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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 get_project( + self, + project_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. + + :param project_id: The project ID. (required) + :type project_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( + project_id=project_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, + project_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. + + :param project_id: The project ID. (required) + :type project_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( + project_id=project_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, + project_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. + + :param project_id: The project ID. (required) + :type project_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( + project_id=project_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, + project_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 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 + + # 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}", + 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. + + :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. + + :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. + + :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 list_break_assessments( 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)] - ] + 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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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_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, - ) -> TimeTrackingPaginatedBreakAssessmentsResponseV1: - """List Break Assessments + ) -> TimeTrackingPaginatedBreakPolicyEmployeesResponseV1: + """List Break Policy Employees - 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. + Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array. - :param offset: Number of items to skip before returning results. Defaults to 0. + :param id: The break policy ID. (required) + :type id: str + :param offset: The offset of items to retrieve :type offset: int - :param limit: Maximum number of items to return. Defaults to 100. Maximum is 500. + :param limit: The maximum items to retrieve :type limit: int - :param filter: OData v4 filter expression. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `createdAt`, `updatedAt`, `expectedDuration`, `recordedDuration`, `durationDifference`. - :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 @@ -4215,63 +6072,56 @@ 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( + _param = self._list_break_policy_employees_serialize( + id=id, offset=offset, limit=limit, - 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': "TimeTrackingPaginatedBreakAssessmentsResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_request_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_break_policy_employees_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)] - ] + 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_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[TimeTrackingPaginatedBreakAssessmentsResponseV1]: - """List Break Assessments + ) -> ApiResponse[TimeTrackingPaginatedBreakPolicyEmployeesResponseV1]: + """List Break Policy Employees - 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. + Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array. - :param offset: Number of items to skip before returning results. Defaults to 0. + :param id: The break policy ID. (required) + :type id: str + :param offset: The offset of items to retrieve :type offset: int - :param limit: Maximum number of items to return. Defaults to 100. Maximum is 500. + :param limit: The maximum items to retrieve :type limit: int - :param filter: OData v4 filter expression. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `createdAt`, `updatedAt`, `expectedDuration`, `recordedDuration`, `durationDifference`. - :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 @@ -4292,63 +6142,56 @@ 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( + _param = self._list_break_policy_employees_serialize( + id=id, offset=offset, limit=limit, - 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': "TimeTrackingPaginatedBreakAssessmentsResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_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_break_policy_employees_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)] - ] + 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_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 Break Assessments + """List Break Policy Employees - 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. + Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array. - :param offset: Number of items to skip before returning results. Defaults to 0. + :param id: The break policy ID. (required) + :type id: str + :param offset: The offset of items to retrieve :type offset: int - :param limit: Maximum number of items to return. Defaults to 100. Maximum is 500. + :param limit: The maximum items to retrieve :type limit: int - :param filter: OData v4 filter expression. Filterable fields: `id`, `breakId`, `employeeId`, `employeeTimesheetId`, `date`, `result`, `availableYmdt`, `unavailableYmdt`, `createdAt`, `updatedAt`, `expectedDuration`, `recordedDuration`, `durationDifference`. - :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 @@ -4369,35 +6212,291 @@ 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( + _param = self._list_break_policy_employees_serialize( + id=id, offset=offset, limit=limit, - 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, 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 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. + + :param id: The 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 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. + + :param id: The 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 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. + + :param id: The 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, Optional[str]] = { - '200': "TimeTrackingPaginatedBreakAssessmentsResponseV1", - '403': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", + _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 = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _list_break_assessments_serialize( + def _list_employee_break_availabilities_serialize( self, - offset, - limit, - filter, + id, + effective, _request_auth, _content_type, _headers, @@ -4406,55 +6505,36 @@ 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 + 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 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' - ] - ) - + 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/employees/{id}/break-availabilities", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4464,44 +6544,41 @@ 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_employee_break_policies( 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)] - ] + id: Annotated[StrictInt, Field(description="The 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, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = 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 Break Policies + """List Employee Break Policies - Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy. + Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. - :param offset: The offset of items to retrieve + :param id: The 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 items to retrieve + :param limit: The maximum number of items to return. Must be between 0 and 500. Defaults to 100. :type limit: int - :param filter: Filter by an OData (Open Data Protocol) v4 specification - :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 @@ -4522,67 +6599,62 @@ 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( + _param = self._list_employee_break_policies_serialize( + id=id, offset=offset, limit=limit, - filter=filter, - include_counts=include_counts, _request_auth=_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": "TimeTrackingPaginatedBreakPoliciesResponseV1", + "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_policies_with_http_info( + def list_employee_break_policies_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)] - ] + id: Annotated[StrictInt, Field(description="The 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, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = 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 Break Policies + """List Employee Break Policies - Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy. + Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. - :param offset: The offset of items to retrieve + :param id: The 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 items to retrieve + :param limit: The maximum number of items to return. Must be between 0 and 500. Defaults to 100. :type limit: int - :param filter: Filter by an OData (Open Data Protocol) v4 specification - :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 @@ -4603,67 +6675,62 @@ 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( + _param = self._list_employee_break_policies_serialize( + id=id, offset=offset, limit=limit, - filter=filter, - include_counts=include_counts, _request_auth=_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": "TimeTrackingPaginatedBreakPoliciesResponseV1", + "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_policies_without_preload_content( + def list_employee_break_policies_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)] - ] + id: Annotated[StrictInt, Field(description="The 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, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = 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 Break Policies + """List Employee Break Policies - Returns a paginated list of all break policies. Supports OData v4 filtering. Use includeCounts to include employee and break counts per policy. + Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. - :param offset: The offset of items to retrieve + :param id: The 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 items to retrieve + :param limit: The maximum number of items to return. Must be between 0 and 500. Defaults to 100. :type limit: int - :param filter: Filter by an OData (Open Data Protocol) v4 specification - :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 @@ -4684,37 +6751,31 @@ 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( + _param = self._list_employee_break_policies_serialize( + id=id, offset=offset, limit=limit, - filter=filter, - include_counts=include_counts, _request_auth=_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": "TimeTrackingPaginatedBreakPoliciesResponseV1", + "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_policies_serialize( + def _list_employee_break_policies_serialize( self, + id, offset, limit, - filter, - include_counts, _request_auth, _content_type, _headers, @@ -4723,59 +6784,39 @@ 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 + if id is not None: + _path_params["id"] = id # process the query parameters if offset is not None: - - _query_params.append(('offset', offset)) - + _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(("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/time-tracking/break-policies', + method="GET", + resource_path="/api/v1/time-tracking/employees/{id}/break-policies", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4785,44 +6826,47 @@ 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_project_tasks( 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)] - ] + project_id: Annotated[StrictInt, 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_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 - - Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering. - - :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 + ) -> 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`. + + :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 @@ -4843,67 +6887,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_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 + _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": "ProjectPaginatedTasksResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "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_breaks_with_http_info( + def list_project_tasks_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)] - ] + project_id: Annotated[StrictInt, 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, - _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=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[TimeTrackingPaginatedBreaksResponseV1]: - """List Breaks for Break Policy - - Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering. - - :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 + ) -> 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`. + + :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 @@ -4924,67 +6972,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_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 + _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": "ProjectPaginatedTasksResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "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_breaks_without_preload_content( + def list_project_tasks_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)] - ] + project_id: Annotated[StrictInt, 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, - _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 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 Breaks for Break Policy - - Returns a paginated list of breaks belonging to the specified break policy. Supports OData v4 filtering. - - :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 + """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`. + + :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 @@ -5005,37 +7057,35 @@ 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_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 + _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": "ProjectPaginatedTasksResponseV1", + "401": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "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_breaks_serialize( + def _list_project_tasks_serialize( self, - id, - offset, - limit, - filter, + project_id, + statuses, + page, + page_size, _request_auth, _content_type, _headers, @@ -5044,57 +7094,44 @@ def _list_break_policy_breaks_serialize( _host = None - _collection_formats: Dict[str, str] = { + _collection_formats: dict[str, str] = { + "statuses[]": "multi", } - _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 - 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 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' - ] - ) - + 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/projects/{projectId}/tasks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5104,41 +7141,52 @@ 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_projects( 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)] - ] + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = 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, - ) -> TimeTrackingPaginatedBreakPolicyEmployeesResponseV1: - """List Break Policy Employees + ) -> ProjectPaginatedTimeTrackingProjectsResponseV1: + """List Time Tracking Projects - 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 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). - :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 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 @@ -5159,63 +7207,75 @@ 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_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 + _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": "ProjectPaginatedTimeTrackingProjectsResponseV1", + "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_projects_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)] - ] + 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, - _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=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[TimeTrackingPaginatedBreakPolicyEmployeesResponseV1]: - """List Break Policy Employees + ) -> ApiResponse[ProjectPaginatedTimeTrackingProjectsResponseV1]: + """List Time Tracking Projects - 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 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). - :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 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 @@ -5236,63 +7296,75 @@ 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_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 + _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": "ProjectPaginatedTimeTrackingProjectsResponseV1", + "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_projects_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)] - ] + filter: Annotated[ + StrictStr | None, + Field( + description="OData v4 filter expression. Filterable fields: `id`, `name`, `billable`, `includeInPayroll`, `allEmployeesAssigned`, `archived`, `createdAt`, `updatedAt`." + ), ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = 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 Break Policy Employees + """List Time Tracking Projects - Retrieves employees assigned to a specific break policy. If a policy has no assignments, returns HTTP 200 with an empty `data` array. - - :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 + 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). + + :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 @@ -5313,35 +7385,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_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 + _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": "ProjectPaginatedTimeTrackingProjectsResponseV1", + "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_projects_serialize( self, - id, - offset, - limit, + filter, + sort, + page, + page_size, _request_auth, _content_type, _headers, @@ -5350,53 +7421,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/projects", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5406,38 +7467,48 @@ 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 list_timesheet_entries( 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)] - ] + 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 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, - ) -> List[TimeTrackingTimeTrackingBreakAvailabilityV1]: - """List Employee Break Availabilities + ) -> list[EmployeeTimesheetEntryTransformer]: + """List Timesheet Entries - Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access. + 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. - :param id: The 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 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 _request_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 +7529,71 @@ 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( - id=id, - effective=effective, + _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': "List[TimeTrackingTimeTrackingBreakAvailabilityV1]", - '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_employee_break_availabilities_with_http_info( + def list_timesheet_entries_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)] - ] + 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 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[List[TimeTrackingTimeTrackingBreakAvailabilityV1]]: - """List Employee Break Availabilities + ) -> ApiResponse[list[EmployeeTimesheetEntryTransformer]]: + """List Timesheet Entries - Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access. + 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. - :param id: The 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 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 _request_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 +7614,71 @@ 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( - id=id, - effective=effective, + _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': "List[TimeTrackingTimeTrackingBreakAvailabilityV1]", - '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_employee_break_availabilities_without_preload_content( + def list_timesheet_entries_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)] - ] + 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 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 Employee Break Availabilities + """List Timesheet Entries - Retrieves break availability information for an employee. Requires permission to view the target employee in addition to time-tracking-break access. + 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. - :param id: The 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 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 _request_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 +7699,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( - id=id, - effective=effective, + _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': "List[TimeTrackingTimeTrackingBreakAvailabilityV1]", - '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_employee_break_availabilities_serialize( + def _list_timesheet_entries_serialize( self, - id, - effective, + start, + end, + employee_ids, _request_auth, _content_type, _headers, @@ -5639,49 +7734,46 @@ 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 # process the query parameters - if effective is not None: - - _query_params.append(('effective', effective)) - + 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/employees/{id}/break-availabilities', + method="GET", + resource_path="/api/v1/time_tracking/timesheet_entries", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5691,41 +7783,32 @@ 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 replace_breaks_for_break_policy( 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[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, - ) -> TimeTrackingPaginatedBreakPoliciesResponseV1: - """List Employee Break Policies + ) -> list[TimeTrackingTimeTrackingBreakV1]: + """Replace Breaks for Break Policy - Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. + 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. - :param id: The 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 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 @@ -5746,63 +7829,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._replace_breaks_for_break_policy_serialize( id=id, - offset=offset, - limit=limit, + 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 + _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": "List[TimeTrackingTimeTrackingBreakV1]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "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_employee_break_policies_with_http_info( + def replace_breaks_for_break_policy_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[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[TimeTrackingPaginatedBreakPoliciesResponseV1]: - """List Employee Break Policies + ) -> ApiResponse[list[TimeTrackingTimeTrackingBreakV1]]: + """Replace Breaks for Break Policy - Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. + 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. - :param id: The 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 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 @@ -5823,63 +7897,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._replace_breaks_for_break_policy_serialize( id=id, - offset=offset, - limit=limit, + 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 + _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": "List[TimeTrackingTimeTrackingBreakV1]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "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_employee_break_policies_without_preload_content( + def replace_breaks_for_break_policy_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[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: - """List Employee Break Policies + """Replace Breaks for Break Policy - Retrieves break policies assigned to a specific employee. Requires permission to view the target employee. + 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. - :param id: The 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 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 @@ -5900,35 +7965,31 @@ 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._replace_breaks_for_break_policy_serialize( id=id, - offset=offset, - limit=limit, + 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 + _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": "List[TimeTrackingTimeTrackingBreakV1]", + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "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_employee_break_policies_serialize( + def _replace_breaks_for_break_policy_serialize( self, id, - offset, - limit, + time_tracking_create_or_update_time_tracking_break_without_policy_v1, _request_auth, _content_type, _headers, @@ -5937,53 +7998,45 @@ def _list_employee_break_policies_serialize( _host = None - _collection_formats: Dict[str, str] = { + _collection_formats: dict[str, str] = { + "TimeTrackingCreateOrUpdateTimeTrackingBreakWithoutPolicyV1": "", } - _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 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' - ] - ) + 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="PUT", + resource_path="/api/v1/time-tracking/break-policies/{id}/breaks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5993,41 +8046,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 set_break_policy_employees( 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[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, - ) -> List[EmployeeTimesheetEntryTransformer]: - """List Timesheet Entries + ) -> ApiResponse[None]: + """Set Employees for Break Policy - 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. + Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. - :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 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 @@ -6048,65 +8090,53 @@ 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._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 + _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] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "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 list_timesheet_entries_with_http_info( + def set_break_policy_employees_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, + 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[List[EmployeeTimesheetEntryTransformer]]: - """List Timesheet Entries + ) -> ApiResponse[None]: + """Set Employees for Break Policy - 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. + Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. - :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 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 @@ -6127,65 +8157,52 @@ 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._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 + _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] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "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 set_break_policy_employees_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[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: - """List Timesheet Entries + """Set Employees for Break Policy - 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. + Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. - :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 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 @@ -6206,37 +8223,31 @@ 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._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 + _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] = { + "204": None, + "400": "ProblemDetailsResponse", + "403": "ProblemDetailsResponse", + "404": "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 _set_break_policy_employees_serialize( self, - start, - end, - employee_ids, + id, + set_break_policy_employees_request, _request_auth, _content_type, _headers, @@ -6245,73 +8256,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 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' - ] - ) + 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="PUT", + resource_path="/api/v1/time-tracking/break-policies/{id}/assign", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6321,38 +8302,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 sync_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: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - 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_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, - ) -> List[TimeTrackingTimeTrackingBreakV1]: - """Replace Breaks for Break Policy + ) -> TimeTrackingTimeTrackingBreakPolicyWithRelationsV1: + """Sync 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. + 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. :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 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 @@ -6373,61 +8346,51 @@ 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._sync_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, + 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 + _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": "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", + "403": "ProblemDetailsResponse", + "404": "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 sync_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: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - 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_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[List[TimeTrackingTimeTrackingBreakV1]]: - """Replace Breaks for Break Policy + ) -> ApiResponse[TimeTrackingTimeTrackingBreakPolicyWithRelationsV1]: + """Sync 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. + 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. :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 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 @@ -6448,61 +8411,51 @@ 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._sync_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, + 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 + _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": "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", + "403": "ProblemDetailsResponse", + "404": "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 sync_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: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - 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_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: - """Replace Breaks for Break Policy + """Sync 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. + 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. :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 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 @@ -6523,35 +8476,30 @@ 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._sync_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, + 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 + _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": "TimeTrackingTimeTrackingBreakPolicyWithRelationsV1", + "403": "ProblemDetailsResponse", + "404": "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 _sync_break_policy_serialize( self, id, - time_tracking_create_or_update_time_tracking_break_without_policy_v1, + time_tracking_sync_time_tracking_break_policy_v1, _request_auth, _content_type, _headers, @@ -6560,61 +8508,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 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' - ] - ) + 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="PUT", + resource_path="/api/v1/time-tracking/break-policies/{id}/sync", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6624,38 +8554,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 unassign_employees_from_break_policy( 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, + 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]: - """Set Employees for Break Policy + """Unassign Employees from Break Policy - Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. + 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. :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 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 @@ -6676,28 +8598,26 @@ 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._unassign_employees_from_break_policy_serialize( id=id, - set_break_policy_employees_request=set_break_policy_employees_request, + 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 + _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] = { + "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 = 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( @@ -6705,33 +8625,27 @@ def set_break_policy_employees( response_types_map=_response_types_map, ) - @validate_call - def set_break_policy_employees_with_http_info( + def unassign_employees_from_break_policy_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, + 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]: - """Set Employees for Break Policy + """Unassign Employees from Break Policy - Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. + 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. :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 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 @@ -6752,61 +8666,53 @@ 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._unassign_employees_from_break_policy_serialize( id=id, - set_break_policy_employees_request=set_break_policy_employees_request, + 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 + _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] = { + "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 = self.api_client.call_api(*_param, _request_timeout=_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 unassign_employees_from_break_policy_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, + 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: - """Set Employees for Break Policy + """Unassign Employees from Break Policy - Sets the employee assignments for a break policy. This replaces all existing assignments with the provided list. + 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. :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 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 @@ -6827,35 +8733,32 @@ 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._unassign_employees_from_break_policy_serialize( id=id, - set_break_policy_employees_request=set_break_policy_employees_request, + 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 + _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] = { + "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 = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - - def _set_break_policy_employees_serialize( + def _unassign_employees_from_break_policy_serialize( self, id, - set_break_policy_employees_request, + unassign_employees_from_break_policy_request, _request_auth, _content_type, _headers, @@ -6864,60 +8767,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 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' - ] - ) + 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="POST", + resource_path="/api/v1/time-tracking/break-policies/{id}/unassign", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6927,38 +8813,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_break( 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[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, - ) -> TimeTrackingTimeTrackingBreakPolicyWithRelationsV1: - """Sync Break Policy + ) -> TimeTrackingTimeTrackingBreakV1: + """Update Break - 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. + 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. - :param id: The break policy ID. (required) + :param id: The break 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 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 @@ -6979,60 +8857,50 @@ 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_break_serialize( id=id, - time_tracking_sync_time_tracking_break_policy_v1=time_tracking_sync_time_tracking_break_policy_v1, + 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 + _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": "TimeTrackingTimeTrackingBreakV1", + "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 sync_break_policy_with_http_info( + def update_break_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[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[TimeTrackingTimeTrackingBreakPolicyWithRelationsV1]: - """Sync Break Policy + ) -> ApiResponse[TimeTrackingTimeTrackingBreakV1]: + """Update Break - 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. + 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. - :param id: The break policy ID. (required) + :param id: The break 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 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 @@ -7053,60 +8921,50 @@ 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_break_serialize( id=id, - time_tracking_sync_time_tracking_break_policy_v1=time_tracking_sync_time_tracking_break_policy_v1, + 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 + _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": "TimeTrackingTimeTrackingBreakV1", + "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 sync_break_policy_without_preload_content( + def update_break_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[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: - """Sync Break Policy + """Update Break - 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. + 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. - :param id: The break policy ID. (required) + :param id: The break 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 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 @@ -7127,34 +8985,29 @@ 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_break_serialize( id=id, - time_tracking_sync_time_tracking_break_policy_v1=time_tracking_sync_time_tracking_break_policy_v1, + 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 + _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": "TimeTrackingTimeTrackingBreakV1", + "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 _sync_break_policy_serialize( + def _update_break_serialize( self, id, - time_tracking_sync_time_tracking_break_policy_v1, + time_tracking_update_time_tracking_break_v1, _request_auth, _content_type, _headers, @@ -7163,60 +9016,43 @@ 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_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' - ] - ) + 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}/sync', + method="PATCH", + resource_path="/api/v1/time-tracking/breaks/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7226,38 +9062,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_break_policy( 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, + 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[None]: - """Unassign Employees from Break Policy + ) -> TimeTrackingTimeTrackingBreakPolicyV1: + """Update 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. + 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. :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 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 @@ -7278,63 +9106,52 @@ 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( + _param = self._update_break_policy_serialize( id=id, - unassign_employees_from_break_policy_request=unassign_employees_from_break_policy_request, + 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 + _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": "TimeTrackingTimeTrackingBreakPolicyV1", + "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() - # 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_break_policy_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, + 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[None]: - """Unassign Employees from Break Policy + ) -> ApiResponse[TimeTrackingTimeTrackingBreakPolicyV1]: + """Update 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. + 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. :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 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 @@ -7355,62 +9172,52 @@ 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( + _param = self._update_break_policy_serialize( id=id, - unassign_employees_from_break_policy_request=unassign_employees_from_break_policy_request, + 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 + _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": "TimeTrackingTimeTrackingBreakPolicyV1", + "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, ) - @validate_call - def unassign_employees_from_break_policy_without_preload_content( + def update_break_policy_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, + 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: - """Unassign Employees from Break Policy + """Update 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. + 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. :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 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 @@ -7431,36 +9238,31 @@ 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( + _param = self._update_break_policy_serialize( id=id, - unassign_employees_from_break_policy_request=unassign_employees_from_break_policy_request, + 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 + _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": "TimeTrackingTimeTrackingBreakPolicyV1", + "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) return response_data.response - - def _unassign_employees_from_break_policy_serialize( + def _update_break_policy_serialize( self, id, - unassign_employees_from_break_policy_request, + time_tracking_update_time_tracking_break_policy_v1, _request_auth, _content_type, _headers, @@ -7469,60 +9271,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 + _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 - + 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' - ] - ) + 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}/unassign', + method="PATCH", + resource_path="/api/v1/time-tracking/break-policies/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7532,38 +9317,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_project( 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[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, - ) -> TimeTrackingTimeTrackingBreakV1: - """Update Break + ) -> ProjectTimeTrackingProjectV1: + """Update Time Tracking Project - 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. + Partially updates a time tracking project identified by its ID. Only fields provided in the request body are updated; omitted fields are left unchanged. - :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 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 @@ -7584,59 +9361,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_project_serialize( id=id, - time_tracking_update_time_tracking_break_v1=time_tracking_update_time_tracking_break_v1, + 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': "TimeTrackingTimeTrackingBreakV1", - '403': "ProblemDetailsResponse", - '422': "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 update_break_with_http_info( + def update_project_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[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[TimeTrackingTimeTrackingBreakV1]: - """Update Break + ) -> ApiResponse[ProjectTimeTrackingProjectV1]: + """Update Time Tracking Project - 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. + Partially updates a time tracking project identified by its ID. Only fields provided in the request body are updated; omitted fields are left unchanged. - :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 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 @@ -7657,59 +9429,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_project_serialize( id=id, - time_tracking_update_time_tracking_break_v1=time_tracking_update_time_tracking_break_v1, + 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': "TimeTrackingTimeTrackingBreakV1", - '403': "ProblemDetailsResponse", - '422': "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 update_break_without_preload_content( + def update_project_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[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: - """Update Break + """Update Time Tracking Project - 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. + Partially updates a time tracking project identified by its ID. Only fields provided in the request body are updated; omitted fields are left unchanged. - :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 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 @@ -7730,33 +9497,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_project_serialize( id=id, - time_tracking_update_time_tracking_break_v1=time_tracking_update_time_tracking_break_v1, + 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': "TimeTrackingTimeTrackingBreakV1", - '403': "ProblemDetailsResponse", - '422': "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 _update_break_serialize( + def _update_project_serialize( self, id, - time_tracking_update_time_tracking_break_v1, + project_update_time_tracking_project_v1, _request_auth, _content_type, _headers, @@ -7765,60 +9532,43 @@ 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 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 + _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='PATCH', - resource_path='/api/v1/time-tracking/breaks/{id}', + method="PATCH", + resource_path="/api/v1/time-tracking/projects/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7828,38 +9578,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_task( 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[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, - ) -> TimeTrackingTimeTrackingBreakPolicyV1: - """Update Break Policy + ) -> ProjectTimeTrackingTaskV1: + """Update Time Tracking Task - 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. + 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. - :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 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 @@ -7880,61 +9622,52 @@ 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_task_serialize( id=id, - time_tracking_update_time_tracking_break_policy_v1=time_tracking_update_time_tracking_break_policy_v1, + 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]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "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, ).data - @validate_call - def update_break_policy_with_http_info( + def update_task_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[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[TimeTrackingTimeTrackingBreakPolicyV1]: - """Update Break Policy + ) -> ApiResponse[ProjectTimeTrackingTaskV1]: + """Update Time Tracking Task - 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. + 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. - :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 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 @@ -7955,61 +9688,52 @@ 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_task_serialize( id=id, - time_tracking_update_time_tracking_break_policy_v1=time_tracking_update_time_tracking_break_policy_v1, + 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]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "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 update_break_policy_without_preload_content( + def update_task_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[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: - """Update Break Policy + """Update Time Tracking Task - 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. + 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. - :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 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 @@ -8030,35 +9754,31 @@ 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_task_serialize( id=id, - time_tracking_update_time_tracking_break_policy_v1=time_tracking_update_time_tracking_break_policy_v1, + 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]] = { - '200': "TimeTrackingTimeTrackingBreakPolicyV1", - '403': "ProblemDetailsResponse", - '404': "ProblemDetailsResponse", - '422': "ProblemDetailsResponse", - '500': "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 _update_break_policy_serialize( + def _update_task_serialize( self, id, - time_tracking_update_time_tracking_break_policy_v1, + project_update_time_tracking_project_task_v1, _request_auth, _content_type, _headers, @@ -8067,60 +9787,43 @@ 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 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='PATCH', - resource_path='/api/v1/time-tracking/break-policies/{id}', + method="PATCH", + resource_path="/api/v1/time-tracking/tasks/{id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8130,7 +9833,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..2912270 --- /dev/null +++ b/bamboohr_sdk/api/total_rewards_api.py @@ -0,0 +1,1939 @@ +""" +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. +""" + +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. + + :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. + + :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. + + :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 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. + + :param employee_id: The 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 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. + + :param employee_id: The 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 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. + + :param employee_id: The 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, Field(description="The ID of the employee.")], + 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. + + :param employee_id: The ID of the employee. (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, Field(description="The ID of the employee.")], + 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. + + :param employee_id: The ID of the employee. (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, Field(description="The ID of the employee.")], + 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. + + :param employee_id: The ID of the employee. (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 ID of the 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, + ) -> 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. + + :param employee_id: The ID of the employee. (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", + "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 ID of the 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[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. + + :param employee_id: The ID of the employee. (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", + "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 ID of the 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: + """Get Total Rewards Statement + + Returns the full Total Rewards statement for the given employee, including compensation, benefits, bonuses, equity, reimbursements, and time-off data. + + :param employee_id: The ID of the employee. (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", + "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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this 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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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. + + :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..ab0127a 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://www.bamboohr.com/api/documentation/ - 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,23 +40,21 @@ 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 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 @@ -94,7 +85,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,44 +93,39 @@ 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 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 @@ -170,7 +156,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,44 +164,39 @@ 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 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 @@ -246,7 +227,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 +235,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 +261,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 +280,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,27 +307,21 @@ 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 @@ -396,50 +350,43 @@ 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 @@ -468,50 +415,43 @@ 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 @@ -540,31 +480,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 +512,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 +529,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,27 +556,21 @@ 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 @@ -686,50 +599,43 @@ 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 @@ -758,50 +664,43 @@ 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 @@ -830,31 +729,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 +761,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 +778,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,27 +805,21 @@ 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 @@ -976,27 +848,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,22 +873,18 @@ 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 @@ -1048,49 +913,42 @@ 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 @@ -1119,30 +977,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 +1008,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,27 +1044,21 @@ 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 @@ -1251,27 +1087,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,22 +1112,18 @@ 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 @@ -1323,49 +1152,42 @@ 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 @@ -1394,30 +1216,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 +1247,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,27 +1283,19 @@ 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 @@ -1526,28 +1324,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,22 +1350,16 @@ 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 @@ -1599,50 +1388,41 @@ 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 @@ -1671,31 +1451,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 +1483,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,28 +1519,27 @@ 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 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 @@ -1807,7 +1570,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,44 +1578,42 @@ 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 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 @@ -1883,7 +1644,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,44 +1652,42 @@ 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 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 @@ -1959,7 +1718,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 +1726,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 +1752,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,28 +1791,20 @@ 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. @@ -2095,50 +1829,38 @@ 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. @@ -2163,48 +1885,36 @@ 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 @@ -2231,30 +1941,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 +1968,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 +1983,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,28 +2002,20 @@ 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. @@ -2357,50 +2040,38 @@ 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. @@ -2425,48 +2096,36 @@ 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 @@ -2493,30 +2152,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 +2179,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 +2194,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,28 +2213,24 @@ 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 @@ -2625,7 +2261,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,45 +2269,40 @@ 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 @@ -2702,7 +2333,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,45 +2341,40 @@ 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 @@ -2779,7 +2405,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 +2413,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 +2440,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 +2459,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,28 +2486,24 @@ 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 @@ -2933,7 +2534,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,44 +2542,39 @@ 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 @@ -3009,7 +2605,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,44 +2613,39 @@ 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 @@ -3085,7 +2676,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 +2684,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 +2710,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 +2729,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,28 +2756,22 @@ 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 @@ -3238,7 +2802,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,44 +2810,37 @@ 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 @@ -3314,7 +2871,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,44 +2879,37 @@ 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 @@ -3390,7 +2940,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 +2948,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 +2974,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 +2993,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 +3020,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..20dcf57 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://www.bamboohr.com/api/documentation/ - 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..f983595 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://www.bamboohr.com/api/documentation/ - 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) :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) :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) :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. :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. :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. :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. :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. :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. :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. + :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. + :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. + :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. - :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,39 @@ 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, + "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. - :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 +1004,39 @@ 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, + "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. - :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 +1057,22 @@ 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, + "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 +1081,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 +1115,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. :param id: The webhook ID to get logs about. (required) :type id: int @@ -1426,54 +1156,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. :param id: The webhook ID to get logs about. (required) :type id: int @@ -1497,54 +1214,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. :param id: The webhook ID to get logs about. (required) :type id: int @@ -1568,31 +1272,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 +1299,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 +1335,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. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1698,50 +1373,38 @@ 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, + "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. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1763,50 +1426,38 @@ 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, + "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. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1828,27 +1479,20 @@ 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, + "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 +1503,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 +1518,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 +1537,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. :param id: The webhook ID to update. (required) :type id: int @@ -1957,7 +1581,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 +1589,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. :param id: The webhook ID to update. (required) :type id: int @@ -2033,7 +1648,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 +1656,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. :param id: The webhook ID to update. (required) :type id: int @@ -2109,7 +1715,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 +1723,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 +1749,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 +1768,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 +1795,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..b673bc5 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://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 +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/auth/__init__.py b/bamboohr_sdk/client/auth/__init__.py index 09de1e5..c54c0c2 100644 --- a/bamboohr_sdk/client/auth/__init__.py +++ b/bamboohr_sdk/client/auth/__init__.py @@ -3,4 +3,4 @@ from bamboohr_sdk.client.auth.token_manager import TokenManager, TokenResponse from bamboohr_sdk.client.auth.token_refresh_provider import BambooHRTokenRefreshProvider -__all__ = ["TokenManager", "TokenResponse", "BambooHRTokenRefreshProvider"] +__all__ = ["BambooHRTokenRefreshProvider", "TokenManager", "TokenResponse"] diff --git a/bamboohr_sdk/client/auth/token_manager.py b/bamboohr_sdk/client/auth/token_manager.py index 7361d4c..25e9647 100644 --- a/bamboohr_sdk/client/auth/token_manager.py +++ b/bamboohr_sdk/client/auth/token_manager.py @@ -6,12 +6,11 @@ from __future__ import annotations import time +from collections.abc import Callable from dataclasses import dataclass -from typing import Callable, Optional - # Type alias for the token refresh callback -TokenRefreshCallback = Callable[[str, Optional[str], str, Optional[str]], None] +TokenRefreshCallback = Callable[[str, str | None, str, str | None], None] # Proactive refresh buffer: refresh 5 minutes before expiry EXPIRY_BUFFER_SECONDS = 300 @@ -27,15 +26,15 @@ class TokenResponse: """ access_token: str - refresh_token: Optional[str] = None - expires_in: Optional[int] = None + refresh_token: str | None = None + expires_in: int | None = None @property def has_refresh_token(self) -> bool: """Return True if a new refresh token was included.""" return self.refresh_token is not None - def get_expires_at(self) -> Optional[float]: + def get_expires_at(self) -> float | None: """Return the absolute expiration timestamp, or ``None``.""" if self.expires_in is None: return None @@ -61,15 +60,13 @@ class TokenManager: def __init__( self, access_token: str, - refresh_token: Optional[str] = None, - expires_in: Optional[int] = None, - on_token_refresh: Optional[TokenRefreshCallback] = None, + refresh_token: str | None = None, + expires_in: int | None = None, + on_token_refresh: TokenRefreshCallback | None = None, ) -> None: self._access_token = access_token self._refresh_token = refresh_token - self._expires_at: Optional[float] = ( - (time.time() + expires_in) if expires_in is not None else None - ) + self._expires_at: float | None = (time.time() + expires_in) if expires_in is not None else None self._on_token_refresh = on_token_refresh # ------------------------------------------------------------------ @@ -82,12 +79,12 @@ def access_token(self) -> str: return self._access_token @property - def refresh_token(self) -> Optional[str]: + def refresh_token(self) -> str | None: """Return the current refresh token.""" return self._refresh_token @property - def expires_at(self) -> Optional[float]: + def expires_at(self) -> float | None: """Return the token expiration timestamp, or ``None``.""" return self._expires_at @@ -120,7 +117,7 @@ def is_expired(self) -> bool: return False return time.time() >= self._expires_at - def seconds_until_expiry(self) -> Optional[float]: + def seconds_until_expiry(self) -> float | None: """Return seconds until expiry, or ``None`` if unknown.""" if self._expires_at is None: return None diff --git a/bamboohr_sdk/client/auth/token_refresh_provider.py b/bamboohr_sdk/client/auth/token_refresh_provider.py index a12018a..a7c8488 100644 --- a/bamboohr_sdk/client/auth/token_refresh_provider.py +++ b/bamboohr_sdk/client/auth/token_refresh_provider.py @@ -8,7 +8,8 @@ import json import logging -from typing import Any, Callable, Dict, Optional +from collections.abc import Callable +from typing import Any from urllib.error import HTTPError, URLError from urllib.parse import urlencode from urllib.request import Request, urlopen @@ -43,7 +44,7 @@ def __init__( client_id: str, client_secret: str, api_host: str = "https://example.bamboohr.com", - http_send: Optional[HttpSendFunc] = None, + http_send: HttpSendFunc | None = None, ) -> None: self._client_id = client_id self._client_secret = client_secret @@ -97,7 +98,7 @@ def refresh_token(self, refresh_token: str) -> TokenResponse: ) try: - data: Dict[str, Any] = json.loads(response_body) + data: dict[str, Any] = json.loads(response_body) except (json.JSONDecodeError, TypeError) as exc: raise ApiException( status=500, @@ -121,9 +122,7 @@ def refresh_token(self, refresh_token: str) -> TokenResponse: return TokenResponse( access_token=data["access_token"], refresh_token=data.get("refresh_token"), - expires_in=( - int(data["expires_in"]) if "expires_in" in data else None - ), + expires_in=(int(data["expires_in"]) if "expires_in" in data else None), ) # ------------------------------------------------------------------ diff --git a/bamboohr_sdk/client/auth_builder.py b/bamboohr_sdk/client/auth_builder.py index 6f1b6e4..3dd91cf 100644 --- a/bamboohr_sdk/client/auth_builder.py +++ b/bamboohr_sdk/client/auth_builder.py @@ -6,15 +6,15 @@ from __future__ import annotations -from typing import Any, Callable, Dict, Optional +from collections.abc import Callable +from typing import Any from bamboohr_sdk.client.logger.secure_log_filter import mask_value from bamboohr_sdk.configuration import Configuration - # Type alias for the token refresh callback: # (new_access_token, new_refresh_token, old_access_token, old_refresh_token) -> None -TokenRefreshCallback = Callable[[str, Optional[str], str, Optional[str]], None] +TokenRefreshCallback = Callable[[str, str | None, str, str | None], None] class AuthBuilder: @@ -46,14 +46,14 @@ class AuthBuilder: """ def __init__(self) -> None: - self._auth_type: Optional[str] = None - self._api_key: Optional[str] = None - self._oauth_token: Optional[str] = None - self._refresh_token: Optional[str] = None - self._client_id: Optional[str] = None - self._client_secret: Optional[str] = None - self._expires_in: Optional[int] = None - self._on_token_refresh: Optional[TokenRefreshCallback] = None + self._auth_type: str | None = None + self._api_key: str | None = None + self._oauth_token: str | None = None + self._refresh_token: str | None = None + self._client_id: str | None = None + self._client_secret: str | None = None + self._expires_in: int | None = None + self._on_token_refresh: TokenRefreshCallback | None = None # ------------------------------------------------------------------ # Fluent configuration methods @@ -89,7 +89,7 @@ def with_oauth_refresh( refresh_token: str, client_id: str, client_secret: str, - expires_in: Optional[int] = None, + expires_in: int | None = None, ) -> AuthBuilder: """Configure OAuth with automatic token refresh. @@ -147,7 +147,7 @@ def is_configured(self) -> bool: return self._auth_type is not None @property - def auth_type(self) -> Optional[str]: + def auth_type(self) -> str | None: """Return the configured authentication type.""" return self._auth_type @@ -157,23 +157,23 @@ def has_oauth_refresh(self) -> bool: return self._auth_type == "oauth_refresh" @property - def refresh_token(self) -> Optional[str]: + def refresh_token(self) -> str | None: return self._refresh_token @property - def client_id(self) -> Optional[str]: + def client_id(self) -> str | None: return self._client_id @property - def client_secret(self) -> Optional[str]: + def client_secret(self) -> str | None: return self._client_secret @property - def expires_in(self) -> Optional[int]: + def expires_in(self) -> int | None: return self._expires_in @property - def token_refresh_callback(self) -> Optional[TokenRefreshCallback]: + def token_refresh_callback(self) -> TokenRefreshCallback | None: return self._on_token_refresh # ------------------------------------------------------------------ @@ -203,10 +203,7 @@ def validate(self) -> None: :raises ValueError: If the configuration is invalid or incomplete. """ if self._auth_type is None: - raise ValueError( - "No authentication method configured. " - "Use with_api_key() or with_oauth()" - ) + raise ValueError("No authentication method configured. Use with_api_key() or with_oauth()") if self._auth_type == "api_key": if not self._api_key: @@ -230,7 +227,7 @@ def validate(self) -> None: # Logging / debugging # ------------------------------------------------------------------ - def get_sanitized_info(self) -> Dict[str, Any]: + def get_sanitized_info(self) -> dict[str, Any]: """Return a dict of auth info safe for logging (secrets masked). :return: Dictionary with sanitized authentication details. @@ -238,7 +235,7 @@ def get_sanitized_info(self) -> Dict[str, Any]: if self._auth_type is None: return {"type": "none", "configured": False} - info: Dict[str, Any] = { + info: dict[str, Any] = { "type": self._auth_type, "configured": True, } @@ -269,5 +266,3 @@ def reset(self) -> AuthBuilder: self._expires_in = None self._on_token_refresh = None return self - - diff --git a/bamboohr_sdk/client/bamboohr_client.py b/bamboohr_sdk/client/bamboohr_client.py index 290c4de..df78d70 100644 --- a/bamboohr_sdk/client/bamboohr_client.py +++ b/bamboohr_sdk/client/bamboohr_client.py @@ -21,12 +21,12 @@ from __future__ import annotations import logging -from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union +from typing import Any, TypeVar from bamboohr_sdk.api_client import ApiClient -from bamboohr_sdk.client.auth_builder import AuthBuilder, TokenRefreshCallback from bamboohr_sdk.client.auth.token_manager import TokenManager from bamboohr_sdk.client.auth.token_refresh_provider import BambooHRTokenRefreshProvider +from bamboohr_sdk.client.auth_builder import AuthBuilder, TokenRefreshCallback from bamboohr_sdk.client.middleware.oauth2_middleware import OAuth2Middleware from bamboohr_sdk.configuration import Configuration @@ -47,20 +47,20 @@ class BambooHRClient: :param auth_builder: Optional pre-configured :class:`AuthBuilder`. """ - def __init__(self, auth_builder: Optional[AuthBuilder] = None) -> None: + def __init__(self, auth_builder: AuthBuilder | None = None) -> None: self._config = Configuration() self._auth_builder = auth_builder or AuthBuilder() - self._api_client: Optional[ApiClient] = None - self._timeout: Optional[Union[float, tuple]] = None + self._api_client: ApiClient | None = None + self._timeout: float | tuple | None = None self._built = False # OAuth refresh components (created in build() when applicable) - self._token_manager: Optional[TokenManager] = None - self._refresh_provider: Optional[BambooHRTokenRefreshProvider] = None - self._oauth2_middleware: Optional[OAuth2Middleware] = None + self._token_manager: TokenManager | None = None + self._refresh_provider: BambooHRTokenRefreshProvider | None = None + self._oauth2_middleware: OAuth2Middleware | None = None # Cache for API accessor instances - self._api_cache: Dict[type, Any] = {} + self._api_cache: dict[type, Any] = {} # ------------------------------------------------------------------ # Authentication (delegated to AuthBuilder) @@ -92,7 +92,7 @@ def with_oauth_refresh( refresh_token: str, client_id: str, client_secret: str, - expires_in: Optional[int] = None, + expires_in: int | None = None, ) -> BambooHRClient: """Configure OAuth with automatic token refresh. @@ -103,9 +103,7 @@ def with_oauth_refresh( :param expires_in: Seconds until the access token expires (optional). :return: self for chaining. """ - self._auth_builder.with_oauth_refresh( - access_token, refresh_token, client_id, client_secret, expires_in - ) + self._auth_builder.with_oauth_refresh(access_token, refresh_token, client_id, client_secret, expires_in) logger.debug( "Configured OAuth with automatic refresh (has_expiry=%s)", expires_in is not None, @@ -157,13 +155,11 @@ def with_retries(self, retries: int) -> BambooHRClient: :raises ValueError: If *retries* is outside the 0–5 range. """ if not 0 <= retries <= 5: - raise ValueError( - f"Retries must be between 0 and 5, got {retries}" - ) + raise ValueError(f"Retries must be between 0 and 5, got {retries}") self._config.retries = retries return self - def with_timeout(self, seconds: Union[float, tuple]) -> BambooHRClient: + def with_timeout(self, seconds: float | tuple) -> BambooHRClient: """Configure the request timeout. :param seconds: Timeout in seconds. Pass a ``float`` for a single @@ -198,7 +194,7 @@ def with_http_client(self, client: ApiClient) -> BambooHRClient: def with_logging( self, - log_logger: Optional[logging.Logger] = None, + log_logger: logging.Logger | None = None, level: int = logging.INFO, secure: bool = True, ) -> BambooHRClient: @@ -221,9 +217,7 @@ def with_logging( target.setLevel(level) if not target.handlers: handler = logging.StreamHandler() - handler.setFormatter( - logging.Formatter("%(asctime)s %(levelname)s %(name)s: %(message)s") - ) + handler.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(name)s: %(message)s")) target.addHandler(handler) # Attach the secure redaction filter (idempotent — won't double-add) @@ -277,7 +271,7 @@ def build(self) -> BambooHRClient: # Generic API accessor # ------------------------------------------------------------------ - def get_api(self, api_class: Type[T]) -> T: + def get_api(self, api_class: type[T]) -> T: """Get an instance of any generated API class. Instances are cached for the lifetime of this client; the same @@ -303,96 +297,115 @@ def get_api(self, api_class: Type[T]) -> T: def employees(self): """Access the Employees API.""" from bamboohr_sdk.api.employees_api import EmployeesApi + return self.get_api(EmployeesApi) def time_off(self): """Access the Time Off API.""" from bamboohr_sdk.api.time_off_api import TimeOffApi + return self.get_api(TimeOffApi) def benefits(self): """Access the Benefits API.""" from bamboohr_sdk.api.benefits_api import BenefitsApi + return self.get_api(BenefitsApi) def reports(self): """Access the Reports API.""" from bamboohr_sdk.api.reports_api import ReportsApi + return self.get_api(ReportsApi) def tabular_data(self): """Access the Tabular Data API.""" from bamboohr_sdk.api.tabular_data_api import TabularDataApi + return self.get_api(TabularDataApi) def photos(self): """Access the Photos API.""" from bamboohr_sdk.api.photos_api import PhotosApi + return self.get_api(PhotosApi) def webhooks(self): """Access the Webhooks API.""" from bamboohr_sdk.api.webhooks_api import WebhooksApi + return self.get_api(WebhooksApi) def goals(self): """Access the Goals API.""" from bamboohr_sdk.api.goals_api import GoalsApi + return self.get_api(GoalsApi) def training(self): """Access the Training API.""" from bamboohr_sdk.api.training_api import TrainingApi + return self.get_api(TrainingApi) def time_tracking(self): """Access the Time Tracking API.""" from bamboohr_sdk.api.time_tracking_api import TimeTrackingApi + return self.get_api(TimeTrackingApi) def account_information(self): """Access the Account Information API.""" from bamboohr_sdk.api.account_information_api import AccountInformationApi + return self.get_api(AccountInformationApi) def applicant_tracking(self): """Access the Applicant Tracking API.""" from bamboohr_sdk.api.applicant_tracking_api import ApplicantTrackingApi + return self.get_api(ApplicantTrackingApi) def company_files(self): """Access the Company Files API.""" from bamboohr_sdk.api.company_files_api import CompanyFilesApi + return self.get_api(CompanyFilesApi) def employee_files(self): """Access the Employee Files API.""" from bamboohr_sdk.api.employee_files_api import EmployeeFilesApi + return self.get_api(EmployeeFilesApi) def custom_reports(self): """Access the Custom Reports API.""" from bamboohr_sdk.api.custom_reports_api import CustomReportsApi + return self.get_api(CustomReportsApi) def datasets(self): """Access the Datasets API.""" from bamboohr_sdk.api.datasets_api import DatasetsApi + return self.get_api(DatasetsApi) def hours(self): """Access the Hours API.""" from bamboohr_sdk.api.hours_api import HoursApi + return self.get_api(HoursApi) def last_change_information(self): """Access the Last Change Information API.""" from bamboohr_sdk.api.last_change_information_api import LastChangeInformationApi + return self.get_api(LastChangeInformationApi) def login(self): """Access the Login API.""" from bamboohr_sdk.api.login_api import LoginApi + return self.get_api(LoginApi) def manual(self): @@ -408,6 +421,7 @@ def manual(self): resp = client.manual().post("/api/gateway.php/acme/v1/employees", body={...}) """ from bamboohr_sdk.api.manual_api import ManualApi + return self.get_api(ManualApi) # ------------------------------------------------------------------ @@ -425,27 +439,27 @@ def auth_builder(self) -> AuthBuilder: return self._auth_builder @property - def api_client(self) -> Optional[ApiClient]: + def api_client(self) -> ApiClient | None: """Return the generated :class:`ApiClient`, or ``None`` before build.""" return self._api_client @property - def timeout(self) -> Optional[Union[float, tuple]]: + def timeout(self) -> float | tuple | None: """Return the configured timeout.""" return self._timeout @property - def token_manager(self) -> Optional[TokenManager]: + def token_manager(self) -> TokenManager | None: """Return the :class:`TokenManager`, or ``None`` if OAuth refresh is not configured.""" return self._token_manager @property - def oauth2_middleware(self) -> Optional[OAuth2Middleware]: + def oauth2_middleware(self) -> OAuth2Middleware | None: """Return the :class:`OAuth2Middleware`, or ``None`` if OAuth refresh is not configured.""" return self._oauth2_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. Convenience proxy for ``api_client.last_request_id``. @@ -463,9 +477,7 @@ def last_request_id(self) -> Optional[str]: def _ensure_built(self) -> None: """Raise if :meth:`build` has not been called.""" if not self._built: - raise RuntimeError( - "Client has not been built. Call .build() before accessing APIs." - ) + raise RuntimeError("Client has not been built. Call .build() before accessing APIs.") def _setup_oauth_refresh(self) -> None: """Create TokenManager, RefreshProvider, and OAuth2Middleware.""" @@ -478,9 +490,7 @@ def _setup_oauth_refresh(self) -> None: access_token = self._config.access_token if not refresh_token or not client_id or not client_secret: - logger.warning( - "OAuth refresh configured but missing required parameters" - ) + logger.warning("OAuth refresh configured but missing required parameters") return self._token_manager = TokenManager( @@ -520,15 +530,9 @@ def _validate_configuration(self) -> None: has_oauth = bool(self._config.access_token) if not has_api_key and not has_oauth: - raise ValueError( - "Authentication is required. " - "Use with_api_key() or with_oauth() before calling build()." - ) + raise ValueError("Authentication is required. Use with_api_key() or with_oauth() before calling build().") # Company domain check host = self._config.host if not host or host == _DEFAULT_HOST: - raise ValueError( - "Company domain is required. " - "Use for_company() to set your company subdomain." - ) + raise ValueError("Company domain is required. Use for_company() to set your company subdomain.") diff --git a/bamboohr_sdk/client/logger/secure_log_filter.py b/bamboohr_sdk/client/logger/secure_log_filter.py index 86473c0..f75b7d4 100644 --- a/bamboohr_sdk/client/logger/secure_log_filter.py +++ b/bamboohr_sdk/client/logger/secure_log_filter.py @@ -19,7 +19,7 @@ import logging import re -from typing import Any, Dict, Optional, Set, Tuple +from typing import Any # --------------------------------------------------------------------------- # Sensitive-key detection @@ -27,7 +27,7 @@ #: Keys whose *values* should be redacted when they appear in a log record's #: extra attributes (matched by substring, case-insensitive). -SENSITIVE_KEYS: Set[str] = { +SENSITIVE_KEYS: set[str] = { "password", "api_key", "apikey", @@ -58,7 +58,7 @@ # --------------------------------------------------------------------------- #: Regex patterns that match inline credential values in log messages. -_STRING_PATTERNS: list[Tuple[re.Pattern, str]] = [ +_STRING_PATTERNS: list[tuple[re.Pattern, str]] = [ # Bearer tokens (re.compile(r"Bearer\s+[a-zA-Z0-9\-._~+/]+=*", re.IGNORECASE), "Bearer [REDACTED]"), # Basic auth @@ -129,7 +129,7 @@ def redact_context(data: Any) -> Any: :return: A copy with sensitive values masked. """ if isinstance(data, dict): - redacted: Dict[str, Any] = {} + redacted: dict[str, Any] = {} for k, v in data.items(): if _is_sensitive_key(str(k)): redacted[k] = mask_value(v) @@ -222,9 +222,7 @@ def filter(self, record: logging.LogRecord) -> bool: record.args = redact_context(record.args) elif isinstance(record.args, tuple): record.args = tuple( - redact_context(a) if isinstance(a, dict) - else redact_string(a) if isinstance(a, str) - else a + redact_context(a) if isinstance(a, dict) else redact_string(a) if isinstance(a, str) else a for a in record.args ) diff --git a/bamboohr_sdk/client/middleware/oauth2_middleware.py b/bamboohr_sdk/client/middleware/oauth2_middleware.py index cafc162..25386fc 100644 --- a/bamboohr_sdk/client/middleware/oauth2_middleware.py +++ b/bamboohr_sdk/client/middleware/oauth2_middleware.py @@ -13,7 +13,8 @@ from __future__ import annotations import logging -from typing import Any, Callable, Optional +from collections.abc import Callable +from typing import Any from bamboohr_sdk.client.auth.token_manager import TokenManager from bamboohr_sdk.client.auth.token_refresh_provider import BambooHRTokenRefreshProvider diff --git a/bamboohr_sdk/client/middleware/request_id_middleware.py b/bamboohr_sdk/client/middleware/request_id_middleware.py index 31f1d13..2b89bcc 100644 --- a/bamboohr_sdk/client/middleware/request_id_middleware.py +++ b/bamboohr_sdk/client/middleware/request_id_middleware.py @@ -9,7 +9,6 @@ import logging import threading -from typing import Optional logger = logging.getLogger("bamboohr_sdk") @@ -37,11 +36,11 @@ def __init__(self) -> None: self._local = threading.local() @property - def last_request_id(self) -> Optional[str]: + def last_request_id(self) -> str | None: """Return the most recent request ID, or ``None`` if not yet set.""" return getattr(self._local, "last_request_id", None) - def extract_request_id(self, response) -> Optional[str]: + def extract_request_id(self, response) -> str | None: """Extract the request ID from a response object. Supports any object with a ``getheader(name, default)`` method @@ -51,7 +50,7 @@ def extract_request_id(self, response) -> Optional[str]: :param response: The HTTP response object. :return: The extracted request ID, or ``None``. """ - request_id: Optional[str] = None + request_id: str | None = None # RESTResponse style if hasattr(response, "getheader"): diff --git a/bamboohr_sdk/configuration.py b/bamboohr_sdk/configuration.py index eec3c91..31d930d 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://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 +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,23 @@ ) -AuthSettings = TypedDict( - "AuthSettings", - { - "oauth": OAuth2AuthSetting, - "basic": BasicAuthSetting, - "RegistrationAccessToken": BearerFormatAuthSetting, - }, - total=False, -) +class AuthSettings(TypedDict, total=False): + oauth: OAuth2AuthSetting + basic: BasicAuthSetting + 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 +144,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 +289,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 +342,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 +356,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 +381,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 +399,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 +434,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 +446,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 +518,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 +537,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 +548,44 @@ 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 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 +594,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 +642,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..d716ee0 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://www.bamboohr.com/api/documentation/ - 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..c3edff8 100644 --- a/bamboohr_sdk/models/__init__.py +++ b/bamboohr_sdk/models/__init__.py @@ -2,41 +2,52 @@ # flake8: noqa """ - BambooHR API +BambooHR API - BambooHR API documentation. https://www.bamboohr.com/api/documentation/ +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) +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.ad7871529b2a9c6612f8dd3c62192c08_request import Ad7871529b2a9c6612f8dd3c62192c08Request +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_template_list_response import AlertTemplateListResponse +from bamboohr_sdk.models.alert_template_list_response_alerts_inner import AlertTemplateListResponseAlertsInner 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 @@ -45,108 +56,264 @@ 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.can_create_goals_response import CanCreateGoalsResponse +from bamboohr_sdk.models.cf87b8e09a001b6fb81dfce6c20ab9e3_request import Cf87b8e09a001b6fb81dfce6c20ab9e3Request 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_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_alert_data_object import CompanyAlertDataObject 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.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.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 +326,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 @@ -171,66 +339,164 @@ from bamboohr_sdk.models.hour_entries_request_schema import HourEntriesRequestSchema from bamboohr_sdk.models.hour_entry_ids_schema import HourEntryIdsSchema 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_inner import InlineObjectInner 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.levels_and_bands_column_map import LevelsAndBandsColumnMap +from bamboohr_sdk.models.levels_and_bands_employee import LevelsAndBandsEmployee +from bamboohr_sdk.models.levels_and_bands_error_warning_identifier import LevelsAndBandsErrorWarningIdentifier +from bamboohr_sdk.models.levels_and_bands_group import LevelsAndBandsGroup +from bamboohr_sdk.models.levels_and_bands_group_status_counts import LevelsAndBandsGroupStatusCounts +from bamboohr_sdk.models.levels_and_bands_job_title import LevelsAndBandsJobTitle +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_job_title_with_employees import LevelsAndBandsJobTitleWithEmployees +from bamboohr_sdk.models.levels_and_bands_job_titles_status import LevelsAndBandsJobTitlesStatus +from bamboohr_sdk.models.levels_and_bands_level import LevelsAndBandsLevel +from bamboohr_sdk.models.levels_and_bands_levels_and_bands import LevelsAndBandsLevelsAndBands +from bamboohr_sdk.models.levels_and_bands_levels_and_bands_status import LevelsAndBandsLevelsAndBandsStatus +from bamboohr_sdk.models.levels_and_bands_pay_band import LevelsAndBandsPayBand +from bamboohr_sdk.models.levels_and_bands_step_status import LevelsAndBandsStepStatus +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.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_publish_response import PayGradesAndBandsPublishResponse +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_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.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_paginated_response_data_v1 import ProjectPaginatedResponseDataV1 +from bamboohr_sdk.models.project_paginated_response_data_v1_links import ProjectPaginatedResponseDataV1Links +from bamboohr_sdk.models.project_paginated_response_data_v1_links_next import ProjectPaginatedResponseDataV1LinksNext +from bamboohr_sdk.models.project_paginated_response_data_v1_links_prev import ProjectPaginatedResponseDataV1LinksPrev +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_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.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,7 +506,34 @@ 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_v1 import SchedulingSchedulingShiftV1 +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.state import State from bamboohr_sdk.models.state_province_response_schema import StateProvinceResponseSchema @@ -263,66 +556,160 @@ 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_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_delete_response_schema import TimeTrackingDeleteResponseSchema 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_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_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_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.timesheet_entry_info_api_transformer import TimesheetEntryInfoApiTransformer -from bamboohr_sdk.models.timesheet_entry_info_api_transformer_break_info import TimesheetEntryInfoApiTransformerBreakInfo 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.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_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 +726,21 @@ 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.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/create_training_type_request_due_from_hire_date_one_of.py b/bamboohr_sdk/models/a05b6d5f564f805d688ff2c1e37c3990_request.py similarity index 51% rename from bamboohr_sdk/models/create_training_type_request_due_from_hire_date_one_of.py rename to bamboohr_sdk/models/a05b6d5f564f805d688ff2c1e37c3990_request.py index 6939017..5559640 100644 --- a/bamboohr_sdk/models/create_training_type_request_due_from_hire_date_one_of.py +++ b/bamboohr_sdk/models/a05b6d5f564f805d688ff2c1e37c3990_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://www.bamboohr.com/api/documentation/ - 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 A05b6d5f564f805d688ff2c1e37c3990Request(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"] + 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, @@ -36,7 +36,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 +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 CreateTrainingTypeRequestDueFromHireDateOneOf 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 @@ -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,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 CreateTrainingTypeRequestDueFromHireDateOneOf 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({ - "unit": obj.get("unit"), - "amount": obj.get("amount") - }) + _obj = cls.model_validate( + { + "templateId": obj.get("templateId"), + "assigneeEmployeeId": obj.get("assigneeEmployeeId"), + "approvalStage": obj.get("approvalStage"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/ad7871529b2a9c6612f8dd3c62192c08_request.py b/bamboohr_sdk/models/ad7871529b2a9c6612f8dd3c62192c08_request.py new file mode 100644 index 0000000..f852e74 --- /dev/null +++ b/bamboohr_sdk/models/ad7871529b2a9c6612f8dd3c62192c08_request.py @@ -0,0 +1,104 @@ +""" +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. +""" + +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 + +from bamboohr_sdk.models.levels_and_bands_pay_band import LevelsAndBandsPayBand + + +class Ad7871529b2a9c6612f8dd3c62192c08Request(BaseModel): + """ + Ad7871529b2a9c6612f8dd3c62192c08Request + """ + + pay_band_type: StrictStr = Field(alias="payBandType") + pay_bands: list[LevelsAndBandsPayBand] = Field(alias="payBands") + __properties: ClassVar[list[str]] = ["payBandType", "payBands"] + + @field_validator("pay_band_type") + def pay_band_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["percentRange", "minMidMax"]): + raise ValueError("must be one of enum values ('percentRange', 'minMidMax')") + 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 Ad7871529b2a9c6612f8dd3c62192c08Request 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 pay_bands (list) + _items = [] + if self.pay_bands: + for _item_pay_bands in self.pay_bands: + if _item_pay_bands: + _items.append(_item_pay_bands.to_dict()) + _dict["payBands"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of Ad7871529b2a9c6612f8dd3c62192c08Request from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "payBandType": obj.get("payBandType"), + "payBands": [LevelsAndBandsPayBand.from_dict(_item) for _item in obj["payBands"]] + if obj.get("payBands") is not None + else None, + } + ) + 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..d0774ee --- /dev/null +++ b/bamboohr_sdk/models/add_cycle_admins_response.py @@ -0,0 +1,107 @@ +""" +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. +""" + +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/add_cycle_admins_response_added_inner.py b/bamboohr_sdk/models/add_cycle_admins_response_added_inner.py new file mode 100644 index 0000000..a82e495 --- /dev/null +++ b/bamboohr_sdk/models/add_cycle_admins_response_added_inner.py @@ -0,0 +1,91 @@ +""" +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. +""" + +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 AddCycleAdminsResponseAddedInner(BaseModel): + """ + AddCycleAdminsResponseAddedInner + """ + + employee_id: StrictStr | None = Field(default=None, alias="employeeId") + display_name: StrictStr | None = Field(default=None, alias="displayName") + __properties: ClassVar[list[str]] = ["employeeId", "displayName"] + + 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 AddCycleAdminsResponseAddedInner 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 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: 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({"employeeId": obj.get("employeeId"), "displayName": obj.get("displayName")}) + return _obj diff --git a/bamboohr_sdk/models/add_cycle_admins_response_skipped_inner.py b/bamboohr_sdk/models/add_cycle_admins_response_skipped_inner.py new file mode 100644 index 0000000..58b8f0b --- /dev/null +++ b/bamboohr_sdk/models/add_cycle_admins_response_skipped_inner.py @@ -0,0 +1,96 @@ +""" +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. +""" + +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 AddCycleAdminsResponseSkippedInner(BaseModel): + """ + AddCycleAdminsResponseSkippedInner + """ + + employee_id: StrictStr | None = Field(default=None, 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(["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( + 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 AddCycleAdminsResponseSkippedInner 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 + + return _dict + + @classmethod + 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({"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..fe9a04e --- /dev/null +++ b/bamboohr_sdk/models/add_total_rewards_employees_request.py @@ -0,0 +1,82 @@ +""" +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. +""" + +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 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..017ceb7 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://www.bamboohr.com/api/documentation/ - 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..499b36e 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://www.bamboohr.com/api/documentation/ - 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_template_list_response.py b/bamboohr_sdk/models/alert_template_list_response.py new file mode 100644 index 0000000..5d4d547 --- /dev/null +++ b/bamboohr_sdk/models/alert_template_list_response.py @@ -0,0 +1,95 @@ +""" +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. +""" + +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.alert_template_list_response_alerts_inner import AlertTemplateListResponseAlertsInner + + +class AlertTemplateListResponse(BaseModel): + """ + AlertTemplateListResponse + """ + + alerts: list[AlertTemplateListResponseAlertsInner] | None = None + __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 AlertTemplateListResponse 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 AlertTemplateListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "alerts": [AlertTemplateListResponseAlertsInner.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/time_tracking_record_schema_shift_differential.py b/bamboohr_sdk/models/alert_template_list_response_alerts_inner.py similarity index 54% rename from bamboohr_sdk/models/time_tracking_record_schema_shift_differential.py rename to bamboohr_sdk/models/alert_template_list_response_alerts_inner.py index ff69943..640632b 100644 --- a/bamboohr_sdk/models/time_tracking_record_schema_shift_differential.py +++ b/bamboohr_sdk/models/alert_template_list_response_alerts_inner.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://www.bamboohr.com/api/documentation/ - 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 AlertTemplateListResponseAlertsInner(BaseModel): """ - 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"] + AlertTemplateListResponseAlertsInner + """ + + id: StrictInt | None = Field(default=None, description="Alert template ID (bambooAlertId)") + name: StrictStr | None = Field(default=None, description="Display name of the alert") + group_name: StrictStr | None = Field( + default=None, description="Category group the alert belongs to", alias="groupName" + ) + __properties: ClassVar[list[str]] = ["id", "name", "groupName"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +38,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 +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 TimeTrackingRecordSchemaShiftDifferential from a JSON string""" + def from_json(cls, json_str: str) -> Self | None: + """Create an instance of AlertTemplateListResponseAlertsInner 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, @@ -72,18 +72,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 AlertTemplateListResponseAlertsInner 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"), "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..92544cf 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://www.bamboohr.com/api/documentation/ - 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..4ed822b 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://www.bamboohr.com/api/documentation/ - 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..02d9807 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://www.bamboohr.com/api/documentation/ - 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..ac7cdb8 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://www.bamboohr.com/api/documentation/ - 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..b0250ec 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://www.bamboohr.com/api/documentation/ - 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..21fd23a 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://www.bamboohr.com/api/documentation/ - 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..3e14462 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://www.bamboohr.com/api/documentation/ - 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..834d942 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://www.bamboohr.com/api/documentation/ - 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..da8d825 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://www.bamboohr.com/api/documentation/ - 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..055e882 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://www.bamboohr.com/api/documentation/ - 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..4a960b2 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://www.bamboohr.com/api/documentation/ - 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..c4bb7e4 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://www.bamboohr.com/api/documentation/ - 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..72a3b33 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://www.bamboohr.com/api/documentation/ - 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..b010580 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://www.bamboohr.com/api/documentation/ - 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..1fe743d 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://www.bamboohr.com/api/documentation/ - 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..00afad8 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://www.bamboohr.com/api/documentation/ - 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..a97f6de 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://www.bamboohr.com/api/documentation/ - 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..948071d 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://www.bamboohr.com/api/documentation/ - 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/assign_employees_to_break_policy_request.py b/bamboohr_sdk/models/assign_employees_to_break_policy_request.py index bc40c4d..edf8a29 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://www.bamboohr.com/api/documentation/ - 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 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_request_inner.py index 2eecf5a..8e6e235 100644 --- a/bamboohr_sdk/models/assign_time_off_policies_request_inner.py +++ b/bamboohr_sdk/models/assign_time_off_policies_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://www.bamboohr.com/api/documentation/ - 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): """ 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]: + def from_json(cls, json_str: str) -> Self | None: """Create an instance of AssignTimeOffPoliciesRequestInner 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,12 +72,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 AssignTimeOffPoliciesRequestInner from a dict""" if obj is None: return None @@ -86,10 +85,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({ - "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..3293563 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://www.bamboohr.com/api/documentation/ - 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..724075a 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://www.bamboohr.com/api/documentation/ - 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..f896d52 100644 --- a/bamboohr_sdk/models/available_action.py +++ b/bamboohr_sdk/models/available_action.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://www.bamboohr.com/api/documentation/ - 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 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 + __properties: ClassVar[list[str]] = ["href", "fields"] model_config = ConfigDict( populate_by_name=True, @@ -36,7 +35,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 +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 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 +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 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 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 +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({ - "href": obj.get("href"), - "fields": obj.get("fields") - }) + _obj = cls.model_validate({"href": obj.get("href"), "fields": obj.get("fields")}) 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..d7881fe 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://www.bamboohr.com/api/documentation/ - 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..f37481a 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://www.bamboohr.com/api/documentation/ - 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..22e4d00 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://www.bamboohr.com/api/documentation/ - 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..52703c8 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://www.bamboohr.com/api/documentation/ - 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..ef24e59 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://www.bamboohr.com/api/documentation/ - 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..b0056c0 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://www.bamboohr.com/api/documentation/ - 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..fefb83b 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://www.bamboohr.com/api/documentation/ - 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..a9edbef 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://www.bamboohr.com/api/documentation/ - 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..eedf271 --- /dev/null +++ b/bamboohr_sdk/models/budget_breakdown_import_response.py @@ -0,0 +1,85 @@ +""" +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. +""" + +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..38a97de --- /dev/null +++ b/bamboohr_sdk/models/budget_guidelines_view.py @@ -0,0 +1,128 @@ +""" +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. +""" + +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..cd3088d --- /dev/null +++ b/bamboohr_sdk/models/budget_guidelines_warnings.py @@ -0,0 +1,96 @@ +""" +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. +""" + +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..4d22004 --- /dev/null +++ b/bamboohr_sdk/models/c79f9c5950f983e59d2626faa30c00a1_request.py @@ -0,0 +1,81 @@ +""" +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. +""" + +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..92b6d7f --- /dev/null +++ b/bamboohr_sdk/models/c7c32ed5278ac67e2e518bf7484a75dc_request.py @@ -0,0 +1,85 @@ +""" +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. +""" + +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 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/can_create_goals_response.py b/bamboohr_sdk/models/can_create_goals_response.py index 8d35b67..3159712 100644 --- a/bamboohr_sdk/models/can_create_goals_response.py +++ b/bamboohr_sdk/models/can_create_goals_response.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://www.bamboohr.com/api/documentation/ - 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 API user can create a goal for this employee.", alias="canCreateGoals" + ) + __properties: ClassVar[list[str]] = ["canCreateGoals"] model_config = ConfigDict( populate_by_name=True, @@ -35,7 +36,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 +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 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 +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 CanCreateGoalsResponse 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({ - "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..a7281a0 --- /dev/null +++ b/bamboohr_sdk/models/cf87b8e09a001b6fb81dfce6c20ab9e3_request.py @@ -0,0 +1,81 @@ +""" +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. +""" + +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 assignee employee IDs") + 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/changed_employee_ids_response.py b/bamboohr_sdk/models/changed_employee_ids_response.py index f1a3499..28e5080 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://www.bamboohr.com/api/documentation/ - 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..4653c2a 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://www.bamboohr.com/api/documentation/ - 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..520d18f 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://www.bamboohr.com/api/documentation/ - 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..014ed5d 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://www.bamboohr.com/api/documentation/ - 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..4a4516e 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://www.bamboohr.com/api/documentation/ - 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..d5c375c 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://www.bamboohr.com/api/documentation/ - 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..536da2f 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://www.bamboohr.com/api/documentation/ - 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_ids_schema.py b/bamboohr_sdk/models/clock_entry_ids_schema.py index 586343a..8c29539 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://www.bamboohr.com/api/documentation/ - 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..91bf292 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://www.bamboohr.com/api/documentation/ - 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..6228423 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://www.bamboohr.com/api/documentation/ - 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..7e984ab 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://www.bamboohr.com/api/documentation/ - 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..5e52bbc --- /dev/null +++ b/bamboohr_sdk/models/close_goal_request.py @@ -0,0 +1,85 @@ +""" +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. +""" + +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_alert_data_object.py b/bamboohr_sdk/models/company_alert_data_object.py new file mode 100644 index 0000000..8581701 --- /dev/null +++ b/bamboohr_sdk/models/company_alert_data_object.py @@ -0,0 +1,237 @@ +""" +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. +""" + +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, field_validator +from typing_extensions import Self + + +class CompanyAlertDataObject(BaseModel): + """ + CompanyAlertDataObject + """ + + id: StrictInt | None = Field(default=None, description="The unique identifier of the company alert.") + bamboo_alert_id: StrictInt | None = Field( + default=None, description="The unique identifier of the Bamboo alert.", alias="bambooAlertId" + ) + schedule: StrictStr | None = Field(default=None, description="The schedule for the company alert.") + due_within: StrictInt | 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: Any | None = Field( + default=None, description="The last edited date of the company alert.", 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="The additional recipient emails for the company alert.", + alias="additionalRecipientEmails", + ) + employee_ids: list[StrictStr] | None = Field( + default=None, description="The employee IDs for the company alert.", alias="employeeIds" + ) + list_value_ids: list[StrictInt] | None = Field( + default=None, description="The list value IDs for the company alert.", alias="listValueIds" + ) + filter_list_value_ids: list[StrictInt] | None = Field( + default=None, description="The filter list value IDs for the company alert.", alias="filterListValueIds" + ) + user_ids: list[StrictInt] | None = Field( + default=None, description="The user IDs for the company alert.", 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 + + 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 CompanyAlertDataObject 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 CompanyAlertDataObject 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/company_benefit_summary.py b/bamboohr_sdk/models/company_benefit_summary.py index 8276f12..a3f2689 100644 --- a/bamboohr_sdk/models/company_benefit_summary.py +++ b/bamboohr_sdk/models/company_benefit_summary.py @@ -1,52 +1,78 @@ -# 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://www.bamboohr.com/api/documentation/ - 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") + __properties: ClassVar[list[str]] = [ + "id", + "name", + "type", + "benefitVendorId", + "deductionTypeId", + "companyDeductionId", + "startDate", + "endDate", + "allowsCatchUp", + "allowsSuperCatchUp", + ] + + @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 +81,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 +91,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 +105,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 +115,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 +158,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"), - "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"), + } + ) return _obj - - diff --git a/bamboohr_sdk/models/company_benefits_list_response.py b/bamboohr_sdk/models/company_benefits_list_response.py index 8d031d9..8a1ad11 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://www.bamboohr.com/api/documentation/ - 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..ff64e86 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://www.bamboohr.com/api/documentation/ - 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..db3f118 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://www.bamboohr.com/api/documentation/ - 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..8f8ecdf 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://www.bamboohr.com/api/documentation/ - 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..9bfaa4d 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://www.bamboohr.com/api/documentation/ - 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..57d716d 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://www.bamboohr.com/api/documentation/ - 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..ce78c06 --- /dev/null +++ b/bamboohr_sdk/models/company_industry_data_object.py @@ -0,0 +1,102 @@ +""" +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. +""" + +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..556a73a 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://www.bamboohr.com/api/documentation/ - 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..816309b 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://www.bamboohr.com/api/documentation/ - 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..6561dac 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://www.bamboohr.com/api/documentation/ - 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..ead4310 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://www.bamboohr.com/api/documentation/ - 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..e31fcce --- /dev/null +++ b/bamboohr_sdk/models/company_profile_data.py @@ -0,0 +1,157 @@ +""" +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. +""" + +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..314ef44 --- /dev/null +++ b/bamboohr_sdk/models/company_profile_data_address.py @@ -0,0 +1,117 @@ +""" +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. +""" + +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..0fe6499 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://www.bamboohr.com/api/documentation/ - 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..11083de 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://www.bamboohr.com/api/documentation/ - 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..c2213fe --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_detail_employee.py @@ -0,0 +1,200 @@ +""" +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. +""" + +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") + currency_conversion_failed: StrictBool | None = Field(default=None, alias="currencyConversionFailed") + __properties: ClassVar[list[str]] = [ + "id", + "name", + "jobTitle", + "location", + "salary", + "varianceFromPayBand", + "yearsAtCompany", + "rangePenetration", + "compaRatio", + "compaRatioStatus", + "photoUrl", + "country", + "isRemote", + "currencyConversionFailed", + ] + + 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"), + "currencyConversionFailed": obj.get("currencyConversionFailed"), + } + ) + 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..78c531c 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://www.bamboohr.com/api/documentation/ - 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..a6cc293 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_detail_employee_salary.py @@ -0,0 +1,81 @@ +""" +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. +""" + +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..6b03013 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_details.py @@ -0,0 +1,175 @@ +""" +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. +""" + +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..0f04619 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_details_benchmark_values_inner.py @@ -0,0 +1,179 @@ +""" +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. +""" + +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..b5e5f5f --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_job_location_employee.py @@ -0,0 +1,159 @@ +""" +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. +""" + +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 + currency_conversion_failed: StrictBool | None = Field(default=None, alias="currencyConversionFailed") + __properties: ClassVar[list[str]] = [ + "id", + "name", + "salary", + "photoUrl", + "managerName", + "managerTitle", + "division", + "department", + "currencyConversionFailed", + ] + + 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"), + "currencyConversionFailed": obj.get("currencyConversionFailed"), + } + ) + 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..c459706 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_job_location_employee_salary.py @@ -0,0 +1,91 @@ +""" +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. +""" + +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..902c64f --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_job_location_pair.py @@ -0,0 +1,147 @@ +""" +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. +""" + +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..0f05d94 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://www.bamboohr.com/api/documentation/ - 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..5f71a45 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_overview.py @@ -0,0 +1,126 @@ +""" +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. +""" + +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..e811ec4 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_overview_values.py @@ -0,0 +1,147 @@ +""" +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. +""" + +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..1d51a4a --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmark_source.py @@ -0,0 +1,109 @@ +""" +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. +""" + +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..ba156c5 --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmarking_column_map.py @@ -0,0 +1,88 @@ +""" +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. +""" + +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..246d80f --- /dev/null +++ b/bamboohr_sdk/models/compensation_benchmarks_list.py @@ -0,0 +1,125 @@ +""" +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. +""" + +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..c1e42d1 --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response.py @@ -0,0 +1,222 @@ +""" +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. +""" + +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..9f92396 --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response_company_valuation.py @@ -0,0 +1,151 @@ +""" +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. +""" + +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..bb07aa2 --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response_disclaimers.py @@ -0,0 +1,140 @@ +""" +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. +""" + +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..2c39fb2 --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response_outstanding_shares.py @@ -0,0 +1,151 @@ +""" +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. +""" + +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..5e55ff0 --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response_price_per_share.py @@ -0,0 +1,140 @@ +""" +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. +""" + +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..83a2d76 --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response_slider_min.py @@ -0,0 +1,140 @@ +""" +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. +""" + +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..a68d61d --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_response_vesting_conditions.py @@ -0,0 +1,151 @@ +""" +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. +""" + +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..d5e0b1a --- /dev/null +++ b/bamboohr_sdk/models/compensation_equity_settings_update_request.py @@ -0,0 +1,222 @@ +""" +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. +""" + +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..c13af44 --- /dev/null +++ b/bamboohr_sdk/models/compensation_planning_cycle_admins_response.py @@ -0,0 +1,105 @@ +""" +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. +""" + +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..970bb86 --- /dev/null +++ b/bamboohr_sdk/models/compensation_planning_cycle_admins_response_admins_inner.py @@ -0,0 +1,141 @@ +""" +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. +""" + +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..1c1a295 --- /dev/null +++ b/bamboohr_sdk/models/compensation_planning_cycle_complete_response.py @@ -0,0 +1,120 @@ +""" +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. +""" + +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/compensation_planning_cycle_complete_response_errors_inner.py b/bamboohr_sdk/models/compensation_planning_cycle_complete_response_errors_inner.py new file mode 100644 index 0000000..118d97d --- /dev/null +++ b/bamboohr_sdk/models/compensation_planning_cycle_complete_response_errors_inner.py @@ -0,0 +1,91 @@ +""" +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. +""" + +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 CompensationPlanningCycleCompleteResponseErrorsInner(BaseModel): + """ + CompensationPlanningCycleCompleteResponseErrorsInner + """ + + employee_id: StrictStr | None = Field(default=None, alias="employeeId") + message: StrictStr | None = None + __properties: ClassVar[list[str]] = ["employeeId", "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 CompensationPlanningCycleCompleteResponseErrorsInner 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 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 CompensationPlanningCycleCompleteResponseErrorsInner 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"), "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..93bf1ce --- /dev/null +++ b/bamboohr_sdk/models/compensation_tools_data_object.py @@ -0,0 +1,103 @@ +""" +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. +""" + +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="Has access to Compensation Planning tool", alias="compensationPlanning" + ) + total_rewards: StrictBool | None = Field( + default=None, description="Has access to Total Rewards tool", alias="totalRewards" + ) + __properties: ClassVar[list[str]] = [ + "levelsAndBands", + "compensationBenchmarking", + "compensationPlanning", + "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"), + "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..22880c3 --- /dev/null +++ b/bamboohr_sdk/models/compensation_tools_response.py @@ -0,0 +1,102 @@ +""" +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. +""" + +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..bbdc612 --- /dev/null +++ b/bamboohr_sdk/models/compensation_upsell_data.py @@ -0,0 +1,101 @@ +""" +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. +""" + +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..e14be35 --- /dev/null +++ b/bamboohr_sdk/models/completed_questions_and_response_data_object.py @@ -0,0 +1,117 @@ +""" +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. +""" + +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..84d984c --- /dev/null +++ b/bamboohr_sdk/models/conversion_rate_data_object.py @@ -0,0 +1,94 @@ +""" +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. +""" + +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..8004231 --- /dev/null +++ b/bamboohr_sdk/models/countries_options_response.py @@ -0,0 +1,152 @@ +""" +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. +""" + +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..f21d941 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://www.bamboohr.com/api/documentation/ - 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..ee71d2d 100644 --- a/bamboohr_sdk/models/country_schema.py +++ b/bamboohr_sdk/models/country_schema.py @@ -1,35 +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://www.bamboohr.com/api/documentation/ - 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, StrictInt, StrictStr 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: StrictInt | None = Field( + default=None, + description="Internal country identifier. Use the same value as the `countryId` path parameter for Get States by Country ID (this endpoint returns JSON numbers, not stringified digits).", + ) + 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"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +39,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 +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 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 +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, @@ -73,12 +73,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 +86,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..b79ec5a 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://www.bamboohr.com/api/documentation/ - 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..270708b 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://www.bamboohr.com/api/documentation/ - 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..e4799ec 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://www.bamboohr.com/api/documentation/ - 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..a1b9b79 --- /dev/null +++ b/bamboohr_sdk/models/create_compensation_benchmark_request.py @@ -0,0 +1,218 @@ +""" +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. +""" + +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..6c4fe40 --- /dev/null +++ b/bamboohr_sdk/models/create_compensation_benchmark_source_request.py @@ -0,0 +1,85 @@ +""" +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. +""" + +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..9c68525 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://www.bamboohr.com/api/documentation/ - 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..d2d2837 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://www.bamboohr.com/api/documentation/ - 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..1097b86 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://www.bamboohr.com/api/documentation/ - 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..492c75c --- /dev/null +++ b/bamboohr_sdk/models/create_goal_request.py @@ -0,0 +1,139 @@ +""" +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. +""" + +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 employee IDs with whom the goal is shared. Must include the 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..2b142a6 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://www.bamboohr.com/api/documentation/ - 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..25dc37d 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://www.bamboohr.com/api/documentation/ - 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..7fb0f46 --- /dev/null +++ b/bamboohr_sdk/models/create_location_request.py @@ -0,0 +1,95 @@ +""" +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. +""" + +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..954ba8e --- /dev/null +++ b/bamboohr_sdk/models/create_location_request_address.py @@ -0,0 +1,147 @@ +""" +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. +""" + +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..a4c0c8c 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://www.bamboohr.com/api/documentation/ - 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..da18670 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://www.bamboohr.com/api/documentation/ - 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..e2e911e 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://www.bamboohr.com/api/documentation/ - 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..dbbf933 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://www.bamboohr.com/api/documentation/ - 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..d33be86 --- /dev/null +++ b/bamboohr_sdk/models/created_compensation_benchmark.py @@ -0,0 +1,100 @@ +""" +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. +""" + +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..6989e66 --- /dev/null +++ b/bamboohr_sdk/models/created_compensation_benchmark_saved_benchmark.py @@ -0,0 +1,249 @@ +""" +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. +""" + +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..364d43f 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://www.bamboohr.com/api/documentation/ - 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..5a7673b --- /dev/null +++ b/bamboohr_sdk/models/created_time_off_request.py @@ -0,0 +1,212 @@ +""" +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. +""" + +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 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..4a15800 --- /dev/null +++ b/bamboohr_sdk/models/created_time_off_request_amount.py @@ -0,0 +1,91 @@ +""" +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. +""" + +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..b4d497d --- /dev/null +++ b/bamboohr_sdk/models/created_time_off_request_notes.py @@ -0,0 +1,81 @@ +""" +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. +""" + +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..af3245c --- /dev/null +++ b/bamboohr_sdk/models/created_time_off_request_status.py @@ -0,0 +1,96 @@ +""" +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. +""" + +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..1cf8325 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://www.bamboohr.com/api/documentation/ - 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..e2e4efb --- /dev/null +++ b/bamboohr_sdk/models/currency_conversions_response.py @@ -0,0 +1,100 @@ +""" +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. +""" + +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", 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 numeric conversion rates relative to the base currency", + ) + __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..6358ded 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://www.bamboohr.com/api/documentation/ - 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..8bc35bc 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://www.bamboohr.com/api/documentation/ - 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 index c02f1ad..a9a29ac 100644 --- a/bamboohr_sdk/models/cursor_pagination_query_object.py +++ b/bamboohr_sdk/models/cursor_pagination_query_object.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://www.bamboohr.com/api/documentation/ - 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, 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"] + """ + + 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=100, strict=True, ge=1)] | None = 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, @@ -38,7 +44,6 @@ class CursorPaginationQueryObject(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 CursorPaginationQueryObject 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, @@ -74,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 CursorPaginationQueryObject from a dict""" if obj is None: return None @@ -82,11 +86,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({ - "before": obj.get("before"), - "after": obj.get("after"), - "limit": obj.get("limit") if obj.get("limit") is not None else 50 - }) + _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/dacd313af2106213fc4696175941ce65_request.py b/bamboohr_sdk/models/dacd313af2106213fc4696175941ce65_request.py new file mode 100644 index 0000000..dcfedb1 --- /dev/null +++ b/bamboohr_sdk/models/dacd313af2106213fc4696175941ce65_request.py @@ -0,0 +1,94 @@ +""" +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. +""" + +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..2fdf463 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://www.bamboohr.com/api/documentation/ - 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..4457222 --- /dev/null +++ b/bamboohr_sdk/models/data_request_aggregations.py @@ -0,0 +1,105 @@ +""" +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. +""" + +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..1c85a4c 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://www.bamboohr.com/api/documentation/ - 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..2cd4736 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://www.bamboohr.com/api/documentation/ - 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..8591cbe 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://www.bamboohr.com/api/documentation/ - 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..8897526 --- /dev/null +++ b/bamboohr_sdk/models/dataset_data_response_v2.py @@ -0,0 +1,110 @@ +""" +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. +""" + +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..0808cba --- /dev/null +++ b/bamboohr_sdk/models/dataset_data_response_v2_data_inner.py @@ -0,0 +1,99 @@ +""" +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. +""" + +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..18cb914 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://www.bamboohr.com/api/documentation/ - 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..9c0ad5b --- /dev/null +++ b/bamboohr_sdk/models/dataset_data_response_v2_links.py @@ -0,0 +1,91 @@ +""" +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. +""" + +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..d7858e2 --- /dev/null +++ b/bamboohr_sdk/models/dataset_data_response_v2_meta.py @@ -0,0 +1,110 @@ +""" +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. +""" + +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..e4238e7 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://www.bamboohr.com/api/documentation/ - 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..1ef5f25 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://www.bamboohr.com/api/documentation/ - 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..d06b593 --- /dev/null +++ b/bamboohr_sdk/models/dataset_v1.py @@ -0,0 +1,84 @@ +""" +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. +""" + +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..bf002e3 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://www.bamboohr.com/api/documentation/ - 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..f69d83e --- /dev/null +++ b/bamboohr_sdk/models/datasets_response_v12_datasets_inner.py @@ -0,0 +1,84 @@ +""" +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. +""" + +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..819e7ed --- /dev/null +++ b/bamboohr_sdk/models/delete_compensation_benchmark_source_request.py @@ -0,0 +1,80 @@ +""" +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. +""" + +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..7e595c7 --- /dev/null +++ b/bamboohr_sdk/models/delete_compensation_benchmark_source_response.py @@ -0,0 +1,85 @@ +""" +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. +""" + +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..b809ba4 --- /dev/null +++ b/bamboohr_sdk/models/details_and_currency_request_data_object.py @@ -0,0 +1,161 @@ +""" +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. +""" + +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..f03cae1 --- /dev/null +++ b/bamboohr_sdk/models/ec1ba8e76f33960b018d0d7518fe97b5_request.py @@ -0,0 +1,135 @@ +""" +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. +""" + +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..250cef8 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://www.bamboohr.com/api/documentation/ - 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 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. **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. Use the Upload Employee Photo endpoint (operationId: upload-employee-photo) to change a profile photo. + """ + + 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..563083a 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://www.bamboohr.com/api/documentation/ - 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..c7768f9 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://www.bamboohr.com/api/documentation/ - 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 numeric 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..3c925b2 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://www.bamboohr.com/api/documentation/ - 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..dba0748 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://www.bamboohr.com/api/documentation/ - 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 ID of the employee.", 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..445f89c 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://www.bamboohr.com/api/documentation/ - 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..d522d0a 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://www.bamboohr.com/api/documentation/ - 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..5d7cf17 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://www.bamboohr.com/api/documentation/ - 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..5da50c4 --- /dev/null +++ b/bamboohr_sdk/models/employee_cursor_pagination_query_object.py @@ -0,0 +1,96 @@ +""" +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. +""" + +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..c4fe55b 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://www.bamboohr.com/api/documentation/ - 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..c1e2835 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://www.bamboohr.com/api/documentation/ - 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..af680e5 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://www.bamboohr.com/api/documentation/ - 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 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..45d9523 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://www.bamboohr.com/api/documentation/ - 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..a7044e9 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,93 @@ -# 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://www.bamboohr.com/api/documentation/ - 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 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 +97,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 +107,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 +121,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 +131,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 +199,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..b64f30f 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://www.bamboohr.com/api/documentation/ - 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..1164126 --- /dev/null +++ b/bamboohr_sdk/models/employee_optional_field.py @@ -0,0 +1,155 @@ +""" +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. +""" + +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" + 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/job_summary_location.py b/bamboohr_sdk/models/employee_photo_json_response.py similarity index 50% rename from bamboohr_sdk/models/job_summary_location.py rename to bamboohr_sdk/models/employee_photo_json_response.py index e8a3f83..c4e1e33 100644 --- a/bamboohr_sdk/models/job_summary_location.py +++ b/bamboohr_sdk/models/employee_photo_json_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://www.bamboohr.com/api/documentation/ - 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, StrictBytes, StrictStr from typing_extensions import Self -class JobSummaryLocation(BaseModel): + +class EmployeePhotoJsonResponse(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"] + 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, @@ -37,7 +41,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 +51,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 EmployeePhotoJsonResponse 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, @@ -73,19 +75,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 JobSummaryLocation from a dict""" + 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({ - "id": obj.get("id"), - "label": obj.get("label"), - "address": obj.get("address") - }) + _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..60e365b 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://www.bamboohr.com/api/documentation/ - 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..129bd2d 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://www.bamboohr.com/api/documentation/ - 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..5cfe54b --- /dev/null +++ b/bamboohr_sdk/models/employee_string_code_error_response_v1.py @@ -0,0 +1,91 @@ +""" +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. +""" + +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..58a8011 --- /dev/null +++ b/bamboohr_sdk/models/employee_string_code_error_response_v1_error.py @@ -0,0 +1,81 @@ +""" +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. +""" + +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..523a8b2 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://www.bamboohr.com/api/documentation/ - 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 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..d9a6625 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://www.bamboohr.com/api/documentation/ - 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 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: 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 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..9857ba7 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://www.bamboohr.com/api/documentation/ - 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 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: 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 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..fbe8e98 --- /dev/null +++ b/bamboohr_sdk/models/employee_time_off_request_approver_response_inner.py @@ -0,0 +1,95 @@ +""" +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. +""" + +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..7e0850f 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://www.bamboohr.com/api/documentation/ - 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..25881e4 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://www.bamboohr.com/api/documentation/ - 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..13fc00f 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://www.bamboohr.com/api/documentation/ - 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..7982402 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://www.bamboohr.com/api/documentation/ - 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..75c3322 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://www.bamboohr.com/api/documentation/ - 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..94ebd4d --- /dev/null +++ b/bamboohr_sdk/models/employee_verification_integration.py @@ -0,0 +1,86 @@ +""" +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. +""" + +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..827b02f --- /dev/null +++ b/bamboohr_sdk/models/employee_verification_integration_response.py @@ -0,0 +1,91 @@ +""" +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. +""" + +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..f644c58 --- /dev/null +++ b/bamboohr_sdk/models/employee_verification_lifecycle_email_accepted_response.py @@ -0,0 +1,97 @@ +""" +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. +""" + +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..16f62ae --- /dev/null +++ b/bamboohr_sdk/models/employee_verification_public_api_record.py @@ -0,0 +1,154 @@ +""" +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. +""" + +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..ee586dd --- /dev/null +++ b/bamboohr_sdk/models/employee_verification_update_response.py @@ -0,0 +1,91 @@ +""" +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. +""" + +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..d61bcd9 --- /dev/null +++ b/bamboohr_sdk/models/employee_verifications_list_response.py @@ -0,0 +1,115 @@ +""" +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. +""" + +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..4af607b --- /dev/null +++ b/bamboohr_sdk/models/employees_directory_json_response.py @@ -0,0 +1,103 @@ +""" +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. +""" + +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` (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..e290beb --- /dev/null +++ b/bamboohr_sdk/models/employees_directory_json_response_fields_inner.py @@ -0,0 +1,87 @@ +""" +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. +""" + +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..483c9cb 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://www.bamboohr.com/api/documentation/ - 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..c782a1e 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://www.bamboohr.com/api/documentation/ - 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..f42c691 --- /dev/null +++ b/bamboohr_sdk/models/employees_directory_xml_response_employees_employee_inner.py @@ -0,0 +1,108 @@ +""" +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. +""" + +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="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..9b74d38 --- /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://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. +""" + +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..42f545a 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://www.bamboohr.com/api/documentation/ - 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/datasets_response_datasets_inner.py b/bamboohr_sdk/models/employees_directory_xml_response_fieldset_field_inner.py similarity index 54% rename from bamboohr_sdk/models/datasets_response_datasets_inner.py rename to bamboohr_sdk/models/employees_directory_xml_response_fieldset_field_inner.py index f8c196d..0c5bd00 100644 --- a/bamboohr_sdk/models/datasets_response_datasets_inner.py +++ b/bamboohr_sdk/models/employees_directory_xml_response_fieldset_field_inner.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://www.bamboohr.com/api/documentation/ - 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 DatasetsResponseDatasetsInner(BaseModel): + +class EmployeesDirectoryXmlResponseFieldsetFieldInner(BaseModel): """ - DatasetsResponseDatasetsInner - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="Internal name identifier for the dataset") - label: Optional[StrictStr] = Field(default=None, description="Human-readable label for the dataset") - __properties: ClassVar[List[str]] = ["name", "label"] + 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, @@ -36,7 +40,6 @@ class DatasetsResponseDatasetsInner(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]: - """Create an instance of DatasetsResponseDatasetsInner from a JSON string""" + 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]: + def 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, @@ -72,18 +74,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 DatasetsResponseDatasetsInner from a dict""" + 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({ - "name": obj.get("name"), - "label": obj.get("label") - }) + _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..b5521b9 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://www.bamboohr.com/api/documentation/ - 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..dbedeac --- /dev/null +++ b/bamboohr_sdk/models/error_response_error.py @@ -0,0 +1,81 @@ +""" +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. +""" + +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..a9fad27 --- /dev/null +++ b/bamboohr_sdk/models/f3883a522dadbe9e11b34f8b656e3adb_request.py @@ -0,0 +1,132 @@ +""" +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. +""" + +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 ID of the employee receiving the recommendation", alias="employeeId" + ) + assignee_employee_id: StrictStr = Field( + description="The 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..63fc72c 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://www.bamboohr.com/api/documentation/ - 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..85e873a 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://www.bamboohr.com/api/documentation/ - 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..19f0489 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://www.bamboohr.com/api/documentation/ - 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..f9c2641 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://www.bamboohr.com/api/documentation/ - 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..494eb12 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://www.bamboohr.com/api/documentation/ - 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..3deee40 --- /dev/null +++ b/bamboohr_sdk/models/field_options_transformer_id.py @@ -0,0 +1,151 @@ +""" +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. +""" + +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..58b4227 --- /dev/null +++ b/bamboohr_sdk/models/forbidden_v1.py @@ -0,0 +1,87 @@ +""" +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. +""" + +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..ceba2ab 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://www.bamboohr.com/api/documentation/ - 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..fedc454 --- /dev/null +++ b/bamboohr_sdk/models/get_break_policy_suggestions_request.py @@ -0,0 +1,82 @@ +""" +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. +""" + +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..94a3688 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://www.bamboohr.com/api/documentation/ - 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..0fd69c8 --- /dev/null +++ b/bamboohr_sdk/models/get_company_report_response_employees_inner.py @@ -0,0 +1,96 @@ +""" +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. +""" + +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 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..1292d18 --- /dev/null +++ b/bamboohr_sdk/models/get_data_from_dataset_v2_request.py @@ -0,0 +1,108 @@ +""" +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. +""" + +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..3ae5f74 --- /dev/null +++ b/bamboohr_sdk/models/get_employee_response.py @@ -0,0 +1,480 @@ +""" +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. +""" + +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="Unique identifier for the employee") + 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", + "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 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"), + "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..59899f8 --- /dev/null +++ b/bamboohr_sdk/models/get_employees_employee_base_response.py @@ -0,0 +1,139 @@ +""" +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. +""" + +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="Unique identifier for the employee", 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..d6dee48 100644 --- a/bamboohr_sdk/models/get_employees_employee_response.py +++ b/bamboohr_sdk/models/get_employees_employee_response.py @@ -1,54 +1,312 @@ -# 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://www.bamboohr.com/api/documentation/ - 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 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="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"] + 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") + 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", + "tShirtSize", + "tShirtSizeId", + "twitterUrl", + "userId", + "vaccinationStatus", + "vaccinationStatusId", + "vaccineReceived", + "vaccineReceivedId", + "veteranStatus", + "veteranStatusId", + "workEmail", + "workPhone", + "workPhoneExtension", + "zipcode", + ] model_config = ConfigDict( populate_by_name=True, @@ -56,7 +314,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 +324,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 +338,623 @@ 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.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.first_name is None and "first_name" in self.model_fields_set: - _dict['firstName'] = None + if self.address_line2 is None and "address_line2" in self.model_fields_set: + _dict["addressLine2"] = None - # set to None if last_name (nullable) is None + # set to None if age (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.age is None and "age" in self.model_fields_set: + _dict["age"] = None - # set to None if preferred_name (nullable) is None + # set to None if allergies (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.allergies is None and "allergies" in self.model_fields_set: + _dict["allergies"] = None - # set to None if photo_url (nullable) is None + # set to None if best_email (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.best_email is None and "best_email" in self.model_fields_set: + _dict["bestEmail"] = None - # set to None if job_title_name (nullable) is None + # set to None if birth_date (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.birth_date is None and "birth_date" in self.model_fields_set: + _dict["birthDate"] = None - # set to None if status (nullable) is None + # set to None if birthplace (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.birthplace is None and "birthplace" in self.model_fields_set: + _dict["birthplace"] = None - # set to None if work_email (nullable) is None + # set to None if citizenship (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.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 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 +962,145 @@ 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"), + "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..effd880 --- /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://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. +""" + +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..f41c1c8 --- /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://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. +""" + +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..e05f793 --- /dev/null +++ b/bamboohr_sdk/models/get_employees_employee_response_all_of_teams.py @@ -0,0 +1,81 @@ +""" +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. +""" + +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..b756066 100644 --- a/bamboohr_sdk/models/get_employees_filter_request_object.py +++ b/bamboohr_sdk/models/get_employees_filter_request_object.py @@ -1,45 +1,504 @@ -# 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://www.bamboohr.com/api/documentation/ - 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 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 an integer ID.", 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 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 +508,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 +518,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 +532,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 +542,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 +550,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..06fd0a3 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://www.bamboohr.com/api/documentation/ - 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..f707df1 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://www.bamboohr.com/api/documentation/ - 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..6c976ef 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://www.bamboohr.com/api/documentation/ - 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..e872c64 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://www.bamboohr.com/api/documentation/ - 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..86da7e7 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://www.bamboohr.com/api/documentation/ - 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/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..d139c75 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://www.bamboohr.com/api/documentation/ - 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..5c3af98 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://www.bamboohr.com/api/documentation/ - 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..dcede97 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://www.bamboohr.com/api/documentation/ - 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..4625dd2 100644 --- a/bamboohr_sdk/models/goal_aggregate_persons_inner.py +++ b/bamboohr_sdk/models/goal_aggregate_persons_inner.py @@ -1,37 +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://www.bamboohr.com/api/documentation/ - 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 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 +42,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 +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 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 +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,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 GoalAggregatePersonsInner from a dict""" if obj is None: return None @@ -83,13 +84,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..3ca0575 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://www.bamboohr.com/api/documentation/ - 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 API user can edit this comment.", alias="canEdit" + ) + can_delete: StrictBool | None = Field( + default=None, description="Whether the API user 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..ed80b68 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://www.bamboohr.com/api/documentation/ - 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..81577e1 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://www.bamboohr.com/api/documentation/ - 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 API user can edit this comment.", alias="canEdit" + ) + can_delete: StrictBool | None = Field( + default=None, description="Whether the API user 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..9ace937 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://www.bamboohr.com/api/documentation/ - 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..57a687a 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://www.bamboohr.com/api/documentation/ - 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..8f9c6a3 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://www.bamboohr.com/api/documentation/ - 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..844eef3 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://www.bamboohr.com/api/documentation/ - 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..396a0c1 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://www.bamboohr.com/api/documentation/ - 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..dc7f3e6 --- /dev/null +++ b/bamboohr_sdk/models/goal_response.py @@ -0,0 +1,87 @@ +""" +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. +""" + +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..0490cb0 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://www.bamboohr.com/api/documentation/ - 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..1f18255 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://www.bamboohr.com/api/documentation/ - 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..81395ab 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://www.bamboohr.com/api/documentation/ - 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..58ed1e6 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://www.bamboohr.com/api/documentation/ - 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..f0df486 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://www.bamboohr.com/api/documentation/ - 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..6939655 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://www.bamboohr.com/api/documentation/ - 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..ca74e69 100644 --- a/bamboohr_sdk/models/goals_aggregate_v1_persons_inner.py +++ b/bamboohr_sdk/models/goals_aggregate_v1_persons_inner.py @@ -1,37 +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://www.bamboohr.com/api/documentation/ - 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 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 +42,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 +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 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 +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,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 GoalsAggregateV1PersonsInner from a dict""" if obj is None: return None @@ -83,13 +84,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..825f1d4 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://www.bamboohr.com/api/documentation/ - 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..3bf7617 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://www.bamboohr.com/api/documentation/ - 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 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/hour_entries_request_schema.py b/bamboohr_sdk/models/hour_entries_request_schema.py index 7cbc481..9098a03 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://www.bamboohr.com/api/documentation/ - 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_ids_schema.py b/bamboohr_sdk/models/hour_entry_ids_schema.py index 2ec5201..f3b4a72 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://www.bamboohr.com/api/documentation/ - 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_schema.py b/bamboohr_sdk/models/hour_entry_schema.py index ca3a630..beca5a9 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://www.bamboohr.com/api/documentation/ - 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..37be1b4 --- /dev/null +++ b/bamboohr_sdk/models/import_compensation_benchmarks_response.py @@ -0,0 +1,103 @@ +""" +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. +""" + +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..da802da --- /dev/null +++ b/bamboohr_sdk/models/industry.py @@ -0,0 +1,81 @@ +""" +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. +""" + +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_inner.py b/bamboohr_sdk/models/inline_object_inner.py new file mode 100644 index 0000000..4008ec5 --- /dev/null +++ b/bamboohr_sdk/models/inline_object_inner.py @@ -0,0 +1,107 @@ +""" +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. +""" + +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 InlineObjectInner(BaseModel): + """ + InlineObjectInner + """ + + 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 InlineObjectInner 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 InlineObjectInner 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..74b1536 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://www.bamboohr.com/api/documentation/ - 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..942833f 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://www.bamboohr.com/api/documentation/ - 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..36ddd37 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://www.bamboohr.com/api/documentation/ - 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..694e432 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://www.bamboohr.com/api/documentation/ - 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..5b7b87e 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://www.bamboohr.com/api/documentation/ - 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..48a1fba 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://www.bamboohr.com/api/documentation/ - 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/json_directory_employee_fields_inner.py b/bamboohr_sdk/models/levels_and_bands_column_map.py similarity index 52% rename from bamboohr_sdk/models/json_directory_employee_fields_inner.py rename to bamboohr_sdk/models/levels_and_bands_column_map.py index 1687f87..79166c5 100644 --- a/bamboohr_sdk/models/json_directory_employee_fields_inner.py +++ b/bamboohr_sdk/models/levels_and_bands_column_map.py @@ -1,35 +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://www.bamboohr.com/api/documentation/ - 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 LevelsAndBandsColumnMap(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"] + 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, @@ -37,7 +35,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 +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 JsonDirectoryEmployeeFieldsInner from a JSON string""" + 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]: + def 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 +59,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, ) + # 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: 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 LevelsAndBandsColumnMap 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( + {"expectedColumnKey": obj.get("expectedColumnKey"), "columnName": obj.get("columnName")} + ) return _obj - - diff --git a/bamboohr_sdk/models/levels_and_bands_employee.py b/bamboohr_sdk/models/levels_and_bands_employee.py new file mode 100644 index 0000000..6e59b28 --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_employee.py @@ -0,0 +1,81 @@ +""" +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. +""" + +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 LevelsAndBandsEmployee(BaseModel): + """ + Job titles employee object + """ + + id: StrictInt | None = Field(default=None, description="Employee id") + name: StrictStr | None = Field(default=None, description="Employee 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 LevelsAndBandsEmployee 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 LevelsAndBandsEmployee 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/levels_and_bands_error_warning_identifier.py b/bamboohr_sdk/models/levels_and_bands_error_warning_identifier.py new file mode 100644 index 0000000..e0f5e1a --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_error_warning_identifier.py @@ -0,0 +1,81 @@ +""" +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. +""" + +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 LevelsAndBandsErrorWarningIdentifier(BaseModel): + """ + Object for compensation level groups and levels + """ + + group_id: StrictInt = Field(description="Group ID", alias="groupId") + level_id: StrictInt = Field(description="Level ID", alias="levelId") + __properties: ClassVar[list[str]] = ["groupId", "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 LevelsAndBandsErrorWarningIdentifier 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 LevelsAndBandsErrorWarningIdentifier from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"groupId": obj.get("groupId"), "levelId": obj.get("levelId")}) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_group.py b/bamboohr_sdk/models/levels_and_bands_group.py new file mode 100644 index 0000000..8d739c2 --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_group.py @@ -0,0 +1,109 @@ +""" +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. +""" + +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.levels_and_bands_level import LevelsAndBandsLevel + + +class LevelsAndBandsGroup(BaseModel): + """ + Represents a compensation level group with its levels + """ + + id: StrictInt | None = None + group_name: StrictStr | None = Field(default=None, alias="groupName") + levels: list[LevelsAndBandsLevel] | None = Field(default=None, description="Array of levels in this group") + __properties: ClassVar[list[str]] = ["id", "groupName", "levels"] + + 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 LevelsAndBandsGroup 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 levels (list) + _items = [] + if self.levels: + for _item_levels in self.levels: + if _item_levels: + _items.append(_item_levels.to_dict()) + _dict["levels"] = _items + # 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 group_name (nullable) is None + # and model_fields_set contains the field + if self.group_name is None and "group_name" in self.model_fields_set: + _dict["groupName"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LevelsAndBandsGroup 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"), + "groupName": obj.get("groupName"), + "levels": [LevelsAndBandsLevel.from_dict(_item) for _item in obj["levels"]] + if obj.get("levels") is not None + else None, + } + ) + 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..b35187f --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_group_status_counts.py @@ -0,0 +1,84 @@ +""" +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. +""" + +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 levels/bands in draft status") + historic: StrictInt | None = Field(default=None, description="Number of levels/bands in historic status") + published: StrictInt | None = Field(default=None, description="Number of levels/bands 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.py b/bamboohr_sdk/models/levels_and_bands_job_title.py new file mode 100644 index 0000000..d48e2b2 --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_job_title.py @@ -0,0 +1,81 @@ +""" +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. +""" + +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 LevelsAndBandsJobTitle(BaseModel): + """ + Job Titles Job Title Data Object + """ + + id: StrictInt | None = Field(default=None, description="Job title id") + job_title: StrictStr | None = Field(default=None, description="Job title name", alias="jobTitle") + __properties: ClassVar[list[str]] = ["id", "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) -> Self | None: + """Create an instance of LevelsAndBandsJobTitle 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 LevelsAndBandsJobTitle 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")}) + 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..4685303 --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_job_title_assignment.py @@ -0,0 +1,81 @@ +""" +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. +""" + +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 | None = Field(default=None, description="Job title id", alias="jobTitleId") + level_id: StrictInt | None = Field(default=None, 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..d291f2f --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_job_title_assignments_request.py @@ -0,0 +1,97 @@ +""" +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. +""" + +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_job_title_with_employees.py b/bamboohr_sdk/models/levels_and_bands_job_title_with_employees.py new file mode 100644 index 0000000..18ba58c --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_job_title_with_employees.py @@ -0,0 +1,106 @@ +""" +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. +""" + +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.levels_and_bands_employee import LevelsAndBandsEmployee + + +class LevelsAndBandsJobTitleWithEmployees(BaseModel): + """ + Levels and bands job titles with employees object + """ + + id: StrictInt | None = Field(default=None, description="Job id") + title: StrictStr | None = Field(default=None, description="Job title") + employees: list[LevelsAndBandsEmployee] | None = Field(default=None, description="Employees with this job title") + level_id: StrictInt | None = Field(default=None, alias="levelId") + __properties: ClassVar[list[str]] = ["id", "title", "employees", "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 LevelsAndBandsJobTitleWithEmployees 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 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 level_id (nullable) is None + # and model_fields_set contains the field + if self.level_id is None and "level_id" in self.model_fields_set: + _dict["levelId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LevelsAndBandsJobTitleWithEmployees 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"), + "employees": [LevelsAndBandsEmployee.from_dict(_item) for _item in obj["employees"]] + if obj.get("employees") is not None + else None, + "levelId": obj.get("levelId"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_job_titles_status.py b/bamboohr_sdk/models/levels_and_bands_job_titles_status.py new file mode 100644 index 0000000..b28f746 --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_job_titles_status.py @@ -0,0 +1,84 @@ +""" +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. +""" + +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 LevelsAndBandsJobTitlesStatus(BaseModel): + """ + Object for compensation level groups and levels + """ + + is_complete: StrictBool = Field(description="Is the job titles step complete", alias="isComplete") + errors: list[StrictStr] = Field(description="Array of errors") + warnings: list[dict[str, Any]] = Field(description="Array of warnings") + __properties: ClassVar[list[str]] = ["isComplete", "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 LevelsAndBandsJobTitlesStatus 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 LevelsAndBandsJobTitlesStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"isComplete": obj.get("isComplete"), "errors": obj.get("errors"), "warnings": obj.get("warnings")} + ) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_level.py b/bamboohr_sdk/models/levels_and_bands_level.py new file mode 100644 index 0000000..4ce3209 --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_level.py @@ -0,0 +1,123 @@ +""" +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. +""" + +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.levels_and_bands_job_title import LevelsAndBandsJobTitle +from bamboohr_sdk.models.levels_and_bands_pay_band import LevelsAndBandsPayBand + + +class LevelsAndBandsLevel(BaseModel): + """ + Represents a single compensation level + """ + + level_id: StrictInt | None = Field(default=None, alias="levelId") + level_name: StrictStr | None = Field(default=None, alias="levelName") + pay_band: LevelsAndBandsPayBand | None = Field( + default=None, description="Pay band associated with this level", alias="payBand" + ) + job_titles: list[LevelsAndBandsJobTitle] | None = Field( + default=None, description="Array of job titles associated with this level", alias="jobTitles" + ) + errors: list[StrictStr] | None = Field(default=None, description="Array of validation errors for this level") + warnings: list[StrictStr] | None = Field(default=None, description="Array of validation warnings for this level") + __properties: ClassVar[list[str]] = ["levelId", "levelName", "payBand", "jobTitles", "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 LevelsAndBandsLevel 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 pay_band + if self.pay_band: + _dict["payBand"] = self.pay_band.to_dict() + # 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 + # set to None if level_id (nullable) is None + # and model_fields_set contains the field + if self.level_id is None and "level_id" in self.model_fields_set: + _dict["levelId"] = None + + # set to None if level_name (nullable) is None + # and model_fields_set contains the field + if self.level_name is None and "level_name" in self.model_fields_set: + _dict["levelName"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LevelsAndBandsLevel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "levelId": obj.get("levelId"), + "levelName": obj.get("levelName"), + "payBand": LevelsAndBandsPayBand.from_dict(obj["payBand"]) if obj.get("payBand") is not None else None, + "jobTitles": [LevelsAndBandsJobTitle.from_dict(_item) for _item in obj["jobTitles"]] + if obj.get("jobTitles") is not None + else None, + "errors": obj.get("errors"), + "warnings": obj.get("warnings"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_levels_and_bands.py b/bamboohr_sdk/models/levels_and_bands_levels_and_bands.py new file mode 100644 index 0000000..f99fac3 --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_levels_and_bands.py @@ -0,0 +1,95 @@ +""" +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. +""" + +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_group import LevelsAndBandsGroup + + +class LevelsAndBandsLevelsAndBands(BaseModel): + """ + Object for compensation level groups and levels + """ + + groups: list[LevelsAndBandsGroup] = Field(description="Array of compensation level groups to upsert") + __properties: ClassVar[list[str]] = ["groups"] + + 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 LevelsAndBandsLevelsAndBands 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 groups (list) + _items = [] + if self.groups: + for _item_groups in self.groups: + if _item_groups: + _items.append(_item_groups.to_dict()) + _dict["groups"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LevelsAndBandsLevelsAndBands from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "groups": [LevelsAndBandsGroup.from_dict(_item) for _item in obj["groups"]] + if obj.get("groups") is not None + else None + } + ) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_levels_and_bands_status.py b/bamboohr_sdk/models/levels_and_bands_levels_and_bands_status.py new file mode 100644 index 0000000..caea90d --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_levels_and_bands_status.py @@ -0,0 +1,113 @@ +""" +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. +""" + +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_titles_status import LevelsAndBandsJobTitlesStatus +from bamboohr_sdk.models.levels_and_bands_step_status import LevelsAndBandsStepStatus + + +class LevelsAndBandsLevelsAndBandsStatus(BaseModel): + """ + Object for compensation level groups and levels + """ + + levels: LevelsAndBandsStepStatus = Field(description="Object for compensation level groups and levels") + pay_bands: LevelsAndBandsStepStatus = Field( + description="Object for compensation level groups and levels", alias="payBands" + ) + job_titles: LevelsAndBandsJobTitlesStatus = Field( + description="Object for compensation level groups and levels", alias="jobTitles" + ) + review: LevelsAndBandsStepStatus = Field(description="Object for compensation level groups and levels") + __properties: ClassVar[list[str]] = ["levels", "payBands", "jobTitles", "review"] + + 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 LevelsAndBandsLevelsAndBandsStatus 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 levels + if self.levels: + _dict["levels"] = self.levels.to_dict() + # override the default output from pydantic by calling `to_dict()` of pay_bands + if self.pay_bands: + _dict["payBands"] = self.pay_bands.to_dict() + # override the default output from pydantic by calling `to_dict()` of job_titles + if self.job_titles: + _dict["jobTitles"] = self.job_titles.to_dict() + # override the default output from pydantic by calling `to_dict()` of review + if self.review: + _dict["review"] = self.review.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LevelsAndBandsLevelsAndBandsStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "levels": LevelsAndBandsStepStatus.from_dict(obj["levels"]) if obj.get("levels") is not None else None, + "payBands": LevelsAndBandsStepStatus.from_dict(obj["payBands"]) + if obj.get("payBands") is not None + else None, + "jobTitles": LevelsAndBandsJobTitlesStatus.from_dict(obj["jobTitles"]) + if obj.get("jobTitles") is not None + else None, + "review": LevelsAndBandsStepStatus.from_dict(obj["review"]) if obj.get("review") is not None else None, + } + ) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_pay_band.py b/bamboohr_sdk/models/levels_and_bands_pay_band.py new file mode 100644 index 0000000..624643e --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_pay_band.py @@ -0,0 +1,118 @@ +""" +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. +""" + +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 LevelsAndBandsPayBand(BaseModel): + """ + Pay band data object + """ + + level_id: StrictInt | None = Field(default=None, alias="levelId") + min: StrictFloat | StrictInt | None = Field(default=None, description="The minimum value for the level") + mid: StrictFloat | StrictInt | None = Field(default=None, description="The middle value for the level") + max: StrictFloat | StrictInt | None = Field(default=None, description="The maximum value for the level") + currency_code: StrictStr | None = Field(default=None, alias="currencyCode") + percentage_range: StrictFloat | StrictInt | None = Field( + default=None, description="The percentage range for the level", alias="percentageRange" + ) + compensation_type: StrictStr | None = Field( + default=None, description="The compensation type for the level", alias="compensationType" + ) + __properties: ClassVar[list[str]] = [ + "levelId", + "min", + "mid", + "max", + "currencyCode", + "percentageRange", + "compensationType", + ] + + 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 LevelsAndBandsPayBand 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 level_id (nullable) is None + # and model_fields_set contains the field + if self.level_id is None and "level_id" in self.model_fields_set: + _dict["levelId"] = 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 LevelsAndBandsPayBand from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "levelId": obj.get("levelId"), + "min": obj.get("min"), + "mid": obj.get("mid"), + "max": obj.get("max"), + "currencyCode": obj.get("currencyCode"), + "percentageRange": obj.get("percentageRange"), + "compensationType": obj.get("compensationType"), + } + ) + return _obj diff --git a/bamboohr_sdk/models/levels_and_bands_step_status.py b/bamboohr_sdk/models/levels_and_bands_step_status.py new file mode 100644 index 0000000..d4854c4 --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_step_status.py @@ -0,0 +1,108 @@ +""" +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. +""" + +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.levels_and_bands_error_warning_identifier import LevelsAndBandsErrorWarningIdentifier + + +class LevelsAndBandsStepStatus(BaseModel): + """ + Object for compensation level groups and levels + """ + + is_complete: StrictBool = Field(description="Whether the step is complete", alias="isComplete") + errors: list[LevelsAndBandsErrorWarningIdentifier] = Field(description="Array of errors") + warnings: list[LevelsAndBandsErrorWarningIdentifier] = Field(description="Array of warnings") + __properties: ClassVar[list[str]] = ["isComplete", "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 LevelsAndBandsStepStatus 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 warnings (list) + _items = [] + if self.warnings: + for _item_warnings in self.warnings: + if _item_warnings: + _items.append(_item_warnings.to_dict()) + _dict["warnings"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: dict[str, Any] | None) -> Self | None: + """Create an instance of LevelsAndBandsStepStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "isComplete": obj.get("isComplete"), + "errors": [LevelsAndBandsErrorWarningIdentifier.from_dict(_item) for _item in obj["errors"]] + if obj.get("errors") is not None + else None, + "warnings": [LevelsAndBandsErrorWarningIdentifier.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None, + } + ) + 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..51d4e9a --- /dev/null +++ b/bamboohr_sdk/models/levels_and_bands_upload_response.py @@ -0,0 +1,97 @@ +""" +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. +""" + +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[StrictStr] | None = Field(default=None, description="Upload data", 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..8bcc31d 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://www.bamboohr.com/api/documentation/ - 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..f71698e 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://www.bamboohr.com/api/documentation/ - 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