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
§
customer_id: CustomerIdOrderStatusChanged
OrderPaymentStatusChanged
OrderFulfillmentStatusChanged
OrderCancelled
OrderItemAdded
OrderItemRemoved
InventoryItemCreated
InventoryAdjusted
Fields
InventoryReserved
Fields
InventoryReservationReleased
InventoryReservationConfirmed
LowStockAlert
Fields
CustomerCreated
CustomerUpdated
CustomerStatusChanged
CustomerAddressAdded
ProductCreated
ProductUpdated
ProductStatusChanged
ProductVariantAdded
ProductVariantUpdated
CustomObjectTypeCreated
CustomObjectTypeUpdated
CustomObjectTypeDeleted
CustomObjectCreated
Fields
CustomObjectUpdated
CustomObjectDeleted
ReturnRequested
ReturnStatusChanged
ReturnApproved
ReturnRejected
ReturnCompleted
RefundIssued
Fields
CartCreated
CartItemAdded
CartStatusChanged
CartCheckoutCompleted
PaymentCreated
Fields
§
currency: CurrencyCodePaymentStatusChanged
PaymentCompleted
ShipmentCreated
Fields
§
shipment_id: ShipmentIdShipmentDelivered
InvoiceCreated
InvoiceStatusChanged
SubscriptionCreated
SubscriptionStatusChanged
Fields
§
subscription_id: SubscriptionId§
from_status: SubscriptionStatus§
to_status: SubscriptionStatusSubscriptionRenewed
SubscriptionCancelled
GiftCardCreated
GiftCardRedeemed
StoreCreditIssued
StoreCreditApplied
LoyaltyPointsEarned
LoyaltyPointsRedeemed
X402IntentCreated
Fields
§
network: X402NetworkX402IntentSigned
X402IntentSequenced
X402IntentSettled
X402IntentFailed
X402IntentExpired
AgentCardCreated
Fields
§
trust_level: TrustLevelAgentCardVerified
AgentCardSuspended
AgentCardReactivated
A2AQuoteRequested
Fields
A2AQuoteAccepted
A2AQuoteRejected
A2APurchaseInitiated
Fields
A2APurchasePaid
A2ADeliveryConfirmed
Fields
FixedAssetPlacedInService
Fields
FixedAssetDisposed
Fields
FixedAssetWrittenOff
Fields
DepreciationPosted
Fields
RevenueRecognized
RevenueContractCompleted
Fields
§
currency: CurrencyCodeCycleCountCompleted
Fields
ThreeWayMatchVarianceDetected
Fields
FxRevaluationPosted
Fields
§
base_currency: CurrencyCodeMonthEndCloseCompleted
Implementations§
Source§impl CommerceEvent
impl CommerceEvent
Sourcepub const fn event_type(&self) -> &'static str
pub const fn event_type(&self) -> &'static str
Get event type as string
Trait Implementations§
Source§impl Clone for CommerceEvent
impl Clone for CommerceEvent
Source§fn clone(&self) -> CommerceEvent
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommerceEvent
impl Debug for CommerceEvent
Source§impl<'de> Deserialize<'de> for CommerceEvent
impl<'de> Deserialize<'de> for CommerceEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CommerceEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
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
impl Serialize for CommerceEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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§
impl Freeze for CommerceEvent
impl RefUnwindSafe for CommerceEvent
impl Send for CommerceEvent
impl Sync for CommerceEvent
impl Unpin for CommerceEvent
impl UnsafeUnpin for CommerceEvent
impl UnwindSafe for CommerceEvent
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