Skip to main content

CommerceEvent

Enum CommerceEvent 

Source
pub enum CommerceEvent {
Show 81 variants OrderCreated { order_id: OrderId, customer_id: CustomerId, total_amount: Decimal, item_count: usize, timestamp: DateTime<Utc>, }, OrderStatusChanged { order_id: OrderId, from_status: OrderStatus, to_status: OrderStatus, timestamp: DateTime<Utc>, }, OrderPaymentStatusChanged { order_id: OrderId, from_status: PaymentStatus, to_status: PaymentStatus, timestamp: DateTime<Utc>, }, OrderFulfillmentStatusChanged { order_id: OrderId, from_status: FulfillmentStatus, to_status: FulfillmentStatus, timestamp: DateTime<Utc>, }, OrderCancelled { order_id: OrderId, reason: Option<String>, timestamp: DateTime<Utc>, }, OrderItemAdded { order_id: OrderId, item_id: OrderItemId, sku: String, quantity: i32, timestamp: DateTime<Utc>, }, OrderItemRemoved { order_id: OrderId, item_id: OrderItemId, timestamp: DateTime<Utc>, }, InventoryItemCreated { item_id: i64, sku: String, name: String, timestamp: DateTime<Utc>, }, InventoryAdjusted { item_id: i64, sku: String, location_id: i32, quantity_change: Decimal, new_quantity: Decimal, reason: String, timestamp: DateTime<Utc>, }, InventoryReserved { reservation_id: Uuid, sku: String, quantity: Decimal, reference_type: String, reference_id: String, timestamp: DateTime<Utc>, }, InventoryReservationReleased { reservation_id: Uuid, sku: String, quantity: Decimal, timestamp: DateTime<Utc>, }, InventoryReservationConfirmed { reservation_id: Uuid, sku: String, quantity: Decimal, timestamp: DateTime<Utc>, }, LowStockAlert { sku: String, location_id: i32, current_quantity: Decimal, reorder_point: Decimal, timestamp: DateTime<Utc>, }, CustomerCreated { customer_id: CustomerId, email: String, timestamp: DateTime<Utc>, }, CustomerUpdated { customer_id: CustomerId, fields_changed: Vec<String>, timestamp: DateTime<Utc>, }, CustomerStatusChanged { customer_id: CustomerId, from_status: CustomerStatus, to_status: CustomerStatus, timestamp: DateTime<Utc>, }, CustomerAddressAdded { customer_id: CustomerId, address_id: Uuid, timestamp: DateTime<Utc>, }, ProductCreated { product_id: ProductId, name: String, slug: String, timestamp: DateTime<Utc>, }, ProductUpdated { product_id: ProductId, fields_changed: Vec<String>, timestamp: DateTime<Utc>, }, ProductStatusChanged { product_id: ProductId, from_status: String, to_status: String, timestamp: DateTime<Utc>, }, ProductVariantAdded { product_id: ProductId, variant_id: Uuid, sku: String, timestamp: DateTime<Utc>, }, ProductVariantUpdated { variant_id: Uuid, sku: String, timestamp: DateTime<Utc>, }, CustomObjectTypeCreated { type_id: Uuid, handle: String, timestamp: DateTime<Utc>, }, CustomObjectTypeUpdated { type_id: Uuid, handle: String, fields_changed: Vec<String>, timestamp: DateTime<Utc>, }, CustomObjectTypeDeleted { type_id: Uuid, handle: String, timestamp: DateTime<Utc>, }, CustomObjectCreated { object_id: Uuid, type_handle: String, owner_type: Option<String>, owner_id: Option<String>, timestamp: DateTime<Utc>, }, CustomObjectUpdated { object_id: Uuid, type_handle: String, fields_changed: Vec<String>, timestamp: DateTime<Utc>, }, CustomObjectDeleted { object_id: Uuid, type_handle: String, timestamp: DateTime<Utc>, }, ReturnRequested { return_id: ReturnId, order_id: OrderId, customer_id: CustomerId, reason: ReturnReason, item_count: usize, timestamp: DateTime<Utc>, }, ReturnStatusChanged { return_id: ReturnId, from_status: ReturnStatus, to_status: ReturnStatus, timestamp: DateTime<Utc>, }, ReturnApproved { return_id: ReturnId, order_id: OrderId, timestamp: DateTime<Utc>, }, ReturnRejected { return_id: ReturnId, order_id: OrderId, reason: String, timestamp: DateTime<Utc>, }, ReturnCompleted { return_id: ReturnId, order_id: OrderId, refund_amount: Decimal, timestamp: DateTime<Utc>, }, RefundIssued { return_id: ReturnId, order_id: OrderId, amount: Decimal, method: String, timestamp: DateTime<Utc>, }, CartCreated { cart_id: CartId, customer_id: Option<CustomerId>, timestamp: DateTime<Utc>, }, CartItemAdded { cart_id: CartId, product_id: ProductId, sku: String, quantity: i32, timestamp: DateTime<Utc>, }, CartStatusChanged { cart_id: CartId, from_status: CartStatus, to_status: CartStatus, timestamp: DateTime<Utc>, }, CartCheckoutCompleted { cart_id: CartId, order_id: OrderId, total_amount: Decimal, timestamp: DateTime<Utc>, }, PaymentCreated { payment_id: PaymentId, order_id: OrderId, amount: Decimal, currency: CurrencyCode, timestamp: DateTime<Utc>, }, PaymentStatusChanged { payment_id: PaymentId, from_status: PaymentStatus, to_status: PaymentStatus, timestamp: DateTime<Utc>, }, PaymentCompleted { payment_id: PaymentId, order_id: OrderId, amount: Decimal, timestamp: DateTime<Utc>, }, ShipmentCreated { shipment_id: ShipmentId, order_id: OrderId, carrier: String, tracking_number: Option<String>, timestamp: DateTime<Utc>, }, ShipmentDelivered { shipment_id: ShipmentId, order_id: OrderId, timestamp: DateTime<Utc>, }, InvoiceCreated { invoice_id: InvoiceId, customer_id: CustomerId, total_amount: Decimal, currency: CurrencyCode, timestamp: DateTime<Utc>, }, InvoiceStatusChanged { invoice_id: InvoiceId, from_status: InvoiceStatus, to_status: InvoiceStatus, timestamp: DateTime<Utc>, }, SubscriptionCreated { subscription_id: SubscriptionId, customer_id: CustomerId, plan_name: String, price: Decimal, timestamp: DateTime<Utc>, }, SubscriptionStatusChanged { subscription_id: SubscriptionId, from_status: SubscriptionStatus, to_status: SubscriptionStatus, timestamp: DateTime<Utc>, }, SubscriptionRenewed { subscription_id: SubscriptionId, billing_amount: Decimal, timestamp: DateTime<Utc>, }, SubscriptionCancelled { subscription_id: SubscriptionId, reason: Option<String>, timestamp: DateTime<Utc>, }, GiftCardCreated { gift_card_id: GiftCardId, initial_balance: Decimal, currency: CurrencyCode, timestamp: DateTime<Utc>, }, GiftCardRedeemed { gift_card_id: GiftCardId, amount: Decimal, order_id: Option<OrderId>, timestamp: DateTime<Utc>, }, StoreCreditIssued { store_credit_id: StoreCreditId, customer_id: CustomerId, amount: Decimal, reason: String, timestamp: DateTime<Utc>, }, StoreCreditApplied { store_credit_id: StoreCreditId, order_id: OrderId, amount: Decimal, timestamp: DateTime<Utc>, }, LoyaltyPointsEarned { program_id: LoyaltyProgramId, customer_id: CustomerId, points: i64, source: String, timestamp: DateTime<Utc>, }, LoyaltyPointsRedeemed { program_id: LoyaltyProgramId, customer_id: CustomerId, points: i64, timestamp: DateTime<Utc>, }, X402IntentCreated { intent_id: Uuid, cart_id: Option<CartId>, payer_address: String, payee_address: String, amount: u64, asset: X402Asset, network: X402Network, timestamp: DateTime<Utc>, }, X402IntentSigned { intent_id: Uuid, signing_hash: String, payer_public_key: String, timestamp: DateTime<Utc>, }, X402IntentSequenced { intent_id: Uuid, sequence_number: u64, batch_id: Uuid, timestamp: DateTime<Utc>, }, X402IntentSettled { intent_id: Uuid, tx_hash: String, block_number: u64, timestamp: DateTime<Utc>, }, X402IntentFailed { intent_id: Uuid, reason: String, timestamp: DateTime<Utc>, }, X402IntentExpired { intent_id: Uuid, timestamp: DateTime<Utc>, }, AgentCardCreated { agent_id: Uuid, name: String, wallet_address: String, trust_level: TrustLevel, timestamp: DateTime<Utc>, }, AgentCardVerified { agent_id: Uuid, trust_level: TrustLevel, verification_method: String, timestamp: DateTime<Utc>, }, AgentCardSuspended { agent_id: Uuid, reason: String, timestamp: DateTime<Utc>, }, AgentCardReactivated { agent_id: Uuid, timestamp: DateTime<Utc>, }, A2AQuoteRequested { quote_id: Uuid, buyer_agent_id: Uuid, seller_agent_id: Uuid, total: Decimal, item_count: usize, timestamp: DateTime<Utc>, }, A2AQuoteAccepted { quote_id: Uuid, buyer_agent_id: Uuid, seller_agent_id: Uuid, timestamp: DateTime<Utc>, }, A2AQuoteRejected { quote_id: Uuid, buyer_agent_id: Uuid, reason: Option<String>, timestamp: DateTime<Utc>, }, A2APurchaseInitiated { purchase_id: Uuid, quote_id: Option<Uuid>, buyer_agent_id: Uuid, seller_agent_id: Uuid, payment_intent_id: Uuid, total: Decimal, timestamp: DateTime<Utc>, }, A2APurchasePaid { purchase_id: Uuid, payment_intent_id: Uuid, tx_hash: String, timestamp: DateTime<Utc>, }, A2ADeliveryConfirmed { purchase_id: Uuid, order_id: Option<OrderId>, buyer_agent_id: Uuid, seller_agent_id: Uuid, rating: Option<u8>, timestamp: DateTime<Utc>, }, FixedAssetPlacedInService { asset_id: Uuid, asset_number: String, in_service_date: NaiveDate, acquisition_cost: Decimal, timestamp: DateTime<Utc>, }, FixedAssetDisposed { asset_id: Uuid, asset_number: String, disposal_date: NaiveDate, proceeds: Decimal, gain_loss: Decimal, timestamp: DateTime<Utc>, }, FixedAssetWrittenOff { asset_id: Uuid, asset_number: String, write_off_date: NaiveDate, loss: Decimal, timestamp: DateTime<Utc>, }, DepreciationPosted { asset_id: Uuid, asset_number: String, periods: u32, amount: Decimal, accumulated_depreciation: Decimal, timestamp: DateTime<Utc>, }, RevenueRecognized { obligation_id: Uuid, amount: Decimal, total_recognized: Decimal, timestamp: DateTime<Utc>, }, RevenueContractCompleted { contract_id: Uuid, contract_number: String, transaction_price: Decimal, currency: CurrencyCode, timestamp: DateTime<Utc>, }, CycleCountCompleted { cycle_count_id: Uuid, warehouse_id: i32, line_count: usize, variance_line_count: usize, total_variance: Decimal, timestamp: DateTime<Utc>, }, ThreeWayMatchVarianceDetected { bill_id: Uuid, purchase_order_id: Uuid, variance_line_count: usize, tolerance_percent: Decimal, timestamp: DateTime<Utc>, }, FxRevaluationPosted { as_of_date: NaiveDate, base_currency: CurrencyCode, total_unrealized_gain_loss: Decimal, journal_entry_id: Option<Uuid>, timestamp: DateTime<Utc>, }, MonthEndCloseCompleted { period_id: Uuid, period_name: String, depreciation_total: Decimal, revenue_recognized_total: Decimal, fx_unrealized_gain_loss: Decimal, closing_entry_id: Option<Uuid>, timestamp: DateTime<Utc>, },
}
Expand description

Commerce domain event

Variants§

§

OrderCreated

Fields

§order_id: OrderId
§customer_id: CustomerId
§total_amount: Decimal
§item_count: usize
§timestamp: DateTime<Utc>
§

OrderStatusChanged

Fields

§order_id: OrderId
§from_status: OrderStatus
§to_status: OrderStatus
§timestamp: DateTime<Utc>
§

OrderPaymentStatusChanged

Fields

§order_id: OrderId
§from_status: PaymentStatus
§to_status: PaymentStatus
§timestamp: DateTime<Utc>
§

OrderFulfillmentStatusChanged

Fields

§order_id: OrderId
§from_status: FulfillmentStatus
§timestamp: DateTime<Utc>
§

OrderCancelled

Fields

§order_id: OrderId
§reason: Option<String>
§timestamp: DateTime<Utc>
§

OrderItemAdded

Fields

§order_id: OrderId
§item_id: OrderItemId
§quantity: i32
§timestamp: DateTime<Utc>
§

OrderItemRemoved

Fields

§order_id: OrderId
§item_id: OrderItemId
§timestamp: DateTime<Utc>
§

InventoryItemCreated

Fields

§item_id: i64
§name: String
§timestamp: DateTime<Utc>
§

InventoryAdjusted

Fields

§item_id: i64
§location_id: i32
§quantity_change: Decimal
§new_quantity: Decimal
§reason: String
§timestamp: DateTime<Utc>
§

InventoryReserved

Fields

§reservation_id: Uuid
§quantity: Decimal
§reference_type: String
§reference_id: String
§timestamp: DateTime<Utc>
§

InventoryReservationReleased

Fields

§reservation_id: Uuid
§quantity: Decimal
§timestamp: DateTime<Utc>
§

InventoryReservationConfirmed

Fields

§reservation_id: Uuid
§quantity: Decimal
§timestamp: DateTime<Utc>
§

LowStockAlert

Fields

§location_id: i32
§current_quantity: Decimal
§reorder_point: Decimal
§timestamp: DateTime<Utc>
§

CustomerCreated

Fields

§customer_id: CustomerId
§email: String
§timestamp: DateTime<Utc>
§

CustomerUpdated

Fields

§customer_id: CustomerId
§fields_changed: Vec<String>
§timestamp: DateTime<Utc>
§

CustomerStatusChanged

Fields

§customer_id: CustomerId
§from_status: CustomerStatus
§to_status: CustomerStatus
§timestamp: DateTime<Utc>
§

CustomerAddressAdded

Fields

§customer_id: CustomerId
§address_id: Uuid
§timestamp: DateTime<Utc>
§

ProductCreated

Fields

§product_id: ProductId
§name: String
§slug: String
§timestamp: DateTime<Utc>
§

ProductUpdated

Fields

§product_id: ProductId
§fields_changed: Vec<String>
§timestamp: DateTime<Utc>
§

ProductStatusChanged

Fields

§product_id: ProductId
§from_status: String
§to_status: String
§timestamp: DateTime<Utc>
§

ProductVariantAdded

Fields

§product_id: ProductId
§variant_id: Uuid
§timestamp: DateTime<Utc>
§

ProductVariantUpdated

Fields

§variant_id: Uuid
§timestamp: DateTime<Utc>
§

CustomObjectTypeCreated

Fields

§type_id: Uuid
§handle: String
§timestamp: DateTime<Utc>
§

CustomObjectTypeUpdated

Fields

§type_id: Uuid
§handle: String
§fields_changed: Vec<String>
§timestamp: DateTime<Utc>
§

CustomObjectTypeDeleted

Fields

§type_id: Uuid
§handle: String
§timestamp: DateTime<Utc>
§

CustomObjectCreated

Fields

§object_id: Uuid
§type_handle: String
§owner_type: Option<String>
§owner_id: Option<String>
§timestamp: DateTime<Utc>
§

CustomObjectUpdated

Fields

§object_id: Uuid
§type_handle: String
§fields_changed: Vec<String>
§timestamp: DateTime<Utc>
§

CustomObjectDeleted

Fields

§object_id: Uuid
§type_handle: String
§timestamp: DateTime<Utc>
§

ReturnRequested

Fields

§return_id: ReturnId
§order_id: OrderId
§customer_id: CustomerId
§item_count: usize
§timestamp: DateTime<Utc>
§

ReturnStatusChanged

Fields

§return_id: ReturnId
§from_status: ReturnStatus
§to_status: ReturnStatus
§timestamp: DateTime<Utc>
§

ReturnApproved

Fields

§return_id: ReturnId
§order_id: OrderId
§timestamp: DateTime<Utc>
§

ReturnRejected

Fields

§return_id: ReturnId
§order_id: OrderId
§reason: String
§timestamp: DateTime<Utc>
§

ReturnCompleted

Fields

§return_id: ReturnId
§order_id: OrderId
§refund_amount: Decimal
§timestamp: DateTime<Utc>
§

RefundIssued

Fields

§return_id: ReturnId
§order_id: OrderId
§amount: Decimal
§method: String
§timestamp: DateTime<Utc>
§

CartCreated

Fields

§cart_id: CartId
§customer_id: Option<CustomerId>
§timestamp: DateTime<Utc>
§

CartItemAdded

Fields

§cart_id: CartId
§product_id: ProductId
§quantity: i32
§timestamp: DateTime<Utc>
§

CartStatusChanged

Fields

§cart_id: CartId
§from_status: CartStatus
§to_status: CartStatus
§timestamp: DateTime<Utc>
§

CartCheckoutCompleted

Fields

§cart_id: CartId
§order_id: OrderId
§total_amount: Decimal
§timestamp: DateTime<Utc>
§

PaymentCreated

Fields

§payment_id: PaymentId
§order_id: OrderId
§amount: Decimal
§currency: CurrencyCode
§timestamp: DateTime<Utc>
§

PaymentStatusChanged

Fields

§payment_id: PaymentId
§from_status: PaymentStatus
§to_status: PaymentStatus
§timestamp: DateTime<Utc>
§

PaymentCompleted

Fields

§payment_id: PaymentId
§order_id: OrderId
§amount: Decimal
§timestamp: DateTime<Utc>
§

ShipmentCreated

Fields

§shipment_id: ShipmentId
§order_id: OrderId
§carrier: String
§tracking_number: Option<String>
§timestamp: DateTime<Utc>
§

ShipmentDelivered

Fields

§shipment_id: ShipmentId
§order_id: OrderId
§timestamp: DateTime<Utc>
§

InvoiceCreated

Fields

§invoice_id: InvoiceId
§customer_id: CustomerId
§total_amount: Decimal
§currency: CurrencyCode
§timestamp: DateTime<Utc>
§

InvoiceStatusChanged

Fields

§invoice_id: InvoiceId
§from_status: InvoiceStatus
§to_status: InvoiceStatus
§timestamp: DateTime<Utc>
§

SubscriptionCreated

Fields

§subscription_id: SubscriptionId
§customer_id: CustomerId
§plan_name: String
§price: Decimal
§timestamp: DateTime<Utc>
§

SubscriptionStatusChanged

Fields

§subscription_id: SubscriptionId
§timestamp: DateTime<Utc>
§

SubscriptionRenewed

Fields

§subscription_id: SubscriptionId
§billing_amount: Decimal
§timestamp: DateTime<Utc>
§

SubscriptionCancelled

Fields

§subscription_id: SubscriptionId
§reason: Option<String>
§timestamp: DateTime<Utc>
§

GiftCardCreated

Fields

§gift_card_id: GiftCardId
§initial_balance: Decimal
§currency: CurrencyCode
§timestamp: DateTime<Utc>
§

GiftCardRedeemed

Fields

§gift_card_id: GiftCardId
§amount: Decimal
§order_id: Option<OrderId>
§timestamp: DateTime<Utc>
§

StoreCreditIssued

Fields

§store_credit_id: StoreCreditId
§customer_id: CustomerId
§amount: Decimal
§reason: String
§timestamp: DateTime<Utc>
§

StoreCreditApplied

Fields

§store_credit_id: StoreCreditId
§order_id: OrderId
§amount: Decimal
§timestamp: DateTime<Utc>
§

LoyaltyPointsEarned

Fields

§program_id: LoyaltyProgramId
§customer_id: CustomerId
§points: i64
§source: String
§timestamp: DateTime<Utc>
§

LoyaltyPointsRedeemed

Fields

§program_id: LoyaltyProgramId
§customer_id: CustomerId
§points: i64
§timestamp: DateTime<Utc>
§

X402IntentCreated

Fields

§intent_id: Uuid
§cart_id: Option<CartId>
§payer_address: String
§payee_address: String
§amount: u64
§network: X402Network
§timestamp: DateTime<Utc>
§

X402IntentSigned

Fields

§intent_id: Uuid
§signing_hash: String
§payer_public_key: String
§timestamp: DateTime<Utc>
§

X402IntentSequenced

Fields

§intent_id: Uuid
§sequence_number: u64
§batch_id: Uuid
§timestamp: DateTime<Utc>
§

X402IntentSettled

Fields

§intent_id: Uuid
§tx_hash: String
§block_number: u64
§timestamp: DateTime<Utc>
§

X402IntentFailed

Fields

§intent_id: Uuid
§reason: String
§timestamp: DateTime<Utc>
§

X402IntentExpired

Fields

§intent_id: Uuid
§timestamp: DateTime<Utc>
§

AgentCardCreated

Fields

§agent_id: Uuid
§name: String
§wallet_address: String
§trust_level: TrustLevel
§timestamp: DateTime<Utc>
§

AgentCardVerified

Fields

§agent_id: Uuid
§trust_level: TrustLevel
§verification_method: String
§timestamp: DateTime<Utc>
§

AgentCardSuspended

Fields

§agent_id: Uuid
§reason: String
§timestamp: DateTime<Utc>
§

AgentCardReactivated

Fields

§agent_id: Uuid
§timestamp: DateTime<Utc>
§

A2AQuoteRequested

Fields

§quote_id: Uuid
§buyer_agent_id: Uuid
§seller_agent_id: Uuid
§total: Decimal
§item_count: usize
§timestamp: DateTime<Utc>
§

A2AQuoteAccepted

Fields

§quote_id: Uuid
§buyer_agent_id: Uuid
§seller_agent_id: Uuid
§timestamp: DateTime<Utc>
§

A2AQuoteRejected

Fields

§quote_id: Uuid
§buyer_agent_id: Uuid
§reason: Option<String>
§timestamp: DateTime<Utc>
§

A2APurchaseInitiated

Fields

§purchase_id: Uuid
§quote_id: Option<Uuid>
§buyer_agent_id: Uuid
§seller_agent_id: Uuid
§payment_intent_id: Uuid
§total: Decimal
§timestamp: DateTime<Utc>
§

A2APurchasePaid

Fields

§purchase_id: Uuid
§payment_intent_id: Uuid
§tx_hash: String
§timestamp: DateTime<Utc>
§

A2ADeliveryConfirmed

Fields

§purchase_id: Uuid
§order_id: Option<OrderId>
§buyer_agent_id: Uuid
§seller_agent_id: Uuid
§rating: Option<u8>
§timestamp: DateTime<Utc>
§

FixedAssetPlacedInService

Fields

§asset_id: Uuid
§asset_number: String
§in_service_date: NaiveDate
§acquisition_cost: Decimal
§timestamp: DateTime<Utc>
§

FixedAssetDisposed

Fields

§asset_id: Uuid
§asset_number: String
§disposal_date: NaiveDate
§proceeds: Decimal
§gain_loss: Decimal
§timestamp: DateTime<Utc>
§

FixedAssetWrittenOff

Fields

§asset_id: Uuid
§asset_number: String
§write_off_date: NaiveDate
§loss: Decimal
§timestamp: DateTime<Utc>
§

DepreciationPosted

Fields

§asset_id: Uuid
§asset_number: String
§periods: u32
§amount: Decimal
§accumulated_depreciation: Decimal
§timestamp: DateTime<Utc>
§

RevenueRecognized

Fields

§obligation_id: Uuid
§amount: Decimal
§total_recognized: Decimal
§timestamp: DateTime<Utc>
§

RevenueContractCompleted

Fields

§contract_id: Uuid
§contract_number: String
§transaction_price: Decimal
§currency: CurrencyCode
§timestamp: DateTime<Utc>
§

CycleCountCompleted

Fields

§cycle_count_id: Uuid
§warehouse_id: i32
§line_count: usize
§variance_line_count: usize
§total_variance: Decimal
§timestamp: DateTime<Utc>
§

ThreeWayMatchVarianceDetected

Fields

§bill_id: Uuid
§purchase_order_id: Uuid
§variance_line_count: usize
§tolerance_percent: Decimal
§timestamp: DateTime<Utc>
§

FxRevaluationPosted

Fields

§as_of_date: NaiveDate
§base_currency: CurrencyCode
§total_unrealized_gain_loss: Decimal
§journal_entry_id: Option<Uuid>
§timestamp: DateTime<Utc>
§

MonthEndCloseCompleted

Fields

§period_id: Uuid
§period_name: String
§depreciation_total: Decimal
§revenue_recognized_total: Decimal
§fx_unrealized_gain_loss: Decimal
§closing_entry_id: Option<Uuid>
§timestamp: DateTime<Utc>

Implementations§

Source§

impl CommerceEvent

Source

pub const fn event_type(&self) -> &'static str

Get event type as string

Source

pub const fn timestamp(&self) -> DateTime<Utc>

Get timestamp from event

Source

pub fn to_json(&self) -> Result<String, Error>

Serialize event to JSON

Source

pub fn from_json(json: &str) -> Result<CommerceEvent, Error>

Deserialize event from JSON

Trait Implementations§

Source§

impl Clone for CommerceEvent

Source§

fn clone(&self) -> CommerceEvent

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 CommerceEvent

Source§

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

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

impl<'de> Deserialize<'de> for CommerceEvent

Source§

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

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

impl Serialize for CommerceEvent

Source§

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

Serialize this value into the given Serde serializer. Read more

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 #126799)
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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = Infallible

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more