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 #2498

Merged
merged 1 commit into from
Jun 1, 2022
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
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v149
v150
8 changes: 8 additions & 0 deletions src/Stripe.net/Entities/Charges/Charge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,14 @@ public PaymentIntent PaymentIntent
[JsonProperty("payment_method_details")]
public ChargePaymentMethodDetails PaymentMethodDetails { get; set; }

/// <summary>
/// Options to configure Radar. See <a
/// href="https://stripe.com/docs/radar/radar-session">Radar Session</a> for more
/// information.
/// </summary>
[JsonProperty("radar_options")]
public ChargeRadarOptions RadarOptions { get; set; }

/// <summary>
/// This is the email address that the receipt for this charge was sent to.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public class ChargePaymentMethodDetailsKlarna : StripeEntity<ChargePaymentMethod
/// <c>de-DE</c>, <c>en-DE</c>, <c>da-DK</c>, <c>en-DK</c>, <c>es-ES</c>, <c>en-ES</c>,
/// <c>fi-FI</c>, <c>sv-FI</c>, <c>en-FI</c>, <c>en-GB</c>, <c>en-IE</c>, <c>it-IT</c>,
/// <c>en-IT</c>, <c>nl-NL</c>, <c>en-NL</c>, <c>nb-NO</c>, <c>en-NO</c>, <c>sv-SE</c>,
/// <c>en-SE</c>, <c>en-US</c>, <c>es-US</c>, <c>fr-FR</c>, or <c>en-FR</c>.
/// <c>en-SE</c>, <c>en-US</c>, <c>es-US</c>, <c>fr-FR</c>, <c>en-FR</c>, <c>en-AU</c>, or
/// <c>en-NZ</c>.
/// </summary>
[JsonProperty("preferred_locale")]
public string PreferredLocale { get; set; }
Expand Down
16 changes: 16 additions & 0 deletions src/Stripe.net/Entities/Charges/ChargeRadarOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class ChargeRadarOptions : StripeEntity<ChargeRadarOptions>
{
/// <summary>
/// A <a href="https://stripe.com/docs/radar/radar-session">Radar Session</a> is a snapshot
/// of the browser metadata and device details that help Radar make more accurate
/// predictions on your payments.
/// </summary>
[JsonProperty("session")]
public string Session { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,50 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class FundingInstructionsBankTransferFinancialAddressZengin : StripeEntity<FundingInstructionsBankTransferFinancialAddressZengin>
{
/// <summary>
/// The account holder name.
/// </summary>
[JsonProperty("account_holder_name")]
public string AccountHolderName { get; set; }

/// <summary>
/// The account number.
/// </summary>
[JsonProperty("account_number")]
public string AccountNumber { get; set; }

/// <summary>
/// The bank account type. In Japan, this can only be <c>futsu</c> or <c>toza</c>.
/// </summary>
[JsonProperty("account_type")]
public string AccountType { get; set; }

/// <summary>
/// The bank code of the account.
/// </summary>
[JsonProperty("bank_code")]
public string BankCode { get; set; }

/// <summary>
/// The bank name of the account.
/// </summary>
[JsonProperty("bank_name")]
public string BankName { get; set; }

/// <summary>
/// The branch code of the account.
/// </summary>
[JsonProperty("branch_code")]
public string BranchCode { get; set; }

/// <summary>
/// The branch name of the account.
/// </summary>
[JsonProperty("branch_name")]
public string BranchName { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ public class InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransf
{
/// <summary>
/// The bank transfer type that can be used for funding. Permitted values include:
/// <c>us_bank_account</c>, <c>eu_bank_account</c>, <c>id_bank_account</c>,
/// <c>gb_bank_account</c>, <c>jp_bank_account</c>, <c>mx_bank_account</c>,
/// <c>eu_bank_transfer</c>, <c>gb_bank_transfer</c>, <c>id_bank_transfer</c>,
/// <c>jp_bank_transfer</c>, <c>mx_bank_transfer</c>, or <c>us_bank_transfer</c>.
/// <c>jp_bank_transfer</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,50 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin : StripeEntity<PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin>
{
/// <summary>
/// The account holder name.
/// </summary>
[JsonProperty("account_holder_name")]
public string AccountHolderName { get; set; }

/// <summary>
/// The account number.
/// </summary>
[JsonProperty("account_number")]
public string AccountNumber { get; set; }

/// <summary>
/// The bank account type. In Japan, this can only be <c>futsu</c> or <c>toza</c>.
/// </summary>
[JsonProperty("account_type")]
public string AccountType { get; set; }

/// <summary>
/// The bank code of the account.
/// </summary>
[JsonProperty("bank_code")]
public string BankCode { get; set; }

/// <summary>
/// The bank name of the account.
/// </summary>
[JsonProperty("bank_name")]
public string BankName { get; set; }

/// <summary>
/// The branch code of the account.
/// </summary>
[JsonProperty("branch_code")]
public string BranchCode { get; set; }

/// <summary>
/// The branch name of the account.
/// </summary>
[JsonProperty("branch_name")]
public string BranchName { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,8 @@ public class PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer : Stri
public List<string> RequestedAddressTypes { get; set; }

/// <summary>
/// The bank transfer type that this PaymentIntent is allowed to use for funding. Permitted
/// values include: <c>us_bank_account</c>, <c>eu_bank_account</c>, <c>id_bank_account</c>,
/// <c>gb_bank_account</c>, <c>jp_bank_account</c>, <c>mx_bank_account</c>,
/// <c>eu_bank_transfer</c>, <c>gb_bank_transfer</c>, <c>id_bank_transfer</c>,
/// <c>jp_bank_transfer</c>, <c>mx_bank_transfer</c>, or <c>us_bank_transfer</c>.
/// One of: <c>eu_bank_account</c>, <c>eu_bank_transfer</c>, <c>gb_bank_account</c>,
/// <c>gb_bank_transfer</c>, <c>id_bank_account</c>, <c>id_bank_transfer</c>,
/// <c>jp_bank_account</c>, <c>jp_bank_transfer</c>, <c>mx_bank_account</c>,
/// <c>mx_bank_transfer</c>, <c>us_bank_account</c>, or <c>us_bank_transfer</c>.
/// The bank transfer type that this PaymentIntent is allowed to use for funding Permitted
/// values include: <c>jp_bank_transfer</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
Expand Down
8 changes: 8 additions & 0 deletions src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ public Customer Customer
[JsonProperty("paynow")]
public PaymentMethodPaynow Paynow { get; set; }

/// <summary>
/// Options to configure Radar. See <a
/// href="https://stripe.com/docs/radar/radar-session">Radar Session</a> for more
/// information.
/// </summary>
[JsonProperty("radar_options")]
public PaymentMethodRadarOptions RadarOptions { get; set; }

[JsonProperty("sepa_debit")]
public PaymentMethodSepaDebit SepaDebit { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentMethodRadarOptions : StripeEntity<PaymentMethodRadarOptions>
{
/// <summary>
/// A <a href="https://stripe.com/docs/radar/radar-session">Radar Session</a> is a snapshot
/// of the browser metadata and device details that help Radar make more accurate
/// predictions on your payments.
/// </summary>
[JsonProperty("session")]
public string Session { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ public class SetupIntentPaymentMethodOptionsCard : StripeEntity<SetupIntentPayme
[JsonProperty("mandate_options")]
public SetupIntentPaymentMethodOptionsCardMandateOptions MandateOptions { get; set; }

/// <summary>
/// Selected network to process this SetupIntent on. Depends on the available networks of
/// the card attached to the setup intent. Can be only set confirm-time.
/// One of: <c>amex</c>, <c>cartes_bancaires</c>, <c>diners</c>, <c>discover</c>,
/// <c>interac</c>, <c>jcb</c>, <c>mastercard</c>, <c>unionpay</c>, <c>unknown</c>, or
/// <c>visa</c>.
/// </summary>
[JsonProperty("network")]
public string Network { get; set; }

/// <summary>
/// We strongly recommend that you rely on our SCA Engine to automatically prompt your
/// customers for authentication based on risk level and <a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ public class SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankT
{
/// <summary>
/// The bank transfer type that can be used for funding. Permitted values include:
/// <c>us_bank_account</c>, <c>eu_bank_account</c>, <c>id_bank_account</c>,
/// <c>gb_bank_account</c>, <c>jp_bank_account</c>, <c>mx_bank_account</c>,
/// <c>eu_bank_transfer</c>, <c>gb_bank_transfer</c>, <c>id_bank_transfer</c>,
/// <c>jp_bank_transfer</c>, <c>mx_bank_transfer</c>, or <c>us_bank_transfer</c>.
/// <c>jp_bank_transfer</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Entities/Terminal/Readers/Reader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public class Reader : StripeEntity<Reader>, IHasId, IHasMetadata, IHasObject

/// <summary>
/// Type of reader, one of <c>bbpos_wisepad3</c>, <c>stripe_m2</c>, <c>bbpos_chipper2x</c>,
/// <c>bbpos_wisepos_e</c>, or <c>verifone_P400</c>.
/// <c>bbpos_wisepos_e</c>, <c>verifone_P400</c>, or <c>simulated_wisepos_e</c>.
/// One of: <c>bbpos_chipper2x</c>, <c>bbpos_wisepad3</c>, <c>bbpos_wisepos_e</c>,
/// <c>stripe_m2</c>, or <c>verifone_P400</c>.
/// <c>simulated_wisepos_e</c>, <c>stripe_m2</c>, or <c>verifone_P400</c>.
/// </summary>
[JsonProperty("device_type")]
public string DeviceType { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace Stripe
public class ApplicationFeeRefundCreateOptions : BaseOptions, IHasMetadata
{
/// <summary>
/// A positive integer, in <em>%s</em>, representing how much of this fee to refund. Can
/// refund only up to the remaining unrefunded amount of the fee.
/// A positive integer, in <em>cents (or local equivalent)</em>, representing how much of
/// this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.
/// </summary>
[JsonProperty("amount")]
public long? Amount { get; set; }
Expand Down
16 changes: 12 additions & 4 deletions src/Stripe.net/Services/Charges/ChargeCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata
public long? Amount { get; set; }

/// <summary>
/// A fee in %s that will be applied to the charge and transferred to the application
/// owner's Stripe account. The request must be made with an OAuth key or the
/// <c>Stripe-Account</c> header in order to take an application fee. For more information,
/// see the application fees <a
/// A fee in cents (or local equivalent) that will be applied to the charge and transferred
/// to the application owner's Stripe account. The request must be made with an OAuth key or
/// the <c>Stripe-Account</c> header in order to take an application fee. For more
/// information, see the application fees <a
/// href="https://stripe.com/docs/connect/direct-charges#collecting-fees">documentation</a>.
/// </summary>
[JsonProperty("application_fee_amount")]
Expand Down Expand Up @@ -90,6 +90,14 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("on_behalf_of")]
public string OnBehalfOf { get; set; }

/// <summary>
/// Options to configure Radar. See <a
/// href="https://stripe.com/docs/radar/radar-session">Radar Session</a> for more
/// information.
/// </summary>
[JsonProperty("radar_options")]
public ChargeRadarOptionsOptions RadarOptions { get; set; }

/// <summary>
/// The email address to which this charge's <a
/// href="https://stripe.com/docs/dashboard/receipts">receipt</a> will be sent. The receipt
Expand Down
16 changes: 16 additions & 0 deletions src/Stripe.net/Services/Charges/ChargeRadarOptionsOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class ChargeRadarOptionsOptions : INestedOptions
{
/// <summary>
/// A <a href="https://stripe.com/docs/radar/radar-session">Radar Session</a> is a snapshot
/// of the browser metadata and device details that help Radar make more accurate
/// predictions on your payments.
/// </summary>
[JsonProperty("session")]
public string Session { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,16 @@ public class SessionLineItemPriceDataOptions : INestedOptions
public string TaxBehavior { get; set; }

/// <summary>
/// A non-negative integer in %s representing how much to charge. One of <c>unit_amount</c>
/// or <c>unit_amount_decimal</c> is required.
/// A non-negative integer in cents (or local equivalent) representing how much to charge.
/// One of <c>unit_amount</c> or <c>unit_amount_decimal</c> is required.
/// </summary>
[JsonProperty("unit_amount")]
public long? UnitAmount { get; set; }

/// <summary>
/// Same as <c>unit_amount</c>, but accepts a decimal value in %s with at most 12 decimal
/// places. Only one of <c>unit_amount</c> and <c>unit_amount_decimal</c> can be set.
/// Same as <c>unit_amount</c>, but accepts a decimal value in cents (or local equivalent)
/// with at most 12 decimal places. Only one of <c>unit_amount</c> and
/// <c>unit_amount_decimal</c> can be set.
/// </summary>
[JsonProperty("unit_amount_decimal")]
public decimal? UnitAmountDecimal { get; set; }
Expand Down
14 changes: 8 additions & 6 deletions src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ namespace Stripe
public class CreditNoteCreateOptions : BaseOptions, IHasMetadata
{
/// <summary>
/// The integer amount in %s representing the total amount of the credit note.
/// The integer amount in cents (or local equivalent) representing the total amount of the
/// credit note.
/// </summary>
[JsonProperty("amount")]
public long? Amount { get; set; }

/// <summary>
/// The integer amount in %s representing the amount to credit the customer's balance, which
/// will be automatically applied to their next invoice.
/// The integer amount in cents (or local equivalent) representing the amount to credit the
/// customer's balance, which will be automatically applied to their next invoice.
/// </summary>
[JsonProperty("credit_amount")]
public long? CreditAmount { get; set; }
Expand Down Expand Up @@ -47,7 +48,8 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata
public Dictionary<string, string> Metadata { get; set; }

/// <summary>
/// The integer amount in %s representing the amount that is credited outside of Stripe.
/// The integer amount in cents (or local equivalent) representing the amount that is
/// credited outside of Stripe.
/// </summary>
[JsonProperty("out_of_band_amount")]
public long? OutOfBandAmount { get; set; }
Expand All @@ -68,8 +70,8 @@ public class CreditNoteCreateOptions : BaseOptions, IHasMetadata
public string Refund { get; set; }

/// <summary>
/// The integer amount in %s representing the amount to refund. If set, a refund will be
/// created for the charge associated with the invoice.
/// The integer amount in cents (or local equivalent) representing the amount to refund. If
/// set, a refund will be created for the charge associated with the invoice.
/// </summary>
[JsonProperty("refund_amount")]
public long? RefundAmount { get; set; }
Expand Down
11 changes: 6 additions & 5 deletions src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ public class CreditNoteLineOptions : INestedOptions
public string Type { get; set; }

/// <summary>
/// The integer unit amount in %s of the credit note line item. This <c>unit_amount</c> will
/// be multiplied by the quantity to get the full amount to credit for this line item. Only
/// valid when <c>type</c> is <c>custom_line_item</c>.
/// The integer unit amount in cents (or local equivalent) of the credit note line item.
/// This <c>unit_amount</c> will be multiplied by the quantity to get the full amount to
/// credit for this line item. Only valid when <c>type</c> is <c>custom_line_item</c>.
/// </summary>
[JsonProperty("unit_amount")]
public long? UnitAmount { get; set; }

/// <summary>
/// Same as <c>unit_amount</c>, but accepts a decimal value in %s with at most 12 decimal
/// places. Only one of <c>unit_amount</c> and <c>unit_amount_decimal</c> can be set.
/// Same as <c>unit_amount</c>, but accepts a decimal value in cents (or local equivalent)
/// with at most 12 decimal places. Only one of <c>unit_amount</c> and
/// <c>unit_amount_decimal</c> can be set.
/// </summary>
[JsonProperty("unit_amount_decimal")]
public decimal? UnitAmountDecimal { get; set; }
Expand Down
Loading