Skip to content

Commit

Permalink
Merge pull request #334 from sloganking/expire-checkout-session
Browse files Browse the repository at this point in the history
fn to expire checkout sessions
  • Loading branch information
arlyon committed Feb 4, 2023
2 parents 35960fd + 0368c79 commit c61ff53
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/resources/checkout_session_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,11 @@ impl CheckoutSession {
) -> Response<CheckoutSession> {
client.get_query(&format!("/checkout/sessions/{}", id), &Expand { expand })
}

/// Expires a checkout session.
///
/// For more details see <https://stripe.com/docs/api/checkout/sessions/expire>.
pub fn expire(client: &Client, id: &CheckoutSessionId) -> Response<CheckoutSession> {
client.post(&format!("/checkout/sessions/{}/expire", id))
}
}

0 comments on commit c61ff53

Please sign in to comment.