pub struct TransactionEventResponse {
pub total_cost: Option<Decimal>,
pub charging_priority: Option<i32>,
pub id_token_info: Option<IdTokenInfo>,
pub updated_personal_message: Option<MessageContent>,
pub custom_data: Option<CustomData>,
}Expand description
Spec: OCPP 2.0.1 · E — Transactions · Charging Station → CSMS · CALL.
Fields§
§total_cost: Option<Decimal>SHALL only be sent when charging has ended. Final total cost of this transaction, including taxes. In the currency configured with the Configuration Variable: <<configkey-currency,Currency>>. When omitted, the transaction was NOT free. To indicate a free transaction, the CSMS SHALL send 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>> overrules the one in <<cmn_idtokeninfotype,IdTokenInfoType>>.
id_token_info: Option<IdTokenInfo>The idTokenInfo member.
updated_personal_message: Option<MessageContent>The updatedPersonalMessage 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_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_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.