pub struct PaymentIntent {
pub id: Uuid,
pub sku: String,
pub amount: u64,
pub currency: String,
pub payment_token: Option<String>,
pub state: PaymentIntentState,
pub trust_level: TrustLevel,
pub signature: String,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
An AWP payment intent representing a business owner’s view of a payment.
This is the protocol-level type shared between adk-awp and adk-gateway.
The policy engine in adk-awp bridges this to adk-payments for execution.
Fields§
§id: UuidUnique payment intent identifier.
sku: StringProduct or service SKU.
amount: u64Amount in smallest currency unit (e.g. cents).
currency: StringISO 4217 currency code (e.g. “USD”, “KES”).
payment_token: Option<String>Payment token from the payment provider (set after authorization).
state: PaymentIntentStateCurrent state in the lifecycle.
trust_level: TrustLevelTrust level of the requester who initiated this intent.
signature: StringHMAC-SHA256 signature for integrity verification.
created_at: DateTime<Utc>When this intent was created.
updated_at: DateTime<Utc>When this intent was last updated.
Trait Implementations§
Source§impl Clone for PaymentIntent
impl Clone for PaymentIntent
Source§fn clone(&self) -> PaymentIntent
fn clone(&self) -> PaymentIntent
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 PaymentIntent
impl Debug for PaymentIntent
Source§impl<'de> Deserialize<'de> for PaymentIntent
impl<'de> Deserialize<'de> for PaymentIntent
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 PaymentIntent
impl PartialEq for PaymentIntent
Source§fn eq(&self, other: &PaymentIntent) -> bool
fn eq(&self, other: &PaymentIntent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PaymentIntent
impl Serialize for PaymentIntent
impl StructuralPartialEq for PaymentIntent
Auto Trait Implementations§
impl Freeze for PaymentIntent
impl RefUnwindSafe for PaymentIntent
impl Send for PaymentIntent
impl Sync for PaymentIntent
impl Unpin for PaymentIntent
impl UnsafeUnpin for PaymentIntent
impl UnwindSafe for PaymentIntent
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