pub struct Sessions<'c> { /* private fields */ }Expand description
Handle returned by Client::sessions.
Implementations§
Source§impl<'c> Sessions<'c>
impl<'c> Sessions<'c>
Sourcepub async fn create(
&self,
request: &CreateSessionRequest,
idempotency_key: Option<&IdempotencyKey>,
) -> Result<Session>
pub async fn create( &self, request: &CreateSessionRequest, idempotency_key: Option<&IdempotencyKey>, ) -> Result<Session>
Create a hosted-checkout session — POST /api/v1/sessions.
The response includes both checkout_url (for embedding / WebView)
and payment_link_url (short vanity URL for SMS / WhatsApp). Prefer
payment_link_url for any URL the customer will see or read aloud.
Sourcepub async fn get(&self, reference: &str) -> Result<Session>
pub async fn get(&self, reference: &str) -> Result<Session>
Retrieve a session by reference — GET /api/v1/sessions/{reference}.
Trait Implementations§
impl<'c> Copy for Sessions<'c>
Auto Trait Implementations§
impl<'c> Freeze for Sessions<'c>
impl<'c> !RefUnwindSafe for Sessions<'c>
impl<'c> Send for Sessions<'c>
impl<'c> Sync for Sessions<'c>
impl<'c> Unpin for Sessions<'c>
impl<'c> UnsafeUnpin for Sessions<'c>
impl<'c> !UnwindSafe for Sessions<'c>
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