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

Merged
merged 5 commits into from
Jul 5, 2024
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 @@
v1103
v1116
4 changes: 3 additions & 1 deletion src/Stripe.net/Constants/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ public static class Events
public const string CustomerSourceDeleted = "customer.source.deleted";

/// <summary>
/// Occurs whenever a card or source will expire at the end of the month.
/// Occurs whenever a card or source will expire at the end of the month. This event only
/// works with legacy integrations using Card or Source objects. If you use the
/// PaymentMethod API, this event won't occur.
/// </summary>
public const string CustomerSourceExpiring = "customer.source.expiring";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class MeterEventSummary : StripeEntity<MeterEventSummary>, IHasId, IHasOb
public decimal AggregatedValue { get; set; }

/// <summary>
/// End timestamp for this event summary (inclusive).
/// End timestamp for this event summary (exclusive). Must be aligned with minute
/// boundaries.
/// </summary>
[JsonProperty("end_time")]
[JsonConverter(typeof(UnixDateTimeConverter))]
Expand All @@ -53,7 +54,8 @@ public class MeterEventSummary : StripeEntity<MeterEventSummary>, IHasId, IHasOb
public string Meter { get; set; }

/// <summary>
/// Start timestamp for this event summary (inclusive).
/// Start timestamp for this event summary (inclusive). Must be aligned with minute
/// boundaries.
/// </summary>
[JsonProperty("start_time")]
[JsonConverter(typeof(UnixDateTimeConverter))]
Expand Down
14 changes: 7 additions & 7 deletions src/Stripe.net/Entities/CustomerSessions/CustomerSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ namespace Stripe
using Stripe.Infrastructure;

/// <summary>
/// A customer session allows you to grant client access to Stripe's frontend SDKs (like
/// StripeJs) control over a customer.
/// A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js)
/// client-side access control over a Customer.
/// </summary>
public class CustomerSession : StripeEntity<CustomerSession>, IHasObject
{
Expand All @@ -18,7 +18,7 @@ public class CustomerSession : StripeEntity<CustomerSession>, IHasObject
public string Object { get; set; }

/// <summary>
/// The client secret of this customer session. Used on the client to set up secure access
/// The client secret of this Customer Session. Used on the client to set up secure access
/// to the given <c>customer</c>.
///
/// The client secret can be used to provide access to <c>customer</c> from your frontend.
Expand All @@ -29,7 +29,7 @@ public class CustomerSession : StripeEntity<CustomerSession>, IHasObject
public string ClientSecret { get; set; }

/// <summary>
/// Configuration for the components supported by this customer session.
/// Configuration for the components supported by this Customer Session.
/// </summary>
[JsonProperty("components")]
public CustomerSessionComponents Components { get; set; }
Expand All @@ -45,7 +45,7 @@ public class CustomerSession : StripeEntity<CustomerSession>, IHasObject

/// <summary>
/// (ID of the Customer)
/// The customer the customer session was created for.
/// The Customer the Customer Session was created for.
/// </summary>
[JsonIgnore]
public string CustomerId
Expand All @@ -56,7 +56,7 @@ public string CustomerId

/// <summary>
/// (Expanded)
/// The customer the customer session was created for.
/// The Customer the Customer Session was created for.
///
/// For more information, see the <a href="https://stripe.com/docs/expand">expand documentation</a>.
/// </summary>
Expand All @@ -73,7 +73,7 @@ public Customer Customer
#endregion

/// <summary>
/// The timestamp at which this customer session will expire.
/// The timestamp at which this Customer Session will expire.
/// </summary>
[JsonProperty("expires_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
Expand Down
4 changes: 3 additions & 1 deletion src/Stripe.net/Entities/Customers/Customer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ public IPaymentSource DefaultSource
public string Name { get; set; }

/// <summary>
/// The suffix of the customer's next invoice number (for example, 0001).
/// The suffix of the customer's next invoice number (for example, 0001). When the account
/// uses account level sequencing, this parameter is ignored in API requests and the field
/// omitted in API responses.
/// </summary>
[JsonProperty("next_invoice_sequence")]
public long NextInvoiceSequence { get; set; }
Expand Down
7 changes: 7 additions & 0 deletions src/Stripe.net/Entities/Tax/Transactions/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ public class Transaction : StripeEntity<Transaction>, IHasId, IHasMetadata, IHas
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }

/// <summary>
/// The Unix timestamp representing when the tax liability is assumed or reduced.
/// </summary>
[JsonProperty("posted_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime PostedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;

/// <summary>
/// A custom unique identifier, such as 'myOrder_123'.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ public class MeterEventSummaryListOptions : ListOptions
public string Customer { get; set; }

/// <summary>
/// The timestamp from when to stop aggregating meter events (exclusive).
/// The timestamp from when to stop aggregating meter events (exclusive). Must be aligned
/// with minute boundaries.
/// </summary>
[JsonProperty("end_time")]
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime? EndTime { get; set; }

/// <summary>
/// The timestamp from when to start aggregating meter events (inclusive).
/// The timestamp from when to start aggregating meter events (inclusive). Must be aligned
/// with minute boundaries.
/// </summary>
[JsonProperty("start_time")]
[JsonConverter(typeof(UnixDateTimeConverter))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class CustomerSessionCreateOptions : BaseOptions
public CustomerSessionComponentsOptions Components { get; set; }

/// <summary>
/// The ID of an existing customer for which to create the customer session.
/// The ID of an existing customer for which to create the Customer Session.
/// </summary>
[JsonProperty("customer")]
public string Customer { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public CustomerSessionService(IStripeClient client)
public override string BasePath => "/v1/customer_sessions";

/// <summary>
/// <p>Creates a customer session object that includes a single-use client secret that you
/// <p>Creates a Customer Session object that includes a single-use client secret that you
/// can use on your front-end to grant client-side API access for certain customer
/// resources.</p>.
/// </summary>
Expand All @@ -32,7 +32,7 @@ public virtual CustomerSession Create(CustomerSessionCreateOptions options, Requ
}

/// <summary>
/// <p>Creates a customer session object that includes a single-use client secret that you
/// <p>Creates a Customer Session object that includes a single-use client secret that you
/// can use on your front-end to grant client-side API access for certain customer
/// resources.</p>.
/// </summary>
Expand Down
24 changes: 24 additions & 0 deletions src/Stripe.net/Services/Invoices/InvoiceAddLinesOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class InvoiceAddLinesOptions : BaseOptions
{
/// <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("invoice_metadata")]
public Dictionary<string, string> InvoiceMetadata { get; set; }

/// <summary>
/// The line items to add.
/// </summary>
[JsonProperty("lines")]
public List<InvoiceLineOptions> Lines { get; set; }
}
}
26 changes: 26 additions & 0 deletions src/Stripe.net/Services/Invoices/InvoiceLineDiscountOptions.cs
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 InvoiceLineDiscountOptions : 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>
/// ID of the promotion code to create a new discount for.
/// </summary>
[JsonProperty("promotion_code")]
public string PromotionCode { get; set; }
}
}
126 changes: 126 additions & 0 deletions src/Stripe.net/Services/Invoices/InvoiceLineOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class InvoiceLineOptions : INestedOptions, IHasMetadata, IHasId
{
/// <summary>
/// The integer amount in cents (or local equivalent) of the charge to be applied to the
/// upcoming invoice. If you want to apply a credit to the customer's account, pass a
/// negative amount.
/// </summary>
[JsonProperty("amount")]
public long? Amount { get; set; }

/// <summary>
/// Either <c>delete</c> or <c>unassign</c>. Deleted line items are permanently deleted.
/// Unassigned line items can be reassigned to an invoice.
/// One of: <c>delete</c>, or <c>unassign</c>.
/// </summary>
[JsonProperty("behavior")]
public string Behavior { get; set; }

/// <summary>
/// An arbitrary string which you can attach to the invoice item. The description is
/// displayed in the invoice for easy tracking.
/// </summary>
[JsonProperty("description")]
public string Description { get; set; }

/// <summary>
/// Controls whether discounts apply to this line item. Defaults to false for prorations or
/// negative line items, and true for all other line items. Cannot be set to true for
/// prorations.
/// </summary>
[JsonProperty("discountable")]
public bool? Discountable { get; set; }

/// <summary>
/// The coupons, promotion codes &amp; existing discounts which apply to the line item. Item
/// discounts are applied before invoice discounts. Pass an empty string to remove
/// previously-defined discounts.
/// </summary>
[JsonProperty("discounts")]
public List<InvoiceLineDiscountOptions> Discounts { get; set; }

/// <summary>
/// ID of an existing line item to remove from this invoice.
/// </summary>
[JsonProperty("id")]
public string Id { get; set; }

/// <summary>
/// ID of an unassigned invoice item to assign to this invoice. If not provided, a new item
/// will be created.
/// </summary>
[JsonProperty("invoice_item")]
public string InvoiceItem { 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>. For <a
/// href="https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type">type=subscription</a>
/// line items, the incoming metadata specified on the request is directly used to set this
/// value, in contrast to <a
/// href="api/invoices/line_item#invoice_line_item_object-type">type=invoiceitem</a> line
/// items, where any existing metadata on the invoice line is merged with the incoming data.
/// </summary>
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }

/// <summary>
/// The period associated with this invoice item. When set to different values, the period
/// will be rendered on the invoice. If you have <a
/// href="https://stripe.com/docs/revenue-recognition">Stripe Revenue Recognition</a>
/// enabled, the period will be used to recognize and defer revenue. See the <a
/// href="https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue
/// Recognition documentation</a> for details.
/// </summary>
[JsonProperty("period")]
public InvoiceLinePeriodOptions Period { get; set; }

/// <summary>
/// The ID of the price object. One of <c>price</c> or <c>price_data</c> is required.
/// </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. One of <c>price</c> or <c>price_data</c> is required.
/// </summary>
[JsonProperty("price_data")]
public InvoiceLinePriceDataOptions PriceData { get; set; }

/// <summary>
/// Non-negative integer. The quantity of units for the line item.
/// </summary>
[JsonProperty("quantity")]
public long? Quantity { get; set; }

/// <summary>
/// A list of up to 10 tax amounts for this line item. This can be useful if you calculate
/// taxes on your own or use a third-party to calculate them. You cannot set tax amounts if
/// any line item has <a
/// href="https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates">tax_rates</a>
/// or if the invoice has <a
/// href="https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates">default_tax_rates</a>
/// or uses <a href="https://stripe.com/docs/tax/invoicing">automatic tax</a>. Pass an empty
/// string to remove previously defined tax amounts.
/// </summary>
[JsonProperty("tax_amounts")]
public List<InvoiceLineTaxAmountOptions> TaxAmounts { get; set; }

/// <summary>
/// The tax rates which apply to the line item. When set, the <c>default_tax_rates</c> on
/// the invoice do not apply to this line item. Pass an empty string to remove
/// previously-defined tax rates.
/// </summary>
[JsonProperty("tax_rates")]
public List<string> TaxRates { get; set; }
}
}
25 changes: 25 additions & 0 deletions src/Stripe.net/Services/Invoices/InvoiceLinePeriodOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;

public class InvoiceLinePeriodOptions : INestedOptions
{
/// <summary>
/// The end of the period, which must be greater than or equal to the start. This value is
/// inclusive.
/// </summary>
[JsonProperty("end")]
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime? End { get; set; }

/// <summary>
/// The start of the period. This value is inclusive.
/// </summary>
[JsonProperty("start")]
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime? Start { get; set; }
}
}
Loading
Loading