diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/Account.cs b/src/Stripe.net/Entities/V2/Core/Accounts/Account.cs index 5d7f12e737..4aee7f12fd 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/Account.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/Account.cs @@ -37,7 +37,7 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject /// /// Filter only accounts that have all of the configurations specified. If omitted, returns /// all accounts regardless of which configurations they have. - /// One of: customer, merchant, or recipient. + /// One of: customer, merchant, recipient, or storer. /// [JsonProperty("applied_configurations")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfiguration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfiguration.cs index d09ddf5370..d8d3727b43 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfiguration.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfiguration.cs @@ -36,5 +36,15 @@ public class AccountConfiguration : StripeEntity [STJS.JsonPropertyName("recipient")] #endif public AccountConfigurationRecipient Recipient { get; set; } + + /// + /// The Storer Configuration allows the Account to store and move funds using stored-value + /// FinancialAccounts. + /// + [JsonProperty("storer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("storer")] +#endif + public AccountConfigurationStorer Storer { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorer.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorer.cs new file mode 100644 index 0000000000..242fb6d461 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorer.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorer : StripeEntity + { + /// + /// Capabilities that have been requested on the Storer Configuration. + /// + [JsonProperty("capabilities")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capabilities")] +#endif + public AccountConfigurationStorerCapabilities Capabilities { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilities.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilities.cs new file mode 100644 index 0000000000..3010a12385 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilities.cs @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilities : StripeEntity + { + /// + /// Can provision a financial address to credit/debit a FinancialAccount. + /// + [JsonProperty("financial_addresses")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_addresses")] +#endif + public AccountConfigurationStorerCapabilitiesFinancialAddresses FinancialAddresses { get; set; } + + /// + /// Can hold storage-type funds on Stripe. + /// + [JsonProperty("holds_currencies")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("holds_currencies")] +#endif + public AccountConfigurationStorerCapabilitiesHoldsCurrencies HoldsCurrencies { get; set; } + + /// + /// Can pull funds from an external source, owned by yourself, to a FinancialAccount. + /// + [JsonProperty("inbound_transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_transfers")] +#endif + public AccountConfigurationStorerCapabilitiesInboundTransfers InboundTransfers { get; set; } + + /// + /// Can send funds from a FinancialAccount to a destination owned by someone else. + /// + [JsonProperty("outbound_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_payments")] +#endif + public AccountConfigurationStorerCapabilitiesOutboundPayments OutboundPayments { get; set; } + + /// + /// Can send funds from a FinancialAccount to a destination owned by yourself. + /// + [JsonProperty("outbound_transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_transfers")] +#endif + public AccountConfigurationStorerCapabilitiesOutboundTransfers OutboundTransfers { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddresses.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddresses.cs new file mode 100644 index 0000000000..aafd3165ee --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddresses.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesFinancialAddresses : StripeEntity + { + /// + /// Can provision a bank-account like financial address (VBAN) to credit/debit a + /// FinancialAccount. + /// + [JsonProperty("bank_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_accounts")] +#endif + public AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccounts BankAccounts { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccounts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccounts.cs new file mode 100644 index 0000000000..60cda59d3c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccounts.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccounts : StripeEntity + { + /// + /// Whether the Capability has been requested. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool Requested { get; set; } + + /// + /// The status of the Capability. + /// One of: active, pending, restricted, or unsupported. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + /// + /// Additional details regarding the status of the Capability. status_details will be + /// empty if the Capability's status is active. + /// + [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif + public List StatusDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsStatusDetail.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsStatusDetail.cs new file mode 100644 index 0000000000..b89043bce9 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsStatusDetail.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsStatusDetail : StripeEntity + { + /// + /// Machine-readable code explaining the reason for the Capability to be in its current + /// status. + /// One of: determining_status, requirements_past_due, + /// requirements_pending_verification, restricted_other, + /// unsupported_business, unsupported_country, or + /// unsupported_entity_type. + /// + [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif + public string Code { get; set; } + + /// + /// Machine-readable code explaining how to make the Capability active. + /// One of: contact_stripe, no_resolution, or provide_info. + /// + [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif + public string Resolution { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrencies.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrencies.cs new file mode 100644 index 0000000000..73c82b8f10 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrencies.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesHoldsCurrencies : StripeEntity + { + /// + /// Can hold storage-type funds on Stripe in GBP. + /// + [JsonProperty("gbp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gbp")] +#endif + public AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbp Gbp { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbp.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbp.cs new file mode 100644 index 0000000000..92ebcb5769 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbp.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbp : StripeEntity + { + /// + /// Whether the Capability has been requested. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool Requested { get; set; } + + /// + /// The status of the Capability. + /// One of: active, pending, restricted, or unsupported. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + /// + /// Additional details regarding the status of the Capability. status_details will be + /// empty if the Capability's status is active. + /// + [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif + public List StatusDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpStatusDetail.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpStatusDetail.cs new file mode 100644 index 0000000000..dfb3397910 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpStatusDetail.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpStatusDetail : StripeEntity + { + /// + /// Machine-readable code explaining the reason for the Capability to be in its current + /// status. + /// One of: determining_status, requirements_past_due, + /// requirements_pending_verification, restricted_other, + /// unsupported_business, unsupported_country, or + /// unsupported_entity_type. + /// + [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif + public string Code { get; set; } + + /// + /// Machine-readable code explaining how to make the Capability active. + /// One of: contact_stripe, no_resolution, or provide_info. + /// + [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif + public string Resolution { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfers.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfers.cs new file mode 100644 index 0000000000..e2fabd738c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfers.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesInboundTransfers : StripeEntity + { + /// + /// Can pull funds from an external bank account, owned by yourself, to a FinancialAccount. + /// + [JsonProperty("bank_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_accounts")] +#endif + public AccountConfigurationStorerCapabilitiesInboundTransfersBankAccounts BankAccounts { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccounts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccounts.cs new file mode 100644 index 0000000000..10dfa7a5f9 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccounts.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesInboundTransfersBankAccounts : StripeEntity + { + /// + /// Whether the Capability has been requested. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool Requested { get; set; } + + /// + /// The status of the Capability. + /// One of: active, pending, restricted, or unsupported. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + /// + /// Additional details regarding the status of the Capability. status_details will be + /// empty if the Capability's status is active. + /// + [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif + public List StatusDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsStatusDetail.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsStatusDetail.cs new file mode 100644 index 0000000000..b65481ba92 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsStatusDetail.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsStatusDetail : StripeEntity + { + /// + /// Machine-readable code explaining the reason for the Capability to be in its current + /// status. + /// One of: determining_status, requirements_past_due, + /// requirements_pending_verification, restricted_other, + /// unsupported_business, unsupported_country, or + /// unsupported_entity_type. + /// + [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif + public string Code { get; set; } + + /// + /// Machine-readable code explaining how to make the Capability active. + /// One of: contact_stripe, no_resolution, or provide_info. + /// + [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif + public string Resolution { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPayments.cs new file mode 100644 index 0000000000..4339ce5fca --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPayments.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesOutboundPayments : StripeEntity + { + /// + /// Can send funds from a FinancialAccount to a bank account, owned by someone else. + /// + [JsonProperty("bank_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_accounts")] +#endif + public AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts BankAccounts { get; set; } + + /// + /// Can send funds from a FinancialAccount to a debit card, owned by someone else. + /// + [JsonProperty("cards")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cards")] +#endif + public AccountConfigurationStorerCapabilitiesOutboundPaymentsCards Cards { get; set; } + + /// + /// Can send funds from a FinancialAccount to another FinancialAccount, owned by someone + /// else. + /// + [JsonProperty("financial_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_accounts")] +#endif + public AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts FinancialAccounts { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts.cs new file mode 100644 index 0000000000..292d978841 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts : StripeEntity + { + /// + /// Whether the Capability has been requested. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool Requested { get; set; } + + /// + /// The status of the Capability. + /// One of: active, pending, restricted, or unsupported. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + /// + /// Additional details regarding the status of the Capability. status_details will be + /// empty if the Capability's status is active. + /// + [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif + public List StatusDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsStatusDetail.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsStatusDetail.cs new file mode 100644 index 0000000000..401885d892 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsStatusDetail.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsStatusDetail : StripeEntity + { + /// + /// Machine-readable code explaining the reason for the Capability to be in its current + /// status. + /// One of: determining_status, requirements_past_due, + /// requirements_pending_verification, restricted_other, + /// unsupported_business, unsupported_country, or + /// unsupported_entity_type. + /// + [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif + public string Code { get; set; } + + /// + /// Machine-readable code explaining how to make the Capability active. + /// One of: contact_stripe, no_resolution, or provide_info. + /// + [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif + public string Resolution { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCards.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCards.cs new file mode 100644 index 0000000000..51a2e6422f --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCards.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsCards : StripeEntity + { + /// + /// Whether the Capability has been requested. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool Requested { get; set; } + + /// + /// The status of the Capability. + /// One of: active, pending, restricted, or unsupported. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + /// + /// Additional details regarding the status of the Capability. status_details will be + /// empty if the Capability's status is active. + /// + [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif + public List StatusDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsStatusDetail.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsStatusDetail.cs new file mode 100644 index 0000000000..9d8b909950 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsStatusDetail.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsStatusDetail : StripeEntity + { + /// + /// Machine-readable code explaining the reason for the Capability to be in its current + /// status. + /// One of: determining_status, requirements_past_due, + /// requirements_pending_verification, restricted_other, + /// unsupported_business, unsupported_country, or + /// unsupported_entity_type. + /// + [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif + public string Code { get; set; } + + /// + /// Machine-readable code explaining how to make the Capability active. + /// One of: contact_stripe, no_resolution, or provide_info. + /// + [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif + public string Resolution { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts.cs new file mode 100644 index 0000000000..a2657f568c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts : StripeEntity + { + /// + /// Whether the Capability has been requested. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool Requested { get; set; } + + /// + /// The status of the Capability. + /// One of: active, pending, restricted, or unsupported. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + /// + /// Additional details regarding the status of the Capability. status_details will be + /// empty if the Capability's status is active. + /// + [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif + public List StatusDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsStatusDetail.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsStatusDetail.cs new file mode 100644 index 0000000000..36f3ab4c35 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsStatusDetail.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsStatusDetail : StripeEntity + { + /// + /// Machine-readable code explaining the reason for the Capability to be in its current + /// status. + /// One of: determining_status, requirements_past_due, + /// requirements_pending_verification, restricted_other, + /// unsupported_business, unsupported_country, or + /// unsupported_entity_type. + /// + [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif + public string Code { get; set; } + + /// + /// Machine-readable code explaining how to make the Capability active. + /// One of: contact_stripe, no_resolution, or provide_info. + /// + [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif + public string Resolution { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfers.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfers.cs new file mode 100644 index 0000000000..72163aebb4 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfers.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesOutboundTransfers : StripeEntity + { + /// + /// Can send funds from a FinancialAccount, to a bank account, owned by yourself. + /// + [JsonProperty("bank_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_accounts")] +#endif + public AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccounts BankAccounts { get; set; } + + /// + /// Can send funds from a FinancialAccount to another FinancialAccount, owned by yourself. + /// + [JsonProperty("financial_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_accounts")] +#endif + public AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts FinancialAccounts { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccounts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccounts.cs new file mode 100644 index 0000000000..2788653cb7 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccounts.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccounts : StripeEntity + { + /// + /// Whether the Capability has been requested. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool Requested { get; set; } + + /// + /// The status of the Capability. + /// One of: active, pending, restricted, or unsupported. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + /// + /// Additional details regarding the status of the Capability. status_details will be + /// empty if the Capability's status is active. + /// + [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif + public List StatusDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsStatusDetail.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsStatusDetail.cs new file mode 100644 index 0000000000..932a8bbaf5 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsStatusDetail.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsStatusDetail : StripeEntity + { + /// + /// Machine-readable code explaining the reason for the Capability to be in its current + /// status. + /// One of: determining_status, requirements_past_due, + /// requirements_pending_verification, restricted_other, + /// unsupported_business, unsupported_country, or + /// unsupported_entity_type. + /// + [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif + public string Code { get; set; } + + /// + /// Machine-readable code explaining how to make the Capability active. + /// One of: contact_stripe, no_resolution, or provide_info. + /// + [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif + public string Resolution { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts.cs new file mode 100644 index 0000000000..603eada6ab --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts : StripeEntity + { + /// + /// Whether the Capability has been requested. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool Requested { get; set; } + + /// + /// The status of the Capability. + /// One of: active, pending, restricted, or unsupported. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + /// + /// Additional details regarding the status of the Capability. status_details will be + /// empty if the Capability's status is active. + /// + [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif + public List StatusDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsStatusDetail.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsStatusDetail.cs new file mode 100644 index 0000000000..454a17c90a --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsStatusDetail.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsStatusDetail : StripeEntity + { + /// + /// Machine-readable code explaining the reason for the Capability to be in its current + /// status. + /// One of: determining_status, requirements_past_due, + /// requirements_pending_verification, restricted_other, + /// unsupported_business, unsupported_country, or + /// unsupported_entity_type. + /// + [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif + public string Code { get; set; } + + /// + /// Machine-readable code explaining how to make the Capability active. + /// One of: contact_stripe, no_resolution, or provide_info. + /// + [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif + public string Resolution { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountRequirementsEntryImpactRestrictsCapability.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountRequirementsEntryImpactRestrictsCapability.cs index eb03469007..92ce0e5c67 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountRequirementsEntryImpactRestrictsCapability.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountRequirementsEntryImpactRestrictsCapability.cs @@ -16,14 +16,18 @@ public class AccountRequirementsEntryImpactRestrictsCapability : StripeEntitybacs_debit_payments, bancontact_payments, bank_accounts.local, /// bank_accounts.wire, blik_payments, boleto_payments, cards, /// card_payments, cartes_bancaires_payments, cashapp_payments, - /// eps_payments, fpx_payments, gb_bank_transfer_payments, - /// grabpay_payments, ideal_payments, jcb_payments, + /// eps_payments, financial_addresses.bank_accounts, fpx_payments, + /// gb_bank_transfer_payments, grabpay_payments, holds_currencies.gbp, + /// ideal_payments, inbound_transfers.financial_accounts, jcb_payments, /// jp_bank_transfer_payments, kakao_pay_payments, klarna_payments, /// konbini_payments, kr_card_payments, link_payments, /// mobilepay_payments, multibanco_payments, mx_bank_transfer_payments, - /// naver_pay_payments, oxxo_payments, p24_payments, - /// payco_payments, paynow_payments, pay_by_bank_payments, - /// promptpay_payments, revolut_pay_payments, samsung_pay_payments, + /// naver_pay_payments, outbound_payments.bank_accounts, + /// outbound_payments.cards, outbound_payments.financial_accounts, + /// outbound_transfers.bank_accounts, outbound_transfers.financial_accounts, + /// oxxo_payments, p24_payments, payco_payments, + /// paynow_payments, pay_by_bank_payments, promptpay_payments, + /// revolut_pay_payments, samsung_pay_payments, /// sepa_bank_transfer_payments, sepa_debit_payments, /// stripe_balance.payouts, stripe_balance.stripe_transfers, /// swish_payments, twint_payments, us_bank_transfer_payments, or @@ -37,7 +41,7 @@ public class AccountRequirementsEntryImpactRestrictsCapability : StripeEntity /// The configuration which specifies the Capability which will be restricted. - /// One of: customer, merchant, or recipient. + /// One of: customer, merchant, recipient, or storer. /// [JsonProperty("configuration")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccount.cs b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccount.cs index 0eb7785bd8..94574feb95 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccount.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccount.cs @@ -135,6 +135,12 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta #endif public string Status { get; set; } + [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif + public FinancialAccountStatusDetails StatusDetails { get; set; } + /// /// If this is a storage FinancialAccount, this hash includes details specific to /// storage FinancialAccounts. diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStatusDetails.cs b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStatusDetails.cs new file mode 100644 index 0000000000..e02028d1c0 --- /dev/null +++ b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStatusDetails.cs @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.MoneyManagement +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FinancialAccountStatusDetails : StripeEntity + { + [JsonProperty("closed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("closed")] +#endif + public FinancialAccountStatusDetailsClosed Closed { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStatusDetailsClosed.cs b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStatusDetailsClosed.cs new file mode 100644 index 0000000000..b003f19f83 --- /dev/null +++ b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStatusDetailsClosed.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.MoneyManagement +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FinancialAccountStatusDetailsClosed : StripeEntity + { + [JsonProperty("forwarding_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("forwarding_settings")] +#endif + public FinancialAccountStatusDetailsClosedForwardingSettings ForwardingSettings { get; set; } + + /// + /// One of: account_closed, closed_by_platform, or other. + /// + [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif + public string Reason { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStatusDetailsClosedForwardingSettings.cs b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStatusDetailsClosedForwardingSettings.cs new file mode 100644 index 0000000000..2e99823fb9 --- /dev/null +++ b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStatusDetailsClosedForwardingSettings.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.MoneyManagement +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FinancialAccountStatusDetailsClosedForwardingSettings : StripeEntity + { + /// + /// The address to send forwarded payments to. + /// + [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif + public string PaymentMethod { get; set; } + + /// + /// The address to send forwarded payouts to. + /// + [JsonProperty("payout_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payout_method")] +#endif + public string PayoutMethod { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.cs b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.cs new file mode 100644 index 0000000000..0a23dcf90c --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.cs @@ -0,0 +1,52 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when the status of an Account's storer configuration capability is updated. + /// + public class V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent : V2.Event + { + /// + /// Data for the v2.core.account[configuration.storer].capability_status_updated event. + /// + [JsonProperty("data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data")] +#endif + + public V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventData Data { get; set; } + + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventData.cs b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventData.cs new file mode 100644 index 0000000000..cec4507024 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventData.cs @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventData : StripeEntity + { + /// + /// Open Enum. The capability which had its status updated. + /// One of: financial_addressses.bank_accounts, holds_currencies.eur, + /// holds_currencies.gbp, holds_currencies.usd, + /// inbound_transfers.bank_accounts, outbound_payments.bank_accounts, + /// outbound_payments.cards, outbound_payments.financial_accounts, + /// outbound_transfers.bank_accounts, or + /// outbound_transfers.financial_accounts. + /// + [JsonProperty("updated_capability")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("updated_capability")] +#endif + public string UpdatedCapability { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerUpdatedEvent.cs b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerUpdatedEvent.cs new file mode 100644 index 0000000000..8ff3afc8bf --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerUpdatedEvent.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Storer's configuration is updated. + /// + public class V2CoreAccountIncludingConfigurationStorerUpdatedEvent : V2.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Exceptions/V2/AlreadyExistsException.cs b/src/Stripe.net/Exceptions/V2/AlreadyExistsException.cs new file mode 100644 index 0000000000..0698359998 --- /dev/null +++ b/src/Stripe.net/Exceptions/V2/AlreadyExistsException.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using System.Net; + using Newtonsoft.Json.Linq; + + public class AlreadyExistsException : StripeException + { + private AlreadyExistsException( + HttpStatusCode httpStatusCode, + StripeError stripeError, + string message) + : base(httpStatusCode, stripeError) + { + } + + internal static AlreadyExistsException Parse( + HttpStatusCode httpStatusCode, + JToken body) + { + var stripeError = StripeError.FromJson(body); + return new AlreadyExistsException(httpStatusCode, stripeError, stripeError.Message); + } + } +} \ No newline at end of file diff --git a/src/Stripe.net/Exceptions/V2/NonZeroBalanceException.cs b/src/Stripe.net/Exceptions/V2/NonZeroBalanceException.cs new file mode 100644 index 0000000000..c219e1579a --- /dev/null +++ b/src/Stripe.net/Exceptions/V2/NonZeroBalanceException.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using System.Net; + using Newtonsoft.Json.Linq; + + public class NonZeroBalanceException : StripeException + { + private NonZeroBalanceException( + HttpStatusCode httpStatusCode, + StripeError stripeError, + string message) + : base(httpStatusCode, stripeError) + { + } + + internal static NonZeroBalanceException Parse( + HttpStatusCode httpStatusCode, + JToken body) + { + var stripeError = StripeError.FromJson(body); + return new NonZeroBalanceException(httpStatusCode, stripeError, stripeError.Message); + } + } +} \ No newline at end of file diff --git a/src/Stripe.net/Infrastructure/Public/StripeException.cs b/src/Stripe.net/Infrastructure/Public/StripeException.cs index a67ea8658e..458ce6a2b1 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeException.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeException.cs @@ -51,14 +51,22 @@ internal static StripeException ParseV2Exception(string type, StripeResponse res ret = Stripe.V2.TemporarySessionExpiredException.Parse(httpStatusCode, body); break; - case "financial_account_not_open": - ret = Stripe.V2.FinancialAccountNotOpenException.Parse(httpStatusCode, body); + case "non_zero_balance": + ret = Stripe.V2.NonZeroBalanceException.Parse(httpStatusCode, body); + break; + + case "already_exists": + ret = Stripe.V2.AlreadyExistsException.Parse(httpStatusCode, body); break; case "feature_not_enabled": ret = Stripe.V2.FeatureNotEnabledException.Parse(httpStatusCode, body); break; + case "financial_account_not_open": + ret = Stripe.V2.FinancialAccountNotOpenException.Parse(httpStatusCode, body); + break; + case "blocked_by_stripe": ret = Stripe.V2.BlockedByStripeException.Parse(httpStatusCode, body); break; diff --git a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index 4638cf5230..37bfa31326 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -349,6 +349,14 @@ public static class StripeTypeRegistry "v2.core.account[configuration.recipient].updated", typeof( Events.V2CoreAccountIncludingConfigurationRecipientUpdatedEvent) }, + { + "v2.core.account[configuration.storer].capability_status_updated", typeof( + Events.V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent) + }, + { + "v2.core.account[configuration.storer].updated", typeof( + Events.V2CoreAccountIncludingConfigurationStorerUpdatedEvent) + }, { "v2.money_management.adjustment.created", typeof( Events.V2MoneyManagementAdjustmentCreatedEvent) diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCloseOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCloseOptions.cs index 8b66a033fd..0b64187d92 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCloseOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCloseOptions.cs @@ -12,7 +12,7 @@ public class AccountCloseOptions : BaseOptions /// /// Configurations on the Account to be closed. All configurations on the Account must be /// passed in for this request to succeed. - /// One of: customer, merchant, or recipient. + /// One of: customer, merchant, recipient, or storer. /// [JsonProperty("applied_configurations")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationOptions.cs index 06e341aab4..914894f246 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationOptions.cs @@ -36,5 +36,15 @@ public class AccountCreateConfigurationOptions : INestedOptions [STJS.JsonPropertyName("recipient")] #endif public AccountCreateConfigurationRecipientOptions Recipient { get; set; } + + /// + /// The Storer Configuration allows the Account to store and move funds using stored-value + /// FinancialAccounts. + /// + [JsonProperty("storer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("storer")] +#endif + public AccountCreateConfigurationStorerOptions Storer { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs new file mode 100644 index 0000000000..34f4f9348c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesOptions.cs new file mode 100644 index 0000000000..ab95b992ad --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesFinancialAddressesOptions : INestedOptions + { + /// + /// Can provision a bank-account-like financial address (VBAN) to credit/debit a + /// FinancialAccount. + /// + [JsonProperty("bank_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_accounts")] +#endif + public AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions BankAccounts { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs new file mode 100644 index 0000000000..5e3aca543e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs new file mode 100644 index 0000000000..c08f0bbeba --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesOptions : INestedOptions + { + /// + /// Can hold storage-type funds on Stripe in GBP. + /// + [JsonProperty("gbp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gbp")] +#endif + public AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions Gbp { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs new file mode 100644 index 0000000000..966e836366 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersOptions.cs new file mode 100644 index 0000000000..c9990bf6c8 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesInboundTransfersOptions : INestedOptions + { + /// + /// Can pull funds from an external bank account owned by yourself to a FinancialAccount. + /// + [JsonProperty("bank_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_accounts")] +#endif + public AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions BankAccounts { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOptions.cs new file mode 100644 index 0000000000..b79a996e09 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOptions.cs @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesOptions : INestedOptions + { + /// + /// Can provision a financial address to credit/debit a FinancialAccount. + /// + [JsonProperty("financial_addresses")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_addresses")] +#endif + public AccountCreateConfigurationStorerCapabilitiesFinancialAddressesOptions FinancialAddresses { get; set; } + + /// + /// Can hold storage-type funds on Stripe. + /// + [JsonProperty("holds_currencies")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("holds_currencies")] +#endif + public AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesOptions HoldsCurrencies { get; set; } + + /// + /// Can pull funds from an external source, owned by yourself, to a FinancialAccount. + /// + [JsonProperty("inbound_transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_transfers")] +#endif + public AccountCreateConfigurationStorerCapabilitiesInboundTransfersOptions InboundTransfers { get; set; } + + /// + /// Can send funds from a FinancialAccount to a destination owned by someone else. + /// + [JsonProperty("outbound_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_payments")] +#endif + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsOptions OutboundPayments { get; set; } + + /// + /// Can send funds from a FinancialAccount to a destination owned by yourself. + /// + [JsonProperty("outbound_transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_transfers")] +#endif + public AccountCreateConfigurationStorerCapabilitiesOutboundTransfersOptions OutboundTransfers { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs new file mode 100644 index 0000000000..831f468622 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs new file mode 100644 index 0000000000..deb0b242c4 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs new file mode 100644 index 0000000000..125345f06d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsOptions.cs new file mode 100644 index 0000000000..1c15e595cc --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsOptions.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsOptions : INestedOptions + { + /// + /// Can send funds from a FinancialAccount to a bank account owned by someone else. + /// + [JsonProperty("bank_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_accounts")] +#endif + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions BankAccounts { get; set; } + + /// + /// Can send funds from a FinancialAccount to a debit card owned by someone else. + /// + [JsonProperty("cards")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cards")] +#endif + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions Cards { get; set; } + + /// + /// Can send funds from a FinancialAccount to another FinancialAccount owned by someone + /// else. + /// + [JsonProperty("financial_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_accounts")] +#endif + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions FinancialAccounts { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs new file mode 100644 index 0000000000..65846efe36 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs new file mode 100644 index 0000000000..5de977b794 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersOptions.cs new file mode 100644 index 0000000000..f3885944e1 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersOptions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesOutboundTransfersOptions : INestedOptions + { + /// + /// Can send funds from a FinancialAccount to a bank account owned by yourself. + /// + [JsonProperty("bank_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_accounts")] +#endif + public AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions BankAccounts { get; set; } + + /// + /// Can send funds from a FinancialAccount to another FinancialAccount owned by yourself. + /// + [JsonProperty("financial_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_accounts")] +#endif + public AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions FinancialAccounts { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerOptions.cs new file mode 100644 index 0000000000..f91a5158dd --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerOptions : INestedOptions + { + /// + /// Capabilities to request on the Storer Configuration. + /// + [JsonProperty("capabilities")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capabilities")] +#endif + public AccountCreateConfigurationStorerCapabilitiesOptions Capabilities { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateOptions.cs index 145d7de7de..c3dbbbb4b4 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateOptions.cs @@ -71,8 +71,8 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata /// /// Additional fields to include in the response. /// One of: configuration.customer, configuration.merchant, - /// configuration.recipient, defaults, identity, or - /// requirements. + /// configuration.recipient, configuration.storer, defaults, + /// identity, or requirements. /// [JsonProperty("include")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountGetOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountGetOptions.cs index e71b684c55..288b5650c5 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountGetOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountGetOptions.cs @@ -12,8 +12,8 @@ public class AccountGetOptions : BaseOptions /// /// Additional fields to include in the response. /// One of: configuration.customer, configuration.merchant, - /// configuration.recipient, defaults, identity, or - /// requirements. + /// configuration.recipient, configuration.storer, defaults, + /// identity, or requirements. /// [JsonProperty("include")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationOptions.cs index d3531731dc..a5ceadd1d8 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationOptions.cs @@ -36,5 +36,15 @@ public class AccountUpdateConfigurationOptions : INestedOptions [STJS.JsonPropertyName("recipient")] #endif public AccountUpdateConfigurationRecipientOptions Recipient { get; set; } + + /// + /// The Storer Configuration allows the Account to store and move funds using stored-value + /// FinancialAccounts. + /// + [JsonProperty("storer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("storer")] +#endif + public AccountUpdateConfigurationStorerOptions Storer { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs new file mode 100644 index 0000000000..28f72fc6fc --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesOptions.cs new file mode 100644 index 0000000000..82b07e5c0f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesOptions : INestedOptions + { + /// + /// Can provision a bank-account-like financial address (VBAN) to credit/debit a + /// FinancialAccount. + /// + [JsonProperty("bank_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_accounts")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions BankAccounts { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs new file mode 100644 index 0000000000..0ef251e147 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs new file mode 100644 index 0000000000..10f8f0ab87 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesOptions : INestedOptions + { + /// + /// Can hold storage-type funds on Stripe in GBP. + /// + [JsonProperty("gbp")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gbp")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions Gbp { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs new file mode 100644 index 0000000000..d48a6eabd1 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersOptions.cs new file mode 100644 index 0000000000..cd20f914d7 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesInboundTransfersOptions : INestedOptions + { + /// + /// Can pull funds from an external bank account owned by yourself to a FinancialAccount. + /// + [JsonProperty("bank_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_accounts")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions BankAccounts { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOptions.cs new file mode 100644 index 0000000000..42e6f3b9ac --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOptions.cs @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesOptions : INestedOptions + { + /// + /// Can provision a financial address to credit/debit a FinancialAccount. + /// + [JsonProperty("financial_addresses")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_addresses")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesOptions FinancialAddresses { get; set; } + + /// + /// Can hold storage-type funds on Stripe. + /// + [JsonProperty("holds_currencies")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("holds_currencies")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesOptions HoldsCurrencies { get; set; } + + /// + /// Can pull funds from an external source, owned by yourself, to a FinancialAccount. + /// + [JsonProperty("inbound_transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inbound_transfers")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesInboundTransfersOptions InboundTransfers { get; set; } + + /// + /// Can send funds from a FinancialAccount to a destination owned by someone else. + /// + [JsonProperty("outbound_payments")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_payments")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsOptions OutboundPayments { get; set; } + + /// + /// Can send funds from a FinancialAccount to a destination owned by yourself. + /// + [JsonProperty("outbound_transfers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("outbound_transfers")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersOptions OutboundTransfers { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs new file mode 100644 index 0000000000..ed65ed2fda --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs new file mode 100644 index 0000000000..e9ab9291e3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs new file mode 100644 index 0000000000..131c9d2477 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsOptions.cs new file mode 100644 index 0000000000..6a0adc09a6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsOptions.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsOptions : INestedOptions + { + /// + /// Can send funds from a FinancialAccount to a bank account owned by someone else. + /// + [JsonProperty("bank_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_accounts")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions BankAccounts { get; set; } + + /// + /// Can send funds from a FinancialAccount to a debit card owned by someone else. + /// + [JsonProperty("cards")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cards")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions Cards { get; set; } + + /// + /// Can send funds from a FinancialAccount to another FinancialAccount owned by someone + /// else. + /// + [JsonProperty("financial_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_accounts")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions FinancialAccounts { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs new file mode 100644 index 0000000000..028234ddbd --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs new file mode 100644 index 0000000000..2ff5b1a21c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersOptions.cs new file mode 100644 index 0000000000..1617f84e3f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersOptions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersOptions : INestedOptions + { + /// + /// Can send funds from a FinancialAccount to a bank account owned by yourself. + /// + [JsonProperty("bank_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bank_accounts")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions BankAccounts { get; set; } + + /// + /// Can send funds from a FinancialAccount to another FinancialAccount owned by yourself. + /// + [JsonProperty("financial_accounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("financial_accounts")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions FinancialAccounts { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerOptions.cs new file mode 100644 index 0000000000..10557238d3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerOptions : INestedOptions + { + /// + /// Capabilities to request on the Storer Configuration. + /// + [JsonProperty("capabilities")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("capabilities")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesOptions Capabilities { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateOptions.cs index c66f7d02fc..c80115003e 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateOptions.cs @@ -71,8 +71,8 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata /// /// Additional fields to include in the response. /// One of: configuration.customer, configuration.merchant, - /// configuration.recipient, defaults, identity, or - /// requirements. + /// configuration.recipient, configuration.storer, defaults, + /// identity, or requirements. /// [JsonProperty("include")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCloseForwardingSettingsOptions.cs b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCloseForwardingSettingsOptions.cs new file mode 100644 index 0000000000..07d920ee3f --- /dev/null +++ b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCloseForwardingSettingsOptions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.MoneyManagement +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FinancialAccountCloseForwardingSettingsOptions : INestedOptions + { + /// + /// The address to send forwarded payments to. + /// + [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif + public string PaymentMethod { get; set; } + + /// + /// The address to send forwarded payouts to. + /// + [JsonProperty("payout_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payout_method")] +#endif + public string PayoutMethod { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCloseOptions.cs b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCloseOptions.cs new file mode 100644 index 0000000000..67618f0c4f --- /dev/null +++ b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCloseOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.MoneyManagement +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FinancialAccountCloseOptions : BaseOptions + { + /// + /// The addresses to forward any incoming transactions to. + /// + [JsonProperty("forwarding_settings")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("forwarding_settings")] +#endif + public FinancialAccountCloseForwardingSettingsOptions ForwardingSettings { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCreateOptions.cs b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCreateOptions.cs new file mode 100644 index 0000000000..c8dcbf3691 --- /dev/null +++ b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCreateOptions.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.MoneyManagement +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FinancialAccountCreateOptions : BaseOptions, IHasMetadata + { + /// + /// Metadata associated with the FinancialAccount. + /// + [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + + /// + /// Parameters specific to creating storage type FinancialAccounts. + /// + [JsonProperty("storage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("storage")] +#endif + public FinancialAccountCreateStorageOptions Storage { get; set; } + + /// + /// The type of FinancialAccount to create. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCreateStorageOptions.cs b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCreateStorageOptions.cs new file mode 100644 index 0000000000..a30490b230 --- /dev/null +++ b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCreateStorageOptions.cs @@ -0,0 +1,47 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.MoneyManagement +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FinancialAccountCreateStorageOptions : INestedOptions + { + /// + /// The currencies that this FinancialAccount can hold. + /// One of: aed, afn, all, amd, ang, aoa, + /// ars, aud, awg, azn, bam, bbd, bdt, + /// bgn, bhd, bif, bmd, bnd, bob, bov, + /// brl, bsd, btn, bwp, byn, byr, bzd, + /// cad, cdf, che, chf, chw, clf, clp, + /// cny, cop, cou, crc, cuc, cup, cve, + /// czk, djf, dkk, dop, dzd, eek, egp, + /// ern, etb, eur, fjd, fkp, gbp, gel, + /// ghc, ghs, gip, gmd, gnf, gtq, gyd, + /// hkd, hnl, hrk, htg, huf, idr, ils, + /// inr, iqd, irr, isk, jmd, jod, jpy, + /// kes, kgs, khr, kmf, kpw, krw, kwd, + /// kyd, kzt, lak, lbp, lkr, lrd, lsl, + /// ltl, lvl, lyd, mad, mdl, mga, mkd, + /// mmk, mnt, mop, mro, mru, mur, mvr, + /// mwk, mxn, mxv, myr, mzn, nad, ngn, + /// nio, nok, npr, nzd, omr, pab, pen, + /// pgk, php, pkr, pln, pyg, qar, ron, + /// rsd, rub, rwf, sar, sbd, scr, sdg, + /// sek, sgd, shp, sle, sll, sos, srd, + /// ssp, std, stn, svc, syp, szl, thb, + /// tjs, tmt, tnd, top, try, ttd, twd, + /// tzs, uah, ugx, usd, usdb, usdc, usn, + /// uyi, uyu, uzs, vef, ves, vnd, vuv, + /// wst, xaf, xcd, xcg, xof, xpf, yer, + /// zar, zmk, zmw, zwd, zwg, or zwl. + /// + [JsonProperty("holds_currencies")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("holds_currencies")] +#endif + public List HoldsCurrencies { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountListOptions.cs b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountListOptions.cs index cd344bfcef..d8c8747001 100644 --- a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountListOptions.cs +++ b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountListOptions.cs @@ -1,7 +1,22 @@ // File generated from our OpenAPI spec namespace Stripe.V2.MoneyManagement { + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + public class FinancialAccountListOptions : V2.ListOptions { + /// + /// The status of the FinancialAccount to filter by. By default, closed FinancialAccounts + /// are not returned. + /// One of: closed, open, or pending. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountService.cs b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountService.cs index 6532e44069..231eaacb63 100644 --- a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountService.cs +++ b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountService.cs @@ -20,6 +20,38 @@ internal FinancialAccountService(IStripeClient client) { } + /// + /// Closes a FinancialAccount with or without forwarding settings. + /// + public virtual FinancialAccount Close(string id, FinancialAccountCloseOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/money_management/financial_accounts/{WebUtility.UrlEncode(id)}/close", options, requestOptions); + } + + /// + /// Closes a FinancialAccount with or without forwarding settings. + /// + public virtual Task CloseAsync(string id, FinancialAccountCloseOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/money_management/financial_accounts/{WebUtility.UrlEncode(id)}/close", options, requestOptions, cancellationToken); + } + + /// + /// Creates a new FinancialAccount. + /// + public virtual FinancialAccount Create(FinancialAccountCreateOptions options, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/money_management/financial_accounts", options, requestOptions); + } + + /// + /// Creates a new FinancialAccount. + /// + public virtual Task CreateAsync(FinancialAccountCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/money_management/financial_accounts", options, requestOptions, cancellationToken); + } + /// /// Retrieves the details of an existing FinancialAccount. /// diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index 160636d2dd..a95ec41d92 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -6311,7 +6311,7 @@ public void TestV2CoreAccountGet() HttpMethod.Get, "/v2/core/accounts", (HttpStatusCode)200, - "{\"data\":[{\"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,\"livemode\":true,\"metadata\":null,\"requirements\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"identity\":null,\"livemode\":true,\"metadata\":null,\"requirements\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; Stripe.V2.StripeList accounts = service @@ -6326,7 +6326,7 @@ public void TestV2CoreAccountPost() HttpMethod.Post, "/v2/core/accounts", (HttpStatusCode)200, - "{\"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,\"livemode\":true,\"metadata\":null,\"requirements\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"identity\":null,\"livemode\":true,\"metadata\":null,\"requirements\":null}"); var options = new Stripe.V2.Core.AccountCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; @@ -6341,7 +6341,7 @@ public void TestV2CoreAccountGet2() HttpMethod.Get, "/v2/core/accounts/id_123", (HttpStatusCode)200, - "{\"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,\"livemode\":true,\"metadata\":null,\"requirements\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"identity\":null,\"livemode\":true,\"metadata\":null,\"requirements\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; Stripe.V2.Core.Account account = service.Get("id_123"); @@ -6355,7 +6355,7 @@ public void TestV2CoreAccountPost2() HttpMethod.Post, "/v2/core/accounts/id_123", (HttpStatusCode)200, - "{\"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,\"livemode\":true,\"metadata\":null,\"requirements\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"identity\":null,\"livemode\":true,\"metadata\":null,\"requirements\":null}"); var options = new Stripe.V2.Core.AccountUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; @@ -6370,7 +6370,7 @@ public void TestV2CoreAccountPost3() HttpMethod.Post, "/v2/core/accounts/id_123/close", (HttpStatusCode)200, - "{\"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,\"livemode\":true,\"metadata\":null,\"requirements\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"identity\":null,\"livemode\":true,\"metadata\":null,\"requirements\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; Stripe.V2.Core.Account account = service.Close("id_123"); @@ -6851,7 +6851,7 @@ public void TestV2MoneyManagementFinancialAccountGet() HttpMethod.Get, "/v2/money_management/financial_accounts", (HttpStatusCode)200, - "{\"data\":[{\"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\":\"af\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"other\":null,\"status\":\"closed\",\"storage\":null,\"type\":\"other\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"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\":\"af\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"other\":null,\"status\":\"closed\",\"status_details\":null,\"storage\":null,\"type\":\"other\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.FinancialAccounts; Stripe.V2.StripeList financialAccounts = service @@ -6861,6 +6861,27 @@ public void TestV2MoneyManagementFinancialAccountGet() "/v2/money_management/financial_accounts"); } + [Fact] + public void TestV2MoneyManagementFinancialAccountPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts", + (HttpStatusCode)200, + "{\"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\":\"af\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"other\":null,\"status\":\"closed\",\"status_details\":null,\"storage\":null,\"type\":\"other\"}"); + var options = new Stripe.V2.MoneyManagement.FinancialAccountCreateOptions + { + Type = "storage", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts"); + } + [Fact] public void TestV2MoneyManagementFinancialAccountGet2() { @@ -6868,7 +6889,7 @@ public void TestV2MoneyManagementFinancialAccountGet2() HttpMethod.Get, "/v2/money_management/financial_accounts/id_123", (HttpStatusCode)200, - "{\"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\":\"af\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"other\":null,\"status\":\"closed\",\"storage\":null,\"type\":\"other\"}"); + "{\"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\":\"af\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"other\":null,\"status\":\"closed\",\"status_details\":null,\"storage\":null,\"type\":\"other\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.FinancialAccounts; Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service @@ -6878,6 +6899,23 @@ public void TestV2MoneyManagementFinancialAccountGet2() "/v2/money_management/financial_accounts/id_123"); } + [Fact] + public void TestV2MoneyManagementFinancialAccountPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts/id_123/close", + (HttpStatusCode)200, + "{\"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\":\"af\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"other\":null,\"status\":\"closed\",\"status_details\":null,\"storage\":null,\"type\":\"other\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service + .Close("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts/id_123/close"); + } + [Fact] public void TestV2MoneyManagementFinancialAddressGet() { @@ -7677,29 +7715,49 @@ public void TestTemporarySessionExpiredError() } [Fact] - public void TestFinancialAccountNotOpenError() + public void TestNonZeroBalanceError() { this.StubRequest( HttpMethod.Post, - "/v2/money_management/financial_addresses", + "/v2/money_management/financial_accounts/id_123/close", (HttpStatusCode)400, - "{\"error\":{\"type\":\"financial_account_not_open\",\"code\":\"financial_account_not_in_open_status\"}}"); - var exception = Assert.Throws( + "{\"error\":{\"type\":\"non_zero_balance\",\"code\":\"closing_financial_account_with_non_zero_balances\"}}"); + var exception = Assert.Throws( () => { - var options = new Stripe.V2.MoneyManagement.FinancialAddressCreateOptions + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service + .Close("id_123"); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts/id_123/close"); + } + + [Fact] + public void TestAlreadyExistsError() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"already_exists\",\"code\":\"already_exists\"}}"); + var exception = Assert.Throws( + () => { - Currency = "stn", - FinancialAccount = "financial_account", + var options = new Stripe.V2.MoneyManagement.FinancialAccountCreateOptions + { + Type = "storage", }; var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.FinancialAddresses; - Stripe.V2.MoneyManagement.FinancialAddress financialAddress = service + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service .Create(options); }); this.AssertRequest( HttpMethod.Post, - "/v2/money_management/financial_addresses"); + "/v2/money_management/financial_accounts"); } [Fact] @@ -7707,12 +7765,37 @@ public void TestFeatureNotEnabledError() { this.StubRequest( HttpMethod.Post, - "/v2/money_management/financial_addresses", + "/v2/money_management/financial_accounts", (HttpStatusCode)400, "{\"error\":{\"type\":\"feature_not_enabled\",\"code\":\"storer_capability_missing\"}}"); var exception = Assert.Throws( () => { + var options = new Stripe.V2.MoneyManagement.FinancialAccountCreateOptions + { + Type = "storage", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service + .Create(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts"); + } + + [Fact] + public void TestFinancialAccountNotOpenError() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/financial_addresses", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"financial_account_not_open\",\"code\":\"financial_account_not_in_open_status\"}}"); + var exception = Assert.Throws( + () => + { var options = new Stripe.V2.MoneyManagement.FinancialAddressCreateOptions { Currency = "stn",