From 11ad54947a947bbde6e41481ad2ff8339b094de9 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 10 Apr 2025 19:28:21 +0000 Subject: [PATCH 01/22] Update generated code for v1670 --- OPENAPI_VERSION | 2 +- .../Entities/BalanceSettings/BalanceSettings.cs | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f659e74479..e0a7e37d0b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1669 \ No newline at end of file +v1670 \ No newline at end of file diff --git a/src/Stripe.net/Entities/BalanceSettings/BalanceSettings.cs b/src/Stripe.net/Entities/BalanceSettings/BalanceSettings.cs index be98a40d20..00926b2316 100644 --- a/src/Stripe.net/Entities/BalanceSettings/BalanceSettings.cs +++ b/src/Stripe.net/Entities/BalanceSettings/BalanceSettings.cs @@ -7,7 +7,13 @@ namespace Stripe #endif /// - /// Options for customizing account balances within Stripe. + /// Options for customizing account balances and payout settings for a Stripe platform’s + /// connected accounts. + /// + /// This API is only available for users enrolled in the public preview for Accounts v2 on + /// Stripe Connect. If you are not in this preview, please use the Accounts v1 + /// API to manage your connected accounts’ balance settings instead. /// public class BalanceSettings : StripeEntity, IHasObject { From 45d6a71aa50021ca09eafbe21cce5f313de6fcdf Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 09:57:46 +0000 Subject: [PATCH 02/22] Update generated code for v1671 --- OPENAPI_VERSION | 2 +- src/Stripe.net/Entities/Events/Event.cs | 2 +- .../Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs | 2 +- .../Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e0a7e37d0b..ab962c18d7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1670 \ No newline at end of file +v1671 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Events/Event.cs b/src/Stripe.net/Entities/Events/Event.cs index 74130a5e36..218c1a0a38 100644 --- a/src/Stripe.net/Entities/Events/Event.cs +++ b/src/Stripe.net/Entities/Events/Event.cs @@ -199,7 +199,7 @@ public class Event : StripeEntity, IHasId, IHasObject /// financial_connections.account.refreshed_inferred_balances, /// financial_connections.account.refreshed_ownership, /// financial_connections.account.refreshed_transactions, - /// financial_connections.session.updated, + /// financial_connections.session.updated, fx_quote.expired, /// identity.verification_session.canceled, /// identity.verification_session.created, /// identity.verification_session.processing, diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs index baedea58ea..792bac1d8e 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs @@ -122,7 +122,7 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// financial_connections.account.refreshed_inferred_balances, /// financial_connections.account.refreshed_ownership, /// financial_connections.account.refreshed_transactions, - /// financial_connections.session.updated, + /// financial_connections.session.updated, fx_quote.expired, /// identity.verification_session.canceled, /// identity.verification_session.created, /// identity.verification_session.processing, diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs index 4aaee0d9ee..33477d736d 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs @@ -82,7 +82,7 @@ public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata /// financial_connections.account.refreshed_inferred_balances, /// financial_connections.account.refreshed_ownership, /// financial_connections.account.refreshed_transactions, - /// financial_connections.session.updated, + /// financial_connections.session.updated, fx_quote.expired, /// identity.verification_session.canceled, /// identity.verification_session.created, /// identity.verification_session.processing, From b876d3d808e041ca1e518ae8b1ea7e4bd8fb0800 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 14:30:21 +0000 Subject: [PATCH 03/22] Update generated code for v1672 --- OPENAPI_VERSION | 2 +- .../FinancingOffers/FinancingOfferAcceptedTerms.cs | 5 +++-- .../FinancingOffers/FinancingOfferOfferedTerms.cs | 5 +++-- .../FinancingSummaries/FinancingSummaryDetails.cs | 11 +++++++---- ...FinancingSummaryDetailsCurrentRepaymentInterval.cs | 6 ++++-- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ab962c18d7..3f98057f44 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1671 \ No newline at end of file +v1672 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Capital/FinancingOffers/FinancingOfferAcceptedTerms.cs b/src/Stripe.net/Entities/Capital/FinancingOffers/FinancingOfferAcceptedTerms.cs index ef13e9182e..bf06d64326 100644 --- a/src/Stripe.net/Entities/Capital/FinancingOffers/FinancingOfferAcceptedTerms.cs +++ b/src/Stripe.net/Entities/Capital/FinancingOffers/FinancingOfferAcceptedTerms.cs @@ -9,7 +9,8 @@ namespace Stripe.Capital public class FinancingOfferAcceptedTerms : StripeEntity { /// - /// Amount of financing offered, in minor units. + /// Amount of financing offered, in minor units. For example, $1,000 USD will be represented + /// as 100000. /// [JsonProperty("advance_amount")] #if NET6_0_OR_GREATER @@ -27,7 +28,7 @@ public class FinancingOfferAcceptedTerms : StripeEntity - /// Fixed fee amount, in minor units. + /// Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. /// [JsonProperty("fee_amount")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Capital/FinancingOffers/FinancingOfferOfferedTerms.cs b/src/Stripe.net/Entities/Capital/FinancingOffers/FinancingOfferOfferedTerms.cs index 04facfd9d1..4199bd37b6 100644 --- a/src/Stripe.net/Entities/Capital/FinancingOffers/FinancingOfferOfferedTerms.cs +++ b/src/Stripe.net/Entities/Capital/FinancingOffers/FinancingOfferOfferedTerms.cs @@ -9,7 +9,8 @@ namespace Stripe.Capital public class FinancingOfferOfferedTerms : StripeEntity { /// - /// Amount of financing offered, in minor units. + /// Amount of financing offered, in minor units. For example, $1,000 USD will be represented + /// as 100000. /// [JsonProperty("advance_amount")] #if NET6_0_OR_GREATER @@ -38,7 +39,7 @@ public class FinancingOfferOfferedTerms : StripeEntity - /// Fixed fee amount, in minor units. + /// Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. /// [JsonProperty("fee_amount")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Capital/FinancingSummaries/FinancingSummaryDetails.cs b/src/Stripe.net/Entities/Capital/FinancingSummaries/FinancingSummaryDetails.cs index 018ac13fe4..5d4621a7d1 100644 --- a/src/Stripe.net/Entities/Capital/FinancingSummaries/FinancingSummaryDetails.cs +++ b/src/Stripe.net/Entities/Capital/FinancingSummaries/FinancingSummaryDetails.cs @@ -9,7 +9,8 @@ namespace Stripe.Capital public class FinancingSummaryDetails : StripeEntity { /// - /// Amount of financing offered, in minor units. + /// Amount of financing offered, in minor units. For example, $1,000 USD will be represented + /// as 100000. /// [JsonProperty("advance_amount")] #if NET6_0_OR_GREATER @@ -46,7 +47,7 @@ public class FinancingSummaryDetails : StripeEntity public FinancingSummaryDetailsCurrentRepaymentInterval CurrentRepaymentInterval { get; set; } /// - /// Fixed fee amount, in minor units. + /// Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. /// [JsonProperty("fee_amount")] #if NET6_0_OR_GREATER @@ -55,7 +56,8 @@ public class FinancingSummaryDetails : StripeEntity public long FeeAmount { get; set; } /// - /// The amount the Connected account has paid toward the financing debt so far. + /// The amount the Connected account has paid toward the financing debt so far, in minor + /// units. For example, $1,000 USD will be represented as 100000. /// [JsonProperty("paid_amount")] #if NET6_0_OR_GREATER @@ -64,7 +66,8 @@ public class FinancingSummaryDetails : StripeEntity public long PaidAmount { get; set; } /// - /// The balance remaining to be paid on the financing, in minor units. + /// The balance remaining to be paid on the financing, in minor units. For example, $1,000 + /// USD will be represented as 100000. /// [JsonProperty("remaining_amount")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Capital/FinancingSummaries/FinancingSummaryDetailsCurrentRepaymentInterval.cs b/src/Stripe.net/Entities/Capital/FinancingSummaries/FinancingSummaryDetailsCurrentRepaymentInterval.cs index fc2c12a39c..bbcbf15737 100644 --- a/src/Stripe.net/Entities/Capital/FinancingSummaries/FinancingSummaryDetailsCurrentRepaymentInterval.cs +++ b/src/Stripe.net/Entities/Capital/FinancingSummaries/FinancingSummaryDetailsCurrentRepaymentInterval.cs @@ -20,7 +20,8 @@ public class FinancingSummaryDetailsCurrentRepaymentInterval : StripeEntity - /// The amount that has already been paid in the current repayment interval. + /// The amount that has already been paid in the current repayment interval, in minor units. + /// For example, $100 USD will be represented as 10000. /// [JsonProperty("paid_amount")] #if NET6_0_OR_GREATER @@ -29,7 +30,8 @@ public class FinancingSummaryDetailsCurrentRepaymentInterval : StripeEntity - /// The amount that is yet to be paid in the current repayment interval. + /// The amount that is yet to be paid in the current repayment interval, in minor units. For + /// example, $100 USD will be represented as 10000. /// [JsonProperty("remaining_amount")] #if NET6_0_OR_GREATER From 1fe18ab30485171313dbf6b30562bf9446335c68 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 17:23:11 +0000 Subject: [PATCH 04/22] Update generated code for v1673 --- OPENAPI_VERSION | 2 +- src/Stripe.net/Entities/Refunds/Refund.cs | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3f98057f44..b4a6a7f3cb 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1672 \ No newline at end of file +v1673 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Refunds/Refund.cs b/src/Stripe.net/Entities/Refunds/Refund.cs index 84567e583e..28eca40244 100644 --- a/src/Stripe.net/Entities/Refunds/Refund.cs +++ b/src/Stripe.net/Entities/Refunds/Refund.cs @@ -290,6 +290,17 @@ public PaymentIntent PaymentIntent internal ExpandableField InternalPaymentIntent { get; set; } #endregion + /// + /// Provides the reason for why the refund is pending. Possible values are: + /// processing, insufficient_funds, or charge_pending. + /// One of: charge_pending, insufficient_funds, or processing. + /// + [JsonProperty("pending_reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pending_reason")] +#endif + public string PendingReason { get; set; } + [JsonProperty("presentment_details")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("presentment_details")] From 9e3ad5a49d3cb45d7e3cf143dddbb2b394091ce7 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 17:08:18 +0000 Subject: [PATCH 05/22] Update generated code for v1675 --- OPENAPI_VERSION | 2 +- .../Services/Checkout/Sessions/SessionCreateOptions.cs | 3 ++- .../Services/Checkout/Sessions/SessionUpdateOptions.cs | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b4a6a7f3cb..75329f8325 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1673 \ No newline at end of file +v1675 \ No newline at end of file diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs index 2932ba91b5..ea85d8f0a0 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs @@ -409,7 +409,8 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// This property is used to set up permissions for various actions (e.g., update) on the - /// CheckoutSession object. + /// CheckoutSession object. Can only be set when creating embedded or custom + /// sessions. /// /// For specific permissions, please refer to their dedicated subsections, such as /// permissions.update_shipping_details. diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs index c3a1bbb65c..b352b81977 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionUpdateOptions.cs @@ -10,7 +10,8 @@ namespace Stripe.Checkout public class SessionUpdateOptions : BaseOptions, IHasMetadata { /// - /// Information about the customer collected within the Checkout Session. + /// Information about the customer collected within the Checkout Session. Can only be set + /// when updating embedded or custom sessions. /// [JsonProperty("collected_information")] #if NET6_0_OR_GREATER From 2d941fac2acefc4110837b9cba0d202860a278c1 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 17:40:04 +0000 Subject: [PATCH 06/22] Update generated code for v1675 --- .../Services/GeneratedExamplesTest.cs | 1071 +++++++++++------ 1 file changed, 671 insertions(+), 400 deletions(-) diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index 0b06a75142..625ba74392 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -30,7 +30,7 @@ public void TestAccountLinksPost() Type = "account_onboarding", }; var service = new AccountLinkService(this.StripeClient); - service.Create(options); + AccountLink accountLink = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/account_links"); } @@ -49,7 +49,9 @@ public void TestAccountsCapabilitiesGet() public void TestAccountsCapabilitiesGet2() { var service = new AccountCapabilityService(this.StripeClient); - service.Get("acct_xxxxxxxxxxxxx", "card_payments"); + Capability capability = service.Get( + "acct_xxxxxxxxxxxxx", + "card_payments"); this.AssertRequest( HttpMethod.Get, "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments"); @@ -63,7 +65,10 @@ public void TestAccountsCapabilitiesPost() Requested = true, }; var service = new AccountCapabilityService(this.StripeClient); - service.Update("acct_xxxxxxxxxxxxx", "card_payments", options); + Capability capability = service.Update( + "acct_xxxxxxxxxxxxx", + "card_payments", + options); this.AssertRequest( HttpMethod.Post, "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments"); @@ -73,7 +78,7 @@ public void TestAccountsCapabilitiesPost() public void TestAccountsDelete() { var service = new AccountService(this.StripeClient); - service.Delete("acct_xxxxxxxxxxxxx"); + Account deleted = service.Delete("acct_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/accounts/acct_xxxxxxxxxxxxx"); @@ -92,7 +97,7 @@ public void TestAccountsGet() public void TestAccountsGet2() { var service = new AccountService(this.StripeClient); - service.Get("acct_xxxxxxxxxxxxx"); + Account account = service.Get("acct_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/accounts/acct_xxxxxxxxxxxxx"); @@ -102,7 +107,7 @@ public void TestAccountsGet2() public void TestAccountsLoginLinksPost() { var service = new AccountLoginLinkService(this.StripeClient); - service.Create("acct_xxxxxxxxxxxxx"); + LoginLink loginLink = service.Create("acct_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/accounts/acct_xxxxxxxxxxxxx/login_links"); @@ -112,7 +117,9 @@ public void TestAccountsLoginLinksPost() public void TestAccountsPersonsDelete() { var service = new AccountPersonService(this.StripeClient); - service.Delete("acct_xxxxxxxxxxxxx", "person_xxxxxxxxxxxxx"); + Person deleted = service.Delete( + "acct_xxxxxxxxxxxxx", + "person_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); @@ -136,7 +143,9 @@ public void TestAccountsPersonsGet() public void TestAccountsPersonsGet2() { var service = new AccountPersonService(this.StripeClient); - service.Get("acct_xxxxxxxxxxxxx", "person_xxxxxxxxxxxxx"); + Person person = service.Get( + "acct_xxxxxxxxxxxxx", + "person_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); @@ -151,7 +160,7 @@ public void TestAccountsPersonsPost() LastName = "Diaz", }; var service = new AccountPersonService(this.StripeClient); - service.Create("acct_xxxxxxxxxxxxx", options); + Person person = service.Create("acct_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/accounts/acct_xxxxxxxxxxxxx/persons"); @@ -168,7 +177,7 @@ public void TestAccountsPersonsPost2() }, }; var service = new AccountPersonService(this.StripeClient); - service.Update( + Person person = service.Update( "acct_xxxxxxxxxxxxx", "person_xxxxxxxxxxxxx", options); @@ -198,7 +207,7 @@ public void TestAccountsPost() }, }; var service = new AccountService(this.StripeClient); - service.Create(options); + Account account = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/accounts"); } @@ -213,7 +222,7 @@ public void TestAccountsPost2() }, }; var service = new AccountService(this.StripeClient); - service.Update("acct_xxxxxxxxxxxxx", options); + Account account = service.Update("acct_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/accounts/acct_xxxxxxxxxxxxx"); @@ -224,7 +233,7 @@ public void TestAccountsRejectPost() { var options = new AccountRejectOptions { Reason = "fraud" }; var service = new AccountService(this.StripeClient); - service.Reject("acct_xxxxxxxxxxxxx", options); + Account account = service.Reject("acct_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/accounts/acct_xxxxxxxxxxxxx/reject"); @@ -246,7 +255,7 @@ public void TestApplicationFeesGet() public void TestApplicationFeesGet2() { var service = new ApplicationFeeService(this.StripeClient); - service.Get("fee_xxxxxxxxxxxxx"); + ApplicationFee applicationFee = service.Get("fee_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/application_fees/fee_xxxxxxxxxxxxx"); @@ -269,7 +278,9 @@ public void TestApplicationFeesRefundsGet() public void TestApplicationFeesRefundsGet2() { var service = new ApplicationFeeRefundService(this.StripeClient); - service.Get("fee_xxxxxxxxxxxxx", "fr_xxxxxxxxxxxxx"); + ApplicationFeeRefund applicationFeeRefund = service.Get( + "fee_xxxxxxxxxxxxx", + "fr_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"); @@ -279,7 +290,8 @@ public void TestApplicationFeesRefundsGet2() public void TestApplicationFeesRefundsPost() { var service = new ApplicationFeeRefundService(this.StripeClient); - service.Create("fee_xxxxxxxxxxxxx"); + ApplicationFeeRefund applicationFeeRefund = service.Create( + "fee_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds"); @@ -296,7 +308,10 @@ public void TestApplicationFeesRefundsPost2() }, }; var service = new ApplicationFeeRefundService(this.StripeClient); - service.Update("fee_xxxxxxxxxxxxx", "fr_xxxxxxxxxxxxx", options); + ApplicationFeeRefund applicationFeeRefund = service.Update( + "fee_xxxxxxxxxxxxx", + "fr_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"); @@ -311,7 +326,7 @@ public void TestAppsSecretsDeletePost() Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, }; var service = new Stripe.Apps.SecretService(this.StripeClient); - service.DeleteWhere(options); + Stripe.Apps.Secret secret = service.DeleteWhere(options); this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets/delete"); } @@ -324,7 +339,7 @@ public void TestAppsSecretsFindGet() Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, }; var service = new Stripe.Apps.SecretService(this.StripeClient); - service.Find(options); + Stripe.Apps.Secret secret = service.Find(options); this.AssertRequest( HttpMethod.Get, "/v1/apps/secrets/find", @@ -373,7 +388,7 @@ public void TestAppsSecretsPost() Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, }; var service = new Stripe.Apps.SecretService(this.StripeClient); - service.Create(options); + Stripe.Apps.Secret secret = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets"); } @@ -387,7 +402,7 @@ public void TestAppsSecretsPost2() Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, }; var service = new Stripe.Apps.SecretService(this.StripeClient); - service.Create(options); + Stripe.Apps.Secret secret = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets"); } @@ -408,7 +423,8 @@ public void TestBalanceTransactionsGet() public void TestBalanceTransactionsGet2() { var service = new BalanceTransactionService(this.StripeClient); - service.Get("txn_xxxxxxxxxxxxx"); + BalanceTransaction balanceTransaction = service.Get( + "txn_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/balance_transactions/txn_xxxxxxxxxxxxx"); @@ -436,7 +452,8 @@ public void TestBillingPortalConfigurationsGet2() { var service = new Stripe.BillingPortal.ConfigurationService( this.StripeClient); - service.Get("bpc_xxxxxxxxxxxxx"); + Stripe.BillingPortal.Configuration configuration = service.Get( + "bpc_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx"); @@ -467,7 +484,8 @@ public void TestBillingPortalConfigurationsPost() }; var service = new Stripe.BillingPortal.ConfigurationService( this.StripeClient); - service.Create(options); + Stripe.BillingPortal.Configuration configuration = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v1/billing_portal/configurations"); @@ -486,7 +504,9 @@ public void TestBillingPortalConfigurationsPost2() }; var service = new Stripe.BillingPortal.ConfigurationService( this.StripeClient); - service.Update("bpc_xxxxxxxxxxxxx", options); + Stripe.BillingPortal.Configuration configuration = service.Update( + "bpc_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx"); @@ -502,7 +522,7 @@ public void TestBillingPortalSessionsPost() }; var service = new Stripe.BillingPortal.SessionService( this.StripeClient); - service.Create(options); + Stripe.BillingPortal.Session session = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/billing_portal/sessions"); } @@ -510,7 +530,7 @@ public void TestBillingPortalSessionsPost() public void TestChargesCapturePost() { var service = new ChargeService(this.StripeClient); - service.Capture("ch_xxxxxxxxxxxxx"); + Charge charge = service.Capture("ch_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/charges/ch_xxxxxxxxxxxxx/capture"); @@ -529,7 +549,7 @@ public void TestChargesGet() public void TestChargesGet2() { var service = new ChargeService(this.StripeClient); - service.Get("ch_xxxxxxxxxxxxx"); + Charge charge = service.Get("ch_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/charges/ch_xxxxxxxxxxxxx"); } @@ -544,7 +564,7 @@ public void TestChargesPost() Description = "My First Test Charge (created for API docs at https://www.stripe.com/docs/api)", }; var service = new ChargeService(this.StripeClient); - service.Create(options); + Charge charge = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/charges"); } @@ -559,7 +579,7 @@ public void TestChargesPost2() }, }; var service = new ChargeService(this.StripeClient); - service.Update("ch_xxxxxxxxxxxxx", options); + Charge charge = service.Update("ch_xxxxxxxxxxxxx", options); this.AssertRequest(HttpMethod.Post, "/v1/charges/ch_xxxxxxxxxxxxx"); } @@ -571,7 +591,7 @@ public void TestChargesSearchGet() Query = "amount>999 AND metadata['order_id']:'6735'", }; var service = new ChargeService(this.StripeClient); - service.Search(options); + StripeSearchResult charges = service.Search(options); this.AssertRequest( HttpMethod.Get, "/v1/charges/search", @@ -582,7 +602,7 @@ public void TestChargesSearchGet() public void TestCheckoutSessionsExpirePost() { var service = new Stripe.Checkout.SessionService(this.StripeClient); - service.Expire("sess_xyz"); + Stripe.Checkout.Session session = service.Expire("sess_xyz"); this.AssertRequest( HttpMethod.Post, "/v1/checkout/sessions/sess_xyz/expire"); @@ -592,7 +612,8 @@ public void TestCheckoutSessionsExpirePost() public void TestCheckoutSessionsExpirePost2() { var service = new Stripe.Checkout.SessionService(this.StripeClient); - service.Expire("cs_test_xxxxxxxxxxxxx"); + Stripe.Checkout.Session session = service.Expire( + "cs_test_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx/expire"); @@ -615,7 +636,8 @@ public void TestCheckoutSessionsGet() public void TestCheckoutSessionsGet2() { var service = new Stripe.Checkout.SessionService(this.StripeClient); - service.Get("cs_test_xxxxxxxxxxxxx"); + Stripe.Checkout.Session session = service.Get( + "cs_test_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx"); @@ -669,7 +691,7 @@ public void TestCheckoutSessionsPost() }, }; var service = new Stripe.Checkout.SessionService(this.StripeClient); - service.Create(options); + Stripe.Checkout.Session session = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/checkout/sessions"); } @@ -690,7 +712,7 @@ public void TestCheckoutSessionsPost2() Mode = "payment", }; var service = new Stripe.Checkout.SessionService(this.StripeClient); - service.Create(options); + Stripe.Checkout.Session session = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/checkout/sessions"); } @@ -704,7 +726,7 @@ public void TestCoreEventsGet() "{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Events; - service.Get("ll_123"); + Stripe.V2.Event result = service.Get("ll_123"); this.AssertRequest(HttpMethod.Get, "/v2/core/events/ll_123"); } @@ -721,7 +743,7 @@ public void TestCountrySpecsGet() public void TestCountrySpecsGet2() { var service = new CountrySpecService(this.StripeClient); - service.Get("US"); + CountrySpec countrySpec = service.Get("US"); this.AssertRequest(HttpMethod.Get, "/v1/country_specs/US"); } @@ -729,7 +751,7 @@ public void TestCountrySpecsGet2() public void TestCouponsDelete() { var service = new CouponService(this.StripeClient); - service.Delete("Z4OV52SU"); + Coupon deleted = service.Delete("Z4OV52SU"); this.AssertRequest(HttpMethod.Delete, "/v1/coupons/Z4OV52SU"); } @@ -746,7 +768,7 @@ public void TestCouponsGet() public void TestCouponsGet2() { var service = new CouponService(this.StripeClient); - service.Get("Z4OV52SU"); + Coupon coupon = service.Get("Z4OV52SU"); this.AssertRequest(HttpMethod.Get, "/v1/coupons/Z4OV52SU"); } @@ -759,7 +781,7 @@ public void TestCouponsPost() Duration = "once", }; var service = new CouponService(this.StripeClient); - service.Create(options); + Coupon coupon = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/coupons"); } @@ -774,7 +796,7 @@ public void TestCouponsPost2() }, }; var service = new CouponService(this.StripeClient); - service.Update("Z4OV52SU", options); + Coupon coupon = service.Update("Z4OV52SU", options); this.AssertRequest(HttpMethod.Post, "/v1/coupons/Z4OV52SU"); } @@ -804,7 +826,7 @@ public void TestCreditNotesPost() }, }; var service = new CreditNoteService(this.StripeClient); - service.Create(options); + CreditNote creditNote = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/credit_notes"); } @@ -825,7 +847,7 @@ public void TestCreditNotesPreviewGet() }, }; var service = new CreditNoteService(this.StripeClient); - service.Preview(options); + CreditNote creditNote = service.Preview(options); this.AssertRequest( HttpMethod.Get, "/v1/credit_notes/preview", @@ -836,7 +858,7 @@ public void TestCreditNotesPreviewGet() public void TestCreditNotesVoidPost() { var service = new CreditNoteService(this.StripeClient); - service.VoidCreditNote("cn_xxxxxxxxxxxxx"); + CreditNote creditNote = service.VoidCreditNote("cn_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/credit_notes/cn_xxxxxxxxxxxxx/void"); @@ -857,7 +879,7 @@ public void TestCustomerSessionsPost() }, }; var service = new CustomerSessionService(this.StripeClient); - service.Create(options); + CustomerSession customerSession = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/customer_sessions"); } @@ -883,7 +905,9 @@ public void TestCustomersBalanceTransactionsGet2() { var service = new CustomerBalanceTransactionService( this.StripeClient); - service.Get("cus_xxxxxxxxxxxxx", "cbtxn_xxxxxxxxxxxxx"); + CustomerBalanceTransaction customerBalanceTransaction = service.Get( + "cus_xxxxxxxxxxxxx", + "cbtxn_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx"); @@ -899,7 +923,8 @@ public void TestCustomersBalanceTransactionsPost() }; var service = new CustomerBalanceTransactionService( this.StripeClient); - service.Create("cus_xxxxxxxxxxxxx", options); + CustomerBalanceTransaction customerBalanceTransaction = service + .Create("cus_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions"); @@ -917,7 +942,8 @@ public void TestCustomersBalanceTransactionsPost2() }; var service = new CustomerBalanceTransactionService( this.StripeClient); - service.Update("cus_xxxxxxxxxxxxx", "cbtxn_xxxxxxxxxxxxx", options); + CustomerBalanceTransaction customerBalanceTransaction = service + .Update("cus_xxxxxxxxxxxxx", "cbtxn_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx"); @@ -927,7 +953,7 @@ public void TestCustomersBalanceTransactionsPost2() public void TestCustomersCashBalanceGet() { var service = new CustomerCashBalanceService(this.StripeClient); - service.Get("cus_123"); + CashBalance cashBalance = service.Get("cus_123"); this.AssertRequest( HttpMethod.Get, "/v1/customers/cus_123/cash_balance"); @@ -944,7 +970,7 @@ public void TestCustomersCashBalancePost() }, }; var service = new CustomerCashBalanceService(this.StripeClient); - service.Update("cus_123", options); + CashBalance cashBalance = service.Update("cus_123", options); this.AssertRequest( HttpMethod.Post, "/v1/customers/cus_123/cash_balance"); @@ -971,7 +997,7 @@ public void TestCustomersCashBalanceTransactionsGet() public void TestCustomersDelete() { var service = new CustomerService(this.StripeClient); - service.Delete("cus_xxxxxxxxxxxxx"); + Customer deleted = service.Delete("cus_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/customers/cus_xxxxxxxxxxxxx"); @@ -992,7 +1018,9 @@ public void TestCustomersFundingInstructionsPost() }; var service = new CustomerFundingInstructionsService( this.StripeClient); - service.Create("cus_123", options); + FundingInstructions fundingInstructions = service.Create( + "cus_123", + options); this.AssertRequest( HttpMethod.Post, "/v1/customers/cus_123/funding_instructions"); @@ -1020,7 +1048,7 @@ public void TestCustomersGet2() public void TestCustomersGet3() { var service = new CustomerService(this.StripeClient); - service.Get("cus_xxxxxxxxxxxxx"); + Customer customer = service.Get("cus_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/customers/cus_xxxxxxxxxxxxx"); @@ -1068,7 +1096,7 @@ public void TestCustomersPost() Description = "My First Test Customer (created for API docs at https://www.stripe.com/docs/api)", }; var service = new CustomerService(this.StripeClient); - service.Create(options); + Customer customer = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/customers"); } @@ -1083,7 +1111,7 @@ public void TestCustomersPost2() }, }; var service = new CustomerService(this.StripeClient); - service.Update("cus_xxxxxxxxxxxxx", options); + Customer customer = service.Update("cus_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/customers/cus_xxxxxxxxxxxxx"); @@ -1097,7 +1125,7 @@ public void TestCustomersSearchGet() Query = "name:'fakename' AND metadata['foo']:'bar'", }; var service = new CustomerService(this.StripeClient); - service.Search(options); + StripeSearchResult customers = service.Search(options); this.AssertRequest( HttpMethod.Get, "/v1/customers/search", @@ -1112,7 +1140,7 @@ public void TestCustomersSearchGet2() Query = "name:'fakename' AND metadata['foo']:'bar'", }; var service = new CustomerService(this.StripeClient); - service.Search(options); + StripeSearchResult customers = service.Search(options); this.AssertRequest( HttpMethod.Get, "/v1/customers/search", @@ -1123,7 +1151,9 @@ public void TestCustomersSearchGet2() public void TestCustomersTaxIdsDelete() { var service = new CustomerTaxIdService(this.StripeClient); - service.Delete("cus_xxxxxxxxxxxxx", "txi_xxxxxxxxxxxxx"); + TaxId deleted = service.Delete( + "cus_xxxxxxxxxxxxx", + "txi_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx"); @@ -1147,7 +1177,7 @@ public void TestCustomersTaxIdsGet() public void TestCustomersTaxIdsGet2() { var service = new CustomerTaxIdService(this.StripeClient); - service.Get("cus_xxxxxxxxxxxxx", "txi_xxxxxxxxxxxxx"); + TaxId taxId = service.Get("cus_xxxxxxxxxxxxx", "txi_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx"); @@ -1162,7 +1192,7 @@ public void TestCustomersTaxIdsPost() Value = "DE123456789", }; var service = new CustomerTaxIdService(this.StripeClient); - service.Create("cus_xxxxxxxxxxxxx", options); + TaxId taxId = service.Create("cus_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids"); @@ -1172,7 +1202,7 @@ public void TestCustomersTaxIdsPost() public void TestDisputesClosePost() { var service = new DisputeService(this.StripeClient); - service.Close("dp_xxxxxxxxxxxxx"); + Dispute dispute = service.Close("dp_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/disputes/dp_xxxxxxxxxxxxx/close"); @@ -1191,7 +1221,7 @@ public void TestDisputesGet() public void TestDisputesGet2() { var service = new DisputeService(this.StripeClient); - service.Get("dp_xxxxxxxxxxxxx"); + Dispute dispute = service.Get("dp_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/disputes/dp_xxxxxxxxxxxxx"); } @@ -1206,7 +1236,7 @@ public void TestDisputesPost() }, }; var service = new DisputeService(this.StripeClient); - service.Update("dp_xxxxxxxxxxxxx", options); + Dispute dispute = service.Update("dp_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/disputes/dp_xxxxxxxxxxxxx"); @@ -1225,7 +1255,7 @@ public void TestEventsGet() public void TestEventsGet2() { var service = new EventService(this.StripeClient); - service.Get("evt_xxxxxxxxxxxxx"); + Event result = service.Get("evt_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/events/evt_xxxxxxxxxxxxx"); } @@ -1242,7 +1272,7 @@ public void TestFileLinksGet() public void TestFileLinksGet2() { var service = new FileLinkService(this.StripeClient); - service.Get("link_xxxxxxxxxxxxx"); + FileLink fileLink = service.Get("link_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/file_links/link_xxxxxxxxxxxxx"); @@ -1256,7 +1286,7 @@ public void TestFileLinksPost() File = "file_xxxxxxxxxxxxx", }; var service = new FileLinkService(this.StripeClient); - service.Create(options); + FileLink fileLink = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/file_links"); } @@ -1271,7 +1301,7 @@ public void TestFileLinksPost2() }, }; var service = new FileLinkService(this.StripeClient); - service.Update("link_xxxxxxxxxxxxx", options); + FileLink fileLink = service.Update("link_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/file_links/link_xxxxxxxxxxxxx"); @@ -1290,7 +1320,7 @@ public void TestFilesGet() public void TestFilesGet2() { var service = new FileService(this.StripeClient); - service.Get("file_xxxxxxxxxxxxx"); + File file = service.Get("file_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/files/file_xxxxxxxxxxxxx"); } @@ -1304,7 +1334,7 @@ public void TestFilesPost() System.Text.Encoding.UTF8.GetBytes("File contents")), }; var service = new FileService(this.StripeClient); - service.Create(options); + File file = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/files"); } @@ -1313,7 +1343,8 @@ public void TestFinancialConnectionsAccountsDisconnectPost() { var service = new Stripe.FinancialConnections.AccountService( this.StripeClient); - service.Disconnect("fca_xyz"); + Stripe.FinancialConnections.Account account = service.Disconnect( + "fca_xyz"); this.AssertRequest( HttpMethod.Post, "/v1/financial_connections/accounts/fca_xyz/disconnect"); @@ -1324,7 +1355,8 @@ public void TestFinancialConnectionsAccountsDisconnectPost2() { var service = new Stripe.FinancialConnections.AccountService( this.StripeClient); - service.Disconnect("fca_xxxxxxxxxxxxx"); + Stripe.FinancialConnections.Account account = service.Disconnect( + "fca_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/disconnect"); @@ -1347,7 +1379,8 @@ public void TestFinancialConnectionsAccountsGet2() { var service = new Stripe.FinancialConnections.AccountService( this.StripeClient); - service.Get("fca_xyz"); + Stripe.FinancialConnections.Account account = service.Get( + "fca_xyz"); this.AssertRequest( HttpMethod.Get, "/v1/financial_connections/accounts/fca_xyz"); @@ -1378,7 +1411,8 @@ public void TestFinancialConnectionsAccountsGet4() { var service = new Stripe.FinancialConnections.AccountService( this.StripeClient); - service.Get("fca_xxxxxxxxxxxxx"); + Stripe.FinancialConnections.Account account = service.Get( + "fca_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx"); @@ -1428,7 +1462,9 @@ public void TestFinancialConnectionsAccountsRefreshPost() }; var service = new Stripe.FinancialConnections.AccountService( this.StripeClient); - service.Refresh("fca_xyz", options); + Stripe.FinancialConnections.Account account = service.Refresh( + "fca_xyz", + options); this.AssertRequest( HttpMethod.Post, "/v1/financial_connections/accounts/fca_xyz/refresh"); @@ -1443,7 +1479,9 @@ public void TestFinancialConnectionsAccountsSubscribePost() }; var service = new Stripe.FinancialConnections.AccountService( this.StripeClient); - service.Subscribe("fa_123", options); + Stripe.FinancialConnections.Account account = service.Subscribe( + "fa_123", + options); this.AssertRequest( HttpMethod.Post, "/v1/financial_connections/accounts/fa_123/subscribe"); @@ -1458,7 +1496,9 @@ public void TestFinancialConnectionsAccountsUnsubscribePost() }; var service = new Stripe.FinancialConnections.AccountService( this.StripeClient); - service.Unsubscribe("fa_123", options); + Stripe.FinancialConnections.Account account = service.Unsubscribe( + "fa_123", + options); this.AssertRequest( HttpMethod.Post, "/v1/financial_connections/accounts/fa_123/unsubscribe"); @@ -1469,7 +1509,8 @@ public void TestFinancialConnectionsSessionsGet() { var service = new Stripe.FinancialConnections.SessionService( this.StripeClient); - service.Get("fcsess_xyz"); + Stripe.FinancialConnections.Session session = service.Get( + "fcsess_xyz"); this.AssertRequest( HttpMethod.Get, "/v1/financial_connections/sessions/fcsess_xyz"); @@ -1480,7 +1521,8 @@ public void TestFinancialConnectionsSessionsGet2() { var service = new Stripe.FinancialConnections.SessionService( this.StripeClient); - service.Get("fcsess_xxxxxxxxxxxxx"); + Stripe.FinancialConnections.Session session = service.Get( + "fcsess_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/financial_connections/sessions/fcsess_xxxxxxxxxxxxx"); @@ -1500,7 +1542,8 @@ public void TestFinancialConnectionsSessionsPost() }; var service = new Stripe.FinancialConnections.SessionService( this.StripeClient); - service.Create(options); + Stripe.FinancialConnections.Session session = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v1/financial_connections/sessions"); @@ -1524,7 +1567,8 @@ public void TestFinancialConnectionsSessionsPost2() }; var service = new Stripe.FinancialConnections.SessionService( this.StripeClient); - service.Create(options); + Stripe.FinancialConnections.Session session = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v1/financial_connections/sessions"); @@ -1535,7 +1579,8 @@ public void TestFinancialConnectionsTransactionsGet() { var service = new Stripe.FinancialConnections.TransactionService( this.StripeClient); - service.Get("tr_123"); + Stripe.FinancialConnections.Transaction transaction = service.Get( + "tr_123"); this.AssertRequest( HttpMethod.Get, "/v1/financial_connections/transactions/tr_123"); @@ -1580,7 +1625,8 @@ public void TestIdentityVerificationReportsGet2() { var service = new Stripe.Identity.VerificationReportService( this.StripeClient); - service.Get("vr_xxxxxxxxxxxxx"); + Stripe.Identity.VerificationReport verificationReport = service.Get( + "vr_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/identity/verification_reports/vr_xxxxxxxxxxxxx"); @@ -1591,7 +1637,8 @@ public void TestIdentityVerificationSessionsCancelPost() { var service = new Stripe.Identity.VerificationSessionService( this.StripeClient); - service.Cancel("vs_xxxxxxxxxxxxx"); + Stripe.Identity.VerificationSession verificationSession = service + .Cancel("vs_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/cancel"); @@ -1619,7 +1666,8 @@ public void TestIdentityVerificationSessionsGet2() { var service = new Stripe.Identity.VerificationSessionService( this.StripeClient); - service.Get("vs_xxxxxxxxxxxxx"); + Stripe.Identity.VerificationSession verificationSession = service + .Get("vs_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx"); @@ -1634,7 +1682,8 @@ public void TestIdentityVerificationSessionsPost() }; var service = new Stripe.Identity.VerificationSessionService( this.StripeClient); - service.Create(options); + Stripe.Identity.VerificationSession verificationSession = service + .Create(options); this.AssertRequest( HttpMethod.Post, "/v1/identity/verification_sessions"); @@ -1649,7 +1698,8 @@ public void TestIdentityVerificationSessionsPost2() }; var service = new Stripe.Identity.VerificationSessionService( this.StripeClient); - service.Update("vs_xxxxxxxxxxxxx", options); + Stripe.Identity.VerificationSession verificationSession = service + .Update("vs_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx"); @@ -1660,7 +1710,8 @@ public void TestIdentityVerificationSessionsRedactPost() { var service = new Stripe.Identity.VerificationSessionService( this.StripeClient); - service.Redact("vs_xxxxxxxxxxxxx"); + Stripe.Identity.VerificationSession verificationSession = service + .Redact("vs_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/redact"); @@ -1670,7 +1721,7 @@ public void TestIdentityVerificationSessionsRedactPost() public void TestInvoiceitemsDelete() { var service = new InvoiceItemService(this.StripeClient); - service.Delete("ii_xxxxxxxxxxxxx"); + InvoiceItem deleted = service.Delete("ii_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); @@ -1689,7 +1740,7 @@ public void TestInvoiceitemsGet() public void TestInvoiceitemsGet2() { var service = new InvoiceItemService(this.StripeClient); - service.Get("ii_xxxxxxxxxxxxx"); + InvoiceItem invoiceItem = service.Get("ii_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); @@ -1703,7 +1754,7 @@ public void TestInvoiceitemsPost() Customer = "cus_xxxxxxxxxxxxx", }; var service = new InvoiceItemService(this.StripeClient); - service.Create(options); + InvoiceItem invoiceItem = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/invoiceitems"); } @@ -1718,7 +1769,9 @@ public void TestInvoiceitemsPost2() }, }; var service = new InvoiceItemService(this.StripeClient); - service.Update("ii_xxxxxxxxxxxxx", options); + InvoiceItem invoiceItem = service.Update( + "ii_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); @@ -1728,7 +1781,7 @@ public void TestInvoiceitemsPost2() public void TestInvoicesDelete() { var service = new InvoiceService(this.StripeClient); - service.Delete("in_xxxxxxxxxxxxx"); + Invoice deleted = service.Delete("in_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/invoices/in_xxxxxxxxxxxxx"); @@ -1738,7 +1791,7 @@ public void TestInvoicesDelete() public void TestInvoicesFinalizePost() { var service = new InvoiceService(this.StripeClient); - service.FinalizeInvoice("in_xxxxxxxxxxxxx"); + Invoice invoice = service.FinalizeInvoice("in_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/invoices/in_xxxxxxxxxxxxx/finalize"); @@ -1757,7 +1810,7 @@ public void TestInvoicesGet() public void TestInvoicesGet2() { var service = new InvoiceService(this.StripeClient); - service.Get("in_xxxxxxxxxxxxx"); + Invoice invoice = service.Get("in_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/invoices/in_xxxxxxxxxxxxx"); } @@ -1769,7 +1822,7 @@ public void TestInvoicesGet3() Expand = new List { "customer" }, }; var service = new InvoiceService(this.StripeClient); - service.Get("in_xxxxxxxxxxxxx", options); + Invoice invoice = service.Get("in_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Get, "/v1/invoices/in_xxxxxxxxxxxxx", @@ -1780,7 +1833,7 @@ public void TestInvoicesGet3() public void TestInvoicesMarkUncollectiblePost() { var service = new InvoiceService(this.StripeClient); - service.MarkUncollectible("in_xxxxxxxxxxxxx"); + Invoice invoice = service.MarkUncollectible("in_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/invoices/in_xxxxxxxxxxxxx/mark_uncollectible"); @@ -1790,7 +1843,7 @@ public void TestInvoicesMarkUncollectiblePost() public void TestInvoicesPayPost() { var service = new InvoiceService(this.StripeClient); - service.Pay("in_xxxxxxxxxxxxx"); + Invoice invoice = service.Pay("in_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/invoices/in_xxxxxxxxxxxxx/pay"); @@ -1804,7 +1857,7 @@ public void TestInvoicesPost() Customer = "cus_xxxxxxxxxxxxx", }; var service = new InvoiceService(this.StripeClient); - service.Create(options); + Invoice invoice = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/invoices"); } @@ -1819,7 +1872,7 @@ public void TestInvoicesPost2() }, }; var service = new InvoiceService(this.StripeClient); - service.Update("in_xxxxxxxxxxxxx", options); + Invoice invoice = service.Update("in_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/invoices/in_xxxxxxxxxxxxx"); @@ -1833,7 +1886,7 @@ public void TestInvoicesSearchGet() Query = "total>999 AND metadata['order_id']:'6735'", }; var service = new InvoiceService(this.StripeClient); - service.Search(options); + StripeSearchResult invoices = service.Search(options); this.AssertRequest( HttpMethod.Get, "/v1/invoices/search", @@ -1844,7 +1897,7 @@ public void TestInvoicesSearchGet() public void TestInvoicesSendPost() { var service = new InvoiceService(this.StripeClient); - service.SendInvoice("in_xxxxxxxxxxxxx"); + Invoice invoice = service.SendInvoice("in_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/invoices/in_xxxxxxxxxxxxx/send"); @@ -1854,7 +1907,7 @@ public void TestInvoicesSendPost() public void TestInvoicesVoidPost() { var service = new InvoiceService(this.StripeClient); - service.VoidInvoice("in_xxxxxxxxxxxxx"); + Invoice invoice = service.VoidInvoice("in_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/invoices/in_xxxxxxxxxxxxx/void"); @@ -1865,7 +1918,8 @@ public void TestIssuingAuthorizationsApprovePost() { var service = new Stripe.Issuing.AuthorizationService( this.StripeClient); - service.Approve("iauth_xxxxxxxxxxxxx"); + Stripe.Issuing.Authorization authorization = service.Approve( + "iauth_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/approve"); @@ -1876,7 +1930,8 @@ public void TestIssuingAuthorizationsDeclinePost() { var service = new Stripe.Issuing.AuthorizationService( this.StripeClient); - service.Decline("iauth_xxxxxxxxxxxxx"); + Stripe.Issuing.Authorization authorization = service.Decline( + "iauth_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/decline"); @@ -1904,7 +1959,8 @@ public void TestIssuingAuthorizationsGet2() { var service = new Stripe.Issuing.AuthorizationService( this.StripeClient); - service.Get("iauth_xxxxxxxxxxxxx"); + Stripe.Issuing.Authorization authorization = service.Get( + "iauth_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx"); @@ -1922,7 +1978,9 @@ public void TestIssuingAuthorizationsPost() }; var service = new Stripe.Issuing.AuthorizationService( this.StripeClient); - service.Update("iauth_xxxxxxxxxxxxx", options); + Stripe.Issuing.Authorization authorization = service.Update( + "iauth_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx"); @@ -1950,7 +2008,8 @@ public void TestIssuingCardholdersGet2() { var service = new Stripe.Issuing.CardholderService( this.StripeClient); - service.Get("ich_xxxxxxxxxxxxx"); + Stripe.Issuing.Cardholder cardholder = service.Get( + "ich_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/issuing/cardholders/ich_xxxxxxxxxxxxx"); @@ -1979,7 +2038,7 @@ public void TestIssuingCardholdersPost() }; var service = new Stripe.Issuing.CardholderService( this.StripeClient); - service.Create(options); + Stripe.Issuing.Cardholder cardholder = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/issuing/cardholders"); } @@ -1995,7 +2054,9 @@ public void TestIssuingCardholdersPost2() }; var service = new Stripe.Issuing.CardholderService( this.StripeClient); - service.Update("ich_xxxxxxxxxxxxx", options); + Stripe.Issuing.Cardholder cardholder = service.Update( + "ich_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/issuing/cardholders/ich_xxxxxxxxxxxxx"); @@ -2014,7 +2075,7 @@ public void TestIssuingCardsGet() public void TestIssuingCardsGet2() { var service = new Stripe.Issuing.CardService(this.StripeClient); - service.Get("ic_xxxxxxxxxxxxx"); + Stripe.Issuing.Card card = service.Get("ic_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/issuing/cards/ic_xxxxxxxxxxxxx"); @@ -2030,7 +2091,7 @@ public void TestIssuingCardsPost() Type = "virtual", }; var service = new Stripe.Issuing.CardService(this.StripeClient); - service.Create(options); + Stripe.Issuing.Card card = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/issuing/cards"); } @@ -2045,7 +2106,9 @@ public void TestIssuingCardsPost2() }, }; var service = new Stripe.Issuing.CardService(this.StripeClient); - service.Update("ic_xxxxxxxxxxxxx", options); + Stripe.Issuing.Card card = service.Update( + "ic_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/issuing/cards/ic_xxxxxxxxxxxxx"); @@ -2067,7 +2130,7 @@ public void TestIssuingDisputesGet() public void TestIssuingDisputesGet2() { var service = new Stripe.Issuing.DisputeService(this.StripeClient); - service.Get("idp_xxxxxxxxxxxxx"); + Stripe.Issuing.Dispute dispute = service.Get("idp_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/issuing/disputes/idp_xxxxxxxxxxxxx"); @@ -2089,7 +2152,7 @@ public void TestIssuingDisputesPost() }, }; var service = new Stripe.Issuing.DisputeService(this.StripeClient); - service.Create(options); + Stripe.Issuing.Dispute dispute = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/issuing/disputes"); } @@ -2097,7 +2160,8 @@ public void TestIssuingDisputesPost() public void TestIssuingDisputesSubmitPost() { var service = new Stripe.Issuing.DisputeService(this.StripeClient); - service.Submit("idp_xxxxxxxxxxxxx"); + Stripe.Issuing.Dispute dispute = service.Submit( + "idp_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/issuing/disputes/idp_xxxxxxxxxxxxx/submit"); @@ -2120,7 +2184,8 @@ public void TestIssuingPersonalizationDesignsGet2() { var service = new Stripe.Issuing.PersonalizationDesignService( this.StripeClient); - service.Get("pd_xyz"); + Stripe.Issuing.PersonalizationDesign personalizationDesign = service + .Get("pd_xyz"); this.AssertRequest( HttpMethod.Get, "/v1/issuing/personalization_designs/pd_xyz"); @@ -2135,7 +2200,8 @@ public void TestIssuingPersonalizationDesignsPost() }; var service = new Stripe.Issuing.PersonalizationDesignService( this.StripeClient); - service.Create(options); + Stripe.Issuing.PersonalizationDesign personalizationDesign = service + .Create(options); this.AssertRequest( HttpMethod.Post, "/v1/issuing/personalization_designs"); @@ -2147,7 +2213,8 @@ public void TestIssuingPersonalizationDesignsPost2() var options = new Stripe.Issuing.PersonalizationDesignUpdateOptions(); var service = new Stripe.Issuing.PersonalizationDesignService( this.StripeClient); - service.Update("pd_xyz", options); + Stripe.Issuing.PersonalizationDesign personalizationDesign = service + .Update("pd_xyz", options); this.AssertRequest( HttpMethod.Post, "/v1/issuing/personalization_designs/pd_xyz"); @@ -2168,7 +2235,8 @@ public void TestIssuingPhysicalBundlesGet2() { var service = new Stripe.Issuing.PhysicalBundleService( this.StripeClient); - service.Get("pb_xyz"); + Stripe.Issuing.PhysicalBundle physicalBundle = service.Get( + "pb_xyz"); this.AssertRequest( HttpMethod.Get, "/v1/issuing/physical_bundles/pb_xyz"); @@ -2196,7 +2264,8 @@ public void TestIssuingTransactionsGet2() { var service = new Stripe.Issuing.TransactionService( this.StripeClient); - service.Get("ipi_xxxxxxxxxxxxx"); + Stripe.Issuing.Transaction transaction = service.Get( + "ipi_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/issuing/transactions/ipi_xxxxxxxxxxxxx"); @@ -2214,7 +2283,9 @@ public void TestIssuingTransactionsPost() }; var service = new Stripe.Issuing.TransactionService( this.StripeClient); - service.Update("ipi_xxxxxxxxxxxxx", options); + Stripe.Issuing.Transaction transaction = service.Update( + "ipi_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/issuing/transactions/ipi_xxxxxxxxxxxxx"); @@ -2224,7 +2295,7 @@ public void TestIssuingTransactionsPost() public void TestMandatesGet() { var service = new MandateService(this.StripeClient); - service.Get("mandate_xxxxxxxxxxxxx"); + Mandate mandate = service.Get("mandate_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/mandates/mandate_xxxxxxxxxxxxx"); @@ -2234,7 +2305,8 @@ public void TestMandatesGet() public void TestPaymentIntentsApplyCustomerBalancePost() { var service = new PaymentIntentService(this.StripeClient); - service.ApplyCustomerBalance("pi_xxxxxxxxxxxxx"); + PaymentIntent paymentIntent = service.ApplyCustomerBalance( + "pi_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/payment_intents/pi_xxxxxxxxxxxxx/apply_customer_balance"); @@ -2244,7 +2316,7 @@ public void TestPaymentIntentsApplyCustomerBalancePost() public void TestPaymentIntentsCancelPost() { var service = new PaymentIntentService(this.StripeClient); - service.Cancel("pi_xxxxxxxxxxxxx"); + PaymentIntent paymentIntent = service.Cancel("pi_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/payment_intents/pi_xxxxxxxxxxxxx/cancel"); @@ -2254,7 +2326,7 @@ public void TestPaymentIntentsCancelPost() public void TestPaymentIntentsCapturePost() { var service = new PaymentIntentService(this.StripeClient); - service.Capture("pi_xxxxxxxxxxxxx"); + PaymentIntent paymentIntent = service.Capture("pi_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/payment_intents/pi_xxxxxxxxxxxxx/capture"); @@ -2268,7 +2340,9 @@ public void TestPaymentIntentsConfirmPost() PaymentMethod = "pm_card_visa", }; var service = new PaymentIntentService(this.StripeClient); - service.Confirm("pi_xxxxxxxxxxxxx", options); + PaymentIntent paymentIntent = service.Confirm( + "pi_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/payment_intents/pi_xxxxxxxxxxxxx/confirm"); @@ -2290,7 +2364,7 @@ public void TestPaymentIntentsGet() public void TestPaymentIntentsGet2() { var service = new PaymentIntentService(this.StripeClient); - service.Get("pi_xxxxxxxxxxxxx"); + PaymentIntent paymentIntent = service.Get("pi_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/payment_intents/pi_xxxxxxxxxxxxx"); @@ -2304,7 +2378,9 @@ public void TestPaymentIntentsIncrementAuthorizationPost() Amount = 2099, }; var service = new PaymentIntentService(this.StripeClient); - service.IncrementAuthorization("pi_xxxxxxxxxxxxx", options); + PaymentIntent paymentIntent = service.IncrementAuthorization( + "pi_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/payment_intents/pi_xxxxxxxxxxxxx/increment_authorization"); @@ -2323,7 +2399,7 @@ public void TestPaymentIntentsPost() }, }; var service = new PaymentIntentService(this.StripeClient); - service.Create(options); + PaymentIntent paymentIntent = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); } @@ -2340,7 +2416,7 @@ public void TestPaymentIntentsPost2() }, }; var service = new PaymentIntentService(this.StripeClient); - service.Create(options); + PaymentIntent paymentIntent = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); } @@ -2355,7 +2431,9 @@ public void TestPaymentIntentsPost3() }, }; var service = new PaymentIntentService(this.StripeClient); - service.Update("pi_xxxxxxxxxxxxx", options); + PaymentIntent paymentIntent = service.Update( + "pi_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/payment_intents/pi_xxxxxxxxxxxxx"); @@ -2378,7 +2456,7 @@ public void TestPaymentIntentsPost4() }, }; var service = new PaymentIntentService(this.StripeClient); - service.Create(options); + PaymentIntent paymentIntent = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); } @@ -2390,7 +2468,8 @@ public void TestPaymentIntentsSearchGet() Query = "status:'succeeded' AND metadata['order_id']:'6735'", }; var service = new PaymentIntentService(this.StripeClient); - service.Search(options); + StripeSearchResult paymentIntents = service.Search( + options); this.AssertRequest( HttpMethod.Get, "/v1/payment_intents/search", @@ -2401,7 +2480,8 @@ public void TestPaymentIntentsSearchGet() public void TestPaymentIntentsVerifyMicrodepositsPost() { var service = new PaymentIntentService(this.StripeClient); - service.VerifyMicrodeposits("pi_xxxxxxxxxxxxx"); + PaymentIntent paymentIntent = service.VerifyMicrodeposits( + "pi_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits"); @@ -2415,7 +2495,9 @@ public void TestPaymentIntentsVerifyMicrodepositsPost2() Amounts = new List { 32, 45 }, }; var service = new PaymentIntentService(this.StripeClient); - service.VerifyMicrodeposits("pi_xxxxxxxxxxxxx", options); + PaymentIntent paymentIntent = service.VerifyMicrodeposits( + "pi_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits"); @@ -2425,7 +2507,7 @@ public void TestPaymentIntentsVerifyMicrodepositsPost2() public void TestPaymentLinksGet() { var service = new PaymentLinkService(this.StripeClient); - service.Get("pl_xyz"); + PaymentLink paymentLink = service.Get("pl_xyz"); this.AssertRequest(HttpMethod.Get, "/v1/payment_links/pl_xyz"); } @@ -2442,7 +2524,7 @@ public void TestPaymentLinksGet2() public void TestPaymentLinksGet3() { var service = new PaymentLinkService(this.StripeClient); - service.Get("plink_xxxxxxxxxxxxx"); + PaymentLink paymentLink = service.Get("plink_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/payment_links/plink_xxxxxxxxxxxxx"); @@ -2473,7 +2555,7 @@ public void TestPaymentLinksPost() }, }; var service = new PaymentLinkService(this.StripeClient); - service.Create(options); + PaymentLink paymentLink = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/payment_links"); } @@ -2492,7 +2574,7 @@ public void TestPaymentLinksPost2() }, }; var service = new PaymentLinkService(this.StripeClient); - service.Create(options); + PaymentLink paymentLink = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/payment_links"); } @@ -2501,7 +2583,9 @@ public void TestPaymentLinksPost3() { var options = new PaymentLinkUpdateOptions { Active = false }; var service = new PaymentLinkService(this.StripeClient); - service.Update("plink_xxxxxxxxxxxxx", options); + PaymentLink paymentLink = service.Update( + "plink_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/payment_links/plink_xxxxxxxxxxxxx"); @@ -2529,7 +2613,8 @@ public void TestPaymentMethodConfigurationsGet2() { var service = new PaymentMethodConfigurationService( this.StripeClient); - service.Get("foo"); + PaymentMethodConfiguration paymentMethodConfiguration = service.Get( + "foo"); this.AssertRequest( HttpMethod.Get, "/v1/payment_method_configurations/foo"); @@ -2557,7 +2642,8 @@ public void TestPaymentMethodConfigurationsPost() }; var service = new PaymentMethodConfigurationService( this.StripeClient); - service.Create(options); + PaymentMethodConfiguration paymentMethodConfiguration = service + .Create(options); this.AssertRequest( HttpMethod.Post, "/v1/payment_method_configurations"); @@ -2578,7 +2664,8 @@ public void TestPaymentMethodConfigurationsPost2() }; var service = new PaymentMethodConfigurationService( this.StripeClient); - service.Update("foo", options); + PaymentMethodConfiguration paymentMethodConfiguration = service + .Update("foo", options); this.AssertRequest( HttpMethod.Post, "/v1/payment_method_configurations/foo"); @@ -2592,7 +2679,9 @@ public void TestPaymentMethodsAttachPost() Customer = "cus_xxxxxxxxxxxxx", }; var service = new PaymentMethodService(this.StripeClient); - service.Attach("pm_xxxxxxxxxxxxx", options); + PaymentMethod paymentMethod = service.Attach( + "pm_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/payment_methods/pm_xxxxxxxxxxxxx/attach"); @@ -2602,7 +2691,7 @@ public void TestPaymentMethodsAttachPost() public void TestPaymentMethodsDetachPost() { var service = new PaymentMethodService(this.StripeClient); - service.Detach("pm_xxxxxxxxxxxxx"); + PaymentMethod paymentMethod = service.Detach("pm_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/payment_methods/pm_xxxxxxxxxxxxx/detach"); @@ -2628,7 +2717,7 @@ public void TestPaymentMethodsGet() public void TestPaymentMethodsGet2() { var service = new PaymentMethodService(this.StripeClient); - service.Get("pm_xxxxxxxxxxxxx"); + PaymentMethod paymentMethod = service.Get("pm_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/payment_methods/pm_xxxxxxxxxxxxx"); @@ -2649,7 +2738,7 @@ public void TestPaymentMethodsPost() }, }; var service = new PaymentMethodService(this.StripeClient); - service.Create(options); + PaymentMethod paymentMethod = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/payment_methods"); } @@ -2664,7 +2753,9 @@ public void TestPaymentMethodsPost2() }, }; var service = new PaymentMethodService(this.StripeClient); - service.Update("pm_xxxxxxxxxxxxx", options); + PaymentMethod paymentMethod = service.Update( + "pm_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/payment_methods/pm_xxxxxxxxxxxxx"); @@ -2674,7 +2765,7 @@ public void TestPaymentMethodsPost2() public void TestPayoutsCancelPost() { var service = new PayoutService(this.StripeClient); - service.Cancel("po_xxxxxxxxxxxxx"); + Payout payout = service.Cancel("po_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/payouts/po_xxxxxxxxxxxxx/cancel"); @@ -2693,7 +2784,7 @@ public void TestPayoutsGet() public void TestPayoutsGet2() { var service = new PayoutService(this.StripeClient); - service.Get("po_xxxxxxxxxxxxx"); + Payout payout = service.Get("po_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/payouts/po_xxxxxxxxxxxxx"); } @@ -2706,7 +2797,7 @@ public void TestPayoutsPost() Currency = "usd", }; var service = new PayoutService(this.StripeClient); - service.Create(options); + Payout payout = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/payouts"); } @@ -2721,7 +2812,7 @@ public void TestPayoutsPost2() }, }; var service = new PayoutService(this.StripeClient); - service.Update("po_xxxxxxxxxxxxx", options); + Payout payout = service.Update("po_xxxxxxxxxxxxx", options); this.AssertRequest(HttpMethod.Post, "/v1/payouts/po_xxxxxxxxxxxxx"); } @@ -2729,7 +2820,7 @@ public void TestPayoutsPost2() public void TestPayoutsReversePost() { var service = new PayoutService(this.StripeClient); - service.Reverse("po_xxxxxxxxxxxxx"); + Payout payout = service.Reverse("po_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/payouts/po_xxxxxxxxxxxxx/reverse"); @@ -2739,7 +2830,7 @@ public void TestPayoutsReversePost() public void TestPlansDelete() { var service = new PlanService(this.StripeClient); - service.Delete("price_xxxxxxxxxxxxx"); + Plan deleted = service.Delete("price_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/plans/price_xxxxxxxxxxxxx"); @@ -2758,7 +2849,7 @@ public void TestPlansGet() public void TestPlansGet2() { var service = new PlanService(this.StripeClient); - service.Get("price_xxxxxxxxxxxxx"); + Plan plan = service.Get("price_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/plans/price_xxxxxxxxxxxxx"); } @@ -2773,7 +2864,7 @@ public void TestPlansPost() Product = "prod_xxxxxxxxxxxxx", }; var service = new PlanService(this.StripeClient); - service.Create(options); + Plan plan = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/plans"); } @@ -2788,7 +2879,7 @@ public void TestPlansPost2() Product = new PlanProductOptions { Name = "My product" }, }; var service = new PlanService(this.StripeClient); - service.Create(options); + Plan plan = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/plans"); } @@ -2803,7 +2894,7 @@ public void TestPlansPost3() }, }; var service = new PlanService(this.StripeClient); - service.Update("price_xxxxxxxxxxxxx", options); + Plan plan = service.Update("price_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/plans/price_xxxxxxxxxxxxx"); @@ -2822,7 +2913,7 @@ public void TestPricesGet() public void TestPricesGet2() { var service = new PriceService(this.StripeClient); - service.Get("price_xxxxxxxxxxxxx"); + Price price = service.Get("price_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/prices/price_xxxxxxxxxxxxx"); @@ -2854,7 +2945,7 @@ public void TestPricesPost() Product = "prod_xxxxxxxxxxxxx", }; var service = new PriceService(this.StripeClient); - service.Create(options); + Price price = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/prices"); } @@ -2869,7 +2960,7 @@ public void TestPricesPost2() Product = "prod_xxxxxxxxxxxxx", }; var service = new PriceService(this.StripeClient); - service.Create(options); + Price price = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/prices"); } @@ -2884,7 +2975,7 @@ public void TestPricesPost3() }, }; var service = new PriceService(this.StripeClient); - service.Update("price_xxxxxxxxxxxxx", options); + Price price = service.Update("price_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/prices/price_xxxxxxxxxxxxx"); @@ -2898,7 +2989,7 @@ public void TestPricesSearchGet() Query = "active:'true' AND metadata['order_id']:'6735'", }; var service = new PriceService(this.StripeClient); - service.Search(options); + StripeSearchResult prices = service.Search(options); this.AssertRequest( HttpMethod.Get, "/v1/prices/search", @@ -2909,7 +3000,7 @@ public void TestPricesSearchGet() public void TestProductsDelete() { var service = new ProductService(this.StripeClient); - service.Delete("prod_xxxxxxxxxxxxx"); + Product deleted = service.Delete("prod_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/products/prod_xxxxxxxxxxxxx"); @@ -2928,7 +3019,7 @@ public void TestProductsGet() public void TestProductsGet2() { var service = new ProductService(this.StripeClient); - service.Get("prod_xxxxxxxxxxxxx"); + Product product = service.Get("prod_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/products/prod_xxxxxxxxxxxxx"); @@ -2939,7 +3030,7 @@ public void TestProductsPost() { var options = new ProductCreateOptions { Name = "Gold Special" }; var service = new ProductService(this.StripeClient); - service.Create(options); + Product product = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/products"); } @@ -2954,7 +3045,7 @@ public void TestProductsPost2() }, }; var service = new ProductService(this.StripeClient); - service.Update("prod_xxxxxxxxxxxxx", options); + Product product = service.Update("prod_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/products/prod_xxxxxxxxxxxxx"); @@ -2968,7 +3059,7 @@ public void TestProductsSearchGet() Query = "active:'true' AND metadata['order_id']:'6735'", }; var service = new ProductService(this.StripeClient); - service.Search(options); + StripeSearchResult products = service.Search(options); this.AssertRequest( HttpMethod.Get, "/v1/products/search", @@ -2991,7 +3082,7 @@ public void TestPromotionCodesGet() public void TestPromotionCodesGet2() { var service = new PromotionCodeService(this.StripeClient); - service.Get("promo_xxxxxxxxxxxxx"); + PromotionCode promotionCode = service.Get("promo_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/promotion_codes/promo_xxxxxxxxxxxxx"); @@ -3005,7 +3096,7 @@ public void TestPromotionCodesPost() Coupon = "Z4OV52SU", }; var service = new PromotionCodeService(this.StripeClient); - service.Create(options); + PromotionCode promotionCode = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/promotion_codes"); } @@ -3020,7 +3111,9 @@ public void TestPromotionCodesPost2() }, }; var service = new PromotionCodeService(this.StripeClient); - service.Update("promo_xxxxxxxxxxxxx", options); + PromotionCode promotionCode = service.Update( + "promo_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/promotion_codes/promo_xxxxxxxxxxxxx"); @@ -3030,7 +3123,7 @@ public void TestPromotionCodesPost2() public void TestQuotesAcceptPost() { var service = new QuoteService(this.StripeClient); - service.Accept("qt_xxxxxxxxxxxxx"); + Quote quote = service.Accept("qt_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/quotes/qt_xxxxxxxxxxxxx/accept"); @@ -3040,7 +3133,7 @@ public void TestQuotesAcceptPost() public void TestQuotesCancelPost() { var service = new QuoteService(this.StripeClient); - service.Cancel("qt_xxxxxxxxxxxxx"); + Quote quote = service.Cancel("qt_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/quotes/qt_xxxxxxxxxxxxx/cancel"); @@ -3050,7 +3143,7 @@ public void TestQuotesCancelPost() public void TestQuotesFinalizePost() { var service = new QuoteService(this.StripeClient); - service.FinalizeQuote("qt_xxxxxxxxxxxxx"); + Quote quote = service.FinalizeQuote("qt_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/quotes/qt_xxxxxxxxxxxxx/finalize"); @@ -3069,7 +3162,7 @@ public void TestQuotesGet() public void TestQuotesGet2() { var service = new QuoteService(this.StripeClient); - service.Get("qt_xxxxxxxxxxxxx"); + Quote quote = service.Get("qt_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_xxxxxxxxxxxxx"); } @@ -3109,7 +3202,7 @@ public void TestQuotesPost() }, }; var service = new QuoteService(this.StripeClient); - service.Create(options); + Quote quote = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/quotes"); } @@ -3124,7 +3217,7 @@ public void TestQuotesPost2() }, }; var service = new QuoteService(this.StripeClient); - service.Update("qt_xxxxxxxxxxxxx", options); + Quote quote = service.Update("qt_xxxxxxxxxxxxx", options); this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_xxxxxxxxxxxxx"); } @@ -3161,7 +3254,8 @@ public void TestRadarEarlyFraudWarningsGet2() { var service = new Stripe.Radar.EarlyFraudWarningService( this.StripeClient); - service.Get("issfr_xxxxxxxxxxxxx"); + Stripe.Radar.EarlyFraudWarning earlyFraudWarning = service.Get( + "issfr_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/radar/early_fraud_warnings/issfr_xxxxxxxxxxxxx"); @@ -3172,7 +3266,8 @@ public void TestRadarValueListItemsDelete() { var service = new Stripe.Radar.ValueListItemService( this.StripeClient); - service.Delete("rsli_xxxxxxxxxxxxx"); + Stripe.Radar.ValueListItem deleted = service.Delete( + "rsli_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx"); @@ -3201,7 +3296,8 @@ public void TestRadarValueListItemsGet2() { var service = new Stripe.Radar.ValueListItemService( this.StripeClient); - service.Get("rsli_xxxxxxxxxxxxx"); + Stripe.Radar.ValueListItem valueListItem = service.Get( + "rsli_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx"); @@ -3217,7 +3313,7 @@ public void TestRadarValueListItemsPost() }; var service = new Stripe.Radar.ValueListItemService( this.StripeClient); - service.Create(options); + Stripe.Radar.ValueListItem valueListItem = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/radar/value_list_items"); } @@ -3225,7 +3321,8 @@ public void TestRadarValueListItemsPost() public void TestRadarValueListsDelete() { var service = new Stripe.Radar.ValueListService(this.StripeClient); - service.Delete("rsl_xxxxxxxxxxxxx"); + Stripe.Radar.ValueList deleted = service.Delete( + "rsl_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); @@ -3248,7 +3345,7 @@ public void TestRadarValueListsGet() public void TestRadarValueListsGet2() { var service = new Stripe.Radar.ValueListService(this.StripeClient); - service.Get("rsl_xxxxxxxxxxxxx"); + Stripe.Radar.ValueList valueList = service.Get("rsl_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); @@ -3264,7 +3361,7 @@ public void TestRadarValueListsPost() ItemType = "ip_address", }; var service = new Stripe.Radar.ValueListService(this.StripeClient); - service.Create(options); + Stripe.Radar.ValueList valueList = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/radar/value_lists"); } @@ -3276,7 +3373,9 @@ public void TestRadarValueListsPost2() Name = "Updated IP Block List", }; var service = new Stripe.Radar.ValueListService(this.StripeClient); - service.Update("rsl_xxxxxxxxxxxxx", options); + Stripe.Radar.ValueList valueList = service.Update( + "rsl_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); @@ -3286,7 +3385,7 @@ public void TestRadarValueListsPost2() public void TestRefundsCancelPost() { var service = new RefundService(this.StripeClient); - service.Cancel("re_xxxxxxxxxxxxx"); + Refund refund = service.Cancel("re_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/refunds/re_xxxxxxxxxxxxx/cancel"); @@ -3305,7 +3404,7 @@ public void TestRefundsGet() public void TestRefundsGet2() { var service = new RefundService(this.StripeClient); - service.Get("re_xxxxxxxxxxxxx"); + Refund refund = service.Get("re_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/refunds/re_xxxxxxxxxxxxx"); } @@ -3317,7 +3416,7 @@ public void TestRefundsPost() Charge = "ch_xxxxxxxxxxxxx", }; var service = new RefundService(this.StripeClient); - service.Create(options); + Refund refund = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/refunds"); } @@ -3332,7 +3431,7 @@ public void TestRefundsPost2() }, }; var service = new RefundService(this.StripeClient); - service.Update("re_xxxxxxxxxxxxx", options); + Refund refund = service.Update("re_xxxxxxxxxxxxx", options); this.AssertRequest(HttpMethod.Post, "/v1/refunds/re_xxxxxxxxxxxxx"); } @@ -3358,7 +3457,8 @@ public void TestReportingReportRunsGet2() { var service = new Stripe.Reporting.ReportRunService( this.StripeClient); - service.Get("frr_xxxxxxxxxxxxx"); + Stripe.Reporting.ReportRun reportRun = service.Get( + "frr_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/reporting/report_runs/frr_xxxxxxxxxxxxx"); @@ -3381,7 +3481,7 @@ public void TestReportingReportRunsPost() }; var service = new Stripe.Reporting.ReportRunService( this.StripeClient); - service.Create(options); + Stripe.Reporting.ReportRun reportRun = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/reporting/report_runs"); } @@ -3400,7 +3500,8 @@ public void TestReportingReportTypesGet2() { var service = new Stripe.Reporting.ReportTypeService( this.StripeClient); - service.Get("balance.summary.1"); + Stripe.Reporting.ReportType reportType = service.Get( + "balance.summary.1"); this.AssertRequest( HttpMethod.Get, "/v1/reporting/report_types/balance.summary.1"); @@ -3410,7 +3511,7 @@ public void TestReportingReportTypesGet2() public void TestReviewsApprovePost() { var service = new ReviewService(this.StripeClient); - service.Approve("prv_xxxxxxxxxxxxx"); + Review review = service.Approve("prv_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/reviews/prv_xxxxxxxxxxxxx/approve"); @@ -3429,7 +3530,7 @@ public void TestReviewsGet() public void TestReviewsGet2() { var service = new ReviewService(this.StripeClient); - service.Get("prv_xxxxxxxxxxxxx"); + Review review = service.Get("prv_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/reviews/prv_xxxxxxxxxxxxx"); } @@ -3453,7 +3554,7 @@ public void TestSetupAttemptsGet() public void TestSetupIntentsCancelPost() { var service = new SetupIntentService(this.StripeClient); - service.Cancel("seti_xxxxxxxxxxxxx"); + SetupIntent setupIntent = service.Cancel("seti_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/setup_intents/seti_xxxxxxxxxxxxx/cancel"); @@ -3467,7 +3568,9 @@ public void TestSetupIntentsConfirmPost() PaymentMethod = "pm_card_visa", }; var service = new SetupIntentService(this.StripeClient); - service.Confirm("seti_xxxxxxxxxxxxx", options); + SetupIntent setupIntent = service.Confirm( + "seti_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/setup_intents/seti_xxxxxxxxxxxxx/confirm"); @@ -3486,7 +3589,7 @@ public void TestSetupIntentsGet() public void TestSetupIntentsGet2() { var service = new SetupIntentService(this.StripeClient); - service.Get("seti_xxxxxxxxxxxxx"); + SetupIntent setupIntent = service.Get("seti_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/setup_intents/seti_xxxxxxxxxxxxx"); @@ -3500,7 +3603,7 @@ public void TestSetupIntentsPost() PaymentMethodTypes = new List { "card" }, }; var service = new SetupIntentService(this.StripeClient); - service.Create(options); + SetupIntent setupIntent = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/setup_intents"); } @@ -3515,7 +3618,9 @@ public void TestSetupIntentsPost2() }, }; var service = new SetupIntentService(this.StripeClient); - service.Update("seti_xxxxxxxxxxxxx", options); + SetupIntent setupIntent = service.Update( + "seti_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/setup_intents/seti_xxxxxxxxxxxxx"); @@ -3525,7 +3630,8 @@ public void TestSetupIntentsPost2() public void TestSetupIntentsVerifyMicrodepositsPost() { var service = new SetupIntentService(this.StripeClient); - service.VerifyMicrodeposits("seti_xxxxxxxxxxxxx"); + SetupIntent setupIntent = service.VerifyMicrodeposits( + "seti_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits"); @@ -3539,7 +3645,9 @@ public void TestSetupIntentsVerifyMicrodepositsPost2() Amounts = new List { 32, 45 }, }; var service = new SetupIntentService(this.StripeClient); - service.VerifyMicrodeposits("seti_xxxxxxxxxxxxx", options); + SetupIntent setupIntent = service.VerifyMicrodeposits( + "seti_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits"); @@ -3566,7 +3674,7 @@ public void TestShippingRatesGet2() public void TestShippingRatesGet3() { var service = new ShippingRateService(this.StripeClient); - service.Get("shr_xxxxxxxxxxxxx"); + ShippingRate shippingRate = service.Get("shr_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/shipping_rates/shr_xxxxxxxxxxxxx"); @@ -3586,7 +3694,7 @@ public void TestShippingRatesPost() Type = "fixed_amount", }; var service = new ShippingRateService(this.StripeClient); - service.Create(options); + ShippingRate shippingRate = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/shipping_rates"); } @@ -3604,7 +3712,7 @@ public void TestShippingRatesPost2() }, }; var service = new ShippingRateService(this.StripeClient); - service.Create(options); + ShippingRate shippingRate = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/shipping_rates"); } @@ -3619,7 +3727,9 @@ public void TestShippingRatesPost3() }, }; var service = new ShippingRateService(this.StripeClient); - service.Update("shr_xxxxxxxxxxxxx", options); + ShippingRate shippingRate = service.Update( + "shr_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/shipping_rates/shr_xxxxxxxxxxxxx"); @@ -3647,7 +3757,8 @@ public void TestSigmaScheduledQueryRunsGet2() { var service = new Stripe.Sigma.ScheduledQueryRunService( this.StripeClient); - service.Get("sqr_xxxxxxxxxxxxx"); + Stripe.Sigma.ScheduledQueryRun scheduledQueryRun = service.Get( + "sqr_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/sigma/scheduled_query_runs/sqr_xxxxxxxxxxxxx"); @@ -3657,7 +3768,7 @@ public void TestSigmaScheduledQueryRunsGet2() public void TestSourcesGet() { var service = new SourceService(this.StripeClient); - service.Get("src_xxxxxxxxxxxxx"); + Source source = service.Get("src_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/sources/src_xxxxxxxxxxxxx"); } @@ -3665,7 +3776,7 @@ public void TestSourcesGet() public void TestSourcesGet2() { var service = new SourceService(this.StripeClient); - service.Get("src_xxxxxxxxxxxxx"); + Source source = service.Get("src_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/sources/src_xxxxxxxxxxxxx"); } @@ -3680,7 +3791,7 @@ public void TestSourcesPost() }, }; var service = new SourceService(this.StripeClient); - service.Update("src_xxxxxxxxxxxxx", options); + Source source = service.Update("src_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/sources/src_xxxxxxxxxxxxx"); @@ -3690,7 +3801,7 @@ public void TestSourcesPost() public void TestSubscriptionItemsDelete() { var service = new SubscriptionItemService(this.StripeClient); - service.Delete("si_xxxxxxxxxxxxx"); + SubscriptionItem deleted = service.Delete("si_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/subscription_items/si_xxxxxxxxxxxxx"); @@ -3716,7 +3827,7 @@ public void TestSubscriptionItemsGet() public void TestSubscriptionItemsGet2() { var service = new SubscriptionItemService(this.StripeClient); - service.Get("si_xxxxxxxxxxxxx"); + SubscriptionItem subscriptionItem = service.Get("si_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/subscription_items/si_xxxxxxxxxxxxx"); @@ -3732,7 +3843,7 @@ public void TestSubscriptionItemsPost() Quantity = 2, }; var service = new SubscriptionItemService(this.StripeClient); - service.Create(options); + SubscriptionItem subscriptionItem = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/subscription_items"); } @@ -3747,7 +3858,9 @@ public void TestSubscriptionItemsPost2() }, }; var service = new SubscriptionItemService(this.StripeClient); - service.Update("si_xxxxxxxxxxxxx", options); + SubscriptionItem subscriptionItem = service.Update( + "si_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/subscription_items/si_xxxxxxxxxxxxx"); @@ -3757,7 +3870,8 @@ public void TestSubscriptionItemsPost2() public void TestSubscriptionSchedulesCancelPost() { var service = new SubscriptionScheduleService(this.StripeClient); - service.Cancel("sub_sched_xxxxxxxxxxxxx"); + SubscriptionSchedule subscriptionSchedule = service.Cancel( + "sub_sched_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx/cancel"); @@ -3780,7 +3894,8 @@ public void TestSubscriptionSchedulesGet() public void TestSubscriptionSchedulesGet2() { var service = new SubscriptionScheduleService(this.StripeClient); - service.Get("sub_sched_xxxxxxxxxxxxx"); + SubscriptionSchedule subscriptionSchedule = service.Get( + "sub_sched_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"); @@ -3812,7 +3927,7 @@ public void TestSubscriptionSchedulesPost() }, }; var service = new SubscriptionScheduleService(this.StripeClient); - service.Create(options); + SubscriptionSchedule subscriptionSchedule = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules"); } @@ -3824,7 +3939,9 @@ public void TestSubscriptionSchedulesPost2() EndBehavior = "release", }; var service = new SubscriptionScheduleService(this.StripeClient); - service.Update("sub_sched_xxxxxxxxxxxxx", options); + SubscriptionSchedule subscriptionSchedule = service.Update( + "sub_sched_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"); @@ -3834,7 +3951,8 @@ public void TestSubscriptionSchedulesPost2() public void TestSubscriptionSchedulesReleasePost() { var service = new SubscriptionScheduleService(this.StripeClient); - service.Release("sub_sched_xxxxxxxxxxxxx"); + SubscriptionSchedule subscriptionSchedule = service.Release( + "sub_sched_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx/release"); @@ -3844,7 +3962,7 @@ public void TestSubscriptionSchedulesReleasePost() public void TestSubscriptionsDelete() { var service = new SubscriptionService(this.StripeClient); - service.Cancel("sub_xxxxxxxxxxxxx"); + Subscription subscription = service.Cancel("sub_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/subscriptions/sub_xxxxxxxxxxxxx"); @@ -3854,7 +3972,7 @@ public void TestSubscriptionsDelete() public void TestSubscriptionsDiscountDelete() { var service = new SubscriptionService(this.StripeClient); - service.DeleteDiscount("sub_xyz"); + Discount discount = service.DeleteDiscount("sub_xyz"); this.AssertRequest( HttpMethod.Delete, "/v1/subscriptions/sub_xyz/discount"); @@ -3873,7 +3991,7 @@ public void TestSubscriptionsGet() public void TestSubscriptionsGet2() { var service = new SubscriptionService(this.StripeClient); - service.Get("sub_xxxxxxxxxxxxx"); + Subscription subscription = service.Get("sub_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/subscriptions/sub_xxxxxxxxxxxxx"); @@ -3894,7 +4012,7 @@ public void TestSubscriptionsPost() }, }; var service = new SubscriptionService(this.StripeClient); - service.Create(options); + Subscription subscription = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/subscriptions"); } @@ -3909,7 +4027,9 @@ public void TestSubscriptionsPost2() }, }; var service = new SubscriptionService(this.StripeClient); - service.Update("sub_xxxxxxxxxxxxx", options); + Subscription subscription = service.Update( + "sub_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/subscriptions/sub_xxxxxxxxxxxxx"); @@ -3923,7 +4043,8 @@ public void TestSubscriptionsSearchGet() Query = "status:'active' AND metadata['order_id']:'6735'", }; var service = new SubscriptionService(this.StripeClient); - service.Search(options); + StripeSearchResult subscriptions = service.Search( + options); this.AssertRequest( HttpMethod.Get, "/v1/subscriptions/search", @@ -3970,7 +4091,7 @@ public void TestTaxCalculationsPost() }, }; var service = new Stripe.Tax.CalculationService(this.StripeClient); - service.Create(options); + Stripe.Tax.Calculation calculation = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/tax/calculations"); } @@ -3987,7 +4108,7 @@ public void TestTaxCodesGet() public void TestTaxCodesGet2() { var service = new TaxCodeService(this.StripeClient); - service.Get("txcd_xxxxxxxxxxxxx"); + TaxCode taxCode = service.Get("txcd_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/tax_codes/txcd_xxxxxxxxxxxxx"); @@ -4007,7 +4128,7 @@ public void TestTaxFormsPdfGet() public void TestTaxIdsDelete() { var service = new TaxIdService(this.StripeClient); - service.Delete("taxid_123"); + TaxId deleted = service.Delete("taxid_123"); this.AssertRequest(HttpMethod.Delete, "/v1/tax_ids/taxid_123"); } @@ -4023,7 +4144,7 @@ public void TestTaxIdsGet() public void TestTaxIdsGet2() { var service = new TaxIdService(this.StripeClient); - service.Get("taxid_123"); + TaxId taxId = service.Get("taxid_123"); this.AssertRequest(HttpMethod.Get, "/v1/tax_ids/taxid_123"); } @@ -4036,7 +4157,7 @@ public void TestTaxIdsPost() Value = "123", }; var service = new TaxIdService(this.StripeClient); - service.Create(options); + TaxId taxId = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/tax_ids"); } @@ -4053,7 +4174,7 @@ public void TestTaxRatesGet() public void TestTaxRatesGet2() { var service = new TaxRateService(this.StripeClient); - service.Get("txr_xxxxxxxxxxxxx"); + TaxRate taxRate = service.Get("txr_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/tax_rates/txr_xxxxxxxxxxxxx"); @@ -4071,7 +4192,7 @@ public void TestTaxRatesPost() Inclusive = false, }; var service = new TaxRateService(this.StripeClient); - service.Create(options); + TaxRate taxRate = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/tax_rates"); } @@ -4080,7 +4201,7 @@ public void TestTaxRatesPost2() { var options = new TaxRateUpdateOptions { Active = false }; var service = new TaxRateService(this.StripeClient); - service.Update("txr_xxxxxxxxxxxxx", options); + TaxRate taxRate = service.Update("txr_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/tax_rates/txr_xxxxxxxxxxxxx"); @@ -4118,7 +4239,7 @@ public void TestTaxRegistrationsPost() ActiveFrom = Stripe.Tax.RegistrationActiveFrom.Now, }; var service = new Stripe.Tax.RegistrationService(this.StripeClient); - service.Create(options); + Stripe.Tax.Registration registration = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/tax/registrations"); } @@ -4130,7 +4251,9 @@ public void TestTaxRegistrationsPost2() ExpiresAt = Stripe.Tax.RegistrationExpiresAt.Now, }; var service = new Stripe.Tax.RegistrationService(this.StripeClient); - service.Update("taxreg_xxxxxxxxxxxxx", options); + Stripe.Tax.Registration registration = service.Update( + "taxreg_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/tax/registrations/taxreg_xxxxxxxxxxxxx"); @@ -4141,7 +4264,7 @@ public void TestTaxSettingsGet() { var options = new Stripe.Tax.SettingsGetOptions(); var service = new Stripe.Tax.SettingsService(this.StripeClient); - service.Get(options); + Stripe.Tax.Settings settings = service.Get(options); this.AssertRequest(HttpMethod.Get, "/v1/tax/settings"); } @@ -4156,7 +4279,7 @@ public void TestTaxSettingsPost() }, }; var service = new Stripe.Tax.SettingsService(this.StripeClient); - service.Update(options); + Stripe.Tax.Settings settings = service.Update(options); this.AssertRequest(HttpMethod.Post, "/v1/tax/settings"); } @@ -4169,7 +4292,8 @@ public void TestTaxTransactionsCreateFromCalculationPost() Reference = "yyy", }; var service = new Stripe.Tax.TransactionService(this.StripeClient); - service.CreateFromCalculation(options); + Stripe.Tax.Transaction transaction = service.CreateFromCalculation( + options); this.AssertRequest( HttpMethod.Post, "/v1/tax/transactions/create_from_calculation"); @@ -4180,7 +4304,7 @@ public void TestTerminalConfigurationsDelete() { var service = new Stripe.Terminal.ConfigurationService( this.StripeClient); - service.Delete("uc_123"); + Stripe.Terminal.Configuration deleted = service.Delete("uc_123"); this.AssertRequest( HttpMethod.Delete, "/v1/terminal/configurations/uc_123"); @@ -4191,7 +4315,8 @@ public void TestTerminalConfigurationsDelete2() { var service = new Stripe.Terminal.ConfigurationService( this.StripeClient); - service.Delete("tmc_xxxxxxxxxxxxx"); + Stripe.Terminal.Configuration deleted = service.Delete( + "tmc_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); @@ -4212,7 +4337,7 @@ public void TestTerminalConfigurationsGet2() { var service = new Stripe.Terminal.ConfigurationService( this.StripeClient); - service.Get("uc_123"); + Stripe.Terminal.Configuration configuration = service.Get("uc_123"); this.AssertRequest( HttpMethod.Get, "/v1/terminal/configurations/uc_123"); @@ -4240,7 +4365,8 @@ public void TestTerminalConfigurationsGet4() { var service = new Stripe.Terminal.ConfigurationService( this.StripeClient); - service.Get("tmc_xxxxxxxxxxxxx"); + Stripe.Terminal.Configuration configuration = service.Get( + "tmc_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); @@ -4252,7 +4378,8 @@ public void TestTerminalConfigurationsPost() var options = new Stripe.Terminal.ConfigurationCreateOptions(); var service = new Stripe.Terminal.ConfigurationService( this.StripeClient); - service.Create(options); + Stripe.Terminal.Configuration configuration = service.Create( + options); this.AssertRequest(HttpMethod.Post, "/v1/terminal/configurations"); } @@ -4271,7 +4398,9 @@ public void TestTerminalConfigurationsPost2() }; var service = new Stripe.Terminal.ConfigurationService( this.StripeClient); - service.Update("uc_123", options); + Stripe.Terminal.Configuration configuration = service.Update( + "uc_123", + options); this.AssertRequest( HttpMethod.Post, "/v1/terminal/configurations/uc_123"); @@ -4289,7 +4418,8 @@ public void TestTerminalConfigurationsPost3() }; var service = new Stripe.Terminal.ConfigurationService( this.StripeClient); - service.Create(options); + Stripe.Terminal.Configuration configuration = service.Create( + options); this.AssertRequest(HttpMethod.Post, "/v1/terminal/configurations"); } @@ -4305,7 +4435,9 @@ public void TestTerminalConfigurationsPost4() }; var service = new Stripe.Terminal.ConfigurationService( this.StripeClient); - service.Update("tmc_xxxxxxxxxxxxx", options); + Stripe.Terminal.Configuration configuration = service.Update( + "tmc_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); @@ -4317,7 +4449,8 @@ public void TestTerminalConnectionTokensPost() var options = new Stripe.Terminal.ConnectionTokenCreateOptions(); var service = new Stripe.Terminal.ConnectionTokenService( this.StripeClient); - service.Create(options); + Stripe.Terminal.ConnectionToken connectionToken = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v1/terminal/connection_tokens"); @@ -4328,7 +4461,8 @@ public void TestTerminalLocationsDelete() { var service = new Stripe.Terminal.LocationService( this.StripeClient); - service.Delete("tml_xxxxxxxxxxxxx"); + Stripe.Terminal.Location deleted = service.Delete( + "tml_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); @@ -4353,7 +4487,8 @@ public void TestTerminalLocationsGet2() { var service = new Stripe.Terminal.LocationService( this.StripeClient); - service.Get("tml_xxxxxxxxxxxxx"); + Stripe.Terminal.Location location = service.Get( + "tml_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); @@ -4376,7 +4511,7 @@ public void TestTerminalLocationsPost() }; var service = new Stripe.Terminal.LocationService( this.StripeClient); - service.Create(options); + Stripe.Terminal.Location location = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/terminal/locations"); } @@ -4389,7 +4524,9 @@ public void TestTerminalLocationsPost2() }; var service = new Stripe.Terminal.LocationService( this.StripeClient); - service.Update("tml_xxxxxxxxxxxxx", options); + Stripe.Terminal.Location location = service.Update( + "tml_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); @@ -4399,7 +4536,8 @@ public void TestTerminalLocationsPost2() public void TestTerminalReadersCancelActionPost() { var service = new Stripe.Terminal.ReaderService(this.StripeClient); - service.CancelAction("tmr_xxxxxxxxxxxxx"); + Stripe.Terminal.Reader reader = service.CancelAction( + "tmr_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/cancel_action"); @@ -4409,7 +4547,8 @@ public void TestTerminalReadersCancelActionPost() public void TestTerminalReadersDelete() { var service = new Stripe.Terminal.ReaderService(this.StripeClient); - service.Delete("tmr_xxxxxxxxxxxxx"); + Stripe.Terminal.Reader deleted = service.Delete( + "tmr_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); @@ -4431,7 +4570,7 @@ public void TestTerminalReadersGet() public void TestTerminalReadersGet2() { var service = new Stripe.Terminal.ReaderService(this.StripeClient); - service.Get("tmr_xxxxxxxxxxxxx"); + Stripe.Terminal.Reader reader = service.Get("tmr_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); @@ -4447,7 +4586,7 @@ public void TestTerminalReadersPost() Location = "tml_1234", }; var service = new Stripe.Terminal.ReaderService(this.StripeClient); - service.Create(options); + Stripe.Terminal.Reader reader = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/terminal/readers"); } @@ -4459,7 +4598,9 @@ public void TestTerminalReadersPost2() Label = "Blue Rabbit", }; var service = new Stripe.Terminal.ReaderService(this.StripeClient); - service.Update("tmr_xxxxxxxxxxxxx", options); + Stripe.Terminal.Reader reader = service.Update( + "tmr_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); @@ -4473,7 +4614,9 @@ public void TestTerminalReadersProcessPaymentIntentPost() PaymentIntent = "pi_xxxxxxxxxxxxx", }; var service = new Stripe.Terminal.ReaderService(this.StripeClient); - service.ProcessPaymentIntent("tmr_xxxxxxxxxxxxx", options); + Stripe.Terminal.Reader reader = service.ProcessPaymentIntent( + "tmr_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_payment_intent"); @@ -4488,7 +4631,9 @@ public void TestTerminalReadersProcessSetupIntentPost() AllowRedisplay = "always", }; var service = new Stripe.Terminal.ReaderService(this.StripeClient); - service.ProcessSetupIntent("tmr_xxxxxxxxxxxxx", options); + Stripe.Terminal.Reader reader = service.ProcessSetupIntent( + "tmr_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent"); @@ -4504,7 +4649,8 @@ public void TestTestHelpersCustomersFundCashBalancePost() }; var service = new Stripe.TestHelpers.CustomerService( this.StripeClient); - service.FundCashBalance("cus_123", options); + CustomerCashBalanceTransaction customerCashBalanceTransaction = service + .FundCashBalance("cus_123", options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/customers/cus_123/fund_cash_balance"); @@ -4569,7 +4715,9 @@ public void TestTestHelpersIssuingAuthorizationsCapturePost() }; var service = new Stripe.TestHelpers.Issuing.AuthorizationService( this.StripeClient); - service.Capture("example_authorization", options); + Stripe.Issuing.Authorization authorization = service.Capture( + "example_authorization", + options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/authorizations/example_authorization/capture"); @@ -4580,7 +4728,8 @@ public void TestTestHelpersIssuingAuthorizationsExpirePost() { var service = new Stripe.TestHelpers.Issuing.AuthorizationService( this.StripeClient); - service.Expire("example_authorization"); + Stripe.Issuing.Authorization authorization = service.Expire( + "example_authorization"); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/authorizations/example_authorization/expire"); @@ -4596,7 +4745,9 @@ public void TestTestHelpersIssuingAuthorizationsIncrementPost() }; var service = new Stripe.TestHelpers.Issuing.AuthorizationService( this.StripeClient); - service.Increment("example_authorization", options); + Stripe.Issuing.Authorization authorization = service.Increment( + "example_authorization", + options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/authorizations/example_authorization/increment"); @@ -4643,7 +4794,8 @@ public void TestTestHelpersIssuingAuthorizationsPost() }; var service = new Stripe.TestHelpers.Issuing.AuthorizationService( this.StripeClient); - service.Create(options); + Stripe.Issuing.Authorization authorization = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/authorizations"); @@ -4658,7 +4810,9 @@ public void TestTestHelpersIssuingAuthorizationsReversePost() }; var service = new Stripe.TestHelpers.Issuing.AuthorizationService( this.StripeClient); - service.Reverse("example_authorization", options); + Stripe.Issuing.Authorization authorization = service.Reverse( + "example_authorization", + options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/authorizations/example_authorization/reverse"); @@ -4669,7 +4823,7 @@ public void TestTestHelpersIssuingCardsShippingDeliverPost() { var service = new Stripe.TestHelpers.Issuing.CardService( this.StripeClient); - service.DeliverCard("card_123"); + Stripe.Issuing.Card card = service.DeliverCard("card_123"); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/cards/card_123/shipping/deliver"); @@ -4680,7 +4834,7 @@ public void TestTestHelpersIssuingCardsShippingFailPost() { var service = new Stripe.TestHelpers.Issuing.CardService( this.StripeClient); - service.FailCard("card_123"); + Stripe.Issuing.Card card = service.FailCard("card_123"); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/cards/card_123/shipping/fail"); @@ -4691,7 +4845,7 @@ public void TestTestHelpersIssuingCardsShippingReturnPost() { var service = new Stripe.TestHelpers.Issuing.CardService( this.StripeClient); - service.ReturnCard("card_123"); + Stripe.Issuing.Card card = service.ReturnCard("card_123"); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/cards/card_123/shipping/return"); @@ -4702,7 +4856,7 @@ public void TestTestHelpersIssuingCardsShippingShipPost() { var service = new Stripe.TestHelpers.Issuing.CardService( this.StripeClient); - service.ShipCard("card_123"); + Stripe.Issuing.Card card = service.ShipCard("card_123"); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/cards/card_123/shipping/ship"); @@ -4713,7 +4867,8 @@ public void TestTestHelpersIssuingPersonalizationDesignsActivatePost() { var service = new Stripe.TestHelpers.Issuing.PersonalizationDesignService( this.StripeClient); - service.Activate("pd_xyz"); + Stripe.Issuing.PersonalizationDesign personalizationDesign = service + .Activate("pd_xyz"); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/personalization_designs/pd_xyz/activate"); @@ -4724,7 +4879,8 @@ public void TestTestHelpersIssuingPersonalizationDesignsDeactivatePost() { var service = new Stripe.TestHelpers.Issuing.PersonalizationDesignService( this.StripeClient); - service.Deactivate("pd_xyz"); + Stripe.Issuing.PersonalizationDesign personalizationDesign = service + .Deactivate("pd_xyz"); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/personalization_designs/pd_xyz/deactivate"); @@ -4742,7 +4898,8 @@ public void TestTestHelpersIssuingPersonalizationDesignsRejectPost() }; var service = new Stripe.TestHelpers.Issuing.PersonalizationDesignService( this.StripeClient); - service.Reject("pd_xyz", options); + Stripe.Issuing.PersonalizationDesign personalizationDesign = service + .Reject("pd_xyz", options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/personalization_designs/pd_xyz/reject"); @@ -4819,7 +4976,8 @@ public void TestTestHelpersIssuingTransactionsCreateForceCapturePost() }; var service = new Stripe.TestHelpers.Issuing.TransactionService( this.StripeClient); - service.CreateForceCapture(options); + Stripe.Issuing.Transaction transaction = service.CreateForceCapture( + options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/transactions/create_force_capture"); @@ -4896,7 +5054,8 @@ public void TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPost() }; var service = new Stripe.TestHelpers.Issuing.TransactionService( this.StripeClient); - service.CreateUnlinkedRefund(options); + Stripe.Issuing.Transaction transaction = service + .CreateUnlinkedRefund(options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/transactions/create_unlinked_refund"); @@ -4911,7 +5070,9 @@ public void TestTestHelpersIssuingTransactionsRefundPost() }; var service = new Stripe.TestHelpers.Issuing.TransactionService( this.StripeClient); - service.Refund("example_transaction", options); + Stripe.Issuing.Transaction transaction = service.Refund( + "example_transaction", + options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/issuing/transactions/example_transaction/refund"); @@ -4922,7 +5083,7 @@ public void TestTestHelpersRefundsExpirePost() { var service = new Stripe.TestHelpers.RefundService( this.StripeClient); - service.Expire("re_123"); + Refund refund = service.Expire("re_123"); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/refunds/re_123/expire"); @@ -4938,7 +5099,9 @@ public void TestTestHelpersTestClocksAdvancePost() }; var service = new Stripe.TestHelpers.TestClockService( this.StripeClient); - service.Advance("clock_xyz", options); + Stripe.TestHelpers.TestClock testClock = service.Advance( + "clock_xyz", + options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/test_clocks/clock_xyz/advance"); @@ -4954,7 +5117,9 @@ public void TestTestHelpersTestClocksAdvancePost2() }; var service = new Stripe.TestHelpers.TestClockService( this.StripeClient); - service.Advance("clock_xxxxxxxxxxxxx", options); + Stripe.TestHelpers.TestClock testClock = service.Advance( + "clock_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx/advance"); @@ -4965,7 +5130,7 @@ public void TestTestHelpersTestClocksDelete() { var service = new Stripe.TestHelpers.TestClockService( this.StripeClient); - service.Delete("clock_xyz"); + Stripe.TestHelpers.TestClock deleted = service.Delete("clock_xyz"); this.AssertRequest( HttpMethod.Delete, "/v1/test_helpers/test_clocks/clock_xyz"); @@ -4976,7 +5141,8 @@ public void TestTestHelpersTestClocksDelete2() { var service = new Stripe.TestHelpers.TestClockService( this.StripeClient); - service.Delete("clock_xxxxxxxxxxxxx"); + Stripe.TestHelpers.TestClock deleted = service.Delete( + "clock_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx"); @@ -4997,7 +5163,7 @@ public void TestTestHelpersTestClocksGet2() { var service = new Stripe.TestHelpers.TestClockService( this.StripeClient); - service.Get("clock_xyz"); + Stripe.TestHelpers.TestClock testClock = service.Get("clock_xyz"); this.AssertRequest( HttpMethod.Get, "/v1/test_helpers/test_clocks/clock_xyz"); @@ -5025,7 +5191,8 @@ public void TestTestHelpersTestClocksGet4() { var service = new Stripe.TestHelpers.TestClockService( this.StripeClient); - service.Get("clock_xxxxxxxxxxxxx"); + Stripe.TestHelpers.TestClock testClock = service.Get( + "clock_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx"); @@ -5042,7 +5209,7 @@ public void TestTestHelpersTestClocksPost() }; var service = new Stripe.TestHelpers.TestClockService( this.StripeClient); - service.Create(options); + Stripe.TestHelpers.TestClock testClock = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/test_helpers/test_clocks"); } @@ -5056,7 +5223,7 @@ public void TestTestHelpersTestClocksPost2() }; var service = new Stripe.TestHelpers.TestClockService( this.StripeClient); - service.Create(options); + Stripe.TestHelpers.TestClock testClock = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/test_helpers/test_clocks"); } @@ -5072,7 +5239,9 @@ public void TestTestHelpersTreasuryInboundTransfersFailPost() }; var service = new Stripe.TestHelpers.Treasury.InboundTransferService( this.StripeClient); - service.Fail("ibt_123", options); + Stripe.Treasury.InboundTransfer inboundTransfer = service.Fail( + "ibt_123", + options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/treasury/inbound_transfers/ibt_123/fail"); @@ -5083,7 +5252,8 @@ public void TestTestHelpersTreasuryInboundTransfersReturnPost() { var service = new Stripe.TestHelpers.Treasury.InboundTransferService( this.StripeClient); - service.ReturnInboundTransfer("ibt_123"); + Stripe.Treasury.InboundTransfer inboundTransfer = service + .ReturnInboundTransfer("ibt_123"); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/treasury/inbound_transfers/ibt_123/return"); @@ -5094,7 +5264,8 @@ public void TestTestHelpersTreasuryInboundTransfersSucceedPost() { var service = new Stripe.TestHelpers.Treasury.InboundTransferService( this.StripeClient); - service.Succeed("ibt_123"); + Stripe.Treasury.InboundTransfer inboundTransfer = service.Succeed( + "ibt_123"); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/treasury/inbound_transfers/ibt_123/succeed"); @@ -5105,7 +5276,8 @@ public void TestTestHelpersTreasuryOutboundTransfersFailPost() { var service = new Stripe.TestHelpers.Treasury.OutboundTransferService( this.StripeClient); - service.Fail("obt_123"); + Stripe.Treasury.OutboundTransfer outboundTransfer = service.Fail( + "obt_123"); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/treasury/outbound_transfers/obt_123/fail"); @@ -5116,7 +5288,8 @@ public void TestTestHelpersTreasuryOutboundTransfersPostPost() { var service = new Stripe.TestHelpers.Treasury.OutboundTransferService( this.StripeClient); - service.Post("obt_123"); + Stripe.Treasury.OutboundTransfer outboundTransfer = service.Post( + "obt_123"); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/treasury/outbound_transfers/obt_123/post"); @@ -5134,7 +5307,8 @@ public void TestTestHelpersTreasuryOutboundTransfersReturnPost() }; var service = new Stripe.TestHelpers.Treasury.OutboundTransferService( this.StripeClient); - service.ReturnOutboundTransfer("obt_123", options); + Stripe.Treasury.OutboundTransfer outboundTransfer = service + .ReturnOutboundTransfer("obt_123", options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/treasury/outbound_transfers/obt_123/return"); @@ -5152,7 +5326,8 @@ public void TestTestHelpersTreasuryReceivedCreditsPost() }; var service = new Stripe.TestHelpers.Treasury.ReceivedCreditService( this.StripeClient); - service.Create(options); + Stripe.Treasury.ReceivedCredit receivedCredit = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/treasury/received_credits"); @@ -5170,7 +5345,8 @@ public void TestTestHelpersTreasuryReceivedDebitsPost() }; var service = new Stripe.TestHelpers.Treasury.ReceivedDebitService( this.StripeClient); - service.Create(options); + Stripe.Treasury.ReceivedDebit receivedDebit = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v1/test_helpers/treasury/received_debits"); @@ -5180,7 +5356,7 @@ public void TestTestHelpersTreasuryReceivedDebitsPost() public void TestTokensGet() { var service = new TokenService(this.StripeClient); - service.Get("tok_xxxx"); + Token token = service.Get("tok_xxxx"); this.AssertRequest(HttpMethod.Get, "/v1/tokens/tok_xxxx"); } @@ -5198,7 +5374,7 @@ public void TestTokensPost() }, }; var service = new TokenService(this.StripeClient); - service.Create(options); + Token token = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } @@ -5218,7 +5394,7 @@ public void TestTokensPost2() }, }; var service = new TokenService(this.StripeClient); - service.Create(options); + Token token = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } @@ -5230,7 +5406,7 @@ public void TestTokensPost3() Pii = new TokenPiiOptions { IdNumber = "000000000" }, }; var service = new TokenService(this.StripeClient); - service.Create(options); + Token token = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } @@ -5250,7 +5426,7 @@ public void TestTokensPost4() }, }; var service = new TokenService(this.StripeClient); - service.Create(options); + Token token = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } @@ -5270,7 +5446,7 @@ public void TestTokensPost5() }, }; var service = new TokenService(this.StripeClient); - service.Create(options); + Token token = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } @@ -5282,7 +5458,7 @@ public void TestTokensPost6() CvcUpdate = new TokenCvcUpdateOptions { Cvc = "123" }, }; var service = new TokenService(this.StripeClient); - service.Create(options); + Token token = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } @@ -5290,7 +5466,7 @@ public void TestTokensPost6() public void TestTopupsCancelPost() { var service = new TopupService(this.StripeClient); - service.Cancel("tu_xxxxxxxxxxxxx"); + Topup topup = service.Cancel("tu_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/topups/tu_xxxxxxxxxxxxx/cancel"); @@ -5309,7 +5485,7 @@ public void TestTopupsGet() public void TestTopupsGet2() { var service = new TopupService(this.StripeClient); - service.Get("tu_xxxxxxxxxxxxx"); + Topup topup = service.Get("tu_xxxxxxxxxxxxx"); this.AssertRequest(HttpMethod.Get, "/v1/topups/tu_xxxxxxxxxxxxx"); } @@ -5324,7 +5500,7 @@ public void TestTopupsPost() StatementDescriptor = "Top-up", }; var service = new TopupService(this.StripeClient); - service.Create(options); + Topup topup = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/topups"); } @@ -5339,7 +5515,7 @@ public void TestTopupsPost2() }, }; var service = new TopupService(this.StripeClient); - service.Update("tu_xxxxxxxxxxxxx", options); + Topup topup = service.Update("tu_xxxxxxxxxxxxx", options); this.AssertRequest(HttpMethod.Post, "/v1/topups/tu_xxxxxxxxxxxxx"); } @@ -5356,7 +5532,7 @@ public void TestTransfersGet() public void TestTransfersGet2() { var service = new TransferService(this.StripeClient); - service.Get("tr_xxxxxxxxxxxxx"); + Transfer transfer = service.Get("tr_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/transfers/tr_xxxxxxxxxxxxx"); @@ -5373,7 +5549,7 @@ public void TestTransfersPost() TransferGroup = "ORDER_95", }; var service = new TransferService(this.StripeClient); - service.Create(options); + Transfer transfer = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/transfers"); } @@ -5388,7 +5564,7 @@ public void TestTransfersPost2() }, }; var service = new TransferService(this.StripeClient); - service.Update("tr_xxxxxxxxxxxxx", options); + Transfer transfer = service.Update("tr_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Post, "/v1/transfers/tr_xxxxxxxxxxxxx"); @@ -5412,7 +5588,9 @@ public void TestTransfersReversalsGet() public void TestTransfersReversalsGet2() { var service = new TransferReversalService(this.StripeClient); - service.Get("tr_xxxxxxxxxxxxx", "trr_xxxxxxxxxxxxx"); + TransferReversal transferReversal = service.Get( + "tr_xxxxxxxxxxxxx", + "trr_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"); @@ -5423,7 +5601,9 @@ public void TestTransfersReversalsPost() { var options = new TransferReversalCreateOptions { Amount = 100 }; var service = new TransferReversalService(this.StripeClient); - service.Create("tr_xxxxxxxxxxxxx", options); + TransferReversal transferReversal = service.Create( + "tr_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/transfers/tr_xxxxxxxxxxxxx/reversals"); @@ -5440,7 +5620,10 @@ public void TestTransfersReversalsPost2() }, }; var service = new TransferReversalService(this.StripeClient); - service.Update("tr_xxxxxxxxxxxxx", "trr_xxxxxxxxxxxxx", options); + TransferReversal transferReversal = service.Update( + "tr_xxxxxxxxxxxxx", + "trr_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"); @@ -5469,7 +5652,8 @@ public void TestTreasuryCreditReversalsGet2() { var service = new Stripe.Treasury.CreditReversalService( this.StripeClient); - service.Get("credrev_xxxxxxxxxxxxx"); + Stripe.Treasury.CreditReversal creditReversal = service.Get( + "credrev_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/treasury/credit_reversals/credrev_xxxxxxxxxxxxx"); @@ -5484,7 +5668,8 @@ public void TestTreasuryCreditReversalsPost() }; var service = new Stripe.Treasury.CreditReversalService( this.StripeClient); - service.Create(options); + Stripe.Treasury.CreditReversal creditReversal = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v1/treasury/credit_reversals"); @@ -5513,7 +5698,8 @@ public void TestTreasuryDebitReversalsGet2() { var service = new Stripe.Treasury.DebitReversalService( this.StripeClient); - service.Get("debrev_xxxxxxxxxxxxx"); + Stripe.Treasury.DebitReversal debitReversal = service.Get( + "debrev_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/treasury/debit_reversals/debrev_xxxxxxxxxxxxx"); @@ -5528,7 +5714,8 @@ public void TestTreasuryDebitReversalsPost() }; var service = new Stripe.Treasury.DebitReversalService( this.StripeClient); - service.Create(options); + Stripe.Treasury.DebitReversal debitReversal = service.Create( + options); this.AssertRequest(HttpMethod.Post, "/v1/treasury/debit_reversals"); } @@ -5537,7 +5724,8 @@ public void TestTreasuryFinancialAccountsFeaturesGet() { var service = new Stripe.Treasury.FinancialAccountFeaturesService( this.StripeClient); - service.Get("fa_xxxxxxxxxxxxx"); + Stripe.Treasury.FinancialAccountFeatures financialAccountFeatures = service + .Get("fa_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx/features"); @@ -5565,7 +5753,8 @@ public void TestTreasuryFinancialAccountsGet2() { var service = new Stripe.Treasury.FinancialAccountService( this.StripeClient); - service.Get("fa_xxxxxxxxxxxxx"); + Stripe.Treasury.FinancialAccount financialAccount = service.Get( + "fa_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); @@ -5581,7 +5770,8 @@ public void TestTreasuryFinancialAccountsPost() }; var service = new Stripe.Treasury.FinancialAccountService( this.StripeClient); - service.Create(options); + Stripe.Treasury.FinancialAccount financialAccount = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v1/treasury/financial_accounts"); @@ -5599,7 +5789,9 @@ public void TestTreasuryFinancialAccountsPost2() }; var service = new Stripe.Treasury.FinancialAccountService( this.StripeClient); - service.Update("fa_xxxxxxxxxxxxx", options); + Stripe.Treasury.FinancialAccount financialAccount = service.Update( + "fa_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); @@ -5610,7 +5802,8 @@ public void TestTreasuryInboundTransfersCancelPost() { var service = new Stripe.Treasury.InboundTransferService( this.StripeClient); - service.Cancel("ibt_xxxxxxxxxxxxx"); + Stripe.Treasury.InboundTransfer inboundTransfer = service.Cancel( + "ibt_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx/cancel"); @@ -5639,7 +5832,8 @@ public void TestTreasuryInboundTransfersGet2() { var service = new Stripe.Treasury.InboundTransferService( this.StripeClient); - service.Get("ibt_xxxxxxxxxxxxx"); + Stripe.Treasury.InboundTransfer inboundTransfer = service.Get( + "ibt_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx"); @@ -5658,7 +5852,8 @@ public void TestTreasuryInboundTransfersPost() }; var service = new Stripe.Treasury.InboundTransferService( this.StripeClient); - service.Create(options); + Stripe.Treasury.InboundTransfer inboundTransfer = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v1/treasury/inbound_transfers"); @@ -5669,7 +5864,8 @@ public void TestTreasuryOutboundPaymentsCancelPost() { var service = new Stripe.Treasury.OutboundPaymentService( this.StripeClient); - service.Cancel("bot_xxxxxxxxxxxxx"); + Stripe.Treasury.OutboundPayment outboundPayment = service.Cancel( + "bot_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx/cancel"); @@ -5698,7 +5894,8 @@ public void TestTreasuryOutboundPaymentsGet2() { var service = new Stripe.Treasury.OutboundPaymentService( this.StripeClient); - service.Get("bot_xxxxxxxxxxxxx"); + Stripe.Treasury.OutboundPayment outboundPayment = service.Get( + "bot_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx"); @@ -5718,7 +5915,8 @@ public void TestTreasuryOutboundPaymentsPost() }; var service = new Stripe.Treasury.OutboundPaymentService( this.StripeClient); - service.Create(options); + Stripe.Treasury.OutboundPayment outboundPayment = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v1/treasury/outbound_payments"); @@ -5729,7 +5927,8 @@ public void TestTreasuryOutboundTransfersCancelPost() { var service = new Stripe.Treasury.OutboundTransferService( this.StripeClient); - service.Cancel("obt_xxxxxxxxxxxxx"); + Stripe.Treasury.OutboundTransfer outboundTransfer = service.Cancel( + "obt_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx/cancel"); @@ -5758,7 +5957,8 @@ public void TestTreasuryOutboundTransfersGet2() { var service = new Stripe.Treasury.OutboundTransferService( this.StripeClient); - service.Get("obt_xxxxxxxxxxxxx"); + Stripe.Treasury.OutboundTransfer outboundTransfer = service.Get( + "obt_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx"); @@ -5777,7 +5977,8 @@ public void TestTreasuryOutboundTransfersPost() }; var service = new Stripe.Treasury.OutboundTransferService( this.StripeClient); - service.Create(options); + Stripe.Treasury.OutboundTransfer outboundTransfer = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v1/treasury/outbound_transfers"); @@ -5806,7 +6007,8 @@ public void TestTreasuryReceivedCreditsGet2() { var service = new Stripe.Treasury.ReceivedCreditService( this.StripeClient); - service.Get("rc_xxxxxxxxxxxxx"); + Stripe.Treasury.ReceivedCredit receivedCredit = service.Get( + "rc_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/treasury/received_credits/rc_xxxxxxxxxxxxx"); @@ -5835,7 +6037,8 @@ public void TestTreasuryReceivedDebitsGet2() { var service = new Stripe.Treasury.ReceivedDebitService( this.StripeClient); - service.Get("rd_xxxxxxxxxxxxx"); + Stripe.Treasury.ReceivedDebit receivedDebit = service.Get( + "rd_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/treasury/received_debits/rd_xxxxxxxxxxxxx"); @@ -5864,7 +6067,8 @@ public void TestTreasuryTransactionEntriesGet2() { var service = new Stripe.Treasury.TransactionEntryService( this.StripeClient); - service.Get("trxne_xxxxxxxxxxxxx"); + Stripe.Treasury.TransactionEntry transactionEntry = service.Get( + "trxne_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/treasury/transaction_entries/trxne_xxxxxxxxxxxxx"); @@ -5893,7 +6097,8 @@ public void TestTreasuryTransactionsGet2() { var service = new Stripe.Treasury.TransactionService( this.StripeClient); - service.Get("trxn_xxxxxxxxxxxxx"); + Stripe.Treasury.Transaction transaction = service.Get( + "trxn_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/treasury/transactions/trxn_xxxxxxxxxxxxx"); @@ -5903,7 +6108,7 @@ public void TestTreasuryTransactionsGet2() public void TestWebhookEndpointsDelete() { var service = new WebhookEndpointService(this.StripeClient); - service.Delete("we_xxxxxxxxxxxxx"); + WebhookEndpoint deleted = service.Delete("we_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Delete, "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); @@ -5926,7 +6131,7 @@ public void TestWebhookEndpointsGet() public void TestWebhookEndpointsGet2() { var service = new WebhookEndpointService(this.StripeClient); - service.Get("we_xxxxxxxxxxxxx"); + WebhookEndpoint webhookEndpoint = service.Get("we_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); @@ -5945,7 +6150,7 @@ public void TestWebhookEndpointsPost() }, }; var service = new WebhookEndpointService(this.StripeClient); - service.Create(options); + WebhookEndpoint webhookEndpoint = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v1/webhook_endpoints"); } @@ -5957,7 +6162,9 @@ public void TestWebhookEndpointsPost2() Url = "https://example.com/new_endpoint", }; var service = new WebhookEndpointService(this.StripeClient); - service.Update("we_xxxxxxxxxxxxx", options); + WebhookEndpoint webhookEndpoint = service.Update( + "we_xxxxxxxxxxxxx", + options); this.AssertRequest( HttpMethod.Post, "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); @@ -5973,7 +6180,7 @@ public void TestV2CoreAccountPost() "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"identity\":null,\"metadata\":null,\"requirements\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; - service.Close("id_123"); + Stripe.V2.Core.Account account = service.Close("id_123"); this.AssertRequest( HttpMethod.Post, "/v2/core/accounts/id_123/close"); @@ -5990,7 +6197,7 @@ public void TestV2CoreAccountPost2() var options = new Stripe.V2.Core.AccountCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; - service.Create(options); + Stripe.V2.Core.Account account = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v2/core/accounts"); } @@ -6019,7 +6226,7 @@ public void TestV2CoreAccountGet2() "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"identity\":null,\"metadata\":null,\"requirements\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; - service.Get("id_123"); + Stripe.V2.Core.Account account = service.Get("id_123"); this.AssertRequest(HttpMethod.Get, "/v2/core/accounts/id_123"); } @@ -6034,7 +6241,7 @@ public void TestV2CoreAccountPost3() var options = new Stripe.V2.Core.AccountUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; - service.Update("id_123", options); + Stripe.V2.Core.Account account = service.Update("id_123", options); this.AssertRequest(HttpMethod.Post, "/v2/core/accounts/id_123"); } @@ -6049,7 +6256,9 @@ public void TestV2CoreAccountsPersonPost() var options = new Stripe.V2.Core.Accounts.PersonCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts.Persons; - service.Create("account_id_123", options); + Stripe.V2.Core.Person person = service.Create( + "account_id_123", + options); this.AssertRequest( HttpMethod.Post, "/v2/core/accounts/account_id_123/persons"); @@ -6065,7 +6274,9 @@ public void TestV2CoreAccountsPersonDelete() "{\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"account\":\"account\",\"additional_addresses\":null,\"additional_names\":null,\"additional_terms_of_service\":null,\"address\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"date_of_birth\":null,\"documents\":null,\"email\":null,\"given_name\":null,\"id_numbers\":null,\"legal_gender\":null,\"metadata\":null,\"nationalities\":null,\"phone\":null,\"political_exposure\":null,\"relationship\":null,\"script_addresses\":null,\"script_names\":null,\"surname\":null,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts.Persons; - service.Delete("account_id_123", "id_123"); + Stripe.V2.Core.Person deleted = service.Delete( + "account_id_123", + "id_123"); this.AssertRequest( HttpMethod.Delete, "/v2/core/accounts/account_id_123/persons/id_123"); @@ -6098,7 +6309,9 @@ public void TestV2CoreAccountsPersonGet2() "{\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"account\":\"account\",\"additional_addresses\":null,\"additional_names\":null,\"additional_terms_of_service\":null,\"address\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"date_of_birth\":null,\"documents\":null,\"email\":null,\"given_name\":null,\"id_numbers\":null,\"legal_gender\":null,\"metadata\":null,\"nationalities\":null,\"phone\":null,\"political_exposure\":null,\"relationship\":null,\"script_addresses\":null,\"script_names\":null,\"surname\":null,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts.Persons; - service.Get("account_id_123", "id_123"); + Stripe.V2.Core.Person person = service.Get( + "account_id_123", + "id_123"); this.AssertRequest( HttpMethod.Get, "/v2/core/accounts/account_id_123/persons/id_123"); @@ -6115,7 +6328,10 @@ public void TestV2CoreAccountsPersonPost2() var options = new Stripe.V2.Core.Accounts.PersonUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts.Persons; - service.Update("account_id_123", "id_123", options); + Stripe.V2.Core.Person person = service.Update( + "account_id_123", + "id_123", + options); this.AssertRequest( HttpMethod.Post, "/v2/core/accounts/account_id_123/persons/id_123"); @@ -6151,7 +6367,7 @@ public void TestV2CoreAccountLinkPost() }; var client = new StripeClient(this.Requestor); var service = client.V2.Core.AccountLinks; - service.Create(options); + Stripe.V2.Core.AccountLink accountLink = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v2/core/account_links"); } @@ -6172,7 +6388,8 @@ public void TestV2CoreEventDestinationPost() }; var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; - service.Create(options); + Stripe.V2.EventDestination eventDestination = service.Create( + options); this.AssertRequest(HttpMethod.Post, "/v2/core/event_destinations"); } @@ -6186,7 +6403,7 @@ public void TestV2CoreEventDestinationDelete() "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"amazon_eventbridge\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"livemode\":true,\"metadata\":null,\"name\":\"name\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"webhook_endpoint\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; - service.Delete("id_123"); + Stripe.V2.EventDestination deleted = service.Delete("id_123"); this.AssertRequest( HttpMethod.Delete, "/v2/core/event_destinations/id_123"); @@ -6202,7 +6419,8 @@ public void TestV2CoreEventDestinationPost2() "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"amazon_eventbridge\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"livemode\":true,\"metadata\":null,\"name\":\"name\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"webhook_endpoint\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; - service.Disable("id_123"); + Stripe.V2.EventDestination eventDestination = service.Disable( + "id_123"); this.AssertRequest( HttpMethod.Post, "/v2/core/event_destinations/id_123/disable"); @@ -6218,7 +6436,8 @@ public void TestV2CoreEventDestinationPost3() "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"amazon_eventbridge\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"livemode\":true,\"metadata\":null,\"name\":\"name\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"webhook_endpoint\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; - service.Enable("id_123"); + Stripe.V2.EventDestination eventDestination = service.Enable( + "id_123"); this.AssertRequest( HttpMethod.Post, "/v2/core/event_destinations/id_123/enable"); @@ -6249,7 +6468,7 @@ public void TestV2CoreEventDestinationPost4() "{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"context\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"reason\":null,\"type\":\"type\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; - service.Ping("id_123"); + Stripe.V2.Event result = service.Ping("id_123"); this.AssertRequest( HttpMethod.Post, "/v2/core/event_destinations/id_123/ping"); @@ -6265,7 +6484,7 @@ public void TestV2CoreEventDestinationGet2() "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"amazon_eventbridge\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"livemode\":true,\"metadata\":null,\"name\":\"name\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"webhook_endpoint\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; - service.Get("id_123"); + Stripe.V2.EventDestination eventDestination = service.Get("id_123"); this.AssertRequest( HttpMethod.Get, "/v2/core/event_destinations/id_123"); @@ -6282,7 +6501,9 @@ public void TestV2CoreEventDestinationPost5() var options = new Stripe.V2.Core.EventDestinationUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; - service.Update("id_123", options); + Stripe.V2.EventDestination eventDestination = service.Update( + "id_123", + options); this.AssertRequest( HttpMethod.Post, "/v2/core/event_destinations/id_123"); @@ -6321,7 +6542,7 @@ public void TestV2CoreEventGet2() "{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"context\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"reason\":null,\"type\":\"type\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Events; - service.Get("id_123"); + Stripe.V2.Event result = service.Get("id_123"); this.AssertRequest(HttpMethod.Get, "/v2/core/events/id_123"); } @@ -6335,7 +6556,8 @@ public void TestV2CoreVaultGbBankAccountPost() "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"sort_code\":\"sort_code\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; - service.AcknowledgeConfirmationOfPayee("id_123"); + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service + .AcknowledgeConfirmationOfPayee("id_123"); this.AssertRequest( HttpMethod.Post, "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee"); @@ -6351,7 +6573,8 @@ public void TestV2CoreVaultGbBankAccountPost2() "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"sort_code\":\"sort_code\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; - service.Archive("id_123"); + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Archive( + "id_123"); this.AssertRequest( HttpMethod.Post, "/v2/core/vault/gb_bank_accounts/id_123/archive"); @@ -6372,7 +6595,8 @@ public void TestV2CoreVaultGbBankAccountPost3() }; var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; - service.Create(options); + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v2/core/vault/gb_bank_accounts"); @@ -6388,7 +6612,8 @@ public void TestV2CoreVaultGbBankAccountPost4() "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"sort_code\":\"sort_code\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; - service.InitiateConfirmationOfPayee("id_123"); + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service + .InitiateConfirmationOfPayee("id_123"); this.AssertRequest( HttpMethod.Post, "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee"); @@ -6404,7 +6629,8 @@ public void TestV2CoreVaultGbBankAccountGet() "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"sort_code\":\"sort_code\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; - service.Get("id_123"); + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Get( + "id_123"); this.AssertRequest( HttpMethod.Get, "/v2/core/vault/gb_bank_accounts/id_123"); @@ -6420,7 +6646,8 @@ public void TestV2CoreVaultUsBankAccountPost() "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"fedwire_routing_number\":null,\"last4\":\"last4\",\"routing_number\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; - service.Archive("id_123"); + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Archive( + "id_123"); this.AssertRequest( HttpMethod.Post, "/v2/core/vault/us_bank_accounts/id_123/archive"); @@ -6440,7 +6667,8 @@ public void TestV2CoreVaultUsBankAccountPost2() }; var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; - service.Create(options); + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Create( + options); this.AssertRequest( HttpMethod.Post, "/v2/core/vault/us_bank_accounts"); @@ -6456,7 +6684,8 @@ public void TestV2CoreVaultUsBankAccountGet() "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"fedwire_routing_number\":null,\"last4\":\"last4\",\"routing_number\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; - service.Get("id_123"); + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Get( + "id_123"); this.AssertRequest( HttpMethod.Get, "/v2/core/vault/us_bank_accounts/id_123"); @@ -6473,7 +6702,9 @@ public void TestV2CoreVaultUsBankAccountPost3() var options = new Stripe.V2.Core.Vault.UsBankAccountUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; - service.Update("id_123", options); + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Update( + "id_123", + options); this.AssertRequest( HttpMethod.Post, "/v2/core/vault/us_bank_accounts/id_123"); @@ -6506,7 +6737,8 @@ public void TestV2MoneyManagementAdjustmentGet2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"adjusted_flow\":null,\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"receipt_url\":\"receipt_url\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.Adjustments; - service.Get("id_123"); + Stripe.V2.MoneyManagement.Adjustment adjustment = service.Get( + "id_123"); this.AssertRequest( HttpMethod.Get, "/v2/money_management/adjustments/id_123"); @@ -6539,7 +6771,8 @@ public void TestV2MoneyManagementFinancialAccountGet2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"undefined\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"undefined\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"undefined\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"ec\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"other\":null,\"status\":\"closed\",\"storage\":null,\"type\":\"other\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.FinancialAccounts; - service.Get("id_123"); + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service + .Get("id_123"); this.AssertRequest( HttpMethod.Get, "/v2/money_management/financial_accounts/id_123"); @@ -6560,7 +6793,8 @@ public void TestV2MoneyManagementFinancialAddressPost() }; var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.FinancialAddresses; - service.Create(options); + Stripe.V2.MoneyManagement.FinancialAddress financialAddress = service + .Create(options); this.AssertRequest( HttpMethod.Post, "/v2/money_management/financial_addresses"); @@ -6593,7 +6827,8 @@ public void TestV2MoneyManagementFinancialAddressGet2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"credentials\":null,\"currency\":\"gip\",\"financial_account\":\"financial_account\",\"status\":\"failed\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.FinancialAddresses; - service.Get("id_123"); + Stripe.V2.MoneyManagement.FinancialAddress financialAddress = service + .Get("id_123"); this.AssertRequest( HttpMethod.Get, "/v2/money_management/financial_addresses/id_123"); @@ -6623,7 +6858,8 @@ public void TestV2MoneyManagementInboundTransferPost() }; var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.InboundTransfers; - service.Create(options); + Stripe.V2.MoneyManagement.InboundTransfer inboundTransfer = service + .Create(options); this.AssertRequest( HttpMethod.Post, "/v2/money_management/inbound_transfers"); @@ -6656,7 +6892,8 @@ public void TestV2MoneyManagementInboundTransferGet2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\",\"us_bank_account\":null}},\"receipt_url\":\"receipt_url\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\",\"bank_debit_failed\":null,\"bank_debit_processing\":null,\"bank_debit_queued\":null,\"bank_debit_returned\":null,\"bank_debit_succeeded\":null}]}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.InboundTransfers; - service.Get("id_123"); + Stripe.V2.MoneyManagement.InboundTransfer inboundTransfer = service + .Get("id_123"); this.AssertRequest( HttpMethod.Get, "/v2/money_management/inbound_transfers/id_123"); @@ -6672,7 +6909,8 @@ public void TestV2MoneyManagementOutboundPaymentPost() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"metadata\":null,\"outbound_payment_quote\":null,\"receipt_url\":\"receipt_url\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\",\"value\":null}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundPayments; - service.Cancel("id_123"); + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Cancel("id_123"); this.AssertRequest( HttpMethod.Post, "/v2/money_management/outbound_payments/id_123/cancel"); @@ -6703,7 +6941,8 @@ public void TestV2MoneyManagementOutboundPaymentPost2() }; var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundPayments; - service.Create(options); + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Create(options); this.AssertRequest( HttpMethod.Post, "/v2/money_management/outbound_payments"); @@ -6736,7 +6975,8 @@ public void TestV2MoneyManagementOutboundPaymentGet2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"metadata\":null,\"outbound_payment_quote\":null,\"receipt_url\":\"receipt_url\",\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\",\"value\":null}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundPayments; - service.Get("id_123"); + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Get("id_123"); this.AssertRequest( HttpMethod.Get, "/v2/money_management/outbound_payments/id_123"); @@ -6767,7 +7007,8 @@ public void TestV2MoneyManagementOutboundPaymentQuotePost() }; var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundPaymentQuotes; - service.Create(options); + Stripe.V2.MoneyManagement.OutboundPaymentQuote outboundPaymentQuote = service + .Create(options); this.AssertRequest( HttpMethod.Post, "/v2/money_management/outbound_payment_quotes"); @@ -6783,7 +7024,8 @@ public void TestV2MoneyManagementOutboundTransferPost() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"metadata\":null,\"receipt_url\":\"receipt_url\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundTransfers; - service.Cancel("id_123"); + Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = service + .Cancel("id_123"); this.AssertRequest( HttpMethod.Post, "/v2/money_management/outbound_transfers/id_123/cancel"); @@ -6813,7 +7055,8 @@ public void TestV2MoneyManagementOutboundTransferPost2() }; var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundTransfers; - service.Create(options); + Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = service + .Create(options); this.AssertRequest( HttpMethod.Post, "/v2/money_management/outbound_transfers"); @@ -6846,7 +7089,8 @@ public void TestV2MoneyManagementOutboundTransferGet2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"metadata\":null,\"receipt_url\":\"receipt_url\",\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundTransfers; - service.Get("id_123"); + Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = service + .Get("id_123"); this.AssertRequest( HttpMethod.Get, "/v2/money_management/outbound_transfers/id_123"); @@ -6862,7 +7106,8 @@ public void TestV2MoneyManagementOutboundSetupIntentPost() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"next_action\":null,\"payout_method\":{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundSetupIntents; - service.Cancel("id_123"); + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service + .Cancel("id_123"); this.AssertRequest( HttpMethod.Post, "/v2/money_management/outbound_setup_intents/id_123/cancel"); @@ -6879,7 +7124,8 @@ public void TestV2MoneyManagementOutboundSetupIntentPost2() var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundSetupIntents; - service.Create(options); + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service + .Create(options); this.AssertRequest( HttpMethod.Post, "/v2/money_management/outbound_setup_intents"); @@ -6912,7 +7158,8 @@ public void TestV2MoneyManagementOutboundSetupIntentGet2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"next_action\":null,\"payout_method\":{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundSetupIntents; - service.Get("id_123"); + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service + .Get("id_123"); this.AssertRequest( HttpMethod.Get, "/v2/money_management/outbound_setup_intents/id_123"); @@ -6929,7 +7176,8 @@ public void TestV2MoneyManagementOutboundSetupIntentPost3() var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundSetupIntents; - service.Update("id_123", options); + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service + .Update("id_123", options); this.AssertRequest( HttpMethod.Post, "/v2/money_management/outbound_setup_intents/id_123"); @@ -6945,7 +7193,8 @@ public void TestV2MoneyManagementPayoutMethodPost() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.PayoutMethods; - service.Archive("id_123"); + Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = service + .Archive("id_123"); this.AssertRequest( HttpMethod.Post, "/v2/money_management/payout_methods/id_123/archive"); @@ -6978,7 +7227,8 @@ public void TestV2MoneyManagementPayoutMethodGet2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.PayoutMethods; - service.Get("id_123"); + Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = service.Get( + "id_123"); this.AssertRequest( HttpMethod.Get, "/v2/money_management/payout_methods/id_123"); @@ -6994,7 +7244,8 @@ public void TestV2MoneyManagementPayoutMethodPost2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.PayoutMethods; - service.Unarchive("id_123"); + Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = service + .Unarchive("id_123"); this.AssertRequest( HttpMethod.Post, "/v2/money_management/payout_methods/id_123/unarchive"); @@ -7013,7 +7264,8 @@ public void TestV2MoneyManagementPayoutMethodsBankAccountSpecGet() .V2 .MoneyManagement .PayoutMethodsBankAccountSpec; - service.Get(); + Stripe.V2.MoneyManagement.PayoutMethodsBankAccountSpec payoutMethodsBankAccountSpec = service + .Get(); this.AssertRequest( HttpMethod.Get, "/v2/money_management/payout_methods_bank_account_spec"); @@ -7046,7 +7298,8 @@ public void TestV2MoneyManagementReceivedCreditGet2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_transfer\":null,\"bank_transfer\":null,\"card_spend\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"receipt_url\":null,\"status\":\"returned\",\"status_details\":null,\"status_transitions\":null,\"type\":\"card_spend\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.ReceivedCredits; - service.Get("id_123"); + Stripe.V2.MoneyManagement.ReceivedCredit receivedCredit = service + .Get("id_123"); this.AssertRequest( HttpMethod.Get, "/v2/money_management/received_credits/id_123"); @@ -7079,7 +7332,8 @@ public void TestV2MoneyManagementReceivedDebitGet2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"bank_transfer\":null,\"card_spend\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"receipt_url\":null,\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"type\":\"bank_transfer\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.ReceivedDebits; - service.Get("id_123"); + Stripe.V2.MoneyManagement.ReceivedDebit receivedDebit = service.Get( + "id_123"); this.AssertRequest( HttpMethod.Get, "/v2/money_management/received_debits/id_123"); @@ -7112,7 +7366,8 @@ public void TestV2MoneyManagementTransactionGet2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"return\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"fee_transaction\",\"adjustment\":null,\"fee_transaction\":null,\"inbound_transfer\":null,\"outbound_payment\":null,\"outbound_transfer\":null,\"received_credit\":null,\"received_debit\":null},\"status\":\"pending\",\"status_transitions\":{\"posted_at\":null,\"void_at\":null}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.Transactions; - service.Get("id_123"); + Stripe.V2.MoneyManagement.Transaction transaction = service.Get( + "id_123"); this.AssertRequest( HttpMethod.Get, "/v2/money_management/transactions/id_123"); @@ -7145,7 +7400,8 @@ public void TestV2MoneyManagementTransactionEntryGet2() "{\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"return\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"fee_transaction\",\"adjustment\":null,\"fee_transaction\":null,\"inbound_transfer\":null,\"outbound_payment\":null,\"outbound_transfer\":null,\"received_credit\":null,\"received_debit\":null}}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.TransactionEntries; - service.Get("id_123"); + Stripe.V2.MoneyManagement.TransactionEntry transactionEntry = service + .Get("id_123"); this.AssertRequest( HttpMethod.Get, "/v2/money_management/transaction_entries/id_123"); @@ -7162,7 +7418,8 @@ public void TestV2BillingMeterEventSessionPost() var options = new Stripe.V2.Billing.MeterEventSessionCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.MeterEventSession; - service.Create(options); + Stripe.V2.Billing.MeterEventSession meterEventSession = service + .Create(options); this.AssertRequest( HttpMethod.Post, "/v2/billing/meter_event_session"); @@ -7187,7 +7444,8 @@ public void TestV2BillingMeterEventAdjustmentPost() }; var client = new StripeClient(this.Requestor); var service = client.V2.Billing.MeterEventAdjustments; - service.Create(options); + Stripe.V2.Billing.MeterEventAdjustment meterEventAdjustment = service + .Create(options); this.AssertRequest( HttpMethod.Post, "/v2/billing/meter_event_adjustments"); @@ -7245,7 +7503,7 @@ public void TestV2BillingMeterEventPost() }; var client = new StripeClient(this.Requestor); var service = client.V2.Billing.MeterEvents; - service.Create(options); + Stripe.V2.Billing.MeterEvent meterEvent = service.Create(options); this.AssertRequest(HttpMethod.Post, "/v2/billing/meter_events"); } @@ -7264,7 +7522,8 @@ public void TestV2TestHelpersFinancialAddressPost() }; var client = new StripeClient(this.Requestor); var service = client.V2.TestHelpers.FinancialAddresses; - service.Credit("id_123", options); + Stripe.V2.FinancialAddressCreditSimulation financialAddressCreditSimulation = service + .Credit("id_123", options); this.AssertRequest( HttpMethod.Post, "/v2/test_helpers/financial_addresses/id_123/credit"); @@ -7280,7 +7539,8 @@ public void TestV2TestHelpersFinancialAddressPost2() "{\"object\":\"financial_address_generated_microdeposits\",\"amounts\":[{\"currency\":\"USD\",\"value\":1}],\"status\":\"accepted\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.TestHelpers.FinancialAddresses; - service.GenerateMicrodeposits("id_123"); + Stripe.V2.FinancialAddressGeneratedMicrodeposits financialAddressGeneratedMicrodeposits = service + .GenerateMicrodeposits("id_123"); this.AssertRequest( HttpMethod.Post, "/v2/test_helpers/financial_addresses/id_123/generate_microdeposits"); @@ -7338,7 +7598,8 @@ public void TestFinancialAccountNotOpenError() }; var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.FinancialAddresses; - service.Create(options); + Stripe.V2.MoneyManagement.FinancialAddress financialAddress = service + .Create(options); }); this.AssertRequest( HttpMethod.Post, @@ -7362,7 +7623,8 @@ public void TestBlockedByStripeError() }; var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; - service.Create(options); + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Create( + options); }); this.AssertRequest( HttpMethod.Post, @@ -7382,7 +7644,8 @@ public void TestAlreadyCanceledError() { var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundPayments; - service.Cancel("id_123"); + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Cancel("id_123"); }); this.AssertRequest( HttpMethod.Post, @@ -7402,7 +7665,8 @@ public void TestNotCancelableError() { var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundPayments; - service.Cancel("id_123"); + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Cancel("id_123"); }); this.AssertRequest( HttpMethod.Post, @@ -7435,7 +7699,8 @@ public void TestInsufficientFundsError() }; var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundPayments; - service.Create(options); + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Create(options); }); this.AssertRequest( HttpMethod.Post, @@ -7459,7 +7724,8 @@ public void TestQuotaExceededError() }; var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; - service.Create(options); + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Create( + options); }); this.AssertRequest( HttpMethod.Post, @@ -7492,7 +7758,8 @@ public void TestRecipientNotNotifiableError() }; var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundPayments; - service.Create(options); + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Create(options); }); this.AssertRequest( HttpMethod.Post, @@ -7525,7 +7792,8 @@ public void TestFeatureNotEnabledError() }; var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundPayments; - service.Create(options); + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Create(options); }); this.AssertRequest( HttpMethod.Post, @@ -7546,7 +7814,8 @@ public void TestInvalidPayoutMethodError() var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundSetupIntents; - service.Create(options); + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service + .Create(options); }); this.AssertRequest( HttpMethod.Post, @@ -7566,7 +7835,8 @@ public void TestControlledByDashboardError() { var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; - service.Archive("id_123"); + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Archive( + "id_123"); }); this.AssertRequest( HttpMethod.Post, @@ -7590,7 +7860,8 @@ public void TestInvalidPaymentMethodError() }; var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; - service.Create(options); + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Create( + options); }); this.AssertRequest( HttpMethod.Post, From c2844aaf1cfa4213393b6be9e6a340de7f04f651 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Mon, 14 Apr 2025 16:37:38 -0700 Subject: [PATCH 07/22] Bump version to 48.0.1 --- CHANGELOG.md | 3 +++ VERSION | 2 +- src/Stripe.net/Constants/Version.cs | 2 +- src/Stripe.net/Stripe.net.csproj | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0612fffb9c..46fef9aa7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 48.0.1 - 2025-04-14 +* [#3090](https://github.com/stripe/stripe-dotnet/pull/3090) Disable Json.NET metadata special handling. Fixes issue [#3068](https://github.com/stripe/stripe-dotnet/issues/3068) + ## 48.0.0 - 2025-04-01 * [#3074](https://github.com/stripe/stripe-dotnet/pull/3074) System.Text.Json Serialization Support release to GA * Add System.Text.Json support for serializing Stripe.net entities and objects for applications running on .NET 6 and above. Now you can pass a Stripe.net object or collection of objects to the System.Text.Json serializer and it will produce the correct JSON string. diff --git a/VERSION b/VERSION index adb9d57dcf..587cdd12f3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -48.0.0 +48.0.1 diff --git a/src/Stripe.net/Constants/Version.cs b/src/Stripe.net/Constants/Version.cs index 988ac9b7aa..87ee4c5381 100644 --- a/src/Stripe.net/Constants/Version.cs +++ b/src/Stripe.net/Constants/Version.cs @@ -2,6 +2,6 @@ namespace Stripe { internal class Version { - public const string Current = "48.0.0"; + public const string Current = "48.0.1"; } } \ No newline at end of file diff --git a/src/Stripe.net/Stripe.net.csproj b/src/Stripe.net/Stripe.net.csproj index 00d97beaa3..e9409590cf 100644 --- a/src/Stripe.net/Stripe.net.csproj +++ b/src/Stripe.net/Stripe.net.csproj @@ -2,7 +2,7 @@ Stripe.net is a sync/async client and portable class library for the Stripe API, supporting .NET Standard 2.0+, .NET Core 3.1+, and .NET Framework 4.6.1+. (Official Library) - 48.0.0 + 48.0.1 8 Stripe, Jayme Davis net5.0;net6.0;net7.0;net8.0;netcoreapp3.1;netstandard2.0;net461 From b2779113183f0284323af40d305f82cd8632347a Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Mon, 14 Apr 2025 18:09:42 -0700 Subject: [PATCH 08/22] replaced Dictionary with ConcurrentDictionary (#3101) --- .../SerializablePropertyCache.cs | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/Stripe.net/Infrastructure/JsonConverters/SerializablePropertyCache.cs b/src/Stripe.net/Infrastructure/JsonConverters/SerializablePropertyCache.cs index f7bbece3a7..bacfe7b40c 100644 --- a/src/Stripe.net/Infrastructure/JsonConverters/SerializablePropertyCache.cs +++ b/src/Stripe.net/Infrastructure/JsonConverters/SerializablePropertyCache.cs @@ -2,6 +2,7 @@ namespace Stripe.Infrastructure { using System; + using System.Collections.Concurrent; using System.Collections.Generic; using System.Reflection; using System.Text.Json; @@ -13,17 +14,17 @@ namespace Stripe.Infrastructure /// internal class SerializablePropertyCache { - private static Dictionary converterCache = new Dictionary(); - private static Dictionary> propertyCache = new Dictionary>(); + private static ConcurrentDictionary converterCache = new ConcurrentDictionary(); + private static ConcurrentDictionary> propertyCache = new ConcurrentDictionary>(); internal static List GetPropertiesForType(Type type) { - if (!propertyCache.TryGetValue(type, out var propsToSerialize)) + return propertyCache.GetOrAdd(type, (key) => { // Gets the all properties including nonpublic properties var rawProps = type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); - propsToSerialize = new List(); + var propsToSerialize = new List(); foreach (var prop in rawProps) { var propertyNameAttribute = prop.GetCustomAttribute(typeof(JsonPropertyNameAttribute), false) as JsonPropertyNameAttribute; @@ -55,10 +56,8 @@ internal static List GetPropertiesForType(Type type) }); } - propertyCache[type] = propsToSerialize; - } - - return propsToSerialize; + return propsToSerialize; + }); } // Create the various methods stored in SerializablePropertyInfo @@ -169,11 +168,10 @@ private static Action CreateSetDelegate(MethodInfo m) private static JsonConverter GetConverterForType(Type ct) where T : JsonConverter { - if (!converterCache.TryGetValue(ct, out var conv)) + var conv = converterCache.GetOrAdd(ct, (key) => { - conv = (JsonConverter)Activator.CreateInstance(ct); - converterCache[ct] = conv; - } + return (JsonConverter)Activator.CreateInstance(ct); + }); return new JsonConverterAdapter((T)conv); } From a16eae1fadd76b29698b5dd2124b0337e84ef997 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Tue, 15 Apr 2025 11:00:09 -0700 Subject: [PATCH 09/22] Bump version to 48.0.2 --- CHANGELOG.md | 3 +++ VERSION | 2 +- src/Stripe.net/Constants/Version.cs | 2 +- src/Stripe.net/Stripe.net.csproj | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46fef9aa7a..49cd0876a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 48.0.2 - 2025-04-15 +* [#3101](https://github.com/stripe/stripe-dotnet/pull/3101) Replace Dictionary with ConcurrentDictionary in SerializablePropertyCache to fix a concurrency related error reported in [#3100](https://github.com/stripe/stripe-dotnet/issues/3100) + ## 48.0.1 - 2025-04-14 * [#3090](https://github.com/stripe/stripe-dotnet/pull/3090) Disable Json.NET metadata special handling. Fixes issue [#3068](https://github.com/stripe/stripe-dotnet/issues/3068) diff --git a/VERSION b/VERSION index 587cdd12f3..0c27087fee 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -48.0.1 +48.0.2 diff --git a/src/Stripe.net/Constants/Version.cs b/src/Stripe.net/Constants/Version.cs index 87ee4c5381..9c6842553d 100644 --- a/src/Stripe.net/Constants/Version.cs +++ b/src/Stripe.net/Constants/Version.cs @@ -2,6 +2,6 @@ namespace Stripe { internal class Version { - public const string Current = "48.0.1"; + public const string Current = "48.0.2"; } } \ No newline at end of file diff --git a/src/Stripe.net/Stripe.net.csproj b/src/Stripe.net/Stripe.net.csproj index e9409590cf..b75e797d3f 100644 --- a/src/Stripe.net/Stripe.net.csproj +++ b/src/Stripe.net/Stripe.net.csproj @@ -2,7 +2,7 @@ Stripe.net is a sync/async client and portable class library for the Stripe API, supporting .NET Standard 2.0+, .NET Core 3.1+, and .NET Framework 4.6.1+. (Official Library) - 48.0.1 + 48.0.2 8 Stripe, Jayme Davis net5.0;net6.0;net7.0;net8.0;netcoreapp3.1;netstandard2.0;net461 From 1a39f8774d3d3192a489654f1d664b6a9e1792b5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 20:22:14 +0000 Subject: [PATCH 10/22] Update generated code for v1680 --- OPENAPI_VERSION | 2 +- .../Services/Checkout/Sessions/SessionLineItemOptions.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index fddebf3dfb..08e7681c50 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1679 \ No newline at end of file +v1680 \ No newline at end of file diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs index 09b3037a97..ebb554d0ad 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionLineItemOptions.cs @@ -64,7 +64,8 @@ public class SessionLineItemOptions : INestedOptions, IHasMetadata, IHasId /// /// Data used to generate a new Price - /// object inline. One of price or price_data is required. + /// object inline. One of price or price_data is required when creating a new + /// line item. /// [JsonProperty("price_data")] #if NET6_0_OR_GREATER From 8681cdf624c537dc5eacdb8ecf4bc6f9191ecc26 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 16 Apr 2025 10:52:00 +0000 Subject: [PATCH 11/22] Update generated code for v1682 --- OPENAPI_VERSION | 2 +- src/Stripe.net/Constants/EventTypes.cs | 5 + src/Stripe.net/Entities/FxQuotes/FxQuote.cs | 115 ++++++++++++++++++ .../Entities/FxQuotes/FxQuoteRates.cs | 26 ++++ .../FxQuotes/FxQuoteRatesRateDetails.cs | 56 +++++++++ .../Entities/FxQuotes/FxQuoteUsage.cs | 41 +++++++ .../Entities/FxQuotes/FxQuoteUsagePayment.cs | 35 ++++++ .../Entities/FxQuotes/FxQuoteUsageTransfer.cs | 23 ++++ .../Entities/PaymentIntents/PaymentIntent.cs | 9 ++ src/Stripe.net/Entities/Transfers/Transfer.cs | 9 ++ .../Public/StripeTypeRegistry.cs | 1 + .../Services/FxQuotes/FxQuoteCreateOptions.cs | 54 ++++++++ .../Services/FxQuotes/FxQuoteGetOptions.cs | 7 ++ .../Services/FxQuotes/FxQuoteListOptions.cs | 7 ++ .../Services/FxQuotes/FxQuoteService.cs | 98 +++++++++++++++ .../Services/FxQuotes/FxQuoteUsageOptions.cs | 41 +++++++ .../FxQuotes/FxQuoteUsagePaymentOptions.cs | 35 ++++++ .../FxQuotes/FxQuoteUsageTransferOptions.cs | 23 ++++ .../PaymentIntentConfirmOptions.cs | 10 ++ .../PaymentIntentCreateOptions.cs | 10 ++ .../PaymentIntentUpdateOptions.cs | 10 ++ .../Transfers/TransferCreateOptions.cs | 10 ++ src/Stripe.net/Services/V1Services.cs | 4 + 23 files changed, 630 insertions(+), 1 deletion(-) create mode 100644 src/Stripe.net/Entities/FxQuotes/FxQuote.cs create mode 100644 src/Stripe.net/Entities/FxQuotes/FxQuoteRates.cs create mode 100644 src/Stripe.net/Entities/FxQuotes/FxQuoteRatesRateDetails.cs create mode 100644 src/Stripe.net/Entities/FxQuotes/FxQuoteUsage.cs create mode 100644 src/Stripe.net/Entities/FxQuotes/FxQuoteUsagePayment.cs create mode 100644 src/Stripe.net/Entities/FxQuotes/FxQuoteUsageTransfer.cs create mode 100644 src/Stripe.net/Services/FxQuotes/FxQuoteCreateOptions.cs create mode 100644 src/Stripe.net/Services/FxQuotes/FxQuoteGetOptions.cs create mode 100644 src/Stripe.net/Services/FxQuotes/FxQuoteListOptions.cs create mode 100644 src/Stripe.net/Services/FxQuotes/FxQuoteService.cs create mode 100644 src/Stripe.net/Services/FxQuotes/FxQuoteUsageOptions.cs create mode 100644 src/Stripe.net/Services/FxQuotes/FxQuoteUsagePaymentOptions.cs create mode 100644 src/Stripe.net/Services/FxQuotes/FxQuoteUsageTransferOptions.cs diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 08e7681c50..e2708afe32 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1680 \ No newline at end of file +v1682 \ No newline at end of file diff --git a/src/Stripe.net/Constants/EventTypes.cs b/src/Stripe.net/Constants/EventTypes.cs index 9e5fb72ac1..c88e85addc 100644 --- a/src/Stripe.net/Constants/EventTypes.cs +++ b/src/Stripe.net/Constants/EventTypes.cs @@ -562,6 +562,11 @@ public static class EventTypes /// public const string FinancialConnectionsSessionUpdated = "financial_connections.session.updated"; + /// + /// Occurs when FX Quote's lock_status field transitions to 'Expired'. + /// + public const string FxQuoteExpired = "fx_quote.expired"; + /// /// Occurs whenever a VerificationSession is canceled. /// diff --git a/src/Stripe.net/Entities/FxQuotes/FxQuote.cs b/src/Stripe.net/Entities/FxQuotes/FxQuote.cs new file mode 100644 index 0000000000..d70d23206a --- /dev/null +++ b/src/Stripe.net/Entities/FxQuotes/FxQuote.cs @@ -0,0 +1,115 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// The FX Quotes API provides three key functions: - View current exchange rates: The + /// object shows Stripe's current exchange rate for any given currency pair. - Extended + /// quotes: The API provides rate quotes valid for a 1-hour period or a 24-hour period, + /// eliminating uncertainty from FX fluctuations. - View FX fees: The API provides + /// information on the FX fees Stripe will charge on your FX transaction, allowing you to + /// anticipate specific settlement amounts before payment costs. + /// + public class FxQuote : StripeEntity, IHasId, IHasObject + { + /// + /// Unique identifier for the object. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; set; } + + /// + /// String representing the object's type. Objects of the same type share the same value. + /// + [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif + public string Object { get; set; } + + /// + /// Time at which the quote was created, measured in seconds since the Unix epoch. + /// + [JsonProperty("created")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The duration the exchange rate quote remains valid from creation time. Allowed values + /// are none, hour, and day. Note that for the test mode API available in alpha, you can + /// request an extended quote, but it won't be usable for any transactions. + /// One of: day, five_minutes, hour, or none. + /// + [JsonProperty("lock_duration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lock_duration")] +#endif + public string LockDuration { get; set; } + + /// + /// Time at which the quote will expire, measured in seconds since the Unix epoch. + /// + /// If lock_duration is set to ‘none’ this field will be set to null. + /// + [JsonProperty("lock_expires_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lock_expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? LockExpiresAt { get; set; } + + /// + /// Lock status of the quote. Transitions from active to expired once past the + /// lock_expires_at timestamp. + /// + /// Can return value none, active, or expired. + /// One of: active, expired, or none. + /// + [JsonProperty("lock_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lock_status")] +#endif + public string LockStatus { get; set; } + + /// + /// Information about the rates. + /// + [JsonProperty("rates")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rates")] +#endif + public Dictionary Rates { get; set; } + + /// + /// The currency to convert into, typically this is the currency that you want to settle to + /// your Stripe balance. Three-letter ISO currency code, in lowercase. Must be a supported + /// currency. + /// + [JsonProperty("to_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("to_currency")] +#endif + public string ToCurrency { get; set; } + + [JsonProperty("usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage")] +#endif + public FxQuoteUsage Usage { get; set; } + } +} diff --git a/src/Stripe.net/Entities/FxQuotes/FxQuoteRates.cs b/src/Stripe.net/Entities/FxQuotes/FxQuoteRates.cs new file mode 100644 index 0000000000..5f8565a451 --- /dev/null +++ b/src/Stripe.net/Entities/FxQuotes/FxQuoteRates.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FxQuoteRates : StripeEntity + { + /// + /// The rate that includes the FX fee rate. + /// + [JsonProperty("exchange_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exchange_rate")] +#endif + public decimal ExchangeRate { get; set; } + + [JsonProperty("rate_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rate_details")] +#endif + public FxQuoteRatesRateDetails RateDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/FxQuotes/FxQuoteRatesRateDetails.cs b/src/Stripe.net/Entities/FxQuotes/FxQuoteRatesRateDetails.cs new file mode 100644 index 0000000000..38ef20b969 --- /dev/null +++ b/src/Stripe.net/Entities/FxQuotes/FxQuoteRatesRateDetails.cs @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FxQuoteRatesRateDetails : StripeEntity + { + /// + /// The rate for the currency pair. + /// + [JsonProperty("base_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("base_rate")] +#endif + public decimal BaseRate { get; set; } + + /// + /// The fee for locking the conversion rates. + /// + [JsonProperty("duration_premium")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duration_premium")] +#endif + public decimal DurationPremium { get; set; } + + /// + /// The FX fee for the currency pair. + /// + [JsonProperty("fx_fee_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fx_fee_rate")] +#endif + public decimal FxFeeRate { get; set; } + + /// + /// A reference rate for the currency pair provided by the reference rate provider. + /// + [JsonProperty("reference_rate")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_rate")] +#endif + public decimal? ReferenceRate { get; set; } + + /// + /// The reference rate provider. + /// + [JsonProperty("reference_rate_provider")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_rate_provider")] +#endif + public string ReferenceRateProvider { get; set; } + } +} diff --git a/src/Stripe.net/Entities/FxQuotes/FxQuoteUsage.cs b/src/Stripe.net/Entities/FxQuotes/FxQuoteUsage.cs new file mode 100644 index 0000000000..dd20a32958 --- /dev/null +++ b/src/Stripe.net/Entities/FxQuotes/FxQuoteUsage.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FxQuoteUsage : StripeEntity + { + /// + /// The details required to use an FX Quote for a payment. + /// + [JsonProperty("payment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment")] +#endif + public FxQuoteUsagePayment Payment { get; set; } + + /// + /// The details required to use an FX Quote for a transfer. + /// + [JsonProperty("transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer")] +#endif + public FxQuoteUsageTransfer Transfer { get; set; } + + /// + /// The transaction type for which the FX Quote will be used. + /// + /// Can be 'payment' or 'transfer'. + /// One of: payment, or transfer. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/FxQuotes/FxQuoteUsagePayment.cs b/src/Stripe.net/Entities/FxQuotes/FxQuoteUsagePayment.cs new file mode 100644 index 0000000000..7130b481ed --- /dev/null +++ b/src/Stripe.net/Entities/FxQuotes/FxQuoteUsagePayment.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FxQuoteUsagePayment : StripeEntity + { + /// + /// The Stripe account ID that the funds will be transferred to. + /// + /// This field should match the account ID that would be used in the PaymentIntent’s + /// transfer_data[destination] field. + /// + [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif + public string Destination { get; set; } + + /// + /// The Stripe account ID that these funds are intended for. + /// + /// This field must match the account ID that would be used in the PaymentIntent’s + /// on_behalf_of field. + /// + [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif + public string OnBehalfOf { get; set; } + } +} diff --git a/src/Stripe.net/Entities/FxQuotes/FxQuoteUsageTransfer.cs b/src/Stripe.net/Entities/FxQuotes/FxQuoteUsageTransfer.cs new file mode 100644 index 0000000000..750b791226 --- /dev/null +++ b/src/Stripe.net/Entities/FxQuotes/FxQuoteUsageTransfer.cs @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FxQuoteUsageTransfer : StripeEntity + { + /// + /// The Stripe account ID that the funds will be transferred to. + /// + /// This field should match the account ID that would be used in the Transfer’s destination + /// field. + /// + [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif + public string Destination { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs index a17215a97b..7fbefc74c0 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs @@ -337,6 +337,15 @@ public Customer Customer #endif public string Description { get; set; } + /// + /// The FX Quote used for the PaymentIntent. + /// + [JsonProperty("fx_quote")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fx_quote")] +#endif + public string FxQuote { get; set; } + /// /// The payment error encountered in the previous PaymentIntent confirmation. It will be /// cleared if the PaymentIntent is later updated for any reason. diff --git a/src/Stripe.net/Entities/Transfers/Transfer.cs b/src/Stripe.net/Entities/Transfers/Transfer.cs index b52051b882..7e8c081efc 100644 --- a/src/Stripe.net/Entities/Transfers/Transfer.cs +++ b/src/Stripe.net/Entities/Transfers/Transfer.cs @@ -221,6 +221,15 @@ public Charge DestinationPayment internal ExpandableField InternalDestinationPayment { get; set; } #endregion + /// + /// The FX Quote used for the transfer. + /// + [JsonProperty("fx_quote")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fx_quote")] +#endif + public string FxQuote { get; set; } + /// /// Has the value true if the object exists in live mode or the value false if /// the object exists in test mode. diff --git a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index 580bea32cc..d06962a3f0 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -100,6 +100,7 @@ public static class StripeTypeRegistry }, { "forwarding.request", typeof(Forwarding.Request) }, { "funding_instructions", typeof(FundingInstructions) }, + { "fx_quote", typeof(FxQuote) }, { "gift_cards.card", typeof(GiftCards.Card) }, { "gift_cards.transaction", typeof(GiftCards.Transaction) }, { "identity.verification_report", typeof(Identity.VerificationReport) }, diff --git a/src/Stripe.net/Services/FxQuotes/FxQuoteCreateOptions.cs b/src/Stripe.net/Services/FxQuotes/FxQuoteCreateOptions.cs new file mode 100644 index 0000000000..764564df2a --- /dev/null +++ b/src/Stripe.net/Services/FxQuotes/FxQuoteCreateOptions.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FxQuoteCreateOptions : BaseOptions + { + /// + /// A list of three letter ISO + /// currency code, in lowercase. Must be supported currencies. + /// + [JsonProperty("from_currencies")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("from_currencies")] +#endif + public List FromCurrencies { get; set; } + + /// + /// The duration that you wish the quote to be locked for. The quote will be usable for the + /// duration specified. The default is none. The maximum is 1 day. + /// One of: day, five_minutes, hour, or none. + /// + [JsonProperty("lock_duration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lock_duration")] +#endif + public string LockDuration { get; set; } + + /// + /// Three-letter ISO currency + /// code, in lowercase. Must be a supported + /// currency. + /// + [JsonProperty("to_currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("to_currency")] +#endif + public string ToCurrency { get; set; } + + /// + /// The usage specific information for the quote. + /// + [JsonProperty("usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usage")] +#endif + public FxQuoteUsageOptions Usage { get; set; } + } +} diff --git a/src/Stripe.net/Services/FxQuotes/FxQuoteGetOptions.cs b/src/Stripe.net/Services/FxQuotes/FxQuoteGetOptions.cs new file mode 100644 index 0000000000..53abb8d1c7 --- /dev/null +++ b/src/Stripe.net/Services/FxQuotes/FxQuoteGetOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class FxQuoteGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/FxQuotes/FxQuoteListOptions.cs b/src/Stripe.net/Services/FxQuotes/FxQuoteListOptions.cs new file mode 100644 index 0000000000..6b37653752 --- /dev/null +++ b/src/Stripe.net/Services/FxQuotes/FxQuoteListOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class FxQuoteListOptions : ListOptions + { + } +} diff --git a/src/Stripe.net/Services/FxQuotes/FxQuoteService.cs b/src/Stripe.net/Services/FxQuotes/FxQuoteService.cs new file mode 100644 index 0000000000..06321b2de7 --- /dev/null +++ b/src/Stripe.net/Services/FxQuotes/FxQuoteService.cs @@ -0,0 +1,98 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class FxQuoteService : Service, + ICreatable, + IListable, + IRetrievable + { + public FxQuoteService() + { + } + + internal FxQuoteService(ApiRequestor requestor) + : base(requestor) + { + } + + public FxQuoteService(IStripeClient client) + : base(client) + { + } + + /// + ///

Creates an FX Quote object

. + ///
+ public virtual FxQuote Create(FxQuoteCreateOptions options, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/fx_quotes", options, requestOptions); + } + + /// + ///

Creates an FX Quote object

. + ///
+ public virtual Task CreateAsync(FxQuoteCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/fx_quotes", options, requestOptions, cancellationToken); + } + + /// + ///

Retrieve an FX Quote object

. + ///
+ public virtual FxQuote Get(string id, FxQuoteGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v1/fx_quotes/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + ///

Retrieve an FX Quote object

. + ///
+ public virtual Task GetAsync(string id, FxQuoteGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v1/fx_quotes/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + + /// + ///

Returns a list of FX quotes that have been issued. The FX quotes are returned in + /// sorted order, with the most recent FX quotes appearing first.

. + ///
+ public virtual StripeList List(FxQuoteListOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v1/fx_quotes", options, requestOptions); + } + + /// + ///

Returns a list of FX quotes that have been issued. The FX quotes are returned in + /// sorted order, with the most recent FX quotes appearing first.

. + ///
+ public virtual Task> ListAsync(FxQuoteListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v1/fx_quotes", options, requestOptions, cancellationToken); + } + + /// + ///

Returns a list of FX quotes that have been issued. The FX quotes are returned in + /// sorted order, with the most recent FX quotes appearing first.

. + ///
+ public virtual IEnumerable ListAutoPaging(FxQuoteListOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v1/fx_quotes", options, requestOptions); + } + + /// + ///

Returns a list of FX quotes that have been issued. The FX quotes are returned in + /// sorted order, with the most recent FX quotes appearing first.

. + ///
+ public virtual IAsyncEnumerable ListAutoPagingAsync(FxQuoteListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v1/fx_quotes", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/FxQuotes/FxQuoteUsageOptions.cs b/src/Stripe.net/Services/FxQuotes/FxQuoteUsageOptions.cs new file mode 100644 index 0000000000..565a78f1ed --- /dev/null +++ b/src/Stripe.net/Services/FxQuotes/FxQuoteUsageOptions.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FxQuoteUsageOptions : INestedOptions + { + /// + /// The payment transaction details that are intended for the FX Quote. + /// + [JsonProperty("payment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment")] +#endif + public FxQuoteUsagePaymentOptions Payment { get; set; } + + /// + /// The transfer transaction details that are intended for the FX Quote. + /// + [JsonProperty("transfer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transfer")] +#endif + public FxQuoteUsageTransferOptions Transfer { get; set; } + + /// + /// Which transaction the FX Quote will be used for. + /// + /// Can be “payment” | “transfer”. + /// One of: payment, or transfer. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/FxQuotes/FxQuoteUsagePaymentOptions.cs b/src/Stripe.net/Services/FxQuotes/FxQuoteUsagePaymentOptions.cs new file mode 100644 index 0000000000..ae07eb5471 --- /dev/null +++ b/src/Stripe.net/Services/FxQuotes/FxQuoteUsagePaymentOptions.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FxQuoteUsagePaymentOptions : INestedOptions + { + /// + /// The Stripe account ID that the funds will be transferred to. + /// + /// This field should match the account ID that would be used in the PaymentIntent’s + /// transfer_data[destination] field. + /// + [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif + public string Destination { get; set; } + + /// + /// The Stripe account ID that these funds are intended for. + /// + /// This field should match the account ID that would be used in the PaymentIntent’s + /// on_behalf_of field. + /// + [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif + public string OnBehalfOf { get; set; } + } +} diff --git a/src/Stripe.net/Services/FxQuotes/FxQuoteUsageTransferOptions.cs b/src/Stripe.net/Services/FxQuotes/FxQuoteUsageTransferOptions.cs new file mode 100644 index 0000000000..c4157643ab --- /dev/null +++ b/src/Stripe.net/Services/FxQuotes/FxQuoteUsageTransferOptions.cs @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FxQuoteUsageTransferOptions : INestedOptions + { + /// + /// The Stripe account ID that the funds will be transferred to. + /// + /// This field should match the account ID that would be used in the Transfer’s destination + /// field. + /// + [JsonProperty("destination")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("destination")] +#endif + public string Destination { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs index 8ee6bab586..562a5da9c0 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs @@ -74,6 +74,16 @@ public class PaymentIntentConfirmOptions : BaseOptions #endif public bool? ErrorOnRequiresAction { get; set; } + /// + /// The FX rate in the quote is validated and used to convert the presentment amount to the + /// settlement amount. + /// + [JsonProperty("fx_quote")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fx_quote")] +#endif + public string FxQuote { get; set; } + /// /// ID of the mandate that's used for this payment. /// diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs index 80be63f90a..1ad3d03a3d 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs @@ -181,6 +181,16 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata #endif public bool? ErrorOnRequiresAction { get; set; } + /// + /// The FX rate in the quote is validated and used to convert the presentment amount to the + /// settlement amount. + /// + [JsonProperty("fx_quote")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fx_quote")] +#endif + public string FxQuote { get; set; } + /// /// ID of the mandate that's used for this payment. This parameter can only be used with confirm=true. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs index 5024afa89b..73ec3db319 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs @@ -118,6 +118,16 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata #endif public string Description { get; set; } + /// + /// The FX rate in the quote is validated and used to convert the presentment amount to the + /// settlement amount. + /// + [JsonProperty("fx_quote")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fx_quote")] +#endif + public string FxQuote { get; set; } + /// /// This hash contains details about the Mandate to create. /// diff --git a/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs b/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs index 0c0b220abc..efe96d2cf5 100644 --- a/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs +++ b/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs @@ -49,6 +49,16 @@ public class TransferCreateOptions : BaseOptions, IHasMetadata #endif public string Destination { get; set; } + /// + /// The FX rate in the quote is validated and used to convert the transfer amount to the + /// destination currency. + /// + [JsonProperty("fx_quote")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fx_quote")] +#endif + public string FxQuote { get; set; } + /// /// Set of key-value pairs that you can /// attach to an object. This can be useful for storing additional information about the diff --git a/src/Stripe.net/Services/V1Services.cs b/src/Stripe.net/Services/V1Services.cs index 52f4629bbd..13b007c21d 100644 --- a/src/Stripe.net/Services/V1Services.cs +++ b/src/Stripe.net/Services/V1Services.cs @@ -40,6 +40,7 @@ public class V1Services : Service private FileLinkService fileLinks; private FinancialConnectionsService financialConnections; private ForwardingService forwarding; + private FxQuoteService fxQuotes; private GiftCardsService giftCards; private IdentityService identity; private InvoiceService invoices; @@ -196,6 +197,9 @@ internal V1Services(IStripeClient client) public virtual ForwardingService Forwarding => this.forwarding ??= new ForwardingService( this.Requestor); + public virtual FxQuoteService FxQuotes => this.fxQuotes ??= new FxQuoteService( + this.Requestor); + public virtual GiftCardsService GiftCards => this.giftCards ??= new GiftCardsService( this.Requestor); From 38ce054be40f3fe0e42e4706f19c5ca71f87c071 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 16 Apr 2025 19:48:01 +0000 Subject: [PATCH 12/22] Update generated code for v1685 --- OPENAPI_VERSION | 2 +- src/Stripe.net/Entities/Persons/Person.cs | 9 +++++ .../Entities/Persons/PersonUsCfpbData.cs | 38 +++++++++++++++++++ .../PersonUsCfpbDataEthnicityDetails.cs | 33 ++++++++++++++++ .../Persons/PersonUsCfpbDataRaceDetails.cs | 38 +++++++++++++++++++ .../AccountPersonCreateOptions.cs | 9 +++++ .../AccountPersonUpdateOptions.cs | 9 +++++ ...PersonUsCfpbDataEthnicityDetailsOptions.cs | 33 ++++++++++++++++ .../AccountPersonUsCfpbDataOptions.cs | 38 +++++++++++++++++++ ...countPersonUsCfpbDataRaceDetailsOptions.cs | 38 +++++++++++++++++++ .../Services/Tokens/TokenPersonOptions.cs | 9 +++++ ...PersonUsCfpbDataEthnicityDetailsOptions.cs | 33 ++++++++++++++++ .../Tokens/TokenPersonUsCfpbDataOptions.cs | 38 +++++++++++++++++++ ...TokenPersonUsCfpbDataRaceDetailsOptions.cs | 38 +++++++++++++++++++ 14 files changed, 364 insertions(+), 1 deletion(-) create mode 100644 src/Stripe.net/Entities/Persons/PersonUsCfpbData.cs create mode 100644 src/Stripe.net/Entities/Persons/PersonUsCfpbDataEthnicityDetails.cs create mode 100644 src/Stripe.net/Entities/Persons/PersonUsCfpbDataRaceDetails.cs create mode 100644 src/Stripe.net/Services/AccountPersons/AccountPersonUsCfpbDataEthnicityDetailsOptions.cs create mode 100644 src/Stripe.net/Services/AccountPersons/AccountPersonUsCfpbDataOptions.cs create mode 100644 src/Stripe.net/Services/AccountPersons/AccountPersonUsCfpbDataRaceDetailsOptions.cs create mode 100644 src/Stripe.net/Services/Tokens/TokenPersonUsCfpbDataEthnicityDetailsOptions.cs create mode 100644 src/Stripe.net/Services/Tokens/TokenPersonUsCfpbDataOptions.cs create mode 100644 src/Stripe.net/Services/Tokens/TokenPersonUsCfpbDataRaceDetailsOptions.cs diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e2708afe32..7cbbcf25e8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1682 \ No newline at end of file +v1685 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Persons/Person.cs b/src/Stripe.net/Entities/Persons/Person.cs index c560c82929..e459e613dd 100644 --- a/src/Stripe.net/Entities/Persons/Person.cs +++ b/src/Stripe.net/Entities/Persons/Person.cs @@ -326,6 +326,15 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject #endif public bool SsnLast4Provided { get; set; } + /// + /// Demographic data related to the person. + /// + [JsonProperty("us_cfpb_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_cfpb_data")] +#endif + public PersonUsCfpbData UsCfpbData { get; set; } + [JsonProperty("verification")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("verification")] diff --git a/src/Stripe.net/Entities/Persons/PersonUsCfpbData.cs b/src/Stripe.net/Entities/Persons/PersonUsCfpbData.cs new file mode 100644 index 0000000000..85e43f16c1 --- /dev/null +++ b/src/Stripe.net/Entities/Persons/PersonUsCfpbData.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PersonUsCfpbData : StripeEntity + { + /// + /// The persons ethnicity details. + /// + [JsonProperty("ethnicity_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ethnicity_details")] +#endif + public PersonUsCfpbDataEthnicityDetails EthnicityDetails { get; set; } + + /// + /// The persons race details. + /// + [JsonProperty("race_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("race_details")] +#endif + public PersonUsCfpbDataRaceDetails RaceDetails { get; set; } + + /// + /// The persons self-identified gender. + /// + [JsonProperty("self_identified_gender")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("self_identified_gender")] +#endif + public string SelfIdentifiedGender { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Persons/PersonUsCfpbDataEthnicityDetails.cs b/src/Stripe.net/Entities/Persons/PersonUsCfpbDataEthnicityDetails.cs new file mode 100644 index 0000000000..4b9afedd2f --- /dev/null +++ b/src/Stripe.net/Entities/Persons/PersonUsCfpbDataEthnicityDetails.cs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PersonUsCfpbDataEthnicityDetails : StripeEntity + { + /// + /// The persons ethnicity. + /// One of: cuban, hispanic_or_latino, mexican, + /// not_hispanic_or_latino, other_hispanic_or_latino, + /// prefer_not_to_answer, or puerto_rican. + /// + [JsonProperty("ethnicity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ethnicity")] +#endif + public List Ethnicity { get; set; } + + /// + /// Please specify your origin, when other is selected. + /// + [JsonProperty("ethnicity_other")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ethnicity_other")] +#endif + public string EthnicityOther { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Persons/PersonUsCfpbDataRaceDetails.cs b/src/Stripe.net/Entities/Persons/PersonUsCfpbDataRaceDetails.cs new file mode 100644 index 0000000000..a254bed310 --- /dev/null +++ b/src/Stripe.net/Entities/Persons/PersonUsCfpbDataRaceDetails.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PersonUsCfpbDataRaceDetails : StripeEntity + { + /// + /// The persons race. + /// One of: african_american, american_indian_or_alaska_native, asian, + /// asian_indian, black_or_african_american, chinese, ethiopian, + /// filipino, guamanian_or_chamorro, haitian, jamaican, + /// japanese, korean, native_hawaiian, + /// native_hawaiian_or_other_pacific_islander, nigerian, other_asian, + /// other_black_or_african_american, other_pacific_islander, + /// prefer_not_to_answer, samoan, somali, vietnamese, or + /// white. + /// + [JsonProperty("race")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("race")] +#endif + public List Race { get; set; } + + /// + /// Please specify your race, when other is selected. + /// + [JsonProperty("race_other")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("race_other")] +#endif + public string RaceOther { get; set; } + } +} diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs index 150558a54b..a3feb5dbd2 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs @@ -261,6 +261,15 @@ public class AccountPersonCreateOptions : BaseOptions, IHasMetadata #endif public string SsnLast4 { get; set; } + /// + /// Demographic data related to the person. + /// + [JsonProperty("us_cfpb_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_cfpb_data")] +#endif + public AccountPersonUsCfpbDataOptions UsCfpbData { get; set; } + /// /// The person's verification status. /// diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs index b6186fe25d..c9a7c9449e 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs @@ -261,6 +261,15 @@ public class AccountPersonUpdateOptions : BaseOptions, IHasMetadata #endif public string SsnLast4 { get; set; } + /// + /// Demographic data related to the person. + /// + [JsonProperty("us_cfpb_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_cfpb_data")] +#endif + public AccountPersonUsCfpbDataOptions UsCfpbData { get; set; } + /// /// The person's verification status. /// diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonUsCfpbDataEthnicityDetailsOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonUsCfpbDataEthnicityDetailsOptions.cs new file mode 100644 index 0000000000..f49ebbbd60 --- /dev/null +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonUsCfpbDataEthnicityDetailsOptions.cs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountPersonUsCfpbDataEthnicityDetailsOptions : INestedOptions + { + /// + /// The persons ethnicity. + /// One of: cuban, hispanic_or_latino, mexican, + /// not_hispanic_or_latino, other_hispanic_or_latino, + /// prefer_not_to_answer, or puerto_rican. + /// + [JsonProperty("ethnicity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ethnicity")] +#endif + public List Ethnicity { get; set; } + + /// + /// Please specify your origin, when other is selected. + /// + [JsonProperty("ethnicity_other")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ethnicity_other")] +#endif + public string EthnicityOther { get; set; } + } +} diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonUsCfpbDataOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonUsCfpbDataOptions.cs new file mode 100644 index 0000000000..cdb0a9d245 --- /dev/null +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonUsCfpbDataOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountPersonUsCfpbDataOptions : INestedOptions + { + /// + /// The persons ethnicity details. + /// + [JsonProperty("ethnicity_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ethnicity_details")] +#endif + public AccountPersonUsCfpbDataEthnicityDetailsOptions EthnicityDetails { get; set; } + + /// + /// The persons race details. + /// + [JsonProperty("race_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("race_details")] +#endif + public AccountPersonUsCfpbDataRaceDetailsOptions RaceDetails { get; set; } + + /// + /// The persons self-identified gender. + /// + [JsonProperty("self_identified_gender")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("self_identified_gender")] +#endif + public string SelfIdentifiedGender { get; set; } + } +} diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonUsCfpbDataRaceDetailsOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonUsCfpbDataRaceDetailsOptions.cs new file mode 100644 index 0000000000..80c1ca74a0 --- /dev/null +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonUsCfpbDataRaceDetailsOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountPersonUsCfpbDataRaceDetailsOptions : INestedOptions + { + /// + /// The persons race. + /// One of: african_american, american_indian_or_alaska_native, asian, + /// asian_indian, black_or_african_american, chinese, ethiopian, + /// filipino, guamanian_or_chamorro, haitian, jamaican, + /// japanese, korean, native_hawaiian, + /// native_hawaiian_or_other_pacific_islander, nigerian, other_asian, + /// other_black_or_african_american, other_pacific_islander, + /// prefer_not_to_answer, samoan, somali, vietnamese, or + /// white. + /// + [JsonProperty("race")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("race")] +#endif + public List Race { get; set; } + + /// + /// Please specify your race, when other is selected. + /// + [JsonProperty("race_other")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("race_other")] +#endif + public string RaceOther { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs index d63ce08870..1d282b8ac6 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs @@ -251,6 +251,15 @@ public class TokenPersonOptions : INestedOptions, IHasMetadata #endif public string SsnLast4 { get; set; } + /// + /// Demographic data related to the person. + /// + [JsonProperty("us_cfpb_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("us_cfpb_data")] +#endif + public TokenPersonUsCfpbDataOptions UsCfpbData { get; set; } + /// /// The person's verification status. /// diff --git a/src/Stripe.net/Services/Tokens/TokenPersonUsCfpbDataEthnicityDetailsOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonUsCfpbDataEthnicityDetailsOptions.cs new file mode 100644 index 0000000000..8dc9adea08 --- /dev/null +++ b/src/Stripe.net/Services/Tokens/TokenPersonUsCfpbDataEthnicityDetailsOptions.cs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class TokenPersonUsCfpbDataEthnicityDetailsOptions : INestedOptions + { + /// + /// The persons ethnicity. + /// One of: cuban, hispanic_or_latino, mexican, + /// not_hispanic_or_latino, other_hispanic_or_latino, + /// prefer_not_to_answer, or puerto_rican. + /// + [JsonProperty("ethnicity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ethnicity")] +#endif + public List Ethnicity { get; set; } + + /// + /// Please specify your origin, when other is selected. + /// + [JsonProperty("ethnicity_other")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ethnicity_other")] +#endif + public string EthnicityOther { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tokens/TokenPersonUsCfpbDataOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonUsCfpbDataOptions.cs new file mode 100644 index 0000000000..39ab134eb5 --- /dev/null +++ b/src/Stripe.net/Services/Tokens/TokenPersonUsCfpbDataOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class TokenPersonUsCfpbDataOptions : INestedOptions + { + /// + /// The persons ethnicity details. + /// + [JsonProperty("ethnicity_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ethnicity_details")] +#endif + public TokenPersonUsCfpbDataEthnicityDetailsOptions EthnicityDetails { get; set; } + + /// + /// The persons race details. + /// + [JsonProperty("race_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("race_details")] +#endif + public TokenPersonUsCfpbDataRaceDetailsOptions RaceDetails { get; set; } + + /// + /// The persons self-identified gender. + /// + [JsonProperty("self_identified_gender")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("self_identified_gender")] +#endif + public string SelfIdentifiedGender { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tokens/TokenPersonUsCfpbDataRaceDetailsOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonUsCfpbDataRaceDetailsOptions.cs new file mode 100644 index 0000000000..7e72e8ea12 --- /dev/null +++ b/src/Stripe.net/Services/Tokens/TokenPersonUsCfpbDataRaceDetailsOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class TokenPersonUsCfpbDataRaceDetailsOptions : INestedOptions + { + /// + /// The persons race. + /// One of: african_american, american_indian_or_alaska_native, asian, + /// asian_indian, black_or_african_american, chinese, ethiopian, + /// filipino, guamanian_or_chamorro, haitian, jamaican, + /// japanese, korean, native_hawaiian, + /// native_hawaiian_or_other_pacific_islander, nigerian, other_asian, + /// other_black_or_african_american, other_pacific_islander, + /// prefer_not_to_answer, samoan, somali, vietnamese, or + /// white. + /// + [JsonProperty("race")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("race")] +#endif + public List Race { get; set; } + + /// + /// Please specify your race, when other is selected. + /// + [JsonProperty("race_other")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("race_other")] +#endif + public string RaceOther { get; set; } + } +} From 01407c587766230928ed963221b2a1d6f87c4799 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 16 Apr 2025 20:54:32 +0000 Subject: [PATCH 13/22] Update generated code for v1686 --- OPENAPI_VERSION | 2 +- src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs | 9 +++++++++ ...onfirmationTokenPaymentMethodPreviewBillingDetails.cs | 9 +++++++++ .../PaymentMethods/PaymentMethodBillingDetails.cs | 9 +++++++++ ...aymentIntentPaymentMethodDataBillingDetailsOptions.cs | 9 +++++++++ .../PaymentMethods/PaymentMethodBillingDetailsOptions.cs | 9 +++++++++ .../SetupIntentPaymentMethodDataBillingDetailsOptions.cs | 9 +++++++++ ...rmationTokenPaymentMethodDataBillingDetailsOptions.cs | 9 +++++++++ ...tDestinationPaymentMethodDataBillingDetailsOptions.cs | 9 +++++++++ 9 files changed, 73 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7cbbcf25e8..c3c4743af9 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1685 \ No newline at end of file +v1686 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs b/src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs index 7bc3476a0c..f9615e25fe 100644 --- a/src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs +++ b/src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs @@ -43,5 +43,14 @@ public class ChargeBillingDetails : StripeEntity [STJS.JsonPropertyName("phone")] #endif public string Phone { get; set; } + + /// + /// Taxpayer identification number. + /// + [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif + public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillingDetails.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillingDetails.cs index 3e3120c920..3df1ef0a6b 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillingDetails.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillingDetails.cs @@ -43,5 +43,14 @@ public class ConfirmationTokenPaymentMethodPreviewBillingDetails : StripeEntity< [STJS.JsonPropertyName("phone")] #endif public string Phone { get; set; } + + /// + /// Taxpayer identification number. + /// + [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif + public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillingDetails.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillingDetails.cs index 228dab5f56..879759ba22 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillingDetails.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillingDetails.cs @@ -43,5 +43,14 @@ public class PaymentMethodBillingDetails : StripeEntity + /// Taxpayer identification number. + /// + [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif + public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs index e86728ac85..595164819a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs @@ -43,5 +43,14 @@ public class PaymentIntentPaymentMethodDataBillingDetailsOptions : INestedOption [STJS.JsonPropertyName("phone")] #endif public string Phone { get; set; } + + /// + /// Taxpayer identification number. + /// + [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif + public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs index b5fc921b67..c9813fcae0 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs @@ -43,5 +43,14 @@ public class PaymentMethodBillingDetailsOptions : INestedOptions [STJS.JsonPropertyName("phone")] #endif public string Phone { get; set; } + + /// + /// Taxpayer identification number. + /// + [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif + public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs index ba04be64eb..574bd05685 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs @@ -43,5 +43,14 @@ public class SetupIntentPaymentMethodDataBillingDetailsOptions : INestedOptions [STJS.JsonPropertyName("phone")] #endif public string Phone { get; set; } + + /// + /// Taxpayer identification number. + /// + [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif + public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs index fa641e4ab1..083299f66d 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs @@ -43,5 +43,14 @@ public class ConfirmationTokenPaymentMethodDataBillingDetailsOptions : INestedOp [STJS.JsonPropertyName("phone")] #endif public string Phone { get; set; } + + /// + /// Taxpayer identification number. + /// + [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif + public string TaxId { get; set; } } } diff --git a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs index 91dad2b6bc..b2166d01f6 100644 --- a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs @@ -43,5 +43,14 @@ public class OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions : [STJS.JsonPropertyName("phone")] #endif public string Phone { get; set; } + + /// + /// Taxpayer identification number. + /// + [JsonProperty("tax_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_id")] +#endif + public string TaxId { get; set; } } } From 1c08192fa3e72ba7881395854d9b0be65ca27d34 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 02:54:12 +0000 Subject: [PATCH 14/22] Update generated code for v1687 --- OPENAPI_VERSION | 2 +- src/Stripe.net/Entities/Coupons/Coupon.cs | 22 ++++++++++ .../Entities/Coupons/CouponScript.cs | 40 +++++++++++++++++++ .../Services/Coupons/CouponCreateOptions.cs | 11 +++++ .../Services/Coupons/CouponScriptOptions.cs | 31 ++++++++++++++ 5 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 src/Stripe.net/Entities/Coupons/CouponScript.cs create mode 100644 src/Stripe.net/Services/Coupons/CouponScriptOptions.cs diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c3c4743af9..1d77ec7a9d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1686 \ No newline at end of file +v1687 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Coupons/Coupon.cs b/src/Stripe.net/Entities/Coupons/Coupon.cs index 156aa5e926..554181dbaa 100644 --- a/src/Stripe.net/Entities/Coupons/Coupon.cs +++ b/src/Stripe.net/Entities/Coupons/Coupon.cs @@ -181,6 +181,17 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject #endif public DateTime? RedeemBy { get; set; } + /// + /// Configuration of the script used to + /// calculate the discount. + /// + [JsonProperty("script")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("script")] +#endif + public CouponScript Script { get; set; } + /// /// Number of times this coupon has been applied to a customer. /// @@ -190,6 +201,17 @@ public class Coupon : StripeEntity, IHasId, IHasMetadata, IHasObject #endif public long TimesRedeemed { get; set; } + /// + /// One of amount_off, percent_off, or script. Describes the type of + /// coupon logic used to calculate the discount. + /// One of: amount_off, percent_off, or script. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + /// /// Taking account of the above properties, whether this coupon can still be applied to a /// customer. diff --git a/src/Stripe.net/Entities/Coupons/CouponScript.cs b/src/Stripe.net/Entities/Coupons/CouponScript.cs new file mode 100644 index 0000000000..1b576be21f --- /dev/null +++ b/src/Stripe.net/Entities/Coupons/CouponScript.cs @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CouponScript : StripeEntity, IHasId + { + /// + /// The configuration values of the script. The keys and values are specific to the script + /// implementation. + /// + [JsonProperty("configuration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("configuration")] +#endif + public Dictionary Configuration { get; set; } + + /// + /// The name of the script used to calculate the discount. + /// + [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif + public string DisplayName { get; set; } + + /// + /// The script implementation ID for this coupon. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; set; } + } +} diff --git a/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs b/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs index 6f7e042ecb..6bf03d8d19 100644 --- a/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs +++ b/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs @@ -138,5 +138,16 @@ public class CouponCreateOptions : BaseOptions, IHasId, IHasMetadata [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] #endif public DateTime? RedeemBy { get; set; } + + /// + /// Configuration of the script used to + /// calculate the discount. + /// + [JsonProperty("script")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("script")] +#endif + public CouponScriptOptions Script { get; set; } } } diff --git a/src/Stripe.net/Services/Coupons/CouponScriptOptions.cs b/src/Stripe.net/Services/Coupons/CouponScriptOptions.cs new file mode 100644 index 0000000000..6887e3b8b2 --- /dev/null +++ b/src/Stripe.net/Services/Coupons/CouponScriptOptions.cs @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CouponScriptOptions : INestedOptions, IHasId + { + /// + /// The configuration values of the script. The keys and values are specific to the script + /// implementation. + /// + [JsonProperty("configuration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("configuration")] +#endif + public Dictionary Configuration { get; set; } + + /// + /// The script implementation ID for this coupon. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; set; } + } +} From 18df85a682bfa178a933e4a4df24ad44c1839be8 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 04:19:30 +0000 Subject: [PATCH 15/22] Update generated code for v1688 --- OPENAPI_VERSION | 2 +- src/Stripe.net/Entities/Persons/PersonVerification.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1d77ec7a9d..41a4d5ec21 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1687 \ No newline at end of file +v1688 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Persons/PersonVerification.cs b/src/Stripe.net/Entities/Persons/PersonVerification.cs index 6c53aab1c8..a894c72bff 100644 --- a/src/Stripe.net/Entities/Persons/PersonVerification.cs +++ b/src/Stripe.net/Entities/Persons/PersonVerification.cs @@ -49,7 +49,9 @@ public class PersonVerification : StripeEntity /// /// The state of verification for the person. Possible values are unverified, - /// pending, or verified. + /// pending, or verified. Please refer guide to handle + /// verification updates. /// [JsonProperty("status")] #if NET6_0_OR_GREATER From 17b513195198c713c21cc50e9c64207072ccfa8f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 08:20:56 +0000 Subject: [PATCH 16/22] Update generated code for v1689 --- OPENAPI_VERSION | 2 +- .../PaymentIntentAmountDetailsLineItem.cs | 101 ++++++++++++++++++ ...ountDetailsLineItemPaymentMethodOptions.cs | 29 +++++ ...DetailsLineItemPaymentMethodOptionsCard.cs | 17 +++ ...tailsLineItemPaymentMethodOptionsKlarna.cs | 23 ++++ ...tailsLineItemPaymentMethodOptionsPaypal.cs | 42 ++++++++ .../PaymentIntentAmountDetailsLineItemTax.cs | 20 ++++ .../PaymentIntentAmountDetails.cs | 31 ++++++ .../PaymentIntentAmountDetailsShipping.cs | 38 +++++++ .../PaymentIntentAmountDetailsTax.cs | 20 ++++ .../PaymentIntentPaymentDetails.cs | 19 ++++ .../Public/StripeTypeRegistry.cs | 4 + .../Charges/ChargePaymentDetailsOptions.cs | 19 ++++ ...tIntentAmountDetailsLineItemListOptions.cs | 7 ++ ...ymentIntentAmountDetailsLineItemService.cs | 61 +++++++++++ .../PaymentIntentPaymentDetailsOptions.cs | 19 ++++ .../PaymentIntents/PaymentIntentService.cs | 5 + 17 files changed, 456 insertions(+), 1 deletion(-) create mode 100644 src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItem.cs create mode 100644 src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptions.cs create mode 100644 src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsCard.cs create mode 100644 src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsKlarna.cs create mode 100644 src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsPaypal.cs create mode 100644 src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemTax.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsShipping.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsTax.cs create mode 100644 src/Stripe.net/Services/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemListOptions.cs create mode 100644 src/Stripe.net/Services/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemService.cs diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 41a4d5ec21..008d96d1c8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1688 \ No newline at end of file +v1689 \ No newline at end of file diff --git a/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItem.cs b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItem.cs new file mode 100644 index 0000000000..c5317d2a8a --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItem.cs @@ -0,0 +1,101 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentAmountDetailsLineItem : StripeEntity, IHasId, IHasObject + { + /// + /// Unique identifier for the object. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; set; } + + /// + /// String representing the object's type. Objects of the same type share the same value. + /// + [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif + public string Object { get; set; } + + /// + /// The amount an item was discounted for. Positive integer. + /// + [JsonProperty("discount_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount_amount")] +#endif + public long? DiscountAmount { get; set; } + + /// + /// Payment method-specific information for line items. + /// + [JsonProperty("payment_method_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_options")] +#endif + public PaymentIntentAmountDetailsLineItemPaymentMethodOptions PaymentMethodOptions { get; set; } + + /// + /// Unique identifier of the product. At most 12 characters long. + /// + [JsonProperty("product_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_code")] +#endif + public string ProductCode { get; set; } + + /// + /// Name of the product. At most 100 characters long. + /// + [JsonProperty("product_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_name")] +#endif + public string ProductName { get; set; } + + /// + /// Number of items of the product. Positive integer. + /// + [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif + public long Quantity { get; set; } + + /// + /// Contains information about the tax on the item. + /// + [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif + public PaymentIntentAmountDetailsLineItemTax Tax { get; set; } + + /// + /// Cost of the product. Non-negative integer. + /// + [JsonProperty("unit_cost")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_cost")] +#endif + public long UnitCost { get; set; } + + /// + /// A unit of measure for the line item, such as gallons, feet, meters, etc. + /// + [JsonProperty("unit_of_measure")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_of_measure")] +#endif + public string UnitOfMeasure { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptions.cs b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptions.cs new file mode 100644 index 0000000000..0c1ee02958 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentAmountDetailsLineItemPaymentMethodOptions : StripeEntity + { + [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif + public PaymentIntentAmountDetailsLineItemPaymentMethodOptionsCard Card { get; set; } + + [JsonProperty("klarna")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("klarna")] +#endif + public PaymentIntentAmountDetailsLineItemPaymentMethodOptionsKlarna Klarna { get; set; } + + [JsonProperty("paypal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("paypal")] +#endif + public PaymentIntentAmountDetailsLineItemPaymentMethodOptionsPaypal Paypal { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsCard.cs b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsCard.cs new file mode 100644 index 0000000000..fe6b5bff36 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsCard.cs @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentAmountDetailsLineItemPaymentMethodOptionsCard : StripeEntity + { + [JsonProperty("commodity_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("commodity_code")] +#endif + public string CommodityCode { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsKlarna.cs b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsKlarna.cs new file mode 100644 index 0000000000..68bddc7a0a --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsKlarna.cs @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentAmountDetailsLineItemPaymentMethodOptionsKlarna : StripeEntity + { + [JsonProperty("image_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("image_url")] +#endif + public string ImageUrl { get; set; } + + [JsonProperty("product_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("product_url")] +#endif + public string ProductUrl { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsPaypal.cs b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsPaypal.cs new file mode 100644 index 0000000000..ecbc150420 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemPaymentMethodOptionsPaypal.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentAmountDetailsLineItemPaymentMethodOptionsPaypal : StripeEntity + { + /// + /// Type of the line item. + /// One of: digital_goods, donation, or physical_goods. + /// + [JsonProperty("category")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("category")] +#endif + public string Category { get; set; } + + /// + /// Description of the line item. + /// + [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif + public string Description { get; set; } + + /// + /// The Stripe account ID of the connected account that sells the item. This is only needed + /// when using Separate Charges + /// and Transfers. + /// + [JsonProperty("sold_by")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sold_by")] +#endif + public string SoldBy { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemTax.cs b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemTax.cs new file mode 100644 index 0000000000..85e738bb82 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemTax.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentAmountDetailsLineItemTax : StripeEntity + { + /// + /// Total portion of the amount that is for tax. + /// + [JsonProperty("total_tax_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_tax_amount")] +#endif + public long TotalTaxAmount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetails.cs index 1f305f7dcf..bf891c7734 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetails.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetails.cs @@ -8,6 +8,37 @@ namespace Stripe public class PaymentIntentAmountDetails : StripeEntity { + /// + /// The amount an item was discounted for. + /// + [JsonProperty("discount_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("discount_amount")] +#endif + public long DiscountAmount { get; set; } + + /// + /// A list of line items, each containing information about a product in the PaymentIntent. + /// There is a maximum of 100 line items. + /// + [JsonProperty("line_items")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_items")] +#endif + public StripeList LineItems { get; set; } + + [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif + public PaymentIntentAmountDetailsShipping Shipping { get; set; } + + [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif + public PaymentIntentAmountDetailsTax Tax { get; set; } + [JsonProperty("tip")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("tip")] diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsShipping.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsShipping.cs new file mode 100644 index 0000000000..8986103afe --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsShipping.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentAmountDetailsShipping : StripeEntity + { + /// + /// Portion of the amount that is for shipping. + /// + [JsonProperty("amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount")] +#endif + public long? Amount { get; set; } + + /// + /// The postal code that represents the shipping source. + /// + [JsonProperty("from_postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("from_postal_code")] +#endif + public string FromPostalCode { get; set; } + + /// + /// The postal code that represents the shipping destination. + /// + [JsonProperty("to_postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("to_postal_code")] +#endif + public string ToPostalCode { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsTax.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsTax.cs new file mode 100644 index 0000000000..4f3e2af519 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsTax.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentAmountDetailsTax : StripeEntity + { + /// + /// Total portion of the amount that is for tax. + /// + [JsonProperty("total_tax_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_tax_amount")] +#endif + public long? TotalTaxAmount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetails.cs index 41c4c35dff..ba75a3e9dd 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetails.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetails.cs @@ -14,12 +14,31 @@ public class PaymentIntentPaymentDetails : StripeEntity + /// Some customers might be required by their company or organization to provide this + /// information. If so, provide this value. Otherwise you can ignore this field. + /// + [JsonProperty("customer_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_reference")] +#endif + public string CustomerReference { get; set; } + [JsonProperty("event_details")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("event_details")] #endif public PaymentIntentPaymentDetailsEventDetails EventDetails { get; set; } + /// + /// A unique value assigned by the business to identify the transaction. + /// + [JsonProperty("order_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("order_reference")] +#endif + public string OrderReference { get; set; } + [JsonProperty("subscription")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("subscription")] diff --git a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index d06962a3f0..7af1ee2fca 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -132,6 +132,10 @@ public static class StripeTypeRegistry { "order", typeof(Order) }, { "payment_attempt_record", typeof(PaymentAttemptRecord) }, { "payment_intent", typeof(PaymentIntent) }, + { + "payment_intent_amount_details_line_item", typeof( + PaymentIntentAmountDetailsLineItem) + }, { "payment_link", typeof(PaymentLink) }, { "payment_method", typeof(PaymentMethod) }, { "payment_method_configuration", typeof(PaymentMethodConfiguration) }, diff --git a/src/Stripe.net/Services/Charges/ChargePaymentDetailsOptions.cs b/src/Stripe.net/Services/Charges/ChargePaymentDetailsOptions.cs index 2808e556f0..08f52421db 100644 --- a/src/Stripe.net/Services/Charges/ChargePaymentDetailsOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargePaymentDetailsOptions.cs @@ -17,6 +17,16 @@ public class ChargePaymentDetailsOptions : INestedOptions #endif public ChargePaymentDetailsCarRentalOptions CarRental { get; set; } + /// + /// Some customers might be required by their company or organization to provide this + /// information. If so, provide this value. Otherwise you can ignore this field. + /// + [JsonProperty("customer_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_reference")] +#endif + public string CustomerReference { get; set; } + /// /// Event details for this PaymentIntent. /// @@ -44,6 +54,15 @@ public class ChargePaymentDetailsOptions : INestedOptions #endif public ChargePaymentDetailsLodgingOptions Lodging { get; set; } + /// + /// A unique value assigned by the business to identify the transaction. + /// + [JsonProperty("order_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("order_reference")] +#endif + public string OrderReference { get; set; } + /// /// Subscription details for this PaymentIntent. /// diff --git a/src/Stripe.net/Services/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemListOptions.cs b/src/Stripe.net/Services/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemListOptions.cs new file mode 100644 index 0000000000..15c3150754 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemListOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class PaymentIntentAmountDetailsLineItemListOptions : ListOptions + { + } +} diff --git a/src/Stripe.net/Services/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemService.cs b/src/Stripe.net/Services/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemService.cs new file mode 100644 index 0000000000..ae45dc3b16 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntentAmountDetailsLineItems/PaymentIntentAmountDetailsLineItemService.cs @@ -0,0 +1,61 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class PaymentIntentAmountDetailsLineItemService : Service, + INestedListable + { + public PaymentIntentAmountDetailsLineItemService() + { + } + + internal PaymentIntentAmountDetailsLineItemService( + ApiRequestor requestor) + : base(requestor) + { + } + + public PaymentIntentAmountDetailsLineItemService(IStripeClient client) + : base(client) + { + } + + /// + ///

Lists all LineItems of a given PaymentIntent.

. + ///
+ public virtual StripeList List(string parentId, PaymentIntentAmountDetailsLineItemListOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v1/payment_intents/{WebUtility.UrlEncode(parentId)}/amount_details_line_items", options, requestOptions); + } + + /// + ///

Lists all LineItems of a given PaymentIntent.

. + ///
+ public virtual Task> ListAsync(string parentId, PaymentIntentAmountDetailsLineItemListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v1/payment_intents/{WebUtility.UrlEncode(parentId)}/amount_details_line_items", options, requestOptions, cancellationToken); + } + + /// + ///

Lists all LineItems of a given PaymentIntent.

. + ///
+ public virtual IEnumerable ListAutoPaging(string parentId, PaymentIntentAmountDetailsLineItemListOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v1/payment_intents/{WebUtility.UrlEncode(parentId)}/amount_details_line_items", options, requestOptions); + } + + /// + ///

Lists all LineItems of a given PaymentIntent.

. + ///
+ public virtual IAsyncEnumerable ListAutoPagingAsync(string parentId, PaymentIntentAmountDetailsLineItemListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v1/payment_intents/{WebUtility.UrlEncode(parentId)}/amount_details_line_items", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsOptions.cs index 25b0a3069d..cc9b98c22e 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsOptions.cs @@ -17,6 +17,16 @@ public class PaymentIntentPaymentDetailsOptions : INestedOptions #endif public PaymentIntentPaymentDetailsCarRentalOptions CarRental { get; set; } + /// + /// Some customers might be required by their company or organization to provide this + /// information. If so, provide this value. Otherwise you can ignore this field. + /// + [JsonProperty("customer_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer_reference")] +#endif + public string CustomerReference { get; set; } + /// /// Event details for this PaymentIntent. /// @@ -44,6 +54,15 @@ public class PaymentIntentPaymentDetailsOptions : INestedOptions #endif public PaymentIntentPaymentDetailsLodgingOptions Lodging { get; set; } + /// + /// A unique value assigned by the business to identify the transaction. + /// + [JsonProperty("order_reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("order_reference")] +#endif + public string OrderReference { get; set; } + /// /// Subscription details for this PaymentIntent. /// diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs index fb17b07537..6c41af3a39 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs @@ -15,6 +15,8 @@ public class PaymentIntentService : Service, ISearchable, IUpdatable { + private PaymentIntentAmountDetailsLineItemService amountDetailsLineItems; + public PaymentIntentService() { } @@ -29,6 +31,9 @@ public PaymentIntentService(IStripeClient client) { } + public virtual PaymentIntentAmountDetailsLineItemService AmountDetailsLineItems => this.amountDetailsLineItems ??= new PaymentIntentAmountDetailsLineItemService( + this.Requestor); + /// ///

Manually reconcile the remaining amount for a customer_balance /// PaymentIntent.

. From 86586c79ae0885d7addb7ff1d0e90da773419a14 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 15:49:27 +0000 Subject: [PATCH 17/22] Update generated code for v1691 --- OPENAPI_VERSION | 2 +- .../RegistrationCountryOptions.cs | 48 +++++++++++++ .../RegistrationCountryOptionsAw.cs | 20 ++++++ .../RegistrationCountryOptionsAz.cs | 20 ++++++ .../RegistrationCountryOptionsBd.cs | 20 ++++++ .../RegistrationCountryOptionsBj.cs | 20 ++++++ .../RegistrationCountryOptionsEt.cs | 20 ++++++ .../RegistrationCountryOptionsKg.cs | 20 ++++++ .../RegistrationCountryOptionsLa.cs | 20 ++++++ .../RegistrationCountryOptionsPh.cs | 20 ++++++ .../RegistrationCountryOptionsAwOptions.cs | 20 ++++++ .../RegistrationCountryOptionsAzOptions.cs | 20 ++++++ .../RegistrationCountryOptionsBdOptions.cs | 20 ++++++ .../RegistrationCountryOptionsBjOptions.cs | 20 ++++++ .../RegistrationCountryOptionsEtOptions.cs | 20 ++++++ .../RegistrationCountryOptionsKgOptions.cs | 20 ++++++ .../RegistrationCountryOptionsLaOptions.cs | 20 ++++++ .../RegistrationCountryOptionsOptions.cs | 72 +++++++++++++++++++ .../RegistrationCountryOptionsPhOptions.cs | 20 ++++++ 19 files changed, 441 insertions(+), 1 deletion(-) create mode 100644 src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAw.cs create mode 100644 src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAz.cs create mode 100644 src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBd.cs create mode 100644 src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBj.cs create mode 100644 src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEt.cs create mode 100644 src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKg.cs create mode 100644 src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLa.cs create mode 100644 src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPh.cs create mode 100644 src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAwOptions.cs create mode 100644 src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAzOptions.cs create mode 100644 src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBdOptions.cs create mode 100644 src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBjOptions.cs create mode 100644 src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEtOptions.cs create mode 100644 src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKgOptions.cs create mode 100644 src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLaOptions.cs create mode 100644 src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPhOptions.cs diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 008d96d1c8..40d98d5465 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1689 \ No newline at end of file +v1691 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptions.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptions.cs index 0ee73fcbd8..5f7f41ac71 100644 --- a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptions.cs +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptions.cs @@ -44,6 +44,18 @@ public class RegistrationCountryOptions : StripeEntity + { + /// + /// Type of registration in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAz.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAz.cs new file mode 100644 index 0000000000..1e044350a2 --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsAz.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsAz : StripeEntity + { + /// + /// Type of registration in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBd.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBd.cs new file mode 100644 index 0000000000..8b479f223d --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBd.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsBd : StripeEntity + { + /// + /// Type of registration in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBj.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBj.cs new file mode 100644 index 0000000000..1b045edb49 --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsBj.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsBj : StripeEntity + { + /// + /// Type of registration in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEt.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEt.cs new file mode 100644 index 0000000000..280cf62eaa --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsEt.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsEt : StripeEntity + { + /// + /// Type of registration in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKg.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKg.cs new file mode 100644 index 0000000000..bf56b85607 --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsKg.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsKg : StripeEntity + { + /// + /// Type of registration in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLa.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLa.cs new file mode 100644 index 0000000000..97e07442a3 --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsLa.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsLa : StripeEntity + { + /// + /// Type of registration in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPh.cs b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPh.cs new file mode 100644 index 0000000000..2ac687059d --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Registrations/RegistrationCountryOptionsPh.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsPh : StripeEntity + { + /// + /// Type of registration in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAwOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAwOptions.cs new file mode 100644 index 0000000000..6532c161d3 --- /dev/null +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAwOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsAwOptions : INestedOptions + { + /// + /// Type of registration to be created in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAzOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAzOptions.cs new file mode 100644 index 0000000000..cb10012c0a --- /dev/null +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsAzOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsAzOptions : INestedOptions + { + /// + /// Type of registration to be created in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBdOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBdOptions.cs new file mode 100644 index 0000000000..8155c3bdef --- /dev/null +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBdOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsBdOptions : INestedOptions + { + /// + /// Type of registration to be created in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBjOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBjOptions.cs new file mode 100644 index 0000000000..bb1efa879a --- /dev/null +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsBjOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsBjOptions : INestedOptions + { + /// + /// Type of registration to be created in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEtOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEtOptions.cs new file mode 100644 index 0000000000..4897a85a7c --- /dev/null +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsEtOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsEtOptions : INestedOptions + { + /// + /// Type of registration to be created in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKgOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKgOptions.cs new file mode 100644 index 0000000000..6a3cc35ad7 --- /dev/null +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsKgOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsKgOptions : INestedOptions + { + /// + /// Type of registration to be created in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLaOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLaOptions.cs new file mode 100644 index 0000000000..dca62d9a2c --- /dev/null +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsLaOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsLaOptions : INestedOptions + { + /// + /// Type of registration to be created in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsOptions.cs index efe32e85a1..9464cec0dd 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsOptions.cs @@ -62,6 +62,24 @@ public class RegistrationCountryOptionsOptions : INestedOptions #endif public RegistrationCountryOptionsAuOptions Au { get; set; } + /// + /// Options for the registration in AW. + /// + [JsonProperty("aw")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("aw")] +#endif + public RegistrationCountryOptionsAwOptions Aw { get; set; } + + /// + /// Options for the registration in AZ. + /// + [JsonProperty("az")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("az")] +#endif + public RegistrationCountryOptionsAzOptions Az { get; set; } + /// /// Options for the registration in BA. /// @@ -80,6 +98,15 @@ public class RegistrationCountryOptionsOptions : INestedOptions #endif public RegistrationCountryOptionsBbOptions Bb { get; set; } + /// + /// Options for the registration in BD. + /// + [JsonProperty("bd")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bd")] +#endif + public RegistrationCountryOptionsBdOptions Bd { get; set; } + /// /// Options for the registration in BE. /// @@ -107,6 +134,15 @@ public class RegistrationCountryOptionsOptions : INestedOptions #endif public RegistrationCountryOptionsBhOptions Bh { get; set; } + /// + /// Options for the registration in BJ. + /// + [JsonProperty("bj")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bj")] +#endif + public RegistrationCountryOptionsBjOptions Bj { get; set; } + /// /// Options for the registration in BS. /// @@ -251,6 +287,15 @@ public class RegistrationCountryOptionsOptions : INestedOptions #endif public RegistrationCountryOptionsEsOptions Es { get; set; } + /// + /// Options for the registration in ET. + /// + [JsonProperty("et")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("et")] +#endif + public RegistrationCountryOptionsEtOptions Et { get; set; } + /// /// Options for the registration in FI. /// @@ -386,6 +431,15 @@ public class RegistrationCountryOptionsOptions : INestedOptions #endif public RegistrationCountryOptionsKeOptions Ke { get; set; } + /// + /// Options for the registration in KG. + /// + [JsonProperty("kg")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("kg")] +#endif + public RegistrationCountryOptionsKgOptions Kg { get; set; } + /// /// Options for the registration in KH. /// @@ -413,6 +467,15 @@ public class RegistrationCountryOptionsOptions : INestedOptions #endif public RegistrationCountryOptionsKzOptions Kz { get; set; } + /// + /// Options for the registration in LA. + /// + [JsonProperty("la")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("la")] +#endif + public RegistrationCountryOptionsLaOptions La { get; set; } + /// /// Options for the registration in LT. /// @@ -575,6 +638,15 @@ public class RegistrationCountryOptionsOptions : INestedOptions #endif public RegistrationCountryOptionsPeOptions Pe { get; set; } + /// + /// Options for the registration in PH. + /// + [JsonProperty("ph")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ph")] +#endif + public RegistrationCountryOptionsPhOptions Ph { get; set; } + /// /// Options for the registration in PL. /// diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPhOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPhOptions.cs new file mode 100644 index 0000000000..24b427ca40 --- /dev/null +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsPhOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RegistrationCountryOptionsPhOptions : INestedOptions + { + /// + /// Type of registration to be created in country. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} From 225b0a964e92d5779b51bb4f2d102f8e60bce14d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 16:02:18 +0000 Subject: [PATCH 18/22] Update generated code for v1692 --- OPENAPI_VERSION | 2 +- src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs | 3 ++- .../ConfirmationTokenPaymentMethodPreviewBillingDetails.cs | 3 ++- .../Entities/PaymentMethods/PaymentMethodBillingDetails.cs | 3 ++- .../PaymentIntentPaymentMethodDataBillingDetailsOptions.cs | 3 ++- .../PaymentMethods/PaymentMethodBillingDetailsOptions.cs | 3 ++- .../SetupIntentPaymentMethodDataBillingDetailsOptions.cs | 3 ++- .../ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs | 3 ++- ...PaymentDestinationPaymentMethodDataBillingDetailsOptions.cs | 3 ++- 9 files changed, 17 insertions(+), 9 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 40d98d5465..a5c6129340 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1691 \ No newline at end of file +v1692 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs b/src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs index f9615e25fe..01b4154812 100644 --- a/src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs +++ b/src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs @@ -45,7 +45,8 @@ public class ChargeBillingDetails : StripeEntity public string Phone { get; set; } /// - /// Taxpayer identification number. + /// Taxpayer identification number. Used only for transactions between LATAM buyers and + /// non-LATAM sellers. /// [JsonProperty("tax_id")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillingDetails.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillingDetails.cs index 3df1ef0a6b..c76efdaee4 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillingDetails.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBillingDetails.cs @@ -45,7 +45,8 @@ public class ConfirmationTokenPaymentMethodPreviewBillingDetails : StripeEntity< public string Phone { get; set; } /// - /// Taxpayer identification number. + /// Taxpayer identification number. Used only for transactions between LATAM buyers and + /// non-LATAM sellers. /// [JsonProperty("tax_id")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillingDetails.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillingDetails.cs index 879759ba22..f648ccddb1 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillingDetails.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBillingDetails.cs @@ -45,7 +45,8 @@ public class PaymentMethodBillingDetails : StripeEntity - /// Taxpayer identification number. + /// Taxpayer identification number. Used only for transactions between LATAM buyers and + /// non-LATAM sellers. ///
[JsonProperty("tax_id")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs index 595164819a..f90dbf1f3a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBillingDetailsOptions.cs @@ -45,7 +45,8 @@ public class PaymentIntentPaymentMethodDataBillingDetailsOptions : INestedOption public string Phone { get; set; } /// - /// Taxpayer identification number. + /// Taxpayer identification number. Used only for transactions between LATAM buyers and + /// non-LATAM sellers. /// [JsonProperty("tax_id")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs index c9813fcae0..c82571d3b1 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBillingDetailsOptions.cs @@ -45,7 +45,8 @@ public class PaymentMethodBillingDetailsOptions : INestedOptions public string Phone { get; set; } /// - /// Taxpayer identification number. + /// Taxpayer identification number. Used only for transactions between LATAM buyers and + /// non-LATAM sellers. /// [JsonProperty("tax_id")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs index 574bd05685..f07347c806 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBillingDetailsOptions.cs @@ -45,7 +45,8 @@ public class SetupIntentPaymentMethodDataBillingDetailsOptions : INestedOptions public string Phone { get; set; } /// - /// Taxpayer identification number. + /// Taxpayer identification number. Used only for transactions between LATAM buyers and + /// non-LATAM sellers. /// [JsonProperty("tax_id")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs index 083299f66d..43befae183 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBillingDetailsOptions.cs @@ -45,7 +45,8 @@ public class ConfirmationTokenPaymentMethodDataBillingDetailsOptions : INestedOp public string Phone { get; set; } /// - /// Taxpayer identification number. + /// Taxpayer identification number. Used only for transactions between LATAM buyers and + /// non-LATAM sellers. /// [JsonProperty("tax_id")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs index b2166d01f6..cbf9982318 100644 --- a/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs +++ b/src/Stripe.net/Services/Treasury/OutboundPayments/OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions.cs @@ -45,7 +45,8 @@ public class OutboundPaymentDestinationPaymentMethodDataBillingDetailsOptions : public string Phone { get; set; } /// - /// Taxpayer identification number. + /// Taxpayer identification number. Used only for transactions between LATAM buyers and + /// non-LATAM sellers. /// [JsonProperty("tax_id")] #if NET6_0_OR_GREATER From cf4f8c480b6d636cf99d27e420ccab42a80501b7 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 18:57:38 +0000 Subject: [PATCH 19/22] Update generated code for v1694 --- OPENAPI_VERSION | 2 +- src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs | 2 +- .../QuotePreviewInvoices/QuotePreviewInvoicePaymentSettings.cs | 2 +- .../Entities/Subscriptions/SubscriptionPaymentSettings.cs | 2 +- .../Services/Invoices/InvoicePaymentSettingsOptions.cs | 2 +- .../Subscriptions/SubscriptionPaymentSettingsOptions.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a5c6129340..438192b43c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1692 \ No newline at end of file +v1694 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs index f0745b98e7..6df23e574b 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs @@ -36,7 +36,7 @@ public class InvoicePaymentSettings : StripeEntity /// customer’s default payment method, and your invoice template /// settings. - /// One of: ach_credit_transfer, ach_debit, acss_debit, + /// One of: ach_credit_transfer, ach_debit, acss_debit, affirm, /// amazon_pay, au_becs_debit, bacs_debit, bancontact, /// boleto, card, cashapp, custom, customer_balance, /// eps, fpx, giropay, grabpay, id_bank_transfer, diff --git a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoicePaymentSettings.cs b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoicePaymentSettings.cs index 1e84a8b8ed..15e6f68653 100644 --- a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoicePaymentSettings.cs +++ b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoicePaymentSettings.cs @@ -36,7 +36,7 @@ public class QuotePreviewInvoicePaymentSettings : StripeEntityinvoice template /// settings. - /// One of: ach_credit_transfer, ach_debit, acss_debit, + /// One of: ach_credit_transfer, ach_debit, acss_debit, affirm, /// amazon_pay, au_becs_debit, bacs_debit, bancontact, /// boleto, card, cashapp, custom, customer_balance, /// eps, fpx, giropay, grabpay, id_bank_transfer, diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs index 83a11f5d91..96ad6eddc6 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs @@ -26,7 +26,7 @@ public class SubscriptionPaymentSettings : StripeEntityinvoice template /// settings. - /// One of: ach_credit_transfer, ach_debit, acss_debit, + /// One of: ach_credit_transfer, ach_debit, acss_debit, affirm, /// amazon_pay, au_becs_debit, bacs_debit, bancontact, /// boleto, card, cashapp, custom, customer_balance, /// eps, fpx, giropay, grabpay, id_bank_transfer, diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs index 0de4cac5e0..2870611687 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs @@ -36,7 +36,7 @@ public class InvoicePaymentSettingsOptions : INestedOptions /// customer’s default payment method, and your invoice template /// settings. Should not be specified with payment_method_configuration. - /// One of: ach_credit_transfer, ach_debit, acss_debit, + /// One of: ach_credit_transfer, ach_debit, acss_debit, affirm, /// amazon_pay, au_becs_debit, bacs_debit, bancontact, /// boleto, card, cashapp, custom, customer_balance, /// eps, fpx, giropay, grabpay, id_bank_transfer, diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs index 391ac19bff..8500fee219 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs @@ -26,7 +26,7 @@ public class SubscriptionPaymentSettingsOptions : INestedOptions /// customer’s default payment method, and your invoice template /// settings. Should not be specified with payment_method_configuration. - /// One of: ach_credit_transfer, ach_debit, acss_debit, + /// One of: ach_credit_transfer, ach_debit, acss_debit, affirm, /// amazon_pay, au_becs_debit, bacs_debit, bancontact, /// boleto, card, cashapp, custom, customer_balance, /// eps, fpx, giropay, grabpay, id_bank_transfer, From 4749ee2488e4671f4f8fd92087b7abe8d0284e4f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 20:15:27 +0000 Subject: [PATCH 20/22] Update generated code for v1695 --- OPENAPI_VERSION | 2 +- .../InvoicePaymentGetOptions.cs | 7 -- .../InvoicePaymentListOptions.cs | 7 -- .../InvoicePayments/InvoicePaymentService.cs | 85 ------------------- .../InvoiceAttachPaymentIntentOptions.cs | 30 ------- .../Services/Invoices/InvoiceService.cs | 38 --------- 6 files changed, 1 insertion(+), 168 deletions(-) delete mode 100644 src/Stripe.net/Services/InvoicePayments/InvoicePaymentGetOptions.cs delete mode 100644 src/Stripe.net/Services/InvoicePayments/InvoicePaymentListOptions.cs delete mode 100644 src/Stripe.net/Services/InvoicePayments/InvoicePaymentService.cs delete mode 100644 src/Stripe.net/Services/Invoices/InvoiceAttachPaymentIntentOptions.cs diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 438192b43c..bb77cc20e7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1694 \ No newline at end of file +v1695 \ No newline at end of file diff --git a/src/Stripe.net/Services/InvoicePayments/InvoicePaymentGetOptions.cs b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentGetOptions.cs deleted file mode 100644 index 8bde6e0a55..0000000000 --- a/src/Stripe.net/Services/InvoicePayments/InvoicePaymentGetOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - public class InvoicePaymentGetOptions : BaseOptions - { - } -} diff --git a/src/Stripe.net/Services/InvoicePayments/InvoicePaymentListOptions.cs b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentListOptions.cs deleted file mode 100644 index 4188369bbe..0000000000 --- a/src/Stripe.net/Services/InvoicePayments/InvoicePaymentListOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - public class InvoicePaymentListOptions : ListOptions - { - } -} diff --git a/src/Stripe.net/Services/InvoicePayments/InvoicePaymentService.cs b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentService.cs deleted file mode 100644 index f74611d50c..0000000000 --- a/src/Stripe.net/Services/InvoicePayments/InvoicePaymentService.cs +++ /dev/null @@ -1,85 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System; - using System.Collections.Generic; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - public class InvoicePaymentService : Service, - INestedListable, - INestedRetrievable - { - public InvoicePaymentService() - { - } - - internal InvoicePaymentService(ApiRequestor requestor) - : base(requestor) - { - } - - public InvoicePaymentService(IStripeClient client) - : base(client) - { - } - - /// - ///

Retrieves the invoice payment with the given ID.

. - ///
- public virtual InvoicePayment Get(string parentId, string id, InvoicePaymentGetOptions options = null, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/{WebUtility.UrlEncode(parentId)}/payments/{WebUtility.UrlEncode(id)}", options, requestOptions); - } - - /// - ///

Retrieves the invoice payment with the given ID.

. - ///
- public virtual Task GetAsync(string parentId, string id, InvoicePaymentGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/{WebUtility.UrlEncode(parentId)}/payments/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); - } - - /// - ///

When retrieving an invoice, there is an includable payments property containing the - /// first handful of those items. There is also a URL where you can retrieve the full - /// (paginated) list of payments.

. - ///
- public virtual StripeList List(string parentId, InvoicePaymentListOptions options = null, RequestOptions requestOptions = null) - { - return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/{WebUtility.UrlEncode(parentId)}/payments", options, requestOptions); - } - - /// - ///

When retrieving an invoice, there is an includable payments property containing the - /// first handful of those items. There is also a URL where you can retrieve the full - /// (paginated) list of payments.

. - ///
- public virtual Task> ListAsync(string parentId, InvoicePaymentListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/{WebUtility.UrlEncode(parentId)}/payments", options, requestOptions, cancellationToken); - } - - /// - ///

When retrieving an invoice, there is an includable payments property containing the - /// first handful of those items. There is also a URL where you can retrieve the full - /// (paginated) list of payments.

. - ///
- public virtual IEnumerable ListAutoPaging(string parentId, InvoicePaymentListOptions options = null, RequestOptions requestOptions = null) - { - return this.ListRequestAutoPaging($"/v1/invoices/{WebUtility.UrlEncode(parentId)}/payments", options, requestOptions); - } - - /// - ///

When retrieving an invoice, there is an includable payments property containing the - /// first handful of those items. There is also a URL where you can retrieve the full - /// (paginated) list of payments.

. - ///
- public virtual IAsyncEnumerable ListAutoPagingAsync(string parentId, InvoicePaymentListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.ListRequestAutoPagingAsync($"/v1/invoices/{WebUtility.UrlEncode(parentId)}/payments", options, requestOptions, cancellationToken); - } - } -} diff --git a/src/Stripe.net/Services/Invoices/InvoiceAttachPaymentIntentOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceAttachPaymentIntentOptions.cs deleted file mode 100644 index 6df6ab848e..0000000000 --- a/src/Stripe.net/Services/Invoices/InvoiceAttachPaymentIntentOptions.cs +++ /dev/null @@ -1,30 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class InvoiceAttachPaymentIntentOptions : BaseOptions - { - /// - /// The portion of the PaymentIntent’s amount that should be applied to thisinvoice. - /// Defaults to the entire amount. - /// - [JsonProperty("amount_requested")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("amount_requested")] -#endif - public long? AmountRequested { get; set; } - - /// - /// The ID of the PaymentIntent to attach to the invoice. - /// - [JsonProperty("payment_intent")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("payment_intent")] -#endif - public string PaymentIntent { get; set; } - } -} diff --git a/src/Stripe.net/Services/Invoices/InvoiceService.cs b/src/Stripe.net/Services/Invoices/InvoiceService.cs index abacf6e262..7ea50681c0 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceService.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceService.cs @@ -16,7 +16,6 @@ public partial class InvoiceService : Service, ISearchable, IUpdatable { - private InvoicePaymentService payments; private InvoiceLineItemService lineItems; public InvoiceService() @@ -33,9 +32,6 @@ public InvoiceService(IStripeClient client) { } - public virtual InvoicePaymentService Payments => this.payments ??= new InvoicePaymentService( - this.Requestor); - public virtual InvoiceLineItemService LineItems => this.lineItems ??= new InvoiceLineItemService( this.Requestor); @@ -103,40 +99,6 @@ public virtual Task AttachPaymentAsync(string id, InvoiceAttachPaymentO return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/invoices/{WebUtility.UrlEncode(id)}/attach_payment", options, requestOptions, cancellationToken); } - /// - ///

Attaches a PaymentIntent to the invoice, adding it to the list of payments. - /// When the PaymentIntent’s status changes to succeeded, the payment is credited to - /// the invoice, increasing its amount_paid. When the invoice is fully paid, the - /// invoice’s status becomes paid.

. - /// - ///

If the PaymentIntent’s status is already succeeded when it is attached, it is - /// credited to the invoice immediately.

. - /// - ///

Related guide: Create an - /// invoice payment

. - ///
- public virtual Invoice AttachPaymentIntent(string id, InvoiceAttachPaymentIntentOptions options = null, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/invoices/{WebUtility.UrlEncode(id)}/attach_payment_intent", options, requestOptions); - } - - /// - ///

Attaches a PaymentIntent to the invoice, adding it to the list of payments. - /// When the PaymentIntent’s status changes to succeeded, the payment is credited to - /// the invoice, increasing its amount_paid. When the invoice is fully paid, the - /// invoice’s status becomes paid.

. - /// - ///

If the PaymentIntent’s status is already succeeded when it is attached, it is - /// credited to the invoice immediately.

. - /// - ///

Related guide: Create an - /// invoice payment

. - ///
- public virtual Task AttachPaymentIntentAsync(string id, InvoiceAttachPaymentIntentOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/invoices/{WebUtility.UrlEncode(id)}/attach_payment_intent", options, requestOptions, cancellationToken); - } - /// ///

This endpoint creates a draft invoice for a given customer. The invoice remains a /// draft until you finalize the From 8d3b26494d36ed2c7a19cbaa263b05f861553254 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 20:29:11 +0000 Subject: [PATCH 21/22] Update generated code for v1696 --- OPENAPI_VERSION | 2 +- .../Entities/Accounts/AccountCompany.cs | 6 +++ .../AccountCompanyRegistrationDate.cs | 38 +++++++++++++++++++ .../Accounts/AccountCompanyOptions.cs | 6 +++ .../AccountCompanyRegistrationDateOptions.cs | 38 +++++++++++++++++++ .../Tokens/TokenAccountCompanyOptions.cs | 6 +++ ...enAccountCompanyRegistrationDateOptions.cs | 38 +++++++++++++++++++ 7 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 src/Stripe.net/Entities/Accounts/AccountCompanyRegistrationDate.cs create mode 100644 src/Stripe.net/Services/Accounts/AccountCompanyRegistrationDateOptions.cs create mode 100644 src/Stripe.net/Services/Tokens/TokenAccountCompanyRegistrationDateOptions.cs diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bb77cc20e7..1e710b90f8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1695 \ No newline at end of file +v1696 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Accounts/AccountCompany.cs b/src/Stripe.net/Entities/Accounts/AccountCompany.cs index cab28dea10..a8933b7d82 100644 --- a/src/Stripe.net/Entities/Accounts/AccountCompany.cs +++ b/src/Stripe.net/Entities/Accounts/AccountCompany.cs @@ -171,6 +171,12 @@ public class AccountCompany : StripeEntity #endif public string Phone { get; set; } + [JsonProperty("registration_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registration_date")] +#endif + public AccountCompanyRegistrationDate RegistrationDate { get; set; } + ///

/// The category identifying the legal structure of the company or legal entity. Also /// available for accounts where + { + /// + /// The day of registration, between 1 and 31. + /// + [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif + public long? Day { get; set; } + + /// + /// The month of registration, between 1 and 12. + /// + [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif + public long? Month { get; set; } + + /// + /// The four-digit year of registration. + /// + [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif + public long? Year { get; set; } + } +} diff --git a/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs b/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs index 130cbeb71a..1362a71745 100644 --- a/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCompanyOptions.cs @@ -163,6 +163,12 @@ public class AccountCompanyOptions : INestedOptions #endif public string Phone { get; set; } + [JsonProperty("registration_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registration_date")] +#endif + public AccountCompanyRegistrationDateOptions RegistrationDate { get; set; } + /// /// The identification number given to a company when it is registered or incorporated, if /// distinct from the identification number used for filing taxes. (Examples are the CIN for diff --git a/src/Stripe.net/Services/Accounts/AccountCompanyRegistrationDateOptions.cs b/src/Stripe.net/Services/Accounts/AccountCompanyRegistrationDateOptions.cs new file mode 100644 index 0000000000..c640410833 --- /dev/null +++ b/src/Stripe.net/Services/Accounts/AccountCompanyRegistrationDateOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCompanyRegistrationDateOptions : INestedOptions + { + /// + /// The day of registration, between 1 and 31. + /// + [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif + public long? Day { get; set; } + + /// + /// The month of registration, between 1 and 12. + /// + [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif + public long? Month { get; set; } + + /// + /// The four-digit year of registration. + /// + [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif + public long? Year { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs index 73a87fd50b..5f2609ac15 100644 --- a/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenAccountCompanyOptions.cs @@ -173,6 +173,12 @@ public class TokenAccountCompanyOptions : INestedOptions #endif public string Phone { get; set; } + [JsonProperty("registration_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("registration_date")] +#endif + public TokenAccountCompanyRegistrationDateOptions RegistrationDate { get; set; } + /// /// The identification number given to a company when it is registered or incorporated, if /// distinct from the identification number used for filing taxes. (Examples are the CIN for diff --git a/src/Stripe.net/Services/Tokens/TokenAccountCompanyRegistrationDateOptions.cs b/src/Stripe.net/Services/Tokens/TokenAccountCompanyRegistrationDateOptions.cs new file mode 100644 index 0000000000..ebc942d2f7 --- /dev/null +++ b/src/Stripe.net/Services/Tokens/TokenAccountCompanyRegistrationDateOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class TokenAccountCompanyRegistrationDateOptions : INestedOptions + { + /// + /// The day of registration, between 1 and 31. + /// + [JsonProperty("day")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("day")] +#endif + public long? Day { get; set; } + + /// + /// The month of registration, between 1 and 12. + /// + [JsonProperty("month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("month")] +#endif + public long? Month { get; set; } + + /// + /// The four-digit year of registration. + /// + [JsonProperty("year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("year")] +#endif + public long? Year { get; set; } + } +} From f7bf7b8490236c8a88d0212c1b58a5d1f6843a17 Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Thu, 17 Apr 2025 13:50:01 -0700 Subject: [PATCH 22/22] changed ContentEncoder to emit lowercase true/false for boolean params (#3104) updated tests --- .../Infrastructure/FormEncoding/ContentEncoder.cs | 6 ++++++ .../Infrastructure/FormEncoding/ContentEncoderTest.cs | 4 ++-- .../PaymentIntents/PaymentIntentConfirmOptionsTest.cs | 2 +- .../PaymentIntents/PaymentIntentCreateOptionsTest.cs | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Stripe.net/Infrastructure/FormEncoding/ContentEncoder.cs b/src/Stripe.net/Infrastructure/FormEncoding/ContentEncoder.cs index 3bc7d8aa22..aeb2453cc8 100644 --- a/src/Stripe.net/Infrastructure/FormEncoding/ContentEncoder.cs +++ b/src/Stripe.net/Infrastructure/FormEncoding/ContentEncoder.cs @@ -163,6 +163,12 @@ private static List> FlattenParamsValue(object valu flatParams = SingleParam(keyPrefix, JsonUtils.SerializeObject(e).Trim('"')); break; + case bool b: + flatParams = SingleParam( + keyPrefix, + b ? "true" : "false"); + break; + default: flatParams = SingleParam( keyPrefix, diff --git a/src/StripeTests/Infrastructure/FormEncoding/ContentEncoderTest.cs b/src/StripeTests/Infrastructure/FormEncoding/ContentEncoderTest.cs index 09602f3268..2953e0eba0 100644 --- a/src/StripeTests/Infrastructure/FormEncoding/ContentEncoderTest.cs +++ b/src/StripeTests/Infrastructure/FormEncoding/ContentEncoderTest.cs @@ -205,7 +205,7 @@ public void CreateQueryString() { Bool = false, }, - Want = "bool=False", + Want = "bool=false", }, new QueryStringTestCase { @@ -213,7 +213,7 @@ public void CreateQueryString() { Bool = true, }, - Want = "bool=True", + Want = "bool=true", }, // DateRangeOptions diff --git a/src/StripeTests/Services/PaymentIntents/PaymentIntentConfirmOptionsTest.cs b/src/StripeTests/Services/PaymentIntents/PaymentIntentConfirmOptionsTest.cs index 9e9b6f01c8..2a049aefcb 100644 --- a/src/StripeTests/Services/PaymentIntents/PaymentIntentConfirmOptionsTest.cs +++ b/src/StripeTests/Services/PaymentIntents/PaymentIntentConfirmOptionsTest.cs @@ -14,7 +14,7 @@ public void SerializeObjectProperly() OffSession = true, }; - Assert.Equal("off_session=True", ContentEncoder.CreateQueryString(options_bool)); + Assert.Equal("off_session=true", ContentEncoder.CreateQueryString(options_bool)); } } } diff --git a/src/StripeTests/Services/PaymentIntents/PaymentIntentCreateOptionsTest.cs b/src/StripeTests/Services/PaymentIntents/PaymentIntentCreateOptionsTest.cs index 011ca022a0..ea099904b7 100644 --- a/src/StripeTests/Services/PaymentIntents/PaymentIntentCreateOptionsTest.cs +++ b/src/StripeTests/Services/PaymentIntents/PaymentIntentCreateOptionsTest.cs @@ -14,7 +14,7 @@ public void SerializeObjectProperly() OffSession = true, }; - Assert.Equal("off_session=True", ContentEncoder.CreateQueryString(options_bool)); + Assert.Equal("off_session=true", ContentEncoder.CreateQueryString(options_bool)); } } }