pub struct AllowanceTermsBuilder(/* private fields */);Expand description
Builder for immutable AllowanceTerms.
Holds unvalidated terms; AllowanceTermsBuilder::build validates them.
Implementations§
Source§impl AllowanceTermsBuilder
impl AllowanceTermsBuilder
Sourcepub fn new(asset: impl Into<String>) -> Self
pub fn new(asset: impl Into<String>) -> Self
Create a builder for an exact, case-sensitive asset.
Sourcepub fn per_payment_amount(self, range: AllowanceAmountRange) -> Self
pub fn per_payment_amount(self, range: AllowanceAmountRange) -> Self
Set the inclusive per-payment amount range.
Sourcepub fn period_limits(self, limits: Vec<AllowancePeriodLimit>) -> Self
pub fn period_limits(self, limits: Vec<AllowancePeriodLimit>) -> Self
Replace the independently applicable period limits.
Sourcepub fn lifetime_amount_limit(self, limit: impl Into<String>) -> Self
pub fn lifetime_amount_limit(self, limit: impl Into<String>) -> Self
Set the lifetime amount ceiling.
Sourcepub fn active_from(self, active_from: impl Into<String>) -> Self
pub fn active_from(self, active_from: impl Into<String>) -> Self
Set the inclusive first eligible instant.
Sourcepub fn expires_at(self, expires_at: impl Into<String>) -> Self
pub fn expires_at(self, expires_at: impl Into<String>) -> Self
Set the exclusive first ineligible instant.
Sourcepub fn allowed_payment_endpoint_identifiers(
self,
identifiers: Vec<PaymentEndpointIdentifier>,
) -> Self
pub fn allowed_payment_endpoint_identifiers( self, identifiers: Vec<PaymentEndpointIdentifier>, ) -> Self
Set the exact Payment Endpoint Identifier allowlist.
Sourcepub fn build(self) -> Result<AllowanceTerms>
pub fn build(self) -> Result<AllowanceTerms>
Validate all fields and build immutable Allowance Terms.
Trait Implementations§
Source§impl Clone for AllowanceTermsBuilder
impl Clone for AllowanceTermsBuilder
Auto Trait Implementations§
impl Freeze for AllowanceTermsBuilder
impl RefUnwindSafe for AllowanceTermsBuilder
impl Send for AllowanceTermsBuilder
impl Sync for AllowanceTermsBuilder
impl Unpin for AllowanceTermsBuilder
impl UnsafeUnpin for AllowanceTermsBuilder
impl UnwindSafe for AllowanceTermsBuilder
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