samsara-api 3.0.0__py3-none-any.whl → 4.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- samsara/__init__.py +7438 -2443
- samsara/addresses/__init__.py +31 -1
- samsara/addresses/client.py +19 -12
- samsara/addresses/raw_client.py +13 -16
- samsara/addresses/types/__init__.py +32 -2
- samsara/addresses/types/create_address_request_address_types_item.py +9 -1
- samsara/addresses/types/update_address_request_address_types_item.py +9 -1
- samsara/alerts/__init__.py +29 -3
- samsara/alerts/client.py +811 -8
- samsara/alerts/raw_client.py +1837 -0
- samsara/alerts/types/__init__.py +34 -0
- samsara/alerts/types/get_configurations_request_status.py +5 -0
- samsara/assets/__init__.py +40 -9
- samsara/assets/client.py +710 -23
- samsara/assets/raw_client.py +673 -6
- samsara/assets/types/__init__.py +38 -5
- samsara/attributes/__init__.py +50 -16
- samsara/attributes/client.py +82 -96
- samsara/attributes/raw_client.py +57 -104
- samsara/attributes/types/__init__.py +48 -14
- samsara/attributes/types/create_attribute_request_attribute_type.py +3 -1
- samsara/attributes/types/create_attribute_request_unit.py +42 -0
- samsara/attributes/types/delete_attribute_request_entity_type.py +5 -0
- samsara/attributes/types/get_attribute_request_entity_type.py +5 -0
- samsara/attributes/types/get_attributes_by_entity_type_request_entity_type.py +5 -0
- samsara/attributes/types/update_attribute_request_attribute_type.py +3 -1
- samsara/beta_ap_is/__init__.py +70 -0
- samsara/beta_ap_is/client.py +7119 -0
- samsara/beta_ap_is/raw_client.py +16518 -0
- samsara/beta_ap_is/types/__init__.py +70 -0
- samsara/beta_ap_is/types/functions_start_function_run_request_body_params_override.py +21 -0
- samsara/beta_ap_is/types/get_assets_inputs_request_type.py +27 -0
- samsara/beta_ap_is/types/get_driver_efficiency_request_driver_activation_status.py +5 -0
- samsara/beta_ap_is/types/get_hos_eld_events_request_driver_activation_status.py +5 -0
- samsara/beta_ap_is/types/get_jobs_request_status.py +5 -0
- samsara/beta_ap_is/types/get_qualification_records_stream_request_entity_type.py +5 -0
- samsara/beta_ap_is/types/get_qualification_types_request_entity_type.py +5 -0
- samsara/beta_ap_is/types/get_tag_group_safety_scores_request_score_type.py +5 -0
- samsara/beta_ap_is/types/get_tag_safety_scores_request_score_type.py +5 -0
- samsara/beta_ap_is/types/get_trips_request_completion_status.py +5 -0
- samsara/beta_ap_is/types/get_trips_request_query_by.py +5 -0
- samsara/carrier_proposed_assignments/client.py +38 -39
- samsara/carrier_proposed_assignments/raw_client.py +23 -61
- samsara/client.py +950 -152
- samsara/coaching/__init__.py +0 -3
- samsara/coaching/client.py +442 -8
- samsara/coaching/raw_client.py +1043 -0
- samsara/contacts/client.py +48 -51
- samsara/contacts/raw_client.py +29 -61
- samsara/core/__init__.py +76 -21
- samsara/core/client_wrapper.py +20 -10
- samsara/core/force_multipart.py +4 -2
- samsara/core/http_response.py +1 -1
- samsara/core/pagination.py +1 -1
- samsara/core/pydantic_utilities.py +7 -4
- samsara/documents/__init__.py +29 -3
- samsara/documents/client.py +294 -44
- samsara/documents/raw_client.py +503 -53
- samsara/documents/types/__init__.py +30 -1
- samsara/driver_qr_codes/client.py +306 -0
- samsara/driver_qr_codes/raw_client.py +928 -0
- samsara/driver_vehicle_assignments/__init__.py +32 -2
- samsara/driver_vehicle_assignments/client.py +47 -35
- samsara/driver_vehicle_assignments/raw_client.py +19 -19
- samsara/driver_vehicle_assignments/types/__init__.py +33 -3
- samsara/driver_vehicle_assignments/types/get_driver_vehicle_assignments_request_assignment_type.py +10 -0
- samsara/driver_vehicle_assignments/types/get_driver_vehicle_assignments_request_filter_by.py +5 -0
- samsara/drivers/__init__.py +38 -11
- samsara/drivers/client.py +139 -20
- samsara/drivers/raw_client.py +111 -6
- samsara/drivers/types/__init__.py +36 -4
- samsara/equipment/__init__.py +39 -7
- samsara/equipment/client.py +1001 -62
- samsara/equipment/raw_client.py +1010 -70
- samsara/equipment/types/__init__.py +44 -0
- samsara/equipment/types/get_equipment_stats_feed_request_types_item.py +19 -0
- samsara/equipment/types/get_equipment_stats_history_request_types_item.py +19 -0
- samsara/equipment/types/get_equipment_stats_request_types_item.py +19 -0
- samsara/errors/__init__.py +46 -9
- samsara/fleet/__init__.py +34 -0
- samsara/fleet/attributes/client.py +101 -0
- samsara/fleet/attributes/raw_client.py +74 -0
- samsara/fleet/client.py +63 -0
- samsara/fleet/raw_client.py +13 -0
- samsara/forms/__init__.py +30 -0
- samsara/forms/client.py +815 -2
- samsara/forms/raw_client.py +2091 -15
- samsara/forms/types/__init__.py +38 -0
- samsara/fuel_and_energy/__init__.py +46 -0
- samsara/fuel_and_energy/client.py +960 -0
- samsara/fuel_and_energy/raw_client.py +1925 -0
- samsara/fuel_and_energy/types/__init__.py +48 -0
- samsara/fuel_and_energy/types/fuel_purchase_post_fuel_purchase_request_body_fuel_grade.py +7 -0
- samsara/fuel_and_energy/types/get_fuel_energy_vehicle_reports_request_energy_type.py +5 -0
- samsara/gateways/client.py +29 -35
- samsara/gateways/raw_client.py +14 -45
- samsara/hours_of_service/__init__.py +34 -0
- samsara/hours_of_service/client.py +1002 -0
- samsara/hours_of_service/raw_client.py +1381 -0
- samsara/hours_of_service/types/__init__.py +36 -0
- samsara/hours_of_service/types/get_hos_daily_logs_request_driver_activation_status.py +5 -0
- samsara/hubs/client.py +1073 -0
- samsara/hubs/raw_client.py +2106 -0
- samsara/idling/__init__.py +29 -2
- samsara/idling/client.py +36 -30
- samsara/idling/raw_client.py +18 -72
- samsara/idling/types/__init__.py +29 -2
- samsara/idling/types/get_idling_events_request_pto_state.py +5 -0
- samsara/ifta/__init__.py +50 -2
- samsara/ifta/client.py +634 -3
- samsara/ifta/raw_client.py +1432 -0
- samsara/ifta/types/__init__.py +53 -0
- samsara/ifta/types/get_ifta_jurisdiction_reports_request_fuel_type.py +25 -0
- samsara/ifta/types/get_ifta_jurisdiction_reports_request_month.py +21 -0
- samsara/ifta/types/get_ifta_jurisdiction_reports_request_quarter.py +5 -0
- samsara/ifta/types/get_ifta_vehicle_reports_request_fuel_type.py +25 -0
- samsara/ifta/types/get_ifta_vehicle_reports_request_month.py +21 -0
- samsara/ifta/types/get_ifta_vehicle_reports_request_quarter.py +5 -0
- samsara/industrial/client.py +2167 -0
- samsara/industrial/raw_client.py +2463 -0
- samsara/issues/__init__.py +28 -1
- samsara/issues/client.py +39 -35
- samsara/issues/raw_client.py +24 -53
- samsara/issues/types/__init__.py +30 -1
- samsara/legacy/client.py +21 -95
- samsara/legacy/raw_client.py +25 -304
- samsara/legacy_ap_is/__init__.py +34 -0
- samsara/legacy_ap_is/client.py +879 -0
- samsara/legacy_ap_is/raw_client.py +1433 -0
- samsara/legacy_ap_is/types/__init__.py +38 -0
- samsara/legacy_ap_is/types/get_drivers_vehicle_assignments_request_driver_activation_status.py +7 -0
- samsara/live_sharing_links/__init__.py +37 -0
- samsara/live_sharing_links/client.py +548 -0
- samsara/live_sharing_links/raw_client.py +1389 -0
- samsara/live_sharing_links/types/__init__.py +40 -0
- samsara/live_sharing_links/types/get_live_sharing_links_request_type.py +7 -0
- samsara/location_and_speed/client.py +236 -0
- samsara/location_and_speed/raw_client.py +414 -0
- samsara/maintenance/__init__.py +30 -20
- samsara/maintenance/client.py +1198 -8
- samsara/maintenance/raw_client.py +2249 -0
- samsara/maintenance/types/__init__.py +34 -0
- samsara/media/__init__.py +52 -0
- samsara/media/client.py +500 -0
- samsara/media/raw_client.py +1082 -0
- samsara/media/types/__init__.py +54 -0
- samsara/media/types/list_uploaded_media_request_inputs_item.py +7 -0
- samsara/media/types/list_uploaded_media_request_media_types_item.py +5 -0
- samsara/media/types/list_uploaded_media_request_trigger_reasons_item.py +17 -0
- samsara/media/types/media_retrieval_post_media_retrieval_request_body_inputs_item.py +7 -0
- samsara/messages/client.py +272 -0
- samsara/messages/raw_client.py +273 -0
- samsara/organization_info/client.py +112 -0
- samsara/organization_info/raw_client.py +101 -0
- samsara/plans/client.py +312 -0
- samsara/plans/raw_client.py +700 -0
- samsara/preview_ap_is/client.py +367 -0
- samsara/preview_ap_is/raw_client.py +956 -0
- samsara/routes/__init__.py +0 -3
- samsara/routes/client.py +459 -50
- samsara/routes/raw_client.py +913 -140
- samsara/safety/client.py +662 -0
- samsara/safety/raw_client.py +869 -0
- samsara/sensors/__init__.py +34 -0
- samsara/sensors/client.py +680 -0
- samsara/sensors/raw_client.py +746 -0
- samsara/sensors/types/__init__.py +34 -0
- samsara/sensors/types/inline_object_6_fill_missing.py +5 -0
- samsara/settings/__init__.py +0 -3
- samsara/settings/client.py +579 -13
- samsara/settings/raw_client.py +1655 -0
- samsara/speeding_intervals/__init__.py +29 -2
- samsara/speeding_intervals/client.py +20 -28
- samsara/speeding_intervals/raw_client.py +16 -58
- samsara/speeding_intervals/types/__init__.py +31 -2
- samsara/speeding_intervals/types/get_speeding_intervals_request_query_by.py +5 -0
- samsara/tachograph_eu_only/client.py +494 -0
- samsara/tachograph_eu_only/raw_client.py +475 -0
- samsara/tags/client.py +53 -58
- samsara/tags/raw_client.py +29 -63
- samsara/trailer_assignments/client.py +331 -0
- samsara/trailer_assignments/raw_client.py +313 -0
- samsara/trailers/client.py +47 -47
- samsara/trailers/raw_client.py +18 -53
- samsara/trips/__init__.py +0 -3
- samsara/trips/client.py +55 -111
- samsara/trips/raw_client.py +58 -349
- samsara/types/__init__.py +10049 -4134
- samsara/types/address.py +5 -5
- samsara/types/address_address_types_item.py +9 -1
- samsara/types/address_external_ids.py +21 -0
- samsara/types/aemp_equipment_get_aemp_equipment_list_bad_gateway_error_response_body.py +33 -0
- samsara/types/aemp_equipment_get_aemp_equipment_list_gateway_timeout_error_response_body.py +33 -0
- samsara/types/aemp_equipment_get_aemp_equipment_list_internal_server_error_response_body.py +33 -0
- samsara/types/aemp_equipment_get_aemp_equipment_list_method_not_allowed_error_response_body.py +33 -0
- samsara/types/aemp_equipment_get_aemp_equipment_list_not_found_error_response_body.py +33 -0
- samsara/types/aemp_equipment_get_aemp_equipment_list_not_implemented_error_response_body.py +33 -0
- samsara/types/aemp_equipment_get_aemp_equipment_list_response_body.py +22 -0
- samsara/types/aemp_equipment_get_aemp_equipment_list_service_unavailable_error_response_body.py +33 -0
- samsara/types/aemp_equipment_get_aemp_equipment_list_too_many_requests_error_response_body.py +33 -0
- samsara/types/aemp_equipment_get_aemp_equipment_list_unauthorized_error_response_body.py +33 -0
- samsara/types/aemp_equipment_with_additional_fields_response_body.py +48 -0
- samsara/types/aemp_fleet_list_response_body.py +49 -0
- samsara/types/aemp_link_response_body.py +31 -0
- samsara/types/anticipation_brake_event_count.py +3 -0
- samsara/types/appointment_window_request_body.py +34 -0
- samsara/types/appointment_window_response_body.py +34 -0
- samsara/types/asset_data_input.py +45 -0
- samsara/types/asset_data_input_last_point.py +28 -0
- samsara/types/asset_data_output.py +45 -0
- samsara/types/asset_data_outputs_patch_asset_data_outputs_bad_gateway_error_response_body.py +33 -0
- samsara/types/asset_data_outputs_patch_asset_data_outputs_gateway_timeout_error_response_body.py +33 -0
- samsara/types/asset_data_outputs_patch_asset_data_outputs_internal_server_error_response_body.py +33 -0
- samsara/types/asset_data_outputs_patch_asset_data_outputs_method_not_allowed_error_response_body.py +33 -0
- samsara/types/asset_data_outputs_patch_asset_data_outputs_not_found_error_response_body.py +33 -0
- samsara/types/asset_data_outputs_patch_asset_data_outputs_not_implemented_error_response_body.py +33 -0
- samsara/types/asset_data_outputs_patch_asset_data_outputs_response_body.py +23 -0
- samsara/types/asset_data_outputs_patch_asset_data_outputs_service_unavailable_error_response_body.py +33 -0
- samsara/types/asset_data_outputs_patch_asset_data_outputs_too_many_requests_error_response_body.py +33 -0
- samsara/types/asset_data_outputs_patch_asset_data_outputs_unauthorized_error_response_body.py +33 -0
- samsara/types/asset_location.py +35 -0
- samsara/types/asset_name.py +3 -0
- samsara/types/asset_response.py +71 -0
- samsara/types/asset_response_body.py +7 -0
- samsara/types/asset_response_location_data_input.py +26 -0
- samsara/types/asset_response_parent_asset.py +26 -0
- samsara/types/asset_response_running_status_data_input.py +26 -0
- samsara/types/assets_location_link_request_config_object.py +39 -0
- samsara/types/assets_location_link_response_config_object_response_body.py +40 -0
- samsara/types/attribute.py +10 -12
- samsara/types/attribute_attribute_type.py +3 -1
- samsara/types/attribute_entity.py +3 -3
- samsara/types/attribute_unit.py +42 -0
- samsara/types/base_route_response_object_response_body.py +7 -0
- samsara/types/coasting_duration_ms.py +3 -0
- samsara/types/continuous_reading_alert_threshold_response_body.py +1 -1
- samsara/types/continuous_reading_alert_threshold_response_body_unit.py +15 -0
- samsara/types/create_driver_auth_token_response_response_body.py +33 -0
- samsara/types/cruise_control_duration_ms.py +3 -0
- samsara/types/cumulative_operating_hours_response_body.py +35 -0
- samsara/types/custom_metadata.py +5 -0
- samsara/types/data_input_list_response.py +26 -0
- samsara/types/data_input_response.py +19 -0
- samsara/types/data_input_response_all_of.py +59 -0
- samsara/types/data_input_snapshot.py +19 -0
- samsara/types/data_input_snapshot_all_of.py +40 -0
- samsara/types/data_input_snapshot_response.py +26 -0
- samsara/types/data_input_tiny_response.py +52 -0
- samsara/types/data_inputs_tiny_response.py +26 -0
- samsara/types/def_remaining_response_body.py +35 -0
- samsara/types/detection_log_asset_object_response_body.py +43 -0
- samsara/types/detection_log_detection_object_response_body.py +65 -0
- samsara/types/detection_log_detection_object_response_body_trigger_detection_label.py +33 -0
- samsara/types/detection_log_driver_object_response_body.py +52 -0
- samsara/types/detection_log_get_detections_bad_gateway_error_response_body.py +33 -0
- samsara/types/detection_log_get_detections_gateway_timeout_error_response_body.py +33 -0
- samsara/types/detection_log_get_detections_internal_server_error_response_body.py +33 -0
- samsara/types/detection_log_get_detections_method_not_allowed_error_response_body.py +33 -0
- samsara/types/detection_log_get_detections_not_found_error_response_body.py +33 -0
- samsara/types/detection_log_get_detections_not_implemented_error_response_body.py +33 -0
- samsara/types/detection_log_get_detections_response_body.py +26 -0
- samsara/types/detection_log_get_detections_service_unavailable_error_response_body.py +33 -0
- samsara/types/detection_log_get_detections_too_many_requests_error_response_body.py +33 -0
- samsara/types/detection_log_get_detections_unauthorized_error_response_body.py +33 -0
- samsara/types/detection_log_safety_event_object_response_body.py +39 -0
- samsara/types/detection_log_safety_event_object_response_body_inbox_filter_reason.py +21 -0
- samsara/types/device_response_response_body.py +1 -1
- samsara/types/device_response_response_body_model.py +5 -0
- samsara/types/distance_driven_meters.py +3 -0
- samsara/types/distance_response_body.py +42 -0
- samsara/types/drive_time_duration_ms.py +3 -0
- samsara/types/driver.py +8 -0
- samsara/types/driver_app_sign_in_response_body.py +6 -0
- samsara/types/driver_efficiencies_response.py +26 -0
- samsara/types/driver_efficiencies_response_data.py +42 -0
- samsara/types/driver_efficiency.py +79 -0
- samsara/types/driver_efficiency_data_object_response_body.py +84 -0
- samsara/types/driver_efficiency_difficulty_score_data_object_response_body.py +44 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_bad_gateway_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_gateway_timeout_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_internal_server_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_method_not_allowed_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_not_found_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_not_implemented_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_response_body.py +28 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_service_unavailable_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_too_many_requests_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_drivers_unauthorized_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_bad_gateway_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_gateway_timeout_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_internal_server_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_method_not_allowed_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_not_found_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_not_implemented_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_response_body.py +28 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_service_unavailable_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_too_many_requests_error_response_body.py +33 -0
- samsara/types/driver_efficiency_get_driver_efficiency_by_vehicles_unauthorized_error_response_body.py +33 -0
- samsara/types/driver_efficiency_percentage_data_object_response_body.py +84 -0
- samsara/types/driver_efficiency_raw_data_object_response_body.py +119 -0
- samsara/types/driver_has_vehicle_unpinning_enabled.py +3 -0
- samsara/types/driver_profile_image_base_64.py +3 -0
- samsara/types/driver_profile_image_url.py +3 -0
- samsara/types/driver_safety_score_response_body.py +59 -0
- samsara/types/drivers_auth_token_create_driver_auth_token_bad_gateway_error_response_body.py +33 -0
- samsara/types/drivers_auth_token_create_driver_auth_token_gateway_timeout_error_response_body.py +33 -0
- samsara/types/drivers_auth_token_create_driver_auth_token_internal_server_error_response_body.py +33 -0
- samsara/types/drivers_auth_token_create_driver_auth_token_method_not_allowed_error_response_body.py +33 -0
- samsara/types/drivers_auth_token_create_driver_auth_token_not_found_error_response_body.py +33 -0
- samsara/types/drivers_auth_token_create_driver_auth_token_not_implemented_error_response_body.py +33 -0
- samsara/types/drivers_auth_token_create_driver_auth_token_response_body.py +20 -0
- samsara/types/drivers_auth_token_create_driver_auth_token_service_unavailable_error_response_body.py +33 -0
- samsara/types/drivers_auth_token_create_driver_auth_token_too_many_requests_error_response_body.py +33 -0
- samsara/types/drivers_auth_token_create_driver_auth_token_unauthorized_error_response_body.py +33 -0
- samsara/types/engine_immobilizer_update_engine_immobilizer_state_bad_gateway_error_response_body.py +33 -0
- samsara/types/engine_immobilizer_update_engine_immobilizer_state_gateway_timeout_error_response_body.py +33 -0
- samsara/types/engine_immobilizer_update_engine_immobilizer_state_internal_server_error_response_body.py +33 -0
- samsara/types/engine_immobilizer_update_engine_immobilizer_state_method_not_allowed_error_response_body.py +33 -0
- samsara/types/engine_immobilizer_update_engine_immobilizer_state_not_found_error_response_body.py +33 -0
- samsara/types/engine_immobilizer_update_engine_immobilizer_state_not_implemented_error_response_body.py +33 -0
- samsara/types/engine_immobilizer_update_engine_immobilizer_state_service_unavailable_error_response_body.py +33 -0
- samsara/types/engine_immobilizer_update_engine_immobilizer_state_too_many_requests_error_response_body.py +33 -0
- samsara/types/engine_immobilizer_update_engine_immobilizer_state_unauthorized_error_response_body.py +33 -0
- samsara/types/engine_status_response_body.py +35 -0
- samsara/types/equipment_header_with_additional_fields_response_body.py +63 -0
- samsara/types/equipment_patch_equipment_bad_gateway_error_response_body.py +33 -0
- samsara/types/equipment_patch_equipment_gateway_timeout_error_response_body.py +33 -0
- samsara/types/equipment_patch_equipment_internal_server_error_response_body.py +33 -0
- samsara/types/equipment_patch_equipment_method_not_allowed_error_response_body.py +33 -0
- samsara/types/equipment_patch_equipment_not_found_error_response_body.py +33 -0
- samsara/types/equipment_patch_equipment_not_implemented_error_response_body.py +33 -0
- samsara/types/equipment_patch_equipment_response_body.py +20 -0
- samsara/types/equipment_patch_equipment_service_unavailable_error_response_body.py +33 -0
- samsara/types/equipment_patch_equipment_too_many_requests_error_response_body.py +33 -0
- samsara/types/equipment_patch_equipment_unauthorized_error_response_body.py +33 -0
- samsara/types/equipment_with_attributes_response_object_response_body.py +68 -0
- samsara/types/extended_driver_tiny_response.py +46 -0
- samsara/types/extended_driver_tiny_response_external_ids.py +21 -0
- samsara/types/fft_spectra_data_point.py +30 -0
- samsara/types/fft_spectra_data_point_fft_spectra.py +41 -0
- samsara/types/fleet_device_object_response_body.py +31 -0
- samsara/types/form_submission_request_media_item_object_request_body.py +33 -0
- samsara/types/form_submission_request_media_value_object_request_body.py +31 -0
- samsara/types/form_submission_request_signature_value_object_request_body.py +24 -0
- samsara/types/form_template_response_object_response_body.py +10 -0
- samsara/types/form_template_response_object_response_body_form_category.py +7 -0
- samsara/types/form_updated_response_body.py +24 -0
- samsara/types/fuel_consumed_ml.py +3 -0
- samsara/types/fuel_remaining_response_body.py +35 -0
- samsara/types/functions_start_function_run_bad_gateway_error_response_body.py +33 -0
- samsara/types/functions_start_function_run_gateway_timeout_error_response_body.py +33 -0
- samsara/types/functions_start_function_run_internal_server_error_response_body.py +33 -0
- samsara/types/functions_start_function_run_method_not_allowed_error_response_body.py +33 -0
- samsara/types/functions_start_function_run_not_found_error_response_body.py +33 -0
- samsara/types/functions_start_function_run_not_implemented_error_response_body.py +33 -0
- samsara/types/functions_start_function_run_response_body.py +20 -0
- samsara/types/functions_start_function_run_service_unavailable_error_response_body.py +33 -0
- samsara/types/functions_start_function_run_too_many_requests_error_response_body.py +33 -0
- samsara/types/functions_start_function_run_unauthorized_error_response_body.py +33 -0
- samsara/types/gateway_details_response_response_body.py +1 -1
- samsara/types/gateway_details_response_response_body_gateway_battery_state.py +3 -1
- samsara/types/goa_attribute_tiny.py +47 -0
- samsara/types/goa_form_tiny_response_response_body.py +26 -0
- samsara/types/goa_issue_tiny_response_response_body.py +26 -0
- samsara/types/green_band_driving_duration_ms.py +3 -0
- samsara/types/harsh_event_trigger_details_object_request_body_types_item.py +2 -0
- samsara/types/harsh_event_trigger_details_object_response_body_types_item.py +2 -0
- samsara/types/health_response_response_body.py +11 -1
- samsara/types/health_response_response_body_recommended_action.py +10 -0
- samsara/types/high_torque_ms.py +3 -0
- samsara/types/hos_daily_logs_update_shipping_docs_bad_gateway_error_response_body.py +33 -0
- samsara/types/hos_daily_logs_update_shipping_docs_gateway_timeout_error_response_body.py +33 -0
- samsara/types/hos_daily_logs_update_shipping_docs_internal_server_error_response_body.py +33 -0
- samsara/types/hos_daily_logs_update_shipping_docs_method_not_allowed_error_response_body.py +33 -0
- samsara/types/hos_daily_logs_update_shipping_docs_not_found_error_response_body.py +33 -0
- samsara/types/hos_daily_logs_update_shipping_docs_not_implemented_error_response_body.py +33 -0
- samsara/types/hos_daily_logs_update_shipping_docs_response_body.py +20 -0
- samsara/types/hos_daily_logs_update_shipping_docs_service_unavailable_error_response_body.py +33 -0
- samsara/types/hos_daily_logs_update_shipping_docs_too_many_requests_error_response_body.py +33 -0
- samsara/types/hos_daily_logs_update_shipping_docs_unauthorized_error_response_body.py +33 -0
- samsara/types/hos_drivers_eld_event_object_response_body.py +54 -0
- samsara/types/hos_drivers_eld_event_object_response_body_driver_activation_status.py +7 -0
- samsara/types/hos_eld_event_location_object_response_body.py +46 -0
- samsara/types/hos_eld_event_object_response_body.py +98 -0
- samsara/types/hos_eld_event_object_response_body_malfunction_diagnostic_code.py +7 -0
- samsara/types/hos_eld_event_remark_object_response_body.py +36 -0
- samsara/types/hos_eld_events_get_hos_eld_events_bad_gateway_error_response_body.py +33 -0
- samsara/types/hos_eld_events_get_hos_eld_events_gateway_timeout_error_response_body.py +33 -0
- samsara/types/hos_eld_events_get_hos_eld_events_internal_server_error_response_body.py +33 -0
- samsara/types/hos_eld_events_get_hos_eld_events_method_not_allowed_error_response_body.py +33 -0
- samsara/types/hos_eld_events_get_hos_eld_events_not_found_error_response_body.py +33 -0
- samsara/types/hos_eld_events_get_hos_eld_events_not_implemented_error_response_body.py +33 -0
- samsara/types/hos_eld_events_get_hos_eld_events_response_body.py +26 -0
- samsara/types/hos_eld_events_get_hos_eld_events_service_unavailable_error_response_body.py +33 -0
- samsara/types/hos_eld_events_get_hos_eld_events_too_many_requests_error_response_body.py +33 -0
- samsara/types/hos_eld_events_get_hos_eld_events_unauthorized_error_response_body.py +33 -0
- samsara/types/hub_capacities_list_hub_capacities_bad_gateway_error_response_body.py +33 -0
- samsara/types/hub_capacities_list_hub_capacities_gateway_timeout_error_response_body.py +33 -0
- samsara/types/hub_capacities_list_hub_capacities_internal_server_error_response_body.py +33 -0
- samsara/types/hub_capacities_list_hub_capacities_method_not_allowed_error_response_body.py +33 -0
- samsara/types/hub_capacities_list_hub_capacities_not_found_error_response_body.py +33 -0
- samsara/types/hub_capacities_list_hub_capacities_not_implemented_error_response_body.py +33 -0
- samsara/types/hub_capacities_list_hub_capacities_response_body.py +26 -0
- samsara/types/hub_capacities_list_hub_capacities_service_unavailable_error_response_body.py +33 -0
- samsara/types/hub_capacities_list_hub_capacities_too_many_requests_error_response_body.py +33 -0
- samsara/types/hub_capacities_list_hub_capacities_unauthorized_error_response_body.py +33 -0
- samsara/types/hub_capacity_object_response_body.py +54 -0
- samsara/types/hub_location_created_object_response_body.py +105 -0
- samsara/types/hub_location_input_object_request_body.py +94 -0
- samsara/types/hub_location_object_response_body.py +105 -0
- samsara/types/hub_location_service_window_input_request_body.py +38 -0
- samsara/types/hub_location_updated_object_response_body.py +105 -0
- samsara/types/hub_locations_create_hub_locations_bad_gateway_error_response_body.py +33 -0
- samsara/types/hub_locations_create_hub_locations_gateway_timeout_error_response_body.py +33 -0
- samsara/types/hub_locations_create_hub_locations_internal_server_error_response_body.py +33 -0
- samsara/types/hub_locations_create_hub_locations_method_not_allowed_error_response_body.py +33 -0
- samsara/types/hub_locations_create_hub_locations_not_found_error_response_body.py +33 -0
- samsara/types/hub_locations_create_hub_locations_not_implemented_error_response_body.py +33 -0
- samsara/types/hub_locations_create_hub_locations_response_body.py +23 -0
- samsara/types/hub_locations_create_hub_locations_service_unavailable_error_response_body.py +33 -0
- samsara/types/hub_locations_create_hub_locations_too_many_requests_error_response_body.py +33 -0
- samsara/types/hub_locations_create_hub_locations_unauthorized_error_response_body.py +33 -0
- samsara/types/hub_locations_list_hub_locations_bad_gateway_error_response_body.py +33 -0
- samsara/types/hub_locations_list_hub_locations_gateway_timeout_error_response_body.py +33 -0
- samsara/types/hub_locations_list_hub_locations_internal_server_error_response_body.py +33 -0
- samsara/types/hub_locations_list_hub_locations_method_not_allowed_error_response_body.py +33 -0
- samsara/types/hub_locations_list_hub_locations_not_found_error_response_body.py +33 -0
- samsara/types/hub_locations_list_hub_locations_not_implemented_error_response_body.py +33 -0
- samsara/types/hub_locations_list_hub_locations_response_body.py +26 -0
- samsara/types/hub_locations_list_hub_locations_service_unavailable_error_response_body.py +33 -0
- samsara/types/hub_locations_list_hub_locations_too_many_requests_error_response_body.py +33 -0
- samsara/types/hub_locations_list_hub_locations_unauthorized_error_response_body.py +33 -0
- samsara/types/hub_locations_update_hub_location_bad_gateway_error_response_body.py +33 -0
- samsara/types/hub_locations_update_hub_location_gateway_timeout_error_response_body.py +33 -0
- samsara/types/hub_locations_update_hub_location_internal_server_error_response_body.py +33 -0
- samsara/types/hub_locations_update_hub_location_method_not_allowed_error_response_body.py +33 -0
- samsara/types/hub_locations_update_hub_location_not_found_error_response_body.py +33 -0
- samsara/types/hub_locations_update_hub_location_not_implemented_error_response_body.py +33 -0
- samsara/types/hub_locations_update_hub_location_response_body.py +20 -0
- samsara/types/hub_locations_update_hub_location_service_unavailable_error_response_body.py +33 -0
- samsara/types/hub_locations_update_hub_location_too_many_requests_error_response_body.py +33 -0
- samsara/types/hub_locations_update_hub_location_unauthorized_error_response_body.py +33 -0
- samsara/types/hub_object_response_body.py +49 -0
- samsara/types/hub_plan_routes_list_hub_plan_routes_bad_gateway_error_response_body.py +33 -0
- samsara/types/hub_plan_routes_list_hub_plan_routes_gateway_timeout_error_response_body.py +33 -0
- samsara/types/hub_plan_routes_list_hub_plan_routes_internal_server_error_response_body.py +33 -0
- samsara/types/hub_plan_routes_list_hub_plan_routes_method_not_allowed_error_response_body.py +33 -0
- samsara/types/hub_plan_routes_list_hub_plan_routes_not_found_error_response_body.py +33 -0
- samsara/types/hub_plan_routes_list_hub_plan_routes_not_implemented_error_response_body.py +33 -0
- samsara/types/hub_plan_routes_list_hub_plan_routes_response_body.py +26 -0
- samsara/types/hub_plan_routes_list_hub_plan_routes_service_unavailable_error_response_body.py +33 -0
- samsara/types/hub_plan_routes_list_hub_plan_routes_too_many_requests_error_response_body.py +33 -0
- samsara/types/hub_plan_routes_list_hub_plan_routes_unauthorized_error_response_body.py +33 -0
- samsara/types/hub_plans_create_hub_plan_bad_gateway_error_response_body.py +33 -0
- samsara/types/hub_plans_create_hub_plan_gateway_timeout_error_response_body.py +33 -0
- samsara/types/hub_plans_create_hub_plan_internal_server_error_response_body.py +33 -0
- samsara/types/hub_plans_create_hub_plan_method_not_allowed_error_response_body.py +33 -0
- samsara/types/hub_plans_create_hub_plan_not_found_error_response_body.py +33 -0
- samsara/types/hub_plans_create_hub_plan_not_implemented_error_response_body.py +33 -0
- samsara/types/hub_plans_create_hub_plan_response_body.py +20 -0
- samsara/types/hub_plans_create_hub_plan_service_unavailable_error_response_body.py +33 -0
- samsara/types/hub_plans_create_hub_plan_too_many_requests_error_response_body.py +33 -0
- samsara/types/hub_plans_create_hub_plan_unauthorized_error_response_body.py +33 -0
- samsara/types/hub_plans_list_hub_plans_bad_gateway_error_response_body.py +33 -0
- samsara/types/hub_plans_list_hub_plans_gateway_timeout_error_response_body.py +33 -0
- samsara/types/hub_plans_list_hub_plans_internal_server_error_response_body.py +33 -0
- samsara/types/hub_plans_list_hub_plans_method_not_allowed_error_response_body.py +33 -0
- samsara/types/hub_plans_list_hub_plans_not_found_error_response_body.py +33 -0
- samsara/types/hub_plans_list_hub_plans_not_implemented_error_response_body.py +33 -0
- samsara/types/hub_plans_list_hub_plans_response_body.py +26 -0
- samsara/types/hub_plans_list_hub_plans_service_unavailable_error_response_body.py +33 -0
- samsara/types/hub_plans_list_hub_plans_too_many_requests_error_response_body.py +33 -0
- samsara/types/hub_plans_list_hub_plans_unauthorized_error_response_body.py +33 -0
- samsara/types/hub_skill_object_response_body.py +49 -0
- samsara/types/hub_skills_list_hub_skills_bad_gateway_error_response_body.py +33 -0
- samsara/types/hub_skills_list_hub_skills_gateway_timeout_error_response_body.py +33 -0
- samsara/types/hub_skills_list_hub_skills_internal_server_error_response_body.py +33 -0
- samsara/types/hub_skills_list_hub_skills_method_not_allowed_error_response_body.py +33 -0
- samsara/types/hub_skills_list_hub_skills_not_found_error_response_body.py +33 -0
- samsara/types/hub_skills_list_hub_skills_not_implemented_error_response_body.py +33 -0
- samsara/types/hub_skills_list_hub_skills_response_body.py +26 -0
- samsara/types/hub_skills_list_hub_skills_service_unavailable_error_response_body.py +33 -0
- samsara/types/hub_skills_list_hub_skills_too_many_requests_error_response_body.py +33 -0
- samsara/types/hub_skills_list_hub_skills_unauthorized_error_response_body.py +33 -0
- samsara/types/hubs_list_hubs_bad_gateway_error_response_body.py +33 -0
- samsara/types/hubs_list_hubs_gateway_timeout_error_response_body.py +33 -0
- samsara/types/hubs_list_hubs_internal_server_error_response_body.py +33 -0
- samsara/types/hubs_list_hubs_method_not_allowed_error_response_body.py +33 -0
- samsara/types/hubs_list_hubs_not_found_error_response_body.py +33 -0
- samsara/types/hubs_list_hubs_not_implemented_error_response_body.py +33 -0
- samsara/types/hubs_list_hubs_response_body.py +26 -0
- samsara/types/hubs_list_hubs_service_unavailable_error_response_body.py +33 -0
- samsara/types/hubs_list_hubs_too_many_requests_error_response_body.py +33 -0
- samsara/types/hubs_list_hubs_unauthorized_error_response_body.py +33 -0
- samsara/types/idle_time_duration_ms.py +3 -0
- samsara/types/idling_event_object_response_body.py +1 -1
- samsara/types/idling_event_object_response_body_address_type.py +2 -0
- samsara/types/industrial_asset_object_response_body.py +31 -0
- samsara/types/inline_response_200.py +20 -0
- samsara/types/inline_response_2001.py +20 -0
- samsara/types/inline_response_2002.py +22 -0
- samsara/types/inline_response_2003.py +22 -0
- samsara/types/inline_response_2004.py +20 -0
- samsara/types/inline_response_2007.py +22 -0
- samsara/types/inline_response_2008.py +20 -0
- samsara/types/inline_response_2009.py +20 -0
- samsara/types/j_1939_d_1_status_data_point.py +29 -0
- samsara/types/j_1939_d_1_status_data_point_value.py +34 -0
- samsara/types/job_location_response_object_response_body.py +41 -0
- samsara/types/job_response_object_response_body.py +106 -0
- samsara/types/job_response_object_response_body_status.py +5 -0
- samsara/types/jobs_create_job_bad_gateway_error_response_body.py +33 -0
- samsara/types/jobs_create_job_gateway_timeout_error_response_body.py +33 -0
- samsara/types/jobs_create_job_internal_server_error_response_body.py +33 -0
- samsara/types/jobs_create_job_method_not_allowed_error_response_body.py +33 -0
- samsara/types/jobs_create_job_not_found_error_response_body.py +33 -0
- samsara/types/jobs_create_job_not_implemented_error_response_body.py +33 -0
- samsara/types/jobs_create_job_response_body.py +31 -0
- samsara/types/jobs_create_job_service_unavailable_error_response_body.py +33 -0
- samsara/types/jobs_create_job_too_many_requests_error_response_body.py +33 -0
- samsara/types/jobs_create_job_unauthorized_error_response_body.py +33 -0
- samsara/types/jobs_delete_job_bad_gateway_error_response_body.py +33 -0
- samsara/types/jobs_delete_job_gateway_timeout_error_response_body.py +33 -0
- samsara/types/jobs_delete_job_internal_server_error_response_body.py +33 -0
- samsara/types/jobs_delete_job_method_not_allowed_error_response_body.py +33 -0
- samsara/types/jobs_delete_job_not_found_error_response_body.py +33 -0
- samsara/types/jobs_delete_job_not_implemented_error_response_body.py +33 -0
- samsara/types/jobs_delete_job_response_body.py +29 -0
- samsara/types/jobs_delete_job_service_unavailable_error_response_body.py +33 -0
- samsara/types/jobs_delete_job_too_many_requests_error_response_body.py +33 -0
- samsara/types/jobs_delete_job_unauthorized_error_response_body.py +33 -0
- samsara/types/jobs_get_jobs_bad_gateway_error_response_body.py +33 -0
- samsara/types/jobs_get_jobs_gateway_timeout_error_response_body.py +33 -0
- samsara/types/jobs_get_jobs_internal_server_error_response_body.py +33 -0
- samsara/types/jobs_get_jobs_method_not_allowed_error_response_body.py +33 -0
- samsara/types/jobs_get_jobs_not_found_error_response_body.py +33 -0
- samsara/types/jobs_get_jobs_not_implemented_error_response_body.py +33 -0
- samsara/types/jobs_get_jobs_response_body.py +37 -0
- samsara/types/jobs_get_jobs_service_unavailable_error_response_body.py +33 -0
- samsara/types/jobs_get_jobs_too_many_requests_error_response_body.py +33 -0
- samsara/types/jobs_get_jobs_unauthorized_error_response_body.py +33 -0
- samsara/types/jobs_patch_job_bad_gateway_error_response_body.py +33 -0
- samsara/types/jobs_patch_job_gateway_timeout_error_response_body.py +33 -0
- samsara/types/jobs_patch_job_internal_server_error_response_body.py +33 -0
- samsara/types/jobs_patch_job_method_not_allowed_error_response_body.py +33 -0
- samsara/types/jobs_patch_job_not_found_error_response_body.py +33 -0
- samsara/types/jobs_patch_job_not_implemented_error_response_body.py +33 -0
- samsara/types/jobs_patch_job_response_body.py +31 -0
- samsara/types/jobs_patch_job_service_unavailable_error_response_body.py +33 -0
- samsara/types/jobs_patch_job_too_many_requests_error_response_body.py +33 -0
- samsara/types/jobs_patch_job_unauthorized_error_response_body.py +33 -0
- samsara/types/latitude.py +3 -0
- samsara/types/list_hub_capacities_response_pagination_response_body.py +35 -0
- samsara/types/list_hub_locations_response_pagination_response_body.py +35 -0
- samsara/types/list_hub_plan_routes_response_pagination_response_body.py +35 -0
- samsara/types/list_hub_plans_response_pagination_response_body.py +35 -0
- samsara/types/list_hub_skills_response_pagination_response_body.py +35 -0
- samsara/types/list_hubs_response_pagination_response_body.py +35 -0
- samsara/types/list_industrial_assets_response.py +22 -0
- samsara/types/live_sharing_link_full_response_object_response_body.py +5 -2
- samsara/types/location_data_point.py +30 -0
- samsara/types/location_data_point_gps_location.py +57 -0
- samsara/types/location_data_point_gps_location_place.py +60 -0
- samsara/types/location_object_request_body_address_types_item.py +2 -0
- samsara/types/location_object_response_body_address_types_item.py +2 -0
- samsara/types/location_response_body.py +42 -0
- samsara/types/location_type.py +5 -0
- samsara/types/longitude.py +3 -0
- samsara/types/media_object_response_body.py +10 -2
- samsara/types/media_object_response_body_camera_role.py +28 -0
- samsara/types/media_object_response_body_input.py +3 -1
- samsara/types/media_object_response_body_status.py +3 -1
- samsara/types/number_data_point.py +28 -0
- samsara/types/order_input_object_request_body.py +59 -0
- samsara/types/order_object_response_body.py +75 -0
- samsara/types/order_quantity_input_request_body.py +33 -0
- samsara/types/order_quantity_response_body.py +33 -0
- samsara/types/order_task_object_response_body.py +54 -0
- samsara/types/order_task_request_body.py +67 -0
- samsara/types/order_task_request_body_position.py +5 -0
- samsara/types/order_task_response_body.py +67 -0
- samsara/types/order_task_response_body_position.py +5 -0
- samsara/types/order_task_skill_object_response_body.py +31 -0
- samsara/types/over_speed_ms.py +3 -0
- samsara/types/parent_id.py +3 -0
- samsara/types/part_instance_input_object_request_body.py +45 -0
- samsara/types/part_instance_object_response_body.py +45 -0
- samsara/types/patch_asset_data_outputs_single_response_response_body.py +40 -0
- samsara/types/patch_job_object_request_body.py +89 -0
- samsara/types/patch_job_objectjob_location_request_object_request_body.py +41 -0
- samsara/types/patch_shipping_docs_response_body_response_body.py +93 -0
- samsara/types/plan_object_response_body.py +49 -0
- samsara/types/plan_orders_create_plan_orders_bad_gateway_error_response_body.py +33 -0
- samsara/types/plan_orders_create_plan_orders_gateway_timeout_error_response_body.py +33 -0
- samsara/types/plan_orders_create_plan_orders_internal_server_error_response_body.py +33 -0
- samsara/types/plan_orders_create_plan_orders_method_not_allowed_error_response_body.py +33 -0
- samsara/types/plan_orders_create_plan_orders_not_found_error_response_body.py +33 -0
- samsara/types/plan_orders_create_plan_orders_not_implemented_error_response_body.py +33 -0
- samsara/types/plan_orders_create_plan_orders_response_body.py +23 -0
- samsara/types/plan_orders_create_plan_orders_service_unavailable_error_response_body.py +33 -0
- samsara/types/plan_orders_create_plan_orders_too_many_requests_error_response_body.py +33 -0
- samsara/types/plan_orders_create_plan_orders_unauthorized_error_response_body.py +33 -0
- samsara/types/post_fuel_purchase_request_body_discount_request_body.py +34 -0
- samsara/types/post_fuel_purchase_request_body_discount_request_body_currency.py +7 -0
- samsara/types/post_job_object_request_body.py +85 -0
- samsara/types/post_job_objectjob_location_request_object_request_body.py +41 -0
- samsara/types/power_take_off_duration_ms.py +3 -0
- samsara/types/qualification_field_input_object_response_body.py +75 -0
- samsara/types/qualification_field_input_object_response_body_type.py +8 -0
- samsara/types/qualification_owner_object_response_body.py +43 -0
- samsara/types/qualification_owner_object_response_body_entity_type.py +5 -0
- samsara/types/qualification_owner_request_object_request_body.py +38 -0
- samsara/types/qualification_owner_request_object_request_body_entity_type.py +5 -0
- samsara/types/qualification_record_request_field_input_object_request_body.py +77 -0
- samsara/types/qualification_record_request_field_input_object_request_body_type.py +8 -0
- samsara/types/qualification_record_response_object_response_body.py +84 -0
- samsara/types/qualification_record_response_object_response_body_record_status.py +7 -0
- samsara/types/qualification_type_reference_object_response_body.py +40 -0
- samsara/types/qualification_type_request_object_request_body.py +26 -0
- samsara/types/qualification_type_response_object_response_body.py +69 -0
- samsara/types/qualification_type_response_object_response_body_entity_type.py +5 -0
- samsara/types/qualifications_archive_qualification_record_bad_gateway_error_response_body.py +33 -0
- samsara/types/qualifications_archive_qualification_record_gateway_timeout_error_response_body.py +33 -0
- samsara/types/qualifications_archive_qualification_record_internal_server_error_response_body.py +33 -0
- samsara/types/qualifications_archive_qualification_record_method_not_allowed_error_response_body.py +33 -0
- samsara/types/qualifications_archive_qualification_record_not_found_error_response_body.py +33 -0
- samsara/types/qualifications_archive_qualification_record_not_implemented_error_response_body.py +33 -0
- samsara/types/qualifications_archive_qualification_record_service_unavailable_error_response_body.py +33 -0
- samsara/types/qualifications_archive_qualification_record_too_many_requests_error_response_body.py +33 -0
- samsara/types/qualifications_archive_qualification_record_unauthorized_error_response_body.py +33 -0
- samsara/types/qualifications_delete_qualification_record_bad_gateway_error_response_body.py +33 -0
- samsara/types/qualifications_delete_qualification_record_gateway_timeout_error_response_body.py +33 -0
- samsara/types/qualifications_delete_qualification_record_internal_server_error_response_body.py +33 -0
- samsara/types/qualifications_delete_qualification_record_method_not_allowed_error_response_body.py +33 -0
- samsara/types/qualifications_delete_qualification_record_not_found_error_response_body.py +33 -0
- samsara/types/qualifications_delete_qualification_record_not_implemented_error_response_body.py +33 -0
- samsara/types/qualifications_delete_qualification_record_service_unavailable_error_response_body.py +33 -0
- samsara/types/qualifications_delete_qualification_record_too_many_requests_error_response_body.py +33 -0
- samsara/types/qualifications_delete_qualification_record_unauthorized_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_bad_gateway_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_gateway_timeout_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_internal_server_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_method_not_allowed_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_not_found_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_not_implemented_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_response_body.py +23 -0
- samsara/types/qualifications_get_qualification_records_service_unavailable_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_stream_bad_gateway_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_stream_gateway_timeout_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_stream_internal_server_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_stream_method_not_allowed_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_stream_not_found_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_stream_not_implemented_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_stream_response_body.py +26 -0
- samsara/types/qualifications_get_qualification_records_stream_service_unavailable_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_stream_too_many_requests_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_stream_unauthorized_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_too_many_requests_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_records_unauthorized_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_types_bad_gateway_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_types_gateway_timeout_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_types_internal_server_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_types_method_not_allowed_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_types_not_found_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_types_not_implemented_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_types_response_body.py +26 -0
- samsara/types/qualifications_get_qualification_types_service_unavailable_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_types_too_many_requests_error_response_body.py +33 -0
- samsara/types/qualifications_get_qualification_types_unauthorized_error_response_body.py +33 -0
- samsara/types/qualifications_patch_qualification_record_bad_gateway_error_response_body.py +33 -0
- samsara/types/qualifications_patch_qualification_record_gateway_timeout_error_response_body.py +33 -0
- samsara/types/qualifications_patch_qualification_record_internal_server_error_response_body.py +33 -0
- samsara/types/qualifications_patch_qualification_record_method_not_allowed_error_response_body.py +33 -0
- samsara/types/qualifications_patch_qualification_record_not_found_error_response_body.py +33 -0
- samsara/types/qualifications_patch_qualification_record_not_implemented_error_response_body.py +33 -0
- samsara/types/qualifications_patch_qualification_record_response_body.py +20 -0
- samsara/types/qualifications_patch_qualification_record_service_unavailable_error_response_body.py +33 -0
- samsara/types/qualifications_patch_qualification_record_too_many_requests_error_response_body.py +33 -0
- samsara/types/qualifications_patch_qualification_record_unauthorized_error_response_body.py +33 -0
- samsara/types/qualifications_post_qualification_record_bad_gateway_error_response_body.py +33 -0
- samsara/types/qualifications_post_qualification_record_gateway_timeout_error_response_body.py +33 -0
- samsara/types/qualifications_post_qualification_record_internal_server_error_response_body.py +33 -0
- samsara/types/qualifications_post_qualification_record_method_not_allowed_error_response_body.py +33 -0
- samsara/types/qualifications_post_qualification_record_not_found_error_response_body.py +33 -0
- samsara/types/qualifications_post_qualification_record_not_implemented_error_response_body.py +33 -0
- samsara/types/qualifications_post_qualification_record_response_body.py +20 -0
- samsara/types/qualifications_post_qualification_record_service_unavailable_error_response_body.py +33 -0
- samsara/types/qualifications_post_qualification_record_too_many_requests_error_response_body.py +33 -0
- samsara/types/qualifications_post_qualification_record_unauthorized_error_response_body.py +33 -0
- samsara/types/qualifications_unarchive_qualification_record_bad_gateway_error_response_body.py +33 -0
- samsara/types/qualifications_unarchive_qualification_record_gateway_timeout_error_response_body.py +33 -0
- samsara/types/qualifications_unarchive_qualification_record_internal_server_error_response_body.py +33 -0
- samsara/types/qualifications_unarchive_qualification_record_method_not_allowed_error_response_body.py +33 -0
- samsara/types/qualifications_unarchive_qualification_record_not_found_error_response_body.py +33 -0
- samsara/types/qualifications_unarchive_qualification_record_not_implemented_error_response_body.py +33 -0
- samsara/types/qualifications_unarchive_qualification_record_service_unavailable_error_response_body.py +33 -0
- samsara/types/qualifications_unarchive_qualification_record_too_many_requests_error_response_body.py +33 -0
- samsara/types/qualifications_unarchive_qualification_record_unauthorized_error_response_body.py +33 -0
- samsara/types/quantity_object_response_body.py +33 -0
- samsara/types/reading_datapoint_request_body.py +50 -0
- samsara/types/reading_definition_response_body.py +5 -0
- samsara/types/reading_trigger_continuous_value_object_request_body.py +1 -1
- samsara/types/reading_trigger_continuous_value_object_request_body_unit.py +15 -0
- samsara/types/reading_trigger_continuous_value_object_response_body.py +1 -1
- samsara/types/reading_trigger_continuous_value_object_response_body_unit.py +15 -0
- samsara/types/readings_post_readings_bad_gateway_error_response_body.py +33 -0
- samsara/types/readings_post_readings_gateway_timeout_error_response_body.py +33 -0
- samsara/types/readings_post_readings_internal_server_error_response_body.py +33 -0
- samsara/types/readings_post_readings_method_not_allowed_error_response_body.py +33 -0
- samsara/types/readings_post_readings_not_found_error_response_body.py +33 -0
- samsara/types/readings_post_readings_not_implemented_error_response_body.py +33 -0
- samsara/types/readings_post_readings_service_unavailable_error_response_body.py +33 -0
- samsara/types/readings_post_readings_too_many_requests_error_response_body.py +33 -0
- samsara/types/readings_post_readings_unauthorized_error_response_body.py +33 -0
- samsara/types/reverse_geo_object_response_body.py +30 -0
- samsara/types/route_object_response_body.py +124 -0
- samsara/types/route_stop_object_response_body.py +71 -0
- samsara/types/routes_single_use_address_object_request_body.py +9 -0
- samsara/types/routes_single_use_address_object_response_body.py +9 -0
- samsara/types/routes_stop_response_object_response_body.py +12 -0
- samsara/types/safety_event_behavior_labels_response_body.py +1 -1
- samsara/types/safety_event_behavior_labels_response_body_type.py +1 -0
- samsara/types/safety_event_dismissal_reason_response_body.py +32 -0
- samsara/types/safety_event_dismissal_reason_response_body_code.py +7 -0
- samsara/types/safety_event_v_2_asset_object_response_body.py +63 -0
- samsara/types/safety_event_v_2_asset_object_response_body_type.py +7 -0
- samsara/types/safety_event_v_2_behavior_labels_response_body.py +33 -0
- samsara/types/safety_event_v_2_behavior_labels_response_body_label.py +64 -0
- samsara/types/safety_event_v_2_behavior_labels_response_body_source.py +5 -0
- samsara/types/safety_event_v_2_context_labels_response_body.py +38 -0
- samsara/types/safety_event_v_2_driver_object_response_body.py +52 -0
- samsara/types/safety_event_v_2_object_response_body.py +134 -0
- samsara/types/safety_event_v_2_object_response_body_event_state.py +10 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_bad_gateway_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_gateway_timeout_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_internal_server_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_method_not_allowed_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_not_found_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_not_implemented_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_response_body.py +26 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_service_unavailable_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_stream_bad_gateway_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_stream_gateway_timeout_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_stream_internal_server_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_stream_method_not_allowed_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_stream_not_found_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_stream_not_implemented_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_stream_response_body.py +26 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_stream_service_unavailable_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_stream_too_many_requests_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_stream_unauthorized_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_too_many_requests_error_response_body.py +33 -0
- samsara/types/safety_events_v_2_get_safety_events_v_2_unauthorized_error_response_body.py +33 -0
- samsara/types/safety_score_behavior_object_response_body.py +41 -0
- samsara/types/safety_score_behavior_object_response_body_behavior_type.py +34 -0
- samsara/types/safety_score_speeding_object_response_body.py +43 -0
- samsara/types/safety_score_speeding_object_response_body_speeding_type.py +7 -0
- samsara/types/safety_scores_get_driver_safety_score_trips_bad_gateway_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_score_trips_gateway_timeout_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_score_trips_internal_server_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_score_trips_method_not_allowed_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_score_trips_not_found_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_score_trips_not_implemented_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_score_trips_response_body.py +26 -0
- samsara/types/safety_scores_get_driver_safety_score_trips_service_unavailable_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_score_trips_too_many_requests_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_score_trips_unauthorized_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_scores_bad_gateway_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_scores_gateway_timeout_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_scores_internal_server_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_scores_method_not_allowed_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_scores_not_found_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_scores_not_implemented_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_scores_response_body.py +26 -0
- samsara/types/safety_scores_get_driver_safety_scores_service_unavailable_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_scores_too_many_requests_error_response_body.py +33 -0
- samsara/types/safety_scores_get_driver_safety_scores_unauthorized_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_group_safety_scores_bad_gateway_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_group_safety_scores_gateway_timeout_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_group_safety_scores_internal_server_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_group_safety_scores_method_not_allowed_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_group_safety_scores_not_found_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_group_safety_scores_not_implemented_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_group_safety_scores_response_body.py +20 -0
- samsara/types/safety_scores_get_tag_group_safety_scores_service_unavailable_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_group_safety_scores_too_many_requests_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_group_safety_scores_unauthorized_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_safety_scores_bad_gateway_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_safety_scores_gateway_timeout_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_safety_scores_internal_server_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_safety_scores_method_not_allowed_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_safety_scores_not_found_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_safety_scores_not_implemented_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_safety_scores_response_body.py +26 -0
- samsara/types/safety_scores_get_tag_safety_scores_service_unavailable_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_safety_scores_too_many_requests_error_response_body.py +33 -0
- samsara/types/safety_scores_get_tag_safety_scores_unauthorized_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_score_trips_bad_gateway_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_score_trips_gateway_timeout_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_score_trips_internal_server_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_score_trips_method_not_allowed_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_score_trips_not_found_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_score_trips_not_implemented_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_score_trips_response_body.py +26 -0
- samsara/types/safety_scores_get_vehicle_safety_score_trips_service_unavailable_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_score_trips_too_many_requests_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_score_trips_unauthorized_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_scores_bad_gateway_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_scores_gateway_timeout_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_scores_internal_server_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_scores_method_not_allowed_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_scores_not_found_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_scores_not_implemented_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_scores_response_body.py +26 -0
- samsara/types/safety_scores_get_vehicle_safety_scores_service_unavailable_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_scores_too_many_requests_error_response_body.py +33 -0
- samsara/types/safety_scores_get_vehicle_safety_scores_unauthorized_error_response_body.py +33 -0
- samsara/types/service_task_instance_input_object_request_body.py +6 -0
- samsara/types/service_task_instance_object_response_body.py +6 -0
- samsara/types/service_window_object_response_body.py +38 -0
- samsara/types/single_driver_efficiency_by_driver_data_object_response_body.py +47 -0
- samsara/types/single_driver_efficiency_by_vehicle_data_object_response_body.py +46 -0
- samsara/types/single_use_location_object_response_body.py +36 -0
- samsara/types/skill_object_response_body.py +31 -0
- samsara/types/standard_delete_response.py +3 -0
- samsara/types/start_function_run_response_body_response_body.py +28 -0
- samsara/types/string_data_point.py +28 -0
- samsara/types/tag_group_safety_score_response_body.py +54 -0
- samsara/types/tag_ids.py +5 -0
- samsara/types/tag_safety_score_response_body.py +59 -0
- samsara/types/tire_fault_code_details_object_request_body_specific_tire_fault_codes_item.py +2 -0
- samsara/types/tire_fault_code_details_object_response_body_specific_tire_fault_codes_item.py +2 -0
- samsara/types/total_brake_event_count.py +3 -0
- samsara/types/trailer_stat_decoration_response_body.py +145 -0
- samsara/types/trailer_stat_gps_odometer_meters_type_response_body.py +31 -0
- samsara/types/trailer_stat_gps_odometer_meters_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_gps_type_response_body.py +56 -0
- samsara/types/trailer_stat_gps_with_decorations_type_response_body.py +58 -0
- samsara/types/trailer_stat_reefer_alarm_response_body.py +39 -0
- samsara/types/trailer_stat_reefer_alarm_type_response_body.py +32 -0
- samsara/types/trailer_stat_reefer_alarm_with_decorations_type_response_body.py +34 -0
- samsara/types/trailer_stat_reefer_ambient_air_temperature_milli_c_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_ambient_air_temperature_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_reefer_door_state_zone_1_type_response_body.py +34 -0
- samsara/types/trailer_stat_reefer_door_state_zone_1_type_response_body_value.py +5 -0
- samsara/types/trailer_stat_reefer_door_state_zone_1_with_decorations_type_response_body.py +36 -0
- samsara/types/trailer_stat_reefer_door_state_zone_1_with_decorations_type_response_body_value.py +7 -0
- samsara/types/trailer_stat_reefer_door_state_zone_2_type_response_body.py +34 -0
- samsara/types/trailer_stat_reefer_door_state_zone_2_type_response_body_value.py +5 -0
- samsara/types/trailer_stat_reefer_door_state_zone_2_with_decorations_type_response_body.py +36 -0
- samsara/types/trailer_stat_reefer_door_state_zone_2_with_decorations_type_response_body_value.py +7 -0
- samsara/types/trailer_stat_reefer_door_state_zone_3_type_response_body.py +34 -0
- samsara/types/trailer_stat_reefer_door_state_zone_3_type_response_body_value.py +5 -0
- samsara/types/trailer_stat_reefer_door_state_zone_3_with_decorations_type_response_body.py +36 -0
- samsara/types/trailer_stat_reefer_door_state_zone_3_with_decorations_type_response_body_value.py +7 -0
- samsara/types/trailer_stat_reefer_fuel_percent_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_fuel_percent_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_reefer_obd_engine_seconds_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_obd_engine_seconds_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_reefer_return_air_temperature_milli_c_zone_1_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_return_air_temperature_milli_c_zone_1_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_reefer_return_air_temperature_milli_c_zone_2_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_return_air_temperature_milli_c_zone_2_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_reefer_return_air_temperature_milli_c_zone_3_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_return_air_temperature_milli_c_zone_3_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_reefer_run_mode_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_run_mode_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_reefer_set_point_temperature_milli_c_zone_1_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_set_point_temperature_milli_c_zone_1_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_reefer_set_point_temperature_milli_c_zone_2_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_set_point_temperature_milli_c_zone_2_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_reefer_set_point_temperature_milli_c_zone_3_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_set_point_temperature_milli_c_zone_3_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_reefer_state_type_response_body.py +40 -0
- samsara/types/trailer_stat_reefer_state_with_decorations_type_response_body.py +42 -0
- samsara/types/trailer_stat_reefer_state_zone_1_type_response_body.py +40 -0
- samsara/types/trailer_stat_reefer_state_zone_1_with_decorations_type_response_body.py +42 -0
- samsara/types/trailer_stat_reefer_state_zone_2_type_response_body.py +40 -0
- samsara/types/trailer_stat_reefer_state_zone_2_with_decorations_type_response_body.py +42 -0
- samsara/types/trailer_stat_reefer_state_zone_3_type_response_body.py +40 -0
- samsara/types/trailer_stat_reefer_state_zone_3_with_decorations_type_response_body.py +42 -0
- samsara/types/trailer_stat_reefer_supply_air_temperature_milli_c_zone_1_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_supply_air_temperature_milli_c_zone_1_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_reefer_supply_air_temperature_milli_c_zone_2_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_supply_air_temperature_milli_c_zone_2_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stat_reefer_supply_air_temperature_milli_c_zone_3_type_response_body.py +31 -0
- samsara/types/trailer_stat_reefer_supply_air_temperature_milli_c_zone_3_with_decorations_type_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_feed_bad_gateway_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_feed_gateway_timeout_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_feed_internal_server_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_feed_method_not_allowed_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_feed_not_found_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_feed_not_implemented_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_feed_response_body.py +26 -0
- samsara/types/trailer_stats_get_trailer_stats_feed_service_unavailable_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_feed_too_many_requests_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_feed_unauthorized_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_history_bad_gateway_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_history_gateway_timeout_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_history_internal_server_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_history_method_not_allowed_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_history_not_found_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_history_not_implemented_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_history_response_body.py +26 -0
- samsara/types/trailer_stats_get_trailer_stats_history_service_unavailable_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_history_too_many_requests_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_history_unauthorized_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_snapshot_bad_gateway_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_snapshot_gateway_timeout_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_snapshot_internal_server_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_snapshot_method_not_allowed_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_snapshot_not_found_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_snapshot_not_implemented_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_snapshot_response_body.py +26 -0
- samsara/types/trailer_stats_get_trailer_stats_snapshot_service_unavailable_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_snapshot_too_many_requests_error_response_body.py +33 -0
- samsara/types/trailer_stats_get_trailer_stats_snapshot_unauthorized_error_response_body.py +33 -0
- samsara/types/trailer_stats_object_response_body.py +281 -0
- samsara/types/trailer_stats_snapshot_object_response_body.py +155 -0
- samsara/types/trips_breakdown_response_body.py +67 -0
- samsara/types/unit_response_body.py +2 -2
- samsara/types/unit_response_body_base_unit.py +15 -0
- samsara/types/unit_response_body_measurement_type.py +4 -0
- samsara/types/update_engine_immobilizer_relay_state_request_body_request_body.py +36 -0
- samsara/types/update_engine_immobilizer_relay_state_request_body_request_body_id.py +5 -0
- samsara/types/update_hub_location_request_body_request_body.py +93 -0
- samsara/types/uploaded_media_object_response_body.py +9 -1
- samsara/types/uploaded_media_object_response_body_camera_role.py +28 -0
- samsara/types/uploaded_media_object_response_body_input.py +2 -1
- samsara/types/v_1_asset.py +56 -0
- samsara/types/v_1_asset_cable.py +30 -0
- samsara/types/v_1_asset_current_location.py +52 -0
- samsara/types/v_1_asset_current_locations_response.py +55 -0
- samsara/types/v_1_asset_location_response.py +7 -0
- samsara/types/v_1_asset_location_response_item.py +50 -0
- samsara/types/v_1_asset_reefer_response.py +45 -0
- samsara/types/v_1_asset_reefer_response_reefer_stats.py +67 -0
- samsara/types/v_1_asset_reefer_response_reefer_stats_alarms.py +43 -0
- samsara/types/v_1_asset_reefer_response_reefer_stats_alarms_1.py +28 -0
- samsara/types/v_1_asset_reefer_response_reefer_stats_engine_hours.py +33 -0
- samsara/types/v_1_asset_reefer_response_reefer_stats_fuel_percentage.py +33 -0
- samsara/types/v_1_asset_reefer_response_reefer_stats_power_status.py +31 -0
- samsara/types/v_1_asset_reefer_response_reefer_stats_return_air_temp.py +33 -0
- samsara/types/v_1_asset_reefer_response_reefer_stats_set_point.py +33 -0
- samsara/types/v_1_assets_reefer.py +45 -0
- samsara/types/v_1_assets_reefer_reefer_stats.py +91 -0
- samsara/types/v_1_assets_reefer_reefer_stats_ambient_air_temperature.py +33 -0
- samsara/types/v_1_assets_reefer_reefer_stats_discharge_air_temperature.py +33 -0
- samsara/types/v_1_assets_reefer_reefer_stats_power_status.py +32 -0
- samsara/types/v_1_assets_reefer_reefer_stats_power_status_status.py +7 -0
- samsara/types/v_1_cargo_response.py +33 -0
- samsara/types/v_1_cargo_response_sensors.py +64 -0
- samsara/types/v_1_door_response.py +33 -0
- samsara/types/v_1_door_response_sensors.py +57 -0
- samsara/types/v_1_driver_safety_score_response.py +104 -0
- samsara/types/v_1_hos_authentication_logs_response.py +25 -0
- samsara/types/v_1_hos_authentication_logs_response_authentication_logs.py +55 -0
- samsara/types/v_1_humidity_response.py +33 -0
- samsara/types/v_1_humidity_response_sensors.py +55 -0
- samsara/types/v_1_machine.py +36 -0
- samsara/types/v_1_machine_history_response.py +24 -0
- samsara/types/v_1_machine_history_response_machines.py +33 -0
- samsara/types/v_1_machine_history_response_vibrations.py +24 -0
- samsara/types/v_1_pagination.py +39 -0
- samsara/types/v_1_programs_for_the_camera_response.py +7 -0
- samsara/types/v_1_programs_for_the_camera_response_item.py +22 -0
- samsara/types/v_1_safety_report_harsh_event.py +44 -0
- samsara/types/v_1_sensor.py +40 -0
- samsara/types/v_1_sensor_history_response.py +24 -0
- samsara/types/v_1_sensor_history_response_results.py +31 -0
- samsara/types/v_1_sensors_history_series.py +34 -0
- samsara/types/v_1_sensors_history_series_field.py +25 -0
- samsara/types/v_1_temperature_response.py +33 -0
- samsara/types/v_1_temperature_response_sensors.py +71 -0
- samsara/types/v_1_trailer_assignment_response.py +40 -0
- samsara/types/v_1_trailer_assignments_response.py +19 -0
- samsara/types/v_1_trailer_assignments_response_all_of.py +24 -0
- samsara/types/v_1_trailer_base.py +27 -0
- samsara/types/v_1_trip_response.py +24 -0
- samsara/types/v_1_trip_response_end_address.py +36 -0
- samsara/types/v_1_trip_response_end_coordinates.py +24 -0
- samsara/types/v_1_trip_response_start_address.py +36 -0
- samsara/types/v_1_trip_response_start_coordinates.py +24 -0
- samsara/types/v_1_trip_response_trips.py +119 -0
- samsara/types/v_1_vehicle_harsh_event_response.py +64 -0
- samsara/types/v_1_vehicle_harsh_event_response_location.py +32 -0
- samsara/types/v_1_vehicle_maintenance.py +33 -0
- samsara/types/v_1_vehicle_maintenance_j_1939.py +36 -0
- samsara/types/v_1_vehicle_maintenance_j_1939_check_engine_light.py +28 -0
- samsara/types/v_1_vehicle_maintenance_j_1939_diagnostic_trouble_codes.py +26 -0
- samsara/types/v_1_vehicle_maintenance_passenger.py +38 -0
- samsara/types/v_1_vehicle_maintenance_passenger_check_engine_light.py +25 -0
- samsara/types/v_1_vehicle_maintenance_passenger_diagnostic_trouble_codes.py +23 -0
- samsara/types/v_1_vehicle_safety_score_response.py +104 -0
- samsara/types/v_1_vision_cameras_response.py +7 -0
- samsara/types/v_1_vision_cameras_response_item.py +24 -0
- samsara/types/v_1_vision_run_by_camera_response.py +35 -0
- samsara/types/v_1_vision_run_by_camera_response_inspection_results.py +26 -0
- samsara/types/v_1_vision_run_by_camera_response_program.py +20 -0
- samsara/types/v_1_vision_run_by_camera_response_run_summary.py +24 -0
- samsara/types/v_1_vision_runs_by_camera_and_program_response.py +30 -0
- samsara/types/v_1_vision_runs_by_camera_response.py +7 -0
- samsara/types/v_1_vision_runs_by_camera_response_item.py +29 -0
- samsara/types/v_1_vision_runs_by_camera_response_item_program.py +20 -0
- samsara/types/v_1_vision_runs_by_camera_response_item_report_metadata.py +24 -0
- samsara/types/v_1_vision_runs_response.py +24 -0
- samsara/types/v_1_vision_runs_response_report_metadata.py +51 -0
- samsara/types/v_1_vision_runs_response_vision_runs.py +28 -0
- samsara/types/v_1_vision_step_results.py +7 -0
- samsara/types/v_1_vision_step_results_item.py +68 -0
- samsara/types/v_1_vision_step_results_item_angle_check.py +48 -0
- samsara/types/v_1_vision_step_results_item_angle_check_angle_configured.py +24 -0
- samsara/types/v_1_vision_step_results_item_barcode_item.py +23 -0
- samsara/types/v_1_vision_step_results_item_boolean_logic.py +21 -0
- samsara/types/v_1_vision_step_results_item_boolean_logic_steps_item.py +20 -0
- samsara/types/v_1_vision_step_results_item_caliper.py +85 -0
- samsara/types/v_1_vision_step_results_item_caliper_angle_range.py +24 -0
- samsara/types/v_1_vision_step_results_item_caliper_contrast_range.py +24 -0
- samsara/types/v_1_vision_step_results_item_caliper_filter_polarity.py +7 -0
- samsara/types/v_1_vision_step_results_item_caliper_sharpness_range.py +24 -0
- samsara/types/v_1_vision_step_results_item_caliper_straightness_range.py +24 -0
- samsara/types/v_1_vision_step_results_item_contour.py +47 -0
- samsara/types/v_1_vision_step_results_item_distance.py +87 -0
- samsara/types/v_1_vision_step_results_item_expiration_date.py +23 -0
- samsara/types/v_1_vision_step_results_item_find_copies.py +52 -0
- samsara/types/v_1_vision_step_results_item_find_edge.py +86 -0
- samsara/types/v_1_vision_step_results_item_find_edge_angle_range.py +24 -0
- samsara/types/v_1_vision_step_results_item_find_edge_contrast_range.py +24 -0
- samsara/types/v_1_vision_step_results_item_find_edge_sharpness_range.py +24 -0
- samsara/types/v_1_vision_step_results_item_find_edge_straightness_range.py +24 -0
- samsara/types/v_1_vision_step_results_item_find_shapes.py +23 -0
- samsara/types/v_1_vision_step_results_item_fixture.py +24 -0
- samsara/types/v_1_vision_step_results_item_fixture_coordinates.py +20 -0
- samsara/types/v_1_vision_step_results_item_label_match.py +20 -0
- samsara/types/v_1_vision_step_results_item_presence_absence.py +55 -0
- samsara/types/v_1_vision_step_results_item_presence_absence_blue_range.py +20 -0
- samsara/types/v_1_vision_step_results_item_presence_absence_grayscale_range.py +20 -0
- samsara/types/v_1_vision_step_results_item_presence_absence_green_range.py +20 -0
- samsara/types/v_1_vision_step_results_item_presence_absence_hue_range.py +20 -0
- samsara/types/v_1_vision_step_results_item_presence_absence_red_range.py +20 -0
- samsara/types/v_1_vision_step_results_item_presence_absence_saturation_range.py +20 -0
- samsara/types/v_1_vision_step_results_item_presence_absence_value_range.py +20 -0
- samsara/types/v_1_vision_step_results_item_text_match.py +22 -0
- samsara/types/vehicle_fault_code_details_object_request_body.py +7 -0
- samsara/types/vehicle_fault_code_details_object_response_body.py +7 -0
- samsara/types/vehicle_safety_score_response_body.py +59 -0
- samsara/types/vehicle_stats_decorations.py +9 -0
- samsara/types/vehicle_stats_decorations_fuel_consumed_milliliters.py +20 -0
- samsara/types/vehicle_stats_decorations_idling_duration_milliseconds.py +20 -0
- samsara/types/vehicle_stats_fuel_consumed_milliliters.py +28 -0
- samsara/types/vehicle_stats_fuel_consumed_milliliters_value.py +3 -0
- samsara/types/vehicle_stats_fuel_consumed_milliliters_with_decoration.py +30 -0
- samsara/types/vehicle_stats_idling_duration_milliseconds.py +28 -0
- samsara/types/vehicle_stats_idling_duration_milliseconds_value.py +3 -0
- samsara/types/vehicle_stats_idling_duration_milliseconds_with_decoration.py +30 -0
- samsara/types/vehicle_stats_list_response_data.py +20 -0
- samsara/types/vehicle_stats_response_data.py +8 -0
- samsara/types/vehicle_stats_synthetic_engine_seconds.py +1 -1
- samsara/types/vehicle_summary.py +68 -0
- samsara/types/vehicles_lock_lock_vehicle_bad_gateway_error_response_body.py +33 -0
- samsara/types/vehicles_lock_lock_vehicle_gateway_timeout_error_response_body.py +33 -0
- samsara/types/vehicles_lock_lock_vehicle_internal_server_error_response_body.py +33 -0
- samsara/types/vehicles_lock_lock_vehicle_method_not_allowed_error_response_body.py +33 -0
- samsara/types/vehicles_lock_lock_vehicle_not_found_error_response_body.py +33 -0
- samsara/types/vehicles_lock_lock_vehicle_not_implemented_error_response_body.py +33 -0
- samsara/types/vehicles_lock_lock_vehicle_service_unavailable_error_response_body.py +33 -0
- samsara/types/vehicles_lock_lock_vehicle_too_many_requests_error_response_body.py +33 -0
- samsara/types/vehicles_lock_lock_vehicle_unauthorized_error_response_body.py +33 -0
- samsara/types/vehicles_lock_unlock_vehicle_bad_gateway_error_response_body.py +33 -0
- samsara/types/vehicles_lock_unlock_vehicle_gateway_timeout_error_response_body.py +33 -0
- samsara/types/vehicles_lock_unlock_vehicle_internal_server_error_response_body.py +33 -0
- samsara/types/vehicles_lock_unlock_vehicle_method_not_allowed_error_response_body.py +33 -0
- samsara/types/vehicles_lock_unlock_vehicle_not_found_error_response_body.py +33 -0
- samsara/types/vehicles_lock_unlock_vehicle_not_implemented_error_response_body.py +33 -0
- samsara/types/vehicles_lock_unlock_vehicle_service_unavailable_error_response_body.py +33 -0
- samsara/types/vehicles_lock_unlock_vehicle_too_many_requests_error_response_body.py +33 -0
- samsara/types/vehicles_lock_unlock_vehicle_unauthorized_error_response_body.py +33 -0
- samsara/types/webhook_response_response_body_event_types_item.py +2 -0
- samsara/types/webhooks_get_webhook_response_body_event_types_item.py +2 -0
- samsara/types/webhooks_patch_webhook_response_body_event_types_item.py +2 -0
- samsara/types/webhooks_post_webhooks_response_body_event_types_item.py +2 -0
- samsara/types/work_order_object_response_body.py +21 -0
- samsara/types/work_order_tax_create_object_request_body.py +33 -0
- samsara/types/workflow_incident_details_object_response_body.py +4 -0
- samsara/users/__init__.py +28 -1
- samsara/users/client.py +147 -51
- samsara/users/raw_client.py +138 -61
- samsara/users/types/__init__.py +32 -2
- samsara/vehicle_locations/client.py +485 -0
- samsara/vehicle_locations/raw_client.py +472 -0
- samsara/vehicle_stats/__init__.py +52 -0
- samsara/vehicle_stats/client.py +1092 -0
- samsara/vehicle_stats/raw_client.py +1091 -0
- samsara/vehicle_stats/types/__init__.py +50 -0
- samsara/vehicle_stats/types/get_vehicle_stats_feed_request_decorations_item.py +57 -0
- samsara/vehicle_stats/types/get_vehicle_stats_feed_request_types_item.py +71 -0
- samsara/vehicle_stats/types/get_vehicle_stats_history_request_decorations_item.py +57 -0
- samsara/vehicle_stats/types/get_vehicle_stats_history_request_types_item.py +71 -0
- samsara/vehicle_stats/types/get_vehicle_stats_request_types_item.py +71 -0
- samsara/vehicles/__init__.py +58 -32
- samsara/vehicles/client.py +20 -17
- samsara/vehicles/raw_client.py +2 -2
- samsara/vehicles/types/__init__.py +56 -14
- samsara/webhooks/__init__.py +36 -5
- samsara/webhooks/client.py +47 -47
- samsara/webhooks/raw_client.py +18 -51
- samsara/webhooks/types/__init__.py +34 -3
- samsara/webhooks/types/webhooks_post_webhooks_request_body_event_types_item.py +2 -0
- samsara/work_orders/__init__.py +55 -0
- samsara/work_orders/client.py +995 -0
- samsara/work_orders/raw_client.py +2258 -0
- samsara/work_orders/types/__init__.py +53 -0
- samsara/work_orders/types/stream_work_orders_request_work_order_statuses_item.py +18 -0
- samsara_api-4.0.0.dist-info/METADATA +238 -0
- samsara_api-4.0.0.dist-info/RECORD +3387 -0
- samsara/alerts/configurations/__init__.py +0 -7
- samsara/alerts/configurations/client.py +0 -720
- samsara/alerts/configurations/raw_client.py +0 -1552
- samsara/alerts/configurations/types/__init__.py +0 -7
- samsara/alerts/configurations/types/configurations_list_request_status.py +0 -5
- samsara/alerts/incidents/client.py +0 -180
- samsara/alerts/incidents/raw_client.py +0 -396
- samsara/assets/location_and_speed/client.py +0 -226
- samsara/assets/location_and_speed/raw_client.py +0 -458
- samsara/attributes/types/attributes_delete_request_entity_type.py +0 -5
- samsara/attributes/types/attributes_get_request_entity_type.py +0 -5
- samsara/attributes/types/attributes_list_request_entity_type.py +0 -5
- samsara/attributes/types/create_attribute_request_attribute_value_quantity.py +0 -5
- samsara/attributes/types/update_attribute_request_attribute_value_quantity.py +0 -5
- samsara/auth/__init__.py +0 -8
- samsara/auth/client.py +0 -39
- samsara/auth/raw_client.py +0 -13
- samsara/auth/tokens/__init__.py +0 -7
- samsara/auth/tokens/client.py +0 -185
- samsara/auth/tokens/raw_client.py +0 -210
- samsara/auth/tokens/types/__init__.py +0 -7
- samsara/auth/tokens/types/create_tokens_response.py +0 -23
- samsara/cameras/__init__.py +0 -13
- samsara/cameras/client.py +0 -39
- samsara/cameras/media/__init__.py +0 -19
- samsara/cameras/media/client.py +0 -232
- samsara/cameras/media/raw_client.py +0 -417
- samsara/cameras/media/retrieval/__init__.py +0 -13
- samsara/cameras/media/retrieval/client.py +0 -286
- samsara/cameras/media/retrieval/raw_client.py +0 -686
- samsara/cameras/media/retrieval/types/__init__.py +0 -15
- samsara/cameras/media/retrieval/types/media_retrieval_post_media_retrieval_request_body_inputs_item.py +0 -7
- samsara/cameras/media/types/__init__.py +0 -9
- samsara/cameras/media/types/media_list_request_inputs_item.py +0 -7
- samsara/cameras/media/types/media_list_request_media_types_item.py +0 -5
- samsara/cameras/media/types/media_list_request_trigger_reasons_item.py +0 -17
- samsara/cameras/raw_client.py +0 -13
- samsara/coaching/driver_coach_assignments/client.py +0 -285
- samsara/coaching/driver_coach_assignments/raw_client.py +0 -716
- samsara/coaching/sessions/client.py +0 -228
- samsara/coaching/sessions/raw_client.py +0 -448
- samsara/defect_types/client.py +0 -156
- samsara/defect_types/raw_client.py +0 -384
- samsara/defects/client.py +0 -583
- samsara/defects/raw_client.py +0 -1028
- samsara/devices/client.py +0 -190
- samsara/devices/raw_client.py +0 -412
- samsara/document_types/client.py +0 -134
- samsara/document_types/raw_client.py +0 -354
- samsara/documents/pdfs/client.py +0 -206
- samsara/documents/pdfs/raw_client.py +0 -212
- samsara/driver_trailer_assignments/client.py +0 -389
- samsara/driver_trailer_assignments/raw_client.py +0 -1044
- samsara/driver_vehicle_assignments/types/driver_vehicle_assignments_get_request_assignment_type.py +0 -10
- samsara/driver_vehicle_assignments/types/driver_vehicle_assignments_get_request_filter_by.py +0 -5
- samsara/drivers/qr_codes/client.py +0 -304
- samsara/drivers/qr_codes/raw_client.py +0 -926
- samsara/drivers/vehicle_assignments/__init__.py +0 -7
- samsara/drivers/vehicle_assignments/client.py +0 -201
- samsara/drivers/vehicle_assignments/raw_client.py +0 -397
- samsara/drivers/vehicle_assignments/types/__init__.py +0 -9
- samsara/drivers/vehicle_assignments/types/vehicle_assignments_list_request_driver_activation_status.py +0 -5
- samsara/dvirs/__init__.py +0 -7
- samsara/dvirs/client.py +0 -775
- samsara/dvirs/raw_client.py +0 -1223
- samsara/dvirs/types/__init__.py +0 -7
- samsara/equipment/locations/client.py +0 -467
- samsara/equipment/locations/raw_client.py +0 -543
- samsara/equipment/stats/__init__.py +0 -7
- samsara/equipment/stats/client.py +0 -602
- samsara/equipment/stats/raw_client.py +0 -684
- samsara/equipment/stats/types/__init__.py +0 -9
- samsara/equipment/stats/types/stats_feed_request_types_item.py +0 -19
- samsara/equipment/stats/types/stats_history_request_types_item.py +0 -19
- samsara/equipment/stats/types/stats_list_request_types_item.py +0 -19
- samsara/form_submissions/__init__.py +0 -8
- samsara/form_submissions/client.py +0 -669
- samsara/form_submissions/pdf_exports/client.py +0 -221
- samsara/form_submissions/pdf_exports/raw_client.py +0 -627
- samsara/form_submissions/raw_client.py +0 -1550
- samsara/form_submissions/types/__init__.py +0 -9
- samsara/fuel_purchases/__init__.py +0 -7
- samsara/fuel_purchases/client.py +0 -219
- samsara/fuel_purchases/raw_client.py +0 -410
- samsara/fuel_purchases/types/__init__.py +0 -9
- samsara/hos/__init__.py +0 -7
- samsara/hos/client.py +0 -695
- samsara/hos/raw_client.py +0 -1177
- samsara/hos/types/__init__.py +0 -7
- samsara/hos/types/hos_daily_logs_request_driver_activation_status.py +0 -5
- samsara/idling/types/idling_list_request_pto_state.py +0 -5
- samsara/ifta/csv/__init__.py +0 -4
- samsara/ifta/csv/client.py +0 -274
- samsara/ifta/csv/raw_client.py +0 -675
- samsara/inputs/__init__.py +0 -7
- samsara/inputs/client.py +0 -223
- samsara/inputs/raw_client.py +0 -445
- samsara/inputs/types/__init__.py +0 -7
- samsara/inputs/types/inputs_stream_request_type.py +0 -27
- samsara/live_shares/__init__.py +0 -7
- samsara/live_shares/client.py +0 -544
- samsara/live_shares/raw_client.py +0 -1418
- samsara/live_shares/types/__init__.py +0 -10
- samsara/live_shares/types/live_shares_list_request_type.py +0 -7
- samsara/maintenance/service_tasks/__init__.py +0 -4
- samsara/maintenance/service_tasks/client.py +0 -322
- samsara/maintenance/service_tasks/raw_client.py +0 -529
- samsara/maintenance/work_orders/__init__.py +0 -21
- samsara/maintenance/work_orders/client.py +0 -867
- samsara/maintenance/work_orders/raw_client.py +0 -1980
- samsara/maintenance/work_orders/types/__init__.py +0 -19
- samsara/maintenance/work_orders/types/work_orders_stream_request_work_order_statuses_item.py +0 -18
- samsara/me/__init__.py +0 -4
- samsara/me/client.py +0 -108
- samsara/me/raw_client.py +0 -99
- samsara/readings/__init__.py +0 -4
- samsara/readings/client.py +0 -524
- samsara/readings/raw_client.py +0 -1214
- samsara/reports/__init__.py +0 -7
- samsara/reports/client.py +0 -49
- samsara/reports/drivers/__init__.py +0 -7
- samsara/reports/drivers/client.py +0 -39
- samsara/reports/drivers/fuel_energy/__init__.py +0 -4
- samsara/reports/drivers/fuel_energy/client.py +0 -194
- samsara/reports/drivers/fuel_energy/raw_client.py +0 -384
- samsara/reports/drivers/raw_client.py +0 -13
- samsara/reports/ifta/__init__.py +0 -18
- samsara/reports/ifta/client.py +0 -44
- samsara/reports/ifta/jurisdiction/__init__.py +0 -7
- samsara/reports/ifta/jurisdiction/client.py +0 -217
- samsara/reports/ifta/jurisdiction/raw_client.py +0 -409
- samsara/reports/ifta/jurisdiction/types/__init__.py +0 -9
- samsara/reports/ifta/jurisdiction/types/jurisdiction_get_request_fuel_type.py +0 -25
- samsara/reports/ifta/jurisdiction/types/jurisdiction_get_request_month.py +0 -21
- samsara/reports/ifta/jurisdiction/types/jurisdiction_get_request_quarter.py +0 -5
- samsara/reports/ifta/raw_client.py +0 -13
- samsara/reports/ifta/vehicle/__init__.py +0 -7
- samsara/reports/ifta/vehicle/client.py +0 -227
- samsara/reports/ifta/vehicle/raw_client.py +0 -419
- samsara/reports/ifta/vehicle/types/__init__.py +0 -9
- samsara/reports/ifta/vehicle/types/vehicle_list_request_fuel_type.py +0 -25
- samsara/reports/ifta/vehicle/types/vehicle_list_request_month.py +0 -21
- samsara/reports/ifta/vehicle/types/vehicle_list_request_quarter.py +0 -5
- samsara/reports/raw_client.py +0 -13
- samsara/reports/vehicles/__init__.py +0 -8
- samsara/reports/vehicles/client.py +0 -44
- samsara/reports/vehicles/fuel_energy/__init__.py +0 -7
- samsara/reports/vehicles/fuel_energy/client.py +0 -205
- samsara/reports/vehicles/fuel_energy/raw_client.py +0 -395
- samsara/reports/vehicles/fuel_energy/types/__init__.py +0 -7
- samsara/reports/vehicles/fuel_energy/types/fuel_energy_list_request_energy_type.py +0 -5
- samsara/reports/vehicles/idling/__init__.py +0 -4
- samsara/reports/vehicles/idling/client.py +0 -236
- samsara/reports/vehicles/idling/raw_client.py +0 -462
- samsara/reports/vehicles/raw_client.py +0 -13
- samsara/routes/audit_logs/__init__.py +0 -4
- samsara/routes/audit_logs/client.py +0 -146
- samsara/routes/audit_logs/raw_client.py +0 -350
- samsara/safety_events/__init__.py +0 -7
- samsara/safety_events/audit_logs/__init__.py +0 -4
- samsara/safety_events/audit_logs/client.py +0 -160
- samsara/safety_events/audit_logs/raw_client.py +0 -386
- samsara/safety_events/client.py +0 -199
- samsara/safety_events/raw_client.py +0 -207
- samsara/settings/compliance/__init__.py +0 -4
- samsara/settings/compliance/client.py +0 -308
- samsara/settings/compliance/raw_client.py +0 -718
- samsara/settings/driver_app/__init__.py +0 -4
- samsara/settings/driver_app/client.py +0 -270
- samsara/settings/driver_app/raw_client.py +0 -697
- samsara/settings/safety/__init__.py +0 -4
- samsara/settings/safety/client.py +0 -118
- samsara/settings/safety/raw_client.py +0 -314
- samsara/speeding_intervals/types/speeding_intervals_stream_request_query_by.py +0 -5
- samsara/tachograph/__init__.py +0 -7
- samsara/tachograph/client.py +0 -44
- samsara/tachograph/driver/__init__.py +0 -4
- samsara/tachograph/driver/client.py +0 -337
- samsara/tachograph/driver/raw_client.py +0 -322
- samsara/tachograph/raw_client.py +0 -13
- samsara/tachograph/vehicles/__init__.py +0 -4
- samsara/tachograph/vehicles/client.py +0 -190
- samsara/tachograph/vehicles/raw_client.py +0 -173
- samsara/training_assignments/__init__.py +0 -4
- samsara/training_assignments/client.py +0 -520
- samsara/training_assignments/raw_client.py +0 -1326
- samsara/training_courses/__init__.py +0 -4
- samsara/training_courses/client.py +0 -178
- samsara/training_courses/raw_client.py +0 -398
- samsara/trips/types/__init__.py +0 -8
- samsara/trips/types/trips_stream_request_completion_status.py +0 -5
- samsara/trips/types/trips_stream_request_query_by.py +0 -5
- samsara/types/alert_event.py +0 -74
- samsara/types/alert_event_alert_condition_id.py +0 -40
- samsara/types/alert_event_device.py +0 -37
- samsara/types/alert_event_driver.py +0 -27
- samsara/types/alert_event_dvir.py +0 -52
- samsara/types/alert_event_dvir_defects_item.py +0 -44
- samsara/types/alert_event_dvir_driver.py +0 -27
- samsara/types/alert_event_dvir_inspection_type.py +0 -7
- samsara/types/alert_event_dvir_safety_status.py +0 -5
- samsara/types/alert_event_dvir_trailer.py +0 -27
- samsara/types/alert_event_dvir_vehicle.py +0 -27
- samsara/types/assets_location_link_config_object.py +0 -31
- samsara/types/assets_location_link_config_object_response_body.py +0 -33
- samsara/types/attribute_attribute_value_quantity.py +0 -5
- samsara/types/external_ids.py +0 -5
- samsara/types/webhook_event.py +0 -37
- samsara/user_roles/__init__.py +0 -4
- samsara/user_roles/client.py +0 -142
- samsara/user_roles/raw_client.py +0 -159
- samsara/v_1_messages/__init__.py +0 -4
- samsara/v_1_messages/client.py +0 -258
- samsara/v_1_messages/raw_client.py +0 -273
- samsara/vehicles/immobilizer/__init__.py +0 -4
- samsara/vehicles/immobilizer/client.py +0 -182
- samsara/vehicles/immobilizer/raw_client.py +0 -398
- samsara/vehicles/locations/__init__.py +0 -4
- samsara/vehicles/locations/client.py +0 -501
- samsara/vehicles/locations/raw_client.py +0 -579
- samsara/vehicles/stats/__init__.py +0 -19
- samsara/vehicles/stats/client.py +0 -1076
- samsara/vehicles/stats/raw_client.py +0 -1164
- samsara/vehicles/stats/types/__init__.py +0 -17
- samsara/vehicles/stats/types/stats_feed_request_decorations_item.py +0 -54
- samsara/vehicles/stats/types/stats_feed_request_types_item.py +0 -68
- samsara/vehicles/stats/types/stats_history_request_decorations_item.py +0 -54
- samsara/vehicles/stats/types/stats_history_request_types_item.py +0 -68
- samsara/vehicles/stats/types/stats_list_request_types_item.py +0 -68
- samsara_api-3.0.0.dist-info/METADATA +0 -238
- samsara_api-3.0.0.dist-info/RECORD +0 -2664
- /samsara/{alerts/incidents → driver_qr_codes}/__init__.py +0 -0
- /samsara/{assets/location_and_speed → fleet/attributes}/__init__.py +0 -0
- /samsara/{form_submissions → forms}/types/form_submissions_patch_form_submission_request_body_status.py +0 -0
- /samsara/{fuel_purchases → fuel_and_energy}/types/fuel_purchase_post_fuel_purchase_request_body_ifta_fuel_type.py +0 -0
- /samsara/{coaching/driver_coach_assignments → hubs}/__init__.py +0 -0
- /samsara/{coaching/sessions → industrial}/__init__.py +0 -0
- /samsara/{live_shares → live_sharing_links}/types/live_sharing_links_create_live_sharing_link_request_body_type.py +0 -0
- /samsara/{defect_types → location_and_speed}/__init__.py +0 -0
- /samsara/{dvirs → maintenance}/types/create_dvir_request_safety_status.py +0 -0
- /samsara/{cameras/media/retrieval → media}/types/media_retrieval_post_media_retrieval_request_body_media_type.py +0 -0
- /samsara/{defects → messages}/__init__.py +0 -0
- /samsara/{devices → organization_info}/__init__.py +0 -0
- /samsara/{document_types → plans}/__init__.py +0 -0
- /samsara/{documents/pdfs → preview_ap_is}/__init__.py +0 -0
- /samsara/{driver_trailer_assignments → safety}/__init__.py +0 -0
- /samsara/{drivers/qr_codes → tachograph_eu_only}/__init__.py +0 -0
- /samsara/{equipment/locations → trailer_assignments}/__init__.py +0 -0
- /samsara/{form_submissions/pdf_exports → vehicle_locations}/__init__.py +0 -0
- /samsara/{maintenance/work_orders → work_orders}/types/work_orders_patch_work_orders_request_body_category.py +0 -0
- /samsara/{maintenance/work_orders → work_orders}/types/work_orders_patch_work_orders_request_body_priority.py +0 -0
- /samsara/{maintenance/work_orders → work_orders}/types/work_orders_patch_work_orders_request_body_status.py +0 -0
- /samsara/{maintenance/work_orders → work_orders}/types/work_orders_post_work_orders_request_body_category.py +0 -0
- /samsara/{maintenance/work_orders → work_orders}/types/work_orders_post_work_orders_request_body_priority.py +0 -0
- {samsara_api-3.0.0.dist-info → samsara_api-4.0.0.dist-info}/LICENSE +0 -0
- {samsara_api-3.0.0.dist-info → samsara_api-4.0.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,1925 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from json.decoder import JSONDecodeError
|
|
5
|
+
|
|
6
|
+
from ..core.api_error import ApiError
|
|
7
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
+
from ..core.http_response import AsyncHttpResponse, HttpResponse
|
|
9
|
+
from ..core.pydantic_utilities import parse_obj_as
|
|
10
|
+
from ..core.request_options import RequestOptions
|
|
11
|
+
from ..core.serialization import convert_and_respect_annotation_metadata
|
|
12
|
+
from ..errors.bad_gateway_error import BadGatewayError
|
|
13
|
+
from ..errors.gateway_timeout_error import GatewayTimeoutError
|
|
14
|
+
from ..errors.internal_server_error import InternalServerError
|
|
15
|
+
from ..errors.method_not_allowed_error import MethodNotAllowedError
|
|
16
|
+
from ..errors.not_found_error import NotFoundError
|
|
17
|
+
from ..errors.not_implemented_error import NotImplementedError
|
|
18
|
+
from ..errors.service_unavailable_error import ServiceUnavailableError
|
|
19
|
+
from ..errors.too_many_requests_error import TooManyRequestsError
|
|
20
|
+
from ..errors.unauthorized_error import UnauthorizedError
|
|
21
|
+
from ..types.driver_efficiency_get_driver_efficiency_by_drivers_response_body import (
|
|
22
|
+
DriverEfficiencyGetDriverEfficiencyByDriversResponseBody,
|
|
23
|
+
)
|
|
24
|
+
from ..types.driver_efficiency_get_driver_efficiency_by_vehicles_response_body import (
|
|
25
|
+
DriverEfficiencyGetDriverEfficiencyByVehiclesResponseBody,
|
|
26
|
+
)
|
|
27
|
+
from ..types.fuel_energy_get_fuel_energy_driver_reports_response_body import (
|
|
28
|
+
FuelEnergyGetFuelEnergyDriverReportsResponseBody,
|
|
29
|
+
)
|
|
30
|
+
from ..types.fuel_energy_get_fuel_energy_vehicle_reports_response_body import (
|
|
31
|
+
FuelEnergyGetFuelEnergyVehicleReportsResponseBody,
|
|
32
|
+
)
|
|
33
|
+
from ..types.fuel_purchase_post_fuel_purchase_response_body import FuelPurchasePostFuelPurchaseResponseBody
|
|
34
|
+
from ..types.post_fuel_purchase_request_body_discount_request_body import PostFuelPurchaseRequestBodyDiscountRequestBody
|
|
35
|
+
from ..types.post_fuel_purchase_request_body_price_request_body import PostFuelPurchaseRequestBodyPriceRequestBody
|
|
36
|
+
from .types.fuel_purchase_post_fuel_purchase_request_body_fuel_grade import (
|
|
37
|
+
FuelPurchasePostFuelPurchaseRequestBodyFuelGrade,
|
|
38
|
+
)
|
|
39
|
+
from .types.fuel_purchase_post_fuel_purchase_request_body_ifta_fuel_type import (
|
|
40
|
+
FuelPurchasePostFuelPurchaseRequestBodyIftaFuelType,
|
|
41
|
+
)
|
|
42
|
+
from .types.get_fuel_energy_vehicle_reports_request_energy_type import GetFuelEnergyVehicleReportsRequestEnergyType
|
|
43
|
+
|
|
44
|
+
# this is used as the default value for optional parameters
|
|
45
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class RawFuelAndEnergyClient:
|
|
49
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
50
|
+
self._client_wrapper = client_wrapper
|
|
51
|
+
|
|
52
|
+
def get_driver_efficiency_by_drivers(
|
|
53
|
+
self,
|
|
54
|
+
*,
|
|
55
|
+
start_time: str,
|
|
56
|
+
end_time: str,
|
|
57
|
+
driver_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
58
|
+
data_formats: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
59
|
+
tag_ids: typing.Optional[str] = None,
|
|
60
|
+
parent_tag_ids: typing.Optional[str] = None,
|
|
61
|
+
after: typing.Optional[str] = None,
|
|
62
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
63
|
+
) -> HttpResponse[DriverEfficiencyGetDriverEfficiencyByDriversResponseBody]:
|
|
64
|
+
"""
|
|
65
|
+
This endpoint will return driver efficiency data that has been collected for your organization and grouped by drivers based on the time parameters passed in. Results are paginated.
|
|
66
|
+
|
|
67
|
+
**Note:** The data from this endpoint comes from the Driver Efficiency (Eco-Driving) Report. The existing [/fleet/drivers/efficiency](https://developers.samsara.com/reference/getdriverefficiency) endpoint has now been moved to Legacy.
|
|
68
|
+
|
|
69
|
+
<b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
70
|
+
|
|
71
|
+
To use this endpoint, select **Read Driver Efficiency** under the Fuel & Energy category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
**Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
75
|
+
|
|
76
|
+
Parameters
|
|
77
|
+
----------
|
|
78
|
+
start_time : str
|
|
79
|
+
A start time in RFC 3339 format. Must be in multiple of hours and at least 1 day before endTime. Timezones are supported. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. (Examples: 2019-06-11T19:00:00Z, 2015-09-12T14:00:00-04:00).
|
|
80
|
+
|
|
81
|
+
end_time : str
|
|
82
|
+
An end time in RFC 3339 format. Must be in multiple of hours and no later than 3 hours before the current time. Timezones are supported. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. (Examples: 2019-06-13T19:00:00Z, 2015-09-15T14:00:00-04:00).
|
|
83
|
+
|
|
84
|
+
driver_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
85
|
+
A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`
|
|
86
|
+
|
|
87
|
+
data_formats : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
88
|
+
A comma-separated list of data formats you want to fetch. Valid values: `score`, `raw` and `percentage`. The default data format is `score`. Example: `dataFormats=raw,score`
|
|
89
|
+
|
|
90
|
+
tag_ids : typing.Optional[str]
|
|
91
|
+
A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
|
|
92
|
+
|
|
93
|
+
parent_tag_ids : typing.Optional[str]
|
|
94
|
+
A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
|
|
95
|
+
|
|
96
|
+
after : typing.Optional[str]
|
|
97
|
+
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
|
|
98
|
+
|
|
99
|
+
request_options : typing.Optional[RequestOptions]
|
|
100
|
+
Request-specific configuration.
|
|
101
|
+
|
|
102
|
+
Returns
|
|
103
|
+
-------
|
|
104
|
+
HttpResponse[DriverEfficiencyGetDriverEfficiencyByDriversResponseBody]
|
|
105
|
+
OK response.
|
|
106
|
+
"""
|
|
107
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
108
|
+
"driver-efficiency/drivers",
|
|
109
|
+
method="GET",
|
|
110
|
+
params={
|
|
111
|
+
"startTime": start_time,
|
|
112
|
+
"endTime": end_time,
|
|
113
|
+
"driverIds": driver_ids,
|
|
114
|
+
"dataFormats": data_formats,
|
|
115
|
+
"tagIds": tag_ids,
|
|
116
|
+
"parentTagIds": parent_tag_ids,
|
|
117
|
+
"after": after,
|
|
118
|
+
},
|
|
119
|
+
request_options=request_options,
|
|
120
|
+
)
|
|
121
|
+
try:
|
|
122
|
+
if 200 <= _response.status_code < 300:
|
|
123
|
+
_data = typing.cast(
|
|
124
|
+
DriverEfficiencyGetDriverEfficiencyByDriversResponseBody,
|
|
125
|
+
parse_obj_as(
|
|
126
|
+
type_=DriverEfficiencyGetDriverEfficiencyByDriversResponseBody, # type: ignore
|
|
127
|
+
object_=_response.json(),
|
|
128
|
+
),
|
|
129
|
+
)
|
|
130
|
+
return HttpResponse(response=_response, data=_data)
|
|
131
|
+
if _response.status_code == 401:
|
|
132
|
+
raise UnauthorizedError(
|
|
133
|
+
headers=dict(_response.headers),
|
|
134
|
+
body=typing.cast(
|
|
135
|
+
typing.Optional[typing.Any],
|
|
136
|
+
parse_obj_as(
|
|
137
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
138
|
+
object_=_response.json(),
|
|
139
|
+
),
|
|
140
|
+
),
|
|
141
|
+
)
|
|
142
|
+
if _response.status_code == 404:
|
|
143
|
+
raise NotFoundError(
|
|
144
|
+
headers=dict(_response.headers),
|
|
145
|
+
body=typing.cast(
|
|
146
|
+
typing.Optional[typing.Any],
|
|
147
|
+
parse_obj_as(
|
|
148
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
149
|
+
object_=_response.json(),
|
|
150
|
+
),
|
|
151
|
+
),
|
|
152
|
+
)
|
|
153
|
+
if _response.status_code == 405:
|
|
154
|
+
raise MethodNotAllowedError(
|
|
155
|
+
headers=dict(_response.headers),
|
|
156
|
+
body=typing.cast(
|
|
157
|
+
typing.Optional[typing.Any],
|
|
158
|
+
parse_obj_as(
|
|
159
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
160
|
+
object_=_response.json(),
|
|
161
|
+
),
|
|
162
|
+
),
|
|
163
|
+
)
|
|
164
|
+
if _response.status_code == 429:
|
|
165
|
+
raise TooManyRequestsError(
|
|
166
|
+
headers=dict(_response.headers),
|
|
167
|
+
body=typing.cast(
|
|
168
|
+
typing.Optional[typing.Any],
|
|
169
|
+
parse_obj_as(
|
|
170
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
171
|
+
object_=_response.json(),
|
|
172
|
+
),
|
|
173
|
+
),
|
|
174
|
+
)
|
|
175
|
+
if _response.status_code == 500:
|
|
176
|
+
raise InternalServerError(
|
|
177
|
+
headers=dict(_response.headers),
|
|
178
|
+
body=typing.cast(
|
|
179
|
+
typing.Optional[typing.Any],
|
|
180
|
+
parse_obj_as(
|
|
181
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
182
|
+
object_=_response.json(),
|
|
183
|
+
),
|
|
184
|
+
),
|
|
185
|
+
)
|
|
186
|
+
if _response.status_code == 501:
|
|
187
|
+
raise NotImplementedError(
|
|
188
|
+
headers=dict(_response.headers),
|
|
189
|
+
body=typing.cast(
|
|
190
|
+
typing.Optional[typing.Any],
|
|
191
|
+
parse_obj_as(
|
|
192
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
193
|
+
object_=_response.json(),
|
|
194
|
+
),
|
|
195
|
+
),
|
|
196
|
+
)
|
|
197
|
+
if _response.status_code == 502:
|
|
198
|
+
raise BadGatewayError(
|
|
199
|
+
headers=dict(_response.headers),
|
|
200
|
+
body=typing.cast(
|
|
201
|
+
typing.Optional[typing.Any],
|
|
202
|
+
parse_obj_as(
|
|
203
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
204
|
+
object_=_response.json(),
|
|
205
|
+
),
|
|
206
|
+
),
|
|
207
|
+
)
|
|
208
|
+
if _response.status_code == 503:
|
|
209
|
+
raise ServiceUnavailableError(
|
|
210
|
+
headers=dict(_response.headers),
|
|
211
|
+
body=typing.cast(
|
|
212
|
+
typing.Optional[typing.Any],
|
|
213
|
+
parse_obj_as(
|
|
214
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
215
|
+
object_=_response.json(),
|
|
216
|
+
),
|
|
217
|
+
),
|
|
218
|
+
)
|
|
219
|
+
if _response.status_code == 504:
|
|
220
|
+
raise GatewayTimeoutError(
|
|
221
|
+
headers=dict(_response.headers),
|
|
222
|
+
body=typing.cast(
|
|
223
|
+
typing.Optional[typing.Any],
|
|
224
|
+
parse_obj_as(
|
|
225
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
226
|
+
object_=_response.json(),
|
|
227
|
+
),
|
|
228
|
+
),
|
|
229
|
+
)
|
|
230
|
+
_response_json = _response.json()
|
|
231
|
+
except JSONDecodeError:
|
|
232
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
233
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
234
|
+
|
|
235
|
+
def get_driver_efficiency_by_vehicles(
|
|
236
|
+
self,
|
|
237
|
+
*,
|
|
238
|
+
start_time: str,
|
|
239
|
+
end_time: str,
|
|
240
|
+
vehicle_ids: typing.Optional[str] = None,
|
|
241
|
+
data_formats: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
242
|
+
tag_ids: typing.Optional[str] = None,
|
|
243
|
+
parent_tag_ids: typing.Optional[str] = None,
|
|
244
|
+
after: typing.Optional[str] = None,
|
|
245
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
246
|
+
) -> HttpResponse[DriverEfficiencyGetDriverEfficiencyByVehiclesResponseBody]:
|
|
247
|
+
"""
|
|
248
|
+
This endpoint will return driver efficiency data that has been collected for your organization and grouped by vehicle drivers used based on the time parameters passed in. Results are paginated.
|
|
249
|
+
|
|
250
|
+
**Note:** The data from this endpoint comes from the Driver Efficiency (Eco-Driving) Report. The existing [/fleet/drivers/efficiency](https://developers.samsara.com/reference/getdriverefficiency) endpoint has now been moved to Legacy.
|
|
251
|
+
|
|
252
|
+
<b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
253
|
+
|
|
254
|
+
To use this endpoint, select **Read Driver Efficiency** under the Fuel & Energy category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
**Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
258
|
+
|
|
259
|
+
Parameters
|
|
260
|
+
----------
|
|
261
|
+
start_time : str
|
|
262
|
+
A start time in RFC 3339 format. Must be in multiple of hours and at least 1 day before endTime. Timezones are supported. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. (Examples: 2019-06-11T19:00:00Z, 2015-09-12T14:00:00-04:00).
|
|
263
|
+
|
|
264
|
+
end_time : str
|
|
265
|
+
An end time in RFC 3339 format. Must be in multiple of hours and no later than 3 hours before the current time. Timezones are supported. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. (Examples: 2019-06-13T19:00:00Z, 2015-09-15T14:00:00-04:00).
|
|
266
|
+
|
|
267
|
+
vehicle_ids : typing.Optional[str]
|
|
268
|
+
A filter on the data based on this comma-separated list of vehicle IDs and externalIds. Example: `vehicleIds=1234,5678,samsara.vin:1HGBH41JXMN109186`
|
|
269
|
+
|
|
270
|
+
data_formats : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
271
|
+
A comma-separated list of data formats you want to fetch. Valid values: `score`, `raw` and `percentage`. The default data format is `score`. Example: `dataFormats=raw,score`
|
|
272
|
+
|
|
273
|
+
tag_ids : typing.Optional[str]
|
|
274
|
+
A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
|
|
275
|
+
|
|
276
|
+
parent_tag_ids : typing.Optional[str]
|
|
277
|
+
A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
|
|
278
|
+
|
|
279
|
+
after : typing.Optional[str]
|
|
280
|
+
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
|
|
281
|
+
|
|
282
|
+
request_options : typing.Optional[RequestOptions]
|
|
283
|
+
Request-specific configuration.
|
|
284
|
+
|
|
285
|
+
Returns
|
|
286
|
+
-------
|
|
287
|
+
HttpResponse[DriverEfficiencyGetDriverEfficiencyByVehiclesResponseBody]
|
|
288
|
+
OK response.
|
|
289
|
+
"""
|
|
290
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
291
|
+
"driver-efficiency/vehicles",
|
|
292
|
+
method="GET",
|
|
293
|
+
params={
|
|
294
|
+
"startTime": start_time,
|
|
295
|
+
"endTime": end_time,
|
|
296
|
+
"vehicleIds": vehicle_ids,
|
|
297
|
+
"dataFormats": data_formats,
|
|
298
|
+
"tagIds": tag_ids,
|
|
299
|
+
"parentTagIds": parent_tag_ids,
|
|
300
|
+
"after": after,
|
|
301
|
+
},
|
|
302
|
+
request_options=request_options,
|
|
303
|
+
)
|
|
304
|
+
try:
|
|
305
|
+
if 200 <= _response.status_code < 300:
|
|
306
|
+
_data = typing.cast(
|
|
307
|
+
DriverEfficiencyGetDriverEfficiencyByVehiclesResponseBody,
|
|
308
|
+
parse_obj_as(
|
|
309
|
+
type_=DriverEfficiencyGetDriverEfficiencyByVehiclesResponseBody, # type: ignore
|
|
310
|
+
object_=_response.json(),
|
|
311
|
+
),
|
|
312
|
+
)
|
|
313
|
+
return HttpResponse(response=_response, data=_data)
|
|
314
|
+
if _response.status_code == 401:
|
|
315
|
+
raise UnauthorizedError(
|
|
316
|
+
headers=dict(_response.headers),
|
|
317
|
+
body=typing.cast(
|
|
318
|
+
typing.Optional[typing.Any],
|
|
319
|
+
parse_obj_as(
|
|
320
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
321
|
+
object_=_response.json(),
|
|
322
|
+
),
|
|
323
|
+
),
|
|
324
|
+
)
|
|
325
|
+
if _response.status_code == 404:
|
|
326
|
+
raise NotFoundError(
|
|
327
|
+
headers=dict(_response.headers),
|
|
328
|
+
body=typing.cast(
|
|
329
|
+
typing.Optional[typing.Any],
|
|
330
|
+
parse_obj_as(
|
|
331
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
332
|
+
object_=_response.json(),
|
|
333
|
+
),
|
|
334
|
+
),
|
|
335
|
+
)
|
|
336
|
+
if _response.status_code == 405:
|
|
337
|
+
raise MethodNotAllowedError(
|
|
338
|
+
headers=dict(_response.headers),
|
|
339
|
+
body=typing.cast(
|
|
340
|
+
typing.Optional[typing.Any],
|
|
341
|
+
parse_obj_as(
|
|
342
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
343
|
+
object_=_response.json(),
|
|
344
|
+
),
|
|
345
|
+
),
|
|
346
|
+
)
|
|
347
|
+
if _response.status_code == 429:
|
|
348
|
+
raise TooManyRequestsError(
|
|
349
|
+
headers=dict(_response.headers),
|
|
350
|
+
body=typing.cast(
|
|
351
|
+
typing.Optional[typing.Any],
|
|
352
|
+
parse_obj_as(
|
|
353
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
354
|
+
object_=_response.json(),
|
|
355
|
+
),
|
|
356
|
+
),
|
|
357
|
+
)
|
|
358
|
+
if _response.status_code == 500:
|
|
359
|
+
raise InternalServerError(
|
|
360
|
+
headers=dict(_response.headers),
|
|
361
|
+
body=typing.cast(
|
|
362
|
+
typing.Optional[typing.Any],
|
|
363
|
+
parse_obj_as(
|
|
364
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
365
|
+
object_=_response.json(),
|
|
366
|
+
),
|
|
367
|
+
),
|
|
368
|
+
)
|
|
369
|
+
if _response.status_code == 501:
|
|
370
|
+
raise NotImplementedError(
|
|
371
|
+
headers=dict(_response.headers),
|
|
372
|
+
body=typing.cast(
|
|
373
|
+
typing.Optional[typing.Any],
|
|
374
|
+
parse_obj_as(
|
|
375
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
376
|
+
object_=_response.json(),
|
|
377
|
+
),
|
|
378
|
+
),
|
|
379
|
+
)
|
|
380
|
+
if _response.status_code == 502:
|
|
381
|
+
raise BadGatewayError(
|
|
382
|
+
headers=dict(_response.headers),
|
|
383
|
+
body=typing.cast(
|
|
384
|
+
typing.Optional[typing.Any],
|
|
385
|
+
parse_obj_as(
|
|
386
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
387
|
+
object_=_response.json(),
|
|
388
|
+
),
|
|
389
|
+
),
|
|
390
|
+
)
|
|
391
|
+
if _response.status_code == 503:
|
|
392
|
+
raise ServiceUnavailableError(
|
|
393
|
+
headers=dict(_response.headers),
|
|
394
|
+
body=typing.cast(
|
|
395
|
+
typing.Optional[typing.Any],
|
|
396
|
+
parse_obj_as(
|
|
397
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
398
|
+
object_=_response.json(),
|
|
399
|
+
),
|
|
400
|
+
),
|
|
401
|
+
)
|
|
402
|
+
if _response.status_code == 504:
|
|
403
|
+
raise GatewayTimeoutError(
|
|
404
|
+
headers=dict(_response.headers),
|
|
405
|
+
body=typing.cast(
|
|
406
|
+
typing.Optional[typing.Any],
|
|
407
|
+
parse_obj_as(
|
|
408
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
409
|
+
object_=_response.json(),
|
|
410
|
+
),
|
|
411
|
+
),
|
|
412
|
+
)
|
|
413
|
+
_response_json = _response.json()
|
|
414
|
+
except JSONDecodeError:
|
|
415
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
416
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
417
|
+
|
|
418
|
+
def get_fuel_energy_driver_reports(
|
|
419
|
+
self,
|
|
420
|
+
*,
|
|
421
|
+
start_date: str,
|
|
422
|
+
end_date: str,
|
|
423
|
+
driver_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
424
|
+
tag_ids: typing.Optional[str] = None,
|
|
425
|
+
parent_tag_ids: typing.Optional[str] = None,
|
|
426
|
+
after: typing.Optional[str] = None,
|
|
427
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
428
|
+
) -> HttpResponse[FuelEnergyGetFuelEnergyDriverReportsResponseBody]:
|
|
429
|
+
"""
|
|
430
|
+
Get fuel and energy efficiency driver reports for the requested time range.
|
|
431
|
+
|
|
432
|
+
<b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
433
|
+
|
|
434
|
+
To use this endpoint, select **Read Fuel & Energy** under the Fuel & Energy category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
**Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
438
|
+
|
|
439
|
+
Parameters
|
|
440
|
+
----------
|
|
441
|
+
start_date : str
|
|
442
|
+
A start date in RFC 3339 format. This parameter ignores everything (i.e. hour, minutes, seconds, nanoseconds, etc.) besides the date and timezone. If no time zone is passed in, then the UTC time zone will be used. This parameter is inclusive, so data on the date specified will be considered. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. For example, 2022-07-13T14:20:50.52-07:00 is a time in Pacific Daylight Time.
|
|
443
|
+
|
|
444
|
+
end_date : str
|
|
445
|
+
An end date in RFC 3339 format. This parameter ignores everything (i.e. hour, minutes, seconds, nanoseconds, etc.) besides the date and timezone. If no time zone is passed in, then the UTC time zone will be used. This parameter is inclusive, so data on the date specified will be considered. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. For example, 2022-07-13T14:20:50.52-07:00 is a time in Pacific Daylight Time.
|
|
446
|
+
|
|
447
|
+
driver_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
448
|
+
A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`
|
|
449
|
+
|
|
450
|
+
tag_ids : typing.Optional[str]
|
|
451
|
+
A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
|
|
452
|
+
|
|
453
|
+
parent_tag_ids : typing.Optional[str]
|
|
454
|
+
A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
|
|
455
|
+
|
|
456
|
+
after : typing.Optional[str]
|
|
457
|
+
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
|
|
458
|
+
|
|
459
|
+
request_options : typing.Optional[RequestOptions]
|
|
460
|
+
Request-specific configuration.
|
|
461
|
+
|
|
462
|
+
Returns
|
|
463
|
+
-------
|
|
464
|
+
HttpResponse[FuelEnergyGetFuelEnergyDriverReportsResponseBody]
|
|
465
|
+
OK response.
|
|
466
|
+
"""
|
|
467
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
468
|
+
"fleet/reports/drivers/fuel-energy",
|
|
469
|
+
method="GET",
|
|
470
|
+
params={
|
|
471
|
+
"startDate": start_date,
|
|
472
|
+
"endDate": end_date,
|
|
473
|
+
"driverIds": driver_ids,
|
|
474
|
+
"tagIds": tag_ids,
|
|
475
|
+
"parentTagIds": parent_tag_ids,
|
|
476
|
+
"after": after,
|
|
477
|
+
},
|
|
478
|
+
request_options=request_options,
|
|
479
|
+
)
|
|
480
|
+
try:
|
|
481
|
+
if 200 <= _response.status_code < 300:
|
|
482
|
+
_data = typing.cast(
|
|
483
|
+
FuelEnergyGetFuelEnergyDriverReportsResponseBody,
|
|
484
|
+
parse_obj_as(
|
|
485
|
+
type_=FuelEnergyGetFuelEnergyDriverReportsResponseBody, # type: ignore
|
|
486
|
+
object_=_response.json(),
|
|
487
|
+
),
|
|
488
|
+
)
|
|
489
|
+
return HttpResponse(response=_response, data=_data)
|
|
490
|
+
if _response.status_code == 401:
|
|
491
|
+
raise UnauthorizedError(
|
|
492
|
+
headers=dict(_response.headers),
|
|
493
|
+
body=typing.cast(
|
|
494
|
+
typing.Optional[typing.Any],
|
|
495
|
+
parse_obj_as(
|
|
496
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
497
|
+
object_=_response.json(),
|
|
498
|
+
),
|
|
499
|
+
),
|
|
500
|
+
)
|
|
501
|
+
if _response.status_code == 404:
|
|
502
|
+
raise NotFoundError(
|
|
503
|
+
headers=dict(_response.headers),
|
|
504
|
+
body=typing.cast(
|
|
505
|
+
typing.Optional[typing.Any],
|
|
506
|
+
parse_obj_as(
|
|
507
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
508
|
+
object_=_response.json(),
|
|
509
|
+
),
|
|
510
|
+
),
|
|
511
|
+
)
|
|
512
|
+
if _response.status_code == 405:
|
|
513
|
+
raise MethodNotAllowedError(
|
|
514
|
+
headers=dict(_response.headers),
|
|
515
|
+
body=typing.cast(
|
|
516
|
+
typing.Optional[typing.Any],
|
|
517
|
+
parse_obj_as(
|
|
518
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
519
|
+
object_=_response.json(),
|
|
520
|
+
),
|
|
521
|
+
),
|
|
522
|
+
)
|
|
523
|
+
if _response.status_code == 429:
|
|
524
|
+
raise TooManyRequestsError(
|
|
525
|
+
headers=dict(_response.headers),
|
|
526
|
+
body=typing.cast(
|
|
527
|
+
typing.Optional[typing.Any],
|
|
528
|
+
parse_obj_as(
|
|
529
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
530
|
+
object_=_response.json(),
|
|
531
|
+
),
|
|
532
|
+
),
|
|
533
|
+
)
|
|
534
|
+
if _response.status_code == 500:
|
|
535
|
+
raise InternalServerError(
|
|
536
|
+
headers=dict(_response.headers),
|
|
537
|
+
body=typing.cast(
|
|
538
|
+
typing.Optional[typing.Any],
|
|
539
|
+
parse_obj_as(
|
|
540
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
541
|
+
object_=_response.json(),
|
|
542
|
+
),
|
|
543
|
+
),
|
|
544
|
+
)
|
|
545
|
+
if _response.status_code == 501:
|
|
546
|
+
raise NotImplementedError(
|
|
547
|
+
headers=dict(_response.headers),
|
|
548
|
+
body=typing.cast(
|
|
549
|
+
typing.Optional[typing.Any],
|
|
550
|
+
parse_obj_as(
|
|
551
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
552
|
+
object_=_response.json(),
|
|
553
|
+
),
|
|
554
|
+
),
|
|
555
|
+
)
|
|
556
|
+
if _response.status_code == 502:
|
|
557
|
+
raise BadGatewayError(
|
|
558
|
+
headers=dict(_response.headers),
|
|
559
|
+
body=typing.cast(
|
|
560
|
+
typing.Optional[typing.Any],
|
|
561
|
+
parse_obj_as(
|
|
562
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
563
|
+
object_=_response.json(),
|
|
564
|
+
),
|
|
565
|
+
),
|
|
566
|
+
)
|
|
567
|
+
if _response.status_code == 503:
|
|
568
|
+
raise ServiceUnavailableError(
|
|
569
|
+
headers=dict(_response.headers),
|
|
570
|
+
body=typing.cast(
|
|
571
|
+
typing.Optional[typing.Any],
|
|
572
|
+
parse_obj_as(
|
|
573
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
574
|
+
object_=_response.json(),
|
|
575
|
+
),
|
|
576
|
+
),
|
|
577
|
+
)
|
|
578
|
+
if _response.status_code == 504:
|
|
579
|
+
raise GatewayTimeoutError(
|
|
580
|
+
headers=dict(_response.headers),
|
|
581
|
+
body=typing.cast(
|
|
582
|
+
typing.Optional[typing.Any],
|
|
583
|
+
parse_obj_as(
|
|
584
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
585
|
+
object_=_response.json(),
|
|
586
|
+
),
|
|
587
|
+
),
|
|
588
|
+
)
|
|
589
|
+
_response_json = _response.json()
|
|
590
|
+
except JSONDecodeError:
|
|
591
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
592
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
593
|
+
|
|
594
|
+
def get_fuel_energy_vehicle_reports(
|
|
595
|
+
self,
|
|
596
|
+
*,
|
|
597
|
+
start_date: str,
|
|
598
|
+
end_date: str,
|
|
599
|
+
vehicle_ids: typing.Optional[str] = None,
|
|
600
|
+
energy_type: typing.Optional[GetFuelEnergyVehicleReportsRequestEnergyType] = None,
|
|
601
|
+
tag_ids: typing.Optional[str] = None,
|
|
602
|
+
parent_tag_ids: typing.Optional[str] = None,
|
|
603
|
+
after: typing.Optional[str] = None,
|
|
604
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
605
|
+
) -> HttpResponse[FuelEnergyGetFuelEnergyVehicleReportsResponseBody]:
|
|
606
|
+
"""
|
|
607
|
+
Get fuel and energy efficiency vehicle reports for the requested time range.
|
|
608
|
+
|
|
609
|
+
<b>Rate limit:</b> 25 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
610
|
+
|
|
611
|
+
To use this endpoint, select **Read Fuel & Energy** under the Fuel & Energy category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
**Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
615
|
+
|
|
616
|
+
Parameters
|
|
617
|
+
----------
|
|
618
|
+
start_date : str
|
|
619
|
+
A start date in RFC 3339 format. This parameter ignores everything (i.e. hour, minutes, seconds, nanoseconds, etc.) besides the date and timezone. If no time zone is passed in, then the UTC time zone will be used. This parameter is inclusive, so data on the date specified will be considered. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. For example, 2022-07-13T14:20:50.52-07:00 is a time in Pacific Daylight Time.
|
|
620
|
+
|
|
621
|
+
end_date : str
|
|
622
|
+
An end date in RFC 3339 format. This parameter ignores everything (i.e. hour, minutes, seconds, nanoseconds, etc.) besides the date and timezone. If no time zone is passed in, then the UTC time zone will be used. This parameter is inclusive, so data on the date specified will be considered. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. For example, 2022-07-13T14:20:50.52-07:00 is a time in Pacific Daylight Time.
|
|
623
|
+
|
|
624
|
+
vehicle_ids : typing.Optional[str]
|
|
625
|
+
A filter on the data based on this comma-separated list of vehicle IDs and externalIds. Example: `vehicleIds=1234,5678,samsara.vin:1HGBH41JXMN109186`
|
|
626
|
+
|
|
627
|
+
energy_type : typing.Optional[GetFuelEnergyVehicleReportsRequestEnergyType]
|
|
628
|
+
The type of energy used by the vehicle. Valid values: `fuel`, `hybrid`, `electric`
|
|
629
|
+
|
|
630
|
+
tag_ids : typing.Optional[str]
|
|
631
|
+
A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
|
|
632
|
+
|
|
633
|
+
parent_tag_ids : typing.Optional[str]
|
|
634
|
+
A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
|
|
635
|
+
|
|
636
|
+
after : typing.Optional[str]
|
|
637
|
+
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
|
|
638
|
+
|
|
639
|
+
request_options : typing.Optional[RequestOptions]
|
|
640
|
+
Request-specific configuration.
|
|
641
|
+
|
|
642
|
+
Returns
|
|
643
|
+
-------
|
|
644
|
+
HttpResponse[FuelEnergyGetFuelEnergyVehicleReportsResponseBody]
|
|
645
|
+
OK response.
|
|
646
|
+
"""
|
|
647
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
648
|
+
"fleet/reports/vehicles/fuel-energy",
|
|
649
|
+
method="GET",
|
|
650
|
+
params={
|
|
651
|
+
"startDate": start_date,
|
|
652
|
+
"endDate": end_date,
|
|
653
|
+
"vehicleIds": vehicle_ids,
|
|
654
|
+
"energyType": energy_type,
|
|
655
|
+
"tagIds": tag_ids,
|
|
656
|
+
"parentTagIds": parent_tag_ids,
|
|
657
|
+
"after": after,
|
|
658
|
+
},
|
|
659
|
+
request_options=request_options,
|
|
660
|
+
)
|
|
661
|
+
try:
|
|
662
|
+
if 200 <= _response.status_code < 300:
|
|
663
|
+
_data = typing.cast(
|
|
664
|
+
FuelEnergyGetFuelEnergyVehicleReportsResponseBody,
|
|
665
|
+
parse_obj_as(
|
|
666
|
+
type_=FuelEnergyGetFuelEnergyVehicleReportsResponseBody, # type: ignore
|
|
667
|
+
object_=_response.json(),
|
|
668
|
+
),
|
|
669
|
+
)
|
|
670
|
+
return HttpResponse(response=_response, data=_data)
|
|
671
|
+
if _response.status_code == 401:
|
|
672
|
+
raise UnauthorizedError(
|
|
673
|
+
headers=dict(_response.headers),
|
|
674
|
+
body=typing.cast(
|
|
675
|
+
typing.Optional[typing.Any],
|
|
676
|
+
parse_obj_as(
|
|
677
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
678
|
+
object_=_response.json(),
|
|
679
|
+
),
|
|
680
|
+
),
|
|
681
|
+
)
|
|
682
|
+
if _response.status_code == 404:
|
|
683
|
+
raise NotFoundError(
|
|
684
|
+
headers=dict(_response.headers),
|
|
685
|
+
body=typing.cast(
|
|
686
|
+
typing.Optional[typing.Any],
|
|
687
|
+
parse_obj_as(
|
|
688
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
689
|
+
object_=_response.json(),
|
|
690
|
+
),
|
|
691
|
+
),
|
|
692
|
+
)
|
|
693
|
+
if _response.status_code == 405:
|
|
694
|
+
raise MethodNotAllowedError(
|
|
695
|
+
headers=dict(_response.headers),
|
|
696
|
+
body=typing.cast(
|
|
697
|
+
typing.Optional[typing.Any],
|
|
698
|
+
parse_obj_as(
|
|
699
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
700
|
+
object_=_response.json(),
|
|
701
|
+
),
|
|
702
|
+
),
|
|
703
|
+
)
|
|
704
|
+
if _response.status_code == 429:
|
|
705
|
+
raise TooManyRequestsError(
|
|
706
|
+
headers=dict(_response.headers),
|
|
707
|
+
body=typing.cast(
|
|
708
|
+
typing.Optional[typing.Any],
|
|
709
|
+
parse_obj_as(
|
|
710
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
711
|
+
object_=_response.json(),
|
|
712
|
+
),
|
|
713
|
+
),
|
|
714
|
+
)
|
|
715
|
+
if _response.status_code == 500:
|
|
716
|
+
raise InternalServerError(
|
|
717
|
+
headers=dict(_response.headers),
|
|
718
|
+
body=typing.cast(
|
|
719
|
+
typing.Optional[typing.Any],
|
|
720
|
+
parse_obj_as(
|
|
721
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
722
|
+
object_=_response.json(),
|
|
723
|
+
),
|
|
724
|
+
),
|
|
725
|
+
)
|
|
726
|
+
if _response.status_code == 501:
|
|
727
|
+
raise NotImplementedError(
|
|
728
|
+
headers=dict(_response.headers),
|
|
729
|
+
body=typing.cast(
|
|
730
|
+
typing.Optional[typing.Any],
|
|
731
|
+
parse_obj_as(
|
|
732
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
733
|
+
object_=_response.json(),
|
|
734
|
+
),
|
|
735
|
+
),
|
|
736
|
+
)
|
|
737
|
+
if _response.status_code == 502:
|
|
738
|
+
raise BadGatewayError(
|
|
739
|
+
headers=dict(_response.headers),
|
|
740
|
+
body=typing.cast(
|
|
741
|
+
typing.Optional[typing.Any],
|
|
742
|
+
parse_obj_as(
|
|
743
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
744
|
+
object_=_response.json(),
|
|
745
|
+
),
|
|
746
|
+
),
|
|
747
|
+
)
|
|
748
|
+
if _response.status_code == 503:
|
|
749
|
+
raise ServiceUnavailableError(
|
|
750
|
+
headers=dict(_response.headers),
|
|
751
|
+
body=typing.cast(
|
|
752
|
+
typing.Optional[typing.Any],
|
|
753
|
+
parse_obj_as(
|
|
754
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
755
|
+
object_=_response.json(),
|
|
756
|
+
),
|
|
757
|
+
),
|
|
758
|
+
)
|
|
759
|
+
if _response.status_code == 504:
|
|
760
|
+
raise GatewayTimeoutError(
|
|
761
|
+
headers=dict(_response.headers),
|
|
762
|
+
body=typing.cast(
|
|
763
|
+
typing.Optional[typing.Any],
|
|
764
|
+
parse_obj_as(
|
|
765
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
766
|
+
object_=_response.json(),
|
|
767
|
+
),
|
|
768
|
+
),
|
|
769
|
+
)
|
|
770
|
+
_response_json = _response.json()
|
|
771
|
+
except JSONDecodeError:
|
|
772
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
773
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
774
|
+
|
|
775
|
+
def post_fuel_purchase(
|
|
776
|
+
self,
|
|
777
|
+
*,
|
|
778
|
+
fuel_quantity_liters: str,
|
|
779
|
+
transaction_location: str,
|
|
780
|
+
transaction_price: PostFuelPurchaseRequestBodyPriceRequestBody,
|
|
781
|
+
transaction_reference: str,
|
|
782
|
+
transaction_time: str,
|
|
783
|
+
discount: typing.Optional[PostFuelPurchaseRequestBodyDiscountRequestBody] = OMIT,
|
|
784
|
+
driver_id: typing.Optional[str] = OMIT,
|
|
785
|
+
fuel_grade: typing.Optional[FuelPurchasePostFuelPurchaseRequestBodyFuelGrade] = OMIT,
|
|
786
|
+
ifta_fuel_type: typing.Optional[FuelPurchasePostFuelPurchaseRequestBodyIftaFuelType] = OMIT,
|
|
787
|
+
merchant_name: typing.Optional[str] = OMIT,
|
|
788
|
+
source: typing.Optional[str] = OMIT,
|
|
789
|
+
vehicle_id: typing.Optional[str] = OMIT,
|
|
790
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
791
|
+
) -> HttpResponse[FuelPurchasePostFuelPurchaseResponseBody]:
|
|
792
|
+
"""
|
|
793
|
+
Create a fuel purchase transaction.
|
|
794
|
+
|
|
795
|
+
<b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
796
|
+
|
|
797
|
+
To use this endpoint, select **Write Fuel Purchase** under the Fuel & Energy category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
**Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
801
|
+
|
|
802
|
+
Parameters
|
|
803
|
+
----------
|
|
804
|
+
fuel_quantity_liters : str
|
|
805
|
+
The amount of fuel purchased in liters.
|
|
806
|
+
|
|
807
|
+
transaction_location : str
|
|
808
|
+
The full street address for the location of the fuel transaction, as it might be recognized by Google Maps. Ideal entries should be in accordance with the format used by the national postal service of the country concerned (example: 1 De Haro St, San Francisco, CA 94107, United States). Alternatively, exact latitude/longitude can be provided (example: 40.748441, -73.985664).
|
|
809
|
+
|
|
810
|
+
transaction_price : PostFuelPurchaseRequestBodyPriceRequestBody
|
|
811
|
+
|
|
812
|
+
transaction_reference : str
|
|
813
|
+
The fuel transaction reference. This is the transaction identifier. For instance, this can be the Serial Number on the invoice.
|
|
814
|
+
|
|
815
|
+
transaction_time : str
|
|
816
|
+
The time of the fuel transaction in RFC 3339 format. Timezone must be specified. For example, 2022-07-13T14:20:50.52-07:00 is a time in Pacific Daylight Time.
|
|
817
|
+
|
|
818
|
+
discount : typing.Optional[PostFuelPurchaseRequestBodyDiscountRequestBody]
|
|
819
|
+
|
|
820
|
+
driver_id : typing.Optional[str]
|
|
821
|
+
Samsara ID of the driver that purchased the fuel.
|
|
822
|
+
|
|
823
|
+
fuel_grade : typing.Optional[FuelPurchasePostFuelPurchaseRequestBodyFuelGrade]
|
|
824
|
+
The grade of the fuel purchased. Valid values: `Unknown`, `Regular`, `Premium`
|
|
825
|
+
|
|
826
|
+
ifta_fuel_type : typing.Optional[FuelPurchasePostFuelPurchaseRequestBodyIftaFuelType]
|
|
827
|
+
The type of fuel purchased supported by IFTA. Valid values: `Unspecified`, `A55`, `Biodiesel`, `CompressedNaturalGas`, `Diesel`, `E85`, `Electricity`, `Ethanol`, `Gasohol`, `Gasoline`, `Hydrogen`, `LiquifiedNaturalGas`, `M85`, `Methanol`, `Propane`, `Other`
|
|
828
|
+
|
|
829
|
+
merchant_name : typing.Optional[str]
|
|
830
|
+
Brand name of the fuel station the fuel was purchased at. For example: Shell, Bp, Exxon.
|
|
831
|
+
|
|
832
|
+
source : typing.Optional[str]
|
|
833
|
+
The integration provider. For example: Customer, Shell Integration
|
|
834
|
+
|
|
835
|
+
vehicle_id : typing.Optional[str]
|
|
836
|
+
Samsara ID of the vehicle that purchased the fuel.
|
|
837
|
+
|
|
838
|
+
request_options : typing.Optional[RequestOptions]
|
|
839
|
+
Request-specific configuration.
|
|
840
|
+
|
|
841
|
+
Returns
|
|
842
|
+
-------
|
|
843
|
+
HttpResponse[FuelPurchasePostFuelPurchaseResponseBody]
|
|
844
|
+
OK response.
|
|
845
|
+
"""
|
|
846
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
847
|
+
"fuel-purchase",
|
|
848
|
+
method="POST",
|
|
849
|
+
json={
|
|
850
|
+
"discount": convert_and_respect_annotation_metadata(
|
|
851
|
+
object_=discount, annotation=PostFuelPurchaseRequestBodyDiscountRequestBody, direction="write"
|
|
852
|
+
),
|
|
853
|
+
"driverId": driver_id,
|
|
854
|
+
"fuelGrade": fuel_grade,
|
|
855
|
+
"fuelQuantityLiters": fuel_quantity_liters,
|
|
856
|
+
"iftaFuelType": ifta_fuel_type,
|
|
857
|
+
"merchantName": merchant_name,
|
|
858
|
+
"source": source,
|
|
859
|
+
"transactionLocation": transaction_location,
|
|
860
|
+
"transactionPrice": convert_and_respect_annotation_metadata(
|
|
861
|
+
object_=transaction_price, annotation=PostFuelPurchaseRequestBodyPriceRequestBody, direction="write"
|
|
862
|
+
),
|
|
863
|
+
"transactionReference": transaction_reference,
|
|
864
|
+
"transactionTime": transaction_time,
|
|
865
|
+
"vehicleId": vehicle_id,
|
|
866
|
+
},
|
|
867
|
+
headers={
|
|
868
|
+
"content-type": "application/json",
|
|
869
|
+
},
|
|
870
|
+
request_options=request_options,
|
|
871
|
+
omit=OMIT,
|
|
872
|
+
)
|
|
873
|
+
try:
|
|
874
|
+
if 200 <= _response.status_code < 300:
|
|
875
|
+
_data = typing.cast(
|
|
876
|
+
FuelPurchasePostFuelPurchaseResponseBody,
|
|
877
|
+
parse_obj_as(
|
|
878
|
+
type_=FuelPurchasePostFuelPurchaseResponseBody, # type: ignore
|
|
879
|
+
object_=_response.json(),
|
|
880
|
+
),
|
|
881
|
+
)
|
|
882
|
+
return HttpResponse(response=_response, data=_data)
|
|
883
|
+
if _response.status_code == 401:
|
|
884
|
+
raise UnauthorizedError(
|
|
885
|
+
headers=dict(_response.headers),
|
|
886
|
+
body=typing.cast(
|
|
887
|
+
typing.Optional[typing.Any],
|
|
888
|
+
parse_obj_as(
|
|
889
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
890
|
+
object_=_response.json(),
|
|
891
|
+
),
|
|
892
|
+
),
|
|
893
|
+
)
|
|
894
|
+
if _response.status_code == 404:
|
|
895
|
+
raise NotFoundError(
|
|
896
|
+
headers=dict(_response.headers),
|
|
897
|
+
body=typing.cast(
|
|
898
|
+
typing.Optional[typing.Any],
|
|
899
|
+
parse_obj_as(
|
|
900
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
901
|
+
object_=_response.json(),
|
|
902
|
+
),
|
|
903
|
+
),
|
|
904
|
+
)
|
|
905
|
+
if _response.status_code == 405:
|
|
906
|
+
raise MethodNotAllowedError(
|
|
907
|
+
headers=dict(_response.headers),
|
|
908
|
+
body=typing.cast(
|
|
909
|
+
typing.Optional[typing.Any],
|
|
910
|
+
parse_obj_as(
|
|
911
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
912
|
+
object_=_response.json(),
|
|
913
|
+
),
|
|
914
|
+
),
|
|
915
|
+
)
|
|
916
|
+
if _response.status_code == 429:
|
|
917
|
+
raise TooManyRequestsError(
|
|
918
|
+
headers=dict(_response.headers),
|
|
919
|
+
body=typing.cast(
|
|
920
|
+
typing.Optional[typing.Any],
|
|
921
|
+
parse_obj_as(
|
|
922
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
923
|
+
object_=_response.json(),
|
|
924
|
+
),
|
|
925
|
+
),
|
|
926
|
+
)
|
|
927
|
+
if _response.status_code == 500:
|
|
928
|
+
raise InternalServerError(
|
|
929
|
+
headers=dict(_response.headers),
|
|
930
|
+
body=typing.cast(
|
|
931
|
+
typing.Optional[typing.Any],
|
|
932
|
+
parse_obj_as(
|
|
933
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
934
|
+
object_=_response.json(),
|
|
935
|
+
),
|
|
936
|
+
),
|
|
937
|
+
)
|
|
938
|
+
if _response.status_code == 501:
|
|
939
|
+
raise NotImplementedError(
|
|
940
|
+
headers=dict(_response.headers),
|
|
941
|
+
body=typing.cast(
|
|
942
|
+
typing.Optional[typing.Any],
|
|
943
|
+
parse_obj_as(
|
|
944
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
945
|
+
object_=_response.json(),
|
|
946
|
+
),
|
|
947
|
+
),
|
|
948
|
+
)
|
|
949
|
+
if _response.status_code == 502:
|
|
950
|
+
raise BadGatewayError(
|
|
951
|
+
headers=dict(_response.headers),
|
|
952
|
+
body=typing.cast(
|
|
953
|
+
typing.Optional[typing.Any],
|
|
954
|
+
parse_obj_as(
|
|
955
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
956
|
+
object_=_response.json(),
|
|
957
|
+
),
|
|
958
|
+
),
|
|
959
|
+
)
|
|
960
|
+
if _response.status_code == 503:
|
|
961
|
+
raise ServiceUnavailableError(
|
|
962
|
+
headers=dict(_response.headers),
|
|
963
|
+
body=typing.cast(
|
|
964
|
+
typing.Optional[typing.Any],
|
|
965
|
+
parse_obj_as(
|
|
966
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
967
|
+
object_=_response.json(),
|
|
968
|
+
),
|
|
969
|
+
),
|
|
970
|
+
)
|
|
971
|
+
if _response.status_code == 504:
|
|
972
|
+
raise GatewayTimeoutError(
|
|
973
|
+
headers=dict(_response.headers),
|
|
974
|
+
body=typing.cast(
|
|
975
|
+
typing.Optional[typing.Any],
|
|
976
|
+
parse_obj_as(
|
|
977
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
978
|
+
object_=_response.json(),
|
|
979
|
+
),
|
|
980
|
+
),
|
|
981
|
+
)
|
|
982
|
+
_response_json = _response.json()
|
|
983
|
+
except JSONDecodeError:
|
|
984
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
985
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
986
|
+
|
|
987
|
+
|
|
988
|
+
class AsyncRawFuelAndEnergyClient:
|
|
989
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
990
|
+
self._client_wrapper = client_wrapper
|
|
991
|
+
|
|
992
|
+
async def get_driver_efficiency_by_drivers(
|
|
993
|
+
self,
|
|
994
|
+
*,
|
|
995
|
+
start_time: str,
|
|
996
|
+
end_time: str,
|
|
997
|
+
driver_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
998
|
+
data_formats: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
999
|
+
tag_ids: typing.Optional[str] = None,
|
|
1000
|
+
parent_tag_ids: typing.Optional[str] = None,
|
|
1001
|
+
after: typing.Optional[str] = None,
|
|
1002
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1003
|
+
) -> AsyncHttpResponse[DriverEfficiencyGetDriverEfficiencyByDriversResponseBody]:
|
|
1004
|
+
"""
|
|
1005
|
+
This endpoint will return driver efficiency data that has been collected for your organization and grouped by drivers based on the time parameters passed in. Results are paginated.
|
|
1006
|
+
|
|
1007
|
+
**Note:** The data from this endpoint comes from the Driver Efficiency (Eco-Driving) Report. The existing [/fleet/drivers/efficiency](https://developers.samsara.com/reference/getdriverefficiency) endpoint has now been moved to Legacy.
|
|
1008
|
+
|
|
1009
|
+
<b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
1010
|
+
|
|
1011
|
+
To use this endpoint, select **Read Driver Efficiency** under the Fuel & Energy category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
**Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
1015
|
+
|
|
1016
|
+
Parameters
|
|
1017
|
+
----------
|
|
1018
|
+
start_time : str
|
|
1019
|
+
A start time in RFC 3339 format. Must be in multiple of hours and at least 1 day before endTime. Timezones are supported. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. (Examples: 2019-06-11T19:00:00Z, 2015-09-12T14:00:00-04:00).
|
|
1020
|
+
|
|
1021
|
+
end_time : str
|
|
1022
|
+
An end time in RFC 3339 format. Must be in multiple of hours and no later than 3 hours before the current time. Timezones are supported. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. (Examples: 2019-06-13T19:00:00Z, 2015-09-15T14:00:00-04:00).
|
|
1023
|
+
|
|
1024
|
+
driver_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
1025
|
+
A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`
|
|
1026
|
+
|
|
1027
|
+
data_formats : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
1028
|
+
A comma-separated list of data formats you want to fetch. Valid values: `score`, `raw` and `percentage`. The default data format is `score`. Example: `dataFormats=raw,score`
|
|
1029
|
+
|
|
1030
|
+
tag_ids : typing.Optional[str]
|
|
1031
|
+
A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
|
|
1032
|
+
|
|
1033
|
+
parent_tag_ids : typing.Optional[str]
|
|
1034
|
+
A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
|
|
1035
|
+
|
|
1036
|
+
after : typing.Optional[str]
|
|
1037
|
+
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
|
|
1038
|
+
|
|
1039
|
+
request_options : typing.Optional[RequestOptions]
|
|
1040
|
+
Request-specific configuration.
|
|
1041
|
+
|
|
1042
|
+
Returns
|
|
1043
|
+
-------
|
|
1044
|
+
AsyncHttpResponse[DriverEfficiencyGetDriverEfficiencyByDriversResponseBody]
|
|
1045
|
+
OK response.
|
|
1046
|
+
"""
|
|
1047
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
1048
|
+
"driver-efficiency/drivers",
|
|
1049
|
+
method="GET",
|
|
1050
|
+
params={
|
|
1051
|
+
"startTime": start_time,
|
|
1052
|
+
"endTime": end_time,
|
|
1053
|
+
"driverIds": driver_ids,
|
|
1054
|
+
"dataFormats": data_formats,
|
|
1055
|
+
"tagIds": tag_ids,
|
|
1056
|
+
"parentTagIds": parent_tag_ids,
|
|
1057
|
+
"after": after,
|
|
1058
|
+
},
|
|
1059
|
+
request_options=request_options,
|
|
1060
|
+
)
|
|
1061
|
+
try:
|
|
1062
|
+
if 200 <= _response.status_code < 300:
|
|
1063
|
+
_data = typing.cast(
|
|
1064
|
+
DriverEfficiencyGetDriverEfficiencyByDriversResponseBody,
|
|
1065
|
+
parse_obj_as(
|
|
1066
|
+
type_=DriverEfficiencyGetDriverEfficiencyByDriversResponseBody, # type: ignore
|
|
1067
|
+
object_=_response.json(),
|
|
1068
|
+
),
|
|
1069
|
+
)
|
|
1070
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
1071
|
+
if _response.status_code == 401:
|
|
1072
|
+
raise UnauthorizedError(
|
|
1073
|
+
headers=dict(_response.headers),
|
|
1074
|
+
body=typing.cast(
|
|
1075
|
+
typing.Optional[typing.Any],
|
|
1076
|
+
parse_obj_as(
|
|
1077
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1078
|
+
object_=_response.json(),
|
|
1079
|
+
),
|
|
1080
|
+
),
|
|
1081
|
+
)
|
|
1082
|
+
if _response.status_code == 404:
|
|
1083
|
+
raise NotFoundError(
|
|
1084
|
+
headers=dict(_response.headers),
|
|
1085
|
+
body=typing.cast(
|
|
1086
|
+
typing.Optional[typing.Any],
|
|
1087
|
+
parse_obj_as(
|
|
1088
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1089
|
+
object_=_response.json(),
|
|
1090
|
+
),
|
|
1091
|
+
),
|
|
1092
|
+
)
|
|
1093
|
+
if _response.status_code == 405:
|
|
1094
|
+
raise MethodNotAllowedError(
|
|
1095
|
+
headers=dict(_response.headers),
|
|
1096
|
+
body=typing.cast(
|
|
1097
|
+
typing.Optional[typing.Any],
|
|
1098
|
+
parse_obj_as(
|
|
1099
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1100
|
+
object_=_response.json(),
|
|
1101
|
+
),
|
|
1102
|
+
),
|
|
1103
|
+
)
|
|
1104
|
+
if _response.status_code == 429:
|
|
1105
|
+
raise TooManyRequestsError(
|
|
1106
|
+
headers=dict(_response.headers),
|
|
1107
|
+
body=typing.cast(
|
|
1108
|
+
typing.Optional[typing.Any],
|
|
1109
|
+
parse_obj_as(
|
|
1110
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1111
|
+
object_=_response.json(),
|
|
1112
|
+
),
|
|
1113
|
+
),
|
|
1114
|
+
)
|
|
1115
|
+
if _response.status_code == 500:
|
|
1116
|
+
raise InternalServerError(
|
|
1117
|
+
headers=dict(_response.headers),
|
|
1118
|
+
body=typing.cast(
|
|
1119
|
+
typing.Optional[typing.Any],
|
|
1120
|
+
parse_obj_as(
|
|
1121
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1122
|
+
object_=_response.json(),
|
|
1123
|
+
),
|
|
1124
|
+
),
|
|
1125
|
+
)
|
|
1126
|
+
if _response.status_code == 501:
|
|
1127
|
+
raise NotImplementedError(
|
|
1128
|
+
headers=dict(_response.headers),
|
|
1129
|
+
body=typing.cast(
|
|
1130
|
+
typing.Optional[typing.Any],
|
|
1131
|
+
parse_obj_as(
|
|
1132
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1133
|
+
object_=_response.json(),
|
|
1134
|
+
),
|
|
1135
|
+
),
|
|
1136
|
+
)
|
|
1137
|
+
if _response.status_code == 502:
|
|
1138
|
+
raise BadGatewayError(
|
|
1139
|
+
headers=dict(_response.headers),
|
|
1140
|
+
body=typing.cast(
|
|
1141
|
+
typing.Optional[typing.Any],
|
|
1142
|
+
parse_obj_as(
|
|
1143
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1144
|
+
object_=_response.json(),
|
|
1145
|
+
),
|
|
1146
|
+
),
|
|
1147
|
+
)
|
|
1148
|
+
if _response.status_code == 503:
|
|
1149
|
+
raise ServiceUnavailableError(
|
|
1150
|
+
headers=dict(_response.headers),
|
|
1151
|
+
body=typing.cast(
|
|
1152
|
+
typing.Optional[typing.Any],
|
|
1153
|
+
parse_obj_as(
|
|
1154
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1155
|
+
object_=_response.json(),
|
|
1156
|
+
),
|
|
1157
|
+
),
|
|
1158
|
+
)
|
|
1159
|
+
if _response.status_code == 504:
|
|
1160
|
+
raise GatewayTimeoutError(
|
|
1161
|
+
headers=dict(_response.headers),
|
|
1162
|
+
body=typing.cast(
|
|
1163
|
+
typing.Optional[typing.Any],
|
|
1164
|
+
parse_obj_as(
|
|
1165
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1166
|
+
object_=_response.json(),
|
|
1167
|
+
),
|
|
1168
|
+
),
|
|
1169
|
+
)
|
|
1170
|
+
_response_json = _response.json()
|
|
1171
|
+
except JSONDecodeError:
|
|
1172
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
1173
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
1174
|
+
|
|
1175
|
+
async def get_driver_efficiency_by_vehicles(
|
|
1176
|
+
self,
|
|
1177
|
+
*,
|
|
1178
|
+
start_time: str,
|
|
1179
|
+
end_time: str,
|
|
1180
|
+
vehicle_ids: typing.Optional[str] = None,
|
|
1181
|
+
data_formats: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
1182
|
+
tag_ids: typing.Optional[str] = None,
|
|
1183
|
+
parent_tag_ids: typing.Optional[str] = None,
|
|
1184
|
+
after: typing.Optional[str] = None,
|
|
1185
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1186
|
+
) -> AsyncHttpResponse[DriverEfficiencyGetDriverEfficiencyByVehiclesResponseBody]:
|
|
1187
|
+
"""
|
|
1188
|
+
This endpoint will return driver efficiency data that has been collected for your organization and grouped by vehicle drivers used based on the time parameters passed in. Results are paginated.
|
|
1189
|
+
|
|
1190
|
+
**Note:** The data from this endpoint comes from the Driver Efficiency (Eco-Driving) Report. The existing [/fleet/drivers/efficiency](https://developers.samsara.com/reference/getdriverefficiency) endpoint has now been moved to Legacy.
|
|
1191
|
+
|
|
1192
|
+
<b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
1193
|
+
|
|
1194
|
+
To use this endpoint, select **Read Driver Efficiency** under the Fuel & Energy category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
**Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
1198
|
+
|
|
1199
|
+
Parameters
|
|
1200
|
+
----------
|
|
1201
|
+
start_time : str
|
|
1202
|
+
A start time in RFC 3339 format. Must be in multiple of hours and at least 1 day before endTime. Timezones are supported. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. (Examples: 2019-06-11T19:00:00Z, 2015-09-12T14:00:00-04:00).
|
|
1203
|
+
|
|
1204
|
+
end_time : str
|
|
1205
|
+
An end time in RFC 3339 format. Must be in multiple of hours and no later than 3 hours before the current time. Timezones are supported. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. (Examples: 2019-06-13T19:00:00Z, 2015-09-15T14:00:00-04:00).
|
|
1206
|
+
|
|
1207
|
+
vehicle_ids : typing.Optional[str]
|
|
1208
|
+
A filter on the data based on this comma-separated list of vehicle IDs and externalIds. Example: `vehicleIds=1234,5678,samsara.vin:1HGBH41JXMN109186`
|
|
1209
|
+
|
|
1210
|
+
data_formats : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
1211
|
+
A comma-separated list of data formats you want to fetch. Valid values: `score`, `raw` and `percentage`. The default data format is `score`. Example: `dataFormats=raw,score`
|
|
1212
|
+
|
|
1213
|
+
tag_ids : typing.Optional[str]
|
|
1214
|
+
A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
|
|
1215
|
+
|
|
1216
|
+
parent_tag_ids : typing.Optional[str]
|
|
1217
|
+
A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
|
|
1218
|
+
|
|
1219
|
+
after : typing.Optional[str]
|
|
1220
|
+
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
|
|
1221
|
+
|
|
1222
|
+
request_options : typing.Optional[RequestOptions]
|
|
1223
|
+
Request-specific configuration.
|
|
1224
|
+
|
|
1225
|
+
Returns
|
|
1226
|
+
-------
|
|
1227
|
+
AsyncHttpResponse[DriverEfficiencyGetDriverEfficiencyByVehiclesResponseBody]
|
|
1228
|
+
OK response.
|
|
1229
|
+
"""
|
|
1230
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
1231
|
+
"driver-efficiency/vehicles",
|
|
1232
|
+
method="GET",
|
|
1233
|
+
params={
|
|
1234
|
+
"startTime": start_time,
|
|
1235
|
+
"endTime": end_time,
|
|
1236
|
+
"vehicleIds": vehicle_ids,
|
|
1237
|
+
"dataFormats": data_formats,
|
|
1238
|
+
"tagIds": tag_ids,
|
|
1239
|
+
"parentTagIds": parent_tag_ids,
|
|
1240
|
+
"after": after,
|
|
1241
|
+
},
|
|
1242
|
+
request_options=request_options,
|
|
1243
|
+
)
|
|
1244
|
+
try:
|
|
1245
|
+
if 200 <= _response.status_code < 300:
|
|
1246
|
+
_data = typing.cast(
|
|
1247
|
+
DriverEfficiencyGetDriverEfficiencyByVehiclesResponseBody,
|
|
1248
|
+
parse_obj_as(
|
|
1249
|
+
type_=DriverEfficiencyGetDriverEfficiencyByVehiclesResponseBody, # type: ignore
|
|
1250
|
+
object_=_response.json(),
|
|
1251
|
+
),
|
|
1252
|
+
)
|
|
1253
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
1254
|
+
if _response.status_code == 401:
|
|
1255
|
+
raise UnauthorizedError(
|
|
1256
|
+
headers=dict(_response.headers),
|
|
1257
|
+
body=typing.cast(
|
|
1258
|
+
typing.Optional[typing.Any],
|
|
1259
|
+
parse_obj_as(
|
|
1260
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1261
|
+
object_=_response.json(),
|
|
1262
|
+
),
|
|
1263
|
+
),
|
|
1264
|
+
)
|
|
1265
|
+
if _response.status_code == 404:
|
|
1266
|
+
raise NotFoundError(
|
|
1267
|
+
headers=dict(_response.headers),
|
|
1268
|
+
body=typing.cast(
|
|
1269
|
+
typing.Optional[typing.Any],
|
|
1270
|
+
parse_obj_as(
|
|
1271
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1272
|
+
object_=_response.json(),
|
|
1273
|
+
),
|
|
1274
|
+
),
|
|
1275
|
+
)
|
|
1276
|
+
if _response.status_code == 405:
|
|
1277
|
+
raise MethodNotAllowedError(
|
|
1278
|
+
headers=dict(_response.headers),
|
|
1279
|
+
body=typing.cast(
|
|
1280
|
+
typing.Optional[typing.Any],
|
|
1281
|
+
parse_obj_as(
|
|
1282
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1283
|
+
object_=_response.json(),
|
|
1284
|
+
),
|
|
1285
|
+
),
|
|
1286
|
+
)
|
|
1287
|
+
if _response.status_code == 429:
|
|
1288
|
+
raise TooManyRequestsError(
|
|
1289
|
+
headers=dict(_response.headers),
|
|
1290
|
+
body=typing.cast(
|
|
1291
|
+
typing.Optional[typing.Any],
|
|
1292
|
+
parse_obj_as(
|
|
1293
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1294
|
+
object_=_response.json(),
|
|
1295
|
+
),
|
|
1296
|
+
),
|
|
1297
|
+
)
|
|
1298
|
+
if _response.status_code == 500:
|
|
1299
|
+
raise InternalServerError(
|
|
1300
|
+
headers=dict(_response.headers),
|
|
1301
|
+
body=typing.cast(
|
|
1302
|
+
typing.Optional[typing.Any],
|
|
1303
|
+
parse_obj_as(
|
|
1304
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1305
|
+
object_=_response.json(),
|
|
1306
|
+
),
|
|
1307
|
+
),
|
|
1308
|
+
)
|
|
1309
|
+
if _response.status_code == 501:
|
|
1310
|
+
raise NotImplementedError(
|
|
1311
|
+
headers=dict(_response.headers),
|
|
1312
|
+
body=typing.cast(
|
|
1313
|
+
typing.Optional[typing.Any],
|
|
1314
|
+
parse_obj_as(
|
|
1315
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1316
|
+
object_=_response.json(),
|
|
1317
|
+
),
|
|
1318
|
+
),
|
|
1319
|
+
)
|
|
1320
|
+
if _response.status_code == 502:
|
|
1321
|
+
raise BadGatewayError(
|
|
1322
|
+
headers=dict(_response.headers),
|
|
1323
|
+
body=typing.cast(
|
|
1324
|
+
typing.Optional[typing.Any],
|
|
1325
|
+
parse_obj_as(
|
|
1326
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1327
|
+
object_=_response.json(),
|
|
1328
|
+
),
|
|
1329
|
+
),
|
|
1330
|
+
)
|
|
1331
|
+
if _response.status_code == 503:
|
|
1332
|
+
raise ServiceUnavailableError(
|
|
1333
|
+
headers=dict(_response.headers),
|
|
1334
|
+
body=typing.cast(
|
|
1335
|
+
typing.Optional[typing.Any],
|
|
1336
|
+
parse_obj_as(
|
|
1337
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1338
|
+
object_=_response.json(),
|
|
1339
|
+
),
|
|
1340
|
+
),
|
|
1341
|
+
)
|
|
1342
|
+
if _response.status_code == 504:
|
|
1343
|
+
raise GatewayTimeoutError(
|
|
1344
|
+
headers=dict(_response.headers),
|
|
1345
|
+
body=typing.cast(
|
|
1346
|
+
typing.Optional[typing.Any],
|
|
1347
|
+
parse_obj_as(
|
|
1348
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1349
|
+
object_=_response.json(),
|
|
1350
|
+
),
|
|
1351
|
+
),
|
|
1352
|
+
)
|
|
1353
|
+
_response_json = _response.json()
|
|
1354
|
+
except JSONDecodeError:
|
|
1355
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
1356
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
1357
|
+
|
|
1358
|
+
async def get_fuel_energy_driver_reports(
|
|
1359
|
+
self,
|
|
1360
|
+
*,
|
|
1361
|
+
start_date: str,
|
|
1362
|
+
end_date: str,
|
|
1363
|
+
driver_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
1364
|
+
tag_ids: typing.Optional[str] = None,
|
|
1365
|
+
parent_tag_ids: typing.Optional[str] = None,
|
|
1366
|
+
after: typing.Optional[str] = None,
|
|
1367
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1368
|
+
) -> AsyncHttpResponse[FuelEnergyGetFuelEnergyDriverReportsResponseBody]:
|
|
1369
|
+
"""
|
|
1370
|
+
Get fuel and energy efficiency driver reports for the requested time range.
|
|
1371
|
+
|
|
1372
|
+
<b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
1373
|
+
|
|
1374
|
+
To use this endpoint, select **Read Fuel & Energy** under the Fuel & Energy category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
**Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
1378
|
+
|
|
1379
|
+
Parameters
|
|
1380
|
+
----------
|
|
1381
|
+
start_date : str
|
|
1382
|
+
A start date in RFC 3339 format. This parameter ignores everything (i.e. hour, minutes, seconds, nanoseconds, etc.) besides the date and timezone. If no time zone is passed in, then the UTC time zone will be used. This parameter is inclusive, so data on the date specified will be considered. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. For example, 2022-07-13T14:20:50.52-07:00 is a time in Pacific Daylight Time.
|
|
1383
|
+
|
|
1384
|
+
end_date : str
|
|
1385
|
+
An end date in RFC 3339 format. This parameter ignores everything (i.e. hour, minutes, seconds, nanoseconds, etc.) besides the date and timezone. If no time zone is passed in, then the UTC time zone will be used. This parameter is inclusive, so data on the date specified will be considered. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. For example, 2022-07-13T14:20:50.52-07:00 is a time in Pacific Daylight Time.
|
|
1386
|
+
|
|
1387
|
+
driver_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
1388
|
+
A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`
|
|
1389
|
+
|
|
1390
|
+
tag_ids : typing.Optional[str]
|
|
1391
|
+
A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
|
|
1392
|
+
|
|
1393
|
+
parent_tag_ids : typing.Optional[str]
|
|
1394
|
+
A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
|
|
1395
|
+
|
|
1396
|
+
after : typing.Optional[str]
|
|
1397
|
+
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
|
|
1398
|
+
|
|
1399
|
+
request_options : typing.Optional[RequestOptions]
|
|
1400
|
+
Request-specific configuration.
|
|
1401
|
+
|
|
1402
|
+
Returns
|
|
1403
|
+
-------
|
|
1404
|
+
AsyncHttpResponse[FuelEnergyGetFuelEnergyDriverReportsResponseBody]
|
|
1405
|
+
OK response.
|
|
1406
|
+
"""
|
|
1407
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
1408
|
+
"fleet/reports/drivers/fuel-energy",
|
|
1409
|
+
method="GET",
|
|
1410
|
+
params={
|
|
1411
|
+
"startDate": start_date,
|
|
1412
|
+
"endDate": end_date,
|
|
1413
|
+
"driverIds": driver_ids,
|
|
1414
|
+
"tagIds": tag_ids,
|
|
1415
|
+
"parentTagIds": parent_tag_ids,
|
|
1416
|
+
"after": after,
|
|
1417
|
+
},
|
|
1418
|
+
request_options=request_options,
|
|
1419
|
+
)
|
|
1420
|
+
try:
|
|
1421
|
+
if 200 <= _response.status_code < 300:
|
|
1422
|
+
_data = typing.cast(
|
|
1423
|
+
FuelEnergyGetFuelEnergyDriverReportsResponseBody,
|
|
1424
|
+
parse_obj_as(
|
|
1425
|
+
type_=FuelEnergyGetFuelEnergyDriverReportsResponseBody, # type: ignore
|
|
1426
|
+
object_=_response.json(),
|
|
1427
|
+
),
|
|
1428
|
+
)
|
|
1429
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
1430
|
+
if _response.status_code == 401:
|
|
1431
|
+
raise UnauthorizedError(
|
|
1432
|
+
headers=dict(_response.headers),
|
|
1433
|
+
body=typing.cast(
|
|
1434
|
+
typing.Optional[typing.Any],
|
|
1435
|
+
parse_obj_as(
|
|
1436
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1437
|
+
object_=_response.json(),
|
|
1438
|
+
),
|
|
1439
|
+
),
|
|
1440
|
+
)
|
|
1441
|
+
if _response.status_code == 404:
|
|
1442
|
+
raise NotFoundError(
|
|
1443
|
+
headers=dict(_response.headers),
|
|
1444
|
+
body=typing.cast(
|
|
1445
|
+
typing.Optional[typing.Any],
|
|
1446
|
+
parse_obj_as(
|
|
1447
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1448
|
+
object_=_response.json(),
|
|
1449
|
+
),
|
|
1450
|
+
),
|
|
1451
|
+
)
|
|
1452
|
+
if _response.status_code == 405:
|
|
1453
|
+
raise MethodNotAllowedError(
|
|
1454
|
+
headers=dict(_response.headers),
|
|
1455
|
+
body=typing.cast(
|
|
1456
|
+
typing.Optional[typing.Any],
|
|
1457
|
+
parse_obj_as(
|
|
1458
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1459
|
+
object_=_response.json(),
|
|
1460
|
+
),
|
|
1461
|
+
),
|
|
1462
|
+
)
|
|
1463
|
+
if _response.status_code == 429:
|
|
1464
|
+
raise TooManyRequestsError(
|
|
1465
|
+
headers=dict(_response.headers),
|
|
1466
|
+
body=typing.cast(
|
|
1467
|
+
typing.Optional[typing.Any],
|
|
1468
|
+
parse_obj_as(
|
|
1469
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1470
|
+
object_=_response.json(),
|
|
1471
|
+
),
|
|
1472
|
+
),
|
|
1473
|
+
)
|
|
1474
|
+
if _response.status_code == 500:
|
|
1475
|
+
raise InternalServerError(
|
|
1476
|
+
headers=dict(_response.headers),
|
|
1477
|
+
body=typing.cast(
|
|
1478
|
+
typing.Optional[typing.Any],
|
|
1479
|
+
parse_obj_as(
|
|
1480
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1481
|
+
object_=_response.json(),
|
|
1482
|
+
),
|
|
1483
|
+
),
|
|
1484
|
+
)
|
|
1485
|
+
if _response.status_code == 501:
|
|
1486
|
+
raise NotImplementedError(
|
|
1487
|
+
headers=dict(_response.headers),
|
|
1488
|
+
body=typing.cast(
|
|
1489
|
+
typing.Optional[typing.Any],
|
|
1490
|
+
parse_obj_as(
|
|
1491
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1492
|
+
object_=_response.json(),
|
|
1493
|
+
),
|
|
1494
|
+
),
|
|
1495
|
+
)
|
|
1496
|
+
if _response.status_code == 502:
|
|
1497
|
+
raise BadGatewayError(
|
|
1498
|
+
headers=dict(_response.headers),
|
|
1499
|
+
body=typing.cast(
|
|
1500
|
+
typing.Optional[typing.Any],
|
|
1501
|
+
parse_obj_as(
|
|
1502
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1503
|
+
object_=_response.json(),
|
|
1504
|
+
),
|
|
1505
|
+
),
|
|
1506
|
+
)
|
|
1507
|
+
if _response.status_code == 503:
|
|
1508
|
+
raise ServiceUnavailableError(
|
|
1509
|
+
headers=dict(_response.headers),
|
|
1510
|
+
body=typing.cast(
|
|
1511
|
+
typing.Optional[typing.Any],
|
|
1512
|
+
parse_obj_as(
|
|
1513
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1514
|
+
object_=_response.json(),
|
|
1515
|
+
),
|
|
1516
|
+
),
|
|
1517
|
+
)
|
|
1518
|
+
if _response.status_code == 504:
|
|
1519
|
+
raise GatewayTimeoutError(
|
|
1520
|
+
headers=dict(_response.headers),
|
|
1521
|
+
body=typing.cast(
|
|
1522
|
+
typing.Optional[typing.Any],
|
|
1523
|
+
parse_obj_as(
|
|
1524
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1525
|
+
object_=_response.json(),
|
|
1526
|
+
),
|
|
1527
|
+
),
|
|
1528
|
+
)
|
|
1529
|
+
_response_json = _response.json()
|
|
1530
|
+
except JSONDecodeError:
|
|
1531
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
1532
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
1533
|
+
|
|
1534
|
+
async def get_fuel_energy_vehicle_reports(
|
|
1535
|
+
self,
|
|
1536
|
+
*,
|
|
1537
|
+
start_date: str,
|
|
1538
|
+
end_date: str,
|
|
1539
|
+
vehicle_ids: typing.Optional[str] = None,
|
|
1540
|
+
energy_type: typing.Optional[GetFuelEnergyVehicleReportsRequestEnergyType] = None,
|
|
1541
|
+
tag_ids: typing.Optional[str] = None,
|
|
1542
|
+
parent_tag_ids: typing.Optional[str] = None,
|
|
1543
|
+
after: typing.Optional[str] = None,
|
|
1544
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1545
|
+
) -> AsyncHttpResponse[FuelEnergyGetFuelEnergyVehicleReportsResponseBody]:
|
|
1546
|
+
"""
|
|
1547
|
+
Get fuel and energy efficiency vehicle reports for the requested time range.
|
|
1548
|
+
|
|
1549
|
+
<b>Rate limit:</b> 25 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
1550
|
+
|
|
1551
|
+
To use this endpoint, select **Read Fuel & Energy** under the Fuel & Energy category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
1552
|
+
|
|
1553
|
+
|
|
1554
|
+
**Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
1555
|
+
|
|
1556
|
+
Parameters
|
|
1557
|
+
----------
|
|
1558
|
+
start_date : str
|
|
1559
|
+
A start date in RFC 3339 format. This parameter ignores everything (i.e. hour, minutes, seconds, nanoseconds, etc.) besides the date and timezone. If no time zone is passed in, then the UTC time zone will be used. This parameter is inclusive, so data on the date specified will be considered. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. For example, 2022-07-13T14:20:50.52-07:00 is a time in Pacific Daylight Time.
|
|
1560
|
+
|
|
1561
|
+
end_date : str
|
|
1562
|
+
An end date in RFC 3339 format. This parameter ignores everything (i.e. hour, minutes, seconds, nanoseconds, etc.) besides the date and timezone. If no time zone is passed in, then the UTC time zone will be used. This parameter is inclusive, so data on the date specified will be considered. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. For example, 2022-07-13T14:20:50.52-07:00 is a time in Pacific Daylight Time.
|
|
1563
|
+
|
|
1564
|
+
vehicle_ids : typing.Optional[str]
|
|
1565
|
+
A filter on the data based on this comma-separated list of vehicle IDs and externalIds. Example: `vehicleIds=1234,5678,samsara.vin:1HGBH41JXMN109186`
|
|
1566
|
+
|
|
1567
|
+
energy_type : typing.Optional[GetFuelEnergyVehicleReportsRequestEnergyType]
|
|
1568
|
+
The type of energy used by the vehicle. Valid values: `fuel`, `hybrid`, `electric`
|
|
1569
|
+
|
|
1570
|
+
tag_ids : typing.Optional[str]
|
|
1571
|
+
A filter on the data based on this comma-separated list of tag IDs. Example: `tagIds=1234,5678`
|
|
1572
|
+
|
|
1573
|
+
parent_tag_ids : typing.Optional[str]
|
|
1574
|
+
A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: `parentTagIds=345,678`
|
|
1575
|
+
|
|
1576
|
+
after : typing.Optional[str]
|
|
1577
|
+
If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
|
|
1578
|
+
|
|
1579
|
+
request_options : typing.Optional[RequestOptions]
|
|
1580
|
+
Request-specific configuration.
|
|
1581
|
+
|
|
1582
|
+
Returns
|
|
1583
|
+
-------
|
|
1584
|
+
AsyncHttpResponse[FuelEnergyGetFuelEnergyVehicleReportsResponseBody]
|
|
1585
|
+
OK response.
|
|
1586
|
+
"""
|
|
1587
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
1588
|
+
"fleet/reports/vehicles/fuel-energy",
|
|
1589
|
+
method="GET",
|
|
1590
|
+
params={
|
|
1591
|
+
"startDate": start_date,
|
|
1592
|
+
"endDate": end_date,
|
|
1593
|
+
"vehicleIds": vehicle_ids,
|
|
1594
|
+
"energyType": energy_type,
|
|
1595
|
+
"tagIds": tag_ids,
|
|
1596
|
+
"parentTagIds": parent_tag_ids,
|
|
1597
|
+
"after": after,
|
|
1598
|
+
},
|
|
1599
|
+
request_options=request_options,
|
|
1600
|
+
)
|
|
1601
|
+
try:
|
|
1602
|
+
if 200 <= _response.status_code < 300:
|
|
1603
|
+
_data = typing.cast(
|
|
1604
|
+
FuelEnergyGetFuelEnergyVehicleReportsResponseBody,
|
|
1605
|
+
parse_obj_as(
|
|
1606
|
+
type_=FuelEnergyGetFuelEnergyVehicleReportsResponseBody, # type: ignore
|
|
1607
|
+
object_=_response.json(),
|
|
1608
|
+
),
|
|
1609
|
+
)
|
|
1610
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
1611
|
+
if _response.status_code == 401:
|
|
1612
|
+
raise UnauthorizedError(
|
|
1613
|
+
headers=dict(_response.headers),
|
|
1614
|
+
body=typing.cast(
|
|
1615
|
+
typing.Optional[typing.Any],
|
|
1616
|
+
parse_obj_as(
|
|
1617
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1618
|
+
object_=_response.json(),
|
|
1619
|
+
),
|
|
1620
|
+
),
|
|
1621
|
+
)
|
|
1622
|
+
if _response.status_code == 404:
|
|
1623
|
+
raise NotFoundError(
|
|
1624
|
+
headers=dict(_response.headers),
|
|
1625
|
+
body=typing.cast(
|
|
1626
|
+
typing.Optional[typing.Any],
|
|
1627
|
+
parse_obj_as(
|
|
1628
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1629
|
+
object_=_response.json(),
|
|
1630
|
+
),
|
|
1631
|
+
),
|
|
1632
|
+
)
|
|
1633
|
+
if _response.status_code == 405:
|
|
1634
|
+
raise MethodNotAllowedError(
|
|
1635
|
+
headers=dict(_response.headers),
|
|
1636
|
+
body=typing.cast(
|
|
1637
|
+
typing.Optional[typing.Any],
|
|
1638
|
+
parse_obj_as(
|
|
1639
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1640
|
+
object_=_response.json(),
|
|
1641
|
+
),
|
|
1642
|
+
),
|
|
1643
|
+
)
|
|
1644
|
+
if _response.status_code == 429:
|
|
1645
|
+
raise TooManyRequestsError(
|
|
1646
|
+
headers=dict(_response.headers),
|
|
1647
|
+
body=typing.cast(
|
|
1648
|
+
typing.Optional[typing.Any],
|
|
1649
|
+
parse_obj_as(
|
|
1650
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1651
|
+
object_=_response.json(),
|
|
1652
|
+
),
|
|
1653
|
+
),
|
|
1654
|
+
)
|
|
1655
|
+
if _response.status_code == 500:
|
|
1656
|
+
raise InternalServerError(
|
|
1657
|
+
headers=dict(_response.headers),
|
|
1658
|
+
body=typing.cast(
|
|
1659
|
+
typing.Optional[typing.Any],
|
|
1660
|
+
parse_obj_as(
|
|
1661
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1662
|
+
object_=_response.json(),
|
|
1663
|
+
),
|
|
1664
|
+
),
|
|
1665
|
+
)
|
|
1666
|
+
if _response.status_code == 501:
|
|
1667
|
+
raise NotImplementedError(
|
|
1668
|
+
headers=dict(_response.headers),
|
|
1669
|
+
body=typing.cast(
|
|
1670
|
+
typing.Optional[typing.Any],
|
|
1671
|
+
parse_obj_as(
|
|
1672
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1673
|
+
object_=_response.json(),
|
|
1674
|
+
),
|
|
1675
|
+
),
|
|
1676
|
+
)
|
|
1677
|
+
if _response.status_code == 502:
|
|
1678
|
+
raise BadGatewayError(
|
|
1679
|
+
headers=dict(_response.headers),
|
|
1680
|
+
body=typing.cast(
|
|
1681
|
+
typing.Optional[typing.Any],
|
|
1682
|
+
parse_obj_as(
|
|
1683
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1684
|
+
object_=_response.json(),
|
|
1685
|
+
),
|
|
1686
|
+
),
|
|
1687
|
+
)
|
|
1688
|
+
if _response.status_code == 503:
|
|
1689
|
+
raise ServiceUnavailableError(
|
|
1690
|
+
headers=dict(_response.headers),
|
|
1691
|
+
body=typing.cast(
|
|
1692
|
+
typing.Optional[typing.Any],
|
|
1693
|
+
parse_obj_as(
|
|
1694
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1695
|
+
object_=_response.json(),
|
|
1696
|
+
),
|
|
1697
|
+
),
|
|
1698
|
+
)
|
|
1699
|
+
if _response.status_code == 504:
|
|
1700
|
+
raise GatewayTimeoutError(
|
|
1701
|
+
headers=dict(_response.headers),
|
|
1702
|
+
body=typing.cast(
|
|
1703
|
+
typing.Optional[typing.Any],
|
|
1704
|
+
parse_obj_as(
|
|
1705
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1706
|
+
object_=_response.json(),
|
|
1707
|
+
),
|
|
1708
|
+
),
|
|
1709
|
+
)
|
|
1710
|
+
_response_json = _response.json()
|
|
1711
|
+
except JSONDecodeError:
|
|
1712
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
1713
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
1714
|
+
|
|
1715
|
+
async def post_fuel_purchase(
|
|
1716
|
+
self,
|
|
1717
|
+
*,
|
|
1718
|
+
fuel_quantity_liters: str,
|
|
1719
|
+
transaction_location: str,
|
|
1720
|
+
transaction_price: PostFuelPurchaseRequestBodyPriceRequestBody,
|
|
1721
|
+
transaction_reference: str,
|
|
1722
|
+
transaction_time: str,
|
|
1723
|
+
discount: typing.Optional[PostFuelPurchaseRequestBodyDiscountRequestBody] = OMIT,
|
|
1724
|
+
driver_id: typing.Optional[str] = OMIT,
|
|
1725
|
+
fuel_grade: typing.Optional[FuelPurchasePostFuelPurchaseRequestBodyFuelGrade] = OMIT,
|
|
1726
|
+
ifta_fuel_type: typing.Optional[FuelPurchasePostFuelPurchaseRequestBodyIftaFuelType] = OMIT,
|
|
1727
|
+
merchant_name: typing.Optional[str] = OMIT,
|
|
1728
|
+
source: typing.Optional[str] = OMIT,
|
|
1729
|
+
vehicle_id: typing.Optional[str] = OMIT,
|
|
1730
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1731
|
+
) -> AsyncHttpResponse[FuelPurchasePostFuelPurchaseResponseBody]:
|
|
1732
|
+
"""
|
|
1733
|
+
Create a fuel purchase transaction.
|
|
1734
|
+
|
|
1735
|
+
<b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
1736
|
+
|
|
1737
|
+
To use this endpoint, select **Write Fuel Purchase** under the Fuel & Energy category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
1738
|
+
|
|
1739
|
+
|
|
1740
|
+
**Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
1741
|
+
|
|
1742
|
+
Parameters
|
|
1743
|
+
----------
|
|
1744
|
+
fuel_quantity_liters : str
|
|
1745
|
+
The amount of fuel purchased in liters.
|
|
1746
|
+
|
|
1747
|
+
transaction_location : str
|
|
1748
|
+
The full street address for the location of the fuel transaction, as it might be recognized by Google Maps. Ideal entries should be in accordance with the format used by the national postal service of the country concerned (example: 1 De Haro St, San Francisco, CA 94107, United States). Alternatively, exact latitude/longitude can be provided (example: 40.748441, -73.985664).
|
|
1749
|
+
|
|
1750
|
+
transaction_price : PostFuelPurchaseRequestBodyPriceRequestBody
|
|
1751
|
+
|
|
1752
|
+
transaction_reference : str
|
|
1753
|
+
The fuel transaction reference. This is the transaction identifier. For instance, this can be the Serial Number on the invoice.
|
|
1754
|
+
|
|
1755
|
+
transaction_time : str
|
|
1756
|
+
The time of the fuel transaction in RFC 3339 format. Timezone must be specified. For example, 2022-07-13T14:20:50.52-07:00 is a time in Pacific Daylight Time.
|
|
1757
|
+
|
|
1758
|
+
discount : typing.Optional[PostFuelPurchaseRequestBodyDiscountRequestBody]
|
|
1759
|
+
|
|
1760
|
+
driver_id : typing.Optional[str]
|
|
1761
|
+
Samsara ID of the driver that purchased the fuel.
|
|
1762
|
+
|
|
1763
|
+
fuel_grade : typing.Optional[FuelPurchasePostFuelPurchaseRequestBodyFuelGrade]
|
|
1764
|
+
The grade of the fuel purchased. Valid values: `Unknown`, `Regular`, `Premium`
|
|
1765
|
+
|
|
1766
|
+
ifta_fuel_type : typing.Optional[FuelPurchasePostFuelPurchaseRequestBodyIftaFuelType]
|
|
1767
|
+
The type of fuel purchased supported by IFTA. Valid values: `Unspecified`, `A55`, `Biodiesel`, `CompressedNaturalGas`, `Diesel`, `E85`, `Electricity`, `Ethanol`, `Gasohol`, `Gasoline`, `Hydrogen`, `LiquifiedNaturalGas`, `M85`, `Methanol`, `Propane`, `Other`
|
|
1768
|
+
|
|
1769
|
+
merchant_name : typing.Optional[str]
|
|
1770
|
+
Brand name of the fuel station the fuel was purchased at. For example: Shell, Bp, Exxon.
|
|
1771
|
+
|
|
1772
|
+
source : typing.Optional[str]
|
|
1773
|
+
The integration provider. For example: Customer, Shell Integration
|
|
1774
|
+
|
|
1775
|
+
vehicle_id : typing.Optional[str]
|
|
1776
|
+
Samsara ID of the vehicle that purchased the fuel.
|
|
1777
|
+
|
|
1778
|
+
request_options : typing.Optional[RequestOptions]
|
|
1779
|
+
Request-specific configuration.
|
|
1780
|
+
|
|
1781
|
+
Returns
|
|
1782
|
+
-------
|
|
1783
|
+
AsyncHttpResponse[FuelPurchasePostFuelPurchaseResponseBody]
|
|
1784
|
+
OK response.
|
|
1785
|
+
"""
|
|
1786
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
1787
|
+
"fuel-purchase",
|
|
1788
|
+
method="POST",
|
|
1789
|
+
json={
|
|
1790
|
+
"discount": convert_and_respect_annotation_metadata(
|
|
1791
|
+
object_=discount, annotation=PostFuelPurchaseRequestBodyDiscountRequestBody, direction="write"
|
|
1792
|
+
),
|
|
1793
|
+
"driverId": driver_id,
|
|
1794
|
+
"fuelGrade": fuel_grade,
|
|
1795
|
+
"fuelQuantityLiters": fuel_quantity_liters,
|
|
1796
|
+
"iftaFuelType": ifta_fuel_type,
|
|
1797
|
+
"merchantName": merchant_name,
|
|
1798
|
+
"source": source,
|
|
1799
|
+
"transactionLocation": transaction_location,
|
|
1800
|
+
"transactionPrice": convert_and_respect_annotation_metadata(
|
|
1801
|
+
object_=transaction_price, annotation=PostFuelPurchaseRequestBodyPriceRequestBody, direction="write"
|
|
1802
|
+
),
|
|
1803
|
+
"transactionReference": transaction_reference,
|
|
1804
|
+
"transactionTime": transaction_time,
|
|
1805
|
+
"vehicleId": vehicle_id,
|
|
1806
|
+
},
|
|
1807
|
+
headers={
|
|
1808
|
+
"content-type": "application/json",
|
|
1809
|
+
},
|
|
1810
|
+
request_options=request_options,
|
|
1811
|
+
omit=OMIT,
|
|
1812
|
+
)
|
|
1813
|
+
try:
|
|
1814
|
+
if 200 <= _response.status_code < 300:
|
|
1815
|
+
_data = typing.cast(
|
|
1816
|
+
FuelPurchasePostFuelPurchaseResponseBody,
|
|
1817
|
+
parse_obj_as(
|
|
1818
|
+
type_=FuelPurchasePostFuelPurchaseResponseBody, # type: ignore
|
|
1819
|
+
object_=_response.json(),
|
|
1820
|
+
),
|
|
1821
|
+
)
|
|
1822
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
1823
|
+
if _response.status_code == 401:
|
|
1824
|
+
raise UnauthorizedError(
|
|
1825
|
+
headers=dict(_response.headers),
|
|
1826
|
+
body=typing.cast(
|
|
1827
|
+
typing.Optional[typing.Any],
|
|
1828
|
+
parse_obj_as(
|
|
1829
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1830
|
+
object_=_response.json(),
|
|
1831
|
+
),
|
|
1832
|
+
),
|
|
1833
|
+
)
|
|
1834
|
+
if _response.status_code == 404:
|
|
1835
|
+
raise NotFoundError(
|
|
1836
|
+
headers=dict(_response.headers),
|
|
1837
|
+
body=typing.cast(
|
|
1838
|
+
typing.Optional[typing.Any],
|
|
1839
|
+
parse_obj_as(
|
|
1840
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1841
|
+
object_=_response.json(),
|
|
1842
|
+
),
|
|
1843
|
+
),
|
|
1844
|
+
)
|
|
1845
|
+
if _response.status_code == 405:
|
|
1846
|
+
raise MethodNotAllowedError(
|
|
1847
|
+
headers=dict(_response.headers),
|
|
1848
|
+
body=typing.cast(
|
|
1849
|
+
typing.Optional[typing.Any],
|
|
1850
|
+
parse_obj_as(
|
|
1851
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1852
|
+
object_=_response.json(),
|
|
1853
|
+
),
|
|
1854
|
+
),
|
|
1855
|
+
)
|
|
1856
|
+
if _response.status_code == 429:
|
|
1857
|
+
raise TooManyRequestsError(
|
|
1858
|
+
headers=dict(_response.headers),
|
|
1859
|
+
body=typing.cast(
|
|
1860
|
+
typing.Optional[typing.Any],
|
|
1861
|
+
parse_obj_as(
|
|
1862
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1863
|
+
object_=_response.json(),
|
|
1864
|
+
),
|
|
1865
|
+
),
|
|
1866
|
+
)
|
|
1867
|
+
if _response.status_code == 500:
|
|
1868
|
+
raise InternalServerError(
|
|
1869
|
+
headers=dict(_response.headers),
|
|
1870
|
+
body=typing.cast(
|
|
1871
|
+
typing.Optional[typing.Any],
|
|
1872
|
+
parse_obj_as(
|
|
1873
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1874
|
+
object_=_response.json(),
|
|
1875
|
+
),
|
|
1876
|
+
),
|
|
1877
|
+
)
|
|
1878
|
+
if _response.status_code == 501:
|
|
1879
|
+
raise NotImplementedError(
|
|
1880
|
+
headers=dict(_response.headers),
|
|
1881
|
+
body=typing.cast(
|
|
1882
|
+
typing.Optional[typing.Any],
|
|
1883
|
+
parse_obj_as(
|
|
1884
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1885
|
+
object_=_response.json(),
|
|
1886
|
+
),
|
|
1887
|
+
),
|
|
1888
|
+
)
|
|
1889
|
+
if _response.status_code == 502:
|
|
1890
|
+
raise BadGatewayError(
|
|
1891
|
+
headers=dict(_response.headers),
|
|
1892
|
+
body=typing.cast(
|
|
1893
|
+
typing.Optional[typing.Any],
|
|
1894
|
+
parse_obj_as(
|
|
1895
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1896
|
+
object_=_response.json(),
|
|
1897
|
+
),
|
|
1898
|
+
),
|
|
1899
|
+
)
|
|
1900
|
+
if _response.status_code == 503:
|
|
1901
|
+
raise ServiceUnavailableError(
|
|
1902
|
+
headers=dict(_response.headers),
|
|
1903
|
+
body=typing.cast(
|
|
1904
|
+
typing.Optional[typing.Any],
|
|
1905
|
+
parse_obj_as(
|
|
1906
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1907
|
+
object_=_response.json(),
|
|
1908
|
+
),
|
|
1909
|
+
),
|
|
1910
|
+
)
|
|
1911
|
+
if _response.status_code == 504:
|
|
1912
|
+
raise GatewayTimeoutError(
|
|
1913
|
+
headers=dict(_response.headers),
|
|
1914
|
+
body=typing.cast(
|
|
1915
|
+
typing.Optional[typing.Any],
|
|
1916
|
+
parse_obj_as(
|
|
1917
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1918
|
+
object_=_response.json(),
|
|
1919
|
+
),
|
|
1920
|
+
),
|
|
1921
|
+
)
|
|
1922
|
+
_response_json = _response.json()
|
|
1923
|
+
except JSONDecodeError:
|
|
1924
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
1925
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|