Skip to content

Commit

Permalink
Update generated code for v1399
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Dec 9, 2024
1 parent 4d0c154 commit ad094c4
Show file tree
Hide file tree
Showing 109 changed files with 1,011 additions and 420 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1347
v1399
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
4 changes: 2 additions & 2 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
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
7 changes: 7 additions & 0 deletions src/Stripe.net/Entities/Cards/Card.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,13 @@ public Customer Customer
[JsonProperty("networks")]
public CardNetworks Networks { get; set; }

/// <summary>
/// Status of a card based on the card issuer.
/// One of: <c>regulated</c>, or <c>unregulated</c>.
/// </summary>
[JsonProperty("regulated_status")]
public string RegulatedStatus { get; set; }

/// <summary>
/// For external accounts that are cards, possible values are <c>new</c> and <c>errored</c>.
/// If a payout fails, the status is set to <c>errored</c> and <a
Expand Down
14 changes: 14 additions & 0 deletions src/Stripe.net/Entities/Charges/ChargeOutcome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ namespace Stripe

public class ChargeOutcome : StripeEntity<ChargeOutcome>
{
/// <summary>
/// For charges declined by the network, a 2 digit code which indicates the advice returned
/// by the network on how to proceed with an error.
/// </summary>
[JsonProperty("network_advice_code")]
public string NetworkAdviceCode { get; set; }

/// <summary>
/// For charges declined by the network, a brand specific 2, 3, or 4 digit code which
/// indicates the reason the authorization failed.
/// </summary>
[JsonProperty("network_decline_code")]
public string NetworkDeclineCode { get; set; }

/// <summary>
/// Possible values are <c>approved_by_network</c>, <c>declined_by_network</c>,
/// <c>not_sent_to_network</c>, and <c>reversed_after_approval</c>. The value
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class ChargePaymentMethodDetailsAmazonPay : StripeEntity<ChargePaymentMethodDetailsAmazonPay>
{
[JsonProperty("funding")]
public ChargePaymentMethodDetailsAmazonPayFunding Funding { get; set; }
}
}
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 ChargePaymentMethodDetailsAmazonPayFunding : StripeEntity<ChargePaymentMethodDetailsAmazonPayFunding>
{
[JsonProperty("card")]
public ChargePaymentMethodDetailsAmazonPayFundingCard Card { get; set; }

/// <summary>
/// funding type of the underlying payment method.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class ChargePaymentMethodDetailsAmazonPayFundingCard : StripeEntity<ChargePaymentMethodDetailsAmazonPayFundingCard>
{
/// <summary>
/// Card brand. Can be <c>amex</c>, <c>diners</c>, <c>discover</c>, <c>eftpos_au</c>,
/// <c>jcb</c>, <c>link</c>, <c>mastercard</c>, <c>unionpay</c>, <c>visa</c>, or
/// <c>unknown</c>.
/// </summary>
[JsonProperty("brand")]
public string Brand { get; set; }

/// <summary>
/// Two-letter ISO code representing the country of the card. You could use this attribute
/// to get a sense of the international breakdown of cards you've collected.
/// </summary>
[JsonProperty("country")]
public string Country { get; set; }

/// <summary>
/// Two-digit number representing the card's expiration month.
/// </summary>
[JsonProperty("exp_month")]
public long? ExpMonth { get; set; }

/// <summary>
/// Four-digit number representing the card's expiration year.
/// </summary>
[JsonProperty("exp_year")]
public long? ExpYear { get; set; }

/// <summary>
/// Card funding type. Can be <c>credit</c>, <c>debit</c>, <c>prepaid</c>, or
/// <c>unknown</c>.
/// </summary>
[JsonProperty("funding")]
public string Funding { get; set; }

/// <summary>
/// The last four digits of the card.
/// </summary>
[JsonProperty("last4")]
public string Last4 { get; set; }
}
}
Loading

0 comments on commit ad094c4

Please sign in to comment.