Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #2289

Merged
merged 1 commit into from
Feb 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ public class ChargePaymentMethodDetailsIdeal : StripeEntity<ChargePaymentMethodD
/// <summary>
/// The customer's bank. Can be one of <c>abn_amro</c>, <c>asn_bank</c>, <c>bunq</c>,
/// <c>handelsbanken</c>, <c>ing</c>, <c>knab</c>, <c>moneyou</c>, <c>rabobank</c>,
/// <c>regiobank</c>, <c>sns_bank</c>, <c>triodos_bank</c>, or <c>van_lanschot</c>.
/// <c>regiobank</c>, <c>revolut</c>, <c>sns_bank</c>, <c>triodos_bank</c>, or
/// <c>van_lanschot</c>.
/// One of: <c>abn_amro</c>, <c>asn_bank</c>, <c>bunq</c>, <c>handelsbanken</c>, <c>ing</c>,
/// <c>knab</c>, <c>moneyou</c>, <c>rabobank</c>, <c>regiobank</c>, <c>sns_bank</c>,
/// <c>triodos_bank</c>, or <c>van_lanschot</c>.
/// <c>knab</c>, <c>moneyou</c>, <c>rabobank</c>, <c>regiobank</c>, <c>revolut</c>,
/// <c>sns_bank</c>, <c>triodos_bank</c>, or <c>van_lanschot</c>.
/// </summary>
[JsonProperty("bank")]
public string Bank { get; set; }
Expand All @@ -21,7 +22,7 @@ public class ChargePaymentMethodDetailsIdeal : StripeEntity<ChargePaymentMethodD
/// The Bank Identifier Code of the customer's bank.
/// One of: <c>ABNANL2A</c>, <c>ASNBNL21</c>, <c>BUNQNL2A</c>, <c>FVLBNL22</c>,
/// <c>HANDNL2A</c>, <c>INGBNL2A</c>, <c>KNABNL2H</c>, <c>MOYONL21</c>, <c>RABONL2U</c>,
/// <c>RBRBNL21</c>, <c>SNSBNL2A</c>, or <c>TRIONL2U</c>.
/// <c>RBRBNL21</c>, <c>REVOLT21</c>, <c>SNSBNL2A</c>, or <c>TRIONL2U</c>.
/// </summary>
[JsonProperty("bic")]
public string Bic { get; set; }
Expand Down
37 changes: 37 additions & 0 deletions src/Stripe.net/Entities/Invoices/Invoice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,43 @@ public List<Discount> Discounts
[JsonProperty("number")]
public string Number { get; set; }

#region Expandable OnBehalfOf

/// <summary>
/// (ID of the Account)
/// The account (if any) for which the funds of the invoice payment are intended. If set,
/// the invoice will be presented with the branding and support information of the specified
/// account. See the <a href="https://stripe.com/docs/billing/invoices/connect">Invoices
/// with Connect</a> documentation for details.
/// </summary>
[JsonIgnore]
public string OnBehalfOfId
{
get => this.InternalOnBehalfOf?.Id;
set => this.InternalOnBehalfOf = SetExpandableFieldId(value, this.InternalOnBehalfOf);
}

/// <summary>
/// (Expanded)
/// The account (if any) for which the funds of the invoice payment are intended. If set,
/// the invoice will be presented with the branding and support information of the specified
/// account. See the <a href="https://stripe.com/docs/billing/invoices/connect">Invoices
/// with Connect</a> documentation for details.
///
/// For more information, see the <a href="https://stripe.com/docs/expand">expand documentation</a>.
/// </summary>
[JsonIgnore]
public Account OnBehalfOf
{
get => this.InternalOnBehalfOf?.ExpandedObject;
set => this.InternalOnBehalfOf = SetExpandableFieldObject(value, this.InternalOnBehalfOf);
}

[JsonProperty("on_behalf_of")]
[JsonConverter(typeof(ExpandableFieldConverter<Account>))]
internal ExpandableField<Account> InternalOnBehalfOf { get; set; }
#endregion

/// <summary>
/// Whether payment was successfully collected for this invoice. An invoice can be paid
/// (most commonly) with a charge or with credit from the customer's account balance.
Expand Down
10 changes: 5 additions & 5 deletions src/Stripe.net/Entities/PaymentMethods/PaymentMethodIdeal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ public class PaymentMethodIdeal : StripeEntity<PaymentMethodIdeal>
/// <summary>
/// The customer's bank, if provided. Can be one of <c>abn_amro</c>, <c>asn_bank</c>,
/// <c>bunq</c>, <c>handelsbanken</c>, <c>ing</c>, <c>knab</c>, <c>moneyou</c>,
/// <c>rabobank</c>, <c>regiobank</c>, <c>sns_bank</c>, <c>triodos_bank</c>, or
/// <c>van_lanschot</c>.
/// <c>rabobank</c>, <c>regiobank</c>, <c>revolut</c>, <c>sns_bank</c>, <c>triodos_bank</c>,
/// or <c>van_lanschot</c>.
/// One of: <c>abn_amro</c>, <c>asn_bank</c>, <c>bunq</c>, <c>handelsbanken</c>, <c>ing</c>,
/// <c>knab</c>, <c>moneyou</c>, <c>rabobank</c>, <c>regiobank</c>, <c>sns_bank</c>,
/// <c>triodos_bank</c>, or <c>van_lanschot</c>.
/// <c>knab</c>, <c>moneyou</c>, <c>rabobank</c>, <c>regiobank</c>, <c>revolut</c>,
/// <c>sns_bank</c>, <c>triodos_bank</c>, or <c>van_lanschot</c>.
/// </summary>
[JsonProperty("bank")]
public string Bank { get; set; }
Expand All @@ -21,7 +21,7 @@ public class PaymentMethodIdeal : StripeEntity<PaymentMethodIdeal>
/// The Bank Identifier Code of the customer's bank, if the bank was provided.
/// One of: <c>ABNANL2A</c>, <c>ASNBNL21</c>, <c>BUNQNL2A</c>, <c>FVLBNL22</c>,
/// <c>HANDNL2A</c>, <c>INGBNL2A</c>, <c>KNABNL2H</c>, <c>MOYONL21</c>, <c>RABONL2U</c>,
/// <c>RBRBNL21</c>, <c>SNSBNL2A</c>, or <c>TRIONL2U</c>.
/// <c>RBRBNL21</c>, <c>REVOLT21</c>, <c>SNSBNL2A</c>, or <c>TRIONL2U</c>.
/// </summary>
[JsonProperty("bic")]
public string Bic { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ public class SetupAttemptPaymentMethodDetailsIdeal : StripeEntity<SetupAttemptPa
/// <summary>
/// The customer's bank. Can be one of <c>abn_amro</c>, <c>asn_bank</c>, <c>bunq</c>,
/// <c>handelsbanken</c>, <c>ing</c>, <c>knab</c>, <c>moneyou</c>, <c>rabobank</c>,
/// <c>regiobank</c>, <c>sns_bank</c>, <c>triodos_bank</c>, or <c>van_lanschot</c>.
/// <c>regiobank</c>, <c>revolut</c>, <c>sns_bank</c>, <c>triodos_bank</c>, or
/// <c>van_lanschot</c>.
/// One of: <c>abn_amro</c>, <c>asn_bank</c>, <c>bunq</c>, <c>handelsbanken</c>, <c>ing</c>,
/// <c>knab</c>, <c>moneyou</c>, <c>rabobank</c>, <c>regiobank</c>, <c>sns_bank</c>,
/// <c>triodos_bank</c>, or <c>van_lanschot</c>.
/// <c>knab</c>, <c>moneyou</c>, <c>rabobank</c>, <c>regiobank</c>, <c>revolut</c>,
/// <c>sns_bank</c>, <c>triodos_bank</c>, or <c>van_lanschot</c>.
/// </summary>
[JsonProperty("bank")]
public string Bank { get; set; }
Expand All @@ -21,7 +22,7 @@ public class SetupAttemptPaymentMethodDetailsIdeal : StripeEntity<SetupAttemptPa
/// The Bank Identifier Code of the customer's bank.
/// One of: <c>ABNANL2A</c>, <c>ASNBNL21</c>, <c>BUNQNL2A</c>, <c>FVLBNL22</c>,
/// <c>HANDNL2A</c>, <c>INGBNL2A</c>, <c>KNABNL2H</c>, <c>MOYONL21</c>, <c>RABONL2U</c>,
/// <c>RBRBNL21</c>, <c>SNSBNL2A</c>, or <c>TRIONL2U</c>.
/// <c>RBRBNL21</c>, <c>REVOLT21</c>, <c>SNSBNL2A</c>, or <c>TRIONL2U</c>.
/// </summary>
[JsonProperty("bic")]
public string Bic { get; set; }
Expand Down
9 changes: 9 additions & 0 deletions src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }

/// <summary>
/// The account (if any) for which the funds of the invoice payment are intended. If set,
/// the invoice will be presented with the branding and support information of the specified
/// account. See the <a href="https://stripe.com/docs/billing/invoices/connect">Invoices
/// with Connect</a> documentation for details.
/// </summary>
[JsonProperty("on_behalf_of")]
public string OnBehalfOf { get; set; }

/// <summary>
/// Configuration settings for the PaymentIntent that is generated when the invoice is
/// finalized.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class InvoiceFinalizeOptions : BaseOptions
{
/// <summary>
/// Controls whether Stripe will perform <a
/// href="https://stripe.com/docs/billing/invoices/workflow/#auto_advance">automatic
/// href="https://stripe.com/docs/billing/invoices/overview#auto-advance">automatic
/// collection</a> of the invoice. When <c>false</c>, the invoice's state will not
/// automatically advance without an explicit action.
/// </summary>
Expand Down
9 changes: 9 additions & 0 deletions src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ public class InvoiceUpdateOptions : BaseOptions, IHasMetadata
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }

/// <summary>
/// The account (if any) for which the funds of the invoice payment are intended. If set,
/// the invoice will be presented with the branding and support information of the specified
/// account. See the <a href="https://stripe.com/docs/billing/invoices/connect">Invoices
/// with Connect</a> documentation for details.
/// </summary>
[JsonProperty("on_behalf_of")]
public string OnBehalfOf { get; set; }

/// <summary>
/// Configuration settings for the PaymentIntent that is generated when the invoice is
/// finalized.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public class PaymentIntentPaymentMethodDataIdealOptions : INestedOptions
/// <summary>
/// The customer's bank.
/// One of: <c>abn_amro</c>, <c>asn_bank</c>, <c>bunq</c>, <c>handelsbanken</c>, <c>ing</c>,
/// <c>knab</c>, <c>moneyou</c>, <c>rabobank</c>, <c>regiobank</c>, <c>sns_bank</c>,
/// <c>triodos_bank</c>, or <c>van_lanschot</c>.
/// <c>knab</c>, <c>moneyou</c>, <c>rabobank</c>, <c>regiobank</c>, <c>revolut</c>,
/// <c>sns_bank</c>, <c>triodos_bank</c>, or <c>van_lanschot</c>.
/// </summary>
[JsonProperty("bank")]
public string Bank { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public class PaymentMethodIdealOptions : INestedOptions
/// <summary>
/// The customer's bank.
/// One of: <c>abn_amro</c>, <c>asn_bank</c>, <c>bunq</c>, <c>handelsbanken</c>, <c>ing</c>,
/// <c>knab</c>, <c>moneyou</c>, <c>rabobank</c>, <c>regiobank</c>, <c>sns_bank</c>,
/// <c>triodos_bank</c>, or <c>van_lanschot</c>.
/// <c>knab</c>, <c>moneyou</c>, <c>rabobank</c>, <c>regiobank</c>, <c>revolut</c>,
/// <c>sns_bank</c>, <c>triodos_bank</c>, or <c>van_lanschot</c>.
/// </summary>
[JsonProperty("bank")]
public string Bank { get; set; }
Expand Down