From 0368c79f065cfc179855bc7fc60fa157ac758d1f Mon Sep 17 00:00:00 2001 From: Logan King Date: Wed, 1 Feb 2023 16:18:08 -0500 Subject: [PATCH] feat: fn to expire checkout sessions --- src/resources/checkout_session_ext.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/resources/checkout_session_ext.rs b/src/resources/checkout_session_ext.rs index 9deedf9a3..9d6d00e78 100644 --- a/src/resources/checkout_session_ext.rs +++ b/src/resources/checkout_session_ext.rs @@ -14,4 +14,11 @@ impl CheckoutSession { ) -> Response { client.get_query(&format!("/checkout/sessions/{}", id), &Expand { expand }) } + + /// Expires a checkout session. + /// + /// For more details see . + pub fn expire(client: &Client, id: &CheckoutSessionId) -> Response { + client.post(&format!("/checkout/sessions/{}/expire", id)) + } }