pub struct Capture {
pub amount: Option<String>,
pub settlement_address: Option<String>,
pub metadata: HashMap<String, Value>,
}Expand description
Capture message for releasing escrowed funds
The Capture message authorizes the release of escrowed funds to the beneficiary. It can only be sent by agents acting for the beneficiary.
Fields§
§amount: Option<String>Amount to capture (string decimal). If omitted, captures full escrow amount. MUST be less than or equal to original amount
settlement_address: Option<String>Blockchain address for settlement. If omitted, uses address from earlier Authorize
metadata: HashMap<String, Value>Additional metadata
Implementations§
Source§impl Capture
impl Capture
Sourcepub fn with_amount(amount: String) -> Self
pub fn with_amount(amount: String) -> Self
Create a new Capture message for a partial amount
Sourcepub fn with_settlement_address(self, address: String) -> Self
pub fn with_settlement_address(self, address: String) -> Self
Set the settlement address
Sourcepub fn with_metadata(self, key: String, value: Value) -> Self
pub fn with_metadata(self, key: String, value: Value) -> Self
Add metadata
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Capture
impl<'de> Deserialize<'de> for Capture
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 TapMessageBody for Capture
impl TapMessageBody for Capture
Source§fn message_type() -> &'static str
fn message_type() -> &'static str
Get the message type string for this body type.
Source§fn to_didcomm(&self, from: &str) -> Result<PlainMessage>
fn to_didcomm(&self, from: &str) -> Result<PlainMessage>
Convert this body to a DIDComm message.
Source§fn to_didcomm_with_route<'a, I>(
&self,
from: &str,
to: I,
) -> Result<PlainMessage>where
I: IntoIterator<Item = &'a str>,
fn to_didcomm_with_route<'a, I>(
&self,
from: &str,
to: I,
) -> Result<PlainMessage>where
I: IntoIterator<Item = &'a str>,
Convert this body to a DIDComm message with a custom routing path. Read more
Source§fn from_didcomm(message: &PlainMessage) -> Result<Self>where
Self: Sized,
fn from_didcomm(message: &PlainMessage) -> Result<Self>where
Self: Sized,
Extract this body type from a DIDComm message.
impl StructuralPartialEq for Capture
Auto Trait Implementations§
impl Freeze for Capture
impl RefUnwindSafe for Capture
impl Send for Capture
impl Sync for Capture
impl Unpin for Capture
impl UnsafeUnpin for Capture
impl UnwindSafe for Capture
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