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,1256 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ...core.pagination import AsyncPager, SyncPager
|
|
7
|
+
from ...core.request_options import RequestOptions
|
|
8
|
+
from ...types.token_group_action_out import TokenGroupActionOut
|
|
9
|
+
from ...types.token_group_network_out import TokenGroupNetworkOut
|
|
10
|
+
from ...types.token_group_network_page import TokenGroupNetworkPage
|
|
11
|
+
from ...types.token_group_out import TokenGroupOut
|
|
12
|
+
from ...types.token_group_page import TokenGroupPage
|
|
13
|
+
from ...types.token_ref import TokenRef
|
|
14
|
+
from .raw_client import AsyncRawTokenGroupsClient, RawTokenGroupsClient
|
|
15
|
+
from .types.remove_token_token_groups_request_type import RemoveTokenTokenGroupsRequestType
|
|
16
|
+
|
|
17
|
+
# this is used as the default value for optional parameters
|
|
18
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class TokenGroupsClient:
|
|
22
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
23
|
+
self._raw_client = RawTokenGroupsClient(client_wrapper=client_wrapper)
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def with_raw_response(self) -> RawTokenGroupsClient:
|
|
27
|
+
"""
|
|
28
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
29
|
+
|
|
30
|
+
Returns
|
|
31
|
+
-------
|
|
32
|
+
RawTokenGroupsClient
|
|
33
|
+
"""
|
|
34
|
+
return self._raw_client
|
|
35
|
+
|
|
36
|
+
def list(
|
|
37
|
+
self,
|
|
38
|
+
*,
|
|
39
|
+
after: typing.Optional[str] = None,
|
|
40
|
+
limit: typing.Optional[int] = None,
|
|
41
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
42
|
+
) -> SyncPager[TokenGroupOut, TokenGroupPage]:
|
|
43
|
+
"""
|
|
44
|
+
Your token groups with their members.
|
|
45
|
+
|
|
46
|
+
Parameters
|
|
47
|
+
----------
|
|
48
|
+
after : typing.Optional[str]
|
|
49
|
+
Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
|
|
50
|
+
|
|
51
|
+
limit : typing.Optional[int]
|
|
52
|
+
Maximum rows per page (default 50, max 200).
|
|
53
|
+
|
|
54
|
+
request_options : typing.Optional[RequestOptions]
|
|
55
|
+
Request-specific configuration.
|
|
56
|
+
|
|
57
|
+
Returns
|
|
58
|
+
-------
|
|
59
|
+
SyncPager[TokenGroupOut, TokenGroupPage]
|
|
60
|
+
One page of groups with their members.
|
|
61
|
+
|
|
62
|
+
Examples
|
|
63
|
+
--------
|
|
64
|
+
from evcloud import EvcloudClient
|
|
65
|
+
|
|
66
|
+
client = EvcloudClient(
|
|
67
|
+
token="YOUR_TOKEN",
|
|
68
|
+
)
|
|
69
|
+
response = client.emsp.token_groups.list(
|
|
70
|
+
limit=50,
|
|
71
|
+
)
|
|
72
|
+
for item in response:
|
|
73
|
+
yield item
|
|
74
|
+
# alternatively, you can paginate page-by-page
|
|
75
|
+
for page in response.iter_pages():
|
|
76
|
+
yield page
|
|
77
|
+
"""
|
|
78
|
+
return self._raw_client.list(after=after, limit=limit, request_options=request_options)
|
|
79
|
+
|
|
80
|
+
def create(
|
|
81
|
+
self,
|
|
82
|
+
*,
|
|
83
|
+
idempotency_key: str,
|
|
84
|
+
name: str,
|
|
85
|
+
description: typing.Optional[str] = OMIT,
|
|
86
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
87
|
+
) -> TokenGroupOut:
|
|
88
|
+
"""
|
|
89
|
+
An empty group; add tokens and assign networks to it afterwards.
|
|
90
|
+
|
|
91
|
+
Parameters
|
|
92
|
+
----------
|
|
93
|
+
idempotency_key : str
|
|
94
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
95
|
+
|
|
96
|
+
name : str
|
|
97
|
+
|
|
98
|
+
description : typing.Optional[str]
|
|
99
|
+
|
|
100
|
+
request_options : typing.Optional[RequestOptions]
|
|
101
|
+
Request-specific configuration.
|
|
102
|
+
|
|
103
|
+
Returns
|
|
104
|
+
-------
|
|
105
|
+
TokenGroupOut
|
|
106
|
+
The created, empty group.
|
|
107
|
+
|
|
108
|
+
Examples
|
|
109
|
+
--------
|
|
110
|
+
from evcloud import EvcloudClient
|
|
111
|
+
|
|
112
|
+
client = EvcloudClient(
|
|
113
|
+
token="YOUR_TOKEN",
|
|
114
|
+
)
|
|
115
|
+
client.emsp.token_groups.create(
|
|
116
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
117
|
+
name="Fleet cards",
|
|
118
|
+
description="Company cars",
|
|
119
|
+
)
|
|
120
|
+
"""
|
|
121
|
+
_response = self._raw_client.create(
|
|
122
|
+
idempotency_key=idempotency_key, name=name, description=description, request_options=request_options
|
|
123
|
+
)
|
|
124
|
+
return _response.data
|
|
125
|
+
|
|
126
|
+
def get(self, group_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> TokenGroupOut:
|
|
127
|
+
"""
|
|
128
|
+
One group with its members.
|
|
129
|
+
|
|
130
|
+
Parameters
|
|
131
|
+
----------
|
|
132
|
+
group_id : int
|
|
133
|
+
The token group's ``id``.
|
|
134
|
+
|
|
135
|
+
request_options : typing.Optional[RequestOptions]
|
|
136
|
+
Request-specific configuration.
|
|
137
|
+
|
|
138
|
+
Returns
|
|
139
|
+
-------
|
|
140
|
+
TokenGroupOut
|
|
141
|
+
The group with its members.
|
|
142
|
+
|
|
143
|
+
Examples
|
|
144
|
+
--------
|
|
145
|
+
from evcloud import EvcloudClient
|
|
146
|
+
|
|
147
|
+
client = EvcloudClient(
|
|
148
|
+
token="YOUR_TOKEN",
|
|
149
|
+
)
|
|
150
|
+
client.emsp.token_groups.get(
|
|
151
|
+
group_id=12,
|
|
152
|
+
)
|
|
153
|
+
"""
|
|
154
|
+
_response = self._raw_client.get(group_id, request_options=request_options)
|
|
155
|
+
return _response.data
|
|
156
|
+
|
|
157
|
+
def update(
|
|
158
|
+
self,
|
|
159
|
+
group_id: int,
|
|
160
|
+
*,
|
|
161
|
+
name: typing.Optional[str] = OMIT,
|
|
162
|
+
description: typing.Optional[str] = OMIT,
|
|
163
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
164
|
+
) -> TokenGroupOut:
|
|
165
|
+
"""
|
|
166
|
+
Rename the group or replace its description; send ``description: null`` to clear it.
|
|
167
|
+
|
|
168
|
+
Parameters
|
|
169
|
+
----------
|
|
170
|
+
group_id : int
|
|
171
|
+
The token group's ``id``.
|
|
172
|
+
|
|
173
|
+
name : typing.Optional[str]
|
|
174
|
+
|
|
175
|
+
description : typing.Optional[str]
|
|
176
|
+
|
|
177
|
+
request_options : typing.Optional[RequestOptions]
|
|
178
|
+
Request-specific configuration.
|
|
179
|
+
|
|
180
|
+
Returns
|
|
181
|
+
-------
|
|
182
|
+
TokenGroupOut
|
|
183
|
+
The group after the update.
|
|
184
|
+
|
|
185
|
+
Examples
|
|
186
|
+
--------
|
|
187
|
+
from evcloud import EvcloudClient
|
|
188
|
+
|
|
189
|
+
client = EvcloudClient(
|
|
190
|
+
token="YOUR_TOKEN",
|
|
191
|
+
)
|
|
192
|
+
client.emsp.token_groups.update(
|
|
193
|
+
group_id=12,
|
|
194
|
+
name="Fleet cards NL",
|
|
195
|
+
)
|
|
196
|
+
"""
|
|
197
|
+
_response = self._raw_client.update(
|
|
198
|
+
group_id, name=name, description=description, request_options=request_options
|
|
199
|
+
)
|
|
200
|
+
return _response.data
|
|
201
|
+
|
|
202
|
+
def activate(
|
|
203
|
+
self, group_id: int, *, idempotency_key: str, request_options: typing.Optional[RequestOptions] = None
|
|
204
|
+
) -> TokenGroupActionOut:
|
|
205
|
+
"""
|
|
206
|
+
PROVISIONED members are activated and SUSPENDED ones reactivated, and pushed to partners with ``valid: true``. Revoked members stay invalid.
|
|
207
|
+
|
|
208
|
+
Parameters
|
|
209
|
+
----------
|
|
210
|
+
group_id : int
|
|
211
|
+
The token group's ``id``.
|
|
212
|
+
|
|
213
|
+
idempotency_key : str
|
|
214
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
215
|
+
|
|
216
|
+
request_options : typing.Optional[RequestOptions]
|
|
217
|
+
Request-specific configuration.
|
|
218
|
+
|
|
219
|
+
Returns
|
|
220
|
+
-------
|
|
221
|
+
TokenGroupActionOut
|
|
222
|
+
The group after ``activate``, with the members that could not be changed.
|
|
223
|
+
|
|
224
|
+
Examples
|
|
225
|
+
--------
|
|
226
|
+
from evcloud import EvcloudClient
|
|
227
|
+
|
|
228
|
+
client = EvcloudClient(
|
|
229
|
+
token="YOUR_TOKEN",
|
|
230
|
+
)
|
|
231
|
+
client.emsp.token_groups.activate(
|
|
232
|
+
group_id=12,
|
|
233
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
234
|
+
)
|
|
235
|
+
"""
|
|
236
|
+
_response = self._raw_client.activate(
|
|
237
|
+
group_id, idempotency_key=idempotency_key, request_options=request_options
|
|
238
|
+
)
|
|
239
|
+
return _response.data
|
|
240
|
+
|
|
241
|
+
def list_networks(
|
|
242
|
+
self,
|
|
243
|
+
group_id: int,
|
|
244
|
+
*,
|
|
245
|
+
after: typing.Optional[str] = None,
|
|
246
|
+
limit: typing.Optional[int] = None,
|
|
247
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
248
|
+
) -> SyncPager[TokenGroupNetworkOut, TokenGroupNetworkPage]:
|
|
249
|
+
"""
|
|
250
|
+
Member tokens reach the CPOs of these networks.
|
|
251
|
+
|
|
252
|
+
Parameters
|
|
253
|
+
----------
|
|
254
|
+
group_id : int
|
|
255
|
+
The token group's ``id``.
|
|
256
|
+
|
|
257
|
+
after : typing.Optional[str]
|
|
258
|
+
Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
|
|
259
|
+
|
|
260
|
+
limit : typing.Optional[int]
|
|
261
|
+
Maximum rows per page (default 50, max 200).
|
|
262
|
+
|
|
263
|
+
request_options : typing.Optional[RequestOptions]
|
|
264
|
+
Request-specific configuration.
|
|
265
|
+
|
|
266
|
+
Returns
|
|
267
|
+
-------
|
|
268
|
+
SyncPager[TokenGroupNetworkOut, TokenGroupNetworkPage]
|
|
269
|
+
One page of the networks assigned to the group.
|
|
270
|
+
|
|
271
|
+
Examples
|
|
272
|
+
--------
|
|
273
|
+
from evcloud import EvcloudClient
|
|
274
|
+
|
|
275
|
+
client = EvcloudClient(
|
|
276
|
+
token="YOUR_TOKEN",
|
|
277
|
+
)
|
|
278
|
+
response = client.emsp.token_groups.list_networks(
|
|
279
|
+
group_id=12,
|
|
280
|
+
limit=50,
|
|
281
|
+
)
|
|
282
|
+
for item in response:
|
|
283
|
+
yield item
|
|
284
|
+
# alternatively, you can paginate page-by-page
|
|
285
|
+
for page in response.iter_pages():
|
|
286
|
+
yield page
|
|
287
|
+
"""
|
|
288
|
+
return self._raw_client.list_networks(group_id, after=after, limit=limit, request_options=request_options)
|
|
289
|
+
|
|
290
|
+
def assign_network(
|
|
291
|
+
self,
|
|
292
|
+
group_id: int,
|
|
293
|
+
*,
|
|
294
|
+
idempotency_key: str,
|
|
295
|
+
network_id: int,
|
|
296
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
297
|
+
) -> TokenGroupNetworkOut:
|
|
298
|
+
"""
|
|
299
|
+
The group's tokens reach the network's CPOs, and the group can scope location searches.
|
|
300
|
+
|
|
301
|
+
Parameters
|
|
302
|
+
----------
|
|
303
|
+
group_id : int
|
|
304
|
+
The token group's ``id``.
|
|
305
|
+
|
|
306
|
+
idempotency_key : str
|
|
307
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
308
|
+
|
|
309
|
+
network_id : int
|
|
310
|
+
|
|
311
|
+
request_options : typing.Optional[RequestOptions]
|
|
312
|
+
Request-specific configuration.
|
|
313
|
+
|
|
314
|
+
Returns
|
|
315
|
+
-------
|
|
316
|
+
TokenGroupNetworkOut
|
|
317
|
+
The assigned network.
|
|
318
|
+
|
|
319
|
+
Examples
|
|
320
|
+
--------
|
|
321
|
+
from evcloud import EvcloudClient
|
|
322
|
+
|
|
323
|
+
client = EvcloudClient(
|
|
324
|
+
token="YOUR_TOKEN",
|
|
325
|
+
)
|
|
326
|
+
client.emsp.token_groups.assign_network(
|
|
327
|
+
group_id=12,
|
|
328
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
329
|
+
network_id=21,
|
|
330
|
+
)
|
|
331
|
+
"""
|
|
332
|
+
_response = self._raw_client.assign_network(
|
|
333
|
+
group_id, idempotency_key=idempotency_key, network_id=network_id, request_options=request_options
|
|
334
|
+
)
|
|
335
|
+
return _response.data
|
|
336
|
+
|
|
337
|
+
def unassign_network(
|
|
338
|
+
self, group_id: int, network_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
339
|
+
) -> None:
|
|
340
|
+
"""
|
|
341
|
+
The network itself is kept; only its assignment to the group is removed.
|
|
342
|
+
|
|
343
|
+
Parameters
|
|
344
|
+
----------
|
|
345
|
+
group_id : int
|
|
346
|
+
The token group's ``id``.
|
|
347
|
+
|
|
348
|
+
network_id : int
|
|
349
|
+
The network's ``network_id``.
|
|
350
|
+
|
|
351
|
+
request_options : typing.Optional[RequestOptions]
|
|
352
|
+
Request-specific configuration.
|
|
353
|
+
|
|
354
|
+
Returns
|
|
355
|
+
-------
|
|
356
|
+
None
|
|
357
|
+
|
|
358
|
+
Examples
|
|
359
|
+
--------
|
|
360
|
+
from evcloud import EvcloudClient
|
|
361
|
+
|
|
362
|
+
client = EvcloudClient(
|
|
363
|
+
token="YOUR_TOKEN",
|
|
364
|
+
)
|
|
365
|
+
client.emsp.token_groups.unassign_network(
|
|
366
|
+
group_id=12,
|
|
367
|
+
network_id=21,
|
|
368
|
+
)
|
|
369
|
+
"""
|
|
370
|
+
_response = self._raw_client.unassign_network(group_id, network_id, request_options=request_options)
|
|
371
|
+
return _response.data
|
|
372
|
+
|
|
373
|
+
def reactivate(
|
|
374
|
+
self, group_id: int, *, idempotency_key: str, request_options: typing.Optional[RequestOptions] = None
|
|
375
|
+
) -> TokenGroupActionOut:
|
|
376
|
+
"""
|
|
377
|
+
SUSPENDED members are pushed to partners with ``valid: true`` again. Revoked members stay invalid.
|
|
378
|
+
|
|
379
|
+
Parameters
|
|
380
|
+
----------
|
|
381
|
+
group_id : int
|
|
382
|
+
The token group's ``id``.
|
|
383
|
+
|
|
384
|
+
idempotency_key : str
|
|
385
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
386
|
+
|
|
387
|
+
request_options : typing.Optional[RequestOptions]
|
|
388
|
+
Request-specific configuration.
|
|
389
|
+
|
|
390
|
+
Returns
|
|
391
|
+
-------
|
|
392
|
+
TokenGroupActionOut
|
|
393
|
+
The group after ``reactivate``, with the members that could not be changed.
|
|
394
|
+
|
|
395
|
+
Examples
|
|
396
|
+
--------
|
|
397
|
+
from evcloud import EvcloudClient
|
|
398
|
+
|
|
399
|
+
client = EvcloudClient(
|
|
400
|
+
token="YOUR_TOKEN",
|
|
401
|
+
)
|
|
402
|
+
client.emsp.token_groups.reactivate(
|
|
403
|
+
group_id=12,
|
|
404
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
405
|
+
)
|
|
406
|
+
"""
|
|
407
|
+
_response = self._raw_client.reactivate(
|
|
408
|
+
group_id, idempotency_key=idempotency_key, request_options=request_options
|
|
409
|
+
)
|
|
410
|
+
return _response.data
|
|
411
|
+
|
|
412
|
+
def revoke(
|
|
413
|
+
self, group_id: int, *, idempotency_key: str, request_options: typing.Optional[RequestOptions] = None
|
|
414
|
+
) -> TokenGroupActionOut:
|
|
415
|
+
"""
|
|
416
|
+
Every member that is not yet revoked is pushed with ``valid: false`` and marked revoked: later group activations leave it invalid.
|
|
417
|
+
|
|
418
|
+
Parameters
|
|
419
|
+
----------
|
|
420
|
+
group_id : int
|
|
421
|
+
The token group's ``id``.
|
|
422
|
+
|
|
423
|
+
idempotency_key : str
|
|
424
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
425
|
+
|
|
426
|
+
request_options : typing.Optional[RequestOptions]
|
|
427
|
+
Request-specific configuration.
|
|
428
|
+
|
|
429
|
+
Returns
|
|
430
|
+
-------
|
|
431
|
+
TokenGroupActionOut
|
|
432
|
+
The group after ``revoke``, with the members that could not be changed.
|
|
433
|
+
|
|
434
|
+
Examples
|
|
435
|
+
--------
|
|
436
|
+
from evcloud import EvcloudClient
|
|
437
|
+
|
|
438
|
+
client = EvcloudClient(
|
|
439
|
+
token="YOUR_TOKEN",
|
|
440
|
+
)
|
|
441
|
+
client.emsp.token_groups.revoke(
|
|
442
|
+
group_id=12,
|
|
443
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
444
|
+
)
|
|
445
|
+
"""
|
|
446
|
+
_response = self._raw_client.revoke(group_id, idempotency_key=idempotency_key, request_options=request_options)
|
|
447
|
+
return _response.data
|
|
448
|
+
|
|
449
|
+
def suspend(
|
|
450
|
+
self, group_id: int, *, idempotency_key: str, request_options: typing.Optional[RequestOptions] = None
|
|
451
|
+
) -> TokenGroupActionOut:
|
|
452
|
+
"""
|
|
453
|
+
ACTIVE members are pushed to partners with ``valid: false`` until the group is reactivated.
|
|
454
|
+
|
|
455
|
+
Parameters
|
|
456
|
+
----------
|
|
457
|
+
group_id : int
|
|
458
|
+
The token group's ``id``.
|
|
459
|
+
|
|
460
|
+
idempotency_key : str
|
|
461
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
462
|
+
|
|
463
|
+
request_options : typing.Optional[RequestOptions]
|
|
464
|
+
Request-specific configuration.
|
|
465
|
+
|
|
466
|
+
Returns
|
|
467
|
+
-------
|
|
468
|
+
TokenGroupActionOut
|
|
469
|
+
The group after ``suspend``, with the members that could not be changed.
|
|
470
|
+
|
|
471
|
+
Examples
|
|
472
|
+
--------
|
|
473
|
+
from evcloud import EvcloudClient
|
|
474
|
+
|
|
475
|
+
client = EvcloudClient(
|
|
476
|
+
token="YOUR_TOKEN",
|
|
477
|
+
)
|
|
478
|
+
client.emsp.token_groups.suspend(
|
|
479
|
+
group_id=12,
|
|
480
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
481
|
+
)
|
|
482
|
+
"""
|
|
483
|
+
_response = self._raw_client.suspend(group_id, idempotency_key=idempotency_key, request_options=request_options)
|
|
484
|
+
return _response.data
|
|
485
|
+
|
|
486
|
+
def add_tokens(
|
|
487
|
+
self,
|
|
488
|
+
group_id: int,
|
|
489
|
+
*,
|
|
490
|
+
idempotency_key: str,
|
|
491
|
+
tokens: typing.Sequence[TokenRef],
|
|
492
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
493
|
+
) -> TokenGroupOut:
|
|
494
|
+
"""
|
|
495
|
+
Tokens already in the group are left as they are. Their ``valid`` flag is not changed.
|
|
496
|
+
|
|
497
|
+
Parameters
|
|
498
|
+
----------
|
|
499
|
+
group_id : int
|
|
500
|
+
The token group's ``id``.
|
|
501
|
+
|
|
502
|
+
idempotency_key : str
|
|
503
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
504
|
+
|
|
505
|
+
tokens : typing.Sequence[TokenRef]
|
|
506
|
+
|
|
507
|
+
request_options : typing.Optional[RequestOptions]
|
|
508
|
+
Request-specific configuration.
|
|
509
|
+
|
|
510
|
+
Returns
|
|
511
|
+
-------
|
|
512
|
+
TokenGroupOut
|
|
513
|
+
The group with its members.
|
|
514
|
+
|
|
515
|
+
Examples
|
|
516
|
+
--------
|
|
517
|
+
from evcloud import EvcloudClient, TokenRef
|
|
518
|
+
|
|
519
|
+
client = EvcloudClient(
|
|
520
|
+
token="YOUR_TOKEN",
|
|
521
|
+
)
|
|
522
|
+
client.emsp.token_groups.add_tokens(
|
|
523
|
+
group_id=12,
|
|
524
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
525
|
+
tokens=[
|
|
526
|
+
TokenRef(
|
|
527
|
+
token_uid="04A2B3C4D5E6F7",
|
|
528
|
+
type="RFID",
|
|
529
|
+
ocpi_version="221",
|
|
530
|
+
)
|
|
531
|
+
],
|
|
532
|
+
)
|
|
533
|
+
"""
|
|
534
|
+
_response = self._raw_client.add_tokens(
|
|
535
|
+
group_id, idempotency_key=idempotency_key, tokens=tokens, request_options=request_options
|
|
536
|
+
)
|
|
537
|
+
return _response.data
|
|
538
|
+
|
|
539
|
+
def remove_token(
|
|
540
|
+
self,
|
|
541
|
+
group_id: int,
|
|
542
|
+
token_uid: str,
|
|
543
|
+
*,
|
|
544
|
+
type: RemoveTokenTokenGroupsRequestType,
|
|
545
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
546
|
+
) -> None:
|
|
547
|
+
"""
|
|
548
|
+
The token keeps its current ``valid`` flag.
|
|
549
|
+
|
|
550
|
+
Parameters
|
|
551
|
+
----------
|
|
552
|
+
group_id : int
|
|
553
|
+
The token group's ``id``.
|
|
554
|
+
|
|
555
|
+
token_uid : str
|
|
556
|
+
OCPI token ``uid``.
|
|
557
|
+
|
|
558
|
+
type : RemoveTokenTokenGroupsRequestType
|
|
559
|
+
The token's OCPI type, e.g. RFID.
|
|
560
|
+
|
|
561
|
+
request_options : typing.Optional[RequestOptions]
|
|
562
|
+
Request-specific configuration.
|
|
563
|
+
|
|
564
|
+
Returns
|
|
565
|
+
-------
|
|
566
|
+
None
|
|
567
|
+
|
|
568
|
+
Examples
|
|
569
|
+
--------
|
|
570
|
+
from evcloud import EvcloudClient
|
|
571
|
+
|
|
572
|
+
client = EvcloudClient(
|
|
573
|
+
token="YOUR_TOKEN",
|
|
574
|
+
)
|
|
575
|
+
client.emsp.token_groups.remove_token(
|
|
576
|
+
group_id=12,
|
|
577
|
+
token_uid="04A2B3C4D5E6F7",
|
|
578
|
+
type="RFID",
|
|
579
|
+
)
|
|
580
|
+
"""
|
|
581
|
+
_response = self._raw_client.remove_token(group_id, token_uid, type=type, request_options=request_options)
|
|
582
|
+
return _response.data
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
class AsyncTokenGroupsClient:
|
|
586
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
587
|
+
self._raw_client = AsyncRawTokenGroupsClient(client_wrapper=client_wrapper)
|
|
588
|
+
|
|
589
|
+
@property
|
|
590
|
+
def with_raw_response(self) -> AsyncRawTokenGroupsClient:
|
|
591
|
+
"""
|
|
592
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
593
|
+
|
|
594
|
+
Returns
|
|
595
|
+
-------
|
|
596
|
+
AsyncRawTokenGroupsClient
|
|
597
|
+
"""
|
|
598
|
+
return self._raw_client
|
|
599
|
+
|
|
600
|
+
async def list(
|
|
601
|
+
self,
|
|
602
|
+
*,
|
|
603
|
+
after: typing.Optional[str] = None,
|
|
604
|
+
limit: typing.Optional[int] = None,
|
|
605
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
606
|
+
) -> AsyncPager[TokenGroupOut, TokenGroupPage]:
|
|
607
|
+
"""
|
|
608
|
+
Your token groups with their members.
|
|
609
|
+
|
|
610
|
+
Parameters
|
|
611
|
+
----------
|
|
612
|
+
after : typing.Optional[str]
|
|
613
|
+
Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
|
|
614
|
+
|
|
615
|
+
limit : typing.Optional[int]
|
|
616
|
+
Maximum rows per page (default 50, max 200).
|
|
617
|
+
|
|
618
|
+
request_options : typing.Optional[RequestOptions]
|
|
619
|
+
Request-specific configuration.
|
|
620
|
+
|
|
621
|
+
Returns
|
|
622
|
+
-------
|
|
623
|
+
AsyncPager[TokenGroupOut, TokenGroupPage]
|
|
624
|
+
One page of groups with their members.
|
|
625
|
+
|
|
626
|
+
Examples
|
|
627
|
+
--------
|
|
628
|
+
import asyncio
|
|
629
|
+
|
|
630
|
+
from evcloud import AsyncEvcloudClient
|
|
631
|
+
|
|
632
|
+
client = AsyncEvcloudClient(
|
|
633
|
+
token="YOUR_TOKEN",
|
|
634
|
+
)
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
async def main() -> None:
|
|
638
|
+
response = await client.emsp.token_groups.list(
|
|
639
|
+
limit=50,
|
|
640
|
+
)
|
|
641
|
+
async for item in response:
|
|
642
|
+
yield item
|
|
643
|
+
|
|
644
|
+
# alternatively, you can paginate page-by-page
|
|
645
|
+
async for page in response.iter_pages():
|
|
646
|
+
yield page
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
asyncio.run(main())
|
|
650
|
+
"""
|
|
651
|
+
return await self._raw_client.list(after=after, limit=limit, request_options=request_options)
|
|
652
|
+
|
|
653
|
+
async def create(
|
|
654
|
+
self,
|
|
655
|
+
*,
|
|
656
|
+
idempotency_key: str,
|
|
657
|
+
name: str,
|
|
658
|
+
description: typing.Optional[str] = OMIT,
|
|
659
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
660
|
+
) -> TokenGroupOut:
|
|
661
|
+
"""
|
|
662
|
+
An empty group; add tokens and assign networks to it afterwards.
|
|
663
|
+
|
|
664
|
+
Parameters
|
|
665
|
+
----------
|
|
666
|
+
idempotency_key : str
|
|
667
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
668
|
+
|
|
669
|
+
name : str
|
|
670
|
+
|
|
671
|
+
description : typing.Optional[str]
|
|
672
|
+
|
|
673
|
+
request_options : typing.Optional[RequestOptions]
|
|
674
|
+
Request-specific configuration.
|
|
675
|
+
|
|
676
|
+
Returns
|
|
677
|
+
-------
|
|
678
|
+
TokenGroupOut
|
|
679
|
+
The created, empty group.
|
|
680
|
+
|
|
681
|
+
Examples
|
|
682
|
+
--------
|
|
683
|
+
import asyncio
|
|
684
|
+
|
|
685
|
+
from evcloud import AsyncEvcloudClient
|
|
686
|
+
|
|
687
|
+
client = AsyncEvcloudClient(
|
|
688
|
+
token="YOUR_TOKEN",
|
|
689
|
+
)
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
async def main() -> None:
|
|
693
|
+
await client.emsp.token_groups.create(
|
|
694
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
695
|
+
name="Fleet cards",
|
|
696
|
+
description="Company cars",
|
|
697
|
+
)
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
asyncio.run(main())
|
|
701
|
+
"""
|
|
702
|
+
_response = await self._raw_client.create(
|
|
703
|
+
idempotency_key=idempotency_key, name=name, description=description, request_options=request_options
|
|
704
|
+
)
|
|
705
|
+
return _response.data
|
|
706
|
+
|
|
707
|
+
async def get(self, group_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> TokenGroupOut:
|
|
708
|
+
"""
|
|
709
|
+
One group with its members.
|
|
710
|
+
|
|
711
|
+
Parameters
|
|
712
|
+
----------
|
|
713
|
+
group_id : int
|
|
714
|
+
The token group's ``id``.
|
|
715
|
+
|
|
716
|
+
request_options : typing.Optional[RequestOptions]
|
|
717
|
+
Request-specific configuration.
|
|
718
|
+
|
|
719
|
+
Returns
|
|
720
|
+
-------
|
|
721
|
+
TokenGroupOut
|
|
722
|
+
The group with its members.
|
|
723
|
+
|
|
724
|
+
Examples
|
|
725
|
+
--------
|
|
726
|
+
import asyncio
|
|
727
|
+
|
|
728
|
+
from evcloud import AsyncEvcloudClient
|
|
729
|
+
|
|
730
|
+
client = AsyncEvcloudClient(
|
|
731
|
+
token="YOUR_TOKEN",
|
|
732
|
+
)
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
async def main() -> None:
|
|
736
|
+
await client.emsp.token_groups.get(
|
|
737
|
+
group_id=12,
|
|
738
|
+
)
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
asyncio.run(main())
|
|
742
|
+
"""
|
|
743
|
+
_response = await self._raw_client.get(group_id, request_options=request_options)
|
|
744
|
+
return _response.data
|
|
745
|
+
|
|
746
|
+
async def update(
|
|
747
|
+
self,
|
|
748
|
+
group_id: int,
|
|
749
|
+
*,
|
|
750
|
+
name: typing.Optional[str] = OMIT,
|
|
751
|
+
description: typing.Optional[str] = OMIT,
|
|
752
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
753
|
+
) -> TokenGroupOut:
|
|
754
|
+
"""
|
|
755
|
+
Rename the group or replace its description; send ``description: null`` to clear it.
|
|
756
|
+
|
|
757
|
+
Parameters
|
|
758
|
+
----------
|
|
759
|
+
group_id : int
|
|
760
|
+
The token group's ``id``.
|
|
761
|
+
|
|
762
|
+
name : typing.Optional[str]
|
|
763
|
+
|
|
764
|
+
description : typing.Optional[str]
|
|
765
|
+
|
|
766
|
+
request_options : typing.Optional[RequestOptions]
|
|
767
|
+
Request-specific configuration.
|
|
768
|
+
|
|
769
|
+
Returns
|
|
770
|
+
-------
|
|
771
|
+
TokenGroupOut
|
|
772
|
+
The group after the update.
|
|
773
|
+
|
|
774
|
+
Examples
|
|
775
|
+
--------
|
|
776
|
+
import asyncio
|
|
777
|
+
|
|
778
|
+
from evcloud import AsyncEvcloudClient
|
|
779
|
+
|
|
780
|
+
client = AsyncEvcloudClient(
|
|
781
|
+
token="YOUR_TOKEN",
|
|
782
|
+
)
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
async def main() -> None:
|
|
786
|
+
await client.emsp.token_groups.update(
|
|
787
|
+
group_id=12,
|
|
788
|
+
name="Fleet cards NL",
|
|
789
|
+
)
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
asyncio.run(main())
|
|
793
|
+
"""
|
|
794
|
+
_response = await self._raw_client.update(
|
|
795
|
+
group_id, name=name, description=description, request_options=request_options
|
|
796
|
+
)
|
|
797
|
+
return _response.data
|
|
798
|
+
|
|
799
|
+
async def activate(
|
|
800
|
+
self, group_id: int, *, idempotency_key: str, request_options: typing.Optional[RequestOptions] = None
|
|
801
|
+
) -> TokenGroupActionOut:
|
|
802
|
+
"""
|
|
803
|
+
PROVISIONED members are activated and SUSPENDED ones reactivated, and pushed to partners with ``valid: true``. Revoked members stay invalid.
|
|
804
|
+
|
|
805
|
+
Parameters
|
|
806
|
+
----------
|
|
807
|
+
group_id : int
|
|
808
|
+
The token group's ``id``.
|
|
809
|
+
|
|
810
|
+
idempotency_key : str
|
|
811
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
812
|
+
|
|
813
|
+
request_options : typing.Optional[RequestOptions]
|
|
814
|
+
Request-specific configuration.
|
|
815
|
+
|
|
816
|
+
Returns
|
|
817
|
+
-------
|
|
818
|
+
TokenGroupActionOut
|
|
819
|
+
The group after ``activate``, with the members that could not be changed.
|
|
820
|
+
|
|
821
|
+
Examples
|
|
822
|
+
--------
|
|
823
|
+
import asyncio
|
|
824
|
+
|
|
825
|
+
from evcloud import AsyncEvcloudClient
|
|
826
|
+
|
|
827
|
+
client = AsyncEvcloudClient(
|
|
828
|
+
token="YOUR_TOKEN",
|
|
829
|
+
)
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
async def main() -> None:
|
|
833
|
+
await client.emsp.token_groups.activate(
|
|
834
|
+
group_id=12,
|
|
835
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
836
|
+
)
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
asyncio.run(main())
|
|
840
|
+
"""
|
|
841
|
+
_response = await self._raw_client.activate(
|
|
842
|
+
group_id, idempotency_key=idempotency_key, request_options=request_options
|
|
843
|
+
)
|
|
844
|
+
return _response.data
|
|
845
|
+
|
|
846
|
+
async def list_networks(
|
|
847
|
+
self,
|
|
848
|
+
group_id: int,
|
|
849
|
+
*,
|
|
850
|
+
after: typing.Optional[str] = None,
|
|
851
|
+
limit: typing.Optional[int] = None,
|
|
852
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
853
|
+
) -> AsyncPager[TokenGroupNetworkOut, TokenGroupNetworkPage]:
|
|
854
|
+
"""
|
|
855
|
+
Member tokens reach the CPOs of these networks.
|
|
856
|
+
|
|
857
|
+
Parameters
|
|
858
|
+
----------
|
|
859
|
+
group_id : int
|
|
860
|
+
The token group's ``id``.
|
|
861
|
+
|
|
862
|
+
after : typing.Optional[str]
|
|
863
|
+
Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
|
|
864
|
+
|
|
865
|
+
limit : typing.Optional[int]
|
|
866
|
+
Maximum rows per page (default 50, max 200).
|
|
867
|
+
|
|
868
|
+
request_options : typing.Optional[RequestOptions]
|
|
869
|
+
Request-specific configuration.
|
|
870
|
+
|
|
871
|
+
Returns
|
|
872
|
+
-------
|
|
873
|
+
AsyncPager[TokenGroupNetworkOut, TokenGroupNetworkPage]
|
|
874
|
+
One page of the networks assigned to the group.
|
|
875
|
+
|
|
876
|
+
Examples
|
|
877
|
+
--------
|
|
878
|
+
import asyncio
|
|
879
|
+
|
|
880
|
+
from evcloud import AsyncEvcloudClient
|
|
881
|
+
|
|
882
|
+
client = AsyncEvcloudClient(
|
|
883
|
+
token="YOUR_TOKEN",
|
|
884
|
+
)
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
async def main() -> None:
|
|
888
|
+
response = await client.emsp.token_groups.list_networks(
|
|
889
|
+
group_id=12,
|
|
890
|
+
limit=50,
|
|
891
|
+
)
|
|
892
|
+
async for item in response:
|
|
893
|
+
yield item
|
|
894
|
+
|
|
895
|
+
# alternatively, you can paginate page-by-page
|
|
896
|
+
async for page in response.iter_pages():
|
|
897
|
+
yield page
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
asyncio.run(main())
|
|
901
|
+
"""
|
|
902
|
+
return await self._raw_client.list_networks(group_id, after=after, limit=limit, request_options=request_options)
|
|
903
|
+
|
|
904
|
+
async def assign_network(
|
|
905
|
+
self,
|
|
906
|
+
group_id: int,
|
|
907
|
+
*,
|
|
908
|
+
idempotency_key: str,
|
|
909
|
+
network_id: int,
|
|
910
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
911
|
+
) -> TokenGroupNetworkOut:
|
|
912
|
+
"""
|
|
913
|
+
The group's tokens reach the network's CPOs, and the group can scope location searches.
|
|
914
|
+
|
|
915
|
+
Parameters
|
|
916
|
+
----------
|
|
917
|
+
group_id : int
|
|
918
|
+
The token group's ``id``.
|
|
919
|
+
|
|
920
|
+
idempotency_key : str
|
|
921
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
922
|
+
|
|
923
|
+
network_id : int
|
|
924
|
+
|
|
925
|
+
request_options : typing.Optional[RequestOptions]
|
|
926
|
+
Request-specific configuration.
|
|
927
|
+
|
|
928
|
+
Returns
|
|
929
|
+
-------
|
|
930
|
+
TokenGroupNetworkOut
|
|
931
|
+
The assigned network.
|
|
932
|
+
|
|
933
|
+
Examples
|
|
934
|
+
--------
|
|
935
|
+
import asyncio
|
|
936
|
+
|
|
937
|
+
from evcloud import AsyncEvcloudClient
|
|
938
|
+
|
|
939
|
+
client = AsyncEvcloudClient(
|
|
940
|
+
token="YOUR_TOKEN",
|
|
941
|
+
)
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
async def main() -> None:
|
|
945
|
+
await client.emsp.token_groups.assign_network(
|
|
946
|
+
group_id=12,
|
|
947
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
948
|
+
network_id=21,
|
|
949
|
+
)
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
asyncio.run(main())
|
|
953
|
+
"""
|
|
954
|
+
_response = await self._raw_client.assign_network(
|
|
955
|
+
group_id, idempotency_key=idempotency_key, network_id=network_id, request_options=request_options
|
|
956
|
+
)
|
|
957
|
+
return _response.data
|
|
958
|
+
|
|
959
|
+
async def unassign_network(
|
|
960
|
+
self, group_id: int, network_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
961
|
+
) -> None:
|
|
962
|
+
"""
|
|
963
|
+
The network itself is kept; only its assignment to the group is removed.
|
|
964
|
+
|
|
965
|
+
Parameters
|
|
966
|
+
----------
|
|
967
|
+
group_id : int
|
|
968
|
+
The token group's ``id``.
|
|
969
|
+
|
|
970
|
+
network_id : int
|
|
971
|
+
The network's ``network_id``.
|
|
972
|
+
|
|
973
|
+
request_options : typing.Optional[RequestOptions]
|
|
974
|
+
Request-specific configuration.
|
|
975
|
+
|
|
976
|
+
Returns
|
|
977
|
+
-------
|
|
978
|
+
None
|
|
979
|
+
|
|
980
|
+
Examples
|
|
981
|
+
--------
|
|
982
|
+
import asyncio
|
|
983
|
+
|
|
984
|
+
from evcloud import AsyncEvcloudClient
|
|
985
|
+
|
|
986
|
+
client = AsyncEvcloudClient(
|
|
987
|
+
token="YOUR_TOKEN",
|
|
988
|
+
)
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
async def main() -> None:
|
|
992
|
+
await client.emsp.token_groups.unassign_network(
|
|
993
|
+
group_id=12,
|
|
994
|
+
network_id=21,
|
|
995
|
+
)
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
asyncio.run(main())
|
|
999
|
+
"""
|
|
1000
|
+
_response = await self._raw_client.unassign_network(group_id, network_id, request_options=request_options)
|
|
1001
|
+
return _response.data
|
|
1002
|
+
|
|
1003
|
+
async def reactivate(
|
|
1004
|
+
self, group_id: int, *, idempotency_key: str, request_options: typing.Optional[RequestOptions] = None
|
|
1005
|
+
) -> TokenGroupActionOut:
|
|
1006
|
+
"""
|
|
1007
|
+
SUSPENDED members are pushed to partners with ``valid: true`` again. Revoked members stay invalid.
|
|
1008
|
+
|
|
1009
|
+
Parameters
|
|
1010
|
+
----------
|
|
1011
|
+
group_id : int
|
|
1012
|
+
The token group's ``id``.
|
|
1013
|
+
|
|
1014
|
+
idempotency_key : str
|
|
1015
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
1016
|
+
|
|
1017
|
+
request_options : typing.Optional[RequestOptions]
|
|
1018
|
+
Request-specific configuration.
|
|
1019
|
+
|
|
1020
|
+
Returns
|
|
1021
|
+
-------
|
|
1022
|
+
TokenGroupActionOut
|
|
1023
|
+
The group after ``reactivate``, with the members that could not be changed.
|
|
1024
|
+
|
|
1025
|
+
Examples
|
|
1026
|
+
--------
|
|
1027
|
+
import asyncio
|
|
1028
|
+
|
|
1029
|
+
from evcloud import AsyncEvcloudClient
|
|
1030
|
+
|
|
1031
|
+
client = AsyncEvcloudClient(
|
|
1032
|
+
token="YOUR_TOKEN",
|
|
1033
|
+
)
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
async def main() -> None:
|
|
1037
|
+
await client.emsp.token_groups.reactivate(
|
|
1038
|
+
group_id=12,
|
|
1039
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
1040
|
+
)
|
|
1041
|
+
|
|
1042
|
+
|
|
1043
|
+
asyncio.run(main())
|
|
1044
|
+
"""
|
|
1045
|
+
_response = await self._raw_client.reactivate(
|
|
1046
|
+
group_id, idempotency_key=idempotency_key, request_options=request_options
|
|
1047
|
+
)
|
|
1048
|
+
return _response.data
|
|
1049
|
+
|
|
1050
|
+
async def revoke(
|
|
1051
|
+
self, group_id: int, *, idempotency_key: str, request_options: typing.Optional[RequestOptions] = None
|
|
1052
|
+
) -> TokenGroupActionOut:
|
|
1053
|
+
"""
|
|
1054
|
+
Every member that is not yet revoked is pushed with ``valid: false`` and marked revoked: later group activations leave it invalid.
|
|
1055
|
+
|
|
1056
|
+
Parameters
|
|
1057
|
+
----------
|
|
1058
|
+
group_id : int
|
|
1059
|
+
The token group's ``id``.
|
|
1060
|
+
|
|
1061
|
+
idempotency_key : str
|
|
1062
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
1063
|
+
|
|
1064
|
+
request_options : typing.Optional[RequestOptions]
|
|
1065
|
+
Request-specific configuration.
|
|
1066
|
+
|
|
1067
|
+
Returns
|
|
1068
|
+
-------
|
|
1069
|
+
TokenGroupActionOut
|
|
1070
|
+
The group after ``revoke``, with the members that could not be changed.
|
|
1071
|
+
|
|
1072
|
+
Examples
|
|
1073
|
+
--------
|
|
1074
|
+
import asyncio
|
|
1075
|
+
|
|
1076
|
+
from evcloud import AsyncEvcloudClient
|
|
1077
|
+
|
|
1078
|
+
client = AsyncEvcloudClient(
|
|
1079
|
+
token="YOUR_TOKEN",
|
|
1080
|
+
)
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
async def main() -> None:
|
|
1084
|
+
await client.emsp.token_groups.revoke(
|
|
1085
|
+
group_id=12,
|
|
1086
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
1087
|
+
)
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
asyncio.run(main())
|
|
1091
|
+
"""
|
|
1092
|
+
_response = await self._raw_client.revoke(
|
|
1093
|
+
group_id, idempotency_key=idempotency_key, request_options=request_options
|
|
1094
|
+
)
|
|
1095
|
+
return _response.data
|
|
1096
|
+
|
|
1097
|
+
async def suspend(
|
|
1098
|
+
self, group_id: int, *, idempotency_key: str, request_options: typing.Optional[RequestOptions] = None
|
|
1099
|
+
) -> TokenGroupActionOut:
|
|
1100
|
+
"""
|
|
1101
|
+
ACTIVE members are pushed to partners with ``valid: false`` until the group is reactivated.
|
|
1102
|
+
|
|
1103
|
+
Parameters
|
|
1104
|
+
----------
|
|
1105
|
+
group_id : int
|
|
1106
|
+
The token group's ``id``.
|
|
1107
|
+
|
|
1108
|
+
idempotency_key : str
|
|
1109
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
1110
|
+
|
|
1111
|
+
request_options : typing.Optional[RequestOptions]
|
|
1112
|
+
Request-specific configuration.
|
|
1113
|
+
|
|
1114
|
+
Returns
|
|
1115
|
+
-------
|
|
1116
|
+
TokenGroupActionOut
|
|
1117
|
+
The group after ``suspend``, with the members that could not be changed.
|
|
1118
|
+
|
|
1119
|
+
Examples
|
|
1120
|
+
--------
|
|
1121
|
+
import asyncio
|
|
1122
|
+
|
|
1123
|
+
from evcloud import AsyncEvcloudClient
|
|
1124
|
+
|
|
1125
|
+
client = AsyncEvcloudClient(
|
|
1126
|
+
token="YOUR_TOKEN",
|
|
1127
|
+
)
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
async def main() -> None:
|
|
1131
|
+
await client.emsp.token_groups.suspend(
|
|
1132
|
+
group_id=12,
|
|
1133
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
1134
|
+
)
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
asyncio.run(main())
|
|
1138
|
+
"""
|
|
1139
|
+
_response = await self._raw_client.suspend(
|
|
1140
|
+
group_id, idempotency_key=idempotency_key, request_options=request_options
|
|
1141
|
+
)
|
|
1142
|
+
return _response.data
|
|
1143
|
+
|
|
1144
|
+
async def add_tokens(
|
|
1145
|
+
self,
|
|
1146
|
+
group_id: int,
|
|
1147
|
+
*,
|
|
1148
|
+
idempotency_key: str,
|
|
1149
|
+
tokens: typing.Sequence[TokenRef],
|
|
1150
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1151
|
+
) -> TokenGroupOut:
|
|
1152
|
+
"""
|
|
1153
|
+
Tokens already in the group are left as they are. Their ``valid`` flag is not changed.
|
|
1154
|
+
|
|
1155
|
+
Parameters
|
|
1156
|
+
----------
|
|
1157
|
+
group_id : int
|
|
1158
|
+
The token group's ``id``.
|
|
1159
|
+
|
|
1160
|
+
idempotency_key : str
|
|
1161
|
+
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
|
|
1162
|
+
|
|
1163
|
+
tokens : typing.Sequence[TokenRef]
|
|
1164
|
+
|
|
1165
|
+
request_options : typing.Optional[RequestOptions]
|
|
1166
|
+
Request-specific configuration.
|
|
1167
|
+
|
|
1168
|
+
Returns
|
|
1169
|
+
-------
|
|
1170
|
+
TokenGroupOut
|
|
1171
|
+
The group with its members.
|
|
1172
|
+
|
|
1173
|
+
Examples
|
|
1174
|
+
--------
|
|
1175
|
+
import asyncio
|
|
1176
|
+
|
|
1177
|
+
from evcloud import AsyncEvcloudClient, TokenRef
|
|
1178
|
+
|
|
1179
|
+
client = AsyncEvcloudClient(
|
|
1180
|
+
token="YOUR_TOKEN",
|
|
1181
|
+
)
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
async def main() -> None:
|
|
1185
|
+
await client.emsp.token_groups.add_tokens(
|
|
1186
|
+
group_id=12,
|
|
1187
|
+
idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
|
|
1188
|
+
tokens=[
|
|
1189
|
+
TokenRef(
|
|
1190
|
+
token_uid="04A2B3C4D5E6F7",
|
|
1191
|
+
type="RFID",
|
|
1192
|
+
ocpi_version="221",
|
|
1193
|
+
)
|
|
1194
|
+
],
|
|
1195
|
+
)
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
asyncio.run(main())
|
|
1199
|
+
"""
|
|
1200
|
+
_response = await self._raw_client.add_tokens(
|
|
1201
|
+
group_id, idempotency_key=idempotency_key, tokens=tokens, request_options=request_options
|
|
1202
|
+
)
|
|
1203
|
+
return _response.data
|
|
1204
|
+
|
|
1205
|
+
async def remove_token(
|
|
1206
|
+
self,
|
|
1207
|
+
group_id: int,
|
|
1208
|
+
token_uid: str,
|
|
1209
|
+
*,
|
|
1210
|
+
type: RemoveTokenTokenGroupsRequestType,
|
|
1211
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1212
|
+
) -> None:
|
|
1213
|
+
"""
|
|
1214
|
+
The token keeps its current ``valid`` flag.
|
|
1215
|
+
|
|
1216
|
+
Parameters
|
|
1217
|
+
----------
|
|
1218
|
+
group_id : int
|
|
1219
|
+
The token group's ``id``.
|
|
1220
|
+
|
|
1221
|
+
token_uid : str
|
|
1222
|
+
OCPI token ``uid``.
|
|
1223
|
+
|
|
1224
|
+
type : RemoveTokenTokenGroupsRequestType
|
|
1225
|
+
The token's OCPI type, e.g. RFID.
|
|
1226
|
+
|
|
1227
|
+
request_options : typing.Optional[RequestOptions]
|
|
1228
|
+
Request-specific configuration.
|
|
1229
|
+
|
|
1230
|
+
Returns
|
|
1231
|
+
-------
|
|
1232
|
+
None
|
|
1233
|
+
|
|
1234
|
+
Examples
|
|
1235
|
+
--------
|
|
1236
|
+
import asyncio
|
|
1237
|
+
|
|
1238
|
+
from evcloud import AsyncEvcloudClient
|
|
1239
|
+
|
|
1240
|
+
client = AsyncEvcloudClient(
|
|
1241
|
+
token="YOUR_TOKEN",
|
|
1242
|
+
)
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
async def main() -> None:
|
|
1246
|
+
await client.emsp.token_groups.remove_token(
|
|
1247
|
+
group_id=12,
|
|
1248
|
+
token_uid="04A2B3C4D5E6F7",
|
|
1249
|
+
type="RFID",
|
|
1250
|
+
)
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
asyncio.run(main())
|
|
1254
|
+
"""
|
|
1255
|
+
_response = await self._raw_client.remove_token(group_id, token_uid, type=type, request_options=request_options)
|
|
1256
|
+
return _response.data
|