diff --git a/generated/stripe_billing/src/portal_configuration/requests.rs b/generated/stripe_billing/src/portal_configuration/requests.rs index 33ba3583c..6a0e0a5d5 100644 --- a/generated/stripe_billing/src/portal_configuration/requests.rs +++ b/generated/stripe_billing/src/portal_configuration/requests.rs @@ -1260,7 +1260,7 @@ impl<'a> UpdatePortalConfiguration<'a> { pub fn send( &self, client: &stripe::Client, - configuration: &str, + configuration: &stripe_billing::portal_configuration::BillingPortalConfigurationId, ) -> stripe::Response { client.send_form( &format!("/billing_portal/configurations/{configuration}"), @@ -1285,7 +1285,7 @@ impl<'a> RetrievePortalConfiguration<'a> { pub fn send( &self, client: &stripe::Client, - configuration: &str, + configuration: &stripe_billing::portal_configuration::BillingPortalConfigurationId, ) -> stripe::Response { client.get_query(&format!("/billing_portal/configurations/{configuration}"), self) } diff --git a/generated/stripe_billing/src/subscription/requests.rs b/generated/stripe_billing/src/subscription/requests.rs index 1b090ef81..e35dafce6 100644 --- a/generated/stripe_billing/src/subscription/requests.rs +++ b/generated/stripe_billing/src/subscription/requests.rs @@ -4785,7 +4785,7 @@ impl DeleteDiscountSubscription { pub fn send( &self, client: &stripe::Client, - subscription_exposed_id: &str, + subscription_exposed_id: &stripe_types::subscription::SubscriptionId, ) -> stripe::Response { client.send_form( &format!("/subscriptions/{subscription_exposed_id}/discount"), diff --git a/generated/stripe_billing/src/subscription_item/requests.rs b/generated/stripe_billing/src/subscription_item/requests.rs index f04b87f45..3d759633b 100644 --- a/generated/stripe_billing/src/subscription_item/requests.rs +++ b/generated/stripe_billing/src/subscription_item/requests.rs @@ -63,7 +63,7 @@ impl<'a> RetrieveSubscriptionItem<'a> { pub fn send( &self, client: &stripe::Client, - item: &stripe_types::line_item::ItemId, + item: &stripe_types::subscription_item::SubscriptionItemId, ) -> stripe::Response { client.get_query(&format!("/subscription_items/{item}"), self) } @@ -866,7 +866,7 @@ impl<'a> UpdateSubscriptionItem<'a> { pub fn send( &self, client: &stripe::Client, - item: &stripe_types::line_item::ItemId, + item: &stripe_types::subscription_item::SubscriptionItemId, ) -> stripe::Response { client.send_form(&format!("/subscription_items/{item}"), self, http_types::Method::Post) } @@ -957,7 +957,7 @@ impl DeleteSubscriptionItem { pub fn send( &self, client: &stripe::Client, - item: &stripe_types::line_item::ItemId, + item: &stripe_types::subscription_item::SubscriptionItemId, ) -> stripe::Response { client.send_form(&format!("/subscription_items/{item}"), self, http_types::Method::Delete) } diff --git a/generated/stripe_billing/src/subscription_schedule/requests.rs b/generated/stripe_billing/src/subscription_schedule/requests.rs index 6db615af0..7d7b5d762 100644 --- a/generated/stripe_billing/src/subscription_schedule/requests.rs +++ b/generated/stripe_billing/src/subscription_schedule/requests.rs @@ -1151,7 +1151,7 @@ impl<'a> RetrieveSubscriptionSchedule<'a> { pub fn send( &self, client: &stripe::Client, - schedule: &str, + schedule: &stripe_types::subscription_schedule::SubscriptionScheduleId, ) -> stripe::Response { client.get_query(&format!("/subscription_schedules/{schedule}"), self) } @@ -2296,7 +2296,7 @@ impl<'a> UpdateSubscriptionSchedule<'a> { pub fn send( &self, client: &stripe::Client, - schedule: &str, + schedule: &stripe_types::subscription_schedule::SubscriptionScheduleId, ) -> stripe::Response { client.send_form( &format!("/subscription_schedules/{schedule}"), @@ -2333,7 +2333,7 @@ impl<'a> CancelSubscriptionSchedule<'a> { pub fn send( &self, client: &stripe::Client, - schedule: &str, + schedule: &stripe_types::subscription_schedule::SubscriptionScheduleId, ) -> stripe::Response { client.send_form( &format!("/subscription_schedules/{schedule}/cancel"), @@ -2364,7 +2364,7 @@ impl<'a> ReleaseSubscriptionSchedule<'a> { pub fn send( &self, client: &stripe::Client, - schedule: &str, + schedule: &stripe_types::subscription_schedule::SubscriptionScheduleId, ) -> stripe::Response { client.send_form( &format!("/subscription_schedules/{schedule}/release"), diff --git a/generated/stripe_billing/src/test_clock/requests.rs b/generated/stripe_billing/src/test_clock/requests.rs index 1f134d9fc..0097f2728 100644 --- a/generated/stripe_billing/src/test_clock/requests.rs +++ b/generated/stripe_billing/src/test_clock/requests.rs @@ -14,7 +14,7 @@ impl<'a> RetrieveTestClock<'a> { pub fn send( &self, client: &stripe::Client, - test_clock: &str, + test_clock: &stripe_types::test_clock::TestHelpersTestClockId, ) -> stripe::Response { client.get_query(&format!("/test_helpers/test_clocks/{test_clock}"), self) } @@ -53,7 +53,7 @@ impl DeleteTestClock { pub fn send( &self, client: &stripe::Client, - test_clock: &str, + test_clock: &stripe_types::test_clock::TestHelpersTestClockId, ) -> stripe::Response { client.send_form( &format!("/test_helpers/test_clocks/{test_clock}"), @@ -86,7 +86,7 @@ impl<'a> AdvanceTestClock<'a> { pub fn send( &self, client: &stripe::Client, - test_clock: &str, + test_clock: &stripe_types::test_clock::TestHelpersTestClockId, ) -> stripe::Response { client.send_form( &format!("/test_helpers/test_clocks/{test_clock}/advance"), diff --git a/generated/stripe_checkout/src/session/requests.rs b/generated/stripe_checkout/src/session/requests.rs index 1bb93735f..6b3f38cd5 100644 --- a/generated/stripe_checkout/src/session/requests.rs +++ b/generated/stripe_checkout/src/session/requests.rs @@ -7071,11 +7071,14 @@ impl<'a> ListLineItemsSession<'a> { pub fn send( &self, client: &stripe::Client, - session: &str, + session: &stripe_checkout::session::CheckoutSessionId, ) -> stripe::Response> { client.get_query(&format!("/checkout/sessions/{session}/line_items"), self) } - pub fn paginate(self, session: &str) -> stripe::ListPaginator { + pub fn paginate( + self, + session: &stripe_checkout::session::CheckoutSessionId, + ) -> stripe::ListPaginator { stripe::ListPaginator::from_params( &format!("/checkout/sessions/{session}/line_items"), self, @@ -7101,7 +7104,7 @@ impl<'a> ExpireSession<'a> { pub fn send( &self, client: &stripe::Client, - session: &str, + session: &stripe_checkout::session::CheckoutSessionId, ) -> stripe::Response { client.send_form( &format!("/checkout/sessions/{session}/expire"), diff --git a/generated/stripe_connect/src/account_capability/requests.rs b/generated/stripe_connect/src/account_capability/requests.rs index e14fc1d34..d22703f5c 100644 --- a/generated/stripe_connect/src/account_capability/requests.rs +++ b/generated/stripe_connect/src/account_capability/requests.rs @@ -45,7 +45,7 @@ impl<'a> RetrieveAccountCapability<'a> { &self, client: &stripe::Client, account: &stripe_types::account::AccountId, - capability: &stripe_types::account_capability::CapabilityId, + capability: &str, ) -> stripe::Response { client.get_query(&format!("/accounts/{account}/capabilities/{capability}"), self) } @@ -77,7 +77,7 @@ impl<'a> UpdateAccountCapability<'a> { &self, client: &stripe::Client, account: &stripe_types::account::AccountId, - capability: &stripe_types::account_capability::CapabilityId, + capability: &str, ) -> stripe::Response { client.send_form( &format!("/accounts/{account}/capabilities/{capability}"), diff --git a/generated/stripe_connect/src/country_spec/requests.rs b/generated/stripe_connect/src/country_spec/requests.rs index 03a903450..015b87693 100644 --- a/generated/stripe_connect/src/country_spec/requests.rs +++ b/generated/stripe_connect/src/country_spec/requests.rs @@ -55,7 +55,7 @@ impl<'a> RetrieveCountrySpec<'a> { pub fn send( &self, client: &stripe::Client, - country: &str, + country: &stripe_connect::country_spec::CountrySpecId, ) -> stripe::Response { client.get_query(&format!("/country_specs/{country}"), self) } diff --git a/generated/stripe_connect/src/fee_refund/requests.rs b/generated/stripe_connect/src/fee_refund/requests.rs index fc55336f0..0ebb56491 100644 --- a/generated/stripe_connect/src/fee_refund/requests.rs +++ b/generated/stripe_connect/src/fee_refund/requests.rs @@ -34,7 +34,7 @@ impl<'a> CreateFeeRefund<'a> { pub fn send( &self, client: &stripe::Client, - id: &stripe_types::fee_refund::FeeRefundId, + id: &stripe_types::platform_fee::ApplicationFeeId, ) -> stripe::Response { client.send_form(&format!("/application_fees/{id}/refunds"), self, http_types::Method::Post) } @@ -75,13 +75,13 @@ impl<'a> ListFeeRefund<'a> { pub fn send( &self, client: &stripe::Client, - id: &stripe_types::fee_refund::FeeRefundId, + id: &stripe_types::platform_fee::ApplicationFeeId, ) -> stripe::Response> { client.get_query(&format!("/application_fees/{id}/refunds"), self) } pub fn paginate( self, - id: &stripe_types::fee_refund::FeeRefundId, + id: &stripe_types::platform_fee::ApplicationFeeId, ) -> stripe::ListPaginator { stripe::ListPaginator::from_params(&format!("/application_fees/{id}/refunds"), self) } @@ -103,7 +103,7 @@ impl<'a> RetrieveFeeRefund<'a> { pub fn send( &self, client: &stripe::Client, - fee: &str, + fee: &stripe_types::platform_fee::ApplicationFeeId, id: &str, ) -> stripe::Response { client.get_query(&format!("/application_fees/{fee}/refunds/{id}"), self) @@ -134,7 +134,7 @@ impl<'a> UpdateFeeRefund<'a> { pub fn send( &self, client: &stripe::Client, - fee: &str, + fee: &stripe_types::platform_fee::ApplicationFeeId, id: &str, ) -> stripe::Response { client.send_form( diff --git a/generated/stripe_connect/src/person/requests.rs b/generated/stripe_connect/src/person/requests.rs index d83490f99..62293b4c0 100644 --- a/generated/stripe_connect/src/person/requests.rs +++ b/generated/stripe_connect/src/person/requests.rs @@ -89,7 +89,7 @@ impl<'a> RetrievePerson<'a> { &self, client: &stripe::Client, account: &stripe_types::account::AccountId, - person: &stripe_types::person::PersonId, + person: &str, ) -> stripe::Response { client.get_query(&format!("/accounts/{account}/persons/{person}"), self) } @@ -926,7 +926,7 @@ impl<'a> UpdatePerson<'a> { &self, client: &stripe::Client, account: &stripe_types::account::AccountId, - person: &stripe_types::person::PersonId, + person: &str, ) -> stripe::Response { client.send_form( &format!("/accounts/{account}/persons/{person}"), @@ -951,7 +951,7 @@ impl DeletePerson { &self, client: &stripe::Client, account: &stripe_types::account::AccountId, - person: &stripe_types::person::PersonId, + person: &str, ) -> stripe::Response { client.send_form( &format!("/accounts/{account}/persons/{person}"), diff --git a/generated/stripe_connect/src/transfer_reversal/requests.rs b/generated/stripe_connect/src/transfer_reversal/requests.rs index b78cc8285..a9359678c 100644 --- a/generated/stripe_connect/src/transfer_reversal/requests.rs +++ b/generated/stripe_connect/src/transfer_reversal/requests.rs @@ -45,7 +45,7 @@ impl<'a> CreateTransferReversal<'a> { pub fn send( &self, client: &stripe::Client, - id: &stripe_types::transfer_reversal::TransferReversalId, + id: &stripe_types::transfer::TransferId, ) -> stripe::Response { client.send_form(&format!("/transfers/{id}/reversals"), self, http_types::Method::Post) } @@ -86,13 +86,13 @@ impl<'a> ListTransferReversal<'a> { pub fn send( &self, client: &stripe::Client, - id: &stripe_types::transfer_reversal::TransferReversalId, + id: &stripe_types::transfer::TransferId, ) -> stripe::Response> { client.get_query(&format!("/transfers/{id}/reversals"), self) } pub fn paginate( self, - id: &stripe_types::transfer_reversal::TransferReversalId, + id: &stripe_types::transfer::TransferId, ) -> stripe::ListPaginator { stripe::ListPaginator::from_params(&format!("/transfers/{id}/reversals"), self) } diff --git a/generated/stripe_core/src/customer/requests.rs b/generated/stripe_core/src/customer/requests.rs index c914c04f2..702055f0f 100644 --- a/generated/stripe_core/src/customer/requests.rs +++ b/generated/stripe_core/src/customer/requests.rs @@ -1587,7 +1587,7 @@ impl<'a> RetrievePaymentMethodCustomer<'a> { &self, client: &stripe::Client, customer: &stripe_types::customer::CustomerId, - payment_method: &stripe_types::payment_method::PaymentMethodId, + payment_method: &str, ) -> stripe::Response { client.get_query(&format!("/customers/{customer}/payment_methods/{payment_method}"), self) } @@ -1670,7 +1670,7 @@ impl<'a> FundCashBalanceCustomer<'a> { pub fn send( &self, client: &stripe::Client, - customer: &stripe_types::customer::CustomerId, + customer: &str, ) -> stripe::Response { client.send_form( &format!("/test_helpers/customers/{customer}/fund_cash_balance"), diff --git a/generated/stripe_core/src/file_link/requests.rs b/generated/stripe_core/src/file_link/requests.rs index 8a69ad4a2..c3537f071 100644 --- a/generated/stripe_core/src/file_link/requests.rs +++ b/generated/stripe_core/src/file_link/requests.rs @@ -14,7 +14,7 @@ impl<'a> RetrieveFileLink<'a> { pub fn send( &self, client: &stripe::Client, - link: &str, + link: &stripe_types::file_link::FileLinkId, ) -> stripe::Response { client.get_query(&format!("/file_links/{link}"), self) } @@ -90,7 +90,7 @@ impl<'a> UpdateFileLink<'a> { pub fn send( &self, client: &stripe::Client, - link: &str, + link: &stripe_types::file_link::FileLinkId, ) -> stripe::Response { client.send_form(&format!("/file_links/{link}"), self, http_types::Method::Post) } diff --git a/generated/stripe_core/src/payment_intent/requests.rs b/generated/stripe_core/src/payment_intent/requests.rs index e301f17be..cc5155995 100644 --- a/generated/stripe_core/src/payment_intent/requests.rs +++ b/generated/stripe_core/src/payment_intent/requests.rs @@ -6944,7 +6944,7 @@ impl<'a> RetrievePaymentIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::payment_intent::PaymentIntentId, ) -> stripe::Response { client.get_query(&format!("/payment_intents/{intent}"), self) } @@ -13355,7 +13355,7 @@ impl<'a> UpdatePaymentIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::payment_intent::PaymentIntentId, ) -> stripe::Response { client.send_form(&format!("/payment_intents/{intent}"), self, http_types::Method::Post) } @@ -19952,7 +19952,7 @@ impl<'a> ConfirmPaymentIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::payment_intent::PaymentIntentId, ) -> stripe::Response { client.send_form( &format!("/payment_intents/{intent}/confirm"), @@ -20046,7 +20046,7 @@ impl<'a> CancelPaymentIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::payment_intent::PaymentIntentId, ) -> stripe::Response { client.send_form( &format!("/payment_intents/{intent}/cancel"), @@ -20132,7 +20132,7 @@ impl<'a> CapturePaymentIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::payment_intent::PaymentIntentId, ) -> stripe::Response { client.send_form( &format!("/payment_intents/{intent}/capture"), @@ -20215,7 +20215,7 @@ impl<'a> IncrementAuthorizationPaymentIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::payment_intent::PaymentIntentId, ) -> stripe::Response { client.send_form( &format!("/payment_intents/{intent}/increment_authorization"), @@ -20246,7 +20246,7 @@ impl<'a> VerifyMicrodepositsPaymentIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::payment_intent::PaymentIntentId, ) -> stripe::Response { client.send_form( &format!("/payment_intents/{intent}/verify_microdeposits"), @@ -20285,7 +20285,7 @@ impl<'a> ApplyCustomerBalancePaymentIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::payment_intent::PaymentIntentId, ) -> stripe::Response { client.send_form( &format!("/payment_intents/{intent}/apply_customer_balance"), diff --git a/generated/stripe_core/src/refund/requests.rs b/generated/stripe_core/src/refund/requests.rs index 32b84fc16..edb88c551 100644 --- a/generated/stripe_core/src/refund/requests.rs +++ b/generated/stripe_core/src/refund/requests.rs @@ -320,7 +320,7 @@ impl<'a> ExpireRefund<'a> { pub fn send( &self, client: &stripe::Client, - refund: &stripe_types::refund::RefundId, + refund: &str, ) -> stripe::Response { client.send_form( &format!("/test_helpers/refunds/{refund}/expire"), diff --git a/generated/stripe_core/src/setup_intent/requests.rs b/generated/stripe_core/src/setup_intent/requests.rs index 533e0d477..4cf970b2b 100644 --- a/generated/stripe_core/src/setup_intent/requests.rs +++ b/generated/stripe_core/src/setup_intent/requests.rs @@ -2831,7 +2831,7 @@ impl<'a> RetrieveSetupIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::setup_intent::SetupIntentId, ) -> stripe::Response { client.get_query(&format!("/setup_intents/{intent}"), self) } @@ -5295,7 +5295,7 @@ impl<'a> UpdateSetupIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::setup_intent::SetupIntentId, ) -> stripe::Response { client.send_form(&format!("/setup_intents/{intent}"), self, http_types::Method::Post) } @@ -7881,7 +7881,7 @@ impl<'a> ConfirmSetupIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::setup_intent::SetupIntentId, ) -> stripe::Response { client.send_form( &format!("/setup_intents/{intent}/confirm"), @@ -7969,7 +7969,7 @@ impl<'a> CancelSetupIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::setup_intent::SetupIntentId, ) -> stripe::Response { client.send_form(&format!("/setup_intents/{intent}/cancel"), self, http_types::Method::Post) } @@ -7996,7 +7996,7 @@ impl<'a> VerifyMicrodepositsSetupIntent<'a> { pub fn send( &self, client: &stripe::Client, - intent: &str, + intent: &stripe_types::setup_intent::SetupIntentId, ) -> stripe::Response { client.send_form( &format!("/setup_intents/{intent}/verify_microdeposits"), diff --git a/generated/stripe_fraud/src/radar_early_fraud_warning/requests.rs b/generated/stripe_fraud/src/radar_early_fraud_warning/requests.rs index 2a0f1cff8..68b6f8db6 100644 --- a/generated/stripe_fraud/src/radar_early_fraud_warning/requests.rs +++ b/generated/stripe_fraud/src/radar_early_fraud_warning/requests.rs @@ -63,7 +63,7 @@ impl<'a> RetrieveRadarEarlyFraudWarning<'a> { pub fn send( &self, client: &stripe::Client, - early_fraud_warning: &str, + early_fraud_warning: &stripe_fraud::radar_early_fraud_warning::RadarEarlyFraudWarningId, ) -> stripe::Response { client.get_query(&format!("/radar/early_fraud_warnings/{early_fraud_warning}"), self) } diff --git a/generated/stripe_fraud/src/radar_list_list/requests.rs b/generated/stripe_fraud/src/radar_list_list/requests.rs index 37fe548e1..19c872250 100644 --- a/generated/stripe_fraud/src/radar_list_list/requests.rs +++ b/generated/stripe_fraud/src/radar_list_list/requests.rs @@ -65,7 +65,7 @@ impl<'a> RetrieveRadarListList<'a> { pub fn send( &self, client: &stripe::Client, - value_list: &str, + value_list: &stripe_fraud::radar_list_list::RadarValueListId, ) -> stripe::Response { client.get_query(&format!("/radar/value_lists/{value_list}"), self) } @@ -220,7 +220,7 @@ impl<'a> UpdateRadarListList<'a> { pub fn send( &self, client: &stripe::Client, - value_list: &str, + value_list: &stripe_fraud::radar_list_list::RadarValueListId, ) -> stripe::Response { client.send_form( &format!("/radar/value_lists/{value_list}"), @@ -243,7 +243,7 @@ impl DeleteRadarListList { pub fn send( &self, client: &stripe::Client, - value_list: &str, + value_list: &stripe_fraud::radar_list_list::RadarValueListId, ) -> stripe::Response { client.send_form( &format!("/radar/value_lists/{value_list}"), diff --git a/generated/stripe_fraud/src/radar_list_list_item/requests.rs b/generated/stripe_fraud/src/radar_list_list_item/requests.rs index 67e193ee5..6f619930e 100644 --- a/generated/stripe_fraud/src/radar_list_list_item/requests.rs +++ b/generated/stripe_fraud/src/radar_list_list_item/requests.rs @@ -72,7 +72,7 @@ impl<'a> RetrieveRadarListListItem<'a> { pub fn send( &self, client: &stripe::Client, - item: &stripe_types::line_item::ItemId, + item: &stripe_fraud::radar_list_list_item::RadarValueListItemId, ) -> stripe::Response { client.get_query(&format!("/radar/value_list_items/{item}"), self) } @@ -113,7 +113,7 @@ impl DeleteRadarListListItem { pub fn send( &self, client: &stripe::Client, - item: &stripe_types::line_item::ItemId, + item: &stripe_fraud::radar_list_list_item::RadarValueListItemId, ) -> stripe::Response { client.send_form( &format!("/radar/value_list_items/{item}"), diff --git a/generated/stripe_issuing/src/issuing_authorization/requests.rs b/generated/stripe_issuing/src/issuing_authorization/requests.rs index f0fd7381b..d1751f2a1 100644 --- a/generated/stripe_issuing/src/issuing_authorization/requests.rs +++ b/generated/stripe_issuing/src/issuing_authorization/requests.rs @@ -127,7 +127,7 @@ impl<'a> RetrieveIssuingAuthorization<'a> { pub fn send( &self, client: &stripe::Client, - authorization: &str, + authorization: &stripe_types::issuing_authorization::IssuingAuthorizationId, ) -> stripe::Response { client.get_query(&format!("/issuing/authorizations/{authorization}"), self) } @@ -157,7 +157,7 @@ impl<'a> UpdateIssuingAuthorization<'a> { pub fn send( &self, client: &stripe::Client, - authorization: &str, + authorization: &stripe_types::issuing_authorization::IssuingAuthorizationId, ) -> stripe::Response { client.send_form( &format!("/issuing/authorizations/{authorization}"), @@ -198,7 +198,7 @@ impl<'a> ApproveIssuingAuthorization<'a> { pub fn send( &self, client: &stripe::Client, - authorization: &str, + authorization: &stripe_types::issuing_authorization::IssuingAuthorizationId, ) -> stripe::Response { client.send_form( &format!("/issuing/authorizations/{authorization}/approve"), @@ -233,7 +233,7 @@ impl<'a> DeclineIssuingAuthorization<'a> { pub fn send( &self, client: &stripe::Client, - authorization: &str, + authorization: &stripe_types::issuing_authorization::IssuingAuthorizationId, ) -> stripe::Response { client.send_form( &format!("/issuing/authorizations/{authorization}/decline"), diff --git a/generated/stripe_issuing/src/issuing_card/requests.rs b/generated/stripe_issuing/src/issuing_card/requests.rs index d8e786190..d0bdcce59 100644 --- a/generated/stripe_issuing/src/issuing_card/requests.rs +++ b/generated/stripe_issuing/src/issuing_card/requests.rs @@ -3806,7 +3806,7 @@ impl<'a> RetrieveIssuingCard<'a> { pub fn send( &self, client: &stripe::Client, - card: &stripe_types::card::CardId, + card: &stripe_types::issuing_card::IssuingCardId, ) -> stripe::Response { client.get_query(&format!("/issuing/cards/{card}"), self) } @@ -7171,7 +7171,7 @@ impl<'a> UpdateIssuingCard<'a> { pub fn send( &self, client: &stripe::Client, - card: &stripe_types::card::CardId, + card: &stripe_types::issuing_card::IssuingCardId, ) -> stripe::Response { client.send_form(&format!("/issuing/cards/{card}"), self, http_types::Method::Post) } @@ -7192,7 +7192,7 @@ impl<'a> DeliverCardIssuingCard<'a> { pub fn send( &self, client: &stripe::Client, - card: &stripe_types::card::CardId, + card: &str, ) -> stripe::Response { client.send_form( &format!("/test_helpers/issuing/cards/{card}/shipping/deliver"), @@ -7217,7 +7217,7 @@ impl<'a> ShipCardIssuingCard<'a> { pub fn send( &self, client: &stripe::Client, - card: &stripe_types::card::CardId, + card: &str, ) -> stripe::Response { client.send_form( &format!("/test_helpers/issuing/cards/{card}/shipping/ship"), @@ -7242,7 +7242,7 @@ impl<'a> ReturnCardIssuingCard<'a> { pub fn send( &self, client: &stripe::Client, - card: &stripe_types::card::CardId, + card: &str, ) -> stripe::Response { client.send_form( &format!("/test_helpers/issuing/cards/{card}/shipping/return"), @@ -7267,7 +7267,7 @@ impl<'a> FailCardIssuingCard<'a> { pub fn send( &self, client: &stripe::Client, - card: &stripe_types::card::CardId, + card: &str, ) -> stripe::Response { client.send_form( &format!("/test_helpers/issuing/cards/{card}/shipping/fail"), diff --git a/generated/stripe_issuing/src/issuing_cardholder/requests.rs b/generated/stripe_issuing/src/issuing_cardholder/requests.rs index 0ad75a659..7ce9a1b31 100644 --- a/generated/stripe_issuing/src/issuing_cardholder/requests.rs +++ b/generated/stripe_issuing/src/issuing_cardholder/requests.rs @@ -3804,7 +3804,7 @@ impl<'a> RetrieveIssuingCardholder<'a> { pub fn send( &self, client: &stripe::Client, - cardholder: &str, + cardholder: &stripe_types::issuing_cardholder::IssuingCardholderId, ) -> stripe::Response { client.get_query(&format!("/issuing/cardholders/{cardholder}"), self) } @@ -7343,7 +7343,7 @@ impl<'a> UpdateIssuingCardholder<'a> { pub fn send( &self, client: &stripe::Client, - cardholder: &str, + cardholder: &stripe_types::issuing_cardholder::IssuingCardholderId, ) -> stripe::Response { client.send_form( &format!("/issuing/cardholders/{cardholder}"), diff --git a/generated/stripe_issuing/src/issuing_dispute/requests.rs b/generated/stripe_issuing/src/issuing_dispute/requests.rs index 73bc3e1cd..e338f92fa 100644 --- a/generated/stripe_issuing/src/issuing_dispute/requests.rs +++ b/generated/stripe_issuing/src/issuing_dispute/requests.rs @@ -1273,7 +1273,7 @@ impl<'a> UpdateIssuingDispute<'a> { pub fn send( &self, client: &stripe::Client, - dispute: &stripe_types::dispute::DisputeId, + dispute: &stripe_types::issuing_dispute::IssuingDisputeId, ) -> stripe::Response { client.send_form(&format!("/issuing/disputes/{dispute}"), self, http_types::Method::Post) } @@ -1294,7 +1294,7 @@ impl<'a> RetrieveIssuingDispute<'a> { pub fn send( &self, client: &stripe::Client, - dispute: &stripe_types::dispute::DisputeId, + dispute: &stripe_types::issuing_dispute::IssuingDisputeId, ) -> stripe::Response { client.get_query(&format!("/issuing/disputes/{dispute}"), self) } @@ -1325,7 +1325,7 @@ impl<'a> SubmitIssuingDispute<'a> { pub fn send( &self, client: &stripe::Client, - dispute: &stripe_types::dispute::DisputeId, + dispute: &stripe_types::issuing_dispute::IssuingDisputeId, ) -> stripe::Response { client.send_form( &format!("/issuing/disputes/{dispute}/submit"), diff --git a/generated/stripe_issuing/src/issuing_transaction/requests.rs b/generated/stripe_issuing/src/issuing_transaction/requests.rs index 9db355f07..9b694ab6a 100644 --- a/generated/stripe_issuing/src/issuing_transaction/requests.rs +++ b/generated/stripe_issuing/src/issuing_transaction/requests.rs @@ -125,7 +125,7 @@ impl<'a> RetrieveIssuingTransaction<'a> { pub fn send( &self, client: &stripe::Client, - transaction: &str, + transaction: &stripe_types::issuing_transaction::IssuingTransactionId, ) -> stripe::Response { client.get_query(&format!("/issuing/transactions/{transaction}"), self) } @@ -155,7 +155,7 @@ impl<'a> UpdateIssuingTransaction<'a> { pub fn send( &self, client: &stripe::Client, - transaction: &str, + transaction: &stripe_types::issuing_transaction::IssuingTransactionId, ) -> stripe::Response { client.send_form( &format!("/issuing/transactions/{transaction}"), diff --git a/generated/stripe_misc/src/bank_connections_resource_link_account_session/requests.rs b/generated/stripe_misc/src/bank_connections_resource_link_account_session/requests.rs index 495f2b3e3..256a12c64 100644 --- a/generated/stripe_misc/src/bank_connections_resource_link_account_session/requests.rs +++ b/generated/stripe_misc/src/bank_connections_resource_link_account_session/requests.rs @@ -257,7 +257,7 @@ impl<'a> RetrieveBankConnectionsResourceLinkAccountSession<'a> { pub fn send( &self, client: &stripe::Client, - session: &str, + session:&stripe_misc::bank_connections_resource_link_account_session::FinancialConnectionsSessionId, ) -> stripe::Response { client.get_query(&format!("/financial_connections/sessions/{session}"), self) } diff --git a/generated/stripe_misc/src/bank_connections_resource_linked_account/requests.rs b/generated/stripe_misc/src/bank_connections_resource_linked_account/requests.rs index 0105b42c8..7bc873bf0 100644 --- a/generated/stripe_misc/src/bank_connections_resource_linked_account/requests.rs +++ b/generated/stripe_misc/src/bank_connections_resource_linked_account/requests.rs @@ -83,7 +83,7 @@ impl<'a> RetrieveBankConnectionsResourceLinkedAccount<'a> { pub fn send( &self, client: &stripe::Client, - account: &stripe_types::account::AccountId, + account:&stripe_misc::bank_connections_resource_linked_account::FinancialConnectionsAccountId, ) -> stripe::Response { client.get_query(&format!("/financial_connections/accounts/{account}"), self) } @@ -129,13 +129,13 @@ impl<'a> ListOwnersBankConnectionsResourceLinkedAccount<'a> { pub fn send( &self, client: &stripe::Client, - account: &stripe_types::account::AccountId, + account:&stripe_misc::bank_connections_resource_linked_account::FinancialConnectionsAccountId, ) -> stripe::Response> { client.get_query(&format!("/financial_connections/accounts/{account}/owners"), self) } pub fn paginate( self, - account: &stripe_types::account::AccountId, + account:&stripe_misc::bank_connections_resource_linked_account::FinancialConnectionsAccountId, ) -> stripe::ListPaginator { stripe::ListPaginator::from_params( &format!("/financial_connections/accounts/{account}/owners"), @@ -213,7 +213,7 @@ impl<'a> RefreshBankConnectionsResourceLinkedAccount<'a> { pub fn send( &self, client: &stripe::Client, - account: &stripe_types::account::AccountId, + account:&stripe_misc::bank_connections_resource_linked_account::FinancialConnectionsAccountId, ) -> stripe::Response { client.send_form( &format!("/financial_connections/accounts/{account}/refresh"), @@ -241,7 +241,7 @@ impl<'a> DisconnectBankConnectionsResourceLinkedAccount<'a> { pub fn send( &self, client: &stripe::Client, - account: &stripe_types::account::AccountId, + account:&stripe_misc::bank_connections_resource_linked_account::FinancialConnectionsAccountId, ) -> stripe::Response { client.send_form( &format!("/financial_connections/accounts/{account}/disconnect"), diff --git a/generated/stripe_misc/src/ephemeral_key/requests.rs b/generated/stripe_misc/src/ephemeral_key/requests.rs index 285aff889..d234586c9 100644 --- a/generated/stripe_misc/src/ephemeral_key/requests.rs +++ b/generated/stripe_misc/src/ephemeral_key/requests.rs @@ -43,7 +43,7 @@ impl<'a> DeleteEphemeralKey<'a> { pub fn send( &self, client: &stripe::Client, - key: &str, + key: &stripe_misc::ephemeral_key::EphemeralKeyId, ) -> stripe::Response { client.send_form(&format!("/ephemeral_keys/{key}"), self, http_types::Method::Delete) } diff --git a/generated/stripe_misc/src/exchange_rate/requests.rs b/generated/stripe_misc/src/exchange_rate/requests.rs index 01298f84e..4bc088832 100644 --- a/generated/stripe_misc/src/exchange_rate/requests.rs +++ b/generated/stripe_misc/src/exchange_rate/requests.rs @@ -57,7 +57,7 @@ impl<'a> RetrieveExchangeRate<'a> { pub fn send( &self, client: &stripe::Client, - rate_id: &str, + rate_id: &stripe_misc::exchange_rate::ExchangeRateId, ) -> stripe::Response { client.get_query(&format!("/exchange_rates/{rate_id}"), self) } diff --git a/generated/stripe_misc/src/gelato_verification_report/requests.rs b/generated/stripe_misc/src/gelato_verification_report/requests.rs index b96dc560c..33f40c5e5 100644 --- a/generated/stripe_misc/src/gelato_verification_report/requests.rs +++ b/generated/stripe_misc/src/gelato_verification_report/requests.rs @@ -14,7 +14,7 @@ impl<'a> RetrieveGelatoVerificationReport<'a> { pub fn send( &self, client: &stripe::Client, - report: &str, + report: &stripe_misc::gelato_verification_report::IdentityVerificationReportId, ) -> stripe::Response { client.get_query(&format!("/identity/verification_reports/{report}"), self) } diff --git a/generated/stripe_misc/src/gelato_verification_session/requests.rs b/generated/stripe_misc/src/gelato_verification_session/requests.rs index e8305876a..368bcecb2 100644 --- a/generated/stripe_misc/src/gelato_verification_session/requests.rs +++ b/generated/stripe_misc/src/gelato_verification_session/requests.rs @@ -209,7 +209,7 @@ impl<'a> RetrieveGelatoVerificationSession<'a> { pub fn send( &self, client: &stripe::Client, - session: &str, + session: &stripe_misc::gelato_verification_session::IdentityVerificationSessionId, ) -> stripe::Response { client.get_query(&format!("/identity/verification_sessions/{session}"), self) } @@ -342,7 +342,7 @@ impl<'a> CancelGelatoVerificationSession<'a> { pub fn send( &self, client: &stripe::Client, - session: &str, + session: &stripe_misc::gelato_verification_session::IdentityVerificationSessionId, ) -> stripe::Response { client.send_form( &format!("/identity/verification_sessions/{session}/cancel"), @@ -374,7 +374,7 @@ impl<'a> RedactGelatoVerificationSession<'a> { pub fn send( &self, client: &stripe::Client, - session: &str, + session: &stripe_misc::gelato_verification_session::IdentityVerificationSessionId, ) -> stripe::Response { client.send_form( &format!("/identity/verification_sessions/{session}/redact"), @@ -560,7 +560,7 @@ impl<'a> UpdateGelatoVerificationSession<'a> { pub fn send( &self, client: &stripe::Client, - session: &str, + session: &stripe_misc::gelato_verification_session::IdentityVerificationSessionId, ) -> stripe::Response { client.send_form( &format!("/identity/verification_sessions/{session}"), diff --git a/generated/stripe_misc/src/reporting_report_run/requests.rs b/generated/stripe_misc/src/reporting_report_run/requests.rs index 1832870d0..5d8a69092 100644 --- a/generated/stripe_misc/src/reporting_report_run/requests.rs +++ b/generated/stripe_misc/src/reporting_report_run/requests.rs @@ -14,7 +14,7 @@ impl<'a> RetrieveReportingReportRun<'a> { pub fn send( &self, client: &stripe::Client, - report_run: &str, + report_run: &stripe_misc::reporting_report_run::ReportingReportRunId, ) -> stripe::Response { client.get_query(&format!("/reporting/report_runs/{report_run}"), self) } diff --git a/generated/stripe_misc/src/reporting_report_type/requests.rs b/generated/stripe_misc/src/reporting_report_type/requests.rs index c7ea41626..8eaa1d97d 100644 --- a/generated/stripe_misc/src/reporting_report_type/requests.rs +++ b/generated/stripe_misc/src/reporting_report_type/requests.rs @@ -16,7 +16,7 @@ impl<'a> RetrieveReportingReportType<'a> { pub fn send( &self, client: &stripe::Client, - report_type: &str, + report_type: &stripe_misc::reporting_report_type::ReportingReportTypeId, ) -> stripe::Response { client.get_query(&format!("/reporting/report_types/{report_type}"), self) } diff --git a/generated/stripe_misc/src/scheduled_query_run/requests.rs b/generated/stripe_misc/src/scheduled_query_run/requests.rs index f70621f85..5169dd025 100644 --- a/generated/stripe_misc/src/scheduled_query_run/requests.rs +++ b/generated/stripe_misc/src/scheduled_query_run/requests.rs @@ -55,7 +55,7 @@ impl<'a> RetrieveScheduledQueryRun<'a> { pub fn send( &self, client: &stripe::Client, - scheduled_query_run: &stripe_misc::scheduled_query_run::ScheduledQueryRunId, + scheduled_query_run: &str, ) -> stripe::Response { client.get_query(&format!("/sigma/scheduled_query_runs/{scheduled_query_run}"), self) } diff --git a/generated/stripe_misc/src/tax_product_resource_tax_calculation/requests.rs b/generated/stripe_misc/src/tax_product_resource_tax_calculation/requests.rs index 89cdfe9e7..ddaa58177 100644 --- a/generated/stripe_misc/src/tax_product_resource_tax_calculation/requests.rs +++ b/generated/stripe_misc/src/tax_product_resource_tax_calculation/requests.rs @@ -704,14 +704,14 @@ impl<'a> ListLineItemsTaxProductResourceTaxCalculation<'a> { pub fn send( &self, client: &stripe::Client, - calculation: &str, + calculation: &stripe_misc::tax_product_resource_tax_calculation::TaxCalculationId, ) -> stripe::Response> { client.get_query(&format!("/tax/calculations/{calculation}/line_items"), self) } pub fn paginate( self, - calculation: &str, + calculation: &stripe_misc::tax_product_resource_tax_calculation::TaxCalculationId, ) -> stripe::ListPaginator { stripe::ListPaginator::from_params( &format!("/tax/calculations/{calculation}/line_items"), diff --git a/generated/stripe_misc/src/tax_product_resource_tax_transaction/requests.rs b/generated/stripe_misc/src/tax_product_resource_tax_transaction/requests.rs index 592b1914e..1ab77a880 100644 --- a/generated/stripe_misc/src/tax_product_resource_tax_transaction/requests.rs +++ b/generated/stripe_misc/src/tax_product_resource_tax_transaction/requests.rs @@ -14,7 +14,7 @@ impl<'a> RetrieveTaxProductResourceTaxTransaction<'a> { pub fn send( &self, client: &stripe::Client, - transaction: &str, + transaction: &stripe_misc::tax_product_resource_tax_transaction::TaxTransactionId, ) -> stripe::Response { client.get_query(&format!("/tax/transactions/{transaction}"), self) } @@ -255,14 +255,14 @@ impl<'a> ListLineItemsTaxProductResourceTaxTransaction<'a> { pub fn send( &self, client: &stripe::Client, - transaction: &str, + transaction: &stripe_misc::tax_product_resource_tax_transaction::TaxTransactionId, ) -> stripe::Response> { client.get_query(&format!("/tax/transactions/{transaction}/line_items"), self) } pub fn paginate( self, - transaction: &str, + transaction: &stripe_misc::tax_product_resource_tax_transaction::TaxTransactionId, ) -> stripe::ListPaginator { stripe::ListPaginator::from_params( &format!("/tax/transactions/{transaction}/line_items"), diff --git a/generated/stripe_payment/src/payment_method_config_resource_payment_method_configuration/requests.rs b/generated/stripe_payment/src/payment_method_config_resource_payment_method_configuration/requests.rs index f51143be1..0a7c9f36f 100644 --- a/generated/stripe_payment/src/payment_method_config_resource_payment_method_configuration/requests.rs +++ b/generated/stripe_payment/src/payment_method_config_resource_payment_method_configuration/requests.rs @@ -49,7 +49,7 @@ impl<'a> RetrievePaymentMethodConfigResourcePaymentMethodConfiguration<'a> { pub fn send( &self, client: &stripe::Client, - configuration: &str, + configuration:&stripe_payment::payment_method_config_resource_payment_method_configuration::PaymentMethodConfigurationId, ) -> stripe::Response { client.get_query(&format!("/payment_method_configurations/{configuration}"), self) @@ -3184,7 +3184,7 @@ impl<'a> UpdatePaymentMethodConfigResourcePaymentMethodConfiguration<'a> { pub fn send( &self, client: &stripe::Client, - configuration: &str, + configuration:&stripe_payment::payment_method_config_resource_payment_method_configuration::PaymentMethodConfigurationId, ) -> stripe::Response { client.send_form( diff --git a/generated/stripe_product/src/shipping_rate/requests.rs b/generated/stripe_product/src/shipping_rate/requests.rs index f80bc652b..291abd1ef 100644 --- a/generated/stripe_product/src/shipping_rate/requests.rs +++ b/generated/stripe_product/src/shipping_rate/requests.rs @@ -66,7 +66,7 @@ impl<'a> RetrieveShippingRate<'a> { pub fn send( &self, client: &stripe::Client, - shipping_rate_token: &str, + shipping_rate_token: &stripe_types::shipping_rate::ShippingRateId, ) -> stripe::Response { client.get_query(&format!("/shipping_rates/{shipping_rate_token}"), self) } @@ -702,7 +702,7 @@ impl<'a> UpdateShippingRate<'a> { pub fn send( &self, client: &stripe::Client, - shipping_rate_token: &str, + shipping_rate_token: &stripe_types::shipping_rate::ShippingRateId, ) -> stripe::Response { client.send_form( &format!("/shipping_rates/{shipping_rate_token}"), diff --git a/generated/stripe_terminal/src/terminal_configuration_configuration/requests.rs b/generated/stripe_terminal/src/terminal_configuration_configuration/requests.rs index ce66269da..d251cef43 100644 --- a/generated/stripe_terminal/src/terminal_configuration_configuration/requests.rs +++ b/generated/stripe_terminal/src/terminal_configuration_configuration/requests.rs @@ -433,7 +433,7 @@ impl<'a> RetrieveTerminalConfigurationConfiguration<'a> { pub fn send( &self, client: &stripe::Client, - configuration: &str, + configuration:&stripe_terminal::terminal_configuration_configuration::TerminalConfigurationId, ) -> stripe::Response { client.get_query(&format!("/terminal/configurations/{configuration}"), self) } @@ -814,7 +814,7 @@ impl<'a> UpdateTerminalConfigurationConfiguration<'a> { pub fn send( &self, client: &stripe::Client, - configuration: &str, + configuration:&stripe_terminal::terminal_configuration_configuration::TerminalConfigurationId, ) -> stripe::Response { client.send_form( &format!("/terminal/configurations/{configuration}"), @@ -843,7 +843,7 @@ impl DeleteTerminalConfigurationConfiguration { pub fn send( &self, client: &stripe::Client, - configuration: &str, + configuration:&stripe_terminal::terminal_configuration_configuration::TerminalConfigurationId, ) -> stripe::Response { client.send_form( &format!("/terminal/configurations/{configuration}"), diff --git a/generated/stripe_terminal/src/terminal_location_location/requests.rs b/generated/stripe_terminal/src/terminal_location_location/requests.rs index e4398cf5b..39681595e 100644 --- a/generated/stripe_terminal/src/terminal_location_location/requests.rs +++ b/generated/stripe_terminal/src/terminal_location_location/requests.rs @@ -14,7 +14,7 @@ impl<'a> RetrieveTerminalLocationLocation<'a> { pub fn send( &self, client: &stripe::Client, - location: &str, + location: &stripe_terminal::terminal_location_location::TerminalLocationId, ) -> stripe::Response { client.get_query(&format!("/terminal/locations/{location}"), self) } @@ -160,7 +160,7 @@ impl<'a> UpdateTerminalLocationLocation<'a> { pub fn send( &self, client: &stripe::Client, - location: &str, + location: &stripe_terminal::terminal_location_location::TerminalLocationId, ) -> stripe::Response { client.send_form(&format!("/terminal/locations/{location}"), self, http_types::Method::Post) } @@ -224,7 +224,7 @@ impl DeleteTerminalLocationLocation { pub fn send( &self, client: &stripe::Client, - location: &str, + location: &stripe_terminal::terminal_location_location::TerminalLocationId, ) -> stripe::Response { client.send_form( &format!("/terminal/locations/{location}"), diff --git a/generated/stripe_terminal/src/terminal_reader_reader/requests.rs b/generated/stripe_terminal/src/terminal_reader_reader/requests.rs index 3662438bd..cc37046c7 100644 --- a/generated/stripe_terminal/src/terminal_reader_reader/requests.rs +++ b/generated/stripe_terminal/src/terminal_reader_reader/requests.rs @@ -23,7 +23,11 @@ impl<'a> UpdateTerminalReaderReader<'a> { /// Updates a `Reader` object by setting the values of the parameters passed. /// /// Any parameters not provided will be left unchanged. - pub fn send(&self, client: &stripe::Client, reader: &str) -> stripe::Response { + pub fn send( + &self, + client: &stripe::Client, + reader: &stripe_terminal::terminal_reader_reader::TerminalReaderId, + ) -> stripe::Response { client.send_form(&format!("/terminal/readers/{reader}"), self, http_types::Method::Post) } } @@ -49,7 +53,7 @@ impl<'a> RetrieveTerminalReaderReader<'a> { pub fn send( &self, client: &stripe::Client, - reader: &str, + reader: &stripe_terminal::terminal_reader_reader::TerminalReaderId, ) -> stripe::Response { client.get_query(&format!("/terminal/readers/{reader}"), self) } @@ -282,7 +286,7 @@ impl DeleteTerminalReaderReader { pub fn send( &self, client: &stripe::Client, - reader: &str, + reader: &stripe_terminal::terminal_reader_reader::TerminalReaderId, ) -> stripe::Response { client.send_form(&format!("/terminal/readers/{reader}"), self, http_types::Method::Delete) } @@ -337,7 +341,7 @@ impl<'a> ProcessPaymentIntentTerminalReaderReader<'a> { pub fn send( &self, client: &stripe::Client, - reader: &str, + reader: &stripe_terminal::terminal_reader_reader::TerminalReaderId, ) -> stripe::Response { client.send_form( &format!("/terminal/readers/{reader}/process_payment_intent"), @@ -374,7 +378,7 @@ impl<'a> ProcessSetupIntentTerminalReaderReader<'a> { pub fn send( &self, client: &stripe::Client, - reader: &str, + reader: &stripe_terminal::terminal_reader_reader::TerminalReaderId, ) -> stripe::Response { client.send_form( &format!("/terminal/readers/{reader}/process_setup_intent"), @@ -399,7 +403,7 @@ impl<'a> CancelActionTerminalReaderReader<'a> { pub fn send( &self, client: &stripe::Client, - reader: &str, + reader: &stripe_terminal::terminal_reader_reader::TerminalReaderId, ) -> stripe::Response { client.send_form( &format!("/terminal/readers/{reader}/cancel_action"), @@ -517,7 +521,7 @@ impl<'a> SetReaderDisplayTerminalReaderReader<'a> { pub fn send( &self, client: &stripe::Client, - reader: &str, + reader: &stripe_terminal::terminal_reader_reader::TerminalReaderId, ) -> stripe::Response { client.send_form( &format!("/terminal/readers/{reader}/set_reader_display"), @@ -571,7 +575,7 @@ impl<'a> RefundPaymentTerminalReaderReader<'a> { pub fn send( &self, client: &stripe::Client, - reader: &str, + reader: &stripe_terminal::terminal_reader_reader::TerminalReaderId, ) -> stripe::Response { client.send_form( &format!("/terminal/readers/{reader}/refund_payment"), diff --git a/generated/stripe_treasury/src/treasury_financial_accounts_resource_financial_account/requests.rs b/generated/stripe_treasury/src/treasury_financial_accounts_resource_financial_account/requests.rs index b1cf8e79e..c73018675 100644 --- a/generated/stripe_treasury/src/treasury_financial_accounts_resource_financial_account/requests.rs +++ b/generated/stripe_treasury/src/treasury_financial_accounts_resource_financial_account/requests.rs @@ -674,7 +674,7 @@ impl serde::Serialize for UpdateTreasuryFinancialAccountsResourceFinancialAccoun } impl<'a> UpdateTreasuryFinancialAccountsResourceFinancialAccount<'a> { /// Updates the details of a FinancialAccount. - pub fn send(&self, client: &stripe::Client, financial_account: &str) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, financial_account: &stripe_treasury::treasury_financial_accounts_resource_financial_account::TreasuryFinancialAccountId) -> stripe::Response { client.send_form(&format!("/treasury/financial_accounts/{financial_account}"), self, http_types::Method::Post) } } @@ -869,7 +869,11 @@ impl UpdateFeaturesTreasuryFinancialAccountsResourceFinancialAccountOutboundTran } impl<'a> UpdateFeaturesTreasuryFinancialAccountsResourceFinancialAccount<'a> { /// Updates the Features associated with a FinancialAccount. - pub fn send(&self, client: &stripe::Client, financial_account: &str) -> stripe::Response { + pub fn send( + &self, + client: &stripe::Client, + financial_account: &stripe_treasury::treasury_financial_accounts_resource_financial_account::TreasuryFinancialAccountId, + ) -> stripe::Response { client.send_form(&format!("/treasury/financial_accounts/{financial_account}/features"), self, http_types::Method::Post) } } @@ -918,7 +922,7 @@ impl<'a> RetrieveTreasuryFinancialAccountsResourceFinancialAccount<'a> { } impl<'a> RetrieveTreasuryFinancialAccountsResourceFinancialAccount<'a> { /// Retrieves the details of a FinancialAccount. - pub fn send(&self, client: &stripe::Client, financial_account: &str) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, financial_account: &stripe_treasury::treasury_financial_accounts_resource_financial_account::TreasuryFinancialAccountId) -> stripe::Response { client.get_query(&format!("/treasury/financial_accounts/{financial_account}"), self) } } @@ -935,7 +939,11 @@ impl<'a> RetrieveFeaturesTreasuryFinancialAccountsResourceFinancialAccount<'a> { } impl<'a> RetrieveFeaturesTreasuryFinancialAccountsResourceFinancialAccount<'a> { /// Retrieves Features information associated with the FinancialAccount. - pub fn send(&self, client: &stripe::Client, financial_account: &str) -> stripe::Response { + pub fn send( + &self, + client: &stripe::Client, + financial_account: &stripe_treasury::treasury_financial_accounts_resource_financial_account::TreasuryFinancialAccountId, + ) -> stripe::Response { client.get_query(&format!("/treasury/financial_accounts/{financial_account}/features"), self) } } diff --git a/generated/stripe_treasury/src/treasury_inbound_transfers_resource_inbound_transfer/requests.rs b/generated/stripe_treasury/src/treasury_inbound_transfers_resource_inbound_transfer/requests.rs index f43d1b4b0..fb77f9543 100644 --- a/generated/stripe_treasury/src/treasury_inbound_transfers_resource_inbound_transfer/requests.rs +++ b/generated/stripe_treasury/src/treasury_inbound_transfers_resource_inbound_transfer/requests.rs @@ -11,7 +11,7 @@ impl<'a> CancelTreasuryInboundTransfersResourceInboundTransfer<'a> { } impl<'a> CancelTreasuryInboundTransfersResourceInboundTransfer<'a> { /// Cancels an InboundTransfer. - pub fn send(&self, client: &stripe::Client, inbound_transfer: &str) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, inbound_transfer: &stripe_treasury::treasury_inbound_transfers_resource_inbound_transfer::TreasuryInboundTransferId) -> stripe::Response { client.send_form(&format!("/treasury/inbound_transfers/{inbound_transfer}/cancel"), self, http_types::Method::Post) } } @@ -191,7 +191,7 @@ impl<'a> SucceedTreasuryInboundTransfersResourceInboundTransfer<'a> { /// Transitions a test mode created InboundTransfer to the `succeeded` status. /// /// The InboundTransfer must already be in the `processing` state. - pub fn send(&self, client: &stripe::Client, id: &stripe_treasury::treasury_inbound_transfers_resource_inbound_transfer::TreasuryInboundTransferId) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, id: &str) -> stripe::Response { client.send_form(&format!("/test_helpers/treasury/inbound_transfers/{id}/succeed"), self, http_types::Method::Post) } } @@ -313,7 +313,7 @@ impl<'a> FailTreasuryInboundTransfersResourceInboundTransfer<'a> { /// Transitions a test mode created InboundTransfer to the `failed` status. /// /// The InboundTransfer must already be in the `processing` state. - pub fn send(&self, client: &stripe::Client, id: &stripe_treasury::treasury_inbound_transfers_resource_inbound_transfer::TreasuryInboundTransferId) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, id: &str) -> stripe::Response { client.send_form(&format!("/test_helpers/treasury/inbound_transfers/{id}/fail"), self, http_types::Method::Post) } } @@ -332,7 +332,7 @@ impl<'a> ReturnInboundTransferTreasuryInboundTransfersResourceInboundTransfer<'a /// Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. /// /// The InboundTransfer must already be in the `succeeded` state. - pub fn send(&self, client: &stripe::Client, id: &stripe_treasury::treasury_inbound_transfers_resource_inbound_transfer::TreasuryInboundTransferId) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, id: &str) -> stripe::Response { client.send_form(&format!("/test_helpers/treasury/inbound_transfers/{id}/return"), self, http_types::Method::Post) } } diff --git a/generated/stripe_treasury/src/treasury_outbound_payments_resource_outbound_payment/requests.rs b/generated/stripe_treasury/src/treasury_outbound_payments_resource_outbound_payment/requests.rs index 87fbdce06..d35a94076 100644 --- a/generated/stripe_treasury/src/treasury_outbound_payments_resource_outbound_payment/requests.rs +++ b/generated/stripe_treasury/src/treasury_outbound_payments_resource_outbound_payment/requests.rs @@ -594,7 +594,7 @@ impl<'a> FailTreasuryOutboundPaymentsResourceOutboundPayment<'a> { /// Transitions a test mode created OutboundPayment to the `failed` status. /// /// The OutboundPayment must already be in the `processing` state. - pub fn send(&self, client: &stripe::Client, id: &stripe_treasury::treasury_outbound_payments_resource_outbound_payment::TreasuryOutboundPaymentId) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, id: &str) -> stripe::Response { client.send_form(&format!("/test_helpers/treasury/outbound_payments/{id}/fail"), self, http_types::Method::Post) } } @@ -613,7 +613,7 @@ impl<'a> PostTreasuryOutboundPaymentsResourceOutboundPayment<'a> { /// Transitions a test mode created OutboundPayment to the `posted` status. /// /// The OutboundPayment must already be in the `processing` state. - pub fn send(&self, client: &stripe::Client, id: &stripe_treasury::treasury_outbound_payments_resource_outbound_payment::TreasuryOutboundPaymentId) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, id: &str) -> stripe::Response { client.send_form(&format!("/test_helpers/treasury/outbound_payments/{id}/post"), self, http_types::Method::Post) } } @@ -722,7 +722,7 @@ impl<'a> ReturnOutboundPaymentTreasuryOutboundPaymentsResourceOutboundPayment<'a /// Transitions a test mode created OutboundPayment to the `returned` status. /// /// The OutboundPayment must already be in the `processing` state. - pub fn send(&self, client: &stripe::Client, id: &stripe_treasury::treasury_outbound_payments_resource_outbound_payment::TreasuryOutboundPaymentId) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, id: &str) -> stripe::Response { client.send_form(&format!("/test_helpers/treasury/outbound_payments/{id}/return"), self, http_types::Method::Post) } } diff --git a/generated/stripe_treasury/src/treasury_outbound_transfers_resource_outbound_transfer/requests.rs b/generated/stripe_treasury/src/treasury_outbound_transfers_resource_outbound_transfer/requests.rs index 8f5116630..c6ba44df1 100644 --- a/generated/stripe_treasury/src/treasury_outbound_transfers_resource_outbound_transfer/requests.rs +++ b/generated/stripe_treasury/src/treasury_outbound_transfers_resource_outbound_transfer/requests.rs @@ -145,7 +145,7 @@ impl<'a> RetrieveTreasuryOutboundTransfersResourceOutboundTransfer<'a> { } impl<'a> RetrieveTreasuryOutboundTransfersResourceOutboundTransfer<'a> { /// Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list. - pub fn send(&self, client: &stripe::Client, outbound_transfer: &str) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, outbound_transfer: &stripe_treasury::treasury_outbound_transfers_resource_outbound_transfer::TreasuryOutboundTransferId) -> stripe::Response { client.get_query(&format!("/treasury/outbound_transfers/{outbound_transfer}"), self) } } @@ -265,7 +265,7 @@ impl<'a> CancelTreasuryOutboundTransfersResourceOutboundTransfer<'a> { } impl<'a> CancelTreasuryOutboundTransfersResourceOutboundTransfer<'a> { /// An OutboundTransfer can be canceled if the funds have not yet been paid out. - pub fn send(&self, client: &stripe::Client, outbound_transfer: &str) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, outbound_transfer: &stripe_treasury::treasury_outbound_transfers_resource_outbound_transfer::TreasuryOutboundTransferId) -> stripe::Response { client.send_form(&format!("/treasury/outbound_transfers/{outbound_transfer}/cancel"), self, http_types::Method::Post) } } diff --git a/generated/stripe_treasury/src/treasury_received_credits_resource_credit_reversal/requests.rs b/generated/stripe_treasury/src/treasury_received_credits_resource_credit_reversal/requests.rs index f5b0e9f08..4fd9cea66 100644 --- a/generated/stripe_treasury/src/treasury_received_credits_resource_credit_reversal/requests.rs +++ b/generated/stripe_treasury/src/treasury_received_credits_resource_credit_reversal/requests.rs @@ -111,7 +111,7 @@ impl<'a> RetrieveTreasuryReceivedCreditsResourceCreditReversal<'a> { } impl<'a> RetrieveTreasuryReceivedCreditsResourceCreditReversal<'a> { /// Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list. - pub fn send(&self, client: &stripe::Client, credit_reversal: &str) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, credit_reversal: &stripe_treasury::treasury_received_credits_resource_credit_reversal::TreasuryCreditReversalId) -> stripe::Response { client.get_query(&format!("/treasury/credit_reversals/{credit_reversal}"), self) } } diff --git a/generated/stripe_treasury/src/treasury_received_debits_resource_debit_reversal/requests.rs b/generated/stripe_treasury/src/treasury_received_debits_resource_debit_reversal/requests.rs index 100e040bc..70ccf2438 100644 --- a/generated/stripe_treasury/src/treasury_received_debits_resource_debit_reversal/requests.rs +++ b/generated/stripe_treasury/src/treasury_received_debits_resource_debit_reversal/requests.rs @@ -37,7 +37,7 @@ impl<'a> RetrieveTreasuryReceivedDebitsResourceDebitReversal<'a> { } impl<'a> RetrieveTreasuryReceivedDebitsResourceDebitReversal<'a> { /// Retrieves a DebitReversal object. - pub fn send(&self, client: &stripe::Client, debit_reversal: &str) -> stripe::Response { + pub fn send(&self, client: &stripe::Client, debit_reversal: &stripe_treasury::treasury_received_debits_resource_debit_reversal::TreasuryDebitReversalId) -> stripe::Response { client.get_query(&format!("/treasury/debit_reversals/{debit_reversal}"), self) } } diff --git a/openapi/request_path_params.json b/openapi/request_path_params.json deleted file mode 100644 index c8e13f2b1..000000000 --- a/openapi/request_path_params.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "/issuing/tokens/{token}": "issuing.token", - "/checkout/sessions/{session}": "checkout.session", - "/subscriptions/{subscription_exposed_id}": "subscription" -} \ No newline at end of file diff --git a/openapi/src/components.rs b/openapi/src/components.rs index e28443f2f..a49b337d2 100644 --- a/openapi/src/components.rs +++ b/openapi/src/components.rs @@ -262,7 +262,7 @@ pub fn get_components(spec: &Spec) -> anyhow::Result { } else { maybe_infer_crate_by_path(&path) }; - let reqs = parse_requests(stripe_reqs, spec, resource.ident(), &path, &id_map)?; + let reqs = parse_requests(stripe_reqs, spec, resource.ident(), &id_map)?; components.insert( path, StripeObject { diff --git a/openapi/src/requests.rs b/openapi/src/requests.rs index 20c21f233..68835e245 100644 --- a/openapi/src/requests.rs +++ b/openapi/src/requests.rs @@ -1,9 +1,7 @@ use std::collections::HashMap; -use std::fs::File; use anyhow::{bail, Context}; use heck::ToSnakeCase; -use lazy_static::lazy_static; use openapiv3::{Parameter, ParameterData, ParameterSchemaOrContent, ReferenceOr, Schema}; use tracing::debug; @@ -15,26 +13,6 @@ use crate::spec_inference::Inference; use crate::stripe_object::{OperationType, PathParam, RequestSpec, StripeOperation}; use crate::types::{ComponentPath, RustIdent}; -/// Load overrides that hardcode the id types we should use for path parameters. -/// Map request path start to id path -fn load_request_path_param_id_overrides() -> anyhow::Result> { - Ok(serde_json::from_reader(File::open("request_path_params.json")?)?) -} - -lazy_static! { - pub static ref PATH_PARAM_OVERRIDE: HashMap = - load_request_path_param_id_overrides().expect("Unable to load path params"); -} - -fn find_single_path_param_override(req_path: &str) -> Option<&'static str> { - for (k, v) in &*PATH_PARAM_OVERRIDE { - if k.starts_with(req_path) { - return Some(v); - } - } - None -} - /// Should we skip a currently unsupported request? fn should_skip_request(op: &StripeOperation) -> bool { // TODO: what is the relevance of the `method_on` field? A small number of requests @@ -160,7 +138,6 @@ pub fn parse_requests( operations: Vec, spec: &Spec, ident: &RustIdent, - component: &ComponentPath, path_id_map: &HashMap, ) -> anyhow::Result> { let mut req_details = Vec::with_capacity(operations.len()); @@ -177,14 +154,8 @@ pub fn parse_requests( let mut requests = Vec::with_capacity(operations.len()); for req in &req_details { requests.push( - build_request( - req, - ident, - &method_names[&RequestKey::from_op(req)], - component, - path_id_map, - ) - .with_context(|| format!("Error generating request operation {req:?}"))?, + build_request(req, ident, &method_names[&RequestKey::from_op(req)], path_id_map) + .with_context(|| format!("Error generating request operation {req:?}"))?, ); } Ok(requests) @@ -211,7 +182,6 @@ fn build_request( req: &RequestDetails, parent_ident: &RustIdent, method_name: &str, - component: &ComponentPath, path_id_map: &HashMap, ) -> anyhow::Result { let return_ident = RustIdent::joined(method_name, "returned"); @@ -274,9 +244,7 @@ fn build_request( bail!("Expected path parameter to be a string"); } - let rust_type = if let Some(id_typ) = - infer_id_path(¶m.name, &req.path_params, req_path, component, path_id_map)? - { + let rust_type = if let Some(id_typ) = infer_id_path(¶m.name, req_path, path_id_map)? { RustType::object_id(id_typ, true) } else { // NB: Assuming this is safe since we check earlier that this matches the path type. @@ -299,36 +267,58 @@ fn build_request( /// Try our best to determine a specialized id type for this parameter, e.g. `AccountId`. fn infer_id_path( param_name: &str, - params: &[&ParameterData], req_path: &str, - component: &ComponentPath, path_id_map: &HashMap, ) -> anyhow::Result> { - let has_single_path_param = params.len() == 1; + let pieces = req_path.trim_matches('/').split('/'); - // First, check if there is a hardcoded object name we should use. These are overrides might not be necessary - // with cleverer inference, but this seems useful regardless since id handling is quite finicky, so having - // an easy mechanism to hardcode parameter ideas is helpful - if has_single_path_param { - if let Some(obj_name) = find_single_path_param_override(req_path) { - let id_path = path_id_map.get(obj_name).with_context(|| { - format!("Overriden request path {req_path} has object name with no id") - })?; - return Ok(Some(id_path.clone())); + // For now we only infer the first parametrized piece as an idea, so collect everything + // that precedes it and return is this is not the first parameterized piece + let mut preceding_sections = vec![]; + for piece in pieces { + if piece.starts_with('{') { + if piece.trim_start_matches('{').trim_end_matches('}') == param_name { + break; + } else { + return Ok(None); + } + } else { + preceding_sections.push(piece); } } - // Try to use the name of the path parameter to infer the id type. - if let Some(id_path) = path_id_map.get(param_name) { - return Ok(Some(id_path.clone())); + // Based on the request path, infer what it belongs to. Note that parameter names + // are used inconsistently so they are not used at all in inference + + // /accounts -> account + let obj_name = if preceding_sections.len() == 1 { + unpluralize(preceding_sections.first().unwrap()) + // /treasury/inbound_transfers/ -> treasury.inbound_transfer + } else if preceding_sections.len() == 2 { + let class = preceding_sections.first().unwrap(); + let item = preceding_sections.get(1).unwrap(); + format!("{class}.{}", unpluralize(item)) + // Some cases here, but mostly around test helpers, so not too urgent to handle + } else { + return Ok(None); + }; + + if let Some(comp) = path_id_map.get(&obj_name) { + Ok(Some(comp.clone())) + } else { + debug!("No id type for {}", req_path); + Ok(None) } +} + +fn unpluralize(val: &str) -> String { + // A simple transformation covers the two cases we see in stripe request paths: - // If there's just a single path parameter with the name `id`, try assuming the id corresponds - // to the parent component (assuming such an id actually exists). We check for `id` explicitly - // because some requests like `GetApplePayDomainsDomain` has a path parameter which is a _domain_, - // not an id - if has_single_path_param && param_name == "id" && path_id_map.contains_key(component.as_ref()) { - return Ok(Some(component.clone())); + // treasury_entries -> treasury_entry + if val.ends_with("ies") { + val.replace("ies", "y") + } else { + // accounts -> account + val.trim_end_matches('s').to_string() } - Ok(None) } diff --git a/openapi/src/spec_fetch.rs b/openapi/src/spec_fetch.rs index e2c873d4f..dc67ba5d3 100644 --- a/openapi/src/spec_fetch.rs +++ b/openapi/src/spec_fetch.rs @@ -21,7 +21,7 @@ pub fn parse_spec_version(arg: &str) -> anyhow::Result { "latest" => Ok(SpecVersion::Latest), "current" => Ok(SpecVersion::Current), version => { - let re = Regex::new(r#"v[1-9]\d*"#).unwrap(); + let re = Regex::new(r"v[1-9]\d*").unwrap(); if re.is_match(version) { Ok(SpecVersion::Version(as_lower)) } else { diff --git a/openapi/src/templates/utils.rs b/openapi/src/templates/utils.rs index f526a422c..90908da87 100644 --- a/openapi/src/templates/utils.rs +++ b/openapi/src/templates/utils.rs @@ -68,7 +68,7 @@ fn format_doc_comment(doc: &str) -> String { static ref AMOUNT_CLOSE_TAG: Regex = Regex::new("").unwrap(); static ref CURRENCY_OPEN_TAG: Regex = Regex::new("").unwrap(); static ref CURRENCY_CLOSE_TAG: Regex = Regex::new("").unwrap(); - static ref HYPERLINK: Regex = Regex::new(r#"([^\(])(https?://(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*))([^\)])"#).unwrap(); + static ref HYPERLINK: Regex = Regex::new(r"([^\(])(https?://(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*))([^\)])").unwrap(); } let doc = P_TAG.replace_all(doc, ""); let doc = BR_TAG.replace_all(&doc, "\n"); diff --git a/tests/tests/it/blocking/transfer_reversal.rs b/tests/tests/it/blocking/transfer_reversal.rs index 0e7b85203..3db49eef5 100644 --- a/tests/tests/it/blocking/transfer_reversal.rs +++ b/tests/tests/it/blocking/transfer_reversal.rs @@ -7,7 +7,7 @@ use crate::mock; fn create_transfer_reversal() { mock::with_client(|client| { let mut create = CreateTransferReversal::new(); - let id = "trr_Ll53U0VONALFk36".parse().unwrap(); + let id = "tr_Ll53U0VONALFk36".parse().unwrap(); create.refund_application_fee = Some(true); create.amount = Some(4);