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<AssetId>) -> Self
pub fn supported_assets(self, supported_assets: Vec<AssetId>) -> 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 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
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 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