pub struct CdrBuilder<S: State = Empty> { /* private fields */ }v2_3_0 only.Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> CdrBuilder<S>
impl<S: State> CdrBuilder<S>
Sourcepub fn country_code(
self,
value: impl Into<CountryCode>,
) -> CdrBuilder<SetCountryCode<S>>where
S::CountryCode: IsUnset,
pub fn country_code(
self,
value: impl Into<CountryCode>,
) -> CdrBuilder<SetCountryCode<S>>where
S::CountryCode: IsUnset,
Required.
ISO-3166 alpha-2 country code of the CPO that ‘owns’ this CDR.
Sourcepub fn party_id(self, value: impl Into<PartyId>) -> CdrBuilder<SetPartyId<S>>where
S::PartyId: IsUnset,
pub fn party_id(self, value: impl Into<PartyId>) -> CdrBuilder<SetPartyId<S>>where
S::PartyId: IsUnset,
Required.
ID of the CPO that ‘owns’ this CDR.
Sourcepub fn id(self, value: impl Into<CiString<39>>) -> CdrBuilder<SetId<S>>where
S::Id: IsUnset,
pub fn id(self, value: impl Into<CiString<39>>) -> CdrBuilder<SetId<S>>where
S::Id: IsUnset,
Required.
Uniquely identifies the CDR, unique per country_code/party_id combination.
Sourcepub fn start_date_time(
self,
value: impl Into<DateTime>,
) -> CdrBuilder<SetStartDateTime<S>>where
S::StartDateTime: IsUnset,
pub fn start_date_time(
self,
value: impl Into<DateTime>,
) -> CdrBuilder<SetStartDateTime<S>>where
S::StartDateTime: IsUnset,
Required.
Start of the charging session, or of the reservation when there was no session.
Sourcepub fn end_date_time(
self,
value: impl Into<DateTime>,
) -> CdrBuilder<SetEndDateTime<S>>where
S::EndDateTime: IsUnset,
pub fn end_date_time(
self,
value: impl Into<DateTime>,
) -> CdrBuilder<SetEndDateTime<S>>where
S::EndDateTime: IsUnset,
Required.
When the session was completed. Charging may have finished earlier.
Sourcepub fn session_id(
self,
value: impl Into<CiString<36>>,
) -> CdrBuilder<SetSessionId<S>>where
S::SessionId: IsUnset,
pub fn session_id(
self,
value: impl Into<CiString<36>>,
) -> CdrBuilder<SetSessionId<S>>where
S::SessionId: IsUnset,
Sourcepub fn maybe_session_id(
self,
value: Option<impl Into<CiString<36>>>,
) -> CdrBuilder<SetSessionId<S>>where
S::SessionId: IsUnset,
pub fn maybe_session_id(
self,
value: Option<impl Into<CiString<36>>>,
) -> CdrBuilder<SetSessionId<S>>where
S::SessionId: IsUnset,
Sourcepub fn cdr_token(self, value: impl Into<CdrToken>) -> CdrBuilder<SetCdrToken<S>>where
S::CdrToken: IsUnset,
pub fn cdr_token(self, value: impl Into<CdrToken>) -> CdrBuilder<SetCdrToken<S>>where
S::CdrToken: IsUnset,
Required.
Token used to start this charging session.
Sourcepub fn auth_method(
self,
value: impl Into<AuthMethod>,
) -> CdrBuilder<SetAuthMethod<S>>where
S::AuthMethod: IsUnset,
pub fn auth_method(
self,
value: impl Into<AuthMethod>,
) -> CdrBuilder<SetAuthMethod<S>>where
S::AuthMethod: IsUnset,
Required.
Method used for authentication. The last method used during the session.
Sourcepub fn booking_id(
self,
value: impl Into<CiString<36>>,
) -> CdrBuilder<SetBookingId<S>>where
S::BookingId: IsUnset,
pub fn booking_id(
self,
value: impl Into<CiString<36>>,
) -> CdrBuilder<SetBookingId<S>>where
S::BookingId: IsUnset,
Sourcepub fn maybe_booking_id(
self,
value: Option<impl Into<CiString<36>>>,
) -> CdrBuilder<SetBookingId<S>>where
S::BookingId: IsUnset,
pub fn maybe_booking_id(
self,
value: Option<impl Into<CiString<36>>>,
) -> CdrBuilder<SetBookingId<S>>where
S::BookingId: IsUnset,
Sourcepub fn cdr_location(
self,
value: impl Into<CdrLocation>,
) -> CdrBuilder<SetCdrLocation<S>>where
S::CdrLocation: IsUnset,
pub fn cdr_location(
self,
value: impl Into<CdrLocation>,
) -> CdrBuilder<SetCdrLocation<S>>where
S::CdrLocation: IsUnset,
Required.
Where the charging session took place.
Sourcepub fn meter_id(
self,
value: impl Into<OcpiString<255>>,
) -> CdrBuilder<SetMeterId<S>>where
S::MeterId: IsUnset,
pub fn meter_id(
self,
value: impl Into<OcpiString<255>>,
) -> CdrBuilder<SetMeterId<S>>where
S::MeterId: IsUnset,
Sourcepub fn maybe_meter_id(
self,
value: Option<impl Into<OcpiString<255>>>,
) -> CdrBuilder<SetMeterId<S>>where
S::MeterId: IsUnset,
pub fn maybe_meter_id(
self,
value: Option<impl Into<OcpiString<255>>>,
) -> CdrBuilder<SetMeterId<S>>where
S::MeterId: IsUnset,
Sourcepub fn currency(self, value: impl Into<Currency>) -> CdrBuilder<SetCurrency<S>>where
S::Currency: IsUnset,
pub fn currency(self, value: impl Into<Currency>) -> CdrBuilder<SetCurrency<S>>where
S::Currency: IsUnset,
Required.
Currency of the CDR in ISO 4217 code.
Sourcepub fn tariffs(self, value: impl Into<Vec<Tariff>>) -> CdrBuilder<SetTariffs<S>>where
S::Tariffs: IsUnset,
pub fn tariffs(self, value: impl Into<Vec<Tariff>>) -> CdrBuilder<SetTariffs<S>>where
S::Tariffs: IsUnset,
Sourcepub fn maybe_tariffs(
self,
value: Option<impl Into<Vec<Tariff>>>,
) -> CdrBuilder<SetTariffs<S>>where
S::Tariffs: IsUnset,
pub fn maybe_tariffs(
self,
value: Option<impl Into<Vec<Tariff>>>,
) -> CdrBuilder<SetTariffs<S>>where
S::Tariffs: IsUnset,
Sourcepub fn charging_periods(
self,
value: impl Into<Vec<ChargingPeriod>>,
) -> CdrBuilder<SetChargingPeriods<S>>where
S::ChargingPeriods: IsUnset,
pub fn charging_periods(
self,
value: impl Into<Vec<ChargingPeriod>>,
) -> CdrBuilder<SetChargingPeriods<S>>where
S::ChargingPeriods: IsUnset,
Required.
Charging Periods that make up this session. Cardinality +.
Sourcepub fn signed_data(
self,
value: impl Into<SignedData>,
) -> CdrBuilder<SetSignedData<S>>where
S::SignedData: IsUnset,
pub fn signed_data(
self,
value: impl Into<SignedData>,
) -> CdrBuilder<SetSignedData<S>>where
S::SignedData: IsUnset,
Sourcepub fn maybe_signed_data(
self,
value: Option<impl Into<SignedData>>,
) -> CdrBuilder<SetSignedData<S>>where
S::SignedData: IsUnset,
pub fn maybe_signed_data(
self,
value: Option<impl Into<SignedData>>,
) -> CdrBuilder<SetSignedData<S>>where
S::SignedData: IsUnset,
Sourcepub fn total_cost(self, value: impl Into<Price>) -> CdrBuilder<SetTotalCost<S>>where
S::TotalCost: IsUnset,
pub fn total_cost(self, value: impl Into<Price>) -> CdrBuilder<SetTotalCost<S>>where
S::TotalCost: IsUnset,
Required.
Total sum of all the costs of this transaction.
Sourcepub fn total_fixed_cost(
self,
value: impl Into<Price>,
) -> CdrBuilder<SetTotalFixedCost<S>>where
S::TotalFixedCost: IsUnset,
pub fn total_fixed_cost(
self,
value: impl Into<Price>,
) -> CdrBuilder<SetTotalFixedCost<S>>where
S::TotalFixedCost: IsUnset,
Sourcepub fn maybe_total_fixed_cost(
self,
value: Option<impl Into<Price>>,
) -> CdrBuilder<SetTotalFixedCost<S>>where
S::TotalFixedCost: IsUnset,
pub fn maybe_total_fixed_cost(
self,
value: Option<impl Into<Price>>,
) -> CdrBuilder<SetTotalFixedCost<S>>where
S::TotalFixedCost: IsUnset,
Sourcepub fn total_energy(
self,
value: impl Into<Number>,
) -> CdrBuilder<SetTotalEnergy<S>>where
S::TotalEnergy: IsUnset,
pub fn total_energy(
self,
value: impl Into<Number>,
) -> CdrBuilder<SetTotalEnergy<S>>where
S::TotalEnergy: IsUnset,
Required.
Total energy charged, in kWh.
Sourcepub fn total_energy_cost(
self,
value: impl Into<Price>,
) -> CdrBuilder<SetTotalEnergyCost<S>>where
S::TotalEnergyCost: IsUnset,
pub fn total_energy_cost(
self,
value: impl Into<Price>,
) -> CdrBuilder<SetTotalEnergyCost<S>>where
S::TotalEnergyCost: IsUnset,
Sourcepub fn maybe_total_energy_cost(
self,
value: Option<impl Into<Price>>,
) -> CdrBuilder<SetTotalEnergyCost<S>>where
S::TotalEnergyCost: IsUnset,
pub fn maybe_total_energy_cost(
self,
value: Option<impl Into<Price>>,
) -> CdrBuilder<SetTotalEnergyCost<S>>where
S::TotalEnergyCost: IsUnset,
Sourcepub fn total_time(self, value: impl Into<Number>) -> CdrBuilder<SetTotalTime<S>>where
S::TotalTime: IsUnset,
pub fn total_time(self, value: impl Into<Number>) -> CdrBuilder<SetTotalTime<S>>where
S::TotalTime: IsUnset,
Required.
Total duration of the charging session, charging and not charging, in hours.
Sourcepub fn total_time_cost(
self,
value: impl Into<Price>,
) -> CdrBuilder<SetTotalTimeCost<S>>where
S::TotalTimeCost: IsUnset,
pub fn total_time_cost(
self,
value: impl Into<Price>,
) -> CdrBuilder<SetTotalTimeCost<S>>where
S::TotalTimeCost: IsUnset,
Sourcepub fn maybe_total_time_cost(
self,
value: Option<impl Into<Price>>,
) -> CdrBuilder<SetTotalTimeCost<S>>where
S::TotalTimeCost: IsUnset,
pub fn maybe_total_time_cost(
self,
value: Option<impl Into<Price>>,
) -> CdrBuilder<SetTotalTimeCost<S>>where
S::TotalTimeCost: IsUnset,
Sourcepub fn total_parking_time(
self,
value: impl Into<Number>,
) -> CdrBuilder<SetTotalParkingTime<S>>where
S::TotalParkingTime: IsUnset,
pub fn total_parking_time(
self,
value: impl Into<Number>,
) -> CdrBuilder<SetTotalParkingTime<S>>where
S::TotalParkingTime: IsUnset,
Sourcepub fn maybe_total_parking_time(
self,
value: Option<impl Into<Number>>,
) -> CdrBuilder<SetTotalParkingTime<S>>where
S::TotalParkingTime: IsUnset,
pub fn maybe_total_parking_time(
self,
value: Option<impl Into<Number>>,
) -> CdrBuilder<SetTotalParkingTime<S>>where
S::TotalParkingTime: IsUnset,
Sourcepub fn total_parking_cost(
self,
value: impl Into<Price>,
) -> CdrBuilder<SetTotalParkingCost<S>>where
S::TotalParkingCost: IsUnset,
pub fn total_parking_cost(
self,
value: impl Into<Price>,
) -> CdrBuilder<SetTotalParkingCost<S>>where
S::TotalParkingCost: IsUnset,
Sourcepub fn maybe_total_parking_cost(
self,
value: Option<impl Into<Price>>,
) -> CdrBuilder<SetTotalParkingCost<S>>where
S::TotalParkingCost: IsUnset,
pub fn maybe_total_parking_cost(
self,
value: Option<impl Into<Price>>,
) -> CdrBuilder<SetTotalParkingCost<S>>where
S::TotalParkingCost: IsUnset,
Sourcepub fn total_reservation_cost(
self,
value: impl Into<Price>,
) -> CdrBuilder<SetTotalReservationCost<S>>where
S::TotalReservationCost: IsUnset,
pub fn total_reservation_cost(
self,
value: impl Into<Price>,
) -> CdrBuilder<SetTotalReservationCost<S>>where
S::TotalReservationCost: IsUnset,
Sourcepub fn maybe_total_reservation_cost(
self,
value: Option<impl Into<Price>>,
) -> CdrBuilder<SetTotalReservationCost<S>>where
S::TotalReservationCost: IsUnset,
pub fn maybe_total_reservation_cost(
self,
value: Option<impl Into<Price>>,
) -> CdrBuilder<SetTotalReservationCost<S>>where
S::TotalReservationCost: IsUnset,
Sourcepub fn remark(
self,
value: impl Into<OcpiString<255>>,
) -> CdrBuilder<SetRemark<S>>where
S::Remark: IsUnset,
pub fn remark(
self,
value: impl Into<OcpiString<255>>,
) -> CdrBuilder<SetRemark<S>>where
S::Remark: IsUnset,
Sourcepub fn maybe_remark(
self,
value: Option<impl Into<OcpiString<255>>>,
) -> CdrBuilder<SetRemark<S>>where
S::Remark: IsUnset,
pub fn maybe_remark(
self,
value: Option<impl Into<OcpiString<255>>>,
) -> CdrBuilder<SetRemark<S>>where
S::Remark: IsUnset,
Sourcepub fn invoice_reference_id(
self,
value: impl Into<CiString<39>>,
) -> CdrBuilder<SetInvoiceReferenceId<S>>where
S::InvoiceReferenceId: IsUnset,
pub fn invoice_reference_id(
self,
value: impl Into<CiString<39>>,
) -> CdrBuilder<SetInvoiceReferenceId<S>>where
S::InvoiceReferenceId: IsUnset,
Sourcepub fn maybe_invoice_reference_id(
self,
value: Option<impl Into<CiString<39>>>,
) -> CdrBuilder<SetInvoiceReferenceId<S>>where
S::InvoiceReferenceId: IsUnset,
pub fn maybe_invoice_reference_id(
self,
value: Option<impl Into<CiString<39>>>,
) -> CdrBuilder<SetInvoiceReferenceId<S>>where
S::InvoiceReferenceId: IsUnset,
Sourcepub fn credit(self, value: impl Into<bool>) -> CdrBuilder<SetCredit<S>>where
S::Credit: IsUnset,
pub fn credit(self, value: impl Into<bool>) -> CdrBuilder<SetCredit<S>>where
S::Credit: IsUnset,
Sourcepub fn maybe_credit(
self,
value: Option<impl Into<bool>>,
) -> CdrBuilder<SetCredit<S>>where
S::Credit: IsUnset,
pub fn maybe_credit(
self,
value: Option<impl Into<bool>>,
) -> CdrBuilder<SetCredit<S>>where
S::Credit: IsUnset,
Sourcepub fn credit_reference_id(
self,
value: impl Into<CiString<39>>,
) -> CdrBuilder<SetCreditReferenceId<S>>where
S::CreditReferenceId: IsUnset,
pub fn credit_reference_id(
self,
value: impl Into<CiString<39>>,
) -> CdrBuilder<SetCreditReferenceId<S>>where
S::CreditReferenceId: IsUnset,
Sourcepub fn maybe_credit_reference_id(
self,
value: Option<impl Into<CiString<39>>>,
) -> CdrBuilder<SetCreditReferenceId<S>>where
S::CreditReferenceId: IsUnset,
pub fn maybe_credit_reference_id(
self,
value: Option<impl Into<CiString<39>>>,
) -> CdrBuilder<SetCreditReferenceId<S>>where
S::CreditReferenceId: IsUnset,
Sourcepub fn home_charging_compensation(
self,
value: impl Into<bool>,
) -> CdrBuilder<SetHomeChargingCompensation<S>>where
S::HomeChargingCompensation: IsUnset,
pub fn home_charging_compensation(
self,
value: impl Into<bool>,
) -> CdrBuilder<SetHomeChargingCompensation<S>>where
S::HomeChargingCompensation: IsUnset,
Sourcepub fn maybe_home_charging_compensation(
self,
value: Option<impl Into<bool>>,
) -> CdrBuilder<SetHomeChargingCompensation<S>>where
S::HomeChargingCompensation: IsUnset,
pub fn maybe_home_charging_compensation(
self,
value: Option<impl Into<bool>>,
) -> CdrBuilder<SetHomeChargingCompensation<S>>where
S::HomeChargingCompensation: IsUnset,
Sourcepub fn last_updated(
self,
value: impl Into<DateTime>,
) -> CdrBuilder<SetLastUpdated<S>>where
S::LastUpdated: IsUnset,
pub fn last_updated(
self,
value: impl Into<DateTime>,
) -> CdrBuilder<SetLastUpdated<S>>where
S::LastUpdated: IsUnset,
Required.
Timestamp when this CDR was last updated (or created).