From c5a8b25b73c5d17419086e858e66c4bf7032ee60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Augusto=20C=C3=A9sar?= Date: Fri, 16 Feb 2024 13:06:02 +0100 Subject: [PATCH] fix: rename redirect_url to return_url on ConfirmSetupIntent ### Description As raised on https://github.com/arlyon/async-stripe/issues/504, this attribute have the incorrect name according to the [documentation](https://docs.stripe.com/api/setup_intents/confirm#confirm_setup_intent-return_url). This change renames the field `redirect_url` to `return_url`. closes #504 --- src/resources/setup_intent_ext.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/resources/setup_intent_ext.rs b/src/resources/setup_intent_ext.rs index 1d89ec6c7..7fdf31ef4 100644 --- a/src/resources/setup_intent_ext.rs +++ b/src/resources/setup_intent_ext.rs @@ -4,6 +4,9 @@ use crate::client::{Client, Response}; use crate::resources::SetupIntent; use crate::{SetupIntentCancellationReason, SetupIntentId}; +/// The set of parameters that can be used when confirming a setup_intent object. +/// +/// For more details see #[derive(Clone, Debug, Serialize)] pub struct ConfirmSetupIntent { /// The client secret if on the client side @@ -14,11 +17,11 @@ pub struct ConfirmSetupIntent { #[serde(skip_serializing_if = "Option::is_none")] pub payment_method: Option, - //Mandate data and payment method options not implemented. If you want - //something better, create an issue and lets fix - /// Where to redirect the user after they log out of their dashboard. + // Mandate data and payment method options not implemented. If you want + // something better, create an issue and lets fix + /// The URL to redirect your customer back to after they authenticate on the payment method’s app or site. #[serde(skip_serializing_if = "Option::is_none")] - pub redirect_url: Option, + pub return_url: Option, } /// The set of parameters that can be used when canceling a setup_intent object.