pub struct RefundCreateBuilder<A, I> { /* private fields */ }

Implementations§

source§

impl<A, I> RefundCreateBuilder<A, I>

source

pub fn amount( self, amount: impl Into<String> ) -> RefundCreateBuilder<WithAmount, I>

Total refund amount. Optional. If this parameter is provided, it will take precedence over line item totals, even when total of line items does not matches with this amount.

source

pub fn reason(self, reason: impl Into<String>) -> Self

Reason for refund.

source

pub fn refunded_by(self, refunded_by: i32) -> Self

User ID of user who created the refund.

source

pub fn meta_data(self, key: impl Into<String>, value: impl Serialize) -> Self

Meta data.

source

pub fn api_refund(self) -> Self

When true, the payment gateway API is used to generate the refund. Default is true. This method set false

source

pub fn api_restock(self) -> Self

When true, the selected line items are restocked Default is true. This method set false

source§

impl<A> RefundCreateBuilder<A, NoItems>

source

pub fn line_item( self, line_item_id: i32, quatnity: i32 ) -> RefundCreateBuilder<A, WithItems>

Line item data.

source§

impl<A> RefundCreateBuilder<A, WithItems>

source

pub fn line_item(self, line_item_id: i32, quatnity: i32) -> Self

Line item data.

source§

impl RefundCreateBuilder<NoAmount, WithItems>

source

pub fn build(self) -> RefundCreate

source§

impl RefundCreateBuilder<WithAmount, WithItems>

source

pub fn build(self) -> RefundCreate

source§

impl RefundCreateBuilder<WithAmount, NoItems>

source

pub fn build(self) -> RefundCreate

Trait Implementations§

source§

impl<A: Clone, I: Clone> Clone for RefundCreateBuilder<A, I>

source§

fn clone(&self) -> RefundCreateBuilder<A, I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<A: Default, I: Default> Default for RefundCreateBuilder<A, I>

source§

fn default() -> RefundCreateBuilder<A, I>

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

Auto Trait Implementations§

§

impl<A, I> Freeze for RefundCreateBuilder<A, I>
where A: Freeze, I: Freeze,

§

impl<A, I> RefUnwindSafe for RefundCreateBuilder<A, I>

§

impl<A, I> Send for RefundCreateBuilder<A, I>
where A: Send, I: Send,

§

impl<A, I> Sync for RefundCreateBuilder<A, I>
where A: Sync, I: Sync,

§

impl<A, I> Unpin for RefundCreateBuilder<A, I>
where A: Unpin, I: Unpin,

§

impl<A, I> UnwindSafe for RefundCreateBuilder<A, I>
where A: UnwindSafe, I: UnwindSafe,

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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more