pub struct Terminal {Show 17 fields
pub terminal_id: CiString<36>,
pub customer_reference: Option<CiString<36>>,
pub party_id: Option<PartyId>,
pub country_code: Option<CountryCode>,
pub address: Option<CiString<45>>,
pub city: Option<CiString<45>>,
pub postal_code: Option<CiString<10>>,
pub state: Option<CiString<20>>,
pub country: Option<CiString<3>>,
pub coordinates: Option<GeoLocation>,
pub invoice_base_url: Option<Url>,
pub invoice_creator: Option<InvoiceCreator>,
pub reference: Option<CiString<36>>,
pub location_ids: Vec<CiString<36>>,
pub evse_uids: Vec<CiString<36>>,
pub last_updated: DateTime,
pub extensions: Extensions,
}v2_3_0 only.Expand description
One physical payment terminal, and the charge points it serves.
It is designed primarily to establish a mapping between charge points (locations and/or EVSEs) and payment terminals.
Spec: 2.3.0 §mod_payments_terminal_object
Fields§
§terminal_id: CiString<36>Unique ID that identifies a terminal.
customer_reference: Option<CiString<36>>Reference used to link the terminal to a CSMS.
party_id: Option<PartyId>Party ID, as an alternative to the customer reference.
country_code: Option<CountryCode>Country code, as an alternative to the customer reference.
address: Option<CiString<45>>Street/block name and house number if available.
city: Option<CiString<45>>City or town.
postal_code: Option<CiString<10>>Postal code of the terminal.
state: Option<CiString<20>>State or province, only where relevant.
country: Option<CiString<3>>ISO 3166-1 alpha-3 code for the country of this terminal.
coordinates: Option<GeoLocation>Coordinates of the terminal.
invoice_base_url: Option<Url>Base URL of the downloadable invoice.
The full URL is this base plus the session’s authorization_reference; see
InvoiceCreator::Cpo.
invoice_creator: Option<InvoiceCreator>Which party creates the invoice for the eDriver.
reference: Option<CiString<36>>Mapping value as issued by the PTP, e.g. a serial number.
location_ids: Vec<CiString<36>>All Locations assigned to this terminal.
evse_uids: Vec<CiString<36>>All EVSEs assigned to this terminal.
last_updated: DateTimeTimestamp when this Terminal was last updated (or created).
extensions: ExtensionsUndocumented JSON fields, preserved verbatim.
Implementations§
Source§impl Terminal
impl Terminal
Sourcepub fn builder() -> TerminalBuilder
pub fn builder() -> TerminalBuilder
Create an instance of Terminal using the builder syntax
Source§impl Terminal
impl Terminal
Sourcepub fn assigned_party(&self) -> Option<PartyRef>
pub fn assigned_party(&self) -> Option<PartyRef>
The party this terminal is assigned to, when it was identified by party rather than by customer reference.
Sourcepub fn is_assigned(&self) -> bool
pub fn is_assigned(&self) -> bool
Whether the terminal has been assigned to any charge point yet.
A newly created terminal has neither, which is a legitimate intermediate state: the spec’s own “newly created” example has both lists empty.
Sourcepub fn invoice_url(&self, authorization_reference: &str) -> Option<Url>
pub fn invoice_url(&self, authorization_reference: &str) -> Option<Url>
The URL an eDriver can download the invoice from for a given authorization reference.
The CPO issues the invoice and provides it via the
invoice_base_url+authorization_reference.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Terminal
impl<'de> Deserialize<'de> for Terminal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Terminal
impl JsonSchema for Terminal
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more