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

Update generated code for beta #2810

Merged
merged 8 commits into from
Dec 15, 2023
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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 43.7.0 - 2023-12-14
* [#2813](https://github.com/stripe/stripe-dotnet/pull/2813) Update generated code
* Add support for `PaymentMethodReuseAgreement` on `CheckoutSessionConsentCollectionOptions`, `CheckoutSessionConsentCollection`, `PaymentLinkConsentCollectionOptions`, and `PaymentLinkConsentCollection`
* Add support for `AfterSubmit` on `CheckoutSessionCustomTextOptions`, `CheckoutSessionCustomText`, `PaymentLinkCustomTextOptions`, and `PaymentLinkCustomText`
* Add support for `Created` on `Radar.EarlyFraudWarningListOptions`
* [#2804](https://github.com/stripe/stripe-dotnet/pull/2804) Support passing in options to singleton retrieve methods
* Add support for passing request parameters to `Get` on `Balance` and `Tax.Settings`.
* [#2809](https://github.com/stripe/stripe-dotnet/pull/2809) Add backcompat check

## 43.7.0-beta.1 - 2023-12-08
* [#2806](https://github.com/stripe/stripe-dotnet/pull/2806) Update generated code for beta
* Add support for `Get` method on resource `FinancialConnections.Transaction`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v708
v716
2 changes: 1 addition & 1 deletion src/Stripe.net/Constants/ApiVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ namespace Stripe
internal class ApiVersion
{
public const string Current = "2023-10-16";
public const string CurrentPreview = "2023-10-26.preview-v2";
public const string CurrentPreview = "2023-12-11.preview-v2";
}
}
2 changes: 2 additions & 0 deletions src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ public Application Application
public string ClientSecret { get; set; }

/// <summary>
/// Describes whether we can confirm this PaymentIntent automatically, or if it requires
/// customer action to confirm the payment.
/// One of: <c>automatic</c>, or <c>manual</c>.
/// </summary>
[JsonProperty("confirmation_method")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ public class AccountSessionComponentsPayoutsOptions : INestedOptions
[JsonProperty("enabled")]
public bool? Enabled { get; set; }

/// <summary>
/// The list of features enabled in the embedded component.
/// </summary>
[JsonProperty("features")]
public AccountSessionComponentsPayoutsFeaturesOptions Features { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// File generated from our OpenAPI spec
namespace Stripe.Capital
{
public class FinancingSummaryGetOptions : BaseOptions
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,15 @@ public virtual Task<FinancingSummary> GetAsync(RequestOptions requestOptions = n
{
return this.RequestAsync<FinancingSummary>(HttpMethod.Get, $"/v1/capital/financing_summary", null, requestOptions, cancellationToken);
}

public virtual FinancingSummary Get(FinancingSummaryGetOptions options, RequestOptions requestOptions = null)
{
return this.Request<FinancingSummary>(HttpMethod.Get, $"/v1/capital/financing_summary", options, requestOptions);
}

public virtual Task<FinancingSummary> GetAsync(FinancingSummaryGetOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
{
return this.RequestAsync<FinancingSummary>(HttpMethod.Get, $"/v1/capital/financing_summary", options, requestOptions, cancellationToken);
}
}
}
30 changes: 30 additions & 0 deletions src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@ public class InvoiceScheduleDetailsOptions : INestedOptions
[JsonProperty("amendments")]
public List<InvoiceScheduleDetailsAmendmentOptions> Amendments { get; set; }

/// <summary>
/// Configures when the subscription schedule generates prorations for phase transitions.
/// Possible values are <c>prorate_on_next_phase</c> or <c>prorate_up_front</c> with the
/// default being <c>prorate_on_next_phase</c>. <c>prorate_on_next_phase</c> will apply
/// phase changes and generate prorations at transition time.<c>prorate_up_front</c> will
/// bill for all phases within the current billing cycle up front.
/// One of: <c>prorate_on_next_phase</c>, or <c>prorate_up_front</c>.
/// </summary>
[JsonProperty("billing_behavior")]
public string BillingBehavior { get; set; }

/// <summary>
/// Behavior of the subscription schedule and underlying subscription when it ends. Possible
/// values are <c>release</c> or <c>cancel</c> with the default being <c>release</c>.
/// <c>release</c> will end the subscription schedule and keep the underlying subscription
/// running.<c>cancel</c> will end the subscription schedule and cancel the underlying
/// subscription.
/// One of: <c>cancel</c>, or <c>release</c>.
/// </summary>
[JsonProperty("end_behavior")]
public string EndBehavior { get; set; }

/// <summary>
/// List representing phases of the subscription schedule. Each phase can be customized to
/// have different durations, plans, and coupons. If there are multiple phases, the
Expand All @@ -25,5 +47,13 @@ public class InvoiceScheduleDetailsOptions : INestedOptions
/// </summary>
[JsonProperty("prebilling")]
public List<InvoiceScheduleDetailsPrebillingOptions> Prebilling { get; set; }

/// <summary>
/// In cases where the <c>schedule_details</c> params update the currently active phase,
/// specifies if and how to prorate at the time of the request.
/// One of: <c>always_invoice</c>, <c>create_prorations</c>, or <c>none</c>.
/// </summary>
[JsonProperty("proration_behavior")]
public string ProrationBehavior { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// File generated from our OpenAPI spec
namespace Stripe
{
public class InvoiceSubscriptionDetailsBillingCycleAnchor : StringEnum
{
public static readonly InvoiceSubscriptionDetailsBillingCycleAnchor Now = new InvoiceSubscriptionDetailsBillingCycleAnchor("now");
public static readonly InvoiceSubscriptionDetailsBillingCycleAnchor Unchanged = new InvoiceSubscriptionDetailsBillingCycleAnchor("unchanged");

private InvoiceSubscriptionDetailsBillingCycleAnchor(string value)
: base(value)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class InvoiceSubscriptionDetailsItemBillingThresholdsOptions : INestedOptions
{
/// <summary>
/// Number of units that meets the billing threshold to advance the subscription to a new
/// billing period (e.g., it takes 10 $5 units to meet a $50 <a
/// href="https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary
/// threshold</a>).
/// </summary>
[JsonProperty("usage_gte")]
public long? UsageGte { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class InvoiceSubscriptionDetailsItemDiscountDiscountEndDurationOptions : INestedOptions
{
/// <summary>
/// Specifies a type of interval unit. Either <c>day</c>, <c>week</c>, <c>month</c> or
/// <c>year</c>.
/// One of: <c>day</c>, <c>month</c>, <c>week</c>, or <c>year</c>.
/// </summary>
[JsonProperty("interval")]
public string Interval { get; set; }

/// <summary>
/// The number of intervals, as an whole number greater than 0. Stripe multiplies this by
/// the interval type to get the overall duration.
/// </summary>
[JsonProperty("interval_count")]
public long? IntervalCount { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;

public class InvoiceSubscriptionDetailsItemDiscountDiscountEndOptions : INestedOptions
{
/// <summary>
/// Time span for the redeemed discount.
/// </summary>
[JsonProperty("duration")]
public InvoiceSubscriptionDetailsItemDiscountDiscountEndDurationOptions Duration { get; set; }

/// <summary>
/// A precise Unix timestamp for the discount to end. Must be in the future.
/// </summary>
[JsonProperty("timestamp")]
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime? Timestamp { get; set; }

/// <summary>
/// The type of calculation made to determine when the discount ends.
/// One of: <c>duration</c>, or <c>timestamp</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class InvoiceSubscriptionDetailsItemDiscountOptions : INestedOptions
{
/// <summary>
/// ID of the coupon to create a new discount for.
/// </summary>
[JsonProperty("coupon")]
public string Coupon { get; set; }

/// <summary>
/// ID of an existing discount on the object (or one of its ancestors) to reuse.
/// </summary>
[JsonProperty("discount")]
public string Discount { get; set; }

/// <summary>
/// Details to determine how long the discount should be applied for.
/// </summary>
[JsonProperty("discount_end")]
public InvoiceSubscriptionDetailsItemDiscountDiscountEndOptions DiscountEnd { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class InvoiceSubscriptionDetailsItemOptions : INestedOptions, IHasId, IHasMetadata
{
/// <summary>
/// Define thresholds at which an invoice will be sent, and the subscription advanced to a
/// new billing period. When updating, pass an empty string to remove previously-defined
/// thresholds.
/// </summary>
[JsonProperty("billing_thresholds")]
public InvoiceSubscriptionDetailsItemBillingThresholdsOptions BillingThresholds { get; set; }

/// <summary>
/// Delete all usage for a given subscription item. Allowed only when <c>deleted</c> is set
/// to <c>true</c> and the current plan's <c>usage_type</c> is <c>metered</c>.
/// </summary>
[JsonProperty("clear_usage")]
public bool? ClearUsage { get; set; }

/// <summary>
/// A flag that, if set to <c>true</c>, will delete the specified item.
/// </summary>
[JsonProperty("deleted")]
public bool? Deleted { get; set; }

/// <summary>
/// The coupons to redeem into discounts for the subscription item.
/// </summary>
[JsonProperty("discounts")]
public List<InvoiceSubscriptionDetailsItemDiscountOptions> Discounts { get; set; }

/// <summary>
/// Subscription item to update.
/// </summary>
[JsonProperty("id")]
public string Id { 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
/// object in a structured format. Individual keys can be unset by posting an empty value to
/// them. All keys can be unset by posting an empty value to <c>metadata</c>.
/// </summary>
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }

/// <summary>
/// Plan ID for this item, as a string.
/// </summary>
[JsonProperty("plan")]
public string Plan { get; set; }

/// <summary>
/// The ID of the price object. When changing a subscription item's price, <c>quantity</c>
/// is set to 1 unless a <c>quantity</c> parameter is provided.
/// </summary>
[JsonProperty("price")]
public string Price { get; set; }

/// <summary>
/// Data used to generate a new <a href="https://stripe.com/docs/api/prices">Price</a>
/// object inline.
/// </summary>
[JsonProperty("price_data")]
public InvoiceSubscriptionDetailsItemPriceDataOptions PriceData { get; set; }

/// <summary>
/// Quantity for this item.
/// </summary>
[JsonProperty("quantity")]
public long? Quantity { get; set; }

/// <summary>
/// A list of <a href="https://stripe.com/docs/api/tax_rates">Tax Rate</a> ids. These Tax
/// Rates will override the <a
/// href="https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates"><c>default_tax_rates</c></a>
/// on the Subscription. When updating, pass an empty string to remove previously-defined
/// tax rates.
/// </summary>
[JsonProperty("tax_rates")]
public List<string> TaxRates { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class InvoiceSubscriptionDetailsItemPriceDataOptions : INestedOptions
{
/// <summary>
/// Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
/// code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
/// currency</a>.
/// </summary>
[JsonProperty("currency")]
public string Currency { get; set; }

/// <summary>
/// The ID of the product that this price will belong to.
/// </summary>
[JsonProperty("product")]
public string Product { get; set; }

/// <summary>
/// The recurring components of a price such as <c>interval</c> and <c>interval_count</c>.
/// </summary>
[JsonProperty("recurring")]
public InvoiceSubscriptionDetailsItemPriceDataRecurringOptions Recurring { get; set; }

/// <summary>
/// Only required if a <a
/// href="https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default
/// tax behavior</a> was not provided in the Stripe Tax settings. Specifies whether the
/// price is considered inclusive of taxes or exclusive of taxes. One of <c>inclusive</c>,
/// <c>exclusive</c>, or <c>unspecified</c>. Once specified as either <c>inclusive</c> or
/// <c>exclusive</c>, it cannot be changed.
/// One of: <c>exclusive</c>, <c>inclusive</c>, or <c>unspecified</c>.
/// </summary>
[JsonProperty("tax_behavior")]
public string TaxBehavior { get; set; }

/// <summary>
/// A positive integer in cents (or local equivalent) (or 0 for a free price) representing
/// how much to charge.
/// </summary>
[JsonProperty("unit_amount")]
public long? UnitAmount { get; set; }

/// <summary>
/// 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; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class InvoiceSubscriptionDetailsItemPriceDataRecurringOptions : INestedOptions
{
/// <summary>
/// Specifies billing frequency. Either <c>day</c>, <c>week</c>, <c>month</c> or
/// <c>year</c>.
/// One of: <c>day</c>, <c>month</c>, <c>week</c>, or <c>year</c>.
/// </summary>
[JsonProperty("interval")]
public string Interval { get; set; }

/// <summary>
/// The number of intervals between subscription billings. For example,
/// <c>interval=month</c> and <c>interval_count=3</c> bills every 3 months. Maximum of one
/// year interval allowed (1 year, 12 months, or 52 weeks).
/// </summary>
[JsonProperty("interval_count")]
public long? IntervalCount { get; set; }
}
}
Loading
Loading