Skip to main content

TransactionEventResponse

Struct TransactionEventResponse 

Source
pub struct TransactionEventResponse {
    pub total_cost: Option<Decimal>,
    pub charging_priority: Option<i32>,
    pub id_token_info: Option<IdTokenInfo>,
    pub transaction_limit: Option<TransactionLimit>,
    pub updated_personal_message: Option<MessageContent>,
    pub updated_personal_message_extra: Option<Vec<MessageContent>>,
    pub custom_data: Option<CustomData>,
}
Expand description

Spec: OCPP 2.1 · E — Transactions · Charging Station → CSMS · CALL.

Fields§

§total_cost: Option<Decimal>

When eventType of TransactionEventRequest is Updated, then this value contains the running cost. When eventType of TransactionEventRequest is Ended, then this contains the final total cost of this transaction, including taxes, in the currency configured with the Configuration Variable: Currency. Absence of this value does not imply that the transaction was free. To indicate a free transaction, the CSMS SHALL send a value of 0.00.

§charging_priority: Option<i32>

Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in <<transactioneventresponse,TransactionEventResponse>> is temporarily, so it may not be set in the <<cmn_idtokeninfotype,IdTokenInfoType>> afterwards. Also the chargingPriority in <<transactioneventresponse,TransactionEventResponse>> has a higher priority than the one in <<cmn_idtokeninfotype,IdTokenInfoType>>.

§id_token_info: Option<IdTokenInfo>

The idTokenInfo member.

§transaction_limit: Option<TransactionLimit>

The transactionLimit member.

§updated_personal_message: Option<MessageContent>

The updatedPersonalMessage member.

§updated_personal_message_extra: Option<Vec<MessageContent>>

The updatedPersonalMessageExtra member.

§custom_data: Option<CustomData>

The customData member.

Implementations§

Source§

impl TransactionEventResponse

Source

pub fn new() -> Self

Creates an empty TransactionEventResponse. Every field of this type is optional.

Source

pub fn with_total_cost(self, value: impl Into<Decimal>) -> Self

Sets the optional totalCost field.

Source

pub fn with_charging_priority(self, value: i32) -> Self

Sets the optional chargingPriority field.

Source

pub fn with_id_token_info(self, value: IdTokenInfo) -> Self

Sets the optional idTokenInfo field.

Source

pub fn with_transaction_limit(self, value: TransactionLimit) -> Self

Sets the optional transactionLimit field.

Source

pub fn with_updated_personal_message(self, value: MessageContent) -> Self

Sets the optional updatedPersonalMessage field.

Source

pub fn with_updated_personal_message_extra( self, value: Vec<MessageContent>, ) -> Self

Sets the optional updatedPersonalMessageExtra field.

Source

pub fn with_custom_data(self, value: CustomData) -> Self

Sets the optional customData field.

Trait Implementations§

Source§

impl Clone for TransactionEventResponse

Source§

fn clone(&self) -> TransactionEventResponse

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TransactionEventResponse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TransactionEventResponse

Source§

fn default() -> TransactionEventResponse

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for TransactionEventResponse

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TransactionEventResponse

Source§

fn eq(&self, other: &TransactionEventResponse) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Response for TransactionEventResponse

Source§

impl Sealed for TransactionEventResponse

Source§

impl Serialize for TransactionEventResponse

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for TransactionEventResponse

Source§

impl Validate for TransactionEventResponse

Source§

fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)

Appends this value’s violations to out, relative to path.
Source§

fn validate(&self) -> Result<(), Violations>

Validates this value from the payload root.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.