pub struct RefundRequestBuilder { /* private fields */ }Expand description
Collects the parts of a RefundRequest before it is checked.
Implementations§
Source§impl RefundRequestBuilder
impl RefundRequestBuilder
Sourcepub fn reason(self, reason: RefundReason) -> Self
pub fn reason(self, reason: RefundReason) -> Self
Says what the money went back for.
Sourcepub fn idempotency_key(self, key: IdempotencyKey) -> Self
pub fn idempotency_key(self, key: IdempotencyKey) -> Self
Sets the key that makes replaying this refund safe.
Sourcepub fn customer(self, customer: impl Into<Box<str>>) -> Self
pub fn customer(self, customer: impl Into<Box<str>>) -> Self
Names the payer in the provider’s own terms.
Sourcepub fn return_url(self, url: Url) -> Self
pub fn return_url(self, url: Url) -> Self
Sets where the provider should send the payer back to.
Sourcepub fn metadata(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn metadata(self, key: impl Into<String>, value: impl Into<String>) -> Self
Adds one key/value pair to hand to the provider.
Sourcepub fn build(self) -> Result<RefundRequest, RefundRequestError>
pub fn build(self) -> Result<RefundRequest, RefundRequestError>
Checks the request and produces it.
Trait Implementations§
Source§impl Clone for RefundRequestBuilder
impl Clone for RefundRequestBuilder
Source§fn clone(&self) -> RefundRequestBuilder
fn clone(&self) -> RefundRequestBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RefundRequestBuilder
impl RefUnwindSafe for RefundRequestBuilder
impl Send for RefundRequestBuilder
impl Sync for RefundRequestBuilder
impl Unpin for RefundRequestBuilder
impl UnsafeUnpin for RefundRequestBuilder
impl UnwindSafe for RefundRequestBuilder
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