Skip to content

Commit

Permalink
feat: export checkout_session_ext
Browse files Browse the repository at this point in the history
### Description
Currently, the `checkout_session_ext` is not being exported, which makes the `RetrieveCheckoutSessionLineItems` not being able to be used.

With this change, the following should now be possible:
```rust
use std::str::FromStr;

use stripe::{CheckoutSession, CheckoutSessionId, Client, RetrieveCheckoutSessionLineItems};

#[tokio::main]
async fn main() {
    let secret_key = std::env::var("STRIPE_SECRET_KEY").expect("Missing STRIPE_SECRET_KEY in env");
    let client = Client::new(secret_key);

    let _line_items = CheckoutSession::retrieve_line_items(
        &client,
        &CheckoutSessionId::from_str("").unwrap(),
        &RetrieveCheckoutSessionLineItems::default(),
    )
    .await
    .unwrap();
}
```

Closes #614
  • Loading branch information
augustoccesar committed Sep 25, 2024
1 parent bf68a94 commit e4e7220
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ pub use {
#[rustfmt::skip]
#[cfg(feature = "checkout")]
pub use {
checkout::checkout_session_ext::*,
generated::checkout::{
checkout_session::*,
payment_link::*,
Expand Down

0 comments on commit e4e7220

Please sign in to comment.