pub struct PaymentRequest {
pub asset: Option<AssetId>,
pub currency: Option<String>,
pub amount: String,
pub supported_assets: Option<Vec<String>>,
pub invoice: Option<Invoice>,
pub expiry: Option<String>,
pub merchant: Participant,
pub customer: Option<Participant>,
pub agents: Vec<Participant>,
pub metadata: HashMap<String, Value>,
}Expand description
Payment Request message body (TAIP-14)
Fields§
§asset: Option<AssetId>Asset identifier in CAIP-19 format (optional if currency is provided)
currency: Option<String>ISO 4217 currency code for fiat amount (optional if asset is provided)
amount: StringAmount requested in the specified asset or currency
supported_assets: Option<Vec<String>>Array of CAIP-19 asset identifiers that can be used to settle a fiat currency amount
invoice: Option<Invoice>Structured invoice information according to TAIP-16
expiry: Option<String>ISO 8601 timestamp when the request expires
merchant: ParticipantParty information for the merchant (beneficiary)
customer: Option<Participant>Party information for the customer (originator) (optional)
agents: Vec<Participant>Array of agents involved in the payment request
metadata: HashMap<String, Value>Additional metadata for the payment request
Implementations§
Source§impl PaymentRequest
impl PaymentRequest
Sourcepub fn new(
amount: String,
merchant: Participant,
agents: Vec<Participant>,
) -> Self
pub fn new( amount: String, merchant: Participant, agents: Vec<Participant>, ) -> Self
Creates a new PaymentRequest message body
Sourcepub fn with_asset(
asset: AssetId,
amount: String,
merchant: Participant,
agents: Vec<Participant>,
) -> Self
pub fn with_asset( asset: AssetId, amount: String, merchant: Participant, agents: Vec<Participant>, ) -> Self
Creates a new PaymentRequest message with asset specification
Sourcepub fn with_currency(
currency: String,
amount: String,
merchant: Participant,
agents: Vec<Participant>,
) -> Self
pub fn with_currency( currency: String, amount: String, merchant: Participant, agents: Vec<Participant>, ) -> Self
Creates a new PaymentRequest message with currency specification
Trait Implementations§
Source§impl Clone for PaymentRequest
impl Clone for PaymentRequest
Source§fn clone(&self) -> PaymentRequest
fn clone(&self) -> PaymentRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more