Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
11ad549
Update generated code for v1670
stripe-openapi[bot] Apr 10, 2025
45d6a71
Update generated code for v1671
stripe-openapi[bot] Apr 11, 2025
b876d3d
Update generated code for v1672
stripe-openapi[bot] Apr 11, 2025
1fe18ab
Update generated code for v1673
stripe-openapi[bot] Apr 11, 2025
9e3ad5a
Update generated code for v1675
stripe-openapi[bot] Apr 14, 2025
2d941fa
Update generated code for v1675
stripe-openapi[bot] Apr 14, 2025
c2844aa
Bump version to 48.0.1
ramya-stripe Apr 14, 2025
b277911
replaced Dictionary with ConcurrentDictionary (#3101)
jar-stripe Apr 15, 2025
f9f1c6f
Merge upstream and update generated code for v1678
stripe-openapi[bot] Apr 15, 2025
a16eae1
Bump version to 48.0.2
ramya-stripe Apr 15, 2025
8d4d32f
Merge upstream and update generated code for v1679
stripe-openapi[bot] Apr 15, 2025
1a39f87
Update generated code for v1680
stripe-openapi[bot] Apr 15, 2025
8681cdf
Update generated code for v1682
stripe-openapi[bot] Apr 16, 2025
38ce054
Update generated code for v1685
stripe-openapi[bot] Apr 16, 2025
01407c5
Update generated code for v1686
stripe-openapi[bot] Apr 16, 2025
1c08192
Update generated code for v1687
stripe-openapi[bot] Apr 17, 2025
18df85a
Update generated code for v1688
stripe-openapi[bot] Apr 17, 2025
17b5131
Update generated code for v1689
stripe-openapi[bot] Apr 17, 2025
86586c7
Update generated code for v1691
stripe-openapi[bot] Apr 17, 2025
225b0a9
Update generated code for v1692
stripe-openapi[bot] Apr 17, 2025
cf4f8c4
Update generated code for v1694
stripe-openapi[bot] Apr 17, 2025
4749ee2
Update generated code for v1695
stripe-openapi[bot] Apr 17, 2025
8d3b264
Update generated code for v1696
stripe-openapi[bot] Apr 17, 2025
f7bf7b8
changed ContentEncoder to emit lowercase true/false for boolean param…
jar-stripe Apr 17, 2025
f5babf4
Merge upstream and update generated code for v1697
stripe-openapi[bot] Apr 17, 2025
aa6df4b
Merge branch 'beta' into latest-codegen-beta
prathmesh-stripe Apr 17, 2025
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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@ See [SaaS platform payments with subscription billing using Accounts v2](https:/

* [#3069](https://github.com/stripe/stripe-dotnet/pull/3069) Enhance beta version handling in ApiVersion
* `StripeConfiguation.AddBetaVersion` will use the highest version number used for a beta feature instead of throwing an `Exception` on a conflict as it had done previously.


## 48.0.2 - 2025-04-15
* [#3101](https://github.com/stripe/stripe-dotnet/pull/3101) Replace Dictionary with ConcurrentDictionary in SerializablePropertyCache to fix a concurrency related error reported in [#3100](https://github.com/stripe/stripe-dotnet/issues/3100)

## 48.0.1 - 2025-04-14
* [#3090](https://github.com/stripe/stripe-dotnet/pull/3090) Disable Json.NET metadata special handling. Fixes issue [#3068](https://github.com/stripe/stripe-dotnet/issues/3068)

## 48.0.0 - 2025-04-01
* [#3074](https://github.com/stripe/stripe-dotnet/pull/3074) System.Text.Json Serialization Support release to GA
* Add System.Text.Json support for serializing Stripe.net entities and objects for applications running on .NET 6 and above. Now you can pass a Stripe.net object or collection of objects to the System.Text.Json serializer and it will produce the correct JSON string.
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1669
v1697
5 changes: 5 additions & 0 deletions src/Stripe.net/Constants/EventTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,11 @@ public static class EventTypes
/// </summary>
public const string FinancialConnectionsSessionUpdated = "financial_connections.session.updated";

/// <summary>
/// Occurs when FX Quote's lock_status field transitions to 'Expired'.
/// </summary>
public const string FxQuoteExpired = "fx_quote.expired";

/// <summary>
/// Occurs whenever a VerificationSession is canceled.
/// </summary>
Expand Down
6 changes: 6 additions & 0 deletions src/Stripe.net/Entities/Accounts/AccountCompany.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ public class AccountCompany : StripeEntity<AccountCompany>
#endif
public string Phone { get; set; }

[JsonProperty("registration_date")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("registration_date")]
#endif
public AccountCompanyRegistrationDate RegistrationDate { get; set; }

/// <summary>
/// The category identifying the legal structure of the company or legal entity. Also
/// available for accounts where <a
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class AccountCompanyRegistrationDate : StripeEntity<AccountCompanyRegistrationDate>
{
/// <summary>
/// The day of registration, between 1 and 31.
/// </summary>
[JsonProperty("day")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("day")]
#endif
public long? Day { get; set; }

/// <summary>
/// The month of registration, between 1 and 12.
/// </summary>
[JsonProperty("month")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("month")]
#endif
public long? Month { get; set; }

/// <summary>
/// The four-digit year of registration.
/// </summary>
[JsonProperty("year")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("year")]
#endif
public long? Year { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ namespace Stripe
#endif

/// <summary>
/// Options for customizing account balances within Stripe.
/// Options for customizing account balances and payout settings for a Stripe platform’s
/// connected accounts.
///
/// This API is only available for users enrolled in the public preview for Accounts v2 on
/// Stripe Connect. If you are not in this preview, please use the <a
/// href="https://docs.stripe.com/api/accounts?api-version=2025-03-31.basil">Accounts v1
/// API</a> to manage your connected accounts’ balance settings instead.
/// </summary>
public class BalanceSettings : StripeEntity<BalanceSettings>, IHasObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ namespace Stripe.Capital
public class FinancingOfferAcceptedTerms : StripeEntity<FinancingOfferAcceptedTerms>
{
/// <summary>
/// Amount of financing offered, in minor units.
/// Amount of financing offered, in minor units. For example, $1,000 USD will be represented
/// as 100000.
/// </summary>
[JsonProperty("advance_amount")]
#if NET6_0_OR_GREATER
Expand All @@ -27,7 +28,7 @@ public class FinancingOfferAcceptedTerms : StripeEntity<FinancingOfferAcceptedTe
public string Currency { get; set; }

/// <summary>
/// Fixed fee amount, in minor units.
/// Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000.
/// </summary>
[JsonProperty("fee_amount")]
#if NET6_0_OR_GREATER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ namespace Stripe.Capital
public class FinancingOfferOfferedTerms : StripeEntity<FinancingOfferOfferedTerms>
{
/// <summary>
/// Amount of financing offered, in minor units.
/// Amount of financing offered, in minor units. For example, $1,000 USD will be represented
/// as 100000.
/// </summary>
[JsonProperty("advance_amount")]
#if NET6_0_OR_GREATER
Expand Down Expand Up @@ -38,7 +39,7 @@ public class FinancingOfferOfferedTerms : StripeEntity<FinancingOfferOfferedTerm
public string Currency { get; set; }

/// <summary>
/// Fixed fee amount, in minor units.
/// Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000.
/// </summary>
[JsonProperty("fee_amount")]
#if NET6_0_OR_GREATER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ namespace Stripe.Capital
public class FinancingSummaryDetails : StripeEntity<FinancingSummaryDetails>
{
/// <summary>
/// Amount of financing offered, in minor units.
/// Amount of financing offered, in minor units. For example, $1,000 USD will be represented
/// as 100000.
/// </summary>
[JsonProperty("advance_amount")]
#if NET6_0_OR_GREATER
Expand Down Expand Up @@ -46,7 +47,7 @@ public class FinancingSummaryDetails : StripeEntity<FinancingSummaryDetails>
public FinancingSummaryDetailsCurrentRepaymentInterval CurrentRepaymentInterval { get; set; }

/// <summary>
/// Fixed fee amount, in minor units.
/// Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000.
/// </summary>
[JsonProperty("fee_amount")]
#if NET6_0_OR_GREATER
Expand All @@ -55,7 +56,8 @@ public class FinancingSummaryDetails : StripeEntity<FinancingSummaryDetails>
public long FeeAmount { get; set; }

/// <summary>
/// The amount the Connected account has paid toward the financing debt so far.
/// The amount the Connected account has paid toward the financing debt so far, in minor
/// units. For example, $1,000 USD will be represented as 100000.
/// </summary>
[JsonProperty("paid_amount")]
#if NET6_0_OR_GREATER
Expand All @@ -64,7 +66,8 @@ public class FinancingSummaryDetails : StripeEntity<FinancingSummaryDetails>
public long PaidAmount { get; set; }

/// <summary>
/// The balance remaining to be paid on the financing, in minor units.
/// The balance remaining to be paid on the financing, in minor units. For example, $1,000
/// USD will be represented as 100000.
/// </summary>
[JsonProperty("remaining_amount")]
#if NET6_0_OR_GREATER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public class FinancingSummaryDetailsCurrentRepaymentInterval : StripeEntity<Fina
public decimal DueAt { get; set; }

/// <summary>
/// The amount that has already been paid in the current repayment interval.
/// The amount that has already been paid in the current repayment interval, in minor units.
/// For example, $100 USD will be represented as 10000.
/// </summary>
[JsonProperty("paid_amount")]
#if NET6_0_OR_GREATER
Expand All @@ -29,7 +30,8 @@ public class FinancingSummaryDetailsCurrentRepaymentInterval : StripeEntity<Fina
public long? PaidAmount { get; set; }

/// <summary>
/// The amount that is yet to be paid in the current repayment interval.
/// The amount that is yet to be paid in the current repayment interval, in minor units. For
/// example, $100 USD will be represented as 10000.
/// </summary>
[JsonProperty("remaining_amount")]
#if NET6_0_OR_GREATER
Expand Down
10 changes: 10 additions & 0 deletions src/Stripe.net/Entities/Charges/ChargeBillingDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,15 @@ public class ChargeBillingDetails : StripeEntity<ChargeBillingDetails>
[STJS.JsonPropertyName("phone")]
#endif
public string Phone { get; set; }

/// <summary>
/// Taxpayer identification number. Used only for transactions between LATAM buyers and
/// non-LATAM sellers.
/// </summary>
[JsonProperty("tax_id")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("tax_id")]
#endif
public string TaxId { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,15 @@ public class ConfirmationTokenPaymentMethodPreviewBillingDetails : StripeEntity<
[STJS.JsonPropertyName("phone")]
#endif
public string Phone { get; set; }

/// <summary>
/// Taxpayer identification number. Used only for transactions between LATAM buyers and
/// non-LATAM sellers.
/// </summary>
[JsonProperty("tax_id")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("tax_id")]
#endif
public string TaxId { get; set; }
}
}
22 changes: 22 additions & 0 deletions src/Stripe.net/Entities/Coupons/Coupon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,17 @@ public class Coupon : StripeEntity<Coupon>, IHasId, IHasMetadata, IHasObject
#endif
public DateTime? RedeemBy { get; set; }

/// <summary>
/// Configuration of the <a
/// href="https://docs.stripe.com/billing/subscriptions/script-coupons">script</a> used to
/// calculate the discount.
/// </summary>
[JsonProperty("script")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("script")]
#endif
public CouponScript Script { get; set; }

/// <summary>
/// Number of times this coupon has been applied to a customer.
/// </summary>
Expand All @@ -190,6 +201,17 @@ public class Coupon : StripeEntity<Coupon>, IHasId, IHasMetadata, IHasObject
#endif
public long TimesRedeemed { get; set; }

/// <summary>
/// One of <c>amount_off</c>, <c>percent_off</c>, or <c>script</c>. Describes the type of
/// coupon logic used to calculate the discount.
/// One of: <c>amount_off</c>, <c>percent_off</c>, or <c>script</c>.
/// </summary>
[JsonProperty("type")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("type")]
#endif
public string Type { get; set; }

/// <summary>
/// Taking account of the above properties, whether this coupon can still be applied to a
/// customer.
Expand Down
40 changes: 40 additions & 0 deletions src/Stripe.net/Entities/Coupons/CouponScript.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class CouponScript : StripeEntity<CouponScript>, IHasId
{
/// <summary>
/// The configuration values of the script. The keys and values are specific to the script
/// implementation.
/// </summary>
[JsonProperty("configuration")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("configuration")]
#endif
public Dictionary<string, object> Configuration { get; set; }

/// <summary>
/// The name of the script used to calculate the discount.
/// </summary>
[JsonProperty("display_name")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("display_name")]
#endif
public string DisplayName { get; set; }

/// <summary>
/// The script implementation ID for this coupon.
/// </summary>
[JsonProperty("id")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("id")]
#endif
public string Id { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Events/Event.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public class Event : StripeEntity<Event>, IHasId, IHasObject
/// <c>financial_connections.account.refreshed_inferred_balances</c>,
/// <c>financial_connections.account.refreshed_ownership</c>,
/// <c>financial_connections.account.refreshed_transactions</c>,
/// <c>financial_connections.session.updated</c>,
/// <c>financial_connections.session.updated</c>, <c>fx_quote.expired</c>,
/// <c>identity.verification_session.canceled</c>,
/// <c>identity.verification_session.created</c>,
/// <c>identity.verification_session.processing</c>,
Expand Down
Loading
Loading