pub struct AccountingPostEnvelope {
pub idempotency_key: String,
pub company_id: Uuid,
pub branch_id: Option<Uuid>,
pub source_type: String,
pub source_id: Uuid,
pub source_reference: Option<String>,
pub posting_date: NaiveDate,
pub currency: String,
pub posting_type: String,
pub reverses_post_id: Option<Uuid>,
pub description: Option<String>,
pub lines: Vec<GlPostLine>,
}Expand description
The serialized GL-post envelope a producer emits. source_type discriminates the producer
(“payment”, “gateway_fee”, “sales”, …); source_id is the producer document id accounting dedups on.
Fields§
§idempotency_key: String§company_id: Uuid§branch_id: Option<Uuid>§source_type: StringPosting source discriminator — e.g. “payment” (settlement), “gateway_fee”.
source_id: UuidThe producer document id — opaque to accounting, used as the dedup key.
source_reference: Option<String>§posting_date: NaiveDate§currency: String§posting_type: String“original” | “reversal”.
reverses_post_id: Option<Uuid>Set only when posting_type == "reversal".
description: Option<String>§lines: Vec<GlPostLine>Implementations§
Trait Implementations§
Source§impl Clone for AccountingPostEnvelope
impl Clone for AccountingPostEnvelope
Source§impl Debug for AccountingPostEnvelope
impl Debug for AccountingPostEnvelope
Source§impl<'de> Deserialize<'de> for AccountingPostEnvelope
impl<'de> Deserialize<'de> for AccountingPostEnvelope
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AccountingPostEnvelope
impl PartialEq for AccountingPostEnvelope
Source§impl Serialize for AccountingPostEnvelope
impl Serialize for AccountingPostEnvelope
impl StructuralPartialEq for AccountingPostEnvelope
Auto Trait Implementations§
impl Freeze for AccountingPostEnvelope
impl RefUnwindSafe for AccountingPostEnvelope
impl Send for AccountingPostEnvelope
impl Sync for AccountingPostEnvelope
impl Unpin for AccountingPostEnvelope
impl UnsafeUnpin for AccountingPostEnvelope
impl UnwindSafe for AccountingPostEnvelope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more