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

Open
wants to merge 7 commits into
base: beta
Choose a base branch
from
Open
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 @@
v1370
v1381
6 changes: 4 additions & 2 deletions src/Stripe.net/Constants/EventTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,14 @@ public static class EventTypes
public const string ChargePending = "charge.pending";

/// <summary>
/// Occurs whenever a refund is updated, on selected payment methods.
/// Occurs whenever a refund is updated on selected payment methods. For updates on all
/// refunds, listen to <c>refund.updated</c> instead.
/// </summary>
public const string ChargeRefundUpdated = "charge.refund.updated";

/// <summary>
/// Occurs whenever a charge is refunded, including partial refunds.
/// Occurs whenever a charge is refunded, including partial refunds. Listen to
/// <c>refund.created</c> for information about the refund.
/// </summary>
public const string ChargeRefunded = "charge.refunded";

Expand Down
7 changes: 7 additions & 0 deletions src/Stripe.net/Entities/Accounts/AccountCapabilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ public class AccountCapabilities : StripeEntity<AccountCapabilities>
[JsonProperty("au_becs_debit_payments")]
public string AuBecsDebitPayments { get; set; }

/// <summary>
/// The status of the automatic_indirect_tax capability of the account.
/// One of: <c>active</c>, <c>inactive</c>, or <c>pending</c>.
/// </summary>
[JsonProperty("automatic_indirect_tax")]
public string AutomaticIndirectTax { get; set; }

/// <summary>
/// The status of the Bacs Direct Debits payments capability of the account, or whether the
/// account can directly process Bacs Direct Debits charges.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public Customer Customer
#endregion

/// <summary>
/// The time when the billing credits become effectivewhen they're eligible for use.
/// The time when the billing credits become effective-when they're eligible for use.
/// </summary>
[JsonProperty("effective_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Stripe.Billing
public class CreditGrantApplicabilityConfigScope : StripeEntity<CreditGrantApplicabilityConfigScope>
{
/// <summary>
/// The price type for which credit grants can apply. We currently only support the
/// The price type that credit grants can apply to. We currently only support the
/// <c>metered</c> price type. This refers to prices that have a <a
/// href="https://docs.stripe.com/api/billing/meter">Billing Meter</a> attached to them.
/// </summary>
Expand Down
8 changes: 4 additions & 4 deletions src/Stripe.net/Entities/Billing/MeterEvents/MeterEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ namespace Stripe.Billing
using Stripe.Infrastructure;

/// <summary>
/// A billing meter event represents a customer's usage of a product. Meter events are used
/// to bill a customer based on their usage. Meter events are associated with billing
/// meters, which define the shape of the event's payload and how those events are
/// aggregated for billing.
/// Meter events represent actions that customers take in your system. You can use meter
/// events to bill a customer based on their usage. Meter events are associated with billing
/// meters, which define both the contents of the events payload and how to aggregate those
/// events.
/// </summary>
public class MeterEvent : StripeEntity<MeterEvent>, IHasObject
{
Expand Down
7 changes: 3 additions & 4 deletions src/Stripe.net/Entities/Billing/Meters/Meter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ namespace Stripe.Billing
using Stripe.Infrastructure;

/// <summary>
/// A billing meter is a resource that allows you to track usage of a particular event. For
/// example, you might create a billing meter to track the number of API calls made by a
/// particular user. You can then attach the billing meter to a price and attach the price
/// to a subscription to charge the user for the number of API calls they make.
/// Meters specify how to aggregate meter events over a billing period. Meter events
/// represent the actions that customers take in your system. Meters attach to prices and
/// form the basis of the bill.
///
/// Related guide: <a href="https://docs.stripe.com/billing/subscriptions/usage-based">Usage
/// based billing</a>.
Expand Down
8 changes: 8 additions & 0 deletions src/Stripe.net/Entities/Invoices/InvoiceAutomaticTax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ namespace Stripe

public class InvoiceAutomaticTax : StripeEntity<InvoiceAutomaticTax>
{
/// <summary>
/// If Stripe disabled automatic tax, this enum describes why.
/// One of: <c>finalization_requires_location_inputs</c>, or
/// <c>finalization_system_error</c>.
/// </summary>
[JsonProperty("disabled_reason")]
public string DisabledReason { get; set; }

/// <summary>
/// Whether Stripe automatically computes tax on this invoice. Note that incompatible
/// invoice items (invoice items with manually specified <a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ namespace Stripe

public class QuotePreviewInvoiceAutomaticTax : StripeEntity<QuotePreviewInvoiceAutomaticTax>
{
/// <summary>
/// If Stripe disabled automatic tax, this enum describes why.
/// One of: <c>finalization_requires_location_inputs</c>, or
/// <c>finalization_system_error</c>.
/// </summary>
[JsonProperty("disabled_reason")]
public string DisabledReason { get; set; }

/// <summary>
/// Whether Stripe automatically computes tax on this invoice. Note that incompatible
/// invoice items (invoice items with manually specified <a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ namespace Stripe

public class QuotePreviewSubscriptionScheduleDefaultSettingsAutomaticTax : StripeEntity<QuotePreviewSubscriptionScheduleDefaultSettingsAutomaticTax>
{
/// <summary>
/// If Stripe disabled automatic tax, this enum describes why.
/// </summary>
[JsonProperty("disabled_reason")]
public string DisabledReason { get; set; }

/// <summary>
/// Whether Stripe automatically computes tax on invoices created during this phase.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ namespace Stripe

public class QuotePreviewSubscriptionSchedulePhaseAutomaticTax : StripeEntity<QuotePreviewSubscriptionSchedulePhaseAutomaticTax>
{
/// <summary>
/// If Stripe disabled automatic tax, this enum describes why.
/// </summary>
[JsonProperty("disabled_reason")]
public string DisabledReason { get; set; }

/// <summary>
/// Whether Stripe automatically computes tax on invoices created during this phase.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ namespace Stripe

public class SubscriptionScheduleDefaultSettingsAutomaticTax : StripeEntity<SubscriptionScheduleDefaultSettingsAutomaticTax>
{
/// <summary>
/// If Stripe disabled automatic tax, this enum describes why.
/// </summary>
[JsonProperty("disabled_reason")]
public string DisabledReason { get; set; }

/// <summary>
/// Whether Stripe automatically computes tax on invoices created during this phase.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ namespace Stripe

public class SubscriptionSchedulePhaseAutomaticTax : StripeEntity<SubscriptionSchedulePhaseAutomaticTax>
{
/// <summary>
/// If Stripe disabled automatic tax, this enum describes why.
/// </summary>
[JsonProperty("disabled_reason")]
public string DisabledReason { get; set; }

/// <summary>
/// Whether Stripe automatically computes tax on invoices created during this phase.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ namespace Stripe

public class SubscriptionAutomaticTax : StripeEntity<SubscriptionAutomaticTax>
{
/// <summary>
/// If Stripe disabled automatic tax, this enum describes why.
/// </summary>
[JsonProperty("disabled_reason")]
public string DisabledReason { get; set; }

/// <summary>
/// Whether Stripe automatically computes tax on this subscription.
/// </summary>
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 AccountCapabilitiesAutomaticIndirectTaxOptions : INestedOptions
{
/// <summary>
/// Passing true requests the capability for the account, if it is not already requested. A
/// requested capability may not immediately become active. Any requirements to activate the
/// capability are returned in the <c>requirements</c> arrays.
/// </summary>
[JsonProperty("requested")]
public bool? Requested { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ public class AccountCapabilitiesOptions : INestedOptions
[JsonProperty("au_becs_debit_payments")]
public AccountCapabilitiesAuBecsDebitPaymentsOptions AuBecsDebitPayments { get; set; }

/// <summary>
/// The automatic_indirect_tax capability.
/// </summary>
[JsonProperty("automatic_indirect_tax")]
public AccountCapabilitiesAutomaticIndirectTaxOptions AutomaticIndirectTax { get; set; }

/// <summary>
/// The bacs_debit_payments capability.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Stripe.Billing
public class CreditBalanceSummaryFilterApplicabilityScopeOptions : INestedOptions
{
/// <summary>
/// The price type for which credit grants can apply. We currently only support the
/// The price type that credit grants can apply to. We currently only support the
/// <c>metered</c> price type.
/// </summary>
[JsonProperty("price_type")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ public CreditBalanceSummaryService(IStripeClient client)
}

/// <summary>
/// <p>Retrieves the credit balance summary for a customer</p>.
/// <p>Retrieves the credit balance summary for a customer.</p>.
/// </summary>
public virtual CreditBalanceSummary Get(RequestOptions requestOptions = null)
{
return this.Request<CreditBalanceSummary>(BaseAddress.Api, HttpMethod.Get, $"/v1/billing/credit_balance_summary", null, requestOptions);
}

/// <summary>
/// <p>Retrieves the credit balance summary for a customer</p>.
/// <p>Retrieves the credit balance summary for a customer.</p>.
/// </summary>
public virtual Task<CreditBalanceSummary> GetAsync(RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
{
return this.RequestAsync<CreditBalanceSummary>(BaseAddress.Api, HttpMethod.Get, $"/v1/billing/credit_balance_summary", null, requestOptions, cancellationToken);
}

/// <summary>
/// <p>Retrieves the credit balance summary for a customer</p>.
/// <p>Retrieves the credit balance summary for a customer.</p>.
/// </summary>
public virtual CreditBalanceSummary Get(CreditBalanceSummaryGetOptions options, RequestOptions requestOptions = null)
{
return this.Request<CreditBalanceSummary>(BaseAddress.Api, HttpMethod.Get, $"/v1/billing/credit_balance_summary", options, requestOptions);
}

/// <summary>
/// <p>Retrieves the credit balance summary for a customer</p>.
/// <p>Retrieves the credit balance summary for a customer.</p>.
/// </summary>
public virtual Task<CreditBalanceSummary> GetAsync(CreditBalanceSummaryGetOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,47 +27,47 @@ public CreditBalanceTransactionService(IStripeClient client)
}

/// <summary>
/// <p>Retrieves a credit balance transaction</p>.
/// <p>Retrieves a credit balance transaction.</p>.
/// </summary>
public virtual CreditBalanceTransaction Get(string id, CreditBalanceTransactionGetOptions options = null, RequestOptions requestOptions = null)
{
return this.Request<CreditBalanceTransaction>(BaseAddress.Api, HttpMethod.Get, $"/v1/billing/credit_balance_transactions/{WebUtility.UrlEncode(id)}", options, requestOptions);
}

/// <summary>
/// <p>Retrieves a credit balance transaction</p>.
/// <p>Retrieves a credit balance transaction.</p>.
/// </summary>
public virtual Task<CreditBalanceTransaction> GetAsync(string id, CreditBalanceTransactionGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
{
return this.RequestAsync<CreditBalanceTransaction>(BaseAddress.Api, HttpMethod.Get, $"/v1/billing/credit_balance_transactions/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken);
}

/// <summary>
/// <p>Retrieve a list of credit balance transactions</p>.
/// <p>Retrieve a list of credit balance transactions.</p>.
/// </summary>
public virtual StripeList<CreditBalanceTransaction> List(CreditBalanceTransactionListOptions options = null, RequestOptions requestOptions = null)
{
return this.Request<StripeList<CreditBalanceTransaction>>(BaseAddress.Api, HttpMethod.Get, $"/v1/billing/credit_balance_transactions", options, requestOptions);
}

/// <summary>
/// <p>Retrieve a list of credit balance transactions</p>.
/// <p>Retrieve a list of credit balance transactions.</p>.
/// </summary>
public virtual Task<StripeList<CreditBalanceTransaction>> ListAsync(CreditBalanceTransactionListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
{
return this.RequestAsync<StripeList<CreditBalanceTransaction>>(BaseAddress.Api, HttpMethod.Get, $"/v1/billing/credit_balance_transactions", options, requestOptions, cancellationToken);
}

/// <summary>
/// <p>Retrieve a list of credit balance transactions</p>.
/// <p>Retrieve a list of credit balance transactions.</p>.
/// </summary>
public virtual IEnumerable<CreditBalanceTransaction> ListAutoPaging(CreditBalanceTransactionListOptions options = null, RequestOptions requestOptions = null)
{
return this.ListRequestAutoPaging<CreditBalanceTransaction>($"/v1/billing/credit_balance_transactions", options, requestOptions);
}

/// <summary>
/// <p>Retrieve a list of credit balance transactions</p>.
/// <p>Retrieve a list of credit balance transactions.</p>.
/// </summary>
public virtual IAsyncEnumerable<CreditBalanceTransaction> ListAutoPagingAsync(CreditBalanceTransactionListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Stripe.Billing
public class CreditGrantApplicabilityConfigScopeOptions : INestedOptions
{
/// <summary>
/// The price type for which credit grants can apply. We currently only support the
/// The price type that credit grants can apply to. We currently only support the
/// <c>metered</c> price type.
/// </summary>
[JsonProperty("price_type")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ public class CreditGrantCreateOptions : BaseOptions, IHasMetadata
public string Customer { get; set; }

/// <summary>
/// The time when the billing credits become effectivewhen they're eligible for use.
/// Defaults to the current timestamp if not specified.
/// The time when the billing credits become effective-when they're eligible for use. It
/// defaults to the current timestamp if not specified.
/// </summary>
[JsonProperty("effective_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime? EffectiveAt { get; set; }

/// <summary>
/// The time when the billing credits will expire. If not specified, the billing credits
/// don't expire.
/// The time when the billing credits expire. If not specified, the billing credits don't
/// expire.
/// </summary>
[JsonProperty("expires_at")]
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime? ExpiresAt { get; set; }

/// <summary>
/// Set of key-value pairs that you can attach to an object. This can be useful for storing
/// Set of key-value pairs that you can attach to an object. You can use this to store
/// additional information about the object (for example, cost basis) in a structured
/// format.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ public CreditGrantService(IStripeClient client)
}

/// <summary>
/// <p>Creates a credit grant</p>.
/// <p>Creates a credit grant.</p>.
/// </summary>
public virtual CreditGrant Create(CreditGrantCreateOptions options, RequestOptions requestOptions = null)
{
return this.Request<CreditGrant>(BaseAddress.Api, HttpMethod.Post, $"/v1/billing/credit_grants", options, requestOptions);
}

/// <summary>
/// <p>Creates a credit grant</p>.
/// <p>Creates a credit grant.</p>.
/// </summary>
public virtual Task<CreditGrant> CreateAsync(CreditGrantCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
{
Expand All @@ -61,15 +61,15 @@ public virtual Task<CreditGrant> ExpireAsync(string id, CreditGrantExpireOptions
}

/// <summary>
/// <p>Retrieves a credit grant</p>.
/// <p>Retrieves a credit grant.</p>.
/// </summary>
public virtual CreditGrant Get(string id, CreditGrantGetOptions options = null, RequestOptions requestOptions = null)
{
return this.Request<CreditGrant>(BaseAddress.Api, HttpMethod.Get, $"/v1/billing/credit_grants/{WebUtility.UrlEncode(id)}", options, requestOptions);
}

/// <summary>
/// <p>Retrieves a credit grant</p>.
/// <p>Retrieves a credit grant.</p>.
/// </summary>
public virtual Task<CreditGrant> GetAsync(string id, CreditGrantGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
{
Expand Down Expand Up @@ -109,15 +109,15 @@ public virtual IAsyncEnumerable<CreditGrant> ListAutoPagingAsync(CreditGrantList
}

/// <summary>
/// <p>Updates a credit grant</p>.
/// <p>Updates a credit grant.</p>.
/// </summary>
public virtual CreditGrant Update(string id, CreditGrantUpdateOptions options, RequestOptions requestOptions = null)
{
return this.Request<CreditGrant>(BaseAddress.Api, HttpMethod.Post, $"/v1/billing/credit_grants/{WebUtility.UrlEncode(id)}", options, requestOptions);
}

/// <summary>
/// <p>Updates a credit grant</p>.
/// <p>Updates a credit grant.</p>.
/// </summary>
public virtual Task<CreditGrant> UpdateAsync(string id, CreditGrantUpdateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
{
Expand Down
Loading
Loading