pub struct PaymentBuilder { /* private fields */ }Expand description
Builder for Payment objects.
Implementations§
Source§impl PaymentBuilder
impl PaymentBuilder
Sourcepub fn currency_code(self, currency_code: String) -> Self
pub fn currency_code(self, currency_code: String) -> Self
Set the currency code for this payment
Sourcepub fn supported_assets(self, supported_assets: Vec<SupportedAsset>) -> Self
pub fn supported_assets(self, supported_assets: Vec<SupportedAsset>) -> Self
Set the supported assets for this payment
Sourcepub fn add_supported_asset(self, asset: AssetId) -> Self
pub fn add_supported_asset(self, asset: AssetId) -> Self
Add a simple supported asset for this payment
Sourcepub fn add_priced_asset(self, pricing: AssetPricing) -> Self
pub fn add_priced_asset(self, pricing: AssetPricing) -> Self
Add a priced supported asset for this payment
Sourcepub fn transaction_id(self, transaction_id: String) -> Self
pub fn transaction_id(self, transaction_id: String) -> Self
Set the transaction ID for this payment
Sourcepub fn invoice(self, invoice: Invoice) -> Self
pub fn invoice(self, invoice: Invoice) -> Self
Set the invoice for this payment with an Invoice object
Sourcepub fn invoice_url(self, url: String) -> Self
pub fn invoice_url(self, url: String) -> Self
Set the invoice URL for this payment
Sourcepub fn add_metadata(self, key: String, value: Value) -> Self
pub fn add_metadata(self, key: String, value: Value) -> Self
Add a metadata field
Sourcepub fn metadata(self, metadata: HashMap<String, Value>) -> Self
pub fn metadata(self, metadata: HashMap<String, Value>) -> Self
Set all metadata for this payment
Sourcepub fn add_fallback_settlement_address(self, address: SettlementAddress) -> Self
pub fn add_fallback_settlement_address(self, address: SettlementAddress) -> Self
Add a fallback settlement address
Sourcepub fn fallback_settlement_addresses(
self,
addresses: Vec<SettlementAddress>,
) -> Self
pub fn fallback_settlement_addresses( self, addresses: Vec<SettlementAddress>, ) -> Self
Set all fallback settlement addresses
Trait Implementations§
Source§impl Default for PaymentBuilder
impl Default for PaymentBuilder
Source§fn default() -> PaymentBuilder
fn default() -> PaymentBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PaymentBuilder
impl RefUnwindSafe for PaymentBuilder
impl Send for PaymentBuilder
impl Sync for PaymentBuilder
impl Unpin for PaymentBuilder
impl UnsafeUnpin for PaymentBuilder
impl UnwindSafe for PaymentBuilder
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