Skip to content

Commit b146058

Browse files
committed
Merge pull request #334 from sloganking/expire-checkout-session
fn to expire checkout sessions
2 parents f44c1a7 + 90e3132 commit b146058

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/resources/checkout_session_ext.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,11 @@ impl CheckoutSession {
1414
) -> Response<CheckoutSession> {
1515
client.get_query(&format!("/checkout/sessions/{}", id), &Expand { expand })
1616
}
17+
18+
/// Expires a checkout session.
19+
///
20+
/// For more details see <https://stripe.com/docs/api/checkout/sessions/expire>.
21+
pub fn expire(client: &Client, id: &CheckoutSessionId) -> Response<CheckoutSession> {
22+
client.post(&format!("/checkout/sessions/{}/expire", id))
23+
}
1724
}

0 commit comments

Comments
 (0)