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

Merged
merged 4 commits into from
Dec 18, 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 @@
v1347
v1412
2 changes: 1 addition & 1 deletion src/Stripe.net/Constants/ApiVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ namespace Stripe
{
internal class ApiVersion
{
public const string Current = "2024-11-20.acacia";
public const string Current = "2024-12-18.acacia";
}
}
6 changes: 4 additions & 2 deletions src/Stripe.net/Constants/EventTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,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
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ namespace Stripe
public class AccountSessionComponentsAccountManagementFeatures : StripeEntity<AccountSessionComponentsAccountManagementFeatures>
{
/// <summary>
/// Disables Stripe user authentication for this embedded component. This feature can only
/// be false for accounts where you’re responsible for collecting updated information when
/// requirements are due or change, like custom accounts. The default value for this feature
/// is <c>false</c> when <c>external_account_collection</c> is enabled and <c>true</c>
/// otherwise.
/// Disables Stripe user authentication for this embedded component. This value can only be
/// true for accounts where <c>controller.requirement_collection</c> is <c>application</c>.
/// The default value is the opposite of the <c>external_account_collection</c> value. For
/// example, if you don’t set <c>external_account_collection</c>, it defaults to true and
/// <c>disable_stripe_user_authentication</c> defaults to false.
/// </summary>
[JsonProperty("disable_stripe_user_authentication")]
public bool DisableStripeUserAuthentication { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ namespace Stripe
public class AccountSessionComponentsAccountOnboardingFeatures : StripeEntity<AccountSessionComponentsAccountOnboardingFeatures>
{
/// <summary>
/// Disables Stripe user authentication for this embedded component. This feature can only
/// be false for accounts where you’re responsible for collecting updated information when
/// requirements are due or change, like custom accounts. The default value for this feature
/// is <c>false</c> when <c>external_account_collection</c> is enabled and <c>true</c>
/// otherwise.
/// Disables Stripe user authentication for this embedded component. This value can only be
/// true for accounts where <c>controller.requirement_collection</c> is <c>application</c>.
/// The default value is the opposite of the <c>external_account_collection</c> value. For
/// example, if you don’t set <c>external_account_collection</c>, it defaults to true and
/// <c>disable_stripe_user_authentication</c> defaults to false.
/// </summary>
[JsonProperty("disable_stripe_user_authentication")]
public bool DisableStripeUserAuthentication { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ namespace Stripe
public class AccountSessionComponentsBalancesFeatures : StripeEntity<AccountSessionComponentsBalancesFeatures>
{
/// <summary>
/// Disables Stripe user authentication for this embedded component. This feature can only
/// be false for accounts where you’re responsible for collecting updated information when
/// requirements are due or change, like custom accounts. The default value for this feature
/// is <c>false</c> when <c>external_account_collection</c> is enabled and <c>true</c>
/// otherwise.
/// Disables Stripe user authentication for this embedded component. This value can only be
/// true for accounts where <c>controller.requirement_collection</c> is <c>application</c>.
/// The default value is the opposite of the <c>external_account_collection</c> value. For
/// example, if you don’t set <c>external_account_collection</c>, it defaults to true and
/// <c>disable_stripe_user_authentication</c> defaults to false.
/// </summary>
[JsonProperty("disable_stripe_user_authentication")]
public bool DisableStripeUserAuthentication { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ namespace Stripe
public class AccountSessionComponentsNotificationBannerFeatures : StripeEntity<AccountSessionComponentsNotificationBannerFeatures>
{
/// <summary>
/// Disables Stripe user authentication for this embedded component. This feature can only
/// be false for accounts where you’re responsible for collecting updated information when
/// requirements are due or change, like custom accounts. The default value for this feature
/// is <c>false</c> when <c>external_account_collection</c> is enabled and <c>true</c>
/// otherwise.
/// Disables Stripe user authentication for this embedded component. This value can only be
/// true for accounts where <c>controller.requirement_collection</c> is <c>application</c>.
/// The default value is the opposite of the <c>external_account_collection</c> value. For
/// example, if you don’t set <c>external_account_collection</c>, it defaults to true and
/// <c>disable_stripe_user_authentication</c> defaults to false.
/// </summary>
[JsonProperty("disable_stripe_user_authentication")]
public bool DisableStripeUserAuthentication { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ namespace Stripe
public class AccountSessionComponentsPayoutsFeatures : StripeEntity<AccountSessionComponentsPayoutsFeatures>
{
/// <summary>
/// Disables Stripe user authentication for this embedded component. This feature can only
/// be false for accounts where you’re responsible for collecting updated information when
/// requirements are due or change, like custom accounts. The default value for this feature
/// is <c>false</c> when <c>external_account_collection</c> is enabled and <c>true</c>
/// otherwise.
/// Disables Stripe user authentication for this embedded component. This value can only be
/// true for accounts where <c>controller.requirement_collection</c> is <c>application</c>.
/// The default value is the opposite of the <c>external_account_collection</c> value. For
/// example, if you don’t set <c>external_account_collection</c>, it defaults to true and
/// <c>disable_stripe_user_authentication</c> defaults to false.
/// </summary>
[JsonProperty("disable_stripe_user_authentication")]
public bool DisableStripeUserAuthentication { get; set; }
Expand Down
8 changes: 4 additions & 4 deletions src/Stripe.net/Entities/Accounts/AccountFutureRequirements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public class AccountFutureRequirements : StripeEntity<AccountFutureRequirements>
public List<AccountFutureRequirementsAlternative> Alternatives { get; set; }

/// <summary>
/// Date on which <c>future_requirements</c> merges with the main <c>requirements</c> hash
/// and <c>future_requirements</c> becomes empty. After the transition, <c>currently_due</c>
/// Date on which <c>future_requirements</c> becomes the main <c>requirements</c> hash and
/// <c>future_requirements</c> becomes empty. After the transition, <c>currently_due</c>
/// requirements may immediately become <c>past_due</c>, but the account may also be given a
/// grace period depending on its enablement state prior to transitioning.
/// </summary>
Expand Down Expand Up @@ -53,8 +53,8 @@ public class AccountFutureRequirements : StripeEntity<AccountFutureRequirements>
public List<AccountFutureRequirementsError> Errors { get; set; }

/// <summary>
/// Fields that need to be collected assuming all volume thresholds are reached. As they
/// become required, they appear in <c>currently_due</c> as well.
/// Fields you must collect when all thresholds are reached. As they become required, they
/// appear in <c>currently_due</c> as well.
/// </summary>
[JsonProperty("eventually_due")]
public List<string> EventuallyDue { get; set; }
Expand Down
5 changes: 2 additions & 3 deletions src/Stripe.net/Entities/Accounts/AccountRequirements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ public class AccountRequirements : StripeEntity<AccountRequirements>
public List<AccountRequirementsError> Errors { get; set; }

/// <summary>
/// Fields that need to be collected assuming all volume thresholds are reached. As they
/// become required, they appear in <c>currently_due</c> as well, and
/// <c>current_deadline</c> becomes set.
/// Fields you must collect when all thresholds are reached. As they become required, they
/// appear in <c>currently_due</c> as well, and <c>current_deadline</c> becomes set.
/// </summary>
[JsonProperty("eventually_due")]
public List<string> EventuallyDue { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ public IBalanceTransactionSource Source
/// <c>obligation_reversal_inbound</c>, <c>payment</c>, <c>payment_failure_refund</c>,
/// <c>payment_network_reserve_hold</c>, <c>payment_network_reserve_release</c>,
/// <c>payment_refund</c>, <c>payment_reversal</c>, <c>payment_unreconciled</c>,
/// <c>payout</c>, <c>payout_cancel</c>, <c>payout_failure</c>, <c>refund</c>,
/// <c>refund_failure</c>, <c>reserve_transaction</c>, <c>reserved_funds</c>,
/// <c>payout</c>, <c>payout_cancel</c>, <c>payout_failure</c>,
/// <c>payout_minimum_balance_hold</c>, <c>payout_minimum_balance_release</c>,
/// <c>refund</c>, <c>refund_failure</c>, <c>reserve_transaction</c>, <c>reserved_funds</c>,
/// <c>stripe_fee</c>, <c>stripe_fx_fee</c>, <c>tax_fee</c>, <c>topup</c>,
/// <c>topup_reversal</c>, <c>transfer</c>, <c>transfer_cancel</c>, <c>transfer_failure</c>,
/// or <c>transfer_refund</c>. Learn more about <a
Expand All @@ -171,8 +172,9 @@ public IBalanceTransactionSource Source
/// <c>obligation_reversal_inbound</c>, <c>payment</c>, <c>payment_failure_refund</c>,
/// <c>payment_network_reserve_hold</c>, <c>payment_network_reserve_release</c>,
/// <c>payment_refund</c>, <c>payment_reversal</c>, <c>payment_unreconciled</c>,
/// <c>payout</c>, <c>payout_cancel</c>, <c>payout_failure</c>, <c>refund</c>,
/// <c>refund_failure</c>, <c>reserve_transaction</c>, <c>reserved_funds</c>,
/// <c>payout</c>, <c>payout_cancel</c>, <c>payout_failure</c>,
/// <c>payout_minimum_balance_hold</c>, <c>payout_minimum_balance_release</c>,
/// <c>refund</c>, <c>refund_failure</c>, <c>reserve_transaction</c>, <c>reserved_funds</c>,
/// <c>stripe_fee</c>, <c>stripe_fx_fee</c>, <c>tax_fee</c>, <c>topup</c>,
/// <c>topup_reversal</c>, <c>transfer</c>, <c>transfer_cancel</c>, <c>transfer_failure</c>,
/// or <c>transfer_refund</c>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ public class CreditBalanceTransactionCredit : StripeEntity<CreditBalanceTransact
[JsonProperty("amount")]
public CreditBalanceTransactionCreditAmount Amount { get; set; }

/// <summary>
/// Details of the invoice to which the reinstated credits were originally applied. Only
/// present if <c>type</c> is <c>credits_application_invoice_voided</c>.
/// </summary>
[JsonProperty("credits_application_invoice_voided")]
public CreditBalanceTransactionCreditCreditsApplicationInvoiceVoided CreditsApplicationInvoiceVoided { get; set; }

/// <summary>
/// The type of credit transaction.
/// One of: <c>credits_application_invoice_voided</c>, or <c>credits_granted</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// File generated from our OpenAPI spec
namespace Stripe.Billing
{
using Newtonsoft.Json;
using Stripe.Infrastructure;

public class CreditBalanceTransactionCreditCreditsApplicationInvoiceVoided : StripeEntity<CreditBalanceTransactionCreditCreditsApplicationInvoiceVoided>
{
#region Expandable Invoice

/// <summary>
/// (ID of the Invoice)
/// The invoice to which the reinstated billing credits were originally applied.
/// </summary>
[JsonIgnore]
public string InvoiceId
{
get => this.InternalInvoice?.Id;
set => this.InternalInvoice = SetExpandableFieldId(value, this.InternalInvoice);
}

/// <summary>
/// (Expanded)
/// The invoice to which the reinstated billing credits were originally applied.
///
/// For more information, see the <a href="https://stripe.com/docs/expand">expand documentation</a>.
/// </summary>
[JsonIgnore]
public Invoice Invoice
{
get => this.InternalInvoice?.ExpandedObject;
set => this.InternalInvoice = SetExpandableFieldObject(value, this.InternalInvoice);
}

[JsonProperty("invoice")]
[JsonConverter(typeof(ExpandableFieldConverter<Invoice>))]
internal ExpandableField<Invoice> InternalInvoice { get; set; }
#endregion

/// <summary>
/// The invoice line item to which the reinstated billing credits were originally applied.
/// </summary>
[JsonProperty("invoice_line_item")]
public string InvoiceLineItem { get; set; }
}
}
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public class CapabilityFutureRequirements : StripeEntity<CapabilityFutureRequire
public List<CapabilityFutureRequirementsAlternative> Alternatives { get; set; }

/// <summary>
/// Date on which <c>future_requirements</c> merges with the main <c>requirements</c> hash
/// and <c>future_requirements</c> becomes empty. After the transition, <c>currently_due</c>
/// Date on which <c>future_requirements</c> becomes the main <c>requirements</c> hash and
/// <c>future_requirements</c> becomes empty. After the transition, <c>currently_due</c>
/// requirements may immediately become <c>past_due</c>, but the account may also be given a
/// grace period depending on the capability's enablement state prior to transitioning.
/// </summary>
Expand Down Expand Up @@ -53,8 +53,8 @@ public class CapabilityFutureRequirements : StripeEntity<CapabilityFutureRequire
public List<CapabilityFutureRequirementsError> Errors { get; set; }

/// <summary>
/// Fields that need to be collected assuming all volume thresholds are reached. As they
/// become required, they appear in <c>currently_due</c> as well.
/// Fields you must collect when all thresholds are reached. As they become required, they
/// appear in <c>currently_due</c> as well.
/// </summary>
[JsonProperty("eventually_due")]
public List<string> EventuallyDue { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ public class CapabilityRequirements : StripeEntity<CapabilityRequirements>
public List<AccountRequirementsError> Errors { get; set; }

/// <summary>
/// Fields that need to be collected assuming all volume thresholds are reached. As they
/// become required, they appear in <c>currently_due</c> as well, and
/// <c>current_deadline</c> becomes set.
/// Fields you must collect when all thresholds are reached. As they become required, they
/// appear in <c>currently_due</c> as well, and <c>current_deadline</c> becomes set.
/// </summary>
[JsonProperty("eventually_due")]
public List<string> EventuallyDue { get; set; }
Expand Down
Loading
Loading