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
impl TransactionEventResponse
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates an empty TransactionEventResponse. Every field of this type is optional.
Sourcepub fn with_total_cost(self, value: impl Into<Decimal>) -> Self
pub fn with_total_cost(self, value: impl Into<Decimal>) -> Self
Sets the optional totalCost field.
Sourcepub fn with_charging_priority(self, value: i32) -> Self
pub fn with_charging_priority(self, value: i32) -> Self
Sets the optional chargingPriority field.
Sourcepub fn with_id_token_info(self, value: IdTokenInfo) -> Self
pub fn with_id_token_info(self, value: IdTokenInfo) -> Self
Sets the optional idTokenInfo field.
Sourcepub fn with_transaction_limit(self, value: TransactionLimit) -> Self
pub fn with_transaction_limit(self, value: TransactionLimit) -> Self
Sets the optional transactionLimit field.
Sourcepub fn with_updated_personal_message(self, value: MessageContent) -> Self
pub fn with_updated_personal_message(self, value: MessageContent) -> Self
Sets the optional updatedPersonalMessage field.
Sourcepub fn with_updated_personal_message_extra(
self,
value: Vec<MessageContent>,
) -> Self
pub fn with_updated_personal_message_extra( self, value: Vec<MessageContent>, ) -> Self
Sets the optional updatedPersonalMessageExtra field.
Sourcepub fn with_custom_data(self, value: CustomData) -> Self
pub fn with_custom_data(self, value: CustomData) -> Self
Sets the optional customData field.
Trait Implementations§
Source§impl Clone for TransactionEventResponse
impl Clone for TransactionEventResponse
Source§impl Debug for TransactionEventResponse
impl Debug for TransactionEventResponse
Source§impl Default for TransactionEventResponse
impl Default for TransactionEventResponse
Source§impl<'de> Deserialize<'de> for TransactionEventResponse
impl<'de> Deserialize<'de> for TransactionEventResponse
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 PartialEq for TransactionEventResponse
impl PartialEq for TransactionEventResponse
impl Response for TransactionEventResponse
impl Sealed for TransactionEventResponse
Source§impl Serialize for TransactionEventResponse
impl Serialize for TransactionEventResponse
impl StructuralPartialEq for TransactionEventResponse
Source§impl Validate for TransactionEventResponse
impl Validate for TransactionEventResponse
Source§fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
out, relative to path.