Struct PaymentBuilder

Source
pub struct PaymentBuilder { /* private fields */ }
Expand description

PaymentBuilder

Implementations§

Source§

impl PaymentBuilder

Source

pub fn new() -> Self

Source

pub fn transaction_id(self, transaction_id: String) -> Self

Source

pub fn thid(self, thid: String) -> Self

Source

pub fn pthid(self, pthid: String) -> Self

Source

pub fn merchant(self, merchant: Participant) -> Self

Source

pub fn customer(self, customer: Participant) -> Self

Source

pub fn asset(self, asset: AssetId) -> Self

Source

pub fn amount(self, amount: String) -> Self

Source

pub fn order_details(self, order_details: HashMap<String, Value>) -> Self

Source

pub fn timestamp(self, timestamp: String) -> Self

Source

pub fn expires(self, expires: String) -> Self

Source

pub fn note(self, note: String) -> Self

Source

pub fn add_agent(self, agent: Participant) -> Self

Source

pub fn set_agents(self, agents: Vec<Participant>) -> Self

Source

pub fn add_metadata(self, key: String, value: Value) -> Self

Source

pub fn set_metadata(self, metadata: HashMap<String, Value>) -> Self

Source

pub fn add_attachment(self, attachment: Attachment) -> Self

Source

pub fn set_attachments(self, attachments: Vec<Attachment>) -> Self

Source

pub fn build(self) -> Result<Payment>

Trait Implementations§

Source§

impl Default for PaymentBuilder

Source§

fn default() -> PaymentBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V