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,1701 @@
|
|
|
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.sync_patch_request import SyncPatchRequest
|
|
9
|
+
from ...types.sync_pull_response import SyncPullResponse
|
|
10
|
+
from ...types.sync_push_response import SyncPushResponse
|
|
11
|
+
from .raw_client import AsyncRawSyncClient, RawSyncClient
|
|
12
|
+
from .types.pull_cdrs_sync_request_version import PullCdrsSyncRequestVersion
|
|
13
|
+
from .types.pull_hub_client_info_as_cpo_sync_request_version import PullHubClientInfoAsCpoSyncRequestVersion
|
|
14
|
+
from .types.pull_hub_client_info_as_emsp_sync_request_version import PullHubClientInfoAsEmspSyncRequestVersion
|
|
15
|
+
from .types.pull_locations_sync_request_version import PullLocationsSyncRequestVersion
|
|
16
|
+
from .types.pull_sessions_sync_request_version import PullSessionsSyncRequestVersion
|
|
17
|
+
from .types.pull_tariffs_sync_request_version import PullTariffsSyncRequestVersion
|
|
18
|
+
from .types.pull_tokens_sync_request_version import PullTokensSyncRequestVersion
|
|
19
|
+
from .types.push_cdr_sync_request_version import PushCdrSyncRequestVersion
|
|
20
|
+
from .types.push_location_sync_request_version import PushLocationSyncRequestVersion
|
|
21
|
+
from .types.push_session_sync_request_version import PushSessionSyncRequestVersion
|
|
22
|
+
from .types.push_tariff_sync_request_version import PushTariffSyncRequestVersion
|
|
23
|
+
from .types.push_token_sync_request_version import PushTokenSyncRequestVersion
|
|
24
|
+
|
|
25
|
+
# this is used as the default value for optional parameters
|
|
26
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class SyncClient:
|
|
30
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
31
|
+
self._raw_client = RawSyncClient(client_wrapper=client_wrapper)
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def with_raw_response(self) -> RawSyncClient:
|
|
35
|
+
"""
|
|
36
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
37
|
+
|
|
38
|
+
Returns
|
|
39
|
+
-------
|
|
40
|
+
RawSyncClient
|
|
41
|
+
"""
|
|
42
|
+
return self._raw_client
|
|
43
|
+
|
|
44
|
+
def push_location(
|
|
45
|
+
self,
|
|
46
|
+
version: PushLocationSyncRequestVersion,
|
|
47
|
+
location_id: str,
|
|
48
|
+
*,
|
|
49
|
+
partner_id: int,
|
|
50
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
51
|
+
) -> SyncPushResponse:
|
|
52
|
+
"""
|
|
53
|
+
Sends a stored location to a partner eMSP (PUT to its Locations module). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
54
|
+
|
|
55
|
+
Parameters
|
|
56
|
+
----------
|
|
57
|
+
version : PushLocationSyncRequestVersion
|
|
58
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
59
|
+
|
|
60
|
+
location_id : str
|
|
61
|
+
OCPI ``id`` of the location.
|
|
62
|
+
|
|
63
|
+
partner_id : int
|
|
64
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
65
|
+
|
|
66
|
+
request_options : typing.Optional[RequestOptions]
|
|
67
|
+
Request-specific configuration.
|
|
68
|
+
|
|
69
|
+
Returns
|
|
70
|
+
-------
|
|
71
|
+
SyncPushResponse
|
|
72
|
+
Successful Response
|
|
73
|
+
|
|
74
|
+
Examples
|
|
75
|
+
--------
|
|
76
|
+
from evcloud import EvcloudClient
|
|
77
|
+
|
|
78
|
+
client = EvcloudClient(
|
|
79
|
+
token="YOUR_TOKEN",
|
|
80
|
+
)
|
|
81
|
+
client.ocpi.sync.push_location(
|
|
82
|
+
version="221",
|
|
83
|
+
location_id="LOC-AMS-1",
|
|
84
|
+
partner_id=7,
|
|
85
|
+
)
|
|
86
|
+
"""
|
|
87
|
+
_response = self._raw_client.push_location(
|
|
88
|
+
version, location_id, partner_id=partner_id, request_options=request_options
|
|
89
|
+
)
|
|
90
|
+
return _response.data
|
|
91
|
+
|
|
92
|
+
def push_cdr(
|
|
93
|
+
self,
|
|
94
|
+
version: PushCdrSyncRequestVersion,
|
|
95
|
+
cdr_id: str,
|
|
96
|
+
*,
|
|
97
|
+
partner_id: int,
|
|
98
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
99
|
+
) -> SyncPushResponse:
|
|
100
|
+
"""
|
|
101
|
+
Sends a stored CDR to a partner eMSP (POST to its CDRs module). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
102
|
+
|
|
103
|
+
Parameters
|
|
104
|
+
----------
|
|
105
|
+
version : PushCdrSyncRequestVersion
|
|
106
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
107
|
+
|
|
108
|
+
cdr_id : str
|
|
109
|
+
OCPI ``id`` of the CDR.
|
|
110
|
+
|
|
111
|
+
partner_id : int
|
|
112
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
113
|
+
|
|
114
|
+
request_options : typing.Optional[RequestOptions]
|
|
115
|
+
Request-specific configuration.
|
|
116
|
+
|
|
117
|
+
Returns
|
|
118
|
+
-------
|
|
119
|
+
SyncPushResponse
|
|
120
|
+
Successful Response
|
|
121
|
+
|
|
122
|
+
Examples
|
|
123
|
+
--------
|
|
124
|
+
from evcloud import EvcloudClient
|
|
125
|
+
|
|
126
|
+
client = EvcloudClient(
|
|
127
|
+
token="YOUR_TOKEN",
|
|
128
|
+
)
|
|
129
|
+
client.ocpi.sync.push_cdr(
|
|
130
|
+
version="221",
|
|
131
|
+
cdr_id="CDR-20260930-0001",
|
|
132
|
+
partner_id=7,
|
|
133
|
+
)
|
|
134
|
+
"""
|
|
135
|
+
_response = self._raw_client.push_cdr(version, cdr_id, partner_id=partner_id, request_options=request_options)
|
|
136
|
+
return _response.data
|
|
137
|
+
|
|
138
|
+
def push_tariff(
|
|
139
|
+
self,
|
|
140
|
+
version: PushTariffSyncRequestVersion,
|
|
141
|
+
tariff_id: str,
|
|
142
|
+
*,
|
|
143
|
+
partner_id: int,
|
|
144
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
145
|
+
) -> SyncPushResponse:
|
|
146
|
+
"""
|
|
147
|
+
Sends a stored tariff to a partner eMSP (PUT to its Tariffs module). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
148
|
+
|
|
149
|
+
Parameters
|
|
150
|
+
----------
|
|
151
|
+
version : PushTariffSyncRequestVersion
|
|
152
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
153
|
+
|
|
154
|
+
tariff_id : str
|
|
155
|
+
OCPI ``id`` of the tariff.
|
|
156
|
+
|
|
157
|
+
partner_id : int
|
|
158
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
159
|
+
|
|
160
|
+
request_options : typing.Optional[RequestOptions]
|
|
161
|
+
Request-specific configuration.
|
|
162
|
+
|
|
163
|
+
Returns
|
|
164
|
+
-------
|
|
165
|
+
SyncPushResponse
|
|
166
|
+
Successful Response
|
|
167
|
+
|
|
168
|
+
Examples
|
|
169
|
+
--------
|
|
170
|
+
from evcloud import EvcloudClient
|
|
171
|
+
|
|
172
|
+
client = EvcloudClient(
|
|
173
|
+
token="YOUR_TOKEN",
|
|
174
|
+
)
|
|
175
|
+
client.ocpi.sync.push_tariff(
|
|
176
|
+
version="221",
|
|
177
|
+
tariff_id="TARIFF-AC-STD",
|
|
178
|
+
partner_id=7,
|
|
179
|
+
)
|
|
180
|
+
"""
|
|
181
|
+
_response = self._raw_client.push_tariff(
|
|
182
|
+
version, tariff_id, partner_id=partner_id, request_options=request_options
|
|
183
|
+
)
|
|
184
|
+
return _response.data
|
|
185
|
+
|
|
186
|
+
def push_session(
|
|
187
|
+
self,
|
|
188
|
+
version: PushSessionSyncRequestVersion,
|
|
189
|
+
session_id: str,
|
|
190
|
+
*,
|
|
191
|
+
partner_id: int,
|
|
192
|
+
request: typing.Optional[SyncPatchRequest] = None,
|
|
193
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
194
|
+
) -> SyncPushResponse:
|
|
195
|
+
"""
|
|
196
|
+
Sends a stored session to a partner eMSP: the full object, or only ``patch_body`` as a PATCH. ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
197
|
+
|
|
198
|
+
Parameters
|
|
199
|
+
----------
|
|
200
|
+
version : PushSessionSyncRequestVersion
|
|
201
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
202
|
+
|
|
203
|
+
session_id : str
|
|
204
|
+
OCPI ``id`` of the charging session.
|
|
205
|
+
|
|
206
|
+
partner_id : int
|
|
207
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
208
|
+
|
|
209
|
+
request : typing.Optional[SyncPatchRequest]
|
|
210
|
+
|
|
211
|
+
request_options : typing.Optional[RequestOptions]
|
|
212
|
+
Request-specific configuration.
|
|
213
|
+
|
|
214
|
+
Returns
|
|
215
|
+
-------
|
|
216
|
+
SyncPushResponse
|
|
217
|
+
Successful Response
|
|
218
|
+
|
|
219
|
+
Examples
|
|
220
|
+
--------
|
|
221
|
+
from evcloud import EvcloudClient, SyncPatchRequest
|
|
222
|
+
|
|
223
|
+
client = EvcloudClient(
|
|
224
|
+
token="YOUR_TOKEN",
|
|
225
|
+
)
|
|
226
|
+
client.ocpi.sync.push_session(
|
|
227
|
+
version="221",
|
|
228
|
+
session_id="SES-20260930-0001",
|
|
229
|
+
partner_id=7,
|
|
230
|
+
request=SyncPatchRequest(
|
|
231
|
+
patch_body={"kwh": 18.2, "last_updated": "2026-09-30T10:00:00Z"},
|
|
232
|
+
),
|
|
233
|
+
)
|
|
234
|
+
"""
|
|
235
|
+
_response = self._raw_client.push_session(
|
|
236
|
+
version, session_id, partner_id=partner_id, request=request, request_options=request_options
|
|
237
|
+
)
|
|
238
|
+
return _response.data
|
|
239
|
+
|
|
240
|
+
def push_token(
|
|
241
|
+
self,
|
|
242
|
+
version: PushTokenSyncRequestVersion,
|
|
243
|
+
token_uid: str,
|
|
244
|
+
*,
|
|
245
|
+
partner_id: int,
|
|
246
|
+
type: typing.Optional[str] = None,
|
|
247
|
+
request: typing.Optional[SyncPatchRequest] = None,
|
|
248
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
249
|
+
) -> SyncPushResponse:
|
|
250
|
+
"""
|
|
251
|
+
Sends a stored token to a partner CPO: the full object, or only ``patch_body`` as a PATCH. ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
252
|
+
|
|
253
|
+
Parameters
|
|
254
|
+
----------
|
|
255
|
+
version : PushTokenSyncRequestVersion
|
|
256
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
257
|
+
|
|
258
|
+
token_uid : str
|
|
259
|
+
OCPI ``uid`` of the token.
|
|
260
|
+
|
|
261
|
+
partner_id : int
|
|
262
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
263
|
+
|
|
264
|
+
type : typing.Optional[str]
|
|
265
|
+
Token type (e.g. ``RFID``, ``APP_USER``), used to find the token when the OCPI body does not carry ``type``.
|
|
266
|
+
|
|
267
|
+
request : typing.Optional[SyncPatchRequest]
|
|
268
|
+
|
|
269
|
+
request_options : typing.Optional[RequestOptions]
|
|
270
|
+
Request-specific configuration.
|
|
271
|
+
|
|
272
|
+
Returns
|
|
273
|
+
-------
|
|
274
|
+
SyncPushResponse
|
|
275
|
+
Successful Response
|
|
276
|
+
|
|
277
|
+
Examples
|
|
278
|
+
--------
|
|
279
|
+
from evcloud import EvcloudClient, SyncPatchRequest
|
|
280
|
+
|
|
281
|
+
client = EvcloudClient(
|
|
282
|
+
token="YOUR_TOKEN",
|
|
283
|
+
)
|
|
284
|
+
client.ocpi.sync.push_token(
|
|
285
|
+
version="221",
|
|
286
|
+
token_uid="04A2B3C4D5E6F7",
|
|
287
|
+
partner_id=7,
|
|
288
|
+
type="RFID",
|
|
289
|
+
request=SyncPatchRequest(
|
|
290
|
+
patch_body={"valid": False, "last_updated": "2026-09-30T10:00:00Z"},
|
|
291
|
+
),
|
|
292
|
+
)
|
|
293
|
+
"""
|
|
294
|
+
_response = self._raw_client.push_token(
|
|
295
|
+
version, token_uid, partner_id=partner_id, type=type, request=request, request_options=request_options
|
|
296
|
+
)
|
|
297
|
+
return _response.data
|
|
298
|
+
|
|
299
|
+
def pull_tokens(
|
|
300
|
+
self,
|
|
301
|
+
version: PullTokensSyncRequestVersion,
|
|
302
|
+
*,
|
|
303
|
+
partner_id: int,
|
|
304
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
305
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
306
|
+
offset: typing.Optional[int] = None,
|
|
307
|
+
limit: typing.Optional[int] = None,
|
|
308
|
+
full_replace: typing.Optional[bool] = None,
|
|
309
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
310
|
+
) -> SyncPullResponse:
|
|
311
|
+
"""
|
|
312
|
+
Fetches tokens from a partner eMSP's Tokens module, page by page. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync (``date_from`` is then ignored). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
313
|
+
|
|
314
|
+
Parameters
|
|
315
|
+
----------
|
|
316
|
+
version : PullTokensSyncRequestVersion
|
|
317
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
318
|
+
|
|
319
|
+
partner_id : int
|
|
320
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
321
|
+
|
|
322
|
+
date_from : typing.Optional[dt.datetime]
|
|
323
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
324
|
+
|
|
325
|
+
date_to : typing.Optional[dt.datetime]
|
|
326
|
+
Only objects changed before this time.
|
|
327
|
+
|
|
328
|
+
offset : typing.Optional[int]
|
|
329
|
+
Start at this object in the partner's list.
|
|
330
|
+
|
|
331
|
+
limit : typing.Optional[int]
|
|
332
|
+
Objects to request per page.
|
|
333
|
+
|
|
334
|
+
full_replace : typing.Optional[bool]
|
|
335
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
336
|
+
|
|
337
|
+
request_options : typing.Optional[RequestOptions]
|
|
338
|
+
Request-specific configuration.
|
|
339
|
+
|
|
340
|
+
Returns
|
|
341
|
+
-------
|
|
342
|
+
SyncPullResponse
|
|
343
|
+
Successful Response
|
|
344
|
+
|
|
345
|
+
Examples
|
|
346
|
+
--------
|
|
347
|
+
import datetime
|
|
348
|
+
|
|
349
|
+
from evcloud import EvcloudClient
|
|
350
|
+
|
|
351
|
+
client = EvcloudClient(
|
|
352
|
+
token="YOUR_TOKEN",
|
|
353
|
+
)
|
|
354
|
+
client.ocpi.sync.pull_tokens(
|
|
355
|
+
version="221",
|
|
356
|
+
partner_id=7,
|
|
357
|
+
date_from=datetime.datetime.fromisoformat(
|
|
358
|
+
"2026-09-29 00:00:00+00:00",
|
|
359
|
+
),
|
|
360
|
+
limit=500,
|
|
361
|
+
)
|
|
362
|
+
"""
|
|
363
|
+
_response = self._raw_client.pull_tokens(
|
|
364
|
+
version,
|
|
365
|
+
partner_id=partner_id,
|
|
366
|
+
date_from=date_from,
|
|
367
|
+
date_to=date_to,
|
|
368
|
+
offset=offset,
|
|
369
|
+
limit=limit,
|
|
370
|
+
full_replace=full_replace,
|
|
371
|
+
request_options=request_options,
|
|
372
|
+
)
|
|
373
|
+
return _response.data
|
|
374
|
+
|
|
375
|
+
def pull_locations(
|
|
376
|
+
self,
|
|
377
|
+
version: PullLocationsSyncRequestVersion,
|
|
378
|
+
*,
|
|
379
|
+
partner_id: int,
|
|
380
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
381
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
382
|
+
offset: typing.Optional[int] = None,
|
|
383
|
+
limit: typing.Optional[int] = None,
|
|
384
|
+
full_replace: typing.Optional[bool] = None,
|
|
385
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
386
|
+
) -> SyncPullResponse:
|
|
387
|
+
"""
|
|
388
|
+
Fetches locations from a partner CPO's Locations module, page by page. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync (``date_from`` is then ignored). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
389
|
+
|
|
390
|
+
Parameters
|
|
391
|
+
----------
|
|
392
|
+
version : PullLocationsSyncRequestVersion
|
|
393
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
394
|
+
|
|
395
|
+
partner_id : int
|
|
396
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
397
|
+
|
|
398
|
+
date_from : typing.Optional[dt.datetime]
|
|
399
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
400
|
+
|
|
401
|
+
date_to : typing.Optional[dt.datetime]
|
|
402
|
+
Only objects changed before this time.
|
|
403
|
+
|
|
404
|
+
offset : typing.Optional[int]
|
|
405
|
+
Start at this object in the partner's list.
|
|
406
|
+
|
|
407
|
+
limit : typing.Optional[int]
|
|
408
|
+
Objects to request per page.
|
|
409
|
+
|
|
410
|
+
full_replace : typing.Optional[bool]
|
|
411
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
412
|
+
|
|
413
|
+
request_options : typing.Optional[RequestOptions]
|
|
414
|
+
Request-specific configuration.
|
|
415
|
+
|
|
416
|
+
Returns
|
|
417
|
+
-------
|
|
418
|
+
SyncPullResponse
|
|
419
|
+
Successful Response
|
|
420
|
+
|
|
421
|
+
Examples
|
|
422
|
+
--------
|
|
423
|
+
import datetime
|
|
424
|
+
|
|
425
|
+
from evcloud import EvcloudClient
|
|
426
|
+
|
|
427
|
+
client = EvcloudClient(
|
|
428
|
+
token="YOUR_TOKEN",
|
|
429
|
+
)
|
|
430
|
+
client.ocpi.sync.pull_locations(
|
|
431
|
+
version="221",
|
|
432
|
+
partner_id=7,
|
|
433
|
+
date_from=datetime.datetime.fromisoformat(
|
|
434
|
+
"2026-09-29 00:00:00+00:00",
|
|
435
|
+
),
|
|
436
|
+
limit=500,
|
|
437
|
+
)
|
|
438
|
+
"""
|
|
439
|
+
_response = self._raw_client.pull_locations(
|
|
440
|
+
version,
|
|
441
|
+
partner_id=partner_id,
|
|
442
|
+
date_from=date_from,
|
|
443
|
+
date_to=date_to,
|
|
444
|
+
offset=offset,
|
|
445
|
+
limit=limit,
|
|
446
|
+
full_replace=full_replace,
|
|
447
|
+
request_options=request_options,
|
|
448
|
+
)
|
|
449
|
+
return _response.data
|
|
450
|
+
|
|
451
|
+
def pull_sessions(
|
|
452
|
+
self,
|
|
453
|
+
version: PullSessionsSyncRequestVersion,
|
|
454
|
+
*,
|
|
455
|
+
partner_id: int,
|
|
456
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
457
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
458
|
+
offset: typing.Optional[int] = None,
|
|
459
|
+
limit: typing.Optional[int] = None,
|
|
460
|
+
full_replace: typing.Optional[bool] = None,
|
|
461
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
462
|
+
) -> SyncPullResponse:
|
|
463
|
+
"""
|
|
464
|
+
Fetches sessions from a partner CPO's Sessions module, page by page. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync (``date_from`` is then ignored). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
465
|
+
|
|
466
|
+
Parameters
|
|
467
|
+
----------
|
|
468
|
+
version : PullSessionsSyncRequestVersion
|
|
469
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
470
|
+
|
|
471
|
+
partner_id : int
|
|
472
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
473
|
+
|
|
474
|
+
date_from : typing.Optional[dt.datetime]
|
|
475
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
476
|
+
|
|
477
|
+
date_to : typing.Optional[dt.datetime]
|
|
478
|
+
Only objects changed before this time.
|
|
479
|
+
|
|
480
|
+
offset : typing.Optional[int]
|
|
481
|
+
Start at this object in the partner's list.
|
|
482
|
+
|
|
483
|
+
limit : typing.Optional[int]
|
|
484
|
+
Objects to request per page.
|
|
485
|
+
|
|
486
|
+
full_replace : typing.Optional[bool]
|
|
487
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
488
|
+
|
|
489
|
+
request_options : typing.Optional[RequestOptions]
|
|
490
|
+
Request-specific configuration.
|
|
491
|
+
|
|
492
|
+
Returns
|
|
493
|
+
-------
|
|
494
|
+
SyncPullResponse
|
|
495
|
+
Successful Response
|
|
496
|
+
|
|
497
|
+
Examples
|
|
498
|
+
--------
|
|
499
|
+
import datetime
|
|
500
|
+
|
|
501
|
+
from evcloud import EvcloudClient
|
|
502
|
+
|
|
503
|
+
client = EvcloudClient(
|
|
504
|
+
token="YOUR_TOKEN",
|
|
505
|
+
)
|
|
506
|
+
client.ocpi.sync.pull_sessions(
|
|
507
|
+
version="221",
|
|
508
|
+
partner_id=7,
|
|
509
|
+
date_from=datetime.datetime.fromisoformat(
|
|
510
|
+
"2026-09-29 00:00:00+00:00",
|
|
511
|
+
),
|
|
512
|
+
limit=500,
|
|
513
|
+
)
|
|
514
|
+
"""
|
|
515
|
+
_response = self._raw_client.pull_sessions(
|
|
516
|
+
version,
|
|
517
|
+
partner_id=partner_id,
|
|
518
|
+
date_from=date_from,
|
|
519
|
+
date_to=date_to,
|
|
520
|
+
offset=offset,
|
|
521
|
+
limit=limit,
|
|
522
|
+
full_replace=full_replace,
|
|
523
|
+
request_options=request_options,
|
|
524
|
+
)
|
|
525
|
+
return _response.data
|
|
526
|
+
|
|
527
|
+
def pull_cdrs(
|
|
528
|
+
self,
|
|
529
|
+
version: PullCdrsSyncRequestVersion,
|
|
530
|
+
*,
|
|
531
|
+
partner_id: int,
|
|
532
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
533
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
534
|
+
offset: typing.Optional[int] = None,
|
|
535
|
+
limit: typing.Optional[int] = None,
|
|
536
|
+
full_replace: typing.Optional[bool] = None,
|
|
537
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
538
|
+
) -> SyncPullResponse:
|
|
539
|
+
"""
|
|
540
|
+
Fetches CDRs from a partner CPO's CDRs module, page by page. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync. ``date_from`` is then ignored. ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
541
|
+
|
|
542
|
+
Parameters
|
|
543
|
+
----------
|
|
544
|
+
version : PullCdrsSyncRequestVersion
|
|
545
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
546
|
+
|
|
547
|
+
partner_id : int
|
|
548
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
549
|
+
|
|
550
|
+
date_from : typing.Optional[dt.datetime]
|
|
551
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
552
|
+
|
|
553
|
+
date_to : typing.Optional[dt.datetime]
|
|
554
|
+
Only objects changed before this time.
|
|
555
|
+
|
|
556
|
+
offset : typing.Optional[int]
|
|
557
|
+
Start at this object in the partner's list.
|
|
558
|
+
|
|
559
|
+
limit : typing.Optional[int]
|
|
560
|
+
Objects to request per page.
|
|
561
|
+
|
|
562
|
+
full_replace : typing.Optional[bool]
|
|
563
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
564
|
+
|
|
565
|
+
request_options : typing.Optional[RequestOptions]
|
|
566
|
+
Request-specific configuration.
|
|
567
|
+
|
|
568
|
+
Returns
|
|
569
|
+
-------
|
|
570
|
+
SyncPullResponse
|
|
571
|
+
Successful Response
|
|
572
|
+
|
|
573
|
+
Examples
|
|
574
|
+
--------
|
|
575
|
+
import datetime
|
|
576
|
+
|
|
577
|
+
from evcloud import EvcloudClient
|
|
578
|
+
|
|
579
|
+
client = EvcloudClient(
|
|
580
|
+
token="YOUR_TOKEN",
|
|
581
|
+
)
|
|
582
|
+
client.ocpi.sync.pull_cdrs(
|
|
583
|
+
version="221",
|
|
584
|
+
partner_id=7,
|
|
585
|
+
date_from=datetime.datetime.fromisoformat(
|
|
586
|
+
"2026-09-29 00:00:00+00:00",
|
|
587
|
+
),
|
|
588
|
+
limit=500,
|
|
589
|
+
)
|
|
590
|
+
"""
|
|
591
|
+
_response = self._raw_client.pull_cdrs(
|
|
592
|
+
version,
|
|
593
|
+
partner_id=partner_id,
|
|
594
|
+
date_from=date_from,
|
|
595
|
+
date_to=date_to,
|
|
596
|
+
offset=offset,
|
|
597
|
+
limit=limit,
|
|
598
|
+
full_replace=full_replace,
|
|
599
|
+
request_options=request_options,
|
|
600
|
+
)
|
|
601
|
+
return _response.data
|
|
602
|
+
|
|
603
|
+
def pull_tariffs(
|
|
604
|
+
self,
|
|
605
|
+
version: PullTariffsSyncRequestVersion,
|
|
606
|
+
*,
|
|
607
|
+
partner_id: int,
|
|
608
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
609
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
610
|
+
offset: typing.Optional[int] = None,
|
|
611
|
+
limit: typing.Optional[int] = None,
|
|
612
|
+
full_replace: typing.Optional[bool] = None,
|
|
613
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
614
|
+
) -> SyncPullResponse:
|
|
615
|
+
"""
|
|
616
|
+
Fetches tariffs from a partner CPO's Tariffs module, page by page. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync (``date_from`` is then ignored). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
617
|
+
|
|
618
|
+
Parameters
|
|
619
|
+
----------
|
|
620
|
+
version : PullTariffsSyncRequestVersion
|
|
621
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
622
|
+
|
|
623
|
+
partner_id : int
|
|
624
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
625
|
+
|
|
626
|
+
date_from : typing.Optional[dt.datetime]
|
|
627
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
628
|
+
|
|
629
|
+
date_to : typing.Optional[dt.datetime]
|
|
630
|
+
Only objects changed before this time.
|
|
631
|
+
|
|
632
|
+
offset : typing.Optional[int]
|
|
633
|
+
Start at this object in the partner's list.
|
|
634
|
+
|
|
635
|
+
limit : typing.Optional[int]
|
|
636
|
+
Objects to request per page.
|
|
637
|
+
|
|
638
|
+
full_replace : typing.Optional[bool]
|
|
639
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
640
|
+
|
|
641
|
+
request_options : typing.Optional[RequestOptions]
|
|
642
|
+
Request-specific configuration.
|
|
643
|
+
|
|
644
|
+
Returns
|
|
645
|
+
-------
|
|
646
|
+
SyncPullResponse
|
|
647
|
+
Successful Response
|
|
648
|
+
|
|
649
|
+
Examples
|
|
650
|
+
--------
|
|
651
|
+
import datetime
|
|
652
|
+
|
|
653
|
+
from evcloud import EvcloudClient
|
|
654
|
+
|
|
655
|
+
client = EvcloudClient(
|
|
656
|
+
token="YOUR_TOKEN",
|
|
657
|
+
)
|
|
658
|
+
client.ocpi.sync.pull_tariffs(
|
|
659
|
+
version="221",
|
|
660
|
+
partner_id=7,
|
|
661
|
+
date_from=datetime.datetime.fromisoformat(
|
|
662
|
+
"2026-09-29 00:00:00+00:00",
|
|
663
|
+
),
|
|
664
|
+
limit=500,
|
|
665
|
+
)
|
|
666
|
+
"""
|
|
667
|
+
_response = self._raw_client.pull_tariffs(
|
|
668
|
+
version,
|
|
669
|
+
partner_id=partner_id,
|
|
670
|
+
date_from=date_from,
|
|
671
|
+
date_to=date_to,
|
|
672
|
+
offset=offset,
|
|
673
|
+
limit=limit,
|
|
674
|
+
full_replace=full_replace,
|
|
675
|
+
request_options=request_options,
|
|
676
|
+
)
|
|
677
|
+
return _response.data
|
|
678
|
+
|
|
679
|
+
def pull_hub_client_info_as_emsp(
|
|
680
|
+
self,
|
|
681
|
+
version: PullHubClientInfoAsEmspSyncRequestVersion,
|
|
682
|
+
*,
|
|
683
|
+
partner_id: int,
|
|
684
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
685
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
686
|
+
offset: typing.Optional[int] = None,
|
|
687
|
+
limit: typing.Optional[int] = None,
|
|
688
|
+
full_replace: typing.Optional[bool] = None,
|
|
689
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
690
|
+
) -> SyncPullResponse:
|
|
691
|
+
"""
|
|
692
|
+
Fetches a Hub's ClientInfo list (which parties are reachable through it) into our eMSP side. OCPI 2.2.1 and 2.3.0 only. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync (``date_from`` is then ignored). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
693
|
+
|
|
694
|
+
Parameters
|
|
695
|
+
----------
|
|
696
|
+
version : PullHubClientInfoAsEmspSyncRequestVersion
|
|
697
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
698
|
+
|
|
699
|
+
partner_id : int
|
|
700
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
701
|
+
|
|
702
|
+
date_from : typing.Optional[dt.datetime]
|
|
703
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
704
|
+
|
|
705
|
+
date_to : typing.Optional[dt.datetime]
|
|
706
|
+
Only objects changed before this time.
|
|
707
|
+
|
|
708
|
+
offset : typing.Optional[int]
|
|
709
|
+
Start at this object in the partner's list.
|
|
710
|
+
|
|
711
|
+
limit : typing.Optional[int]
|
|
712
|
+
Objects to request per page.
|
|
713
|
+
|
|
714
|
+
full_replace : typing.Optional[bool]
|
|
715
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
716
|
+
|
|
717
|
+
request_options : typing.Optional[RequestOptions]
|
|
718
|
+
Request-specific configuration.
|
|
719
|
+
|
|
720
|
+
Returns
|
|
721
|
+
-------
|
|
722
|
+
SyncPullResponse
|
|
723
|
+
Successful Response
|
|
724
|
+
|
|
725
|
+
Examples
|
|
726
|
+
--------
|
|
727
|
+
from evcloud import EvcloudClient
|
|
728
|
+
|
|
729
|
+
client = EvcloudClient(
|
|
730
|
+
token="YOUR_TOKEN",
|
|
731
|
+
)
|
|
732
|
+
client.ocpi.sync.pull_hub_client_info_as_emsp(
|
|
733
|
+
version="221",
|
|
734
|
+
partner_id=7,
|
|
735
|
+
)
|
|
736
|
+
"""
|
|
737
|
+
_response = self._raw_client.pull_hub_client_info_as_emsp(
|
|
738
|
+
version,
|
|
739
|
+
partner_id=partner_id,
|
|
740
|
+
date_from=date_from,
|
|
741
|
+
date_to=date_to,
|
|
742
|
+
offset=offset,
|
|
743
|
+
limit=limit,
|
|
744
|
+
full_replace=full_replace,
|
|
745
|
+
request_options=request_options,
|
|
746
|
+
)
|
|
747
|
+
return _response.data
|
|
748
|
+
|
|
749
|
+
def pull_hub_client_info_as_cpo(
|
|
750
|
+
self,
|
|
751
|
+
version: PullHubClientInfoAsCpoSyncRequestVersion,
|
|
752
|
+
*,
|
|
753
|
+
partner_id: int,
|
|
754
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
755
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
756
|
+
offset: typing.Optional[int] = None,
|
|
757
|
+
limit: typing.Optional[int] = None,
|
|
758
|
+
full_replace: typing.Optional[bool] = None,
|
|
759
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
760
|
+
) -> SyncPullResponse:
|
|
761
|
+
"""
|
|
762
|
+
Fetches a Hub's ClientInfo list (which parties are reachable through it) into our CPO side. OCPI 2.2.1 and 2.3.0 only. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync (``date_from`` is then ignored). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
763
|
+
|
|
764
|
+
Parameters
|
|
765
|
+
----------
|
|
766
|
+
version : PullHubClientInfoAsCpoSyncRequestVersion
|
|
767
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
768
|
+
|
|
769
|
+
partner_id : int
|
|
770
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
771
|
+
|
|
772
|
+
date_from : typing.Optional[dt.datetime]
|
|
773
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
774
|
+
|
|
775
|
+
date_to : typing.Optional[dt.datetime]
|
|
776
|
+
Only objects changed before this time.
|
|
777
|
+
|
|
778
|
+
offset : typing.Optional[int]
|
|
779
|
+
Start at this object in the partner's list.
|
|
780
|
+
|
|
781
|
+
limit : typing.Optional[int]
|
|
782
|
+
Objects to request per page.
|
|
783
|
+
|
|
784
|
+
full_replace : typing.Optional[bool]
|
|
785
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
786
|
+
|
|
787
|
+
request_options : typing.Optional[RequestOptions]
|
|
788
|
+
Request-specific configuration.
|
|
789
|
+
|
|
790
|
+
Returns
|
|
791
|
+
-------
|
|
792
|
+
SyncPullResponse
|
|
793
|
+
Successful Response
|
|
794
|
+
|
|
795
|
+
Examples
|
|
796
|
+
--------
|
|
797
|
+
from evcloud import EvcloudClient
|
|
798
|
+
|
|
799
|
+
client = EvcloudClient(
|
|
800
|
+
token="YOUR_TOKEN",
|
|
801
|
+
)
|
|
802
|
+
client.ocpi.sync.pull_hub_client_info_as_cpo(
|
|
803
|
+
version="221",
|
|
804
|
+
partner_id=7,
|
|
805
|
+
)
|
|
806
|
+
"""
|
|
807
|
+
_response = self._raw_client.pull_hub_client_info_as_cpo(
|
|
808
|
+
version,
|
|
809
|
+
partner_id=partner_id,
|
|
810
|
+
date_from=date_from,
|
|
811
|
+
date_to=date_to,
|
|
812
|
+
offset=offset,
|
|
813
|
+
limit=limit,
|
|
814
|
+
full_replace=full_replace,
|
|
815
|
+
request_options=request_options,
|
|
816
|
+
)
|
|
817
|
+
return _response.data
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
class AsyncSyncClient:
|
|
821
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
822
|
+
self._raw_client = AsyncRawSyncClient(client_wrapper=client_wrapper)
|
|
823
|
+
|
|
824
|
+
@property
|
|
825
|
+
def with_raw_response(self) -> AsyncRawSyncClient:
|
|
826
|
+
"""
|
|
827
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
828
|
+
|
|
829
|
+
Returns
|
|
830
|
+
-------
|
|
831
|
+
AsyncRawSyncClient
|
|
832
|
+
"""
|
|
833
|
+
return self._raw_client
|
|
834
|
+
|
|
835
|
+
async def push_location(
|
|
836
|
+
self,
|
|
837
|
+
version: PushLocationSyncRequestVersion,
|
|
838
|
+
location_id: str,
|
|
839
|
+
*,
|
|
840
|
+
partner_id: int,
|
|
841
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
842
|
+
) -> SyncPushResponse:
|
|
843
|
+
"""
|
|
844
|
+
Sends a stored location to a partner eMSP (PUT to its Locations module). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
845
|
+
|
|
846
|
+
Parameters
|
|
847
|
+
----------
|
|
848
|
+
version : PushLocationSyncRequestVersion
|
|
849
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
850
|
+
|
|
851
|
+
location_id : str
|
|
852
|
+
OCPI ``id`` of the location.
|
|
853
|
+
|
|
854
|
+
partner_id : int
|
|
855
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
856
|
+
|
|
857
|
+
request_options : typing.Optional[RequestOptions]
|
|
858
|
+
Request-specific configuration.
|
|
859
|
+
|
|
860
|
+
Returns
|
|
861
|
+
-------
|
|
862
|
+
SyncPushResponse
|
|
863
|
+
Successful Response
|
|
864
|
+
|
|
865
|
+
Examples
|
|
866
|
+
--------
|
|
867
|
+
import asyncio
|
|
868
|
+
|
|
869
|
+
from evcloud import AsyncEvcloudClient
|
|
870
|
+
|
|
871
|
+
client = AsyncEvcloudClient(
|
|
872
|
+
token="YOUR_TOKEN",
|
|
873
|
+
)
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
async def main() -> None:
|
|
877
|
+
await client.ocpi.sync.push_location(
|
|
878
|
+
version="221",
|
|
879
|
+
location_id="LOC-AMS-1",
|
|
880
|
+
partner_id=7,
|
|
881
|
+
)
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
asyncio.run(main())
|
|
885
|
+
"""
|
|
886
|
+
_response = await self._raw_client.push_location(
|
|
887
|
+
version, location_id, partner_id=partner_id, request_options=request_options
|
|
888
|
+
)
|
|
889
|
+
return _response.data
|
|
890
|
+
|
|
891
|
+
async def push_cdr(
|
|
892
|
+
self,
|
|
893
|
+
version: PushCdrSyncRequestVersion,
|
|
894
|
+
cdr_id: str,
|
|
895
|
+
*,
|
|
896
|
+
partner_id: int,
|
|
897
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
898
|
+
) -> SyncPushResponse:
|
|
899
|
+
"""
|
|
900
|
+
Sends a stored CDR to a partner eMSP (POST to its CDRs module). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
901
|
+
|
|
902
|
+
Parameters
|
|
903
|
+
----------
|
|
904
|
+
version : PushCdrSyncRequestVersion
|
|
905
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
906
|
+
|
|
907
|
+
cdr_id : str
|
|
908
|
+
OCPI ``id`` of the CDR.
|
|
909
|
+
|
|
910
|
+
partner_id : int
|
|
911
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
912
|
+
|
|
913
|
+
request_options : typing.Optional[RequestOptions]
|
|
914
|
+
Request-specific configuration.
|
|
915
|
+
|
|
916
|
+
Returns
|
|
917
|
+
-------
|
|
918
|
+
SyncPushResponse
|
|
919
|
+
Successful Response
|
|
920
|
+
|
|
921
|
+
Examples
|
|
922
|
+
--------
|
|
923
|
+
import asyncio
|
|
924
|
+
|
|
925
|
+
from evcloud import AsyncEvcloudClient
|
|
926
|
+
|
|
927
|
+
client = AsyncEvcloudClient(
|
|
928
|
+
token="YOUR_TOKEN",
|
|
929
|
+
)
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
async def main() -> None:
|
|
933
|
+
await client.ocpi.sync.push_cdr(
|
|
934
|
+
version="221",
|
|
935
|
+
cdr_id="CDR-20260930-0001",
|
|
936
|
+
partner_id=7,
|
|
937
|
+
)
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
asyncio.run(main())
|
|
941
|
+
"""
|
|
942
|
+
_response = await self._raw_client.push_cdr(
|
|
943
|
+
version, cdr_id, partner_id=partner_id, request_options=request_options
|
|
944
|
+
)
|
|
945
|
+
return _response.data
|
|
946
|
+
|
|
947
|
+
async def push_tariff(
|
|
948
|
+
self,
|
|
949
|
+
version: PushTariffSyncRequestVersion,
|
|
950
|
+
tariff_id: str,
|
|
951
|
+
*,
|
|
952
|
+
partner_id: int,
|
|
953
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
954
|
+
) -> SyncPushResponse:
|
|
955
|
+
"""
|
|
956
|
+
Sends a stored tariff to a partner eMSP (PUT to its Tariffs module). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
957
|
+
|
|
958
|
+
Parameters
|
|
959
|
+
----------
|
|
960
|
+
version : PushTariffSyncRequestVersion
|
|
961
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
962
|
+
|
|
963
|
+
tariff_id : str
|
|
964
|
+
OCPI ``id`` of the tariff.
|
|
965
|
+
|
|
966
|
+
partner_id : int
|
|
967
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
968
|
+
|
|
969
|
+
request_options : typing.Optional[RequestOptions]
|
|
970
|
+
Request-specific configuration.
|
|
971
|
+
|
|
972
|
+
Returns
|
|
973
|
+
-------
|
|
974
|
+
SyncPushResponse
|
|
975
|
+
Successful Response
|
|
976
|
+
|
|
977
|
+
Examples
|
|
978
|
+
--------
|
|
979
|
+
import asyncio
|
|
980
|
+
|
|
981
|
+
from evcloud import AsyncEvcloudClient
|
|
982
|
+
|
|
983
|
+
client = AsyncEvcloudClient(
|
|
984
|
+
token="YOUR_TOKEN",
|
|
985
|
+
)
|
|
986
|
+
|
|
987
|
+
|
|
988
|
+
async def main() -> None:
|
|
989
|
+
await client.ocpi.sync.push_tariff(
|
|
990
|
+
version="221",
|
|
991
|
+
tariff_id="TARIFF-AC-STD",
|
|
992
|
+
partner_id=7,
|
|
993
|
+
)
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
asyncio.run(main())
|
|
997
|
+
"""
|
|
998
|
+
_response = await self._raw_client.push_tariff(
|
|
999
|
+
version, tariff_id, partner_id=partner_id, request_options=request_options
|
|
1000
|
+
)
|
|
1001
|
+
return _response.data
|
|
1002
|
+
|
|
1003
|
+
async def push_session(
|
|
1004
|
+
self,
|
|
1005
|
+
version: PushSessionSyncRequestVersion,
|
|
1006
|
+
session_id: str,
|
|
1007
|
+
*,
|
|
1008
|
+
partner_id: int,
|
|
1009
|
+
request: typing.Optional[SyncPatchRequest] = None,
|
|
1010
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1011
|
+
) -> SyncPushResponse:
|
|
1012
|
+
"""
|
|
1013
|
+
Sends a stored session to a partner eMSP: the full object, or only ``patch_body`` as a PATCH. ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
1014
|
+
|
|
1015
|
+
Parameters
|
|
1016
|
+
----------
|
|
1017
|
+
version : PushSessionSyncRequestVersion
|
|
1018
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
1019
|
+
|
|
1020
|
+
session_id : str
|
|
1021
|
+
OCPI ``id`` of the charging session.
|
|
1022
|
+
|
|
1023
|
+
partner_id : int
|
|
1024
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
1025
|
+
|
|
1026
|
+
request : typing.Optional[SyncPatchRequest]
|
|
1027
|
+
|
|
1028
|
+
request_options : typing.Optional[RequestOptions]
|
|
1029
|
+
Request-specific configuration.
|
|
1030
|
+
|
|
1031
|
+
Returns
|
|
1032
|
+
-------
|
|
1033
|
+
SyncPushResponse
|
|
1034
|
+
Successful Response
|
|
1035
|
+
|
|
1036
|
+
Examples
|
|
1037
|
+
--------
|
|
1038
|
+
import asyncio
|
|
1039
|
+
|
|
1040
|
+
from evcloud import AsyncEvcloudClient, SyncPatchRequest
|
|
1041
|
+
|
|
1042
|
+
client = AsyncEvcloudClient(
|
|
1043
|
+
token="YOUR_TOKEN",
|
|
1044
|
+
)
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
async def main() -> None:
|
|
1048
|
+
await client.ocpi.sync.push_session(
|
|
1049
|
+
version="221",
|
|
1050
|
+
session_id="SES-20260930-0001",
|
|
1051
|
+
partner_id=7,
|
|
1052
|
+
request=SyncPatchRequest(
|
|
1053
|
+
patch_body={"kwh": 18.2, "last_updated": "2026-09-30T10:00:00Z"},
|
|
1054
|
+
),
|
|
1055
|
+
)
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
asyncio.run(main())
|
|
1059
|
+
"""
|
|
1060
|
+
_response = await self._raw_client.push_session(
|
|
1061
|
+
version, session_id, partner_id=partner_id, request=request, request_options=request_options
|
|
1062
|
+
)
|
|
1063
|
+
return _response.data
|
|
1064
|
+
|
|
1065
|
+
async def push_token(
|
|
1066
|
+
self,
|
|
1067
|
+
version: PushTokenSyncRequestVersion,
|
|
1068
|
+
token_uid: str,
|
|
1069
|
+
*,
|
|
1070
|
+
partner_id: int,
|
|
1071
|
+
type: typing.Optional[str] = None,
|
|
1072
|
+
request: typing.Optional[SyncPatchRequest] = None,
|
|
1073
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1074
|
+
) -> SyncPushResponse:
|
|
1075
|
+
"""
|
|
1076
|
+
Sends a stored token to a partner CPO: the full object, or only ``patch_body`` as a PATCH. ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
1077
|
+
|
|
1078
|
+
Parameters
|
|
1079
|
+
----------
|
|
1080
|
+
version : PushTokenSyncRequestVersion
|
|
1081
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
1082
|
+
|
|
1083
|
+
token_uid : str
|
|
1084
|
+
OCPI ``uid`` of the token.
|
|
1085
|
+
|
|
1086
|
+
partner_id : int
|
|
1087
|
+
Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
|
|
1088
|
+
|
|
1089
|
+
type : typing.Optional[str]
|
|
1090
|
+
Token type (e.g. ``RFID``, ``APP_USER``), used to find the token when the OCPI body does not carry ``type``.
|
|
1091
|
+
|
|
1092
|
+
request : typing.Optional[SyncPatchRequest]
|
|
1093
|
+
|
|
1094
|
+
request_options : typing.Optional[RequestOptions]
|
|
1095
|
+
Request-specific configuration.
|
|
1096
|
+
|
|
1097
|
+
Returns
|
|
1098
|
+
-------
|
|
1099
|
+
SyncPushResponse
|
|
1100
|
+
Successful Response
|
|
1101
|
+
|
|
1102
|
+
Examples
|
|
1103
|
+
--------
|
|
1104
|
+
import asyncio
|
|
1105
|
+
|
|
1106
|
+
from evcloud import AsyncEvcloudClient, SyncPatchRequest
|
|
1107
|
+
|
|
1108
|
+
client = AsyncEvcloudClient(
|
|
1109
|
+
token="YOUR_TOKEN",
|
|
1110
|
+
)
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
async def main() -> None:
|
|
1114
|
+
await client.ocpi.sync.push_token(
|
|
1115
|
+
version="221",
|
|
1116
|
+
token_uid="04A2B3C4D5E6F7",
|
|
1117
|
+
partner_id=7,
|
|
1118
|
+
type="RFID",
|
|
1119
|
+
request=SyncPatchRequest(
|
|
1120
|
+
patch_body={"valid": False, "last_updated": "2026-09-30T10:00:00Z"},
|
|
1121
|
+
),
|
|
1122
|
+
)
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
asyncio.run(main())
|
|
1126
|
+
"""
|
|
1127
|
+
_response = await self._raw_client.push_token(
|
|
1128
|
+
version, token_uid, partner_id=partner_id, type=type, request=request, request_options=request_options
|
|
1129
|
+
)
|
|
1130
|
+
return _response.data
|
|
1131
|
+
|
|
1132
|
+
async def pull_tokens(
|
|
1133
|
+
self,
|
|
1134
|
+
version: PullTokensSyncRequestVersion,
|
|
1135
|
+
*,
|
|
1136
|
+
partner_id: int,
|
|
1137
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
1138
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
1139
|
+
offset: typing.Optional[int] = None,
|
|
1140
|
+
limit: typing.Optional[int] = None,
|
|
1141
|
+
full_replace: typing.Optional[bool] = None,
|
|
1142
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1143
|
+
) -> SyncPullResponse:
|
|
1144
|
+
"""
|
|
1145
|
+
Fetches tokens from a partner eMSP's Tokens module, page by page. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync (``date_from`` is then ignored). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
1146
|
+
|
|
1147
|
+
Parameters
|
|
1148
|
+
----------
|
|
1149
|
+
version : PullTokensSyncRequestVersion
|
|
1150
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
1151
|
+
|
|
1152
|
+
partner_id : int
|
|
1153
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
1154
|
+
|
|
1155
|
+
date_from : typing.Optional[dt.datetime]
|
|
1156
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
1157
|
+
|
|
1158
|
+
date_to : typing.Optional[dt.datetime]
|
|
1159
|
+
Only objects changed before this time.
|
|
1160
|
+
|
|
1161
|
+
offset : typing.Optional[int]
|
|
1162
|
+
Start at this object in the partner's list.
|
|
1163
|
+
|
|
1164
|
+
limit : typing.Optional[int]
|
|
1165
|
+
Objects to request per page.
|
|
1166
|
+
|
|
1167
|
+
full_replace : typing.Optional[bool]
|
|
1168
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
1169
|
+
|
|
1170
|
+
request_options : typing.Optional[RequestOptions]
|
|
1171
|
+
Request-specific configuration.
|
|
1172
|
+
|
|
1173
|
+
Returns
|
|
1174
|
+
-------
|
|
1175
|
+
SyncPullResponse
|
|
1176
|
+
Successful Response
|
|
1177
|
+
|
|
1178
|
+
Examples
|
|
1179
|
+
--------
|
|
1180
|
+
import asyncio
|
|
1181
|
+
import datetime
|
|
1182
|
+
|
|
1183
|
+
from evcloud import AsyncEvcloudClient
|
|
1184
|
+
|
|
1185
|
+
client = AsyncEvcloudClient(
|
|
1186
|
+
token="YOUR_TOKEN",
|
|
1187
|
+
)
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
async def main() -> None:
|
|
1191
|
+
await client.ocpi.sync.pull_tokens(
|
|
1192
|
+
version="221",
|
|
1193
|
+
partner_id=7,
|
|
1194
|
+
date_from=datetime.datetime.fromisoformat(
|
|
1195
|
+
"2026-09-29 00:00:00+00:00",
|
|
1196
|
+
),
|
|
1197
|
+
limit=500,
|
|
1198
|
+
)
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
asyncio.run(main())
|
|
1202
|
+
"""
|
|
1203
|
+
_response = await self._raw_client.pull_tokens(
|
|
1204
|
+
version,
|
|
1205
|
+
partner_id=partner_id,
|
|
1206
|
+
date_from=date_from,
|
|
1207
|
+
date_to=date_to,
|
|
1208
|
+
offset=offset,
|
|
1209
|
+
limit=limit,
|
|
1210
|
+
full_replace=full_replace,
|
|
1211
|
+
request_options=request_options,
|
|
1212
|
+
)
|
|
1213
|
+
return _response.data
|
|
1214
|
+
|
|
1215
|
+
async def pull_locations(
|
|
1216
|
+
self,
|
|
1217
|
+
version: PullLocationsSyncRequestVersion,
|
|
1218
|
+
*,
|
|
1219
|
+
partner_id: int,
|
|
1220
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
1221
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
1222
|
+
offset: typing.Optional[int] = None,
|
|
1223
|
+
limit: typing.Optional[int] = None,
|
|
1224
|
+
full_replace: typing.Optional[bool] = None,
|
|
1225
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1226
|
+
) -> SyncPullResponse:
|
|
1227
|
+
"""
|
|
1228
|
+
Fetches locations from a partner CPO's Locations module, page by page. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync (``date_from`` is then ignored). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
1229
|
+
|
|
1230
|
+
Parameters
|
|
1231
|
+
----------
|
|
1232
|
+
version : PullLocationsSyncRequestVersion
|
|
1233
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
1234
|
+
|
|
1235
|
+
partner_id : int
|
|
1236
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
1237
|
+
|
|
1238
|
+
date_from : typing.Optional[dt.datetime]
|
|
1239
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
1240
|
+
|
|
1241
|
+
date_to : typing.Optional[dt.datetime]
|
|
1242
|
+
Only objects changed before this time.
|
|
1243
|
+
|
|
1244
|
+
offset : typing.Optional[int]
|
|
1245
|
+
Start at this object in the partner's list.
|
|
1246
|
+
|
|
1247
|
+
limit : typing.Optional[int]
|
|
1248
|
+
Objects to request per page.
|
|
1249
|
+
|
|
1250
|
+
full_replace : typing.Optional[bool]
|
|
1251
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
1252
|
+
|
|
1253
|
+
request_options : typing.Optional[RequestOptions]
|
|
1254
|
+
Request-specific configuration.
|
|
1255
|
+
|
|
1256
|
+
Returns
|
|
1257
|
+
-------
|
|
1258
|
+
SyncPullResponse
|
|
1259
|
+
Successful Response
|
|
1260
|
+
|
|
1261
|
+
Examples
|
|
1262
|
+
--------
|
|
1263
|
+
import asyncio
|
|
1264
|
+
import datetime
|
|
1265
|
+
|
|
1266
|
+
from evcloud import AsyncEvcloudClient
|
|
1267
|
+
|
|
1268
|
+
client = AsyncEvcloudClient(
|
|
1269
|
+
token="YOUR_TOKEN",
|
|
1270
|
+
)
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
async def main() -> None:
|
|
1274
|
+
await client.ocpi.sync.pull_locations(
|
|
1275
|
+
version="221",
|
|
1276
|
+
partner_id=7,
|
|
1277
|
+
date_from=datetime.datetime.fromisoformat(
|
|
1278
|
+
"2026-09-29 00:00:00+00:00",
|
|
1279
|
+
),
|
|
1280
|
+
limit=500,
|
|
1281
|
+
)
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
asyncio.run(main())
|
|
1285
|
+
"""
|
|
1286
|
+
_response = await self._raw_client.pull_locations(
|
|
1287
|
+
version,
|
|
1288
|
+
partner_id=partner_id,
|
|
1289
|
+
date_from=date_from,
|
|
1290
|
+
date_to=date_to,
|
|
1291
|
+
offset=offset,
|
|
1292
|
+
limit=limit,
|
|
1293
|
+
full_replace=full_replace,
|
|
1294
|
+
request_options=request_options,
|
|
1295
|
+
)
|
|
1296
|
+
return _response.data
|
|
1297
|
+
|
|
1298
|
+
async def pull_sessions(
|
|
1299
|
+
self,
|
|
1300
|
+
version: PullSessionsSyncRequestVersion,
|
|
1301
|
+
*,
|
|
1302
|
+
partner_id: int,
|
|
1303
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
1304
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
1305
|
+
offset: typing.Optional[int] = None,
|
|
1306
|
+
limit: typing.Optional[int] = None,
|
|
1307
|
+
full_replace: typing.Optional[bool] = None,
|
|
1308
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1309
|
+
) -> SyncPullResponse:
|
|
1310
|
+
"""
|
|
1311
|
+
Fetches sessions from a partner CPO's Sessions module, page by page. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync (``date_from`` is then ignored). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
1312
|
+
|
|
1313
|
+
Parameters
|
|
1314
|
+
----------
|
|
1315
|
+
version : PullSessionsSyncRequestVersion
|
|
1316
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
1317
|
+
|
|
1318
|
+
partner_id : int
|
|
1319
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
1320
|
+
|
|
1321
|
+
date_from : typing.Optional[dt.datetime]
|
|
1322
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
1323
|
+
|
|
1324
|
+
date_to : typing.Optional[dt.datetime]
|
|
1325
|
+
Only objects changed before this time.
|
|
1326
|
+
|
|
1327
|
+
offset : typing.Optional[int]
|
|
1328
|
+
Start at this object in the partner's list.
|
|
1329
|
+
|
|
1330
|
+
limit : typing.Optional[int]
|
|
1331
|
+
Objects to request per page.
|
|
1332
|
+
|
|
1333
|
+
full_replace : typing.Optional[bool]
|
|
1334
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
1335
|
+
|
|
1336
|
+
request_options : typing.Optional[RequestOptions]
|
|
1337
|
+
Request-specific configuration.
|
|
1338
|
+
|
|
1339
|
+
Returns
|
|
1340
|
+
-------
|
|
1341
|
+
SyncPullResponse
|
|
1342
|
+
Successful Response
|
|
1343
|
+
|
|
1344
|
+
Examples
|
|
1345
|
+
--------
|
|
1346
|
+
import asyncio
|
|
1347
|
+
import datetime
|
|
1348
|
+
|
|
1349
|
+
from evcloud import AsyncEvcloudClient
|
|
1350
|
+
|
|
1351
|
+
client = AsyncEvcloudClient(
|
|
1352
|
+
token="YOUR_TOKEN",
|
|
1353
|
+
)
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
async def main() -> None:
|
|
1357
|
+
await client.ocpi.sync.pull_sessions(
|
|
1358
|
+
version="221",
|
|
1359
|
+
partner_id=7,
|
|
1360
|
+
date_from=datetime.datetime.fromisoformat(
|
|
1361
|
+
"2026-09-29 00:00:00+00:00",
|
|
1362
|
+
),
|
|
1363
|
+
limit=500,
|
|
1364
|
+
)
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
asyncio.run(main())
|
|
1368
|
+
"""
|
|
1369
|
+
_response = await self._raw_client.pull_sessions(
|
|
1370
|
+
version,
|
|
1371
|
+
partner_id=partner_id,
|
|
1372
|
+
date_from=date_from,
|
|
1373
|
+
date_to=date_to,
|
|
1374
|
+
offset=offset,
|
|
1375
|
+
limit=limit,
|
|
1376
|
+
full_replace=full_replace,
|
|
1377
|
+
request_options=request_options,
|
|
1378
|
+
)
|
|
1379
|
+
return _response.data
|
|
1380
|
+
|
|
1381
|
+
async def pull_cdrs(
|
|
1382
|
+
self,
|
|
1383
|
+
version: PullCdrsSyncRequestVersion,
|
|
1384
|
+
*,
|
|
1385
|
+
partner_id: int,
|
|
1386
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
1387
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
1388
|
+
offset: typing.Optional[int] = None,
|
|
1389
|
+
limit: typing.Optional[int] = None,
|
|
1390
|
+
full_replace: typing.Optional[bool] = None,
|
|
1391
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1392
|
+
) -> SyncPullResponse:
|
|
1393
|
+
"""
|
|
1394
|
+
Fetches CDRs from a partner CPO's CDRs module, page by page. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync. ``date_from`` is then ignored. ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
1395
|
+
|
|
1396
|
+
Parameters
|
|
1397
|
+
----------
|
|
1398
|
+
version : PullCdrsSyncRequestVersion
|
|
1399
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
1400
|
+
|
|
1401
|
+
partner_id : int
|
|
1402
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
1403
|
+
|
|
1404
|
+
date_from : typing.Optional[dt.datetime]
|
|
1405
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
1406
|
+
|
|
1407
|
+
date_to : typing.Optional[dt.datetime]
|
|
1408
|
+
Only objects changed before this time.
|
|
1409
|
+
|
|
1410
|
+
offset : typing.Optional[int]
|
|
1411
|
+
Start at this object in the partner's list.
|
|
1412
|
+
|
|
1413
|
+
limit : typing.Optional[int]
|
|
1414
|
+
Objects to request per page.
|
|
1415
|
+
|
|
1416
|
+
full_replace : typing.Optional[bool]
|
|
1417
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
1418
|
+
|
|
1419
|
+
request_options : typing.Optional[RequestOptions]
|
|
1420
|
+
Request-specific configuration.
|
|
1421
|
+
|
|
1422
|
+
Returns
|
|
1423
|
+
-------
|
|
1424
|
+
SyncPullResponse
|
|
1425
|
+
Successful Response
|
|
1426
|
+
|
|
1427
|
+
Examples
|
|
1428
|
+
--------
|
|
1429
|
+
import asyncio
|
|
1430
|
+
import datetime
|
|
1431
|
+
|
|
1432
|
+
from evcloud import AsyncEvcloudClient
|
|
1433
|
+
|
|
1434
|
+
client = AsyncEvcloudClient(
|
|
1435
|
+
token="YOUR_TOKEN",
|
|
1436
|
+
)
|
|
1437
|
+
|
|
1438
|
+
|
|
1439
|
+
async def main() -> None:
|
|
1440
|
+
await client.ocpi.sync.pull_cdrs(
|
|
1441
|
+
version="221",
|
|
1442
|
+
partner_id=7,
|
|
1443
|
+
date_from=datetime.datetime.fromisoformat(
|
|
1444
|
+
"2026-09-29 00:00:00+00:00",
|
|
1445
|
+
),
|
|
1446
|
+
limit=500,
|
|
1447
|
+
)
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
asyncio.run(main())
|
|
1451
|
+
"""
|
|
1452
|
+
_response = await self._raw_client.pull_cdrs(
|
|
1453
|
+
version,
|
|
1454
|
+
partner_id=partner_id,
|
|
1455
|
+
date_from=date_from,
|
|
1456
|
+
date_to=date_to,
|
|
1457
|
+
offset=offset,
|
|
1458
|
+
limit=limit,
|
|
1459
|
+
full_replace=full_replace,
|
|
1460
|
+
request_options=request_options,
|
|
1461
|
+
)
|
|
1462
|
+
return _response.data
|
|
1463
|
+
|
|
1464
|
+
async def pull_tariffs(
|
|
1465
|
+
self,
|
|
1466
|
+
version: PullTariffsSyncRequestVersion,
|
|
1467
|
+
*,
|
|
1468
|
+
partner_id: int,
|
|
1469
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
1470
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
1471
|
+
offset: typing.Optional[int] = None,
|
|
1472
|
+
limit: typing.Optional[int] = None,
|
|
1473
|
+
full_replace: typing.Optional[bool] = None,
|
|
1474
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1475
|
+
) -> SyncPullResponse:
|
|
1476
|
+
"""
|
|
1477
|
+
Fetches tariffs from a partner CPO's Tariffs module, page by page. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync (``date_from`` is then ignored). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
1478
|
+
|
|
1479
|
+
Parameters
|
|
1480
|
+
----------
|
|
1481
|
+
version : PullTariffsSyncRequestVersion
|
|
1482
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
1483
|
+
|
|
1484
|
+
partner_id : int
|
|
1485
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
1486
|
+
|
|
1487
|
+
date_from : typing.Optional[dt.datetime]
|
|
1488
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
1489
|
+
|
|
1490
|
+
date_to : typing.Optional[dt.datetime]
|
|
1491
|
+
Only objects changed before this time.
|
|
1492
|
+
|
|
1493
|
+
offset : typing.Optional[int]
|
|
1494
|
+
Start at this object in the partner's list.
|
|
1495
|
+
|
|
1496
|
+
limit : typing.Optional[int]
|
|
1497
|
+
Objects to request per page.
|
|
1498
|
+
|
|
1499
|
+
full_replace : typing.Optional[bool]
|
|
1500
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
1501
|
+
|
|
1502
|
+
request_options : typing.Optional[RequestOptions]
|
|
1503
|
+
Request-specific configuration.
|
|
1504
|
+
|
|
1505
|
+
Returns
|
|
1506
|
+
-------
|
|
1507
|
+
SyncPullResponse
|
|
1508
|
+
Successful Response
|
|
1509
|
+
|
|
1510
|
+
Examples
|
|
1511
|
+
--------
|
|
1512
|
+
import asyncio
|
|
1513
|
+
import datetime
|
|
1514
|
+
|
|
1515
|
+
from evcloud import AsyncEvcloudClient
|
|
1516
|
+
|
|
1517
|
+
client = AsyncEvcloudClient(
|
|
1518
|
+
token="YOUR_TOKEN",
|
|
1519
|
+
)
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
async def main() -> None:
|
|
1523
|
+
await client.ocpi.sync.pull_tariffs(
|
|
1524
|
+
version="221",
|
|
1525
|
+
partner_id=7,
|
|
1526
|
+
date_from=datetime.datetime.fromisoformat(
|
|
1527
|
+
"2026-09-29 00:00:00+00:00",
|
|
1528
|
+
),
|
|
1529
|
+
limit=500,
|
|
1530
|
+
)
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
asyncio.run(main())
|
|
1534
|
+
"""
|
|
1535
|
+
_response = await self._raw_client.pull_tariffs(
|
|
1536
|
+
version,
|
|
1537
|
+
partner_id=partner_id,
|
|
1538
|
+
date_from=date_from,
|
|
1539
|
+
date_to=date_to,
|
|
1540
|
+
offset=offset,
|
|
1541
|
+
limit=limit,
|
|
1542
|
+
full_replace=full_replace,
|
|
1543
|
+
request_options=request_options,
|
|
1544
|
+
)
|
|
1545
|
+
return _response.data
|
|
1546
|
+
|
|
1547
|
+
async def pull_hub_client_info_as_emsp(
|
|
1548
|
+
self,
|
|
1549
|
+
version: PullHubClientInfoAsEmspSyncRequestVersion,
|
|
1550
|
+
*,
|
|
1551
|
+
partner_id: int,
|
|
1552
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
1553
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
1554
|
+
offset: typing.Optional[int] = None,
|
|
1555
|
+
limit: typing.Optional[int] = None,
|
|
1556
|
+
full_replace: typing.Optional[bool] = None,
|
|
1557
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1558
|
+
) -> SyncPullResponse:
|
|
1559
|
+
"""
|
|
1560
|
+
Fetches a Hub's ClientInfo list (which parties are reachable through it) into our eMSP side. OCPI 2.2.1 and 2.3.0 only. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync (``date_from`` is then ignored). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
1561
|
+
|
|
1562
|
+
Parameters
|
|
1563
|
+
----------
|
|
1564
|
+
version : PullHubClientInfoAsEmspSyncRequestVersion
|
|
1565
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
1566
|
+
|
|
1567
|
+
partner_id : int
|
|
1568
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
1569
|
+
|
|
1570
|
+
date_from : typing.Optional[dt.datetime]
|
|
1571
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
1572
|
+
|
|
1573
|
+
date_to : typing.Optional[dt.datetime]
|
|
1574
|
+
Only objects changed before this time.
|
|
1575
|
+
|
|
1576
|
+
offset : typing.Optional[int]
|
|
1577
|
+
Start at this object in the partner's list.
|
|
1578
|
+
|
|
1579
|
+
limit : typing.Optional[int]
|
|
1580
|
+
Objects to request per page.
|
|
1581
|
+
|
|
1582
|
+
full_replace : typing.Optional[bool]
|
|
1583
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
1584
|
+
|
|
1585
|
+
request_options : typing.Optional[RequestOptions]
|
|
1586
|
+
Request-specific configuration.
|
|
1587
|
+
|
|
1588
|
+
Returns
|
|
1589
|
+
-------
|
|
1590
|
+
SyncPullResponse
|
|
1591
|
+
Successful Response
|
|
1592
|
+
|
|
1593
|
+
Examples
|
|
1594
|
+
--------
|
|
1595
|
+
import asyncio
|
|
1596
|
+
|
|
1597
|
+
from evcloud import AsyncEvcloudClient
|
|
1598
|
+
|
|
1599
|
+
client = AsyncEvcloudClient(
|
|
1600
|
+
token="YOUR_TOKEN",
|
|
1601
|
+
)
|
|
1602
|
+
|
|
1603
|
+
|
|
1604
|
+
async def main() -> None:
|
|
1605
|
+
await client.ocpi.sync.pull_hub_client_info_as_emsp(
|
|
1606
|
+
version="221",
|
|
1607
|
+
partner_id=7,
|
|
1608
|
+
)
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
asyncio.run(main())
|
|
1612
|
+
"""
|
|
1613
|
+
_response = await self._raw_client.pull_hub_client_info_as_emsp(
|
|
1614
|
+
version,
|
|
1615
|
+
partner_id=partner_id,
|
|
1616
|
+
date_from=date_from,
|
|
1617
|
+
date_to=date_to,
|
|
1618
|
+
offset=offset,
|
|
1619
|
+
limit=limit,
|
|
1620
|
+
full_replace=full_replace,
|
|
1621
|
+
request_options=request_options,
|
|
1622
|
+
)
|
|
1623
|
+
return _response.data
|
|
1624
|
+
|
|
1625
|
+
async def pull_hub_client_info_as_cpo(
|
|
1626
|
+
self,
|
|
1627
|
+
version: PullHubClientInfoAsCpoSyncRequestVersion,
|
|
1628
|
+
*,
|
|
1629
|
+
partner_id: int,
|
|
1630
|
+
date_from: typing.Optional[dt.datetime] = None,
|
|
1631
|
+
date_to: typing.Optional[dt.datetime] = None,
|
|
1632
|
+
offset: typing.Optional[int] = None,
|
|
1633
|
+
limit: typing.Optional[int] = None,
|
|
1634
|
+
full_replace: typing.Optional[bool] = None,
|
|
1635
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1636
|
+
) -> SyncPullResponse:
|
|
1637
|
+
"""
|
|
1638
|
+
Fetches a Hub's ClientInfo list (which parties are reachable through it) into our CPO side. OCPI 2.2.1 and 2.3.0 only. Results are stored in the OCPI store. Pulls are incremental from the last sync; set ``full_replace=true`` for a full resync (``date_from`` is then ignored). ``partner_id`` is the roaming partner id (``roaming_partner_id``), not the operation id from ``GET /ocpi/partners``.
|
|
1639
|
+
|
|
1640
|
+
Parameters
|
|
1641
|
+
----------
|
|
1642
|
+
version : PullHubClientInfoAsCpoSyncRequestVersion
|
|
1643
|
+
OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
|
|
1644
|
+
|
|
1645
|
+
partner_id : int
|
|
1646
|
+
Roaming partner to pull from: its ``roaming_partner_id`` from GET /ocpi/partners.
|
|
1647
|
+
|
|
1648
|
+
date_from : typing.Optional[dt.datetime]
|
|
1649
|
+
Only objects changed at or after this time. Default: since the last sync.
|
|
1650
|
+
|
|
1651
|
+
date_to : typing.Optional[dt.datetime]
|
|
1652
|
+
Only objects changed before this time.
|
|
1653
|
+
|
|
1654
|
+
offset : typing.Optional[int]
|
|
1655
|
+
Start at this object in the partner's list.
|
|
1656
|
+
|
|
1657
|
+
limit : typing.Optional[int]
|
|
1658
|
+
Objects to request per page.
|
|
1659
|
+
|
|
1660
|
+
full_replace : typing.Optional[bool]
|
|
1661
|
+
Full pull: ``date_from``/``date_to`` and the stored cursor are ignored. For eMSP locations and tariffs it crawls the whole list and, after a clean last page, soft-deletes this partner's rows no page listed.
|
|
1662
|
+
|
|
1663
|
+
request_options : typing.Optional[RequestOptions]
|
|
1664
|
+
Request-specific configuration.
|
|
1665
|
+
|
|
1666
|
+
Returns
|
|
1667
|
+
-------
|
|
1668
|
+
SyncPullResponse
|
|
1669
|
+
Successful Response
|
|
1670
|
+
|
|
1671
|
+
Examples
|
|
1672
|
+
--------
|
|
1673
|
+
import asyncio
|
|
1674
|
+
|
|
1675
|
+
from evcloud import AsyncEvcloudClient
|
|
1676
|
+
|
|
1677
|
+
client = AsyncEvcloudClient(
|
|
1678
|
+
token="YOUR_TOKEN",
|
|
1679
|
+
)
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
async def main() -> None:
|
|
1683
|
+
await client.ocpi.sync.pull_hub_client_info_as_cpo(
|
|
1684
|
+
version="221",
|
|
1685
|
+
partner_id=7,
|
|
1686
|
+
)
|
|
1687
|
+
|
|
1688
|
+
|
|
1689
|
+
asyncio.run(main())
|
|
1690
|
+
"""
|
|
1691
|
+
_response = await self._raw_client.pull_hub_client_info_as_cpo(
|
|
1692
|
+
version,
|
|
1693
|
+
partner_id=partner_id,
|
|
1694
|
+
date_from=date_from,
|
|
1695
|
+
date_to=date_to,
|
|
1696
|
+
offset=offset,
|
|
1697
|
+
limit=limit,
|
|
1698
|
+
full_replace=full_replace,
|
|
1699
|
+
request_options=request_options,
|
|
1700
|
+
)
|
|
1701
|
+
return _response.data
|