pub struct PaymentRequestTermsBuilder(/* private fields */);Expand description
Unvalidated builder for immutable Payment Request terms.
Implementations§
Source§impl PaymentRequestTermsBuilder
impl PaymentRequestTermsBuilder
Sourcepub fn payment_endpoints(
self,
value: Option<HashMap<PaymentEndpointIdentifier, PaymentEndpointPayload>>,
) -> Self
pub fn payment_endpoints( self, value: Option<HashMap<PaymentEndpointIdentifier, PaymentEndpointPayload>>, ) -> Self
Bind payment to immutable Payment Endpoints owned by required_app_id.
A supplied map must be nonempty, contain nonempty payloads, and use only
accepted Payment Endpoint Identifiers. required_app_id must be set.
None preserves endpoint discovery; Some forbids fallback outside the map.
Sourcepub fn required_app_id(self, value: Option<PaykitAppId>) -> Self
pub fn required_app_id(self, value: Option<PaykitAppId>) -> Self
Constrain payment to an endpoint owned by the specified payee App.
Sourcepub fn proposal_expires_at(self, value: Option<String>) -> Self
pub fn proposal_expires_at(self, value: Option<String>) -> Self
Set the optional proposal expiry; past timestamps remain valid history.
Sourcepub fn recurrence(self, value: Option<Recurrence>) -> Self
pub fn recurrence(self, value: Option<Recurrence>) -> Self
Set a validated recurrence, or None for a one-time request.
Sourcepub fn conversion(self, value: Option<PaymentConversion>) -> Self
pub fn conversion(self, value: Option<PaymentConversion>) -> Self
Set the optional conversion policy.
Sourcepub fn payment_deadline(self, value: Option<PaymentDeadline>) -> Self
pub fn payment_deadline(self, value: Option<PaymentDeadline>) -> Self
Set the optional payment deadline.
Sourcepub fn metadata(self, value: JsonMap<String, JsonValue>) -> Self
pub fn metadata(self, value: JsonMap<String, JsonValue>) -> Self
Set application-specific metadata without interpreting its contents.
Sourcepub fn build(self) -> Result<PaymentRequestTerms>
pub fn build(self) -> Result<PaymentRequestTerms>
Validate the complete terms, including the non-empty endpoint list.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PaymentRequestTermsBuilder
impl RefUnwindSafe for PaymentRequestTermsBuilder
impl Send for PaymentRequestTermsBuilder
impl Sync for PaymentRequestTermsBuilder
impl Unpin for PaymentRequestTermsBuilder
impl UnsafeUnpin for PaymentRequestTermsBuilder
impl UnwindSafe for PaymentRequestTermsBuilder
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