Skip to content

Commit

Permalink
Update generated code (#2778)
Browse files Browse the repository at this point in the history
* Update generated code for v584

* Update generated code for v585

* Update generated code for v587

* Update generated code for v588

* Update generated code for v589

* Update generated code for v592

* Update generated code for v595

* Update generated code for v596

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Oct 11, 2023
1 parent 86de61e commit 06c20fe
Show file tree
Hide file tree
Showing 22 changed files with 135 additions and 42 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v582
v596
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ public class BalanceTransaction : StripeEntity<BalanceTransaction>, IHasId, IHas
public long Net { get; set; }

/// <summary>
/// Learn more about how [reporting categories]
/// (https://stripe.com/docs/reports/reporting-categories) can help you understand balance
/// transactions from an accounting perspective.
/// Learn more about how <a
/// href="https://stripe.com/docs/reports/reporting-categories">reporting categories</a> can
/// help you understand balance transactions from an accounting perspective.
/// </summary>
[JsonProperty("reporting_category")]
public string ReportingCategory { get; set; }
Expand Down
31 changes: 31 additions & 0 deletions src/Stripe.net/Entities/Checkout/Sessions/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ public class Session : StripeEntity<Session>, IHasId, IHasMetadata, IHasObject
[JsonProperty("client_reference_id")]
public string ClientReferenceId { get; set; }

/// <summary>
/// Client secret to be used when initializing Stripe.js embedded checkout.
/// </summary>
[JsonProperty("client_secret")]
public string ClientSecret { get; set; }

/// <summary>
/// Results of <c>consent_collection</c> for this session.
/// </summary>
Expand Down Expand Up @@ -386,6 +392,24 @@ public PaymentLink PaymentLink
[JsonProperty("recovered_from")]
public string RecoveredFrom { get; set; }

/// <summary>
/// Applies to Checkout Sessions with <c>ui_mode: embedded</c>. By default, Stripe will
/// always redirect to your return_url after a successful confirmation. If you set
/// <c>redirect_on_completion: 'if_required'</c>, then we will only redirect if your user
/// chooses a redirect-based payment method.
/// One of: <c>always</c>, <c>if_required</c>, or <c>never</c>.
/// </summary>
[JsonProperty("redirect_on_completion")]
public string RedirectOnCompletion { get; set; }

/// <summary>
/// Applies to Checkout Sessions with <c>ui_mode: embedded</c>. The URL to redirect your
/// customer back to after they authenticate or cancel their payment on the payment method's
/// app or site.
/// </summary>
[JsonProperty("return_url")]
public string ReturnUrl { get; set; }

#region Expandable SetupIntent

/// <summary>
Expand Down Expand Up @@ -508,6 +532,13 @@ public Subscription Subscription
[JsonProperty("total_details")]
public SessionTotalDetails TotalDetails { get; set; }

/// <summary>
/// The UI mode of the Session. Can be <c>hosted</c> (default) or <c>embedded</c>.
/// One of: <c>embedded</c>, or <c>hosted</c>.
/// </summary>
[JsonProperty("ui_mode")]
public string UiMode { get; set; }

/// <summary>
/// The URL to the Checkout Session. Redirect customers to this URL to take them to
/// Checkout. If you’re using <a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ namespace Stripe.Checkout

public class SessionCustomField : StripeEntity<SessionCustomField>
{
/// <summary>
/// Configuration for <c>type=dropdown</c> fields.
/// </summary>
[JsonProperty("dropdown")]
public SessionCustomFieldDropdown Dropdown { get; set; }

Expand All @@ -21,9 +18,6 @@ public class SessionCustomField : StripeEntity<SessionCustomField>
[JsonProperty("label")]
public SessionCustomFieldLabel Label { get; set; }

/// <summary>
/// Configuration for <c>type=numeric</c> fields.
/// </summary>
[JsonProperty("numeric")]
public SessionCustomFieldNumeric Numeric { get; set; }

Expand All @@ -34,9 +28,6 @@ public class SessionCustomField : StripeEntity<SessionCustomField>
[JsonProperty("optional")]
public bool Optional { get; set; }

/// <summary>
/// Configuration for <c>type=text</c> fields.
/// </summary>
[JsonProperty("text")]
public SessionCustomFieldText Text { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,12 @@ public class AuthorizationVerificationData : StripeEntity<AuthorizationVerificat
/// </summary>
[JsonProperty("expiry_check")]
public string ExpiryCheck { get; set; }

/// <summary>
/// The postal code submitted as part of the authorization used for postal code
/// verification.
/// </summary>
[JsonProperty("postal_code")]
public string PostalCode { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ namespace Stripe

public class PaymentLinkCustomField : StripeEntity<PaymentLinkCustomField>
{
/// <summary>
/// Configuration for <c>type=dropdown</c> fields.
/// </summary>
[JsonProperty("dropdown")]
public PaymentLinkCustomFieldDropdown Dropdown { get; set; }

Expand All @@ -21,9 +18,6 @@ public class PaymentLinkCustomField : StripeEntity<PaymentLinkCustomField>
[JsonProperty("label")]
public PaymentLinkCustomFieldLabel Label { get; set; }

/// <summary>
/// Configuration for <c>type=numeric</c> fields.
/// </summary>
[JsonProperty("numeric")]
public PaymentLinkCustomFieldNumeric Numeric { get; set; }

Expand All @@ -34,9 +28,6 @@ public class PaymentLinkCustomField : StripeEntity<PaymentLinkCustomField>
[JsonProperty("optional")]
public bool Optional { get; set; }

/// <summary>
/// Configuration for <c>type=text</c> fields.
/// </summary>
[JsonProperty("text")]
public PaymentLinkCustomFieldText Text { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public class PaymentLinkPaymentIntentData : StripeEntity<PaymentLinkPaymentInten

/// <summary>
/// Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will set
/// metadata on [Payment Intents] (/docs/api/payment_intents) generated from this payment
/// link.
/// metadata on <a href="https://stripe.com/docs/api/payment_intents">Payment Intents</a>
/// generated from this payment link.
/// </summary>
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public class PaymentLinkSubscriptionData : StripeEntity<PaymentLinkSubscriptionD

/// <summary>
/// Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will set
/// metadata on [Subscriptions] (/docs/api/subscriptions) generated from this payment link.
/// metadata on <a href="https://stripe.com/docs/api/subscriptions">Subscriptions</a>
/// generated from this payment link.
/// </summary>
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public class Configuration : StripeEntity<Configuration>, IHasId, IHasObject
[JsonProperty("livemode")]
public bool Livemode { get; set; }

[JsonProperty("offline")]
public ConfigurationOffline Offline { get; set; }

[JsonProperty("tipping")]
public ConfigurationTipping Tipping { get; set; }

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

public class ConfigurationOffline : StripeEntity<ConfigurationOffline>
{
/// <summary>
/// Determines whether to allow transactions to be collected while reader is offline.
/// Defaults to false.
/// </summary>
[JsonProperty("enabled")]
public bool? Enabled { get; set; }
}
}
25 changes: 25 additions & 0 deletions src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,24 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("phone_number_collection")]
public SessionPhoneNumberCollectionOptions PhoneNumberCollection { get; set; }

/// <summary>
/// This parameter applies to <c>ui_mode: embedded</c>. By default, Stripe will always
/// redirect to your return_url after a successful confirmation. If you set
/// <c>redirect_on_completion: 'if_required'</c>, then we will only redirect if your user
/// chooses a redirect-based payment method.
/// One of: <c>always</c>, <c>if_required</c>, or <c>never</c>.
/// </summary>
[JsonProperty("redirect_on_completion")]
public string RedirectOnCompletion { get; set; }

/// <summary>
/// The URL to redirect your customer back to after they authenticate or cancel their
/// payment on the payment method's app or site. This parameter is required if ui_mode is
/// <c>embedded</c> and redirect-based payment methods are enabled on the session.
/// </summary>
[JsonProperty("return_url")]
public string ReturnUrl { get; set; }

/// <summary>
/// A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in
/// <c>setup</c> mode.
Expand Down Expand Up @@ -322,5 +340,12 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata
/// </summary>
[JsonProperty("tax_id_collection")]
public SessionTaxIdCollectionOptions TaxIdCollection { get; set; }

/// <summary>
/// <c>ui_mode</c> can be <c>hosted</c> or <c>embedded</c>. The default is <c>hosted</c>.
/// One of: <c>embedded</c>, or <c>hosted</c>.
/// </summary>
[JsonProperty("ui_mode")]
public string UiMode { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ namespace Stripe
public class InvoiceRenderingPdfOptions : INestedOptions
{
/// <summary>
/// Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size
/// will be switched to a4 or letter based on customer locale.
/// Page size for invoice PDF. Can be set to <c>a4</c>, <c>letter</c>, or <c>auto</c>. If
/// set to <c>auto</c>, invoice PDF page size defaults to <c>a4</c> for customers with
/// Japanese locale and <c>letter</c> for customers with other locales.
/// One of: <c>a4</c>, <c>auto</c>, or <c>letter</c>.
/// </summary>
[JsonProperty("page_size")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ public class PaymentLinkPaymentIntentDataOptions : INestedOptions, IHasMetadata

/// <summary>
/// Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
/// declaratively set metadata on [Payment Intents] (/docs/api/payment_intents) generated
/// from this payment link. Unlike object-level metadata, this field is declarative. Updates
/// will clear prior values.
/// declaratively set metadata on <a
/// href="https://stripe.com/docs/api/payment_intents">Payment Intents</a> generated from
/// this payment link. Unlike object-level metadata, this field is declarative. Updates will
/// clear prior values.
/// </summary>
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ public class PaymentLinkSubscriptionDataOptions : INestedOptions, IHasMetadata

/// <summary>
/// Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will
/// declaratively set metadata on [Subscriptions] (/docs/api/subscriptions) generated from
/// this payment link. Unlike object-level metadata, this field is declarative. Updates will
/// declaratively set metadata on <a
/// href="https://stripe.com/docs/api/subscriptions">Subscriptions</a> generated from this
/// payment link. Unlike object-level metadata, this field is declarative. Updates will
/// clear prior values.
/// </summary>
[JsonProperty("metadata")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions

/// <summary>
/// JCB is a credit card company based in Japan. JCB is currently available in Japan to
/// businesses approved by JCB, and available to all businesses in the US, Canada,
/// Australia, New Zealand, UK, and Ireland. Check this <a
/// businesses approved by JCB, and available to all businesses in Australia, Canada, Hong
/// Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all
/// countries in the European Economic Area except Iceland. Check this <a
/// href="https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments">page</a>
/// for more details.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions

/// <summary>
/// JCB is a credit card company based in Japan. JCB is currently available in Japan to
/// businesses approved by JCB, and available to all businesses in the US, Canada,
/// Australia, New Zealand, UK, and Ireland. Check this <a
/// businesses approved by JCB, and available to all businesses in Australia, Canada, Hong
/// Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all
/// countries in the European Economic Area except Iceland. Check this <a
/// href="https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments">page</a>
/// for more details.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Stripe
public class SetupIntentCancelOptions : BaseOptions
{
/// <summary>
/// Reason for canceling this SetupIntent. Possible values are <c>abandoned</c>,
/// Reason for canceling this SetupIntent. Possible values are: <c>abandoned</c>,
/// <c>requested_by_customer</c>, or <c>duplicate</c>.
/// One of: <c>abandoned</c>, <c>duplicate</c>, or <c>requested_by_customer</c>.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ public class SetupIntentConfirmOptions : BaseOptions
[JsonProperty("client_secret")]
public string ClientSecret { get; set; }

/// <summary>
/// This hash contains details about the Mandate to create.
/// </summary>
[JsonProperty("mandate_data")]
public SetupIntentMandateDataOptions MandateData { get; set; }

Expand All @@ -30,7 +27,7 @@ public class SetupIntentConfirmOptions : BaseOptions
public SetupIntentPaymentMethodDataOptions PaymentMethodData { get; set; }

/// <summary>
/// Payment-method-specific configuration for this SetupIntent.
/// Payment method-specific configuration for this SetupIntent.
/// </summary>
[JsonProperty("payment_method_options")]
public SetupIntentPaymentMethodOptionsOptions PaymentMethodOptions { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class SetupIntentListOptions : ListOptionsWithCreated
public string Customer { get; set; }

/// <summary>
/// Only return SetupIntents associated with the specified payment method.
/// Only return SetupIntents that associate with the specified payment method.
/// </summary>
[JsonProperty("payment_method")]
public string PaymentMethod { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ public class ConfigurationCreateOptions : BaseOptions
[JsonProperty("bbpos_wisepos_e")]
public ConfigurationBbposWiseposEOptions BbposWiseposE { get; set; }

/// <summary>
/// Configurations for collecting transactions offline.
/// </summary>
[JsonProperty("offline")]
public ConfigurationOfflineOptions Offline { get; set; }

/// <summary>
/// Tipping configurations for readers supporting on-reader tips.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// File generated from our OpenAPI spec
namespace Stripe.Terminal
{
using Newtonsoft.Json;

public class ConfigurationOfflineOptions : INestedOptions
{
/// <summary>
/// Determines whether to allow transactions to be collected while reader is offline.
/// Defaults to false.
/// </summary>
[JsonProperty("enabled")]
public bool? Enabled { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ public class ConfigurationUpdateOptions : BaseOptions
[JsonProperty("bbpos_wisepos_e")]
public ConfigurationBbposWiseposEOptions BbposWiseposE { get; set; }

/// <summary>
/// Configurations for collecting transactions offline.
/// </summary>
[JsonProperty("offline")]
public ConfigurationOfflineOptions Offline { get; set; }

/// <summary>
/// Tipping configurations for readers supporting on-reader tips.
/// </summary>
Expand Down

0 comments on commit 06c20fe

Please sign in to comment.