pub struct SenderEndpoint { /* private fields */ }transport only.Expand description
URLs on a module’s Sender interface: the data owner’s own objects.
A Sender interface is addressed by object id alone, because the owner is the party being called.
Spec: 2.3.0 §mod_locations_cpo_interface and the equivalent section of each module
Implementations§
Source§impl SenderEndpoint
impl SenderEndpoint
Sourcepub fn list(&self, query: &PageQuery) -> Url
pub fn list(&self, query: &PageQuery) -> Url
GET {base}?[date_from]&[date_to]&[offset]&[limit] — the paginated list.
Sourcepub fn location(
&self,
location_id: &str,
evse_uid: Option<&str>,
connector_id: Option<&str>,
) -> Url
pub fn location( &self, location_id: &str, evse_uid: Option<&str>, connector_id: Option<&str>, ) -> Url
GET {locations}/{location_id}[/{evse_uid}[/{connector_id}]].
Spec: 2.3.0 §mod_locations_get_object_request_parameters
POST {tokens}/{token_uid}/authorize[?type={type}] — real-time authorization.
Spec: 2.3.0 §mod_tokens_real-time_authorization
Sourcepub fn charging_preferences(&self, session_id: &str) -> Url
pub fn charging_preferences(&self, session_id: &str) -> Url
PUT {sessions}/{session_id}/charging_preferences.
Spec: 2.3.0 §mod_sessions_set_charging_preferences
Sourcepub fn command(&self, command: &str) -> Url
pub fn command(&self, command: &str) -> Url
POST {commands}/{command} — a command request on the Receiver’s Sender-side endpoint.
Spec: 2.3.0 §mod_commands_commands_module
Sourcepub fn payments_terminals(&self) -> Self
pub fn payments_terminals(&self) -> Self
The Payments terminals sub-interface, {payments}/terminals.
§Spec gap: one ModuleID, two endpoint URLs
The Payments chapter declares “Module Identifier: payments” and then addresses its
two interfaces through two different variables,
{payments_terminals_endpoint_url} and
{payments_financial_advice_confirmation_endpoint_url}. Version discovery cannot express
that: an Endpoint is keyed by identifier and
role, so one module and one interface role has exactly one URL. A PTP that advertised
both would have to publish two payments/SENDER endpoints, and a client reading them
would have no way to tell which was which.
The reading this crate takes — and which the specification’s own examples support, since
they are …/payments/terminals/ and …/payments/financial-advice-confirmations/ — is
that the discovered payments endpoint is the base the two hang off. This has been
reported upstream; until it is resolved, SenderEndpoint::payments_terminals and
SenderEndpoint::payments_financial_advice_confirmations also tolerate a peer that
advertised one of the sub-paths directly, so either reading interoperates.
Sourcepub fn payments_financial_advice_confirmations(&self) -> Self
pub fn payments_financial_advice_confirmations(&self) -> Self
The Payments financial advice confirmations sub-interface. See
payments_terminals for why this is derived rather than
discovered.
Sourcepub fn terminal(&self, terminal_id: &str) -> Url
pub fn terminal(&self, terminal_id: &str) -> Url
{payments}/terminals/{terminal_id} — one payment terminal.
Call this on the endpoint from payments_terminals.
Sourcepub fn terminal_deactivate(&self, terminal_id: &str) -> Url
pub fn terminal_deactivate(&self, terminal_id: &str) -> Url
POST {payments}/terminals/{terminal_id}/deactivate.
Sourcepub fn terminal_activate(&self) -> Url
pub fn terminal_activate(&self) -> Url
POST {payments}/terminals/activate.
Trait Implementations§
Source§impl Clone for SenderEndpoint
impl Clone for SenderEndpoint
Source§fn clone(&self) -> SenderEndpoint
fn clone(&self) -> SenderEndpoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SenderEndpoint
impl Debug for SenderEndpoint
impl Eq for SenderEndpoint
Source§impl PartialEq for SenderEndpoint
impl PartialEq for SenderEndpoint
impl StructuralPartialEq for SenderEndpoint
Auto Trait Implementations§
impl Freeze for SenderEndpoint
impl RefUnwindSafe for SenderEndpoint
impl Send for SenderEndpoint
impl Sync for SenderEndpoint
impl Unpin for SenderEndpoint
impl UnsafeUnpin for SenderEndpoint
impl UnwindSafe for SenderEndpoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.