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.
Files changed (635) hide show
  1. evcloud/__init__.py +802 -0
  2. evcloud/_default_clients.py +30 -0
  3. evcloud/client.py +200 -0
  4. evcloud/core/__init__.py +67 -0
  5. evcloud/core/api_error.py +23 -0
  6. evcloud/core/client_wrapper.py +108 -0
  7. evcloud/core/datetime_utils.py +70 -0
  8. evcloud/core/file.py +67 -0
  9. evcloud/core/force_multipart.py +18 -0
  10. evcloud/core/http_client.py +840 -0
  11. evcloud/core/http_response.py +59 -0
  12. evcloud/core/http_sse/__init__.py +9 -0
  13. evcloud/core/http_sse/_api.py +112 -0
  14. evcloud/core/http_sse/_decoders.py +61 -0
  15. evcloud/core/http_sse/_exceptions.py +7 -0
  16. evcloud/core/http_sse/_models.py +17 -0
  17. evcloud/core/jsonable_encoder.py +120 -0
  18. evcloud/core/logging.py +107 -0
  19. evcloud/core/pagination.py +82 -0
  20. evcloud/core/parse_error.py +36 -0
  21. evcloud/core/pydantic_utilities.py +634 -0
  22. evcloud/core/query_encoder.py +58 -0
  23. evcloud/core/remove_none_from_dict.py +11 -0
  24. evcloud/core/request_options.py +35 -0
  25. evcloud/core/serialization.py +276 -0
  26. evcloud/cpo/__init__.py +31 -0
  27. evcloud/cpo/cdrs/__init__.py +4 -0
  28. evcloud/cpo/cdrs/client.py +311 -0
  29. evcloud/cpo/cdrs/raw_client.py +592 -0
  30. evcloud/cpo/charge_points/__init__.py +7 -0
  31. evcloud/cpo/charge_points/client.py +1436 -0
  32. evcloud/cpo/charge_points/raw_client.py +2809 -0
  33. evcloud/cpo/charge_points/types/__init__.py +7 -0
  34. evcloud/cpo/charge_points/types/list_charge_points_request_ocpp_version.py +5 -0
  35. evcloud/cpo/client.py +62 -0
  36. evcloud/cpo/connectors/__init__.py +4 -0
  37. evcloud/cpo/connectors/client.py +698 -0
  38. evcloud/cpo/connectors/raw_client.py +1457 -0
  39. evcloud/cpo/evses/__init__.py +4 -0
  40. evcloud/cpo/evses/client.py +691 -0
  41. evcloud/cpo/evses/raw_client.py +1457 -0
  42. evcloud/cpo/health/__init__.py +4 -0
  43. evcloud/cpo/health/client.py +100 -0
  44. evcloud/cpo/health/raw_client.py +192 -0
  45. evcloud/cpo/locations/__init__.py +4 -0
  46. evcloud/cpo/locations/client.py +1021 -0
  47. evcloud/cpo/locations/raw_client.py +1887 -0
  48. evcloud/cpo/raw_client.py +13 -0
  49. evcloud/cpo/sessions/__init__.py +7 -0
  50. evcloud/cpo/sessions/client.py +430 -0
  51. evcloud/cpo/sessions/raw_client.py +889 -0
  52. evcloud/cpo/sessions/types/__init__.py +8 -0
  53. evcloud/cpo/sessions/types/list_sessions_request_billing_state.py +5 -0
  54. evcloud/cpo/sessions/types/list_sessions_request_status.py +7 -0
  55. evcloud/cpo/tariffs/__init__.py +17 -0
  56. evcloud/cpo/tariffs/client.py +1232 -0
  57. evcloud/cpo/tariffs/raw_client.py +2526 -0
  58. evcloud/cpo/tariffs/types/__init__.py +15 -0
  59. evcloud/cpo/tariffs/types/list_tariffs_request_type.py +7 -0
  60. evcloud/cpo/tariffs/types/tariff_create_ocpi_version.py +5 -0
  61. evcloud/cpo/tariffs/types/tariff_create_preauthorize_amount.py +5 -0
  62. evcloud/cpo/tariffs/types/tariff_patch_preauthorize_amount.py +5 -0
  63. evcloud/emsp/__init__.py +55 -0
  64. evcloud/emsp/cdrs/__init__.py +4 -0
  65. evcloud/emsp/cdrs/client.py +300 -0
  66. evcloud/emsp/cdrs/raw_client.py +610 -0
  67. evcloud/emsp/chargers/__init__.py +7 -0
  68. evcloud/emsp/chargers/client.py +167 -0
  69. evcloud/emsp/chargers/raw_client.py +331 -0
  70. evcloud/emsp/chargers/types/__init__.py +11 -0
  71. evcloud/emsp/chargers/types/resolve_chargers_response.py +53 -0
  72. evcloud/emsp/client.py +77 -0
  73. evcloud/emsp/commands/__init__.py +7 -0
  74. evcloud/emsp/commands/client.py +516 -0
  75. evcloud/emsp/commands/raw_client.py +979 -0
  76. evcloud/emsp/commands/types/__init__.py +7 -0
  77. evcloud/emsp/commands/types/send_commands_request_command.py +7 -0
  78. evcloud/emsp/emp_identities/__init__.py +4 -0
  79. evcloud/emsp/emp_identities/client.py +548 -0
  80. evcloud/emsp/emp_identities/raw_client.py +1277 -0
  81. evcloud/emsp/evses/__init__.py +4 -0
  82. evcloud/emsp/evses/client.py +154 -0
  83. evcloud/emsp/evses/raw_client.py +288 -0
  84. evcloud/emsp/health/__init__.py +4 -0
  85. evcloud/emsp/health/client.py +100 -0
  86. evcloud/emsp/health/raw_client.py +192 -0
  87. evcloud/emsp/locations/__init__.py +4 -0
  88. evcloud/emsp/locations/client.py +1386 -0
  89. evcloud/emsp/locations/raw_client.py +2903 -0
  90. evcloud/emsp/networks/__init__.py +7 -0
  91. evcloud/emsp/networks/client.py +1615 -0
  92. evcloud/emsp/networks/raw_client.py +3725 -0
  93. evcloud/emsp/networks/types/__init__.py +9 -0
  94. evcloud/emsp/networks/types/list_networks_request_network_type.py +5 -0
  95. evcloud/emsp/networks/types/list_rules_networks_request_validity.py +5 -0
  96. evcloud/emsp/networks/types/network_rule_create_request_rule_type.py +5 -0
  97. evcloud/emsp/raw_client.py +13 -0
  98. evcloud/emsp/sessions/__init__.py +4 -0
  99. evcloud/emsp/sessions/client.py +300 -0
  100. evcloud/emsp/sessions/raw_client.py +610 -0
  101. evcloud/emsp/tariffs/__init__.py +7 -0
  102. evcloud/emsp/tariffs/client.py +421 -0
  103. evcloud/emsp/tariffs/raw_client.py +883 -0
  104. evcloud/emsp/tariffs/types/__init__.py +8 -0
  105. evcloud/emsp/tariffs/types/estimate_request_kwh.py +5 -0
  106. evcloud/emsp/tariffs/types/estimate_request_minutes.py +5 -0
  107. evcloud/emsp/tenant/__init__.py +4 -0
  108. evcloud/emsp/tenant/client.py +328 -0
  109. evcloud/emsp/tenant/raw_client.py +869 -0
  110. evcloud/emsp/token_groups/__init__.py +7 -0
  111. evcloud/emsp/token_groups/client.py +1256 -0
  112. evcloud/emsp/token_groups/raw_client.py +3288 -0
  113. evcloud/emsp/token_groups/types/__init__.py +7 -0
  114. evcloud/emsp/token_groups/types/remove_token_token_groups_request_type.py +5 -0
  115. evcloud/emsp/tokens/__init__.py +7 -0
  116. evcloud/emsp/tokens/client.py +1298 -0
  117. evcloud/emsp/tokens/raw_client.py +2947 -0
  118. evcloud/emsp/tokens/types/__init__.py +10 -0
  119. evcloud/emsp/tokens/types/list_tokens_request_status.py +7 -0
  120. evcloud/emsp/tokens/types/list_tokens_request_type.py +5 -0
  121. evcloud/emsp/tokens/types/token_update_default_profile_type.py +5 -0
  122. evcloud/emsp/tokens/types/token_update_whitelist.py +5 -0
  123. evcloud/energy/__init__.py +8 -0
  124. evcloud/energy/client.py +47 -0
  125. evcloud/energy/control_requests/__init__.py +7 -0
  126. evcloud/energy/control_requests/client.py +399 -0
  127. evcloud/energy/control_requests/raw_client.py +835 -0
  128. evcloud/energy/control_requests/types/__init__.py +7 -0
  129. evcloud/energy/control_requests/types/list_control_requests_request_result.py +15 -0
  130. evcloud/energy/health/__init__.py +4 -0
  131. evcloud/energy/health/client.py +100 -0
  132. evcloud/energy/health/raw_client.py +192 -0
  133. evcloud/energy/power_measurements/__init__.py +4 -0
  134. evcloud/energy/power_measurements/client.py +254 -0
  135. evcloud/energy/power_measurements/raw_client.py +527 -0
  136. evcloud/energy/raw_client.py +13 -0
  137. evcloud/environment.py +7 -0
  138. evcloud/errors/__init__.py +25 -0
  139. evcloud/errors/bad_gateway_error.py +11 -0
  140. evcloud/errors/bad_request_error.py +11 -0
  141. evcloud/errors/conflict_error.py +11 -0
  142. evcloud/errors/forbidden_error.py +11 -0
  143. evcloud/errors/gateway_timeout_error.py +11 -0
  144. evcloud/errors/not_found_error.py +11 -0
  145. evcloud/errors/too_many_requests_error.py +11 -0
  146. evcloud/errors/unauthorized_error.py +11 -0
  147. evcloud/errors/unprocessable_entity_error.py +11 -0
  148. evcloud/health/__init__.py +4 -0
  149. evcloud/health/client.py +99 -0
  150. evcloud/health/raw_client.py +100 -0
  151. evcloud/ocpi/__init__.py +123 -0
  152. evcloud/ocpi/client.py +56 -0
  153. evcloud/ocpi/cpo_data/__init__.py +31 -0
  154. evcloud/ocpi/cpo_data/client.py +1553 -0
  155. evcloud/ocpi/cpo_data/raw_client.py +3119 -0
  156. evcloud/ocpi/cpo_data/types/__init__.py +29 -0
  157. evcloud/ocpi/cpo_data/types/cancel_reservation_cpo_data_request_version.py +5 -0
  158. evcloud/ocpi/cpo_data/types/create_cdr_cpo_data_request_version.py +5 -0
  159. evcloud/ocpi/cpo_data/types/delete_tariff_cpo_data_request_version.py +5 -0
  160. evcloud/ocpi/cpo_data/types/send_active_charging_profile_cpo_data_request_version.py +5 -0
  161. evcloud/ocpi/cpo_data/types/update_connector_cpo_data_request_version.py +5 -0
  162. evcloud/ocpi/cpo_data/types/update_evse_status_cpo_data_request_version.py +5 -0
  163. evcloud/ocpi/cpo_data/types/update_location_cpo_data_request_version.py +5 -0
  164. evcloud/ocpi/cpo_data/types/update_session_cpo_data_request_version.py +5 -0
  165. evcloud/ocpi/cpo_data/types/upsert_location_cpo_data_request_version.py +5 -0
  166. evcloud/ocpi/cpo_data/types/upsert_session_cpo_data_request_version.py +5 -0
  167. evcloud/ocpi/cpo_data/types/upsert_tariff_cpo_data_request_version.py +5 -0
  168. evcloud/ocpi/credentials/__init__.py +31 -0
  169. evcloud/ocpi/credentials/client.py +750 -0
  170. evcloud/ocpi/credentials/raw_client.py +1537 -0
  171. evcloud/ocpi/credentials/types/__init__.py +29 -0
  172. evcloud/ocpi/credentials/types/partner_versions_pull_request_partner_token_encoding.py +5 -0
  173. evcloud/ocpi/credentials/types/pull_versions_credentials_request_role.py +5 -0
  174. evcloud/ocpi/credentials/types/pull_versions_credentials_request_version.py +5 -0
  175. evcloud/ocpi/credentials/types/rotate_credentials_request_role.py +5 -0
  176. evcloud/ocpi/credentials/types/rotate_credentials_request_version.py +5 -0
  177. evcloud/ocpi/credentials/types/start_handshake_credentials_request_role.py +5 -0
  178. evcloud/ocpi/credentials/types/start_handshake_credentials_request_version.py +5 -0
  179. evcloud/ocpi/credentials/types/status_credentials_request_role.py +5 -0
  180. evcloud/ocpi/credentials/types/status_credentials_request_version.py +5 -0
  181. evcloud/ocpi/credentials/types/unregister_credentials_request_role.py +5 -0
  182. evcloud/ocpi/credentials/types/unregister_credentials_request_version.py +5 -0
  183. evcloud/ocpi/emsp/__init__.py +27 -0
  184. evcloud/ocpi/emsp/client.py +1142 -0
  185. evcloud/ocpi/emsp/raw_client.py +2209 -0
  186. evcloud/ocpi/emsp/types/__init__.py +25 -0
  187. evcloud/ocpi/emsp/types/charging_preferences_request_profile_type.py +5 -0
  188. evcloud/ocpi/emsp/types/clear_charging_profile_emsp_request_version.py +5 -0
  189. evcloud/ocpi/emsp/types/get_active_charging_profile_emsp_request_version.py +5 -0
  190. evcloud/ocpi/emsp/types/send_command_emsp_request_command.py +7 -0
  191. evcloud/ocpi/emsp/types/send_command_emsp_request_version.py +5 -0
  192. evcloud/ocpi/emsp/types/set_charging_preferences_emsp_request_version.py +5 -0
  193. evcloud/ocpi/emsp/types/set_charging_profile_emsp_request_version.py +5 -0
  194. evcloud/ocpi/emsp/types/update_token_emsp_request_version.py +5 -0
  195. evcloud/ocpi/emsp/types/upsert_token_emsp_request_version.py +5 -0
  196. evcloud/ocpi/invites/__init__.py +19 -0
  197. evcloud/ocpi/invites/client.py +385 -0
  198. evcloud/ocpi/invites/raw_client.py +887 -0
  199. evcloud/ocpi/invites/types/__init__.py +17 -0
  200. evcloud/ocpi/invites/types/partner_invite_create_request_gateway_role.py +5 -0
  201. evcloud/ocpi/invites/types/partner_invite_create_request_role.py +5 -0
  202. evcloud/ocpi/invites/types/partner_invite_create_request_version.py +5 -0
  203. evcloud/ocpi/invites/types/partner_invite_update_request_gateway_role.py +5 -0
  204. evcloud/ocpi/invites/types/partner_invite_update_request_version.py +5 -0
  205. evcloud/ocpi/partners/__init__.py +7 -0
  206. evcloud/ocpi/partners/client.py +581 -0
  207. evcloud/ocpi/partners/raw_client.py +1340 -0
  208. evcloud/ocpi/partners/types/__init__.py +8 -0
  209. evcloud/ocpi/partners/types/partner_register_request_ocpi_version.py +5 -0
  210. evcloud/ocpi/partners/types/partner_update_request_ocpi_version.py +5 -0
  211. evcloud/ocpi/raw_client.py +13 -0
  212. evcloud/ocpi/sync/__init__.py +33 -0
  213. evcloud/ocpi/sync/client.py +1701 -0
  214. evcloud/ocpi/sync/raw_client.py +3685 -0
  215. evcloud/ocpi/sync/types/__init__.py +31 -0
  216. evcloud/ocpi/sync/types/pull_cdrs_sync_request_version.py +5 -0
  217. evcloud/ocpi/sync/types/pull_hub_client_info_as_cpo_sync_request_version.py +5 -0
  218. evcloud/ocpi/sync/types/pull_hub_client_info_as_emsp_sync_request_version.py +5 -0
  219. evcloud/ocpi/sync/types/pull_locations_sync_request_version.py +5 -0
  220. evcloud/ocpi/sync/types/pull_sessions_sync_request_version.py +5 -0
  221. evcloud/ocpi/sync/types/pull_tariffs_sync_request_version.py +5 -0
  222. evcloud/ocpi/sync/types/pull_tokens_sync_request_version.py +5 -0
  223. evcloud/ocpi/sync/types/push_cdr_sync_request_version.py +5 -0
  224. evcloud/ocpi/sync/types/push_location_sync_request_version.py +5 -0
  225. evcloud/ocpi/sync/types/push_session_sync_request_version.py +5 -0
  226. evcloud/ocpi/sync/types/push_tariff_sync_request_version.py +5 -0
  227. evcloud/ocpi/sync/types/push_token_sync_request_version.py +5 -0
  228. evcloud/py.typed +0 -0
  229. evcloud/types/__init__.py +759 -0
  230. evcloud/types/access_mode.py +5 -0
  231. evcloud/types/asset_connector.py +26 -0
  232. evcloud/types/asset_updated_event.py +29 -0
  233. evcloud/types/availability_page.py +26 -0
  234. evcloud/types/batch_response.py +26 -0
  235. evcloud/types/batch_response_missing_item.py +7 -0
  236. evcloud/types/cdr_event.py +41 -0
  237. evcloud/types/cdr_out.py +75 -0
  238. evcloud/types/cdr_out_auth_method.py +7 -0
  239. evcloud/types/cdr_out_auth_method_zero.py +5 -0
  240. evcloud/types/cdr_out_origin.py +7 -0
  241. evcloud/types/cdr_out_origin_zero.py +5 -0
  242. evcloud/types/cdr_page.py +27 -0
  243. evcloud/types/cdr_write_response.py +26 -0
  244. evcloud/types/charge_point_created_out.py +74 -0
  245. evcloud/types/charge_point_created_out_access_mode.py +7 -0
  246. evcloud/types/charge_point_created_out_access_mode_zero.py +5 -0
  247. evcloud/types/charge_point_created_out_pricing.py +7 -0
  248. evcloud/types/charge_point_created_out_pricing_zero.py +5 -0
  249. evcloud/types/charge_point_created_out_site_type.py +7 -0
  250. evcloud/types/charge_point_created_out_site_type_zero.py +5 -0
  251. evcloud/types/charge_point_out.py +73 -0
  252. evcloud/types/charge_point_out_access_mode.py +7 -0
  253. evcloud/types/charge_point_out_access_mode_zero.py +5 -0
  254. evcloud/types/charge_point_out_pricing.py +7 -0
  255. evcloud/types/charge_point_out_pricing_zero.py +5 -0
  256. evcloud/types/charge_point_out_site_type.py +7 -0
  257. evcloud/types/charge_point_out_site_type_zero.py +5 -0
  258. evcloud/types/charge_point_page.py +27 -0
  259. evcloud/types/charging_preferences_response.py +28 -0
  260. evcloud/types/charging_preferences_response_result.py +10 -0
  261. evcloud/types/charging_profile.py +30 -0
  262. evcloud/types/charging_profile_charging_rate_unit.py +5 -0
  263. evcloud/types/charging_profile_period.py +31 -0
  264. evcloud/types/charging_profile_response.py +32 -0
  265. evcloud/types/cluster_page.py +26 -0
  266. evcloud/types/command_accepted.py +30 -0
  267. evcloud/types/command_accepted_route.py +53 -0
  268. evcloud/types/command_accepted_route_own.py +28 -0
  269. evcloud/types/command_accepted_route_own_ocpi_version.py +7 -0
  270. evcloud/types/command_accepted_route_own_ocpi_version_zero.py +5 -0
  271. evcloud/types/command_accepted_route_roaming.py +30 -0
  272. evcloud/types/command_accepted_route_roaming_ocpi_version.py +7 -0
  273. evcloud/types/command_accepted_route_roaming_ocpi_version_zero.py +5 -0
  274. evcloud/types/command_accepted_status.py +7 -0
  275. evcloud/types/command_accepted_status_zero.py +20 -0
  276. evcloud/types/command_page.py +26 -0
  277. evcloud/types/command_record.py +40 -0
  278. evcloud/types/command_record_command.py +7 -0
  279. evcloud/types/command_record_command_zero.py +7 -0
  280. evcloud/types/command_record_route.py +53 -0
  281. evcloud/types/command_record_route_own.py +28 -0
  282. evcloud/types/command_record_route_own_ocpi_version.py +7 -0
  283. evcloud/types/command_record_route_own_ocpi_version_zero.py +5 -0
  284. evcloud/types/command_record_route_roaming.py +30 -0
  285. evcloud/types/command_record_route_roaming_ocpi_version.py +7 -0
  286. evcloud/types/command_record_route_roaming_ocpi_version_zero.py +5 -0
  287. evcloud/types/command_record_status.py +7 -0
  288. evcloud/types/command_record_status_zero.py +20 -0
  289. evcloud/types/command_response_out.py +26 -0
  290. evcloud/types/command_response_out_result.py +7 -0
  291. evcloud/types/command_response_out_result_zero.py +7 -0
  292. evcloud/types/command_result_event.py +39 -0
  293. evcloud/types/command_result_event_module.py +5 -0
  294. evcloud/types/command_result_event_protocol.py +5 -0
  295. evcloud/types/command_result_event_status.py +5 -0
  296. evcloud/types/command_send_response.py +31 -0
  297. evcloud/types/command_token.py +36 -0
  298. evcloud/types/connector_format.py +5 -0
  299. evcloud/types/connector_page.py +27 -0
  300. evcloud/types/connector_status_event.py +29 -0
  301. evcloud/types/connector_write_response.py +27 -0
  302. evcloud/types/control_action.py +5 -0
  303. evcloud/types/control_request_page.py +27 -0
  304. evcloud/types/control_request_response.py +38 -0
  305. evcloud/types/control_request_response_action.py +7 -0
  306. evcloud/types/control_request_response_action_zero.py +7 -0
  307. evcloud/types/control_request_response_result.py +7 -0
  308. evcloud/types/control_request_response_result_zero.py +15 -0
  309. evcloud/types/control_request_response_unit.py +7 -0
  310. evcloud/types/control_request_response_unit_zero.py +5 -0
  311. evcloud/types/control_response_event.py +38 -0
  312. evcloud/types/control_response_event_action.py +5 -0
  313. evcloud/types/control_response_event_result.py +15 -0
  314. evcloud/types/control_response_event_unit.py +5 -0
  315. evcloud/types/cpo_connector_out.py +58 -0
  316. evcloud/types/cpo_connector_out_format.py +7 -0
  317. evcloud/types/cpo_connector_out_format_zero.py +5 -0
  318. evcloud/types/cpo_connector_out_ocpi_status.py +7 -0
  319. evcloud/types/cpo_connector_out_ocpi_status_zero.py +10 -0
  320. evcloud/types/cpo_connector_out_power_type.py +7 -0
  321. evcloud/types/cpo_connector_out_power_type_zero.py +7 -0
  322. evcloud/types/cpo_evse_out.py +61 -0
  323. evcloud/types/cpo_evse_out_origin.py +7 -0
  324. evcloud/types/cpo_evse_out_origin_zero.py +5 -0
  325. evcloud/types/cpo_evse_out_status.py +7 -0
  326. evcloud/types/cpo_evse_out_status_zero.py +10 -0
  327. evcloud/types/credentials_handshake_request.py +44 -0
  328. evcloud/types/credentials_handshake_request_partner_token_encoding.py +5 -0
  329. evcloud/types/credentials_handshake_response.py +32 -0
  330. evcloud/types/credentials_handshake_response_action.py +7 -0
  331. evcloud/types/credentials_handshake_response_version.py +5 -0
  332. evcloud/types/deliver_event_response.py +23 -0
  333. evcloud/types/delivery_drift_event.py +30 -0
  334. evcloud/types/display_text.py +24 -0
  335. evcloud/types/effective_cpo.py +27 -0
  336. evcloud/types/effective_cpo_source.py +7 -0
  337. evcloud/types/effective_cpo_source_zero.py +5 -0
  338. evcloud/types/effective_view_response.py +29 -0
  339. evcloud/types/emp_identity_out.py +35 -0
  340. evcloud/types/emp_identity_out_status.py +7 -0
  341. evcloud/types/emp_identity_out_status_zero.py +5 -0
  342. evcloud/types/emp_identity_page.py +26 -0
  343. evcloud/types/emsp_cdr_out.py +41 -0
  344. evcloud/types/emsp_cdr_out_source.py +7 -0
  345. evcloud/types/emsp_cdr_out_source_zero.py +5 -0
  346. evcloud/types/emsp_cdr_page.py +26 -0
  347. evcloud/types/emsp_connector_out.py +30 -0
  348. evcloud/types/emsp_evse_out.py +32 -0
  349. evcloud/types/emsp_gateway_schema_commands_location_key.py +25 -0
  350. evcloud/types/emsp_gateway_schema_location_lookup_location_key.py +25 -0
  351. evcloud/types/emsp_gateway_schema_locations_location_out.py +47 -0
  352. evcloud/types/emsp_gateway_schema_locations_location_page.py +26 -0
  353. evcloud/types/emsp_gateway_schema_networks_location_out.py +37 -0
  354. evcloud/types/emsp_gateway_schema_networks_location_page.py +26 -0
  355. evcloud/types/emsp_session_out.py +41 -0
  356. evcloud/types/emsp_session_out_source.py +7 -0
  357. evcloud/types/emsp_session_out_source_zero.py +5 -0
  358. evcloud/types/emsp_session_page.py +26 -0
  359. evcloud/types/emsp_tariff_page.py +26 -0
  360. evcloud/types/energy_contract.py +24 -0
  361. evcloud/types/estimate_line.py +27 -0
  362. evcloud/types/estimate_line_type.py +7 -0
  363. evcloud/types/estimate_line_type_zero.py +5 -0
  364. evcloud/types/estimate_response.py +30 -0
  365. evcloud/types/event_type_list.py +24 -0
  366. evcloud/types/event_type_response.py +27 -0
  367. evcloud/types/event_type_response_type.py +7 -0
  368. evcloud/types/event_type_response_type_zero.py +27 -0
  369. evcloud/types/event_type_version.py +24 -0
  370. evcloud/types/evse_connector_status.py +26 -0
  371. evcloud/types/evse_page.py +27 -0
  372. evcloud/types/evse_parking.py +25 -0
  373. evcloud/types/evse_parking_evse_position.py +7 -0
  374. evcloud/types/evse_parking_evse_position_zero.py +5 -0
  375. evcloud/types/evse_status_event.py +31 -0
  376. evcloud/types/evse_status_out.py +32 -0
  377. evcloud/types/evse_status_write_response.py +28 -0
  378. evcloud/types/facility_count.py +24 -0
  379. evcloud/types/facility_page.py +26 -0
  380. evcloud/types/health_ok.py +24 -0
  381. evcloud/types/health_ok_status.py +7 -0
  382. evcloud/types/health_ok_status_zero.py +5 -0
  383. evcloud/types/http_error_response.py +29 -0
  384. evcloud/types/http_validation_error.py +24 -0
  385. evcloud/types/limit_unit.py +5 -0
  386. evcloud/types/location_availability.py +28 -0
  387. evcloud/types/location_availability_status.py +7 -0
  388. evcloud/types/location_availability_status_zero.py +7 -0
  389. evcloud/types/location_base.py +53 -0
  390. evcloud/types/location_base_parking_type.py +7 -0
  391. evcloud/types/location_base_parking_type_zero.py +8 -0
  392. evcloud/types/location_cluster.py +26 -0
  393. evcloud/types/location_detail.py +51 -0
  394. evcloud/types/location_key_input.py +25 -0
  395. evcloud/types/location_list.py +24 -0
  396. evcloud/types/location_out.py +79 -0
  397. evcloud/types/location_out_access_mode.py +7 -0
  398. evcloud/types/location_out_access_mode_zero.py +5 -0
  399. evcloud/types/location_out_ocpi_version.py +7 -0
  400. evcloud/types/location_out_ocpi_version_zero.py +5 -0
  401. evcloud/types/location_out_origin.py +7 -0
  402. evcloud/types/location_out_origin_zero.py +5 -0
  403. evcloud/types/location_out_parking_type.py +7 -0
  404. evcloud/types/location_out_parking_type_zero.py +8 -0
  405. evcloud/types/location_out_role.py +7 -0
  406. evcloud/types/location_out_role_zero.py +5 -0
  407. evcloud/types/location_out_site_type.py +7 -0
  408. evcloud/types/location_out_site_type_zero.py +5 -0
  409. evcloud/types/location_page.py +27 -0
  410. evcloud/types/location_summary.py +43 -0
  411. evcloud/types/location_updated_event.py +30 -0
  412. evcloud/types/location_write_response.py +26 -0
  413. evcloud/types/map_cluster.py +28 -0
  414. evcloud/types/map_page.py +29 -0
  415. evcloud/types/network_consumer.py +25 -0
  416. evcloud/types/network_consumer_page.py +26 -0
  417. evcloud/types/network_detail_response.py +49 -0
  418. evcloud/types/network_detail_response_network_type.py +7 -0
  419. evcloud/types/network_detail_response_network_type_zero.py +5 -0
  420. evcloud/types/network_detail_response_publish_state.py +7 -0
  421. evcloud/types/network_detail_response_publish_state_zero.py +7 -0
  422. evcloud/types/network_page.py +26 -0
  423. evcloud/types/network_priority_order.py +23 -0
  424. evcloud/types/network_response.py +46 -0
  425. evcloud/types/network_response_network_type.py +7 -0
  426. evcloud/types/network_response_network_type_zero.py +5 -0
  427. evcloud/types/network_response_publish_state.py +7 -0
  428. evcloud/types/network_response_publish_state_zero.py +5 -0
  429. evcloud/types/network_rule_page.py +26 -0
  430. evcloud/types/network_rule_response.py +33 -0
  431. evcloud/types/network_rule_response_rule_type.py +7 -0
  432. evcloud/types/network_rule_response_rule_type_zero.py +5 -0
  433. evcloud/types/ocpi_business_details.py +26 -0
  434. evcloud/types/ocpi_business_details_input.py +26 -0
  435. evcloud/types/ocpi_cdr_dimension.py +24 -0
  436. evcloud/types/ocpi_cdr_location.py +30 -0
  437. evcloud/types/ocpi_cdr_token.py +30 -0
  438. evcloud/types/ocpi_charging_period.py +27 -0
  439. evcloud/types/ocpi_display_text.py +24 -0
  440. evcloud/types/ocpi_energy_mix.py +29 -0
  441. evcloud/types/ocpi_energy_mix_input.py +29 -0
  442. evcloud/types/ocpi_energy_source.py +24 -0
  443. evcloud/types/ocpi_energy_source_input.py +24 -0
  444. evcloud/types/ocpi_environmental_impact.py +24 -0
  445. evcloud/types/ocpi_evse_parking.py +24 -0
  446. evcloud/types/ocpi_exceptional_period.py +25 -0
  447. evcloud/types/ocpi_geo_location.py +24 -0
  448. evcloud/types/ocpi_geo_location_in.py +24 -0
  449. evcloud/types/ocpi_image.py +28 -0
  450. evcloud/types/ocpi_image_input.py +28 -0
  451. evcloud/types/ocpi_opening_times.py +28 -0
  452. evcloud/types/ocpi_opening_times_input.py +28 -0
  453. evcloud/types/ocpi_parking_place.py +44 -0
  454. evcloud/types/ocpi_parking_place_input.py +44 -0
  455. evcloud/types/ocpi_price_component_input.py +28 -0
  456. evcloud/types/ocpi_price_component_input_price.py +5 -0
  457. evcloud/types/ocpi_price_component_input_vat.py +5 -0
  458. evcloud/types/ocpi_price_component_output.py +26 -0
  459. evcloud/types/ocpi_price_input.py +26 -0
  460. evcloud/types/ocpi_price_input_excl_vat.py +5 -0
  461. evcloud/types/ocpi_price_input_incl_vat.py +5 -0
  462. evcloud/types/ocpi_price_output.py +24 -0
  463. evcloud/types/ocpi_publish_token.py +27 -0
  464. evcloud/types/ocpi_regular_hours.py +25 -0
  465. evcloud/types/ocpi_regular_hours_input.py +25 -0
  466. evcloud/types/ocpi_related_location.py +26 -0
  467. evcloud/types/ocpi_signed_data.py +28 -0
  468. evcloud/types/ocpi_signed_value.py +25 -0
  469. evcloud/types/ocpi_status_schedule.py +26 -0
  470. evcloud/types/ocpi_tariff_element_input.py +26 -0
  471. evcloud/types/ocpi_tariff_element_output.py +26 -0
  472. evcloud/types/ocpi_tariff_restrictions_input.py +33 -0
  473. evcloud/types/ocpi_tariff_restrictions_input_max_kwh.py +5 -0
  474. evcloud/types/ocpi_tariff_restrictions_input_min_kwh.py +5 -0
  475. evcloud/types/ocpi_tariff_restrictions_output.py +31 -0
  476. evcloud/types/ocpi_tariff_snapshot.py +26 -0
  477. evcloud/types/ocpp_version.py +5 -0
  478. evcloud/types/page_info.py +24 -0
  479. evcloud/types/parking.py +45 -0
  480. evcloud/types/parking_direction.py +7 -0
  481. evcloud/types/parking_direction_zero.py +5 -0
  482. evcloud/types/parking_type.py +8 -0
  483. evcloud/types/parking_vehicle_types_item.py +7 -0
  484. evcloud/types/parking_vehicle_types_item_zero.py +18 -0
  485. evcloud/types/partner_invite_response.py +47 -0
  486. evcloud/types/partner_invite_response_action.py +5 -0
  487. evcloud/types/partner_invite_response_role.py +5 -0
  488. evcloud/types/partner_invite_response_version.py +5 -0
  489. evcloud/types/partner_invite_revoke_response.py +31 -0
  490. evcloud/types/partner_invite_revoke_response_role.py +5 -0
  491. evcloud/types/partner_response.py +41 -0
  492. evcloud/types/partner_response_ocpi_version.py +5 -0
  493. evcloud/types/partner_token_updated_event.py +35 -0
  494. evcloud/types/partner_versions_pull_response.py +29 -0
  495. evcloud/types/partner_versions_pull_response_code.py +8 -0
  496. evcloud/types/partner_versions_pull_response_version.py +5 -0
  497. evcloud/types/power_measurement.py +30 -0
  498. evcloud/types/power_measurement_event.py +30 -0
  499. evcloud/types/power_measurement_list.py +24 -0
  500. evcloud/types/power_type.py +5 -0
  501. evcloud/types/price_component.py +26 -0
  502. evcloud/types/price_limit.py +24 -0
  503. evcloud/types/pricing_mode.py +5 -0
  504. evcloud/types/queue_health.py +34 -0
  505. evcloud/types/reservation_cancel_response.py +25 -0
  506. evcloud/types/resolve_chargers_response_own.py +28 -0
  507. evcloud/types/resolve_chargers_response_own_ocpi_version.py +7 -0
  508. evcloud/types/resolve_chargers_response_own_ocpi_version_zero.py +5 -0
  509. evcloud/types/resolve_chargers_response_roaming.py +30 -0
  510. evcloud/types/resolve_chargers_response_roaming_ocpi_version.py +7 -0
  511. evcloud/types/resolve_chargers_response_roaming_ocpi_version_zero.py +5 -0
  512. evcloud/types/session_event.py +39 -0
  513. evcloud/types/session_out.py +60 -0
  514. evcloud/types/session_out_auth_method.py +7 -0
  515. evcloud/types/session_out_auth_method_zero.py +5 -0
  516. evcloud/types/session_out_billing_state.py +7 -0
  517. evcloud/types/session_out_billing_state_zero.py +5 -0
  518. evcloud/types/session_out_origin.py +7 -0
  519. evcloud/types/session_out_origin_zero.py +5 -0
  520. evcloud/types/session_out_status.py +7 -0
  521. evcloud/types/session_out_status_zero.py +7 -0
  522. evcloud/types/session_page.py +27 -0
  523. evcloud/types/session_write_response.py +27 -0
  524. evcloud/types/sharing_slot.py +25 -0
  525. evcloud/types/sharing_slot_input.py +25 -0
  526. evcloud/types/site_type.py +5 -0
  527. evcloud/types/sync_patch_request.py +26 -0
  528. evcloud/types/sync_pull_response.py +31 -0
  529. evcloud/types/sync_push_response.py +31 -0
  530. evcloud/types/sync_push_response_status.py +5 -0
  531. evcloud/types/tariff.py +42 -0
  532. evcloud/types/tariff_assignment_out.py +32 -0
  533. evcloud/types/tariff_assignment_page.py +27 -0
  534. evcloud/types/tariff_delete_response.py +26 -0
  535. evcloud/types/tariff_display.py +27 -0
  536. evcloud/types/tariff_element.py +26 -0
  537. evcloud/types/tariff_out.py +57 -0
  538. evcloud/types/tariff_out_origin.py +7 -0
  539. evcloud/types/tariff_out_origin_zero.py +5 -0
  540. evcloud/types/tariff_out_tax_included.py +7 -0
  541. evcloud/types/tariff_out_tax_included_zero.py +5 -0
  542. evcloud/types/tariff_out_type.py +7 -0
  543. evcloud/types/tariff_out_type_zero.py +7 -0
  544. evcloud/types/tariff_page.py +27 -0
  545. evcloud/types/tariff_restrictions.py +36 -0
  546. evcloud/types/tariff_summary.py +29 -0
  547. evcloud/types/tariff_tax_included.py +7 -0
  548. evcloud/types/tariff_tax_included_zero.py +5 -0
  549. evcloud/types/tariff_type.py +7 -0
  550. evcloud/types/tariff_updated_event.py +29 -0
  551. evcloud/types/tariff_write_response.py +26 -0
  552. evcloud/types/tax_included.py +5 -0
  553. evcloud/types/tenant_profile_out.py +31 -0
  554. evcloud/types/token_bulk_out.py +26 -0
  555. evcloud/types/token_create.py +46 -0
  556. evcloud/types/token_create_default_profile_type.py +5 -0
  557. evcloud/types/token_create_ocpi_version.py +5 -0
  558. evcloud/types/token_create_type.py +5 -0
  559. evcloud/types/token_create_whitelist.py +5 -0
  560. evcloud/types/token_event_data.py +47 -0
  561. evcloud/types/token_event_data_status.py +7 -0
  562. evcloud/types/token_event_data_type.py +5 -0
  563. evcloud/types/token_event_data_whitelist.py +5 -0
  564. evcloud/types/token_event_out.py +32 -0
  565. evcloud/types/token_event_out_event.py +7 -0
  566. evcloud/types/token_event_out_event_zero.py +7 -0
  567. evcloud/types/token_event_page.py +26 -0
  568. evcloud/types/token_failure_item.py +24 -0
  569. evcloud/types/token_group_action_out.py +27 -0
  570. evcloud/types/token_group_failure.py +24 -0
  571. evcloud/types/token_group_member_out.py +26 -0
  572. evcloud/types/token_group_network_out.py +35 -0
  573. evcloud/types/token_group_network_page.py +26 -0
  574. evcloud/types/token_group_out.py +31 -0
  575. evcloud/types/token_group_page.py +26 -0
  576. evcloud/types/token_out.py +55 -0
  577. evcloud/types/token_out_status.py +7 -0
  578. evcloud/types/token_out_status_zero.py +7 -0
  579. evcloud/types/token_out_type.py +7 -0
  580. evcloud/types/token_out_type_zero.py +5 -0
  581. evcloud/types/token_out_whitelist.py +7 -0
  582. evcloud/types/token_out_whitelist_zero.py +5 -0
  583. evcloud/types/token_page.py +26 -0
  584. evcloud/types/token_reason.py +23 -0
  585. evcloud/types/token_ref.py +26 -0
  586. evcloud/types/token_ref_ocpi_version.py +5 -0
  587. evcloud/types/token_write_response.py +28 -0
  588. evcloud/types/validation_error.py +28 -0
  589. evcloud/types/validation_error_loc_item.py +5 -0
  590. evcloud/types/webhook_delivery_page.py +27 -0
  591. evcloud/types/webhook_delivery_response.py +35 -0
  592. evcloud/types/webhook_page.py +27 -0
  593. evcloud/types/webhook_response.py +42 -0
  594. evcloud/types/webhook_response_event.py +7 -0
  595. evcloud/types/webhook_response_event_zero.py +27 -0
  596. evcloud/types/webhook_response_status.py +7 -0
  597. evcloud/types/webhook_response_status_zero.py +5 -0
  598. evcloud/types/webhook_test_result.py +25 -0
  599. evcloud/types/webhook_with_secret_response.py +43 -0
  600. evcloud/types/webhook_with_secret_response_event.py +7 -0
  601. evcloud/types/webhook_with_secret_response_event_zero.py +27 -0
  602. evcloud/types/webhook_with_secret_response_status.py +7 -0
  603. evcloud/types/webhook_with_secret_response_status_zero.py +5 -0
  604. evcloud/version.py +3 -0
  605. evcloud/webhooks/__init__.py +28 -0
  606. evcloud/webhooks/client.py +53 -0
  607. evcloud/webhooks/deliveries/__init__.py +4 -0
  608. evcloud/webhooks/deliveries/client.py +141 -0
  609. evcloud/webhooks/deliveries/raw_client.py +268 -0
  610. evcloud/webhooks/endpoints/__init__.py +17 -0
  611. evcloud/webhooks/endpoints/client.py +642 -0
  612. evcloud/webhooks/endpoints/raw_client.py +1521 -0
  613. evcloud/webhooks/endpoints/types/__init__.py +15 -0
  614. evcloud/webhooks/endpoints/types/list_endpoints_request_event_types_item.py +27 -0
  615. evcloud/webhooks/endpoints/types/webhook_create_request_api_version.py +5 -0
  616. evcloud/webhooks/endpoints/types/webhook_create_request_event.py +27 -0
  617. evcloud/webhooks/endpoints/types/webhook_update_request_status.py +5 -0
  618. evcloud/webhooks/event_types/__init__.py +7 -0
  619. evcloud/webhooks/event_types/client.py +176 -0
  620. evcloud/webhooks/event_types/raw_client.py +418 -0
  621. evcloud/webhooks/event_types/types/__init__.py +7 -0
  622. evcloud/webhooks/event_types/types/get_event_types_request_type.py +27 -0
  623. evcloud/webhooks/events/__init__.py +7 -0
  624. evcloud/webhooks/events/client.py +207 -0
  625. evcloud/webhooks/events/raw_client.py +355 -0
  626. evcloud/webhooks/events/types/__init__.py +8 -0
  627. evcloud/webhooks/events/types/deliver_event_request_data.py +33 -0
  628. evcloud/webhooks/events/types/deliver_event_request_event.py +27 -0
  629. evcloud/webhooks/health/__init__.py +4 -0
  630. evcloud/webhooks/health/client.py +161 -0
  631. evcloud/webhooks/health/raw_client.py +380 -0
  632. evcloud/webhooks/raw_client.py +13 -0
  633. evcloud-0.1.0.dist-info/METADATA +257 -0
  634. evcloud-0.1.0.dist-info/RECORD +635 -0
  635. evcloud-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,1553 @@
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.cdr_write_response import CdrWriteResponse
9
+ from ...types.charging_profile import ChargingProfile
10
+ from ...types.charging_profile_response import ChargingProfileResponse
11
+ from ...types.connector_write_response import ConnectorWriteResponse
12
+ from ...types.evse_status_write_response import EvseStatusWriteResponse
13
+ from ...types.location_write_response import LocationWriteResponse
14
+ from ...types.reservation_cancel_response import ReservationCancelResponse
15
+ from ...types.session_write_response import SessionWriteResponse
16
+ from ...types.tariff_delete_response import TariffDeleteResponse
17
+ from ...types.tariff_write_response import TariffWriteResponse
18
+ from .raw_client import AsyncRawCpoDataClient, RawCpoDataClient
19
+ from .types.cancel_reservation_cpo_data_request_version import CancelReservationCpoDataRequestVersion
20
+ from .types.create_cdr_cpo_data_request_version import CreateCdrCpoDataRequestVersion
21
+ from .types.delete_tariff_cpo_data_request_version import DeleteTariffCpoDataRequestVersion
22
+ from .types.send_active_charging_profile_cpo_data_request_version import SendActiveChargingProfileCpoDataRequestVersion
23
+ from .types.update_connector_cpo_data_request_version import UpdateConnectorCpoDataRequestVersion
24
+ from .types.update_evse_status_cpo_data_request_version import UpdateEvseStatusCpoDataRequestVersion
25
+ from .types.update_location_cpo_data_request_version import UpdateLocationCpoDataRequestVersion
26
+ from .types.update_session_cpo_data_request_version import UpdateSessionCpoDataRequestVersion
27
+ from .types.upsert_location_cpo_data_request_version import UpsertLocationCpoDataRequestVersion
28
+ from .types.upsert_session_cpo_data_request_version import UpsertSessionCpoDataRequestVersion
29
+ from .types.upsert_tariff_cpo_data_request_version import UpsertTariffCpoDataRequestVersion
30
+
31
+ # this is used as the default value for optional parameters
32
+ OMIT = typing.cast(typing.Any, ...)
33
+
34
+
35
+ class CpoDataClient:
36
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
37
+ self._raw_client = RawCpoDataClient(client_wrapper=client_wrapper)
38
+
39
+ @property
40
+ def with_raw_response(self) -> RawCpoDataClient:
41
+ """
42
+ Retrieves a raw implementation of this client that returns raw responses.
43
+
44
+ Returns
45
+ -------
46
+ RawCpoDataClient
47
+ """
48
+ return self._raw_client
49
+
50
+ def upsert_location(
51
+ self,
52
+ version: UpsertLocationCpoDataRequestVersion,
53
+ *,
54
+ request: typing.Dict[str, typing.Any],
55
+ push_to_partner_id: typing.Optional[int] = None,
56
+ request_options: typing.Optional[RequestOptions] = None,
57
+ ) -> LocationWriteResponse:
58
+ """
59
+ Stores a full OCPI Location for the path version, replacing any existing one with the same id. The owner country_code and party_id are set to this workspace's own identity. Pass ``push_to_partner_id`` to also push it to that partner right away.
60
+
61
+ Parameters
62
+ ----------
63
+ version : UpsertLocationCpoDataRequestVersion
64
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
65
+
66
+ request : typing.Dict[str, typing.Any]
67
+
68
+ push_to_partner_id : typing.Optional[int]
69
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
70
+
71
+ request_options : typing.Optional[RequestOptions]
72
+ Request-specific configuration.
73
+
74
+ Returns
75
+ -------
76
+ LocationWriteResponse
77
+ Successful Response
78
+
79
+ Examples
80
+ --------
81
+ from evcloud import EvcloudClient
82
+
83
+ client = EvcloudClient(
84
+ token="YOUR_TOKEN",
85
+ )
86
+ client.ocpi.cpo_data.upsert_location(
87
+ version="221",
88
+ push_to_partner_id=7,
89
+ request={
90
+ "id": "LOC-AMS-1",
91
+ "publish": True,
92
+ "name": "Amsterdam depot",
93
+ "address": "Stationsplein 1",
94
+ "city": "Amsterdam",
95
+ "postal_code": "1012 AB",
96
+ "country": "NLD",
97
+ "coordinates": {"latitude": "52.379189", "longitude": "4.899431"},
98
+ "time_zone": "Europe/Amsterdam",
99
+ "evses": [
100
+ {
101
+ "uid": "EVSE-AMS-1-1",
102
+ "evse_id": "NL*OCP*E0001*1",
103
+ "status": "AVAILABLE",
104
+ "connectors": [
105
+ {
106
+ "id": "1",
107
+ "standard": "IEC_62196_T2",
108
+ "format": "SOCKET",
109
+ "power_type": "AC_3_PHASE",
110
+ "max_voltage": 230,
111
+ "max_amperage": 32,
112
+ "last_updated": "2026-09-30T10:00:00Z",
113
+ }
114
+ ],
115
+ "last_updated": "2026-09-30T10:00:00Z",
116
+ }
117
+ ],
118
+ "last_updated": "2026-09-30T10:00:00Z",
119
+ },
120
+ )
121
+ """
122
+ _response = self._raw_client.upsert_location(
123
+ version, request=request, push_to_partner_id=push_to_partner_id, request_options=request_options
124
+ )
125
+ return _response.data
126
+
127
+ def update_location(
128
+ self,
129
+ version: UpdateLocationCpoDataRequestVersion,
130
+ location_id: str,
131
+ *,
132
+ request: typing.Dict[str, typing.Any],
133
+ push_to_partner_id: typing.Optional[int] = None,
134
+ request_options: typing.Optional[RequestOptions] = None,
135
+ ) -> LocationWriteResponse:
136
+ """
137
+ Applies a partial OCPI Location (PATCH semantics) to a stored location; include ``last_updated``. Pass ``push_to_partner_id`` to also push it to that partner right away.
138
+
139
+ Parameters
140
+ ----------
141
+ version : UpdateLocationCpoDataRequestVersion
142
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
143
+
144
+ location_id : str
145
+ OCPI ``id`` of the location.
146
+
147
+ request : typing.Dict[str, typing.Any]
148
+
149
+ push_to_partner_id : typing.Optional[int]
150
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
151
+
152
+ request_options : typing.Optional[RequestOptions]
153
+ Request-specific configuration.
154
+
155
+ Returns
156
+ -------
157
+ LocationWriteResponse
158
+ Successful Response
159
+
160
+ Examples
161
+ --------
162
+ from evcloud import EvcloudClient
163
+
164
+ client = EvcloudClient(
165
+ token="YOUR_TOKEN",
166
+ )
167
+ client.ocpi.cpo_data.update_location(
168
+ version="221",
169
+ location_id="LOC-AMS-1",
170
+ request={
171
+ "name": "Amsterdam Centraal depot",
172
+ "last_updated": "2026-09-30T10:00:00Z",
173
+ },
174
+ )
175
+ """
176
+ _response = self._raw_client.update_location(
177
+ version,
178
+ location_id,
179
+ request=request,
180
+ push_to_partner_id=push_to_partner_id,
181
+ request_options=request_options,
182
+ )
183
+ return _response.data
184
+
185
+ def update_evse_status(
186
+ self,
187
+ version: UpdateEvseStatusCpoDataRequestVersion,
188
+ location_id: str,
189
+ evse_uid: str,
190
+ *,
191
+ request: typing.Dict[str, typing.Any],
192
+ push_to_partner_id: typing.Optional[int] = None,
193
+ broadcast: typing.Optional[bool] = None,
194
+ request_options: typing.Optional[RequestOptions] = None,
195
+ ) -> EvseStatusWriteResponse:
196
+ """
197
+ A charger StatusNotification in roaming is this patch. ``broadcast=true`` sends it to every active eMSP and hub.
198
+
199
+ Parameters
200
+ ----------
201
+ version : UpdateEvseStatusCpoDataRequestVersion
202
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
203
+
204
+ location_id : str
205
+ OCPI ``id`` of the location.
206
+
207
+ evse_uid : str
208
+ OCPI ``uid`` of the EVSE in the location.
209
+
210
+ request : typing.Dict[str, typing.Any]
211
+
212
+ push_to_partner_id : typing.Optional[int]
213
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
214
+
215
+ broadcast : typing.Optional[bool]
216
+ After the status is stored, push it to every active eMSP and hub. Do not combine with push_to_partner_id.
217
+
218
+ request_options : typing.Optional[RequestOptions]
219
+ Request-specific configuration.
220
+
221
+ Returns
222
+ -------
223
+ EvseStatusWriteResponse
224
+ Successful Response
225
+
226
+ Examples
227
+ --------
228
+ from evcloud import EvcloudClient
229
+
230
+ client = EvcloudClient(
231
+ token="YOUR_TOKEN",
232
+ )
233
+ client.ocpi.cpo_data.update_evse_status(
234
+ version="221",
235
+ location_id="LOC-AMS-1",
236
+ evse_uid="EVSE-AMS-1-1",
237
+ request={"status": "CHARGING", "last_updated": "2026-09-30T10:00:00Z"},
238
+ )
239
+ """
240
+ _response = self._raw_client.update_evse_status(
241
+ version,
242
+ location_id,
243
+ evse_uid,
244
+ request=request,
245
+ push_to_partner_id=push_to_partner_id,
246
+ broadcast=broadcast,
247
+ request_options=request_options,
248
+ )
249
+ return _response.data
250
+
251
+ def update_connector(
252
+ self,
253
+ version: UpdateConnectorCpoDataRequestVersion,
254
+ location_id: str,
255
+ evse_uid: str,
256
+ connector_id: str,
257
+ *,
258
+ request: typing.Dict[str, typing.Any],
259
+ push_to_partner_id: typing.Optional[int] = None,
260
+ request_options: typing.Optional[RequestOptions] = None,
261
+ ) -> ConnectorWriteResponse:
262
+ """
263
+ Applies a partial OCPI Connector to a connector of a stored location's EVSE; include ``last_updated``. Pass ``push_to_partner_id`` to also push it to that partner right away.
264
+
265
+ Parameters
266
+ ----------
267
+ version : UpdateConnectorCpoDataRequestVersion
268
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
269
+
270
+ location_id : str
271
+ OCPI ``id`` of the location.
272
+
273
+ evse_uid : str
274
+ OCPI ``uid`` of the EVSE in the location.
275
+
276
+ connector_id : str
277
+ OCPI ``id`` of the connector on the EVSE.
278
+
279
+ request : typing.Dict[str, typing.Any]
280
+
281
+ push_to_partner_id : typing.Optional[int]
282
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
283
+
284
+ request_options : typing.Optional[RequestOptions]
285
+ Request-specific configuration.
286
+
287
+ Returns
288
+ -------
289
+ ConnectorWriteResponse
290
+ Successful Response
291
+
292
+ Examples
293
+ --------
294
+ from evcloud import EvcloudClient
295
+
296
+ client = EvcloudClient(
297
+ token="YOUR_TOKEN",
298
+ )
299
+ client.ocpi.cpo_data.update_connector(
300
+ version="221",
301
+ location_id="LOC-AMS-1",
302
+ evse_uid="EVSE-AMS-1-1",
303
+ connector_id="1",
304
+ request={
305
+ "tariff_ids": ["TARIFF-AC-STD"],
306
+ "last_updated": "2026-09-30T10:00:00Z",
307
+ },
308
+ )
309
+ """
310
+ _response = self._raw_client.update_connector(
311
+ version,
312
+ location_id,
313
+ evse_uid,
314
+ connector_id,
315
+ request=request,
316
+ push_to_partner_id=push_to_partner_id,
317
+ request_options=request_options,
318
+ )
319
+ return _response.data
320
+
321
+ def upsert_session(
322
+ self,
323
+ version: UpsertSessionCpoDataRequestVersion,
324
+ *,
325
+ request: typing.Dict[str, typing.Any],
326
+ push_to_partner_id: typing.Optional[int] = None,
327
+ request_options: typing.Optional[RequestOptions] = None,
328
+ ) -> SessionWriteResponse:
329
+ """
330
+ Stores a full OCPI Session for the path version, replacing any existing one with the same id. Pass ``push_to_partner_id`` to also push it to that partner right away.
331
+
332
+ Parameters
333
+ ----------
334
+ version : UpsertSessionCpoDataRequestVersion
335
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
336
+
337
+ request : typing.Dict[str, typing.Any]
338
+
339
+ push_to_partner_id : typing.Optional[int]
340
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
341
+
342
+ request_options : typing.Optional[RequestOptions]
343
+ Request-specific configuration.
344
+
345
+ Returns
346
+ -------
347
+ SessionWriteResponse
348
+ Successful Response
349
+
350
+ Examples
351
+ --------
352
+ from evcloud import EvcloudClient
353
+
354
+ client = EvcloudClient(
355
+ token="YOUR_TOKEN",
356
+ )
357
+ client.ocpi.cpo_data.upsert_session(
358
+ version="221",
359
+ request={
360
+ "id": "SES-20260930-0001",
361
+ "start_date_time": "2026-09-30T10:00:00Z",
362
+ "kwh": 11.5,
363
+ "cdr_token": {
364
+ "country_code": "DE",
365
+ "party_id": "EMS",
366
+ "uid": "04A2B3C4D5E6F7",
367
+ "type": "RFID",
368
+ "contract_id": "DE-EMS-C12345678-X",
369
+ },
370
+ "auth_method": "WHITELIST",
371
+ "location_id": "LOC-AMS-1",
372
+ "evse_uid": "EVSE-AMS-1-1",
373
+ "connector_id": "1",
374
+ "currency": "EUR",
375
+ "status": "ACTIVE",
376
+ "last_updated": "2026-09-30T10:00:00Z",
377
+ },
378
+ )
379
+ """
380
+ _response = self._raw_client.upsert_session(
381
+ version, request=request, push_to_partner_id=push_to_partner_id, request_options=request_options
382
+ )
383
+ return _response.data
384
+
385
+ def update_session(
386
+ self,
387
+ version: UpdateSessionCpoDataRequestVersion,
388
+ session_id: str,
389
+ *,
390
+ request: typing.Dict[str, typing.Any],
391
+ push_to_partner_id: typing.Optional[int] = None,
392
+ request_options: typing.Optional[RequestOptions] = None,
393
+ ) -> SessionWriteResponse:
394
+ """
395
+ Applies a partial OCPI Session (for example new kwh or status) to a stored session; include ``last_updated``. Pass ``push_to_partner_id`` to also push it to that partner right away.
396
+
397
+ Parameters
398
+ ----------
399
+ version : UpdateSessionCpoDataRequestVersion
400
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
401
+
402
+ session_id : str
403
+ OCPI ``id`` of the charging session.
404
+
405
+ request : typing.Dict[str, typing.Any]
406
+
407
+ push_to_partner_id : typing.Optional[int]
408
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
409
+
410
+ request_options : typing.Optional[RequestOptions]
411
+ Request-specific configuration.
412
+
413
+ Returns
414
+ -------
415
+ SessionWriteResponse
416
+ Successful Response
417
+
418
+ Examples
419
+ --------
420
+ from evcloud import EvcloudClient
421
+
422
+ client = EvcloudClient(
423
+ token="YOUR_TOKEN",
424
+ )
425
+ client.ocpi.cpo_data.update_session(
426
+ version="221",
427
+ session_id="SES-20260930-0001",
428
+ request={"kwh": 18.2, "last_updated": "2026-09-30T10:00:00Z"},
429
+ )
430
+ """
431
+ _response = self._raw_client.update_session(
432
+ version, session_id, request=request, push_to_partner_id=push_to_partner_id, request_options=request_options
433
+ )
434
+ return _response.data
435
+
436
+ def create_cdr(
437
+ self,
438
+ version: CreateCdrCpoDataRequestVersion,
439
+ *,
440
+ request: typing.Dict[str, typing.Any],
441
+ push_to_partner_id: typing.Optional[int] = None,
442
+ request_options: typing.Optional[RequestOptions] = None,
443
+ ) -> CdrWriteResponse:
444
+ """
445
+ Stores a CDR (charge detail record), the billed record of a finished session. CDRs cannot be changed once created. Pass ``push_to_partner_id`` to also push it to that partner right away.
446
+
447
+ Parameters
448
+ ----------
449
+ version : CreateCdrCpoDataRequestVersion
450
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
451
+
452
+ request : typing.Dict[str, typing.Any]
453
+
454
+ push_to_partner_id : typing.Optional[int]
455
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
456
+
457
+ request_options : typing.Optional[RequestOptions]
458
+ Request-specific configuration.
459
+
460
+ Returns
461
+ -------
462
+ CdrWriteResponse
463
+ Successful Response
464
+
465
+ Examples
466
+ --------
467
+ from evcloud import EvcloudClient
468
+
469
+ client = EvcloudClient(
470
+ token="YOUR_TOKEN",
471
+ )
472
+ client.ocpi.cpo_data.create_cdr(
473
+ version="221",
474
+ request={
475
+ "id": "CDR-20260930-0001",
476
+ "start_date_time": "2026-09-30T08:00:00Z",
477
+ "end_date_time": "2026-09-30T10:00:00Z",
478
+ "session_id": "SES-20260930-0001",
479
+ "cdr_token": {
480
+ "country_code": "DE",
481
+ "party_id": "EMS",
482
+ "uid": "04A2B3C4D5E6F7",
483
+ "type": "RFID",
484
+ "contract_id": "DE-EMS-C12345678-X",
485
+ },
486
+ "auth_method": "WHITELIST",
487
+ "cdr_location": {
488
+ "id": "LOC-AMS-1",
489
+ "address": "Stationsplein 1",
490
+ "city": "Amsterdam",
491
+ "country": "NLD",
492
+ "coordinates": {"latitude": "52.379189", "longitude": "4.899431"},
493
+ "evse_uid": "EVSE-AMS-1-1",
494
+ "evse_id": "NL*OCP*E0001*1",
495
+ "connector_id": "1",
496
+ "connector_standard": "IEC_62196_T2",
497
+ "connector_format": "SOCKET",
498
+ "connector_power_type": "AC_3_PHASE",
499
+ },
500
+ "currency": "EUR",
501
+ "charging_periods": [
502
+ {
503
+ "start_date_time": "2026-09-30T08:00:00Z",
504
+ "dimensions": [{"type": "ENERGY", "volume": 22}],
505
+ }
506
+ ],
507
+ "total_cost": {
508
+ "before_taxes": 7.7,
509
+ "taxes": [{"name": "VAT", "amount": 1.62}],
510
+ },
511
+ "total_energy": 22,
512
+ "total_time": 2,
513
+ "last_updated": "2026-09-30T10:00:00Z",
514
+ },
515
+ )
516
+ """
517
+ _response = self._raw_client.create_cdr(
518
+ version, request=request, push_to_partner_id=push_to_partner_id, request_options=request_options
519
+ )
520
+ return _response.data
521
+
522
+ def upsert_tariff(
523
+ self,
524
+ version: UpsertTariffCpoDataRequestVersion,
525
+ *,
526
+ request: typing.Dict[str, typing.Any],
527
+ push_to_partner_id: typing.Optional[int] = None,
528
+ request_options: typing.Optional[RequestOptions] = None,
529
+ ) -> TariffWriteResponse:
530
+ """
531
+ Stores a full OCPI Tariff for the path version, replacing any existing one with the same id. Pass ``push_to_partner_id`` to also push it to that partner right away.
532
+
533
+ Parameters
534
+ ----------
535
+ version : UpsertTariffCpoDataRequestVersion
536
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
537
+
538
+ request : typing.Dict[str, typing.Any]
539
+
540
+ push_to_partner_id : typing.Optional[int]
541
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
542
+
543
+ request_options : typing.Optional[RequestOptions]
544
+ Request-specific configuration.
545
+
546
+ Returns
547
+ -------
548
+ TariffWriteResponse
549
+ Successful Response
550
+
551
+ Examples
552
+ --------
553
+ from evcloud import EvcloudClient
554
+
555
+ client = EvcloudClient(
556
+ token="YOUR_TOKEN",
557
+ )
558
+ client.ocpi.cpo_data.upsert_tariff(
559
+ version="221",
560
+ request={
561
+ "id": "TARIFF-AC-STD",
562
+ "currency": "EUR",
563
+ "type": "REGULAR",
564
+ "tax_included": "NO",
565
+ "elements": [
566
+ {
567
+ "price_components": [
568
+ {"type": "ENERGY", "price": 0.35, "vat": 21, "step_size": 1}
569
+ ]
570
+ }
571
+ ],
572
+ "last_updated": "2026-09-30T10:00:00Z",
573
+ },
574
+ )
575
+ """
576
+ _response = self._raw_client.upsert_tariff(
577
+ version, request=request, push_to_partner_id=push_to_partner_id, request_options=request_options
578
+ )
579
+ return _response.data
580
+
581
+ def delete_tariff(
582
+ self,
583
+ version: DeleteTariffCpoDataRequestVersion,
584
+ tariff_id: str,
585
+ *,
586
+ push_to_partner_id: typing.Optional[int] = None,
587
+ request_options: typing.Optional[RequestOptions] = None,
588
+ ) -> TariffDeleteResponse:
589
+ """
590
+ Soft-deletes a stored tariff. Pass ``push_to_partner_id`` to also send the DELETE to that partner eMSP.
591
+
592
+ Parameters
593
+ ----------
594
+ version : DeleteTariffCpoDataRequestVersion
595
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
596
+
597
+ tariff_id : str
598
+ OCPI ``id`` of the tariff.
599
+
600
+ push_to_partner_id : typing.Optional[int]
601
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
602
+
603
+ request_options : typing.Optional[RequestOptions]
604
+ Request-specific configuration.
605
+
606
+ Returns
607
+ -------
608
+ TariffDeleteResponse
609
+ Successful Response
610
+
611
+ Examples
612
+ --------
613
+ from evcloud import EvcloudClient
614
+
615
+ client = EvcloudClient(
616
+ token="YOUR_TOKEN",
617
+ )
618
+ client.ocpi.cpo_data.delete_tariff(
619
+ version="221",
620
+ tariff_id="TARIFF-AC-STD",
621
+ )
622
+ """
623
+ _response = self._raw_client.delete_tariff(
624
+ version, tariff_id, push_to_partner_id=push_to_partner_id, request_options=request_options
625
+ )
626
+ return _response.data
627
+
628
+ def cancel_reservation(
629
+ self,
630
+ version: CancelReservationCpoDataRequestVersion,
631
+ ocpp_reservation_id: int,
632
+ *,
633
+ request_options: typing.Optional[RequestOptions] = None,
634
+ ) -> ReservationCancelResponse:
635
+ """
636
+ Cancels a reservation made on one of our chargers and sends the eMSP the cancellation. OCPI 2.2.1 and 2.3.0 only.
637
+
638
+ Parameters
639
+ ----------
640
+ version : CancelReservationCpoDataRequestVersion
641
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
642
+
643
+ ocpp_reservation_id : int
644
+ OCPP reservation id the charger holds.
645
+
646
+ request_options : typing.Optional[RequestOptions]
647
+ Request-specific configuration.
648
+
649
+ Returns
650
+ -------
651
+ ReservationCancelResponse
652
+ Successful Response
653
+
654
+ Examples
655
+ --------
656
+ from evcloud import EvcloudClient
657
+
658
+ client = EvcloudClient(
659
+ token="YOUR_TOKEN",
660
+ )
661
+ client.ocpi.cpo_data.cancel_reservation(
662
+ version="221",
663
+ ocpp_reservation_id=1042,
664
+ )
665
+ """
666
+ _response = self._raw_client.cancel_reservation(version, ocpp_reservation_id, request_options=request_options)
667
+ return _response.data
668
+
669
+ def send_active_charging_profile(
670
+ self,
671
+ version: SendActiveChargingProfileCpoDataRequestVersion,
672
+ session_id: str,
673
+ *,
674
+ partner_id: int,
675
+ start_date_time: dt.datetime,
676
+ charging_profile: ChargingProfile,
677
+ request_options: typing.Optional[RequestOptions] = None,
678
+ ) -> ChargingProfileResponse:
679
+ """
680
+ Sends the eMSP the charging profile currently active on one of its sessions (the CPO's ActiveChargingProfile callback). OCPI 2.2.1 and 2.3.0 only.
681
+
682
+ Parameters
683
+ ----------
684
+ version : SendActiveChargingProfileCpoDataRequestVersion
685
+ OCPI version: ``221`` (2.2.1) or ``230`` (2.3.0). OCPI 2.1.1 has no charging profiles or charging preferences.
686
+
687
+ session_id : str
688
+ OCPI ``id`` of the charging session.
689
+
690
+ partner_id : int
691
+ Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
692
+
693
+ start_date_time : dt.datetime
694
+
695
+ charging_profile : ChargingProfile
696
+
697
+ request_options : typing.Optional[RequestOptions]
698
+ Request-specific configuration.
699
+
700
+ Returns
701
+ -------
702
+ ChargingProfileResponse
703
+ Successful Response
704
+
705
+ Examples
706
+ --------
707
+ import datetime
708
+
709
+ from evcloud import ChargingProfile, ChargingProfilePeriod, EvcloudClient
710
+
711
+ client = EvcloudClient(
712
+ token="YOUR_TOKEN",
713
+ )
714
+ client.ocpi.cpo_data.send_active_charging_profile(
715
+ version="221",
716
+ session_id="SES-20260930-0001",
717
+ partner_id=7,
718
+ start_date_time=datetime.datetime.fromisoformat(
719
+ "2026-09-30 10:00:00+00:00",
720
+ ),
721
+ charging_profile=ChargingProfile(
722
+ charging_rate_unit="A",
723
+ charging_profile_period=[
724
+ ChargingProfilePeriod(
725
+ start_period=0,
726
+ limit=16.0,
727
+ ),
728
+ ChargingProfilePeriod(
729
+ start_period=3600,
730
+ limit=32.0,
731
+ ),
732
+ ],
733
+ ),
734
+ )
735
+ """
736
+ _response = self._raw_client.send_active_charging_profile(
737
+ version,
738
+ session_id,
739
+ partner_id=partner_id,
740
+ start_date_time=start_date_time,
741
+ charging_profile=charging_profile,
742
+ request_options=request_options,
743
+ )
744
+ return _response.data
745
+
746
+
747
+ class AsyncCpoDataClient:
748
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
749
+ self._raw_client = AsyncRawCpoDataClient(client_wrapper=client_wrapper)
750
+
751
+ @property
752
+ def with_raw_response(self) -> AsyncRawCpoDataClient:
753
+ """
754
+ Retrieves a raw implementation of this client that returns raw responses.
755
+
756
+ Returns
757
+ -------
758
+ AsyncRawCpoDataClient
759
+ """
760
+ return self._raw_client
761
+
762
+ async def upsert_location(
763
+ self,
764
+ version: UpsertLocationCpoDataRequestVersion,
765
+ *,
766
+ request: typing.Dict[str, typing.Any],
767
+ push_to_partner_id: typing.Optional[int] = None,
768
+ request_options: typing.Optional[RequestOptions] = None,
769
+ ) -> LocationWriteResponse:
770
+ """
771
+ Stores a full OCPI Location for the path version, replacing any existing one with the same id. The owner country_code and party_id are set to this workspace's own identity. Pass ``push_to_partner_id`` to also push it to that partner right away.
772
+
773
+ Parameters
774
+ ----------
775
+ version : UpsertLocationCpoDataRequestVersion
776
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
777
+
778
+ request : typing.Dict[str, typing.Any]
779
+
780
+ push_to_partner_id : typing.Optional[int]
781
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
782
+
783
+ request_options : typing.Optional[RequestOptions]
784
+ Request-specific configuration.
785
+
786
+ Returns
787
+ -------
788
+ LocationWriteResponse
789
+ Successful Response
790
+
791
+ Examples
792
+ --------
793
+ import asyncio
794
+
795
+ from evcloud import AsyncEvcloudClient
796
+
797
+ client = AsyncEvcloudClient(
798
+ token="YOUR_TOKEN",
799
+ )
800
+
801
+
802
+ async def main() -> None:
803
+ await client.ocpi.cpo_data.upsert_location(
804
+ version="221",
805
+ push_to_partner_id=7,
806
+ request={
807
+ "id": "LOC-AMS-1",
808
+ "publish": True,
809
+ "name": "Amsterdam depot",
810
+ "address": "Stationsplein 1",
811
+ "city": "Amsterdam",
812
+ "postal_code": "1012 AB",
813
+ "country": "NLD",
814
+ "coordinates": {"latitude": "52.379189", "longitude": "4.899431"},
815
+ "time_zone": "Europe/Amsterdam",
816
+ "evses": [
817
+ {
818
+ "uid": "EVSE-AMS-1-1",
819
+ "evse_id": "NL*OCP*E0001*1",
820
+ "status": "AVAILABLE",
821
+ "connectors": [
822
+ {
823
+ "id": "1",
824
+ "standard": "IEC_62196_T2",
825
+ "format": "SOCKET",
826
+ "power_type": "AC_3_PHASE",
827
+ "max_voltage": 230,
828
+ "max_amperage": 32,
829
+ "last_updated": "2026-09-30T10:00:00Z",
830
+ }
831
+ ],
832
+ "last_updated": "2026-09-30T10:00:00Z",
833
+ }
834
+ ],
835
+ "last_updated": "2026-09-30T10:00:00Z",
836
+ },
837
+ )
838
+
839
+
840
+ asyncio.run(main())
841
+ """
842
+ _response = await self._raw_client.upsert_location(
843
+ version, request=request, push_to_partner_id=push_to_partner_id, request_options=request_options
844
+ )
845
+ return _response.data
846
+
847
+ async def update_location(
848
+ self,
849
+ version: UpdateLocationCpoDataRequestVersion,
850
+ location_id: str,
851
+ *,
852
+ request: typing.Dict[str, typing.Any],
853
+ push_to_partner_id: typing.Optional[int] = None,
854
+ request_options: typing.Optional[RequestOptions] = None,
855
+ ) -> LocationWriteResponse:
856
+ """
857
+ Applies a partial OCPI Location (PATCH semantics) to a stored location; include ``last_updated``. Pass ``push_to_partner_id`` to also push it to that partner right away.
858
+
859
+ Parameters
860
+ ----------
861
+ version : UpdateLocationCpoDataRequestVersion
862
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
863
+
864
+ location_id : str
865
+ OCPI ``id`` of the location.
866
+
867
+ request : typing.Dict[str, typing.Any]
868
+
869
+ push_to_partner_id : typing.Optional[int]
870
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
871
+
872
+ request_options : typing.Optional[RequestOptions]
873
+ Request-specific configuration.
874
+
875
+ Returns
876
+ -------
877
+ LocationWriteResponse
878
+ Successful Response
879
+
880
+ Examples
881
+ --------
882
+ import asyncio
883
+
884
+ from evcloud import AsyncEvcloudClient
885
+
886
+ client = AsyncEvcloudClient(
887
+ token="YOUR_TOKEN",
888
+ )
889
+
890
+
891
+ async def main() -> None:
892
+ await client.ocpi.cpo_data.update_location(
893
+ version="221",
894
+ location_id="LOC-AMS-1",
895
+ request={
896
+ "name": "Amsterdam Centraal depot",
897
+ "last_updated": "2026-09-30T10:00:00Z",
898
+ },
899
+ )
900
+
901
+
902
+ asyncio.run(main())
903
+ """
904
+ _response = await self._raw_client.update_location(
905
+ version,
906
+ location_id,
907
+ request=request,
908
+ push_to_partner_id=push_to_partner_id,
909
+ request_options=request_options,
910
+ )
911
+ return _response.data
912
+
913
+ async def update_evse_status(
914
+ self,
915
+ version: UpdateEvseStatusCpoDataRequestVersion,
916
+ location_id: str,
917
+ evse_uid: str,
918
+ *,
919
+ request: typing.Dict[str, typing.Any],
920
+ push_to_partner_id: typing.Optional[int] = None,
921
+ broadcast: typing.Optional[bool] = None,
922
+ request_options: typing.Optional[RequestOptions] = None,
923
+ ) -> EvseStatusWriteResponse:
924
+ """
925
+ A charger StatusNotification in roaming is this patch. ``broadcast=true`` sends it to every active eMSP and hub.
926
+
927
+ Parameters
928
+ ----------
929
+ version : UpdateEvseStatusCpoDataRequestVersion
930
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
931
+
932
+ location_id : str
933
+ OCPI ``id`` of the location.
934
+
935
+ evse_uid : str
936
+ OCPI ``uid`` of the EVSE in the location.
937
+
938
+ request : typing.Dict[str, typing.Any]
939
+
940
+ push_to_partner_id : typing.Optional[int]
941
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
942
+
943
+ broadcast : typing.Optional[bool]
944
+ After the status is stored, push it to every active eMSP and hub. Do not combine with push_to_partner_id.
945
+
946
+ request_options : typing.Optional[RequestOptions]
947
+ Request-specific configuration.
948
+
949
+ Returns
950
+ -------
951
+ EvseStatusWriteResponse
952
+ Successful Response
953
+
954
+ Examples
955
+ --------
956
+ import asyncio
957
+
958
+ from evcloud import AsyncEvcloudClient
959
+
960
+ client = AsyncEvcloudClient(
961
+ token="YOUR_TOKEN",
962
+ )
963
+
964
+
965
+ async def main() -> None:
966
+ await client.ocpi.cpo_data.update_evse_status(
967
+ version="221",
968
+ location_id="LOC-AMS-1",
969
+ evse_uid="EVSE-AMS-1-1",
970
+ request={"status": "CHARGING", "last_updated": "2026-09-30T10:00:00Z"},
971
+ )
972
+
973
+
974
+ asyncio.run(main())
975
+ """
976
+ _response = await self._raw_client.update_evse_status(
977
+ version,
978
+ location_id,
979
+ evse_uid,
980
+ request=request,
981
+ push_to_partner_id=push_to_partner_id,
982
+ broadcast=broadcast,
983
+ request_options=request_options,
984
+ )
985
+ return _response.data
986
+
987
+ async def update_connector(
988
+ self,
989
+ version: UpdateConnectorCpoDataRequestVersion,
990
+ location_id: str,
991
+ evse_uid: str,
992
+ connector_id: str,
993
+ *,
994
+ request: typing.Dict[str, typing.Any],
995
+ push_to_partner_id: typing.Optional[int] = None,
996
+ request_options: typing.Optional[RequestOptions] = None,
997
+ ) -> ConnectorWriteResponse:
998
+ """
999
+ Applies a partial OCPI Connector to a connector of a stored location's EVSE; include ``last_updated``. Pass ``push_to_partner_id`` to also push it to that partner right away.
1000
+
1001
+ Parameters
1002
+ ----------
1003
+ version : UpdateConnectorCpoDataRequestVersion
1004
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
1005
+
1006
+ location_id : str
1007
+ OCPI ``id`` of the location.
1008
+
1009
+ evse_uid : str
1010
+ OCPI ``uid`` of the EVSE in the location.
1011
+
1012
+ connector_id : str
1013
+ OCPI ``id`` of the connector on the EVSE.
1014
+
1015
+ request : typing.Dict[str, typing.Any]
1016
+
1017
+ push_to_partner_id : typing.Optional[int]
1018
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
1019
+
1020
+ request_options : typing.Optional[RequestOptions]
1021
+ Request-specific configuration.
1022
+
1023
+ Returns
1024
+ -------
1025
+ ConnectorWriteResponse
1026
+ Successful Response
1027
+
1028
+ Examples
1029
+ --------
1030
+ import asyncio
1031
+
1032
+ from evcloud import AsyncEvcloudClient
1033
+
1034
+ client = AsyncEvcloudClient(
1035
+ token="YOUR_TOKEN",
1036
+ )
1037
+
1038
+
1039
+ async def main() -> None:
1040
+ await client.ocpi.cpo_data.update_connector(
1041
+ version="221",
1042
+ location_id="LOC-AMS-1",
1043
+ evse_uid="EVSE-AMS-1-1",
1044
+ connector_id="1",
1045
+ request={
1046
+ "tariff_ids": ["TARIFF-AC-STD"],
1047
+ "last_updated": "2026-09-30T10:00:00Z",
1048
+ },
1049
+ )
1050
+
1051
+
1052
+ asyncio.run(main())
1053
+ """
1054
+ _response = await self._raw_client.update_connector(
1055
+ version,
1056
+ location_id,
1057
+ evse_uid,
1058
+ connector_id,
1059
+ request=request,
1060
+ push_to_partner_id=push_to_partner_id,
1061
+ request_options=request_options,
1062
+ )
1063
+ return _response.data
1064
+
1065
+ async def upsert_session(
1066
+ self,
1067
+ version: UpsertSessionCpoDataRequestVersion,
1068
+ *,
1069
+ request: typing.Dict[str, typing.Any],
1070
+ push_to_partner_id: typing.Optional[int] = None,
1071
+ request_options: typing.Optional[RequestOptions] = None,
1072
+ ) -> SessionWriteResponse:
1073
+ """
1074
+ Stores a full OCPI Session for the path version, replacing any existing one with the same id. Pass ``push_to_partner_id`` to also push it to that partner right away.
1075
+
1076
+ Parameters
1077
+ ----------
1078
+ version : UpsertSessionCpoDataRequestVersion
1079
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
1080
+
1081
+ request : typing.Dict[str, typing.Any]
1082
+
1083
+ push_to_partner_id : typing.Optional[int]
1084
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
1085
+
1086
+ request_options : typing.Optional[RequestOptions]
1087
+ Request-specific configuration.
1088
+
1089
+ Returns
1090
+ -------
1091
+ SessionWriteResponse
1092
+ Successful Response
1093
+
1094
+ Examples
1095
+ --------
1096
+ import asyncio
1097
+
1098
+ from evcloud import AsyncEvcloudClient
1099
+
1100
+ client = AsyncEvcloudClient(
1101
+ token="YOUR_TOKEN",
1102
+ )
1103
+
1104
+
1105
+ async def main() -> None:
1106
+ await client.ocpi.cpo_data.upsert_session(
1107
+ version="221",
1108
+ request={
1109
+ "id": "SES-20260930-0001",
1110
+ "start_date_time": "2026-09-30T10:00:00Z",
1111
+ "kwh": 11.5,
1112
+ "cdr_token": {
1113
+ "country_code": "DE",
1114
+ "party_id": "EMS",
1115
+ "uid": "04A2B3C4D5E6F7",
1116
+ "type": "RFID",
1117
+ "contract_id": "DE-EMS-C12345678-X",
1118
+ },
1119
+ "auth_method": "WHITELIST",
1120
+ "location_id": "LOC-AMS-1",
1121
+ "evse_uid": "EVSE-AMS-1-1",
1122
+ "connector_id": "1",
1123
+ "currency": "EUR",
1124
+ "status": "ACTIVE",
1125
+ "last_updated": "2026-09-30T10:00:00Z",
1126
+ },
1127
+ )
1128
+
1129
+
1130
+ asyncio.run(main())
1131
+ """
1132
+ _response = await self._raw_client.upsert_session(
1133
+ version, request=request, push_to_partner_id=push_to_partner_id, request_options=request_options
1134
+ )
1135
+ return _response.data
1136
+
1137
+ async def update_session(
1138
+ self,
1139
+ version: UpdateSessionCpoDataRequestVersion,
1140
+ session_id: str,
1141
+ *,
1142
+ request: typing.Dict[str, typing.Any],
1143
+ push_to_partner_id: typing.Optional[int] = None,
1144
+ request_options: typing.Optional[RequestOptions] = None,
1145
+ ) -> SessionWriteResponse:
1146
+ """
1147
+ Applies a partial OCPI Session (for example new kwh or status) to a stored session; include ``last_updated``. Pass ``push_to_partner_id`` to also push it to that partner right away.
1148
+
1149
+ Parameters
1150
+ ----------
1151
+ version : UpdateSessionCpoDataRequestVersion
1152
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
1153
+
1154
+ session_id : str
1155
+ OCPI ``id`` of the charging session.
1156
+
1157
+ request : typing.Dict[str, typing.Any]
1158
+
1159
+ push_to_partner_id : typing.Optional[int]
1160
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
1161
+
1162
+ request_options : typing.Optional[RequestOptions]
1163
+ Request-specific configuration.
1164
+
1165
+ Returns
1166
+ -------
1167
+ SessionWriteResponse
1168
+ Successful Response
1169
+
1170
+ Examples
1171
+ --------
1172
+ import asyncio
1173
+
1174
+ from evcloud import AsyncEvcloudClient
1175
+
1176
+ client = AsyncEvcloudClient(
1177
+ token="YOUR_TOKEN",
1178
+ )
1179
+
1180
+
1181
+ async def main() -> None:
1182
+ await client.ocpi.cpo_data.update_session(
1183
+ version="221",
1184
+ session_id="SES-20260930-0001",
1185
+ request={"kwh": 18.2, "last_updated": "2026-09-30T10:00:00Z"},
1186
+ )
1187
+
1188
+
1189
+ asyncio.run(main())
1190
+ """
1191
+ _response = await self._raw_client.update_session(
1192
+ version, session_id, request=request, push_to_partner_id=push_to_partner_id, request_options=request_options
1193
+ )
1194
+ return _response.data
1195
+
1196
+ async def create_cdr(
1197
+ self,
1198
+ version: CreateCdrCpoDataRequestVersion,
1199
+ *,
1200
+ request: typing.Dict[str, typing.Any],
1201
+ push_to_partner_id: typing.Optional[int] = None,
1202
+ request_options: typing.Optional[RequestOptions] = None,
1203
+ ) -> CdrWriteResponse:
1204
+ """
1205
+ Stores a CDR (charge detail record), the billed record of a finished session. CDRs cannot be changed once created. Pass ``push_to_partner_id`` to also push it to that partner right away.
1206
+
1207
+ Parameters
1208
+ ----------
1209
+ version : CreateCdrCpoDataRequestVersion
1210
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
1211
+
1212
+ request : typing.Dict[str, typing.Any]
1213
+
1214
+ push_to_partner_id : typing.Optional[int]
1215
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
1216
+
1217
+ request_options : typing.Optional[RequestOptions]
1218
+ Request-specific configuration.
1219
+
1220
+ Returns
1221
+ -------
1222
+ CdrWriteResponse
1223
+ Successful Response
1224
+
1225
+ Examples
1226
+ --------
1227
+ import asyncio
1228
+
1229
+ from evcloud import AsyncEvcloudClient
1230
+
1231
+ client = AsyncEvcloudClient(
1232
+ token="YOUR_TOKEN",
1233
+ )
1234
+
1235
+
1236
+ async def main() -> None:
1237
+ await client.ocpi.cpo_data.create_cdr(
1238
+ version="221",
1239
+ request={
1240
+ "id": "CDR-20260930-0001",
1241
+ "start_date_time": "2026-09-30T08:00:00Z",
1242
+ "end_date_time": "2026-09-30T10:00:00Z",
1243
+ "session_id": "SES-20260930-0001",
1244
+ "cdr_token": {
1245
+ "country_code": "DE",
1246
+ "party_id": "EMS",
1247
+ "uid": "04A2B3C4D5E6F7",
1248
+ "type": "RFID",
1249
+ "contract_id": "DE-EMS-C12345678-X",
1250
+ },
1251
+ "auth_method": "WHITELIST",
1252
+ "cdr_location": {
1253
+ "id": "LOC-AMS-1",
1254
+ "address": "Stationsplein 1",
1255
+ "city": "Amsterdam",
1256
+ "country": "NLD",
1257
+ "coordinates": {
1258
+ "latitude": "52.379189",
1259
+ "longitude": "4.899431",
1260
+ },
1261
+ "evse_uid": "EVSE-AMS-1-1",
1262
+ "evse_id": "NL*OCP*E0001*1",
1263
+ "connector_id": "1",
1264
+ "connector_standard": "IEC_62196_T2",
1265
+ "connector_format": "SOCKET",
1266
+ "connector_power_type": "AC_3_PHASE",
1267
+ },
1268
+ "currency": "EUR",
1269
+ "charging_periods": [
1270
+ {
1271
+ "start_date_time": "2026-09-30T08:00:00Z",
1272
+ "dimensions": [{"type": "ENERGY", "volume": 22}],
1273
+ }
1274
+ ],
1275
+ "total_cost": {
1276
+ "before_taxes": 7.7,
1277
+ "taxes": [{"name": "VAT", "amount": 1.62}],
1278
+ },
1279
+ "total_energy": 22,
1280
+ "total_time": 2,
1281
+ "last_updated": "2026-09-30T10:00:00Z",
1282
+ },
1283
+ )
1284
+
1285
+
1286
+ asyncio.run(main())
1287
+ """
1288
+ _response = await self._raw_client.create_cdr(
1289
+ version, request=request, push_to_partner_id=push_to_partner_id, request_options=request_options
1290
+ )
1291
+ return _response.data
1292
+
1293
+ async def upsert_tariff(
1294
+ self,
1295
+ version: UpsertTariffCpoDataRequestVersion,
1296
+ *,
1297
+ request: typing.Dict[str, typing.Any],
1298
+ push_to_partner_id: typing.Optional[int] = None,
1299
+ request_options: typing.Optional[RequestOptions] = None,
1300
+ ) -> TariffWriteResponse:
1301
+ """
1302
+ Stores a full OCPI Tariff for the path version, replacing any existing one with the same id. Pass ``push_to_partner_id`` to also push it to that partner right away.
1303
+
1304
+ Parameters
1305
+ ----------
1306
+ version : UpsertTariffCpoDataRequestVersion
1307
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
1308
+
1309
+ request : typing.Dict[str, typing.Any]
1310
+
1311
+ push_to_partner_id : typing.Optional[int]
1312
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
1313
+
1314
+ request_options : typing.Optional[RequestOptions]
1315
+ Request-specific configuration.
1316
+
1317
+ Returns
1318
+ -------
1319
+ TariffWriteResponse
1320
+ Successful Response
1321
+
1322
+ Examples
1323
+ --------
1324
+ import asyncio
1325
+
1326
+ from evcloud import AsyncEvcloudClient
1327
+
1328
+ client = AsyncEvcloudClient(
1329
+ token="YOUR_TOKEN",
1330
+ )
1331
+
1332
+
1333
+ async def main() -> None:
1334
+ await client.ocpi.cpo_data.upsert_tariff(
1335
+ version="221",
1336
+ request={
1337
+ "id": "TARIFF-AC-STD",
1338
+ "currency": "EUR",
1339
+ "type": "REGULAR",
1340
+ "tax_included": "NO",
1341
+ "elements": [
1342
+ {
1343
+ "price_components": [
1344
+ {
1345
+ "type": "ENERGY",
1346
+ "price": 0.35,
1347
+ "vat": 21,
1348
+ "step_size": 1,
1349
+ }
1350
+ ]
1351
+ }
1352
+ ],
1353
+ "last_updated": "2026-09-30T10:00:00Z",
1354
+ },
1355
+ )
1356
+
1357
+
1358
+ asyncio.run(main())
1359
+ """
1360
+ _response = await self._raw_client.upsert_tariff(
1361
+ version, request=request, push_to_partner_id=push_to_partner_id, request_options=request_options
1362
+ )
1363
+ return _response.data
1364
+
1365
+ async def delete_tariff(
1366
+ self,
1367
+ version: DeleteTariffCpoDataRequestVersion,
1368
+ tariff_id: str,
1369
+ *,
1370
+ push_to_partner_id: typing.Optional[int] = None,
1371
+ request_options: typing.Optional[RequestOptions] = None,
1372
+ ) -> TariffDeleteResponse:
1373
+ """
1374
+ Soft-deletes a stored tariff. Pass ``push_to_partner_id`` to also send the DELETE to that partner eMSP.
1375
+
1376
+ Parameters
1377
+ ----------
1378
+ version : DeleteTariffCpoDataRequestVersion
1379
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
1380
+
1381
+ tariff_id : str
1382
+ OCPI ``id`` of the tariff.
1383
+
1384
+ push_to_partner_id : typing.Optional[int]
1385
+ Also push the written object to this roaming partner right away: its ``roaming_partner_id`` from ``GET /ocpi/partners``.
1386
+
1387
+ request_options : typing.Optional[RequestOptions]
1388
+ Request-specific configuration.
1389
+
1390
+ Returns
1391
+ -------
1392
+ TariffDeleteResponse
1393
+ Successful Response
1394
+
1395
+ Examples
1396
+ --------
1397
+ import asyncio
1398
+
1399
+ from evcloud import AsyncEvcloudClient
1400
+
1401
+ client = AsyncEvcloudClient(
1402
+ token="YOUR_TOKEN",
1403
+ )
1404
+
1405
+
1406
+ async def main() -> None:
1407
+ await client.ocpi.cpo_data.delete_tariff(
1408
+ version="221",
1409
+ tariff_id="TARIFF-AC-STD",
1410
+ )
1411
+
1412
+
1413
+ asyncio.run(main())
1414
+ """
1415
+ _response = await self._raw_client.delete_tariff(
1416
+ version, tariff_id, push_to_partner_id=push_to_partner_id, request_options=request_options
1417
+ )
1418
+ return _response.data
1419
+
1420
+ async def cancel_reservation(
1421
+ self,
1422
+ version: CancelReservationCpoDataRequestVersion,
1423
+ ocpp_reservation_id: int,
1424
+ *,
1425
+ request_options: typing.Optional[RequestOptions] = None,
1426
+ ) -> ReservationCancelResponse:
1427
+ """
1428
+ Cancels a reservation made on one of our chargers and sends the eMSP the cancellation. OCPI 2.2.1 and 2.3.0 only.
1429
+
1430
+ Parameters
1431
+ ----------
1432
+ version : CancelReservationCpoDataRequestVersion
1433
+ OCPI version: ``211`` (2.1.1), ``221`` (2.2.1) or ``230`` (2.3.0).
1434
+
1435
+ ocpp_reservation_id : int
1436
+ OCPP reservation id the charger holds.
1437
+
1438
+ request_options : typing.Optional[RequestOptions]
1439
+ Request-specific configuration.
1440
+
1441
+ Returns
1442
+ -------
1443
+ ReservationCancelResponse
1444
+ Successful Response
1445
+
1446
+ Examples
1447
+ --------
1448
+ import asyncio
1449
+
1450
+ from evcloud import AsyncEvcloudClient
1451
+
1452
+ client = AsyncEvcloudClient(
1453
+ token="YOUR_TOKEN",
1454
+ )
1455
+
1456
+
1457
+ async def main() -> None:
1458
+ await client.ocpi.cpo_data.cancel_reservation(
1459
+ version="221",
1460
+ ocpp_reservation_id=1042,
1461
+ )
1462
+
1463
+
1464
+ asyncio.run(main())
1465
+ """
1466
+ _response = await self._raw_client.cancel_reservation(
1467
+ version, ocpp_reservation_id, request_options=request_options
1468
+ )
1469
+ return _response.data
1470
+
1471
+ async def send_active_charging_profile(
1472
+ self,
1473
+ version: SendActiveChargingProfileCpoDataRequestVersion,
1474
+ session_id: str,
1475
+ *,
1476
+ partner_id: int,
1477
+ start_date_time: dt.datetime,
1478
+ charging_profile: ChargingProfile,
1479
+ request_options: typing.Optional[RequestOptions] = None,
1480
+ ) -> ChargingProfileResponse:
1481
+ """
1482
+ Sends the eMSP the charging profile currently active on one of its sessions (the CPO's ActiveChargingProfile callback). OCPI 2.2.1 and 2.3.0 only.
1483
+
1484
+ Parameters
1485
+ ----------
1486
+ version : SendActiveChargingProfileCpoDataRequestVersion
1487
+ OCPI version: ``221`` (2.2.1) or ``230`` (2.3.0). OCPI 2.1.1 has no charging profiles or charging preferences.
1488
+
1489
+ session_id : str
1490
+ OCPI ``id`` of the charging session.
1491
+
1492
+ partner_id : int
1493
+ Roaming partner to talk to: the ``roaming_partner_id`` from ``GET /ocpi/partners``, not its ``id``.
1494
+
1495
+ start_date_time : dt.datetime
1496
+
1497
+ charging_profile : ChargingProfile
1498
+
1499
+ request_options : typing.Optional[RequestOptions]
1500
+ Request-specific configuration.
1501
+
1502
+ Returns
1503
+ -------
1504
+ ChargingProfileResponse
1505
+ Successful Response
1506
+
1507
+ Examples
1508
+ --------
1509
+ import asyncio
1510
+ import datetime
1511
+
1512
+ from evcloud import AsyncEvcloudClient, ChargingProfile, ChargingProfilePeriod
1513
+
1514
+ client = AsyncEvcloudClient(
1515
+ token="YOUR_TOKEN",
1516
+ )
1517
+
1518
+
1519
+ async def main() -> None:
1520
+ await client.ocpi.cpo_data.send_active_charging_profile(
1521
+ version="221",
1522
+ session_id="SES-20260930-0001",
1523
+ partner_id=7,
1524
+ start_date_time=datetime.datetime.fromisoformat(
1525
+ "2026-09-30 10:00:00+00:00",
1526
+ ),
1527
+ charging_profile=ChargingProfile(
1528
+ charging_rate_unit="A",
1529
+ charging_profile_period=[
1530
+ ChargingProfilePeriod(
1531
+ start_period=0,
1532
+ limit=16.0,
1533
+ ),
1534
+ ChargingProfilePeriod(
1535
+ start_period=3600,
1536
+ limit=32.0,
1537
+ ),
1538
+ ],
1539
+ ),
1540
+ )
1541
+
1542
+
1543
+ asyncio.run(main())
1544
+ """
1545
+ _response = await self._raw_client.send_active_charging_profile(
1546
+ version,
1547
+ session_id,
1548
+ partner_id=partner_id,
1549
+ start_date_time=start_date_time,
1550
+ charging_profile=charging_profile,
1551
+ request_options=request_options,
1552
+ )
1553
+ return _response.data