From a553d7f847123a806efd6d0122c2fbadb4a151ef Mon Sep 17 00:00:00 2001 From: Calum Knight Date: Thu, 16 May 2024 14:09:45 +0100 Subject: [PATCH 1/2] fix: add missing checkout_session_ext glob export This is now needed as `RetrieveCheckoutSessionLineItems` was added in #541 for the `retrieve_line_items` function, however, the struct is inaccessible, making it impossible to call the new function. --- src/resources.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/resources.rs b/src/resources.rs index a2189ea0d..6b974b714 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -184,6 +184,7 @@ pub use { #[rustfmt::skip] #[cfg(feature = "checkout")] pub use { + checkout::checkout_session_ext::*, generated::checkout::{ checkout_session::*, payment_link::*, From 16763c3011972fb3a95fc822d43ff15fd28d050b Mon Sep 17 00:00:00 2001 From: Calum Knight Date: Thu, 16 May 2024 15:25:59 +0100 Subject: [PATCH 2/2] fix: use `CheckoutSessionItemId` on `RetrieveCheckoutSessionLineItems` instead of `CheckoutSessionItem` --- src/resources/checkout_session_ext.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/resources/checkout_session_ext.rs b/src/resources/checkout_session_ext.rs index 4f7603212..06508495b 100644 --- a/src/resources/checkout_session_ext.rs +++ b/src/resources/checkout_session_ext.rs @@ -2,7 +2,7 @@ use crate::client::{Client, Response}; use crate::ids::CheckoutSessionId; use crate::params::Expand; use crate::resources::CheckoutSession; -use crate::{CheckoutSessionItem, List}; +use crate::{CheckoutSessionItem, CheckoutSessionItemId, List}; /// The parameters for `CheckoutSession::retrieve_line_items`. #[derive(Clone, Debug, serde::Serialize, Default)] @@ -12,7 +12,7 @@ pub struct RetrieveCheckoutSessionLineItems { /// `ending_before` is an object ID that defines your place in the list. /// For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. #[serde(skip_serializing_if = "Option::is_none")] - pub ending_before: Option, + pub ending_before: Option, /// A limit on the number of objects to be returned. /// @@ -25,7 +25,7 @@ pub struct RetrieveCheckoutSessionLineItems { /// `starting_after` is an object ID that defines your place in the list. /// For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. #[serde(skip_serializing_if = "Option::is_none")] - pub starting_after: Option, + pub starting_after: Option, } impl CheckoutSession {