pub struct EventRegistrationRequest {
pub schema_version: String,
pub handles: Option<TransactionHandles>,
pub transaction_id: Option<String>,
pub client_metadata: Option<ClientMetadata>,
pub event_type: Option<EventType>,
pub transaction_event_filter: Option<TransactionEvent>,
}Expand description
Request to register a receipt with the Versa registry.
This is the first step in sending a receipt through Versa. The registry will respond with encryption keys and receiver endpoints.
§Example
use versa::protocol::{EventRegistrationRequest, TransactionHandles, event::EventType};
let request = EventRegistrationRequest {
event_type: Some(EventType::Receipt),
schema_version: "2.1.1".to_string(),
handles: Some(TransactionHandles::new()
.with_customer_email("customer@example.com".to_string())),
transaction_id: None,
client_metadata: None,
transaction_event_filter: None,
};Fields§
§schema_version: StringThe schema version of the receipt (e.g., “2.1.1”)
handles: Option<TransactionHandles>Provide as many handles as available to ensure the receipt is routed to the correct receivers
transaction_id: Option<String>The Versa Transaction ID, if updating an existing receipt
client_metadata: Option<ClientMetadata>Client software metadata, such as the client_string
event_type: Option<EventType>Specify the event type for this registration. If left blank, the registry will default to ‘receipt’
transaction_event_filter: Option<TransactionEvent>Filter receivers by the specific transaction event data you are prepared to send
Trait Implementations§
Source§impl Debug for EventRegistrationRequest
impl Debug for EventRegistrationRequest
Source§impl<'de> Deserialize<'de> for EventRegistrationRequest
impl<'de> Deserialize<'de> for EventRegistrationRequest
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
Auto Trait Implementations§
impl Freeze for EventRegistrationRequest
impl RefUnwindSafe for EventRegistrationRequest
impl Send for EventRegistrationRequest
impl Sync for EventRegistrationRequest
impl Unpin for EventRegistrationRequest
impl UnwindSafe for EventRegistrationRequest
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