Skip to content

Commit

Permalink
Update generated code for v1414
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Dec 16, 2024
1 parent 3851e9e commit eb21e06
Show file tree
Hide file tree
Showing 13 changed files with 229 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1413
v1414
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ public class FinancialAccount : StripeEntity<FinancialAccount>, IHasId, IHasMeta
#endif
public List<FinancialAccountFinancialAddress> FinancialAddresses { get; set; }

[JsonProperty("is_default")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("is_default")]
#endif
public bool IsDefault { get; set; }

/// <summary>
/// Has the value <c>true</c> if the object exists in live mode or the value <c>false</c> if
/// the object exists in test mode.
Expand All @@ -130,6 +136,15 @@ public class FinancialAccount : StripeEntity<FinancialAccount>, IHasId, IHasMeta
#endif
public Dictionary<string, string> Metadata { get; set; }

/// <summary>
/// The nickname for the FinancialAccount.
/// </summary>
[JsonProperty("nickname")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("nickname")]
#endif
public string Nickname { get; set; }

/// <summary>
/// The array of paths to pending Features in the Features hash.
/// One of: <c>card_issuing</c>, <c>deposit_insurance</c>, <c>financial_addresses.aba</c>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ public class OutboundTransferDestinationPaymentMethodDetails : StripeEntity<Outb
#endif
public OutboundTransferDestinationPaymentMethodDetailsBillingDetails BillingDetails { get; set; }

[JsonProperty("financial_account")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("financial_account")]
#endif
public OutboundTransferDestinationPaymentMethodDetailsFinancialAccount FinancialAccount { get; set; }

/// <summary>
/// The type of the payment method used in the OutboundTransfer.
/// One of: <c>financial_account</c>, or <c>us_bank_account</c>.
/// </summary>
[JsonProperty("type")]
#if NET6_0_OR_GREATER
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// File generated from our OpenAPI spec
namespace Stripe.Treasury
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class OutboundTransferDestinationPaymentMethodDetailsFinancialAccount : StripeEntity<OutboundTransferDestinationPaymentMethodDetailsFinancialAccount>, IHasId
{
/// <summary>
/// Token of the FinancialAccount.
/// </summary>
[JsonProperty("id")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("id")]
#endif
public string Id { get; set; }

/// <summary>
/// The rails used to send funds.
/// </summary>
[JsonProperty("network")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("network")]
#endif
public string Network { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,30 @@ public class ReceivedCreditLinkedFlowsSourceFlowDetails : StripeEntity<ReceivedC
#endif
public OutboundPayment OutboundPayment { get; set; }

/// <summary>
/// Use <a
/// href="https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers">OutboundTransfers</a>
/// to transfer funds from a <a
/// href="https://stripe.com/docs/api#financial_accounts">FinancialAccount</a> to a
/// PaymentMethod belonging to the same entity. To send funds to a different party, use <a
/// href="https://stripe.com/docs/api#outbound_payments">OutboundPayments</a> instead. You
/// can send funds over ACH rails or through a domestic wire transfer to a user's own
/// external bank account.
///
/// Simulate OutboundTransfer state changes with the
/// <c>/v1/test_helpers/treasury/outbound_transfers</c> endpoints. These methods can only be
/// called on test mode objects.
///
/// Related guide: <a
/// href="https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers">Moving
/// money with Treasury using OutboundTransfer objects</a>.
/// </summary>
[JsonProperty("outbound_transfer")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("outbound_transfer")]
#endif
public OutboundTransfer OutboundTransfer { get; set; }

/// <summary>
/// A <c>Payout</c> object is created when you receive funds from Stripe, or when you
/// initiate a payout to either a bank account or debit card of a <a
Expand All @@ -60,7 +84,8 @@ public class ReceivedCreditLinkedFlowsSourceFlowDetails : StripeEntity<ReceivedC

/// <summary>
/// The type of the source flow that originated the ReceivedCredit.
/// One of: <c>credit_reversal</c>, <c>other</c>, <c>outbound_payment</c>, or <c>payout</c>.
/// One of: <c>credit_reversal</c>, <c>other</c>, <c>outbound_payment</c>,
/// <c>outbound_transfer</c>, or <c>payout</c>.
/// </summary>
[JsonProperty("type")]
#if NET6_0_OR_GREATER
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// File generated from our OpenAPI spec
namespace Stripe.Treasury
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class FinancialAccountCloseOptions : BaseOptions
{
/// <summary>
/// A different bank account where funds can be deposited/debited in order to get the
/// closing FA's balance to $0.
/// </summary>
[JsonProperty("forwarding_settings")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("forwarding_settings")]
#endif
public FinancialAccountForwardingSettingsOptions ForwardingSettings { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ public class FinancialAccountCreateOptions : BaseOptions, IHasMetadata
#endif
public Dictionary<string, string> Metadata { get; set; }

/// <summary>
/// The nickname for the FinancialAccount.
/// </summary>
[JsonProperty("nickname")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("nickname")]
#endif
public string Nickname { get; set; }

/// <summary>
/// The set of functionalities that the platform can restrict on the FinancialAccount.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// File generated from our OpenAPI spec
namespace Stripe.Treasury
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class FinancialAccountForwardingSettingsOptions : INestedOptions
{
/// <summary>
/// The financial_account id.
/// </summary>
[JsonProperty("financial_account")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("financial_account")]
#endif
public string FinancialAccount { get; set; }

/// <summary>
/// The payment_method or bank account id. This needs to be a verified bank account.
/// </summary>
[JsonProperty("payment_method")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("payment_method")]
#endif
public string PaymentMethod { get; set; }

/// <summary>
/// The type of the bank account provided. This can be either "financial_account" or
/// "payment_method".
/// One of: <c>financial_account</c>, or <c>payment_method</c>.
/// </summary>
[JsonProperty("type")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("type")]
#endif
public string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@ public FinancialAccountService(IStripeClient client)
public virtual FinancialAccountFeaturesService Features => this.features ??= new FinancialAccountFeaturesService(
this.Requestor);

/// <summary>
/// <p>Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero
/// balance, has no pending InboundTransfers, and has canceled all attached Issuing
/// cards.</p>.
/// </summary>
public virtual FinancialAccount Close(string id, FinancialAccountCloseOptions options = null, RequestOptions requestOptions = null)
{
return this.Request<FinancialAccount>(BaseAddress.Api, HttpMethod.Post, $"/v1/treasury/financial_accounts/{WebUtility.UrlEncode(id)}/close", options, requestOptions);
}

/// <summary>
/// <p>Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero
/// balance, has no pending InboundTransfers, and has canceled all attached Issuing
/// cards.</p>.
/// </summary>
public virtual Task<FinancialAccount> CloseAsync(string id, FinancialAccountCloseOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
{
return this.RequestAsync<FinancialAccount>(BaseAddress.Api, HttpMethod.Post, $"/v1/treasury/financial_accounts/{WebUtility.UrlEncode(id)}/close", options, requestOptions, cancellationToken);
}

/// <summary>
/// <p>Creates a new FinancialAccount. For now, each connected account can only have one
/// FinancialAccount.</p>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ public class FinancialAccountUpdateOptions : BaseOptions, IHasMetadata
#endif
public FinancialAccountFeaturesOptions Features { get; set; }

/// <summary>
/// A different bank account where funds can be deposited/debited in order to get the
/// closing FA's balance to $0.
/// </summary>
[JsonProperty("forwarding_settings")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("forwarding_settings")]
#endif
public FinancialAccountForwardingSettingsOptions ForwardingSettings { get; set; }

/// <summary>
/// Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can
/// attach to an object. This can be useful for storing additional information about the
Expand All @@ -43,6 +53,15 @@ public class FinancialAccountUpdateOptions : BaseOptions, IHasMetadata
#endif
public Dictionary<string, string> Metadata { get; set; }

/// <summary>
/// The nickname for the FinancialAccount.
/// </summary>
[JsonProperty("nickname")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("nickname")]
#endif
public string Nickname { get; set; }

/// <summary>
/// The set of functionalities that the platform can restrict on the FinancialAccount.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ public class OutboundTransferCreateOptions : BaseOptions, IHasMetadata
#endif
public string DestinationPaymentMethod { get; set; }

/// <summary>
/// Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive
/// with <c>destination_payment_method</c>.
/// </summary>
[JsonProperty("destination_payment_method_data")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("destination_payment_method_data")]
#endif
public OutboundTransferDestinationPaymentMethodDataOptions DestinationPaymentMethodData { get; set; }

/// <summary>
/// Hash describing payment method configuration details.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// File generated from our OpenAPI spec
namespace Stripe.Treasury
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class OutboundTransferDestinationPaymentMethodDataOptions : INestedOptions
{
/// <summary>
/// Required if type is set to <c>financial_account</c>. The FinancialAccount ID to send
/// funds to.
/// </summary>
[JsonProperty("financial_account")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("financial_account")]
#endif
public string FinancialAccount { get; set; }

/// <summary>
/// The type of the destination.
/// </summary>
[JsonProperty("type")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("type")]
#endif
public string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ public class ReceivedCreditLinkedFlowsOptions : INestedOptions
{
/// <summary>
/// The source flow type.
/// One of: <c>credit_reversal</c>, <c>other</c>, <c>outbound_payment</c>, or <c>payout</c>.
/// One of: <c>credit_reversal</c>, <c>other</c>, <c>outbound_payment</c>,
/// <c>outbound_transfer</c>, or <c>payout</c>.
/// </summary>
[JsonProperty("source_flow_type")]
#if NET6_0_OR_GREATER
Expand Down

0 comments on commit eb21e06

Please sign in to comment.