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