evcloud 0.1.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.
- evcloud/__init__.py +802 -0
- evcloud/_default_clients.py +30 -0
- evcloud/client.py +200 -0
- evcloud/core/__init__.py +67 -0
- evcloud/core/api_error.py +23 -0
- evcloud/core/client_wrapper.py +108 -0
- evcloud/core/datetime_utils.py +70 -0
- evcloud/core/file.py +67 -0
- evcloud/core/force_multipart.py +18 -0
- evcloud/core/http_client.py +840 -0
- evcloud/core/http_response.py +59 -0
- evcloud/core/http_sse/__init__.py +9 -0
- evcloud/core/http_sse/_api.py +112 -0
- evcloud/core/http_sse/_decoders.py +61 -0
- evcloud/core/http_sse/_exceptions.py +7 -0
- evcloud/core/http_sse/_models.py +17 -0
- evcloud/core/jsonable_encoder.py +120 -0
- evcloud/core/logging.py +107 -0
- evcloud/core/pagination.py +82 -0
- evcloud/core/parse_error.py +36 -0
- evcloud/core/pydantic_utilities.py +634 -0
- evcloud/core/query_encoder.py +58 -0
- evcloud/core/remove_none_from_dict.py +11 -0
- evcloud/core/request_options.py +35 -0
- evcloud/core/serialization.py +276 -0
- evcloud/cpo/__init__.py +31 -0
- evcloud/cpo/cdrs/__init__.py +4 -0
- evcloud/cpo/cdrs/client.py +311 -0
- evcloud/cpo/cdrs/raw_client.py +592 -0
- evcloud/cpo/charge_points/__init__.py +7 -0
- evcloud/cpo/charge_points/client.py +1436 -0
- evcloud/cpo/charge_points/raw_client.py +2809 -0
- evcloud/cpo/charge_points/types/__init__.py +7 -0
- evcloud/cpo/charge_points/types/list_charge_points_request_ocpp_version.py +5 -0
- evcloud/cpo/client.py +62 -0
- evcloud/cpo/connectors/__init__.py +4 -0
- evcloud/cpo/connectors/client.py +698 -0
- evcloud/cpo/connectors/raw_client.py +1457 -0
- evcloud/cpo/evses/__init__.py +4 -0
- evcloud/cpo/evses/client.py +691 -0
- evcloud/cpo/evses/raw_client.py +1457 -0
- evcloud/cpo/health/__init__.py +4 -0
- evcloud/cpo/health/client.py +100 -0
- evcloud/cpo/health/raw_client.py +192 -0
- evcloud/cpo/locations/__init__.py +4 -0
- evcloud/cpo/locations/client.py +1021 -0
- evcloud/cpo/locations/raw_client.py +1887 -0
- evcloud/cpo/raw_client.py +13 -0
- evcloud/cpo/sessions/__init__.py +7 -0
- evcloud/cpo/sessions/client.py +430 -0
- evcloud/cpo/sessions/raw_client.py +889 -0
- evcloud/cpo/sessions/types/__init__.py +8 -0
- evcloud/cpo/sessions/types/list_sessions_request_billing_state.py +5 -0
- evcloud/cpo/sessions/types/list_sessions_request_status.py +7 -0
- evcloud/cpo/tariffs/__init__.py +17 -0
- evcloud/cpo/tariffs/client.py +1232 -0
- evcloud/cpo/tariffs/raw_client.py +2526 -0
- evcloud/cpo/tariffs/types/__init__.py +15 -0
- evcloud/cpo/tariffs/types/list_tariffs_request_type.py +7 -0
- evcloud/cpo/tariffs/types/tariff_create_ocpi_version.py +5 -0
- evcloud/cpo/tariffs/types/tariff_create_preauthorize_amount.py +5 -0
- evcloud/cpo/tariffs/types/tariff_patch_preauthorize_amount.py +5 -0
- evcloud/emsp/__init__.py +55 -0
- evcloud/emsp/cdrs/__init__.py +4 -0
- evcloud/emsp/cdrs/client.py +300 -0
- evcloud/emsp/cdrs/raw_client.py +610 -0
- evcloud/emsp/chargers/__init__.py +7 -0
- evcloud/emsp/chargers/client.py +167 -0
- evcloud/emsp/chargers/raw_client.py +331 -0
- evcloud/emsp/chargers/types/__init__.py +11 -0
- evcloud/emsp/chargers/types/resolve_chargers_response.py +53 -0
- evcloud/emsp/client.py +77 -0
- evcloud/emsp/commands/__init__.py +7 -0
- evcloud/emsp/commands/client.py +516 -0
- evcloud/emsp/commands/raw_client.py +979 -0
- evcloud/emsp/commands/types/__init__.py +7 -0
- evcloud/emsp/commands/types/send_commands_request_command.py +7 -0
- evcloud/emsp/emp_identities/__init__.py +4 -0
- evcloud/emsp/emp_identities/client.py +548 -0
- evcloud/emsp/emp_identities/raw_client.py +1277 -0
- evcloud/emsp/evses/__init__.py +4 -0
- evcloud/emsp/evses/client.py +154 -0
- evcloud/emsp/evses/raw_client.py +288 -0
- evcloud/emsp/health/__init__.py +4 -0
- evcloud/emsp/health/client.py +100 -0
- evcloud/emsp/health/raw_client.py +192 -0
- evcloud/emsp/locations/__init__.py +4 -0
- evcloud/emsp/locations/client.py +1386 -0
- evcloud/emsp/locations/raw_client.py +2903 -0
- evcloud/emsp/networks/__init__.py +7 -0
- evcloud/emsp/networks/client.py +1615 -0
- evcloud/emsp/networks/raw_client.py +3725 -0
- evcloud/emsp/networks/types/__init__.py +9 -0
- evcloud/emsp/networks/types/list_networks_request_network_type.py +5 -0
- evcloud/emsp/networks/types/list_rules_networks_request_validity.py +5 -0
- evcloud/emsp/networks/types/network_rule_create_request_rule_type.py +5 -0
- evcloud/emsp/raw_client.py +13 -0
- evcloud/emsp/sessions/__init__.py +4 -0
- evcloud/emsp/sessions/client.py +300 -0
- evcloud/emsp/sessions/raw_client.py +610 -0
- evcloud/emsp/tariffs/__init__.py +7 -0
- evcloud/emsp/tariffs/client.py +421 -0
- evcloud/emsp/tariffs/raw_client.py +883 -0
- evcloud/emsp/tariffs/types/__init__.py +8 -0
- evcloud/emsp/tariffs/types/estimate_request_kwh.py +5 -0
- evcloud/emsp/tariffs/types/estimate_request_minutes.py +5 -0
- evcloud/emsp/tenant/__init__.py +4 -0
- evcloud/emsp/tenant/client.py +328 -0
- evcloud/emsp/tenant/raw_client.py +869 -0
- evcloud/emsp/token_groups/__init__.py +7 -0
- evcloud/emsp/token_groups/client.py +1256 -0
- evcloud/emsp/token_groups/raw_client.py +3288 -0
- evcloud/emsp/token_groups/types/__init__.py +7 -0
- evcloud/emsp/token_groups/types/remove_token_token_groups_request_type.py +5 -0
- evcloud/emsp/tokens/__init__.py +7 -0
- evcloud/emsp/tokens/client.py +1298 -0
- evcloud/emsp/tokens/raw_client.py +2947 -0
- evcloud/emsp/tokens/types/__init__.py +10 -0
- evcloud/emsp/tokens/types/list_tokens_request_status.py +7 -0
- evcloud/emsp/tokens/types/list_tokens_request_type.py +5 -0
- evcloud/emsp/tokens/types/token_update_default_profile_type.py +5 -0
- evcloud/emsp/tokens/types/token_update_whitelist.py +5 -0
- evcloud/energy/__init__.py +8 -0
- evcloud/energy/client.py +47 -0
- evcloud/energy/control_requests/__init__.py +7 -0
- evcloud/energy/control_requests/client.py +399 -0
- evcloud/energy/control_requests/raw_client.py +835 -0
- evcloud/energy/control_requests/types/__init__.py +7 -0
- evcloud/energy/control_requests/types/list_control_requests_request_result.py +15 -0
- evcloud/energy/health/__init__.py +4 -0
- evcloud/energy/health/client.py +100 -0
- evcloud/energy/health/raw_client.py +192 -0
- evcloud/energy/power_measurements/__init__.py +4 -0
- evcloud/energy/power_measurements/client.py +254 -0
- evcloud/energy/power_measurements/raw_client.py +527 -0
- evcloud/energy/raw_client.py +13 -0
- evcloud/environment.py +7 -0
- evcloud/errors/__init__.py +25 -0
- evcloud/errors/bad_gateway_error.py +11 -0
- evcloud/errors/bad_request_error.py +11 -0
- evcloud/errors/conflict_error.py +11 -0
- evcloud/errors/forbidden_error.py +11 -0
- evcloud/errors/gateway_timeout_error.py +11 -0
- evcloud/errors/not_found_error.py +11 -0
- evcloud/errors/too_many_requests_error.py +11 -0
- evcloud/errors/unauthorized_error.py +11 -0
- evcloud/errors/unprocessable_entity_error.py +11 -0
- evcloud/health/__init__.py +4 -0
- evcloud/health/client.py +99 -0
- evcloud/health/raw_client.py +100 -0
- evcloud/ocpi/__init__.py +123 -0
- evcloud/ocpi/client.py +56 -0
- evcloud/ocpi/cpo_data/__init__.py +31 -0
- evcloud/ocpi/cpo_data/client.py +1553 -0
- evcloud/ocpi/cpo_data/raw_client.py +3119 -0
- evcloud/ocpi/cpo_data/types/__init__.py +29 -0
- evcloud/ocpi/cpo_data/types/cancel_reservation_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/create_cdr_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/delete_tariff_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/send_active_charging_profile_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/update_connector_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/update_evse_status_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/update_location_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/update_session_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/upsert_location_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/upsert_session_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/upsert_tariff_cpo_data_request_version.py +5 -0
- evcloud/ocpi/credentials/__init__.py +31 -0
- evcloud/ocpi/credentials/client.py +750 -0
- evcloud/ocpi/credentials/raw_client.py +1537 -0
- evcloud/ocpi/credentials/types/__init__.py +29 -0
- evcloud/ocpi/credentials/types/partner_versions_pull_request_partner_token_encoding.py +5 -0
- evcloud/ocpi/credentials/types/pull_versions_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/pull_versions_credentials_request_version.py +5 -0
- evcloud/ocpi/credentials/types/rotate_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/rotate_credentials_request_version.py +5 -0
- evcloud/ocpi/credentials/types/start_handshake_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/start_handshake_credentials_request_version.py +5 -0
- evcloud/ocpi/credentials/types/status_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/status_credentials_request_version.py +5 -0
- evcloud/ocpi/credentials/types/unregister_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/unregister_credentials_request_version.py +5 -0
- evcloud/ocpi/emsp/__init__.py +27 -0
- evcloud/ocpi/emsp/client.py +1142 -0
- evcloud/ocpi/emsp/raw_client.py +2209 -0
- evcloud/ocpi/emsp/types/__init__.py +25 -0
- evcloud/ocpi/emsp/types/charging_preferences_request_profile_type.py +5 -0
- evcloud/ocpi/emsp/types/clear_charging_profile_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/get_active_charging_profile_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/send_command_emsp_request_command.py +7 -0
- evcloud/ocpi/emsp/types/send_command_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/set_charging_preferences_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/set_charging_profile_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/update_token_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/upsert_token_emsp_request_version.py +5 -0
- evcloud/ocpi/invites/__init__.py +19 -0
- evcloud/ocpi/invites/client.py +385 -0
- evcloud/ocpi/invites/raw_client.py +887 -0
- evcloud/ocpi/invites/types/__init__.py +17 -0
- evcloud/ocpi/invites/types/partner_invite_create_request_gateway_role.py +5 -0
- evcloud/ocpi/invites/types/partner_invite_create_request_role.py +5 -0
- evcloud/ocpi/invites/types/partner_invite_create_request_version.py +5 -0
- evcloud/ocpi/invites/types/partner_invite_update_request_gateway_role.py +5 -0
- evcloud/ocpi/invites/types/partner_invite_update_request_version.py +5 -0
- evcloud/ocpi/partners/__init__.py +7 -0
- evcloud/ocpi/partners/client.py +581 -0
- evcloud/ocpi/partners/raw_client.py +1340 -0
- evcloud/ocpi/partners/types/__init__.py +8 -0
- evcloud/ocpi/partners/types/partner_register_request_ocpi_version.py +5 -0
- evcloud/ocpi/partners/types/partner_update_request_ocpi_version.py +5 -0
- evcloud/ocpi/raw_client.py +13 -0
- evcloud/ocpi/sync/__init__.py +33 -0
- evcloud/ocpi/sync/client.py +1701 -0
- evcloud/ocpi/sync/raw_client.py +3685 -0
- evcloud/ocpi/sync/types/__init__.py +31 -0
- evcloud/ocpi/sync/types/pull_cdrs_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_hub_client_info_as_cpo_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_hub_client_info_as_emsp_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_locations_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_sessions_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_tariffs_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_tokens_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_cdr_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_location_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_session_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_tariff_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_token_sync_request_version.py +5 -0
- evcloud/py.typed +0 -0
- evcloud/types/__init__.py +759 -0
- evcloud/types/access_mode.py +5 -0
- evcloud/types/asset_connector.py +26 -0
- evcloud/types/asset_updated_event.py +29 -0
- evcloud/types/availability_page.py +26 -0
- evcloud/types/batch_response.py +26 -0
- evcloud/types/batch_response_missing_item.py +7 -0
- evcloud/types/cdr_event.py +41 -0
- evcloud/types/cdr_out.py +75 -0
- evcloud/types/cdr_out_auth_method.py +7 -0
- evcloud/types/cdr_out_auth_method_zero.py +5 -0
- evcloud/types/cdr_out_origin.py +7 -0
- evcloud/types/cdr_out_origin_zero.py +5 -0
- evcloud/types/cdr_page.py +27 -0
- evcloud/types/cdr_write_response.py +26 -0
- evcloud/types/charge_point_created_out.py +74 -0
- evcloud/types/charge_point_created_out_access_mode.py +7 -0
- evcloud/types/charge_point_created_out_access_mode_zero.py +5 -0
- evcloud/types/charge_point_created_out_pricing.py +7 -0
- evcloud/types/charge_point_created_out_pricing_zero.py +5 -0
- evcloud/types/charge_point_created_out_site_type.py +7 -0
- evcloud/types/charge_point_created_out_site_type_zero.py +5 -0
- evcloud/types/charge_point_out.py +73 -0
- evcloud/types/charge_point_out_access_mode.py +7 -0
- evcloud/types/charge_point_out_access_mode_zero.py +5 -0
- evcloud/types/charge_point_out_pricing.py +7 -0
- evcloud/types/charge_point_out_pricing_zero.py +5 -0
- evcloud/types/charge_point_out_site_type.py +7 -0
- evcloud/types/charge_point_out_site_type_zero.py +5 -0
- evcloud/types/charge_point_page.py +27 -0
- evcloud/types/charging_preferences_response.py +28 -0
- evcloud/types/charging_preferences_response_result.py +10 -0
- evcloud/types/charging_profile.py +30 -0
- evcloud/types/charging_profile_charging_rate_unit.py +5 -0
- evcloud/types/charging_profile_period.py +31 -0
- evcloud/types/charging_profile_response.py +32 -0
- evcloud/types/cluster_page.py +26 -0
- evcloud/types/command_accepted.py +30 -0
- evcloud/types/command_accepted_route.py +53 -0
- evcloud/types/command_accepted_route_own.py +28 -0
- evcloud/types/command_accepted_route_own_ocpi_version.py +7 -0
- evcloud/types/command_accepted_route_own_ocpi_version_zero.py +5 -0
- evcloud/types/command_accepted_route_roaming.py +30 -0
- evcloud/types/command_accepted_route_roaming_ocpi_version.py +7 -0
- evcloud/types/command_accepted_route_roaming_ocpi_version_zero.py +5 -0
- evcloud/types/command_accepted_status.py +7 -0
- evcloud/types/command_accepted_status_zero.py +20 -0
- evcloud/types/command_page.py +26 -0
- evcloud/types/command_record.py +40 -0
- evcloud/types/command_record_command.py +7 -0
- evcloud/types/command_record_command_zero.py +7 -0
- evcloud/types/command_record_route.py +53 -0
- evcloud/types/command_record_route_own.py +28 -0
- evcloud/types/command_record_route_own_ocpi_version.py +7 -0
- evcloud/types/command_record_route_own_ocpi_version_zero.py +5 -0
- evcloud/types/command_record_route_roaming.py +30 -0
- evcloud/types/command_record_route_roaming_ocpi_version.py +7 -0
- evcloud/types/command_record_route_roaming_ocpi_version_zero.py +5 -0
- evcloud/types/command_record_status.py +7 -0
- evcloud/types/command_record_status_zero.py +20 -0
- evcloud/types/command_response_out.py +26 -0
- evcloud/types/command_response_out_result.py +7 -0
- evcloud/types/command_response_out_result_zero.py +7 -0
- evcloud/types/command_result_event.py +39 -0
- evcloud/types/command_result_event_module.py +5 -0
- evcloud/types/command_result_event_protocol.py +5 -0
- evcloud/types/command_result_event_status.py +5 -0
- evcloud/types/command_send_response.py +31 -0
- evcloud/types/command_token.py +36 -0
- evcloud/types/connector_format.py +5 -0
- evcloud/types/connector_page.py +27 -0
- evcloud/types/connector_status_event.py +29 -0
- evcloud/types/connector_write_response.py +27 -0
- evcloud/types/control_action.py +5 -0
- evcloud/types/control_request_page.py +27 -0
- evcloud/types/control_request_response.py +38 -0
- evcloud/types/control_request_response_action.py +7 -0
- evcloud/types/control_request_response_action_zero.py +7 -0
- evcloud/types/control_request_response_result.py +7 -0
- evcloud/types/control_request_response_result_zero.py +15 -0
- evcloud/types/control_request_response_unit.py +7 -0
- evcloud/types/control_request_response_unit_zero.py +5 -0
- evcloud/types/control_response_event.py +38 -0
- evcloud/types/control_response_event_action.py +5 -0
- evcloud/types/control_response_event_result.py +15 -0
- evcloud/types/control_response_event_unit.py +5 -0
- evcloud/types/cpo_connector_out.py +58 -0
- evcloud/types/cpo_connector_out_format.py +7 -0
- evcloud/types/cpo_connector_out_format_zero.py +5 -0
- evcloud/types/cpo_connector_out_ocpi_status.py +7 -0
- evcloud/types/cpo_connector_out_ocpi_status_zero.py +10 -0
- evcloud/types/cpo_connector_out_power_type.py +7 -0
- evcloud/types/cpo_connector_out_power_type_zero.py +7 -0
- evcloud/types/cpo_evse_out.py +61 -0
- evcloud/types/cpo_evse_out_origin.py +7 -0
- evcloud/types/cpo_evse_out_origin_zero.py +5 -0
- evcloud/types/cpo_evse_out_status.py +7 -0
- evcloud/types/cpo_evse_out_status_zero.py +10 -0
- evcloud/types/credentials_handshake_request.py +44 -0
- evcloud/types/credentials_handshake_request_partner_token_encoding.py +5 -0
- evcloud/types/credentials_handshake_response.py +32 -0
- evcloud/types/credentials_handshake_response_action.py +7 -0
- evcloud/types/credentials_handshake_response_version.py +5 -0
- evcloud/types/deliver_event_response.py +23 -0
- evcloud/types/delivery_drift_event.py +30 -0
- evcloud/types/display_text.py +24 -0
- evcloud/types/effective_cpo.py +27 -0
- evcloud/types/effective_cpo_source.py +7 -0
- evcloud/types/effective_cpo_source_zero.py +5 -0
- evcloud/types/effective_view_response.py +29 -0
- evcloud/types/emp_identity_out.py +35 -0
- evcloud/types/emp_identity_out_status.py +7 -0
- evcloud/types/emp_identity_out_status_zero.py +5 -0
- evcloud/types/emp_identity_page.py +26 -0
- evcloud/types/emsp_cdr_out.py +41 -0
- evcloud/types/emsp_cdr_out_source.py +7 -0
- evcloud/types/emsp_cdr_out_source_zero.py +5 -0
- evcloud/types/emsp_cdr_page.py +26 -0
- evcloud/types/emsp_connector_out.py +30 -0
- evcloud/types/emsp_evse_out.py +32 -0
- evcloud/types/emsp_gateway_schema_commands_location_key.py +25 -0
- evcloud/types/emsp_gateway_schema_location_lookup_location_key.py +25 -0
- evcloud/types/emsp_gateway_schema_locations_location_out.py +47 -0
- evcloud/types/emsp_gateway_schema_locations_location_page.py +26 -0
- evcloud/types/emsp_gateway_schema_networks_location_out.py +37 -0
- evcloud/types/emsp_gateway_schema_networks_location_page.py +26 -0
- evcloud/types/emsp_session_out.py +41 -0
- evcloud/types/emsp_session_out_source.py +7 -0
- evcloud/types/emsp_session_out_source_zero.py +5 -0
- evcloud/types/emsp_session_page.py +26 -0
- evcloud/types/emsp_tariff_page.py +26 -0
- evcloud/types/energy_contract.py +24 -0
- evcloud/types/estimate_line.py +27 -0
- evcloud/types/estimate_line_type.py +7 -0
- evcloud/types/estimate_line_type_zero.py +5 -0
- evcloud/types/estimate_response.py +30 -0
- evcloud/types/event_type_list.py +24 -0
- evcloud/types/event_type_response.py +27 -0
- evcloud/types/event_type_response_type.py +7 -0
- evcloud/types/event_type_response_type_zero.py +27 -0
- evcloud/types/event_type_version.py +24 -0
- evcloud/types/evse_connector_status.py +26 -0
- evcloud/types/evse_page.py +27 -0
- evcloud/types/evse_parking.py +25 -0
- evcloud/types/evse_parking_evse_position.py +7 -0
- evcloud/types/evse_parking_evse_position_zero.py +5 -0
- evcloud/types/evse_status_event.py +31 -0
- evcloud/types/evse_status_out.py +32 -0
- evcloud/types/evse_status_write_response.py +28 -0
- evcloud/types/facility_count.py +24 -0
- evcloud/types/facility_page.py +26 -0
- evcloud/types/health_ok.py +24 -0
- evcloud/types/health_ok_status.py +7 -0
- evcloud/types/health_ok_status_zero.py +5 -0
- evcloud/types/http_error_response.py +29 -0
- evcloud/types/http_validation_error.py +24 -0
- evcloud/types/limit_unit.py +5 -0
- evcloud/types/location_availability.py +28 -0
- evcloud/types/location_availability_status.py +7 -0
- evcloud/types/location_availability_status_zero.py +7 -0
- evcloud/types/location_base.py +53 -0
- evcloud/types/location_base_parking_type.py +7 -0
- evcloud/types/location_base_parking_type_zero.py +8 -0
- evcloud/types/location_cluster.py +26 -0
- evcloud/types/location_detail.py +51 -0
- evcloud/types/location_key_input.py +25 -0
- evcloud/types/location_list.py +24 -0
- evcloud/types/location_out.py +79 -0
- evcloud/types/location_out_access_mode.py +7 -0
- evcloud/types/location_out_access_mode_zero.py +5 -0
- evcloud/types/location_out_ocpi_version.py +7 -0
- evcloud/types/location_out_ocpi_version_zero.py +5 -0
- evcloud/types/location_out_origin.py +7 -0
- evcloud/types/location_out_origin_zero.py +5 -0
- evcloud/types/location_out_parking_type.py +7 -0
- evcloud/types/location_out_parking_type_zero.py +8 -0
- evcloud/types/location_out_role.py +7 -0
- evcloud/types/location_out_role_zero.py +5 -0
- evcloud/types/location_out_site_type.py +7 -0
- evcloud/types/location_out_site_type_zero.py +5 -0
- evcloud/types/location_page.py +27 -0
- evcloud/types/location_summary.py +43 -0
- evcloud/types/location_updated_event.py +30 -0
- evcloud/types/location_write_response.py +26 -0
- evcloud/types/map_cluster.py +28 -0
- evcloud/types/map_page.py +29 -0
- evcloud/types/network_consumer.py +25 -0
- evcloud/types/network_consumer_page.py +26 -0
- evcloud/types/network_detail_response.py +49 -0
- evcloud/types/network_detail_response_network_type.py +7 -0
- evcloud/types/network_detail_response_network_type_zero.py +5 -0
- evcloud/types/network_detail_response_publish_state.py +7 -0
- evcloud/types/network_detail_response_publish_state_zero.py +7 -0
- evcloud/types/network_page.py +26 -0
- evcloud/types/network_priority_order.py +23 -0
- evcloud/types/network_response.py +46 -0
- evcloud/types/network_response_network_type.py +7 -0
- evcloud/types/network_response_network_type_zero.py +5 -0
- evcloud/types/network_response_publish_state.py +7 -0
- evcloud/types/network_response_publish_state_zero.py +5 -0
- evcloud/types/network_rule_page.py +26 -0
- evcloud/types/network_rule_response.py +33 -0
- evcloud/types/network_rule_response_rule_type.py +7 -0
- evcloud/types/network_rule_response_rule_type_zero.py +5 -0
- evcloud/types/ocpi_business_details.py +26 -0
- evcloud/types/ocpi_business_details_input.py +26 -0
- evcloud/types/ocpi_cdr_dimension.py +24 -0
- evcloud/types/ocpi_cdr_location.py +30 -0
- evcloud/types/ocpi_cdr_token.py +30 -0
- evcloud/types/ocpi_charging_period.py +27 -0
- evcloud/types/ocpi_display_text.py +24 -0
- evcloud/types/ocpi_energy_mix.py +29 -0
- evcloud/types/ocpi_energy_mix_input.py +29 -0
- evcloud/types/ocpi_energy_source.py +24 -0
- evcloud/types/ocpi_energy_source_input.py +24 -0
- evcloud/types/ocpi_environmental_impact.py +24 -0
- evcloud/types/ocpi_evse_parking.py +24 -0
- evcloud/types/ocpi_exceptional_period.py +25 -0
- evcloud/types/ocpi_geo_location.py +24 -0
- evcloud/types/ocpi_geo_location_in.py +24 -0
- evcloud/types/ocpi_image.py +28 -0
- evcloud/types/ocpi_image_input.py +28 -0
- evcloud/types/ocpi_opening_times.py +28 -0
- evcloud/types/ocpi_opening_times_input.py +28 -0
- evcloud/types/ocpi_parking_place.py +44 -0
- evcloud/types/ocpi_parking_place_input.py +44 -0
- evcloud/types/ocpi_price_component_input.py +28 -0
- evcloud/types/ocpi_price_component_input_price.py +5 -0
- evcloud/types/ocpi_price_component_input_vat.py +5 -0
- evcloud/types/ocpi_price_component_output.py +26 -0
- evcloud/types/ocpi_price_input.py +26 -0
- evcloud/types/ocpi_price_input_excl_vat.py +5 -0
- evcloud/types/ocpi_price_input_incl_vat.py +5 -0
- evcloud/types/ocpi_price_output.py +24 -0
- evcloud/types/ocpi_publish_token.py +27 -0
- evcloud/types/ocpi_regular_hours.py +25 -0
- evcloud/types/ocpi_regular_hours_input.py +25 -0
- evcloud/types/ocpi_related_location.py +26 -0
- evcloud/types/ocpi_signed_data.py +28 -0
- evcloud/types/ocpi_signed_value.py +25 -0
- evcloud/types/ocpi_status_schedule.py +26 -0
- evcloud/types/ocpi_tariff_element_input.py +26 -0
- evcloud/types/ocpi_tariff_element_output.py +26 -0
- evcloud/types/ocpi_tariff_restrictions_input.py +33 -0
- evcloud/types/ocpi_tariff_restrictions_input_max_kwh.py +5 -0
- evcloud/types/ocpi_tariff_restrictions_input_min_kwh.py +5 -0
- evcloud/types/ocpi_tariff_restrictions_output.py +31 -0
- evcloud/types/ocpi_tariff_snapshot.py +26 -0
- evcloud/types/ocpp_version.py +5 -0
- evcloud/types/page_info.py +24 -0
- evcloud/types/parking.py +45 -0
- evcloud/types/parking_direction.py +7 -0
- evcloud/types/parking_direction_zero.py +5 -0
- evcloud/types/parking_type.py +8 -0
- evcloud/types/parking_vehicle_types_item.py +7 -0
- evcloud/types/parking_vehicle_types_item_zero.py +18 -0
- evcloud/types/partner_invite_response.py +47 -0
- evcloud/types/partner_invite_response_action.py +5 -0
- evcloud/types/partner_invite_response_role.py +5 -0
- evcloud/types/partner_invite_response_version.py +5 -0
- evcloud/types/partner_invite_revoke_response.py +31 -0
- evcloud/types/partner_invite_revoke_response_role.py +5 -0
- evcloud/types/partner_response.py +41 -0
- evcloud/types/partner_response_ocpi_version.py +5 -0
- evcloud/types/partner_token_updated_event.py +35 -0
- evcloud/types/partner_versions_pull_response.py +29 -0
- evcloud/types/partner_versions_pull_response_code.py +8 -0
- evcloud/types/partner_versions_pull_response_version.py +5 -0
- evcloud/types/power_measurement.py +30 -0
- evcloud/types/power_measurement_event.py +30 -0
- evcloud/types/power_measurement_list.py +24 -0
- evcloud/types/power_type.py +5 -0
- evcloud/types/price_component.py +26 -0
- evcloud/types/price_limit.py +24 -0
- evcloud/types/pricing_mode.py +5 -0
- evcloud/types/queue_health.py +34 -0
- evcloud/types/reservation_cancel_response.py +25 -0
- evcloud/types/resolve_chargers_response_own.py +28 -0
- evcloud/types/resolve_chargers_response_own_ocpi_version.py +7 -0
- evcloud/types/resolve_chargers_response_own_ocpi_version_zero.py +5 -0
- evcloud/types/resolve_chargers_response_roaming.py +30 -0
- evcloud/types/resolve_chargers_response_roaming_ocpi_version.py +7 -0
- evcloud/types/resolve_chargers_response_roaming_ocpi_version_zero.py +5 -0
- evcloud/types/session_event.py +39 -0
- evcloud/types/session_out.py +60 -0
- evcloud/types/session_out_auth_method.py +7 -0
- evcloud/types/session_out_auth_method_zero.py +5 -0
- evcloud/types/session_out_billing_state.py +7 -0
- evcloud/types/session_out_billing_state_zero.py +5 -0
- evcloud/types/session_out_origin.py +7 -0
- evcloud/types/session_out_origin_zero.py +5 -0
- evcloud/types/session_out_status.py +7 -0
- evcloud/types/session_out_status_zero.py +7 -0
- evcloud/types/session_page.py +27 -0
- evcloud/types/session_write_response.py +27 -0
- evcloud/types/sharing_slot.py +25 -0
- evcloud/types/sharing_slot_input.py +25 -0
- evcloud/types/site_type.py +5 -0
- evcloud/types/sync_patch_request.py +26 -0
- evcloud/types/sync_pull_response.py +31 -0
- evcloud/types/sync_push_response.py +31 -0
- evcloud/types/sync_push_response_status.py +5 -0
- evcloud/types/tariff.py +42 -0
- evcloud/types/tariff_assignment_out.py +32 -0
- evcloud/types/tariff_assignment_page.py +27 -0
- evcloud/types/tariff_delete_response.py +26 -0
- evcloud/types/tariff_display.py +27 -0
- evcloud/types/tariff_element.py +26 -0
- evcloud/types/tariff_out.py +57 -0
- evcloud/types/tariff_out_origin.py +7 -0
- evcloud/types/tariff_out_origin_zero.py +5 -0
- evcloud/types/tariff_out_tax_included.py +7 -0
- evcloud/types/tariff_out_tax_included_zero.py +5 -0
- evcloud/types/tariff_out_type.py +7 -0
- evcloud/types/tariff_out_type_zero.py +7 -0
- evcloud/types/tariff_page.py +27 -0
- evcloud/types/tariff_restrictions.py +36 -0
- evcloud/types/tariff_summary.py +29 -0
- evcloud/types/tariff_tax_included.py +7 -0
- evcloud/types/tariff_tax_included_zero.py +5 -0
- evcloud/types/tariff_type.py +7 -0
- evcloud/types/tariff_updated_event.py +29 -0
- evcloud/types/tariff_write_response.py +26 -0
- evcloud/types/tax_included.py +5 -0
- evcloud/types/tenant_profile_out.py +31 -0
- evcloud/types/token_bulk_out.py +26 -0
- evcloud/types/token_create.py +46 -0
- evcloud/types/token_create_default_profile_type.py +5 -0
- evcloud/types/token_create_ocpi_version.py +5 -0
- evcloud/types/token_create_type.py +5 -0
- evcloud/types/token_create_whitelist.py +5 -0
- evcloud/types/token_event_data.py +47 -0
- evcloud/types/token_event_data_status.py +7 -0
- evcloud/types/token_event_data_type.py +5 -0
- evcloud/types/token_event_data_whitelist.py +5 -0
- evcloud/types/token_event_out.py +32 -0
- evcloud/types/token_event_out_event.py +7 -0
- evcloud/types/token_event_out_event_zero.py +7 -0
- evcloud/types/token_event_page.py +26 -0
- evcloud/types/token_failure_item.py +24 -0
- evcloud/types/token_group_action_out.py +27 -0
- evcloud/types/token_group_failure.py +24 -0
- evcloud/types/token_group_member_out.py +26 -0
- evcloud/types/token_group_network_out.py +35 -0
- evcloud/types/token_group_network_page.py +26 -0
- evcloud/types/token_group_out.py +31 -0
- evcloud/types/token_group_page.py +26 -0
- evcloud/types/token_out.py +55 -0
- evcloud/types/token_out_status.py +7 -0
- evcloud/types/token_out_status_zero.py +7 -0
- evcloud/types/token_out_type.py +7 -0
- evcloud/types/token_out_type_zero.py +5 -0
- evcloud/types/token_out_whitelist.py +7 -0
- evcloud/types/token_out_whitelist_zero.py +5 -0
- evcloud/types/token_page.py +26 -0
- evcloud/types/token_reason.py +23 -0
- evcloud/types/token_ref.py +26 -0
- evcloud/types/token_ref_ocpi_version.py +5 -0
- evcloud/types/token_write_response.py +28 -0
- evcloud/types/validation_error.py +28 -0
- evcloud/types/validation_error_loc_item.py +5 -0
- evcloud/types/webhook_delivery_page.py +27 -0
- evcloud/types/webhook_delivery_response.py +35 -0
- evcloud/types/webhook_page.py +27 -0
- evcloud/types/webhook_response.py +42 -0
- evcloud/types/webhook_response_event.py +7 -0
- evcloud/types/webhook_response_event_zero.py +27 -0
- evcloud/types/webhook_response_status.py +7 -0
- evcloud/types/webhook_response_status_zero.py +5 -0
- evcloud/types/webhook_test_result.py +25 -0
- evcloud/types/webhook_with_secret_response.py +43 -0
- evcloud/types/webhook_with_secret_response_event.py +7 -0
- evcloud/types/webhook_with_secret_response_event_zero.py +27 -0
- evcloud/types/webhook_with_secret_response_status.py +7 -0
- evcloud/types/webhook_with_secret_response_status_zero.py +5 -0
- evcloud/version.py +3 -0
- evcloud/webhooks/__init__.py +28 -0
- evcloud/webhooks/client.py +53 -0
- evcloud/webhooks/deliveries/__init__.py +4 -0
- evcloud/webhooks/deliveries/client.py +141 -0
- evcloud/webhooks/deliveries/raw_client.py +268 -0
- evcloud/webhooks/endpoints/__init__.py +17 -0
- evcloud/webhooks/endpoints/client.py +642 -0
- evcloud/webhooks/endpoints/raw_client.py +1521 -0
- evcloud/webhooks/endpoints/types/__init__.py +15 -0
- evcloud/webhooks/endpoints/types/list_endpoints_request_event_types_item.py +27 -0
- evcloud/webhooks/endpoints/types/webhook_create_request_api_version.py +5 -0
- evcloud/webhooks/endpoints/types/webhook_create_request_event.py +27 -0
- evcloud/webhooks/endpoints/types/webhook_update_request_status.py +5 -0
- evcloud/webhooks/event_types/__init__.py +7 -0
- evcloud/webhooks/event_types/client.py +176 -0
- evcloud/webhooks/event_types/raw_client.py +418 -0
- evcloud/webhooks/event_types/types/__init__.py +7 -0
- evcloud/webhooks/event_types/types/get_event_types_request_type.py +27 -0
- evcloud/webhooks/events/__init__.py +7 -0
- evcloud/webhooks/events/client.py +207 -0
- evcloud/webhooks/events/raw_client.py +355 -0
- evcloud/webhooks/events/types/__init__.py +8 -0
- evcloud/webhooks/events/types/deliver_event_request_data.py +33 -0
- evcloud/webhooks/events/types/deliver_event_request_event.py +27 -0
- evcloud/webhooks/health/__init__.py +4 -0
- evcloud/webhooks/health/client.py +161 -0
- evcloud/webhooks/health/raw_client.py +380 -0
- evcloud/webhooks/raw_client.py +13 -0
- evcloud-0.1.0.dist-info/METADATA +257 -0
- evcloud-0.1.0.dist-info/RECORD +635 -0
- evcloud-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,1142 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
7
|
+
from ...core.request_options import RequestOptions
|
|
8
|
+
from ...types.charging_preferences_response import ChargingPreferencesResponse
|
|
9
|
+
from ...types.charging_profile import ChargingProfile
|
|
10
|
+
from ...types.charging_profile_response import ChargingProfileResponse
|
|
11
|
+
from ...types.command_send_response import CommandSendResponse
|
|
12
|
+
from ...types.token_write_response import TokenWriteResponse
|
|
13
|
+
from .raw_client import AsyncRawEmspClient, RawEmspClient
|
|
14
|
+
from .types.charging_preferences_request_profile_type import ChargingPreferencesRequestProfileType
|
|
15
|
+
from .types.clear_charging_profile_emsp_request_version import ClearChargingProfileEmspRequestVersion
|
|
16
|
+
from .types.get_active_charging_profile_emsp_request_version import GetActiveChargingProfileEmspRequestVersion
|
|
17
|
+
from .types.send_command_emsp_request_command import SendCommandEmspRequestCommand
|
|
18
|
+
from .types.send_command_emsp_request_version import SendCommandEmspRequestVersion
|
|
19
|
+
from .types.set_charging_preferences_emsp_request_version import SetChargingPreferencesEmspRequestVersion
|
|
20
|
+
from .types.set_charging_profile_emsp_request_version import SetChargingProfileEmspRequestVersion
|
|
21
|
+
from .types.update_token_emsp_request_version import UpdateTokenEmspRequestVersion
|
|
22
|
+
from .types.upsert_token_emsp_request_version import UpsertTokenEmspRequestVersion
|
|
23
|
+
|
|
24
|
+
# this is used as the default value for optional parameters
|
|
25
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class EmspClient:
|
|
29
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
30
|
+
self._raw_client = RawEmspClient(client_wrapper=client_wrapper)
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def with_raw_response(self) -> RawEmspClient:
|
|
34
|
+
"""
|
|
35
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
36
|
+
|
|
37
|
+
Returns
|
|
38
|
+
-------
|
|
39
|
+
RawEmspClient
|
|
40
|
+
"""
|
|
41
|
+
return self._raw_client
|
|
42
|
+
|
|
43
|
+
def upsert_token(
|
|
44
|
+
self,
|
|
45
|
+
version: UpsertTokenEmspRequestVersion,
|
|
46
|
+
*,
|
|
47
|
+
request: typing.Dict[str, typing.Any],
|
|
48
|
+
push_to_partner_id: typing.Optional[int] = None,
|
|
49
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
50
|
+
) -> TokenWriteResponse:
|
|
51
|
+
"""
|
|
52
|
+
Stores a full OCPI Token on our eMSP side, replacing any existing one with the same uid. Pass ``push_to_partner_id`` to also push it to that partner right away.
|
|
53
|
+
|
|
54
|
+
Parameters
|
|
55
|
+
----------
|
|
56
|
+
version : UpsertTokenEmspRequestVersion
|
|
57
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
58
|
+
|
|
59
|
+
request : typing.Dict[str, typing.Any]
|
|
60
|
+
|
|
61
|
+
push_to_partner_id : typing.Optional[int]
|
|
62
|
+
Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
|
|
63
|
+
|
|
64
|
+
request_options : typing.Optional[RequestOptions]
|
|
65
|
+
Request-specific configuration.
|
|
66
|
+
|
|
67
|
+
Returns
|
|
68
|
+
-------
|
|
69
|
+
TokenWriteResponse
|
|
70
|
+
Successful Response
|
|
71
|
+
|
|
72
|
+
Examples
|
|
73
|
+
--------
|
|
74
|
+
from evcloud import EvcloudClient
|
|
75
|
+
|
|
76
|
+
client = EvcloudClient(
|
|
77
|
+
token="YOUR_TOKEN",
|
|
78
|
+
)
|
|
79
|
+
client.ocpi.emsp.upsert_token(
|
|
80
|
+
version="221",
|
|
81
|
+
request={
|
|
82
|
+
"country_code": "DE",
|
|
83
|
+
"party_id": "EMS",
|
|
84
|
+
"uid": "04A2B3C4D5E6F7",
|
|
85
|
+
"type": "RFID",
|
|
86
|
+
"contract_id": "DE-EMS-C12345678-X",
|
|
87
|
+
"issuer": "Example eMSP GmbH",
|
|
88
|
+
"valid": True,
|
|
89
|
+
"whitelist": "ALLOWED",
|
|
90
|
+
"last_updated": "2026-09-30T10:00:00Z",
|
|
91
|
+
},
|
|
92
|
+
)
|
|
93
|
+
"""
|
|
94
|
+
_response = self._raw_client.upsert_token(
|
|
95
|
+
version, request=request, push_to_partner_id=push_to_partner_id, request_options=request_options
|
|
96
|
+
)
|
|
97
|
+
return _response.data
|
|
98
|
+
|
|
99
|
+
def update_token(
|
|
100
|
+
self,
|
|
101
|
+
version: UpdateTokenEmspRequestVersion,
|
|
102
|
+
token_uid: str,
|
|
103
|
+
*,
|
|
104
|
+
request: typing.Dict[str, typing.Any],
|
|
105
|
+
type: typing.Optional[str] = None,
|
|
106
|
+
push_to_partner_id: typing.Optional[int] = None,
|
|
107
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
108
|
+
) -> TokenWriteResponse:
|
|
109
|
+
"""
|
|
110
|
+
Applies a partial OCPI Token to a stored token, for example ``valid=false`` to block it; include ``last_updated``. Pass ``push_to_partner_id`` to also push it to that partner right away.
|
|
111
|
+
|
|
112
|
+
Parameters
|
|
113
|
+
----------
|
|
114
|
+
version : UpdateTokenEmspRequestVersion
|
|
115
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
116
|
+
|
|
117
|
+
token_uid : str
|
|
118
|
+
OCPI ``uid`` of the token.
|
|
119
|
+
|
|
120
|
+
request : typing.Dict[str, typing.Any]
|
|
121
|
+
|
|
122
|
+
type : typing.Optional[str]
|
|
123
|
+
Token type (e.g. ``RFID``, ``APP_USER``), used to find the token when the OCPI body does not carry ``type``.
|
|
124
|
+
|
|
125
|
+
push_to_partner_id : typing.Optional[int]
|
|
126
|
+
Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
|
|
127
|
+
|
|
128
|
+
request_options : typing.Optional[RequestOptions]
|
|
129
|
+
Request-specific configuration.
|
|
130
|
+
|
|
131
|
+
Returns
|
|
132
|
+
-------
|
|
133
|
+
TokenWriteResponse
|
|
134
|
+
Successful Response
|
|
135
|
+
|
|
136
|
+
Examples
|
|
137
|
+
--------
|
|
138
|
+
from evcloud import EvcloudClient
|
|
139
|
+
|
|
140
|
+
client = EvcloudClient(
|
|
141
|
+
token="YOUR_TOKEN",
|
|
142
|
+
)
|
|
143
|
+
client.ocpi.emsp.update_token(
|
|
144
|
+
version="221",
|
|
145
|
+
token_uid="04A2B3C4D5E6F7",
|
|
146
|
+
type="RFID",
|
|
147
|
+
request={"valid": False, "last_updated": "2026-09-30T10:00:00Z"},
|
|
148
|
+
)
|
|
149
|
+
"""
|
|
150
|
+
_response = self._raw_client.update_token(
|
|
151
|
+
version,
|
|
152
|
+
token_uid,
|
|
153
|
+
request=request,
|
|
154
|
+
type=type,
|
|
155
|
+
push_to_partner_id=push_to_partner_id,
|
|
156
|
+
request_options=request_options,
|
|
157
|
+
)
|
|
158
|
+
return _response.data
|
|
159
|
+
|
|
160
|
+
def send_command(
|
|
161
|
+
self,
|
|
162
|
+
version: SendCommandEmspRequestVersion,
|
|
163
|
+
command: SendCommandEmspRequestCommand,
|
|
164
|
+
*,
|
|
165
|
+
partner_id: int,
|
|
166
|
+
to_country_code: typing.Optional[str] = None,
|
|
167
|
+
to_party_id: typing.Optional[str] = None,
|
|
168
|
+
token: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
169
|
+
location_id: typing.Optional[str] = OMIT,
|
|
170
|
+
evse_uid: typing.Optional[str] = OMIT,
|
|
171
|
+
connector_id: typing.Optional[str] = OMIT,
|
|
172
|
+
authorization_reference: typing.Optional[str] = OMIT,
|
|
173
|
+
session_id: typing.Optional[str] = OMIT,
|
|
174
|
+
reservation_id: typing.Optional[str] = OMIT,
|
|
175
|
+
expiry_date: typing.Optional[dt.datetime] = OMIT,
|
|
176
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
177
|
+
) -> CommandSendResponse:
|
|
178
|
+
"""
|
|
179
|
+
Returns the CPO's immediate CommandResponse. The async CommandResult is delivered to the OCPI gateway's own callback; clients cannot set ``response_url``.
|
|
180
|
+
|
|
181
|
+
Parameters
|
|
182
|
+
----------
|
|
183
|
+
version : SendCommandEmspRequestVersion
|
|
184
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
185
|
+
|
|
186
|
+
command : SendCommandEmspRequestCommand
|
|
187
|
+
The OCPI command to send to the CPO.
|
|
188
|
+
|
|
189
|
+
partner_id : int
|
|
190
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
191
|
+
|
|
192
|
+
to_country_code : typing.Optional[str]
|
|
193
|
+
Partner is a Hub: country code of the CPO behind it (OCPI-to-country-code). Set together with ``to_party_id``; through a Hub the request is refused (400) when neither is set and the target is not cached.
|
|
194
|
+
|
|
195
|
+
to_party_id : typing.Optional[str]
|
|
196
|
+
Partner is a Hub: party id of the CPO behind it (OCPI-to-party-id). Set together with ``to_country_code``.
|
|
197
|
+
|
|
198
|
+
token : typing.Optional[typing.Dict[str, typing.Any]]
|
|
199
|
+
OCPI Token for the path version (validated by the gateway).
|
|
200
|
+
|
|
201
|
+
location_id : typing.Optional[str]
|
|
202
|
+
|
|
203
|
+
evse_uid : typing.Optional[str]
|
|
204
|
+
|
|
205
|
+
connector_id : typing.Optional[str]
|
|
206
|
+
|
|
207
|
+
authorization_reference : typing.Optional[str]
|
|
208
|
+
|
|
209
|
+
session_id : typing.Optional[str]
|
|
210
|
+
|
|
211
|
+
reservation_id : typing.Optional[str]
|
|
212
|
+
|
|
213
|
+
expiry_date : typing.Optional[dt.datetime]
|
|
214
|
+
|
|
215
|
+
request_options : typing.Optional[RequestOptions]
|
|
216
|
+
Request-specific configuration.
|
|
217
|
+
|
|
218
|
+
Returns
|
|
219
|
+
-------
|
|
220
|
+
CommandSendResponse
|
|
221
|
+
Successful Response
|
|
222
|
+
|
|
223
|
+
Examples
|
|
224
|
+
--------
|
|
225
|
+
from evcloud import EvcloudClient
|
|
226
|
+
|
|
227
|
+
client = EvcloudClient(
|
|
228
|
+
token="YOUR_TOKEN",
|
|
229
|
+
)
|
|
230
|
+
client.ocpi.emsp.send_command(
|
|
231
|
+
version="221",
|
|
232
|
+
command="START_SESSION",
|
|
233
|
+
partner_id=7,
|
|
234
|
+
token={
|
|
235
|
+
"country_code": "DE",
|
|
236
|
+
"party_id": "EMS",
|
|
237
|
+
"uid": "04A2B3C4D5E6F7",
|
|
238
|
+
"type": "RFID",
|
|
239
|
+
"contract_id": "DE-EMS-C12345678-X",
|
|
240
|
+
"issuer": "Example eMSP GmbH",
|
|
241
|
+
"valid": True,
|
|
242
|
+
"whitelist": "ALLOWED",
|
|
243
|
+
"last_updated": "2026-09-30T10:00:00Z",
|
|
244
|
+
},
|
|
245
|
+
location_id="LOC-AMS-1",
|
|
246
|
+
evse_uid="EVSE-AMS-1-1",
|
|
247
|
+
)
|
|
248
|
+
"""
|
|
249
|
+
_response = self._raw_client.send_command(
|
|
250
|
+
version,
|
|
251
|
+
command,
|
|
252
|
+
partner_id=partner_id,
|
|
253
|
+
to_country_code=to_country_code,
|
|
254
|
+
to_party_id=to_party_id,
|
|
255
|
+
token=token,
|
|
256
|
+
location_id=location_id,
|
|
257
|
+
evse_uid=evse_uid,
|
|
258
|
+
connector_id=connector_id,
|
|
259
|
+
authorization_reference=authorization_reference,
|
|
260
|
+
session_id=session_id,
|
|
261
|
+
reservation_id=reservation_id,
|
|
262
|
+
expiry_date=expiry_date,
|
|
263
|
+
request_options=request_options,
|
|
264
|
+
)
|
|
265
|
+
return _response.data
|
|
266
|
+
|
|
267
|
+
def set_charging_preferences(
|
|
268
|
+
self,
|
|
269
|
+
version: SetChargingPreferencesEmspRequestVersion,
|
|
270
|
+
session_id: str,
|
|
271
|
+
*,
|
|
272
|
+
partner_id: int,
|
|
273
|
+
profile_type: ChargingPreferencesRequestProfileType,
|
|
274
|
+
to_country_code: typing.Optional[str] = None,
|
|
275
|
+
to_party_id: typing.Optional[str] = None,
|
|
276
|
+
departure_time: typing.Optional[dt.datetime] = OMIT,
|
|
277
|
+
energy_need: typing.Optional[float] = OMIT,
|
|
278
|
+
discharge_allowed: typing.Optional[bool] = OMIT,
|
|
279
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
280
|
+
) -> ChargingPreferencesResponse:
|
|
281
|
+
"""
|
|
282
|
+
Sends the CPO charging preferences (profile type, departure time, energy need) for a session it runs. OCPI 2.2.1 and 2.3.0 only.
|
|
283
|
+
|
|
284
|
+
Parameters
|
|
285
|
+
----------
|
|
286
|
+
version : SetChargingPreferencesEmspRequestVersion
|
|
287
|
+
OCPI version: ``221`` (2.2.1) or ``230`` (2.3.0). OCPI 2.1.1 has no charging profiles or charging preferences.
|
|
288
|
+
|
|
289
|
+
session_id : str
|
|
290
|
+
OCPI ``id`` of the charging session.
|
|
291
|
+
|
|
292
|
+
partner_id : int
|
|
293
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
294
|
+
|
|
295
|
+
profile_type : ChargingPreferencesRequestProfileType
|
|
296
|
+
|
|
297
|
+
to_country_code : typing.Optional[str]
|
|
298
|
+
Partner is a Hub: country code of the CPO behind it (OCPI-to-country-code). Set together with ``to_party_id``; through a Hub the request is refused (400) when neither is set and the target is not cached.
|
|
299
|
+
|
|
300
|
+
to_party_id : typing.Optional[str]
|
|
301
|
+
Partner is a Hub: party id of the CPO behind it (OCPI-to-party-id). Set together with ``to_country_code``.
|
|
302
|
+
|
|
303
|
+
departure_time : typing.Optional[dt.datetime]
|
|
304
|
+
|
|
305
|
+
energy_need : typing.Optional[float]
|
|
306
|
+
kWh.
|
|
307
|
+
|
|
308
|
+
discharge_allowed : typing.Optional[bool]
|
|
309
|
+
|
|
310
|
+
request_options : typing.Optional[RequestOptions]
|
|
311
|
+
Request-specific configuration.
|
|
312
|
+
|
|
313
|
+
Returns
|
|
314
|
+
-------
|
|
315
|
+
ChargingPreferencesResponse
|
|
316
|
+
Successful Response
|
|
317
|
+
|
|
318
|
+
Examples
|
|
319
|
+
--------
|
|
320
|
+
import datetime
|
|
321
|
+
|
|
322
|
+
from evcloud import EvcloudClient
|
|
323
|
+
|
|
324
|
+
client = EvcloudClient(
|
|
325
|
+
token="YOUR_TOKEN",
|
|
326
|
+
)
|
|
327
|
+
client.ocpi.emsp.set_charging_preferences(
|
|
328
|
+
version="221",
|
|
329
|
+
session_id="SES-20260930-0001",
|
|
330
|
+
partner_id=7,
|
|
331
|
+
profile_type="CHEAP",
|
|
332
|
+
departure_time=datetime.datetime.fromisoformat(
|
|
333
|
+
"2026-10-01 07:00:00+00:00",
|
|
334
|
+
),
|
|
335
|
+
energy_need=30.0,
|
|
336
|
+
)
|
|
337
|
+
"""
|
|
338
|
+
_response = self._raw_client.set_charging_preferences(
|
|
339
|
+
version,
|
|
340
|
+
session_id,
|
|
341
|
+
partner_id=partner_id,
|
|
342
|
+
profile_type=profile_type,
|
|
343
|
+
to_country_code=to_country_code,
|
|
344
|
+
to_party_id=to_party_id,
|
|
345
|
+
departure_time=departure_time,
|
|
346
|
+
energy_need=energy_need,
|
|
347
|
+
discharge_allowed=discharge_allowed,
|
|
348
|
+
request_options=request_options,
|
|
349
|
+
)
|
|
350
|
+
return _response.data
|
|
351
|
+
|
|
352
|
+
def get_active_charging_profile(
|
|
353
|
+
self,
|
|
354
|
+
version: GetActiveChargingProfileEmspRequestVersion,
|
|
355
|
+
session_id: str,
|
|
356
|
+
*,
|
|
357
|
+
partner_id: int,
|
|
358
|
+
duration: int,
|
|
359
|
+
to_country_code: typing.Optional[str] = None,
|
|
360
|
+
to_party_id: typing.Optional[str] = None,
|
|
361
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
362
|
+
) -> ChargingProfileResponse:
|
|
363
|
+
"""
|
|
364
|
+
Asks the CPO for the charging profile active on a session it runs. The result arrives asynchronously. OCPI 2.2.1 and 2.3.0 only.
|
|
365
|
+
|
|
366
|
+
Parameters
|
|
367
|
+
----------
|
|
368
|
+
version : GetActiveChargingProfileEmspRequestVersion
|
|
369
|
+
OCPI version: ``221`` (2.2.1) or ``230`` (2.3.0). OCPI 2.1.1 has no charging profiles or charging preferences.
|
|
370
|
+
|
|
371
|
+
session_id : str
|
|
372
|
+
OCPI ``id`` of the charging session.
|
|
373
|
+
|
|
374
|
+
partner_id : int
|
|
375
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
376
|
+
|
|
377
|
+
duration : int
|
|
378
|
+
Schedule length in seconds.
|
|
379
|
+
|
|
380
|
+
to_country_code : typing.Optional[str]
|
|
381
|
+
Partner is a Hub: country code of the CPO behind it (OCPI-to-country-code). Set together with ``to_party_id``; through a Hub the request is refused (400) when neither is set and the target is not cached.
|
|
382
|
+
|
|
383
|
+
to_party_id : typing.Optional[str]
|
|
384
|
+
Partner is a Hub: party id of the CPO behind it (OCPI-to-party-id). Set together with ``to_country_code``.
|
|
385
|
+
|
|
386
|
+
request_options : typing.Optional[RequestOptions]
|
|
387
|
+
Request-specific configuration.
|
|
388
|
+
|
|
389
|
+
Returns
|
|
390
|
+
-------
|
|
391
|
+
ChargingProfileResponse
|
|
392
|
+
Successful Response
|
|
393
|
+
|
|
394
|
+
Examples
|
|
395
|
+
--------
|
|
396
|
+
from evcloud import EvcloudClient
|
|
397
|
+
|
|
398
|
+
client = EvcloudClient(
|
|
399
|
+
token="YOUR_TOKEN",
|
|
400
|
+
)
|
|
401
|
+
client.ocpi.emsp.get_active_charging_profile(
|
|
402
|
+
version="221",
|
|
403
|
+
session_id="SES-20260930-0001",
|
|
404
|
+
partner_id=7,
|
|
405
|
+
duration=3600,
|
|
406
|
+
)
|
|
407
|
+
"""
|
|
408
|
+
_response = self._raw_client.get_active_charging_profile(
|
|
409
|
+
version,
|
|
410
|
+
session_id,
|
|
411
|
+
partner_id=partner_id,
|
|
412
|
+
duration=duration,
|
|
413
|
+
to_country_code=to_country_code,
|
|
414
|
+
to_party_id=to_party_id,
|
|
415
|
+
request_options=request_options,
|
|
416
|
+
)
|
|
417
|
+
return _response.data
|
|
418
|
+
|
|
419
|
+
def set_charging_profile(
|
|
420
|
+
self,
|
|
421
|
+
version: SetChargingProfileEmspRequestVersion,
|
|
422
|
+
session_id: str,
|
|
423
|
+
*,
|
|
424
|
+
partner_id: int,
|
|
425
|
+
charging_profile: ChargingProfile,
|
|
426
|
+
to_country_code: typing.Optional[str] = None,
|
|
427
|
+
to_party_id: typing.Optional[str] = None,
|
|
428
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
429
|
+
) -> ChargingProfileResponse:
|
|
430
|
+
"""
|
|
431
|
+
Asks the CPO to apply a charging profile to a session it runs. The CPO answers asynchronously. OCPI 2.2.1 and 2.3.0 only.
|
|
432
|
+
|
|
433
|
+
Parameters
|
|
434
|
+
----------
|
|
435
|
+
version : SetChargingProfileEmspRequestVersion
|
|
436
|
+
OCPI version: ``221`` (2.2.1) or ``230`` (2.3.0). OCPI 2.1.1 has no charging profiles or charging preferences.
|
|
437
|
+
|
|
438
|
+
session_id : str
|
|
439
|
+
OCPI ``id`` of the charging session.
|
|
440
|
+
|
|
441
|
+
partner_id : int
|
|
442
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
443
|
+
|
|
444
|
+
charging_profile : ChargingProfile
|
|
445
|
+
|
|
446
|
+
to_country_code : typing.Optional[str]
|
|
447
|
+
Partner is a Hub: country code of the CPO behind it (OCPI-to-country-code). Set together with ``to_party_id``; through a Hub the request is refused (400) when neither is set and the target is not cached.
|
|
448
|
+
|
|
449
|
+
to_party_id : typing.Optional[str]
|
|
450
|
+
Partner is a Hub: party id of the CPO behind it (OCPI-to-party-id). Set together with ``to_country_code``.
|
|
451
|
+
|
|
452
|
+
request_options : typing.Optional[RequestOptions]
|
|
453
|
+
Request-specific configuration.
|
|
454
|
+
|
|
455
|
+
Returns
|
|
456
|
+
-------
|
|
457
|
+
ChargingProfileResponse
|
|
458
|
+
Successful Response
|
|
459
|
+
|
|
460
|
+
Examples
|
|
461
|
+
--------
|
|
462
|
+
from evcloud import ChargingProfile, ChargingProfilePeriod, EvcloudClient
|
|
463
|
+
|
|
464
|
+
client = EvcloudClient(
|
|
465
|
+
token="YOUR_TOKEN",
|
|
466
|
+
)
|
|
467
|
+
client.ocpi.emsp.set_charging_profile(
|
|
468
|
+
version="221",
|
|
469
|
+
session_id="SES-20260930-0001",
|
|
470
|
+
partner_id=7,
|
|
471
|
+
charging_profile=ChargingProfile(
|
|
472
|
+
charging_rate_unit="A",
|
|
473
|
+
charging_profile_period=[
|
|
474
|
+
ChargingProfilePeriod(
|
|
475
|
+
start_period=0,
|
|
476
|
+
limit=16.0,
|
|
477
|
+
),
|
|
478
|
+
ChargingProfilePeriod(
|
|
479
|
+
start_period=3600,
|
|
480
|
+
limit=32.0,
|
|
481
|
+
),
|
|
482
|
+
],
|
|
483
|
+
),
|
|
484
|
+
)
|
|
485
|
+
"""
|
|
486
|
+
_response = self._raw_client.set_charging_profile(
|
|
487
|
+
version,
|
|
488
|
+
session_id,
|
|
489
|
+
partner_id=partner_id,
|
|
490
|
+
charging_profile=charging_profile,
|
|
491
|
+
to_country_code=to_country_code,
|
|
492
|
+
to_party_id=to_party_id,
|
|
493
|
+
request_options=request_options,
|
|
494
|
+
)
|
|
495
|
+
return _response.data
|
|
496
|
+
|
|
497
|
+
def clear_charging_profile(
|
|
498
|
+
self,
|
|
499
|
+
version: ClearChargingProfileEmspRequestVersion,
|
|
500
|
+
session_id: str,
|
|
501
|
+
*,
|
|
502
|
+
partner_id: int,
|
|
503
|
+
to_country_code: typing.Optional[str] = None,
|
|
504
|
+
to_party_id: typing.Optional[str] = None,
|
|
505
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
506
|
+
) -> ChargingProfileResponse:
|
|
507
|
+
"""
|
|
508
|
+
Asks the CPO to remove the charging profile set on a session it runs. OCPI 2.2.1 and 2.3.0 only.
|
|
509
|
+
|
|
510
|
+
Parameters
|
|
511
|
+
----------
|
|
512
|
+
version : ClearChargingProfileEmspRequestVersion
|
|
513
|
+
OCPI version: ``221`` (2.2.1) or ``230`` (2.3.0). OCPI 2.1.1 has no charging profiles or charging preferences.
|
|
514
|
+
|
|
515
|
+
session_id : str
|
|
516
|
+
OCPI ``id`` of the charging session.
|
|
517
|
+
|
|
518
|
+
partner_id : int
|
|
519
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
520
|
+
|
|
521
|
+
to_country_code : typing.Optional[str]
|
|
522
|
+
Partner is a Hub: country code of the CPO behind it (OCPI-to-country-code). Set together with ``to_party_id``; through a Hub the request is refused (400) when neither is set and the target is not cached.
|
|
523
|
+
|
|
524
|
+
to_party_id : typing.Optional[str]
|
|
525
|
+
Partner is a Hub: party id of the CPO behind it (OCPI-to-party-id). Set together with ``to_country_code``.
|
|
526
|
+
|
|
527
|
+
request_options : typing.Optional[RequestOptions]
|
|
528
|
+
Request-specific configuration.
|
|
529
|
+
|
|
530
|
+
Returns
|
|
531
|
+
-------
|
|
532
|
+
ChargingProfileResponse
|
|
533
|
+
Successful Response
|
|
534
|
+
|
|
535
|
+
Examples
|
|
536
|
+
--------
|
|
537
|
+
from evcloud import EvcloudClient
|
|
538
|
+
|
|
539
|
+
client = EvcloudClient(
|
|
540
|
+
token="YOUR_TOKEN",
|
|
541
|
+
)
|
|
542
|
+
client.ocpi.emsp.clear_charging_profile(
|
|
543
|
+
version="221",
|
|
544
|
+
session_id="SES-20260930-0001",
|
|
545
|
+
partner_id=7,
|
|
546
|
+
)
|
|
547
|
+
"""
|
|
548
|
+
_response = self._raw_client.clear_charging_profile(
|
|
549
|
+
version,
|
|
550
|
+
session_id,
|
|
551
|
+
partner_id=partner_id,
|
|
552
|
+
to_country_code=to_country_code,
|
|
553
|
+
to_party_id=to_party_id,
|
|
554
|
+
request_options=request_options,
|
|
555
|
+
)
|
|
556
|
+
return _response.data
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
class AsyncEmspClient:
|
|
560
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
561
|
+
self._raw_client = AsyncRawEmspClient(client_wrapper=client_wrapper)
|
|
562
|
+
|
|
563
|
+
@property
|
|
564
|
+
def with_raw_response(self) -> AsyncRawEmspClient:
|
|
565
|
+
"""
|
|
566
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
567
|
+
|
|
568
|
+
Returns
|
|
569
|
+
-------
|
|
570
|
+
AsyncRawEmspClient
|
|
571
|
+
"""
|
|
572
|
+
return self._raw_client
|
|
573
|
+
|
|
574
|
+
async def upsert_token(
|
|
575
|
+
self,
|
|
576
|
+
version: UpsertTokenEmspRequestVersion,
|
|
577
|
+
*,
|
|
578
|
+
request: typing.Dict[str, typing.Any],
|
|
579
|
+
push_to_partner_id: typing.Optional[int] = None,
|
|
580
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
581
|
+
) -> TokenWriteResponse:
|
|
582
|
+
"""
|
|
583
|
+
Stores a full OCPI Token on our eMSP side, replacing any existing one with the same uid. Pass ``push_to_partner_id`` to also push it to that partner right away.
|
|
584
|
+
|
|
585
|
+
Parameters
|
|
586
|
+
----------
|
|
587
|
+
version : UpsertTokenEmspRequestVersion
|
|
588
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
589
|
+
|
|
590
|
+
request : typing.Dict[str, typing.Any]
|
|
591
|
+
|
|
592
|
+
push_to_partner_id : typing.Optional[int]
|
|
593
|
+
Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
|
|
594
|
+
|
|
595
|
+
request_options : typing.Optional[RequestOptions]
|
|
596
|
+
Request-specific configuration.
|
|
597
|
+
|
|
598
|
+
Returns
|
|
599
|
+
-------
|
|
600
|
+
TokenWriteResponse
|
|
601
|
+
Successful Response
|
|
602
|
+
|
|
603
|
+
Examples
|
|
604
|
+
--------
|
|
605
|
+
import asyncio
|
|
606
|
+
|
|
607
|
+
from evcloud import AsyncEvcloudClient
|
|
608
|
+
|
|
609
|
+
client = AsyncEvcloudClient(
|
|
610
|
+
token="YOUR_TOKEN",
|
|
611
|
+
)
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
async def main() -> None:
|
|
615
|
+
await client.ocpi.emsp.upsert_token(
|
|
616
|
+
version="221",
|
|
617
|
+
request={
|
|
618
|
+
"country_code": "DE",
|
|
619
|
+
"party_id": "EMS",
|
|
620
|
+
"uid": "04A2B3C4D5E6F7",
|
|
621
|
+
"type": "RFID",
|
|
622
|
+
"contract_id": "DE-EMS-C12345678-X",
|
|
623
|
+
"issuer": "Example eMSP GmbH",
|
|
624
|
+
"valid": True,
|
|
625
|
+
"whitelist": "ALLOWED",
|
|
626
|
+
"last_updated": "2026-09-30T10:00:00Z",
|
|
627
|
+
},
|
|
628
|
+
)
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
asyncio.run(main())
|
|
632
|
+
"""
|
|
633
|
+
_response = await self._raw_client.upsert_token(
|
|
634
|
+
version, request=request, push_to_partner_id=push_to_partner_id, request_options=request_options
|
|
635
|
+
)
|
|
636
|
+
return _response.data
|
|
637
|
+
|
|
638
|
+
async def update_token(
|
|
639
|
+
self,
|
|
640
|
+
version: UpdateTokenEmspRequestVersion,
|
|
641
|
+
token_uid: str,
|
|
642
|
+
*,
|
|
643
|
+
request: typing.Dict[str, typing.Any],
|
|
644
|
+
type: typing.Optional[str] = None,
|
|
645
|
+
push_to_partner_id: typing.Optional[int] = None,
|
|
646
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
647
|
+
) -> TokenWriteResponse:
|
|
648
|
+
"""
|
|
649
|
+
Applies a partial OCPI Token to a stored token, for example ``valid=false`` to block it; include ``last_updated``. Pass ``push_to_partner_id`` to also push it to that partner right away.
|
|
650
|
+
|
|
651
|
+
Parameters
|
|
652
|
+
----------
|
|
653
|
+
version : UpdateTokenEmspRequestVersion
|
|
654
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
655
|
+
|
|
656
|
+
token_uid : str
|
|
657
|
+
OCPI ``uid`` of the token.
|
|
658
|
+
|
|
659
|
+
request : typing.Dict[str, typing.Any]
|
|
660
|
+
|
|
661
|
+
type : typing.Optional[str]
|
|
662
|
+
Token type (e.g. ``RFID``, ``APP_USER``), used to find the token when the OCPI body does not carry ``type``.
|
|
663
|
+
|
|
664
|
+
push_to_partner_id : typing.Optional[int]
|
|
665
|
+
Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
|
|
666
|
+
|
|
667
|
+
request_options : typing.Optional[RequestOptions]
|
|
668
|
+
Request-specific configuration.
|
|
669
|
+
|
|
670
|
+
Returns
|
|
671
|
+
-------
|
|
672
|
+
TokenWriteResponse
|
|
673
|
+
Successful Response
|
|
674
|
+
|
|
675
|
+
Examples
|
|
676
|
+
--------
|
|
677
|
+
import asyncio
|
|
678
|
+
|
|
679
|
+
from evcloud import AsyncEvcloudClient
|
|
680
|
+
|
|
681
|
+
client = AsyncEvcloudClient(
|
|
682
|
+
token="YOUR_TOKEN",
|
|
683
|
+
)
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
async def main() -> None:
|
|
687
|
+
await client.ocpi.emsp.update_token(
|
|
688
|
+
version="221",
|
|
689
|
+
token_uid="04A2B3C4D5E6F7",
|
|
690
|
+
type="RFID",
|
|
691
|
+
request={"valid": False, "last_updated": "2026-09-30T10:00:00Z"},
|
|
692
|
+
)
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
asyncio.run(main())
|
|
696
|
+
"""
|
|
697
|
+
_response = await self._raw_client.update_token(
|
|
698
|
+
version,
|
|
699
|
+
token_uid,
|
|
700
|
+
request=request,
|
|
701
|
+
type=type,
|
|
702
|
+
push_to_partner_id=push_to_partner_id,
|
|
703
|
+
request_options=request_options,
|
|
704
|
+
)
|
|
705
|
+
return _response.data
|
|
706
|
+
|
|
707
|
+
async def send_command(
|
|
708
|
+
self,
|
|
709
|
+
version: SendCommandEmspRequestVersion,
|
|
710
|
+
command: SendCommandEmspRequestCommand,
|
|
711
|
+
*,
|
|
712
|
+
partner_id: int,
|
|
713
|
+
to_country_code: typing.Optional[str] = None,
|
|
714
|
+
to_party_id: typing.Optional[str] = None,
|
|
715
|
+
token: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
716
|
+
location_id: typing.Optional[str] = OMIT,
|
|
717
|
+
evse_uid: typing.Optional[str] = OMIT,
|
|
718
|
+
connector_id: typing.Optional[str] = OMIT,
|
|
719
|
+
authorization_reference: typing.Optional[str] = OMIT,
|
|
720
|
+
session_id: typing.Optional[str] = OMIT,
|
|
721
|
+
reservation_id: typing.Optional[str] = OMIT,
|
|
722
|
+
expiry_date: typing.Optional[dt.datetime] = OMIT,
|
|
723
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
724
|
+
) -> CommandSendResponse:
|
|
725
|
+
"""
|
|
726
|
+
Returns the CPO's immediate CommandResponse. The async CommandResult is delivered to the OCPI gateway's own callback; clients cannot set ``response_url``.
|
|
727
|
+
|
|
728
|
+
Parameters
|
|
729
|
+
----------
|
|
730
|
+
version : SendCommandEmspRequestVersion
|
|
731
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
732
|
+
|
|
733
|
+
command : SendCommandEmspRequestCommand
|
|
734
|
+
The OCPI command to send to the CPO.
|
|
735
|
+
|
|
736
|
+
partner_id : int
|
|
737
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
738
|
+
|
|
739
|
+
to_country_code : typing.Optional[str]
|
|
740
|
+
Partner is a Hub: country code of the CPO behind it (OCPI-to-country-code). Set together with ``to_party_id``; through a Hub the request is refused (400) when neither is set and the target is not cached.
|
|
741
|
+
|
|
742
|
+
to_party_id : typing.Optional[str]
|
|
743
|
+
Partner is a Hub: party id of the CPO behind it (OCPI-to-party-id). Set together with ``to_country_code``.
|
|
744
|
+
|
|
745
|
+
token : typing.Optional[typing.Dict[str, typing.Any]]
|
|
746
|
+
OCPI Token for the path version (validated by the gateway).
|
|
747
|
+
|
|
748
|
+
location_id : typing.Optional[str]
|
|
749
|
+
|
|
750
|
+
evse_uid : typing.Optional[str]
|
|
751
|
+
|
|
752
|
+
connector_id : typing.Optional[str]
|
|
753
|
+
|
|
754
|
+
authorization_reference : typing.Optional[str]
|
|
755
|
+
|
|
756
|
+
session_id : typing.Optional[str]
|
|
757
|
+
|
|
758
|
+
reservation_id : typing.Optional[str]
|
|
759
|
+
|
|
760
|
+
expiry_date : typing.Optional[dt.datetime]
|
|
761
|
+
|
|
762
|
+
request_options : typing.Optional[RequestOptions]
|
|
763
|
+
Request-specific configuration.
|
|
764
|
+
|
|
765
|
+
Returns
|
|
766
|
+
-------
|
|
767
|
+
CommandSendResponse
|
|
768
|
+
Successful Response
|
|
769
|
+
|
|
770
|
+
Examples
|
|
771
|
+
--------
|
|
772
|
+
import asyncio
|
|
773
|
+
|
|
774
|
+
from evcloud import AsyncEvcloudClient
|
|
775
|
+
|
|
776
|
+
client = AsyncEvcloudClient(
|
|
777
|
+
token="YOUR_TOKEN",
|
|
778
|
+
)
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
async def main() -> None:
|
|
782
|
+
await client.ocpi.emsp.send_command(
|
|
783
|
+
version="221",
|
|
784
|
+
command="START_SESSION",
|
|
785
|
+
partner_id=7,
|
|
786
|
+
token={
|
|
787
|
+
"country_code": "DE",
|
|
788
|
+
"party_id": "EMS",
|
|
789
|
+
"uid": "04A2B3C4D5E6F7",
|
|
790
|
+
"type": "RFID",
|
|
791
|
+
"contract_id": "DE-EMS-C12345678-X",
|
|
792
|
+
"issuer": "Example eMSP GmbH",
|
|
793
|
+
"valid": True,
|
|
794
|
+
"whitelist": "ALLOWED",
|
|
795
|
+
"last_updated": "2026-09-30T10:00:00Z",
|
|
796
|
+
},
|
|
797
|
+
location_id="LOC-AMS-1",
|
|
798
|
+
evse_uid="EVSE-AMS-1-1",
|
|
799
|
+
)
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
asyncio.run(main())
|
|
803
|
+
"""
|
|
804
|
+
_response = await self._raw_client.send_command(
|
|
805
|
+
version,
|
|
806
|
+
command,
|
|
807
|
+
partner_id=partner_id,
|
|
808
|
+
to_country_code=to_country_code,
|
|
809
|
+
to_party_id=to_party_id,
|
|
810
|
+
token=token,
|
|
811
|
+
location_id=location_id,
|
|
812
|
+
evse_uid=evse_uid,
|
|
813
|
+
connector_id=connector_id,
|
|
814
|
+
authorization_reference=authorization_reference,
|
|
815
|
+
session_id=session_id,
|
|
816
|
+
reservation_id=reservation_id,
|
|
817
|
+
expiry_date=expiry_date,
|
|
818
|
+
request_options=request_options,
|
|
819
|
+
)
|
|
820
|
+
return _response.data
|
|
821
|
+
|
|
822
|
+
async def set_charging_preferences(
|
|
823
|
+
self,
|
|
824
|
+
version: SetChargingPreferencesEmspRequestVersion,
|
|
825
|
+
session_id: str,
|
|
826
|
+
*,
|
|
827
|
+
partner_id: int,
|
|
828
|
+
profile_type: ChargingPreferencesRequestProfileType,
|
|
829
|
+
to_country_code: typing.Optional[str] = None,
|
|
830
|
+
to_party_id: typing.Optional[str] = None,
|
|
831
|
+
departure_time: typing.Optional[dt.datetime] = OMIT,
|
|
832
|
+
energy_need: typing.Optional[float] = OMIT,
|
|
833
|
+
discharge_allowed: typing.Optional[bool] = OMIT,
|
|
834
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
835
|
+
) -> ChargingPreferencesResponse:
|
|
836
|
+
"""
|
|
837
|
+
Sends the CPO charging preferences (profile type, departure time, energy need) for a session it runs. OCPI 2.2.1 and 2.3.0 only.
|
|
838
|
+
|
|
839
|
+
Parameters
|
|
840
|
+
----------
|
|
841
|
+
version : SetChargingPreferencesEmspRequestVersion
|
|
842
|
+
OCPI version: ``221`` (2.2.1) or ``230`` (2.3.0). OCPI 2.1.1 has no charging profiles or charging preferences.
|
|
843
|
+
|
|
844
|
+
session_id : str
|
|
845
|
+
OCPI ``id`` of the charging session.
|
|
846
|
+
|
|
847
|
+
partner_id : int
|
|
848
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
849
|
+
|
|
850
|
+
profile_type : ChargingPreferencesRequestProfileType
|
|
851
|
+
|
|
852
|
+
to_country_code : typing.Optional[str]
|
|
853
|
+
Partner is a Hub: country code of the CPO behind it (OCPI-to-country-code). Set together with ``to_party_id``; through a Hub the request is refused (400) when neither is set and the target is not cached.
|
|
854
|
+
|
|
855
|
+
to_party_id : typing.Optional[str]
|
|
856
|
+
Partner is a Hub: party id of the CPO behind it (OCPI-to-party-id). Set together with ``to_country_code``.
|
|
857
|
+
|
|
858
|
+
departure_time : typing.Optional[dt.datetime]
|
|
859
|
+
|
|
860
|
+
energy_need : typing.Optional[float]
|
|
861
|
+
kWh.
|
|
862
|
+
|
|
863
|
+
discharge_allowed : typing.Optional[bool]
|
|
864
|
+
|
|
865
|
+
request_options : typing.Optional[RequestOptions]
|
|
866
|
+
Request-specific configuration.
|
|
867
|
+
|
|
868
|
+
Returns
|
|
869
|
+
-------
|
|
870
|
+
ChargingPreferencesResponse
|
|
871
|
+
Successful Response
|
|
872
|
+
|
|
873
|
+
Examples
|
|
874
|
+
--------
|
|
875
|
+
import asyncio
|
|
876
|
+
import datetime
|
|
877
|
+
|
|
878
|
+
from evcloud import AsyncEvcloudClient
|
|
879
|
+
|
|
880
|
+
client = AsyncEvcloudClient(
|
|
881
|
+
token="YOUR_TOKEN",
|
|
882
|
+
)
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
async def main() -> None:
|
|
886
|
+
await client.ocpi.emsp.set_charging_preferences(
|
|
887
|
+
version="221",
|
|
888
|
+
session_id="SES-20260930-0001",
|
|
889
|
+
partner_id=7,
|
|
890
|
+
profile_type="CHEAP",
|
|
891
|
+
departure_time=datetime.datetime.fromisoformat(
|
|
892
|
+
"2026-10-01 07:00:00+00:00",
|
|
893
|
+
),
|
|
894
|
+
energy_need=30.0,
|
|
895
|
+
)
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
asyncio.run(main())
|
|
899
|
+
"""
|
|
900
|
+
_response = await self._raw_client.set_charging_preferences(
|
|
901
|
+
version,
|
|
902
|
+
session_id,
|
|
903
|
+
partner_id=partner_id,
|
|
904
|
+
profile_type=profile_type,
|
|
905
|
+
to_country_code=to_country_code,
|
|
906
|
+
to_party_id=to_party_id,
|
|
907
|
+
departure_time=departure_time,
|
|
908
|
+
energy_need=energy_need,
|
|
909
|
+
discharge_allowed=discharge_allowed,
|
|
910
|
+
request_options=request_options,
|
|
911
|
+
)
|
|
912
|
+
return _response.data
|
|
913
|
+
|
|
914
|
+
async def get_active_charging_profile(
|
|
915
|
+
self,
|
|
916
|
+
version: GetActiveChargingProfileEmspRequestVersion,
|
|
917
|
+
session_id: str,
|
|
918
|
+
*,
|
|
919
|
+
partner_id: int,
|
|
920
|
+
duration: int,
|
|
921
|
+
to_country_code: typing.Optional[str] = None,
|
|
922
|
+
to_party_id: typing.Optional[str] = None,
|
|
923
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
924
|
+
) -> ChargingProfileResponse:
|
|
925
|
+
"""
|
|
926
|
+
Asks the CPO for the charging profile active on a session it runs. The result arrives asynchronously. OCPI 2.2.1 and 2.3.0 only.
|
|
927
|
+
|
|
928
|
+
Parameters
|
|
929
|
+
----------
|
|
930
|
+
version : GetActiveChargingProfileEmspRequestVersion
|
|
931
|
+
OCPI version: ``221`` (2.2.1) or ``230`` (2.3.0). OCPI 2.1.1 has no charging profiles or charging preferences.
|
|
932
|
+
|
|
933
|
+
session_id : str
|
|
934
|
+
OCPI ``id`` of the charging session.
|
|
935
|
+
|
|
936
|
+
partner_id : int
|
|
937
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
938
|
+
|
|
939
|
+
duration : int
|
|
940
|
+
Schedule length in seconds.
|
|
941
|
+
|
|
942
|
+
to_country_code : typing.Optional[str]
|
|
943
|
+
Partner is a Hub: country code of the CPO behind it (OCPI-to-country-code). Set together with ``to_party_id``; through a Hub the request is refused (400) when neither is set and the target is not cached.
|
|
944
|
+
|
|
945
|
+
to_party_id : typing.Optional[str]
|
|
946
|
+
Partner is a Hub: party id of the CPO behind it (OCPI-to-party-id). Set together with ``to_country_code``.
|
|
947
|
+
|
|
948
|
+
request_options : typing.Optional[RequestOptions]
|
|
949
|
+
Request-specific configuration.
|
|
950
|
+
|
|
951
|
+
Returns
|
|
952
|
+
-------
|
|
953
|
+
ChargingProfileResponse
|
|
954
|
+
Successful Response
|
|
955
|
+
|
|
956
|
+
Examples
|
|
957
|
+
--------
|
|
958
|
+
import asyncio
|
|
959
|
+
|
|
960
|
+
from evcloud import AsyncEvcloudClient
|
|
961
|
+
|
|
962
|
+
client = AsyncEvcloudClient(
|
|
963
|
+
token="YOUR_TOKEN",
|
|
964
|
+
)
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
async def main() -> None:
|
|
968
|
+
await client.ocpi.emsp.get_active_charging_profile(
|
|
969
|
+
version="221",
|
|
970
|
+
session_id="SES-20260930-0001",
|
|
971
|
+
partner_id=7,
|
|
972
|
+
duration=3600,
|
|
973
|
+
)
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
asyncio.run(main())
|
|
977
|
+
"""
|
|
978
|
+
_response = await self._raw_client.get_active_charging_profile(
|
|
979
|
+
version,
|
|
980
|
+
session_id,
|
|
981
|
+
partner_id=partner_id,
|
|
982
|
+
duration=duration,
|
|
983
|
+
to_country_code=to_country_code,
|
|
984
|
+
to_party_id=to_party_id,
|
|
985
|
+
request_options=request_options,
|
|
986
|
+
)
|
|
987
|
+
return _response.data
|
|
988
|
+
|
|
989
|
+
async def set_charging_profile(
|
|
990
|
+
self,
|
|
991
|
+
version: SetChargingProfileEmspRequestVersion,
|
|
992
|
+
session_id: str,
|
|
993
|
+
*,
|
|
994
|
+
partner_id: int,
|
|
995
|
+
charging_profile: ChargingProfile,
|
|
996
|
+
to_country_code: typing.Optional[str] = None,
|
|
997
|
+
to_party_id: typing.Optional[str] = None,
|
|
998
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
999
|
+
) -> ChargingProfileResponse:
|
|
1000
|
+
"""
|
|
1001
|
+
Asks the CPO to apply a charging profile to a session it runs. The CPO answers asynchronously. OCPI 2.2.1 and 2.3.0 only.
|
|
1002
|
+
|
|
1003
|
+
Parameters
|
|
1004
|
+
----------
|
|
1005
|
+
version : SetChargingProfileEmspRequestVersion
|
|
1006
|
+
OCPI version: ``221`` (2.2.1) or ``230`` (2.3.0). OCPI 2.1.1 has no charging profiles or charging preferences.
|
|
1007
|
+
|
|
1008
|
+
session_id : str
|
|
1009
|
+
OCPI ``id`` of the charging session.
|
|
1010
|
+
|
|
1011
|
+
partner_id : int
|
|
1012
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
1013
|
+
|
|
1014
|
+
charging_profile : ChargingProfile
|
|
1015
|
+
|
|
1016
|
+
to_country_code : typing.Optional[str]
|
|
1017
|
+
Partner is a Hub: country code of the CPO behind it (OCPI-to-country-code). Set together with ``to_party_id``; through a Hub the request is refused (400) when neither is set and the target is not cached.
|
|
1018
|
+
|
|
1019
|
+
to_party_id : typing.Optional[str]
|
|
1020
|
+
Partner is a Hub: party id of the CPO behind it (OCPI-to-party-id). Set together with ``to_country_code``.
|
|
1021
|
+
|
|
1022
|
+
request_options : typing.Optional[RequestOptions]
|
|
1023
|
+
Request-specific configuration.
|
|
1024
|
+
|
|
1025
|
+
Returns
|
|
1026
|
+
-------
|
|
1027
|
+
ChargingProfileResponse
|
|
1028
|
+
Successful Response
|
|
1029
|
+
|
|
1030
|
+
Examples
|
|
1031
|
+
--------
|
|
1032
|
+
import asyncio
|
|
1033
|
+
|
|
1034
|
+
from evcloud import AsyncEvcloudClient, ChargingProfile, ChargingProfilePeriod
|
|
1035
|
+
|
|
1036
|
+
client = AsyncEvcloudClient(
|
|
1037
|
+
token="YOUR_TOKEN",
|
|
1038
|
+
)
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
async def main() -> None:
|
|
1042
|
+
await client.ocpi.emsp.set_charging_profile(
|
|
1043
|
+
version="221",
|
|
1044
|
+
session_id="SES-20260930-0001",
|
|
1045
|
+
partner_id=7,
|
|
1046
|
+
charging_profile=ChargingProfile(
|
|
1047
|
+
charging_rate_unit="A",
|
|
1048
|
+
charging_profile_period=[
|
|
1049
|
+
ChargingProfilePeriod(
|
|
1050
|
+
start_period=0,
|
|
1051
|
+
limit=16.0,
|
|
1052
|
+
),
|
|
1053
|
+
ChargingProfilePeriod(
|
|
1054
|
+
start_period=3600,
|
|
1055
|
+
limit=32.0,
|
|
1056
|
+
),
|
|
1057
|
+
],
|
|
1058
|
+
),
|
|
1059
|
+
)
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
asyncio.run(main())
|
|
1063
|
+
"""
|
|
1064
|
+
_response = await self._raw_client.set_charging_profile(
|
|
1065
|
+
version,
|
|
1066
|
+
session_id,
|
|
1067
|
+
partner_id=partner_id,
|
|
1068
|
+
charging_profile=charging_profile,
|
|
1069
|
+
to_country_code=to_country_code,
|
|
1070
|
+
to_party_id=to_party_id,
|
|
1071
|
+
request_options=request_options,
|
|
1072
|
+
)
|
|
1073
|
+
return _response.data
|
|
1074
|
+
|
|
1075
|
+
async def clear_charging_profile(
|
|
1076
|
+
self,
|
|
1077
|
+
version: ClearChargingProfileEmspRequestVersion,
|
|
1078
|
+
session_id: str,
|
|
1079
|
+
*,
|
|
1080
|
+
partner_id: int,
|
|
1081
|
+
to_country_code: typing.Optional[str] = None,
|
|
1082
|
+
to_party_id: typing.Optional[str] = None,
|
|
1083
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1084
|
+
) -> ChargingProfileResponse:
|
|
1085
|
+
"""
|
|
1086
|
+
Asks the CPO to remove the charging profile set on a session it runs. OCPI 2.2.1 and 2.3.0 only.
|
|
1087
|
+
|
|
1088
|
+
Parameters
|
|
1089
|
+
----------
|
|
1090
|
+
version : ClearChargingProfileEmspRequestVersion
|
|
1091
|
+
OCPI version: ``221`` (2.2.1) or ``230`` (2.3.0). OCPI 2.1.1 has no charging profiles or charging preferences.
|
|
1092
|
+
|
|
1093
|
+
session_id : str
|
|
1094
|
+
OCPI ``id`` of the charging session.
|
|
1095
|
+
|
|
1096
|
+
partner_id : int
|
|
1097
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
1098
|
+
|
|
1099
|
+
to_country_code : typing.Optional[str]
|
|
1100
|
+
Partner is a Hub: country code of the CPO behind it (OCPI-to-country-code). Set together with ``to_party_id``; through a Hub the request is refused (400) when neither is set and the target is not cached.
|
|
1101
|
+
|
|
1102
|
+
to_party_id : typing.Optional[str]
|
|
1103
|
+
Partner is a Hub: party id of the CPO behind it (OCPI-to-party-id). Set together with ``to_country_code``.
|
|
1104
|
+
|
|
1105
|
+
request_options : typing.Optional[RequestOptions]
|
|
1106
|
+
Request-specific configuration.
|
|
1107
|
+
|
|
1108
|
+
Returns
|
|
1109
|
+
-------
|
|
1110
|
+
ChargingProfileResponse
|
|
1111
|
+
Successful Response
|
|
1112
|
+
|
|
1113
|
+
Examples
|
|
1114
|
+
--------
|
|
1115
|
+
import asyncio
|
|
1116
|
+
|
|
1117
|
+
from evcloud import AsyncEvcloudClient
|
|
1118
|
+
|
|
1119
|
+
client = AsyncEvcloudClient(
|
|
1120
|
+
token="YOUR_TOKEN",
|
|
1121
|
+
)
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
async def main() -> None:
|
|
1125
|
+
await client.ocpi.emsp.clear_charging_profile(
|
|
1126
|
+
version="221",
|
|
1127
|
+
session_id="SES-20260930-0001",
|
|
1128
|
+
partner_id=7,
|
|
1129
|
+
)
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
asyncio.run(main())
|
|
1133
|
+
"""
|
|
1134
|
+
_response = await self._raw_client.clear_charging_profile(
|
|
1135
|
+
version,
|
|
1136
|
+
session_id,
|
|
1137
|
+
partner_id=partner_id,
|
|
1138
|
+
to_country_code=to_country_code,
|
|
1139
|
+
to_party_id=to_party_id,
|
|
1140
|
+
request_options=request_options,
|
|
1141
|
+
)
|
|
1142
|
+
return _response.data
|